mit-han-lab / litepose

[CVPR'22] Lite Pose: Efficient Architecture Design for 2D Human Pose Estimation
https://hanlab.mit.edu
MIT License
306 stars 37 forks source link

help #19

Open 731076467 opened 2 years ago

731076467 commented 2 years ago

Hello, I have tested the coco test image, but what should I do if I want to test my own image and want to get its key points to see the effect?

jxhnx commented 2 years ago

I wrote a quick addition to test a directory with custom images, you can find it here: https://github.com/random9v2/litepose/tree/test_img_dir

You will have to install natsort via conda/pip. For running the code, choose your image directory and run it, e.g., with:

python valid.py --cfg experiments/crowd_pose/mobilenet/mobile.yaml --superconfig mobile_configs/search-XS.json TEST.MODEL_FILE checkpoints/LitePose-Auto-XS_crowd.pth.tar DATASET.DATASET_TEST image_dir DATASET.ROOT dataset/my_img/ PRINT_FREQ 1
731076467 commented 2 years ago

I wrote a quick addition to test a directory with custom images, you can find it here: https://github.com/random9v2/litepose/tree/test_img_dir

You will have to install natsort via conda/pip. For running the code, choose your image directory and run it, e.g., with:

python valid.py --cfg experiments/crowd_pose/mobilenet/mobile.yaml --superconfig mobile_configs/search-XS.json TEST.MODEL_FILE checkpoints/LitePose-Auto-XS_crowd.pth.tar DATASET.DATASET_TEST image_dir DATASET.ROOT dataset/my_img/ PRINT_FREQ 1

Although I wrote one myself, thank you very much for your help!

luojianp commented 1 year ago

I wrote a quick addition to test a directory with custom images, you can find it here: https://github.com/random9v2/litepose/tree/test_img_dir You will have to install natsort via conda/pip. For running the code, choose your image directory and run it, e.g., with:

python valid.py --cfg experiments/crowd_pose/mobilenet/mobile.yaml --superconfig mobile_configs/search-XS.json TEST.MODEL_FILE checkpoints/LitePose-Auto-XS_crowd.pth.tar DATASET.DATASET_TEST image_dir DATASET.ROOT dataset/my_img/ PRINT_FREQ 1

Although I wrote one myself, thank you very much for your help!

I have the same problem and if I want to test my own image. Do you have the correct inference code? thanks