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'
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的问题,发错地方了😂