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' #545

Open
guluahljj opened this issue Dec 7, 2024 · 0 comments
Open

ModuleNotFoundError: No module named 'models' #545

guluahljj opened this issue Dec 7, 2024 · 0 comments

Comments

@guluahljj
Copy link

E:\ZZZ_Github\YOLO-World\demo\sample_images 'person,dog,cat' --topk 100 --threshold 0.005 --output-dir demo_outputs
Loads checkpoint by local backend from path: ./weights/yolov5s.pt
Traceback (most recent call last):
File "E:\ZZZ_Github\YOLO-World\demo\image_demo.py", line 179, in
model = init_detector(cfg, checkpoint=args.checkpoint, device=args.device)
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\mmdet\apis\inference.py", line 68, in init_detector
checkpoint = load_checkpoint(model, checkpoint, map_location='cpu')
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\mmengine\runner\checkpoint.py", line 636, in load_checkpoint
checkpoint = _load_checkpoint(filename, map_location, logger)
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\mmengine\runner\checkpoint.py", line 548, in _load_checkpoint
return CheckpointLoader.load_checkpoint(filename, map_location, logger)
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\mmengine\runner\checkpoint.py", line 330, in load_checkpoint
return checkpoint_loader(filename, map_location)
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\mmengine\runner\checkpoint.py", line 347, in load_from_local
checkpoint = torch.load(filename, map_location=map_location)
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\torch\serialization.py", line 712, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\torch\serialization.py", line 1046, in _load
result = unpickler.load()
File "E:\Anaconda_Enviroments\yoloworld\lib\site-packages\torch\serialization.py", line 1039, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'models'

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