Closed wangm-word closed 3 years ago
@ly015 about config path
You need to import mmpose first, during which the models will be added to the registry. After that, the model can be built from the config.
than you very much !But I am still a bit confused. i have imported mmpose, the config-path in init_pose_model() is wrong. i want to inference a img and show it use lite_hrnet.can you give a example about hou to use the api? thank you again @ly015
If you have the ground truth bounding boxes of your image, try:
python demo/top_down_img_demo.py \
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/litehrnet_30_coco_256x192.py \
https://download.openmmlab.com/mmpose/top_down/litehrnet/litehrnet30_coco_256x192-4176555b_20210626.pth \
--img-root YOUR_IMAGE_ROOT --json-file YOUR_JSON_FILE \
--out-img-root vis_results
If the bounding box information is not available, you can use mmdet to detect the bounding box:
python demo/top_down_img_demo_with_mmdet.py \
demo/mmdetection_cfg/faster_rcnn_r50_fpn_coco.py \
https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/litehrnet_30_coco_256x192.py \
https://download.openmmlab.com/mmpose/top_down/litehrnet/litehrnet30_coco_256x192-4176555b_20210626.pth \
--img-root YOUR_IMAGE_ROOT \
--img YOUR_IMAGE_FILENAME \
--out-img-root vis_results
than you !when i use your method, it appaer new error,like this @ly015
Please check:
Thank you for answering my question!! mmpose is 0.16.0 torch is 1.7.1 cuda is 10.1 mmdet is 2.14.0 i have installed mmpose ,but this error still appeared @ly015
Thanks for the information. Have you modified the demo script or any other part of mmpose?
no,only liter-hrnet's config file and .pth file is deferent from your example,this tow file come from official ,https://github.com/HRNet/Lite-HRNet @ly015
You may use the master version of MMPose, which has already supported Lite-HRNet.
Yes, LiteHRNet was not implemented in v0.16.0, thus the model could not be built from the config file (Also, the official config file is not guaranteed to work in mmpose). Please use the latest master which has supported LiteHRNet.
thank you very much ! can you tell what question about this