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

how to run inference with pretrained model? #139

Open
leolle520 opened this issue Jun 12, 2024 · 1 comment
Open

how to run inference with pretrained model? #139

leolle520 opened this issue Jun 12, 2024 · 1 comment

Comments

@leolle520
Copy link

leolle520 commented Jun 12, 2024

Hi,
I tried following code to run inference on single image with the downloaded ViT-large model:

python demo/top_down_img_demo.py \
    configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/ViTPose_base_coco_256x192.py \
    ViTPose/resources/td-hm_ViTPose-large_8xb64-210e_coco-256x192-53609f55_20230314.pth \
    --img data/44018/pic_0000000.jpg \
    --out-img-root target 

It reminds me coco annotation file?
File "ViTPose/demo/top_down_img_demo.py", line 57, in main
coco = COCO(args.json_file)
File "anaconda3/envs/pose/lib/python3.9/site-packages/xtcocotools/coco.py", line 93, in init
with open(annotation_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: ''

@bilguudeiblgd
Copy link

bilguudeiblgd commented Jul 29, 2024

If you are using demo/top_down_img_demo.py you need to add the .json gt file that's coco formatted and give parameter --img-root the folder containing images with the same id as .json file.

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

2 participants