luogen1996 / oneteacher Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
When i excute the script, it met the problem(it appeared epoch 12):
Traceback (most recent call last): File "train_20.py", line 920, in <module> main(opt) File "train_20.py", line 818, in main train(opt.hyp, opt, device, callbacks) File "train_20.py", line 511, in train out, train_out,pseudo_class_one_hot =model_teacher(unlabel_imgs_weak_aug,augment=True) File "/home/yy/miniconda3/envs/general/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/yy/log/4.semi-supervised/OneTeacher-main/models/yolo.py", line 523, in forward return self.forward_augment(x) # augmented inference, None File "/home/yy/log/4.semi-supervised/OneTeacher-main/models/yolo.py", line 533, in forward_augment xi = scale_img(x.flip(fi) if fi else x, si, gs=int(self.stride.max())) File "/home/yy/log/4.semi-supervised/OneTeacher-main/utils/torch_utils.py", line 300, in scale_img s = (int(h * ratio), int(w * ratio)) # new size TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
@ @luogen1996
甚至generate_random_supervised_seed_yolo.py里面都没有output_file这个参数。代码是不是缺了啊 @luogen1996
why?
@luogen1996 which are the main steps to be able to integrate yolov7 in place of yolov5 ?
发生异常: NameError name '_SPLITS_COCO5_FORMAT' is not defined File "/home/cv/yj/5.semi-object/OneTeacher-main/data_processing/builtin.py", line 103, in register_coco5 for _, splits_per_dataset in _SPLITS_COCO5_FORMAT.items(): File "/home/cv/yj/5.semi-object/OneTeacher-main/data_processing/builtin.py", line 160, in <module> register_coco5(_root) File "/home/cv/yj/5.semi-object/OneTeacher-main/data_processing/generate_random_supervised_seed_yolo.py", line 7, in <module> from builtin import * NameError: name '_SPLITS_COCO5_FORMAT' is not defined
generate_random_supervised_seed_yolo.py: error: unrecognized arguments: --output_file
, how to generate the COCO_supervision_10.json
, what is the form of COCO_supervision_10.json
?active_sampling
directory, data_processing
directory denotes active_sampling
directory?generate_random_supervised_seed_yolo.py
? it exists some problems Attribute 'thing_classes' in the metadata of 'coco_2017_train' cannot be set to a different value! ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'] != ['graminearum', 'pseudograminearum', 'moniliforme', 'glycines', 'gloeosporioides', 'clavispora', 'anthracnose'] File "/home/cv/yj/5.semi-object/detectron2/detectron2/data/catalog.py", line 148, in __setattr__ assert oldval == val, ( File "/home/cv/yj/5.semi-object/detectron2/detectron2/data/datasets/coco.py", line 80, in load_coco_json meta.thing_classes = thing_classes File "/home/cv/yj/5.semi-object/detectron2/detectron2/data/datasets/coco.py", line 500, in <lambda> DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name)) File "/home/cv/yj/5.semi-object/detectron2/detectron2/data/catalog.py", line 58, in get return f() File "/home/cv/yj/5.semi-object/detectron2/detectron2/data/build.py", line 241, in <listcomp> dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names] File "/home/cv/yj/5.semi-object/detectron2/detectron2/data/build.py", line 241, in get_detection_dataset_dicts dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names] File "/home/cv/yj/5.semi-object/OneTeacher-main/data_processing/generate_random_supervised_seed_yolo.py", line 11, in generate dataset_dicts = get_detection_dataset_dicts( File "/home/cv/yj/5.semi-object/OneTeacher-main/data_processing/generate_random_supervised_seed_yolo.py", line 55, in <module> generate( AssertionError: Attribute 'thing_classes' in the metadata of 'coco_2017_train' cannot be set to a different value! ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'] != ['grami', 'pseudogrami', 'monili', 'glyci', 'gloeos', 'clavis', 'anth']
after resolving all problems about training my custom dataset with One teacher when I launch the training, I got this error:
Epoch gpu_mem box obj cls mls semi_obj semi_cls semi_mls labelssemi_labels
0/299 2.68G 0.1051 0.09514 0.01167 0.09257 0 0 0 104 0: 22%|███████▊ | 3000/13860 [02:58<10:45, 16.81it/s]
Traceback (most recent call last):
File "/app/train_semi.py", line 931, in
main(opt)
File "/app/train_semi.py", line 829, in main
train(opt.hyp, opt, device, callbacks)
File "/app/train_semi.py", line 510, in train
_update_teacher_model(model if ema is None else ema.ema, model_teacher, word_size=WORLD_SIZE, keep_rate=0.)
File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/app/utils/torch_utils.py", line 48, in _update_teacher_model
raise Exception("{} is not found in student model".format(key))
Exception: model.0.conv.conv.weight is not found in student model
How could I resolve it ?
Can you provide a pre-trained weight?@ @luogen1996
想知道论文中的实验结论是否是在labels 为None 的情况下得出的。
when i execution this command ,
"python data_processing/generate_random_supervised_seed_yolo.py --dataset_name 'coco_2017_train' --random_seeds 0,1,2,3,4,5,6,7,8,9 --random_file ./data_processing/COCO_supervision.txt --random_percent 10.0 --output_file ./dataseed/COCO_supervision_10.json"
this error was occured .
"Traceback (most recent call last):
File "data_processing/generate_random_supervised_seed_yolo.py", line 7, in
from builtin import *
File "/home/ssod/OneTeacher/data_processing/builtin.py", line 175, in
register_coco5(_root)
File "/home/ssod/OneTeacher/data_processing/builtin.py", line 115, in register_coco5
for _, splits_per_dataset in _SPLITS_COCO5_FORMAT.items():
NameError: name '_SPLITS_COCO5_FORMAT' is not defined"
please help me.
if isinstance(out,list):
pseudo_boxes_reg, pseudo_boxes_cls = non_max_suppression_pseudo_decouple_multi_view(out, hyp[ 'bbox_threshold'], hyp['cls_threshold'], multi_label=True ,agnostic=single_cls, )
else:
pseudo_boxes_reg,pseudo_boxes_cls = non_max_suppression_pseudo_decouple(out, hyp['bbox_threshold'],hyp['cls_threshold'], multi_label=True, agnostic=single_cls )
Line 527 in 9a0e798
When I run code, it always run at non_max_suppression_pseudo_decouple
. How type of model, how type config can output a list and run non_max_suppression_pseudo_decouple_multi_view
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.