TommyZihao / MMPose_Tutorials

Jupyter notebook tutorials for mmpose
328 stars 55 forks source link

RTMPose本地预测代码有误 #5

Open superegg-M opened 1 year ago

superegg-M commented 1 year ago

使用RTMPose预训练模型进行本地摄像头预测的命令行代码有误,问题代码链接: https://github.com/TommyZihao/MMPose_Tutorials/blob/main/2023/0519/%E9%99%84-%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C/%E3%80%90A3%E3%80%91%E9%A2%84%E8%AE%AD%E7%BB%83RTMPose%E6%91%84%E5%83%8F%E5%A4%B4%E9%A2%84%E6%B5%8B.ipynb

错误代码为:

# RTMDet --> RTMPose
!python demo/topdown_demo_with_mmdet.py \
        ../mmdetetion/configs/rtmdet/rtmdet_tiny_8xb32-300e_coco.py \
        https://download.openmmlab.com/mmdetection/v3.0/rtmdet/rtmdet_tiny_8xb32-300e_coco/rtmdet_tiny_8xb32-300e_coco_20220902_112414-78e30dcc.pth \
        data/rtmpose-s_triangle_8xb256-420e_coco-256x192.py \
        checkpoint/rtmpose_s_triangle_300-34bfaeb2_20230512.pth \
        --input webcam \
        --output-root outputs/G2_Video \
        --device cpu \
        --bbox-thr 0.6 \
        --kpt-thr 0.5 \
        --nms-thr 0.3 \
        --radius 16 \
        --thickness 3 \
        --draw-bbox \
        --draw-heatmap \
        --show-kpt-idx \
        --show 

其中rtmdet的config文件路径为

../mmdetetion/configs/rtmdet/rtmdet_tiny_8xb32-300e_coco.py

detection拼写有误,少了一个c,应改为

../mmdetection/configs/rtmdet/rtmdet_tiny_8xb32-300e_coco.py

正确代码为:

# RTMDet --> RTMPose
!python demo/topdown_demo_with_mmdet.py \
        ../mmdetection/configs/rtmdet/rtmdet_tiny_8xb32-300e_coco.py \
        https://download.openmmlab.com/mmdetection/v3.0/rtmdet/rtmdet_tiny_8xb32-300e_coco/rtmdet_tiny_8xb32-300e_coco_20220902_112414-78e30dcc.pth \
        data/rtmpose-s_triangle_8xb256-420e_coco-256x192.py \
        checkpoint/rtmpose_s_triangle_300-34bfaeb2_20230512.pth \
        --input webcam \
        --output-root outputs/G2_Video \
        --device cpu \
        --bbox-thr 0.6 \
        --kpt-thr 0.5 \
        --nms-thr 0.3 \
        --radius 16 \
        --thickness 3 \
        --draw-bbox \
        --draw-heatmap \
        --show-kpt-idx \
        --show