bubbliiiing / yolox-pytorch

这是一个yolox-pytorch的源码,可以用于训练自己的模型。
Apache License 2.0
890 stars 185 forks source link

ModuleNotFoundError: No module named 'models' #116

Open lip111 opened 2 years ago

lip111 commented 2 years ago

Traceback (most recent call last): File "O:\graduate\yolov7-bubbliiiing\predict.py", line 15, in yolo = YOLO() File "O:\graduate\yolov7-bubbliiiing\yolo.py", line 95, in init self.generate() File "O:\graduate\yolov7-bubbliiiing\yolo.py", line 108, in generate self.net.load_state_dict(torch.load(self.model_path, map_location=device)) File "D:\Anaconda\envs\pytorch-gpu\lib\site-packages\torch\serialization.py", line 592, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "D:\Anaconda\envs\pytorch-gpu\lib\site-packages\torch\serialization.py", line 851, in _load result = unpickler.load() ModuleNotFoundError: No module named 'models'

这是跑大佬您的yolov7时运行predict.py的问题,发错地方了😂

lip111 commented 2 years ago

我把权值文件弄错了,下载了个.pt的,换成.pth的就可以检测了😂