yolor
yolor copied to clipboard
ModuleNotFoundError: No module named 'models.yolo' #6326
Search before asking I have searched the YOLOv5 issues and found no similar bug report. YOLOv5 Component No response
Bug
Namespace(agnostic_nms=False, augment=False, cfg='/content/drive/MyDrive/神様/Augmentedstartups/yolor/cfg/yolor_w6.cfg', classes=None, conf_thres=0.25, device='0', img_size=1280, iou_thres=0.5, names='data/coco.names', output='/content/drive/MyDrive/Dev/Soccer/Output', save_txt=False, source='/content/drive/MyDrive/神様/Augmentedstartups/yolor/inference/images/horses.jpg', update=False, view_img=False, weights=['/content/drive/MyDrive/神様/Augmentedstartups/yolor/yolor-w6.pt'])
Traceback (most recent call last):
File "detect.py", line 186, in
detect()
File "detect.py", line 44, in detect
model.load_state_dict(torch.load(weights[0], map_location=device)['model'])
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 607, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 882, in _load
result = unpickler.load()
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 875, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'models.yolo'
Environment YoloR OS googlecolab
Minimal Reproducible Example https://github.com/Taitai6521/ModuleNotFoundError-No-module-named-models.yolo- If you refer to the code here, you will be able to understand the contents. Thank you very much for your cooperation.
Additional No response
Are you willing to submit a PR? Yes I'd like to help by submitting a PR!
Same issue, any solutions?
Maybe u guys used the main branch ? U could try the paper branch.
checkpoint paper branch. This is really a confusing point if you don't read it carefully
Is there a solution?
自动回复: 已收到,谢谢来信
Search before asking I have searched the YOLOv5 issues and found no similar bug report. YOLOv5 Component No response
Bug
Namespace(agnostic_nms=False, augment=False, cfg='/content/drive/MyDrive/神様/Augmentedstartups/yolor/cfg/yolor_w6.cfg', classes=None, conf_thres=0.25, device='0', img_size=1280, iou_thres=0.5, names='data/coco.names', output='/content/drive/MyDrive/Dev/Soccer/Output', save_txt=False, source='/content/drive/MyDrive/神様/Augmentedstartups/yolor/inference/images/horses.jpg', update=False, view_img=False, weights=['/content/drive/MyDrive/神様/Augmentedstartups/yolor/yolor-w6.pt']) Traceback (most recent call la
I have the same problem, have you solved it?
Is there a solution?
It seems that you are using code of main branch and weights of paper branch. If you want to use paper branch, then make sure to use paper branch weights and vice versa.
Yolor-p6 main branch weights: yolor-p6.pt Yolor-p6 paper branch weights: yolor_p6.pt
i found the reason. there was a 'models.py' file at the same depth
自动回复: 已收到,谢谢来信