YOLO-World icon indicating copy to clipboard operation
YOLO-World copied to clipboard

运行image_demo.py报错

Open Longleaves opened this issue 1 year ago • 3 comments

使用的命令是: 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 . 请问这上面报错怎么解决呀?

Longleaves avatar Mar 12 '24 09:03 Longleaves

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

wondervictor avatar Mar 12 '24 10:03 wondervictor

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

装哪个版本合适呀

Longleaves avatar Mar 12 '24 10:03 Longleaves

2.0.0应该就可以

wondervictor avatar Mar 12 '24 10:03 wondervictor

2.0.0应该就可以

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

Longleaves avatar Mar 13 '24 02:03 Longleaves

huggingface

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

taofuyu avatar Mar 13 '24 02:03 taofuyu

huggingface

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

在哪个文件中替换呀?

Longleaves avatar Mar 13 '24 02:03 Longleaves

huggingface

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

在哪个文件中替换呀?

config里model_name

taofuyu avatar Mar 13 '24 03:03 taofuyu

huggingface

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

在哪个文件中替换呀?

config里model_name

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

Longleaves avatar Mar 13 '24 05:03 Longleaves

huggingface

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

在哪个文件中替换呀?

config里model_name

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

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

taofuyu avatar Mar 13 '24 05:03 taofuyu

huggingface

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

在哪个文件中替换呀?

config里model_name

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

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

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

Longleaves avatar Mar 13 '24 07:03 Longleaves

您好,请问是我哪里没配对吗,怎么那么多错的框。我用的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 图片

Longleaves avatar Mar 13 '24 07:03 Longleaves

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

wondervictor avatar Mar 13 '24 07:03 wondervictor

huggingface

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

在哪个文件中替换呀?

config里model_name

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

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

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

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

taofuyu avatar Mar 13 '24 08:03 taofuyu

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

没有修改任何东西哦

Longleaves avatar Mar 13 '24 10:03 Longleaves

huggingface

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

在哪个文件中替换呀?

config里model_name

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

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

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

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

demo.py也是图片上那样咧

Longleaves avatar Mar 13 '24 10:03 Longleaves

您好,请问是我哪里没配对吗,怎么那么多错的框。我用的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 avatar Mar 14 '24 03:03 Longleaves

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

Longleaves avatar Mar 14 '24 06:03 Longleaves

huggingface

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

在哪个文件中替换呀?

config里model_name

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

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

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

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

demo.py也是图片上那样咧

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

fgd0707 avatar Mar 17 '24 14:03 fgd0707

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

wondervictor avatar Mar 17 '24 15:03 wondervictor

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

wondervictor avatar Mar 18 '24 13:03 wondervictor

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.

wondervictor avatar Mar 19 '24 07:03 wondervictor

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

ccl-private avatar Jun 12 '24 06:06 ccl-private

莫非是这个?:https://huggingface.co/wondervictor/YOLO-World/tree/main

ccl-private avatar Jun 12 '24 06:06 ccl-private