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

Environment variable configuration issues

Open Jacknegar opened this issue 1 year ago • 5 comments

I set PYTHONPATH=YOLO-World path as described in the README of the author's demo, but I got an error: ImportError: Failed to import custom modules from {'imports': ['yolo_world'], 'allow_failed_imports': False}, the current sys.path is: /root/autodl-tmp/YM/YOLO-World /root/miniconda3/lib/python38.zip /root/miniconda3/lib/python3.8 /root/miniconda3/lib/python3.8/lib-dynload /root/miniconda3/lib/python3.8/site-packages ./deploy You should set PYTHONPATH to make sys.path include the directory which contains your custom module After that, I searched the related forums and set the init.py file in the yolo_world folder to empty, which solved the error, but another error appeared: KeyError: 'YOLOWorldDetector is not in the mmyolo::model registry. Please check whether the value of YOLOWorldDetector is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module' I re-pasted the previously deleted content back into the init.py file and ran it again, and both problems disappeared, but I have to cycle through it every time I restart the server. Here's my run command:python demo/image_demo.py configs/pretrain/yolo_world_v2_m_640.py weights/yolo_world_v2_m.pth demo/dog.jpeg 'person,dog,cat' --topk 100 --threshold 0.005 --output-dir demo_outputs

Jacknegar avatar May 07 '24 19:05 Jacknegar

Have you solved this problem? Is there a better way?

lvke9529 avatar May 13 '24 12:05 lvke9529

I'm still using the kludgy approach of emptying the init.py file first, then running the demo, then copying the original content back and running it again, and it's fine, and I've had no problems running it in that environment since.

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年5月13日(星期一) 晚上8:19 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [AILab-CVC/YOLO-World] Environment variable configuration issues (Issue #302)

Have you solved this problem? Is there a better way?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Jacknegar avatar May 14 '24 07:05 Jacknegar

thank u,I found a better way to put the yolo_world package in the path given in the error message, such as these paths: /root/autodl-tmp/YM/YOLO-World /root/miniconda3/lib/python38.zip / root/miniconda3 / lib/python3.8 / root/miniconda3 / lib/python3.8 / lib - dynload / root/miniconda3 / lib/python3.8 / site - packages

More details can be found in this blog post: https://blog.csdn.net/ITdaka/article/details/138863017?spm=1001.2014.3001.5501

lvke9529 avatar May 15 '24 05:05 lvke9529

Ok, thanks for the reply, I'll try this method.

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年5月15日(星期三) 中午1:46 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [AILab-CVC/YOLO-World] Environment variable configuration issues (Issue #302)

thank u,I found a better way to put the yolo_world package in the path given in the error message, such as these paths: /root/autodl-tmp/YM/YOLO-World /root/miniconda3/lib/python38.zip / root/miniconda3 / lib/python3.8 / root/miniconda3 / lib/python3.8 / lib - dynload / root/miniconda3 / lib/python3.8 / site - packages

More details can be found in this blog post: https://blog.csdn.net/ITdaka/article/details/138863017?spm=1001.2014.3001.5501

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Jacknegar avatar May 15 '24 06:05 Jacknegar

Have you solved this problem? Is there a better way?

pip install transformers

shiboyang avatar Aug 13 '24 03:08 shiboyang