ViTPose
ViTPose copied to clipboard
how to run inference with pretrained model?
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: ''
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.