Exporting fp16 onnx models.
This commit is contained in:
@ -11,31 +11,37 @@ docker build --progress=plain -f extras/mmdeploy/dockerfile -t rpt_mmdeploy .
|
||||
## ONNX
|
||||
|
||||
```bash
|
||||
cd /mmdeploy/
|
||||
cp /RapidPoseTriangulation/extras/mmdeploy/configs/detection_onnxruntime_static-320x320.py configs/mmdet/detection/
|
||||
export withFP16="_fp16"
|
||||
cp /RapidPoseTriangulation/extras/mmdeploy/configs/detection_onnxruntime_static-320x320$withFP16.py configs/mmdet/detection/
|
||||
|
||||
cd /mmdeploy/
|
||||
python3 ./tools/deploy.py \
|
||||
configs/mmdet/detection/detection_onnxruntime_static-320x320.py \
|
||||
configs/mmdet/detection/detection_onnxruntime_static-320x320$withFP16.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_320x320.onnx
|
||||
mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmdet-nano_320x320$withFP16.onnx
|
||||
```
|
||||
|
||||
```bash
|
||||
cd /mmdeploy/
|
||||
cp /RapidPoseTriangulation/extras/mmdeploy/pose-detection_simcc_onnxruntime_static-384x288.py configs/mmpose/
|
||||
export withFP16="_fp16"
|
||||
cp /RapidPoseTriangulation/extras/mmdeploy/configs/pose-detection_simcc_onnxruntime_static-384x288$withFP16.py configs/mmpose/
|
||||
|
||||
cd /mmdeploy/
|
||||
python3 ./tools/deploy.py \
|
||||
configs/mmpose/pose-detection_simcc_onnxruntime_static-384x288.py \
|
||||
configs/mmpose/pose-detection_simcc_onnxruntime_static-384x288$withFP16.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_384x288.onnx
|
||||
mv /mmdeploy/work_dir/end2end.onnx /RapidPoseTriangulation/extras/mmdeploy/exports/rtmpose-m_384x288$withFP16.onnx
|
||||
```
|
||||
|
||||
```bash
|
||||
python3 /RapidPoseTriangulation/extras/mmdeploy/add_norm_step.py
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user