-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add YOLO-World forward and inference #530
Conversation
Thanks for your contribution! |
```bash | ||
python pretrain/torch2paddle.py <path_to_weight.pth> -p <path_to_weight.pdparams> | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以把转后的权重分享,这边上传自动下载,省略这一步
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的, 已在README中修改~
# 安装2.6.0版本的paddlepaddle-gpu,当前我们选择了cuda12.0的版本,可以查看 https://www.paddlepaddle.org.cn/ 寻找自己适合的版本 | ||
python -m pip install paddlepaddle-gpu==2.6.0.post120 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html | ||
|
||
# 进入目录 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是少了一步pyproject里面的包安装?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在30行 有提示使用 pip install -e . 安装pyproject中依赖
import cv2 | ||
import paddle.nn as nn | ||
import supervision as sv | ||
from ppdet.core.workspace import create, load_config, merge_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supervision是否第三方库?如果是需要写一个requirments.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supervision是第三方库,但已经作为依赖添加到了pyproject中,还需要另写一个requirments.txt吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, pyproject有了就行
整体文件移到PaddleMIX/paddlemix/examples下 |
Add YOLO-World forward and inference
some examples of forward alignment:
torch commands: python image_demo.py configs/pretrain/yolo_world_v2_x_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py /home/onion/workspace/code/PaddleMIX/ppdiffusers/examples/YOLO-World/pretrain/yolo_world_v2_x_obj365v1_goldg_cc3mlite_pretrain-8698fbfa.pth /home/onion/
bus.jpg 'person,bus' --topk 100 --threshold 0.001 --output-dir /home/onion/out/
paddle commands: python infer.py --config configs/yolo_world_x.yml -o weights=./pretrain/yolo_world_v2_x_obj365v1_goldg_cc3mlite_pretrain-8698fbfa.pdparams --image /home/onion/bus.jpg --text 'person,bus' --topk 100 --threshold 0.01 --output_dir "/home/onion/out"
torch commands: python image_demo.py configs/pretrain/yolo_world_v2_x_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py /home/onion/workspace/code/PaddleMIX/ppdiffusers/examples/YOLO-World/pretrain/yolo_world_v2_x_obj365v1_goldg_cc3mlite_pretrain-8698fbfa.pth /home/onion/
zidane.jpg 'bald man,white haired man' --topk 100 --threshold 0.001 --output-dir /home/onion/out/
paddle commands: python infer.py --config configs/yolo_world_x.yml -o weights=./pretrain/yolo_world_v2_x_obj365v1_goldg_cc3mlite_pretrain-8698fbfa.pdparams --image /home/onion/zidane.jpg --text 'bald man,white haired man' --topk 100 --threshold 0.001 --output_dir "/home/onion/out"