Files
RapidPoseTriangulation/extras/mmdeploy/README.md
2024-11-29 13:51:20 +01:00

1.5 KiB

Exporting MMPose models

docker build --progress=plain -f extras/mmdeploy/dockerfile -t rpt_mmdeploy .

./extras/mmdeploy/run_container.sh

ONNX

cd /mmdeploy/
cp /RapidPoseTriangulation/extras/mmdeploy/configs/detection_onnxruntime_static-320x320.py configs/mmdet/detection/

python3 ./tools/deploy.py \
    configs/mmdet/detection/detection_onnxruntime_static-320x320.py \
    /mmpose/projects/rtmpose/rtmdet/person/rtmdet_nano_320-8xb32_coco-person.py \
    https://download.openmmlab.com/mmpose/v1/projects/rtmpose/rtmdet_nano_8xb32-100e_coco-obj365-person-05d8511e.pth \
    /mmpose/projects/rtmpose/examples/onnxruntime/human-pose.jpeg \
    --work-dir work_dir \
    --show

mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmdet_nano_320.onnx
cd /mmdeploy/
cp /RapidPoseTriangulation/extras/mmdeploy/pose-detection_simcc_onnxruntime_static-384x288.py configs/mmpose/

python3 ./tools/deploy.py \
    configs/mmpose/pose-detection_simcc_onnxruntime_static-384x288.py \
    /mmpose/projects/rtmpose/rtmpose/body_2d_keypoint/rtmpose-m_8xb256-420e_coco-384x288.py \
    https://download.openmmlab.com/mmpose/v1/projects/rtmposev1/rtmpose-m_simcc-body7_pt-body7_420e-384x288-65e718c4_20230504.pth \
    /mmpose/projects/rtmpose/examples/onnxruntime/human-pose.jpeg \
    --work-dir work_dir \
    --show

mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-m_384.onnx