Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'models' #116

Open
lip111 opened this issue Nov 17, 2022 · 1 comment
Open

ModuleNotFoundError: No module named 'models' #116

lip111 opened this issue Nov 17, 2022 · 1 comment

Comments

@lip111
Copy link

lip111 commented Nov 17, 2022

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
Copy link
Author

lip111 commented Nov 17, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant