DJW cdece0b32a 第一次提交 | 9 months ago | |
---|---|---|
.. | ||
README.md | 9 months ago | |
README_CN.md | 9 months ago | |
human-pose.jpeg | 9 months ago | |
main.py | 9 months ago | |
requirements.txt | 9 months ago |
This example shows how to run RTMPose inference with ONNXRuntime in Python.
Choose one of the following ways to install onnxruntime.
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
tar -zxvf onnxruntime-linux-x64-1.8.1.tgz
export ONNXRUNTIME_DIR=$(pwd)/onnxruntime-linux-x64-1.8.1
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
pip install onnxruntime-gpu==1.8.1
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-gpu-1.8.1.tgz
tar -zxvf onnxruntime-linux-x64-gpu-1.8.1.tgz
export ONNXRUNTIME_DIR=$(pwd)/onnxruntime-linux-x64-gpu-1.8.1
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
mim
tool.pip install -U openmim
mmpose
model.# choose one rtmpose model
mim download mmpose --config rtmpose-m_8xb64-270e_coco-wholebody-256x192 --dest .
mmdeploy
repo.git clone https://github.com/open-mmlab/mmdeploy.git
python mmdeploy/tools/deploy.py \
mmdeploy/configs/mmpose/pose-detection_simcc_onnxruntime_dynamic.py \
mmpose/rtmpose-m_8xb64-270e_coco-wholebody-256x192.py \
mmpose/rtmpose-m_simcc-coco-wholebody_pt-aic-coco_270e-256x192-cd5e845c_20230123.pth \
mmdeploy/demo/resources/human-pose.jpg \
--work-dir mmdeploy_model/mmpose/ort \
--device cuda \
--dump-info
pip install -r requirements.txt
python main.py \
{ONNX_FILE} \
{IMAGE_FILE} \
--device {DEVICE} \
--save-path {SAVE_PATH}
ONNX_FILE
: The path of onnx fileIMAGE_FILE
: The path of image fileDEVICE
: The device to run the model, default is cpu
SAVE_PATH
: The path to save the output image, default is output.jpg