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

运行image_demo.py报错 #125

Closed
Longleaves opened this issue Mar 12, 2024 · 23 comments
Closed

运行image_demo.py报错 #125

Longleaves opened this issue Mar 12, 2024 · 23 comments

Comments

@Longleaves
Copy link

使用的命令是:
python image_demo.py configs/pretrain/yolo_world_s_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py models/yolo_world_seg_m_dual_vlpan_2e-4_80e_8gpus_allmodules_finetune_lvis-ca465825.pth data/images/ 'person,dog,cat' --topk 100 --threshold 0.005 --output-dir demo_outputs/

报错内容是:
ModuleNotFoundError: No module named 'mmcv._ext'
ImportError: Failed to import yolo_world
You should set PYTHONPATH to make sys.path include the directory which contains your custom module

我已pip install -e .
请问这上面报错怎么解决呀?

@wondervictor
Copy link
Collaborator

这个看起来mmcv没有装好,可以单独安装一下看看

@Longleaves
Copy link
Author

这个看起来mmcv没有装好,可以单独安装一下看看

装哪个版本合适呀

@wondervictor
Copy link
Collaborator

2.0.0应该就可以

@Longleaves
Copy link
Author

Longleaves commented Mar 13, 2024

2.0.0应该就可以

您好,我重新下载了mmcv2.0.0,然后同样的命令运行,报错了。似乎是要从huggingface下载什么文件?然后超时了。需要配置什么文件吗
图片
图片

@taofuyu
Copy link
Contributor

taofuyu commented Mar 13, 2024

huggingface

READMDE里有huggingface的镜像网站,替换了就行

@Longleaves
Copy link
Author

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

@taofuyu
Copy link
Contributor

taofuyu commented Mar 13, 2024

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

@Longleaves
Copy link
Author

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

有没有可能把默认下载的网址改成镜像的?

@taofuyu
Copy link
Contributor

taofuyu commented Mar 13, 2024

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

有没有可能把默认下载的网址改成镜像的?

你直接在镜像网站里把需要的模型全下到本地,然后config里指定本地路径就行了,省得麻烦

@Longleaves
Copy link
Author

Longleaves commented Mar 13, 2024

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

有没有可能把默认下载的网址改成镜像的?

你直接在镜像网站里把需要的模型全下到本地,然后config里指定本地路径就行了,省得麻烦

解决啦,谢谢大佬。然后遇到[#110]的问题应该用[#94]的方法解决吗,还是说在更新中?
图片

@Longleaves
Copy link
Author

您好,请问是我哪里没配对吗,怎么那么多错的框。我用的s模型,命令是:
python demo.py configs/pretrain/yolo_world_s_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py models/yolo_world_seg_m_dual_vlpan_2e-4_80e_8gpus_allmodules_finetune_lvis-ca465825.pth
图片

@wondervictor
Copy link
Collaborator

@Longleaves 你这边修改了哪些东西

@taofuyu
Copy link
Contributor

taofuyu commented Mar 13, 2024

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

有没有可能把默认下载的网址改成镜像的?

你直接在镜像网站里把需要的模型全下到本地,然后config里指定本地路径就行了,省得麻烦

解决啦,谢谢大佬。然后遇到[#110]的问题应该用[#94]的方法解决吗,还是说在更新中? 图片

把image_demo.py版本回退下就好了,本来没啥问题,这个PR给改错了

@Longleaves
Copy link
Author

@Longleaves 你这边修改了哪些东西

没有修改任何东西哦

@Longleaves
Copy link
Author

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

有没有可能把默认下载的网址改成镜像的?

你直接在镜像网站里把需要的模型全下到本地,然后config里指定本地路径就行了,省得麻烦

解决啦,谢谢大佬。然后遇到[#110]的问题应该用[#94]的方法解决吗,还是说在更新中? 图片

把image_demo.py版本回退下就好了,本来没啥问题,这个PR给改错了

demo.py也是图片上那样咧

@Longleaves
Copy link
Author

Longleaves commented Mar 14, 2024

您好,请问是我哪里没配对吗,怎么那么多错的框。我用的s模型,命令是: python demo.py configs/pretrain/yolo_world_s_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py models/yolo_world_seg_m_dual_vlpan_2e-4_80e_8gpus_allmodules_finetune_lvis-ca465825.pth

是配错了模型,用成了seg,改成YOLO_WORLD_S就好啦。感谢你们!谢谢!

@Longleaves
Copy link
Author

Longleaves commented Mar 14, 2024

你们好,我第一次运行person, bus没有问题,如图1,第二只写了bus再提交就变成图2这样person的框也变成bus了。这是为什么呀?按clear以后也会显示错误,图3。
图1:
图片
图2:
图片
图3:
图片
图4:
图片

@fgd0707
Copy link

fgd0707 commented Mar 17, 2024

huggingface

READMDE里有huggingface的镜像网站,替换了就行

在哪个文件中替换呀?

config里model_name

有没有可能把默认下载的网址改成镜像的?

你直接在镜像网站里把需要的模型全下到本地,然后config里指定本地路径就行了,省得麻烦

解决啦,谢谢大佬。然后遇到[#110]的问题应该用[#94]的方法解决吗,还是说在更新中? 图片

把image_demo.py版本回退下就好了,本来没啥问题,这个PR给改错了

demo.py也是图片上那样咧

哥 这个class_id报错咋解决的 可以告诉下吗

@wondervictor
Copy link
Collaborator

@fgd0707 用最新的code,已经fix了

@wondervictor
Copy link
Collaborator

Hi all, the bug in the demo.py has been fixed, you can have a try! BTW, ONNX export is also supported!

@wondervictor
Copy link
Collaborator

This issue will be closed since there is no further update related to the main topic. Besides, the error has been fixed already. Thanks for your interest. If you have any questions about YOLO-World in the future, you're welcome to open a new issue.

@ccl-private
Copy link

我找不到pth模型下载的地方,这边只有一个模型:https://huggingface.co/spaces/stevengrove/YOLO-World/tree/main,而且找不到对应的config?

@ccl-private
Copy link

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

5 participants