Converted wb model as well.
This commit is contained in:
@ -39,7 +39,6 @@ python3 ./tools/deploy.py \
|
|||||||
/mmpose/projects/rtmpose/examples/onnxruntime/human-pose.jpeg \
|
/mmpose/projects/rtmpose/examples/onnxruntime/human-pose.jpeg \
|
||||||
--work-dir work_dir \
|
--work-dir work_dir \
|
||||||
--show
|
--show
|
||||||
|
|
||||||
mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-m_1x3x384x288"$withFP16".onnx
|
mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-m_1x3x384x288"$withFP16".onnx
|
||||||
|
|
||||||
python3 ./tools/deploy.py \
|
python3 ./tools/deploy.py \
|
||||||
@ -49,8 +48,25 @@ python3 ./tools/deploy.py \
|
|||||||
/mmpose/projects/rtmpose/examples/onnxruntime/human-pose.jpeg \
|
/mmpose/projects/rtmpose/examples/onnxruntime/human-pose.jpeg \
|
||||||
--work-dir work_dir \
|
--work-dir work_dir \
|
||||||
--show
|
--show
|
||||||
|
|
||||||
mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-m_Bx3x384x288"$withFP16".onnx
|
mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-m_Bx3x384x288"$withFP16".onnx
|
||||||
|
|
||||||
|
python3 ./tools/deploy.py \
|
||||||
|
configs/mmpose/pose-detection_simcc_onnxruntime_static-384x288"$withFP16".py \
|
||||||
|
/mmpose/projects/rtmpose/rtmpose/wholebody_2d_keypoint/rtmpose-l_8xb32-270e_coco-wholebody-384x288.py \
|
||||||
|
https://download.openmmlab.com/mmpose/v1/projects/rtmposev1/rtmpose-l_simcc-coco-wholebody_pt-aic-coco_270e-384x288-eaeb96c8_20230125.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-l_wb_1x3x384x288"$withFP16".onnx
|
||||||
|
|
||||||
|
python3 ./tools/deploy.py \
|
||||||
|
configs/mmpose/pose-detection_simcc_onnxruntime_dynamic-384x288"$withFP16".py \
|
||||||
|
/mmpose/projects/rtmpose/rtmpose/wholebody_2d_keypoint/rtmpose-l_8xb32-270e_coco-wholebody-384x288.py \
|
||||||
|
https://download.openmmlab.com/mmpose/v1/projects/rtmposev1/rtmpose-l_simcc-coco-wholebody_pt-aic-coco_270e-384x288-eaeb96c8_20230125.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-l_wb_Bx3x384x288"$withFP16".onnx
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@ -10,6 +10,8 @@ base_path = "/RapidPoseTriangulation/extras/mmdeploy/exports/"
|
|||||||
det_model_path = base_path + "rtmdet-nano_1x3x320x320.onnx"
|
det_model_path = base_path + "rtmdet-nano_1x3x320x320.onnx"
|
||||||
pose_model_path1 = base_path + "rtmpose-m_Bx3x384x288.onnx"
|
pose_model_path1 = base_path + "rtmpose-m_Bx3x384x288.onnx"
|
||||||
pose_model_path2 = base_path + "rtmpose-m_1x3x384x288.onnx"
|
pose_model_path2 = base_path + "rtmpose-m_1x3x384x288.onnx"
|
||||||
|
pose_model_path3 = base_path + "rtmpose-l_wb_Bx3x384x288.onnx"
|
||||||
|
pose_model_path4 = base_path + "rtmpose-l_wb_1x3x384x288.onnx"
|
||||||
|
|
||||||
norm_mean = -1 * (np.array([0.485, 0.456, 0.406]) * 255)
|
norm_mean = -1 * (np.array([0.485, 0.456, 0.406]) * 255)
|
||||||
norm_std = 1.0 / (np.array([0.229, 0.224, 0.225]) * 255)
|
norm_std = 1.0 / (np.array([0.229, 0.224, 0.225]) * 255)
|
||||||
@ -128,9 +130,13 @@ def main():
|
|||||||
add_steps_to_onnx(det_model_path)
|
add_steps_to_onnx(det_model_path)
|
||||||
add_steps_to_onnx(pose_model_path1)
|
add_steps_to_onnx(pose_model_path1)
|
||||||
add_steps_to_onnx(pose_model_path2)
|
add_steps_to_onnx(pose_model_path2)
|
||||||
|
add_steps_to_onnx(pose_model_path3)
|
||||||
|
add_steps_to_onnx(pose_model_path4)
|
||||||
add_steps_to_onnx(det_model_path.replace(".onnx", "_fp16.onnx"))
|
add_steps_to_onnx(det_model_path.replace(".onnx", "_fp16.onnx"))
|
||||||
add_steps_to_onnx(pose_model_path1.replace(".onnx", "_fp16.onnx"))
|
add_steps_to_onnx(pose_model_path1.replace(".onnx", "_fp16.onnx"))
|
||||||
add_steps_to_onnx(pose_model_path2.replace(".onnx", "_fp16.onnx"))
|
add_steps_to_onnx(pose_model_path2.replace(".onnx", "_fp16.onnx"))
|
||||||
|
add_steps_to_onnx(pose_model_path3.replace(".onnx", "_fp16.onnx"))
|
||||||
|
add_steps_to_onnx(pose_model_path4.replace(".onnx", "_fp16.onnx"))
|
||||||
|
|
||||||
|
|
||||||
# ==================================================================================================
|
# ==================================================================================================
|
||||||
|
|||||||
@ -116,6 +116,7 @@ datasets = {
|
|||||||
"path": "/datasets/human36m/skelda/wb/test.json",
|
"path": "/datasets/human36m/skelda/wb/test.json",
|
||||||
"take_interval": 100,
|
"take_interval": 100,
|
||||||
"min_bbox_score": 0.4,
|
"min_bbox_score": 0.4,
|
||||||
|
"batch_poses": False,
|
||||||
},
|
},
|
||||||
"egohumans_tagging": {
|
"egohumans_tagging": {
|
||||||
"path": "/datasets/egohumans/skelda/all.json",
|
"path": "/datasets/egohumans/skelda/all.json",
|
||||||
|
|||||||
@ -479,12 +479,18 @@ def load_model(min_bbox_score=0.3, min_bbox_area=0.1 * 0.1, batch_poses=False):
|
|||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
def load_wb_model():
|
def load_wb_model(min_bbox_score=0.3, min_bbox_area=0.1 * 0.1, batch_poses=False):
|
||||||
print("Loading mmpose whole body model ...")
|
print("Loading 2D-WB model ...")
|
||||||
|
|
||||||
model = None
|
model = TopDown(
|
||||||
|
"/RapidPoseTriangulation/extras/mmdeploy/exports/rtmdet-nano_1x320x320x3_fp16_extra-steps.onnx",
|
||||||
|
f"/RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-l_wb_{'B' if batch_poses else '1'}x384x288x3_fp16_extra-steps.onnx",
|
||||||
|
box_conf_threshold=min_bbox_score,
|
||||||
|
box_min_area=min_bbox_area,
|
||||||
|
warmup=30,
|
||||||
|
)
|
||||||
|
|
||||||
print("Loaded mmpose model")
|
print("Loaded 2D-WB model")
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user