Skip to content

Commit 102f49c

Browse files
authored
[Docs] Update docs for mmdeploy main (#2216)
1 parent 683a19c commit 102f49c

File tree

10 files changed

+120
-123
lines changed

10 files changed

+120
-123
lines changed

β€Žprojects/mmpose4aigc/README.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ bash install_posetracker_linux.sh
6767
After installation, files are organized as follows:
6868

6969
```shell
70-
|----mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1
71-
| |----sdk
70+
|----mmdeploy-1.0.0-linux-x86_64-cxx11abi
71+
| |----README.md
7272
| |----rtmpose-ort
7373
| | |----rtmdet-nano
7474
| | |----rtmpose-m
@@ -83,7 +83,7 @@ Run the following command to generate a skeleton image:
8383
```shell
8484
# generate a skeleton image
8585
bash mmpose_style_skeleton.sh \
86-
mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1/rtmpose-ort/000000147979.jpg
86+
mmdeploy-1.0.0-linux-x86_64-cxx11abi/rtmpose-ort/000000147979.jpg
8787
```
8888

8989
For more details, you can refer to [RTMPose](../rtmpose/README.md).

β€Žprojects/mmpose4aigc/README_CN.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ bash install_posetracker_linux.sh
6666
ζœ€η»ˆηš„ζ–‡δ»Άη»“ζž„ε¦‚δΈ‹οΌš
6767

6868
```shell
69-
|----mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1
70-
| |----sdk
69+
|----mmdeploy-1.0.0-linux-x86_64-cxx11abi
70+
| |----README.md
7171
| |----rtmpose-ort
7272
| | |----rtmdet-nano
7373
| | |----rtmpose-m
@@ -82,7 +82,7 @@ bash install_posetracker_linux.sh
8282
```shell
8383
# η”Ÿζˆιͺ¨ζžΆε›Ύη‰‡
8484
bash mmpose_style_skeleton.sh \
85-
mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1/rtmpose-ort/000000147979.jpg
85+
mmdeploy-1.0.0-linux-x86_64-cxx11abi/rtmpose-ort/000000147979.jpg
8686
```
8787

8888
ζ›΄ε€šθ―¦η»†δΏ‘ζ―ε―δ»₯ζŸ₯ηœ‹ [RTMPose](../rtmpose/README_CN.md)。

β€Žprojects/mmpose4aigc/install_posetracker_linux.shβ€Ž

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,23 @@
22
# Copyright (c) OpenMMLab. All rights reserved.
33

44
# Download pre-compiled files
5-
wget https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0rc3/mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1.tar.gz
5+
wget https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0/mmdeploy-1.0.0-linux-x86_64-cxx11abi.tar.gz
66

77
# Unzip files
8-
tar -xzvf mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1.tar.gz
8+
tar -xzvf mmdeploy-1.0.0-linux-x86_64-cxx11abi.tar.gz
99

1010
# Go to the sdk folder
11-
cd mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1/sdk
11+
cd mmdeploy-1.0.0-linux-x86_64-cxx11abi
1212

1313
# Init environment
14-
source env.sh
14+
source set_env.sh
1515

1616
# If opencv 3+ is not installed on your system, execute the following command.
1717
# If it is installed, skip this command
18-
bash opencv.sh
18+
bash install_opencv.sh
1919

2020
# Compile executable programs
21-
bash build.sh
22-
23-
# Go to mmdeploy folder
24-
cd ../
21+
bash build_sdk.sh
2522

2623
# Download models
2724
wget https://download.openmmlab.com/mmpose/v1/projects/rtmpose/rtmpose-cpu.zip
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#!/bin/bash
22
# Copyright (c) OpenMMLab. All rights reserved.
33

4-
WORKSPACE=mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1/sdk/
4+
WORKSPACE=mmdeploy-1.0.0-linux-x86_64-cxx11abi
55
export LD_LIBRARY_PATH=${WORKSPACE}/lib:${WORKSPACE}/thirdparty/onnxruntime/lib:$LD_LIBRARY_PATH
66

77
INPUT_IMAGE=$1
88

9-
mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1/sdk/bin/pose_tracker \
10-
mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1//rtmpose-ort/rtmdet-nano \
11-
mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1//rtmpose-ort/rtmpose-m \
9+
${WORKSPACE}/bin/pose_tracker \
10+
${WORKSPACE}/rtmpose-ort/rtmdet-nano \
11+
${WORKSPACE}/rtmpose-ort/rtmpose-m \
1212
$INPUT_IMAGE \
1313
--background black \
14-
--skeleton mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1//rtmpose-ort/t2i-adapter_skeleton.txt \
14+
--skeleton ${WORKSPACE}/rtmpose-ort/t2i-adapter_skeleton.txt \
1515
--output ./skeleton_res.jpg \
1616
--pose_kpt_thr 0.4 \
1717
--show -1

β€Žprojects/rtmpose/README.mdβ€Ž

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ We provide the UDP pretraining configs of the CSPNeXt backbone. Find more detail
211211
| CSPNeXt-m | 256x192 | 13.05 | 3.06 | 74.8 | 77.7 | [Model](https://download.openmmlab.com/mmpose/v1/projects/rtmpose/cspnext-m_udp-aic-coco_210e-256x192-f2f7d6f6_20230130.pth) |
212212
| CSPNeXt-l | 256x192 | 32.44 | 5.33 | 77.2 | 79.9 | [Model](https://download.openmmlab.com/mmpose/v1/projects/rtmpose/cspnext-l_udp-aic-coco_210e-256x192-273b7631_20230130.pth) |
213213

214-
We also provide the ImageNet classification pre-trained weights of the CSPNeXt backbone. Find more details in [RTMDet](https://github.com/open-mmlab/mmdetection/blob/dev-3.x/configs/rtmdet/README.md#classification).
214+
We also provide the ImageNet classification pre-trained weights of the CSPNeXt backbone. Find more details in [RTMDet](https://github.com/open-mmlab/mmdetection/blob/latest/configs/rtmdet/README.md#classification).
215215

216216
| Model | Input Size | Params(M) | Flops(G) | Top-1 (%) | Top-5 (%) | Download |
217217
| :----------: | :--------: | :-------: | :------: | :-------: | :-------: | :---------------------------------------------------------------------------------------------------------------------------------: |
@@ -249,23 +249,23 @@ Env Requirements:
249249

250250
```shell
251251
# Download pre-compiled files
252-
wget https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0rc3/mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1.tar.gz
252+
wget https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0/mmdeploy-1.0.0-linux-x86_64-cxx11abi.tar.gz
253253

254254
# Unzip files
255-
tar -xzvf mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1.tar.gz
255+
tar -xzvf mmdeploy-1.0.0-linux-x86_64-cxx11abi.tar.gz
256256

257257
# Go to the sdk folder
258-
cd mmdeploy-1.0.0rc3-linux-x86_64-onnxruntime1.8.1/sdk
258+
cd mmdeploy-1.0.0-linux-x86_64-cxx11abi
259259

260260
# Init environment
261-
source env.sh
261+
source set_env.sh
262262

263263
# If opencv 3+ is not installed on your system, execute the following command.
264264
# If it is installed, skip this command
265-
bash opencv.sh
265+
bash install_opencv.sh
266266

267267
# Compile executable programs
268-
bash build.sh
268+
bash build_sdk.sh
269269

270270
# Inference for an image
271271
# Please pass the folder of the model, not the model file
@@ -280,23 +280,23 @@ bash build.sh
280280

281281
```shell
282282
# Download pre-compiled files
283-
wget https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0rc3/mmdeploy-1.0.0rc3-linux-x86_64-cuda11.1-tensorrt8.2.3.0.tar.gz
283+
wget https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0/mmdeploy-1.0.0-linux-x86_64-cxx11abi-cuda11.3.tar.gz
284284

285285
# Unzip files
286-
tar -xzvf mmdeploy-1.0.0rc3-linux-x86_64-cuda11.1-tensorrt8.2.3.0.tar.gz
286+
tar -xzvf mmdeploy-1.0.0-linux-x86_64-cxx11abi-cuda11.3.tar.gz
287287

288288
# Go to the sdk folder
289-
cd mmdeploy-1.0.0rc3-linux-x86_64-cuda11.1-tensorrt8.2.3.0/sdk
289+
cd mmdeploy-1.0.0-linux-x86_64-cxx11abi-cuda11.3
290290

291291
# Init environment
292-
source env.sh
292+
source set_env.sh
293293

294294
# If opencv 3+ is not installed on your system, execute the following command.
295295
# If it is installed, skip this command
296-
bash opencv.sh
296+
bash install_opencv.sh
297297

298298
# Compile executable programs
299-
bash build.sh
299+
bash build_sdk.sh
300300

301301
# Inference for an image
302302
# Please pass the folder of the model, not the model file
@@ -313,23 +313,23 @@ For details, see [Pipeline Inference](#-step4-pipeline-inference).
313313

314314
##### Python Inference
315315

316-
1. Download the [pre-compiled SDK](https://github.com/open-mmlab/mmdeploy/releases).
317-
2. Unzip the SDK and go to the `sdk/python` folder.
318-
3. Install `mmdeploy_python` via `.whl` file.
316+
1. Install mmdeploy_runtime or mmdeploy_runtime_gpu
319317

320-
```shell
321-
pip install {file_name}.whl
322318
```
319+
# for onnxruntime
320+
pip install mmdeploy-runtime
321+
# download [sdk](https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0/mmdeploy-1.0.0-windows-amd64.zip) add third party runtime libraries to the PATH
323322
324-
4. Download the [sdk models](https://download.openmmlab.com/mmpose/v1/projects/rtmpose/rtmpose-cpu.zip) and unzip.
325-
5. Inference with `pose_tracker.py`:
326-
327-
**Note:**
323+
# for onnxruntime-gpu / tensorrt
324+
pip install mmdeploy-runtime-gpu
325+
# download [sdk](https://github.com/open-mmlab/mmdeploy/releases/download/v1.0.0/mmdeploy-1.0.0-windows-amd64.zip) add third party runtime libraries to the PATH
326+
```
328327

329-
- If you meet `ImportError: DLL load failed while importing mmdeploy_python`, please copy `thirdparty/onnxruntime/lib/onnxruntime.dll` to `site-packages/mmdeploy_python/` of your current Python env.
328+
2. Download the [sdk models](https://download.openmmlab.com/mmpose/v1/projects/rtmpose/rtmpose-cpu.zip) and unzip.
329+
3. Inference with `pose_tracker.py`:
330330

331331
```shell
332-
# go to ./sdk/example/python
332+
# go to ./example/python
333333
# Please pass the folder of the model, not the model file
334334
python pose_tracker.py cpu {det work-dir} {pose work-dir} {your_video.mp4}
335335
```
@@ -349,22 +349,22 @@ set-ExecutionPolicy RemoteSigned
349349

350350
```shell
351351
# in sdk folder:
352-
.\opencv.ps1
352+
.\install_opencv.ps1
353353
```
354354

355355
6. Set environment variables:
356356

357357
```shell
358358
# in sdk folder:
359-
.\env.ps1
359+
. .\set_env.ps1
360360
```
361361

362362
7. Compile the SDK:
363363

364364
```shell
365365
# in sdk folder:
366366
# (if you installed opencv by .\install_opencv.ps1)
367-
.\build.ps1
367+
.\build_sdk.ps1
368368
# (if you installed opencv yourself)
369369
.\build_sdk.ps1 "path/to/folder/of/OpenCVConfig.cmake"
370370
```
@@ -415,38 +415,38 @@ Please refer to [Train and Test](https://mmpose.readthedocs.io/en/latest/user_gu
415415

416416
## πŸ—οΈ How to Deploy [πŸ”](#-table-of-contents)
417417

418-
Here is a basic example of deploy RTMPose with [MMDeploy-1.x](https://github.com/open-mmlab/mmdeploy/tree/1.x).
418+
Here is a basic example of deploy RTMPose with [MMDeploy](https://github.com/open-mmlab/mmdeploy/tree/main).
419419

420420
### 🧩 Step1. Install MMDeploy
421421

422-
Before starting the deployment, please make sure you install MMPose-1.x and MMDeploy-1.x correctly.
422+
Before starting the deployment, please make sure you install MMPose and MMDeploy correctly.
423423

424-
- Install MMPose-1.x, please refer to the [MMPose-1.x installation guide](https://mmpose.readthedocs.io/en/latest/installation.html).
425-
- Install MMDeploy-1.x, please refer to the [MMDeploy-1.x installation guide](https://mmdeploy.readthedocs.io/en/1.x/get_started.html#installation).
424+
- Install MMPose, please refer to the [MMPose installation guide](https://mmpose.readthedocs.io/en/latest/installation.html).
425+
- Install MMDeploy, please refer to the [MMDeploy installation guide](https://mmdeploy.readthedocs.io/en/latest/get_started.html#installation).
426426

427427
Depending on the deployment backend, some backends require compilation of custom operators, so please refer to the corresponding document to ensure the environment is built correctly according to your needs:
428428

429-
- [ONNX RUNTIME SUPPORT](https://mmdeploy.readthedocs.io/en/1.x/05-supported-backends/onnxruntime.html)
430-
- [TENSORRT SUPPORT](https://mmdeploy.readthedocs.io/en/1.x/05-supported-backends/tensorrt.html)
431-
- [OPENVINO SUPPORT](https://mmdeploy.readthedocs.io/en/1.x/05-supported-backends/openvino.html)
432-
- [More](https://github.com/open-mmlab/mmdeploy/tree/1.x/docs/en/05-supported-backends)
429+
- [ONNX RUNTIME SUPPORT](https://mmdeploy.readthedocs.io/en/latest/05-supported-backends/onnxruntime.html)
430+
- [TENSORRT SUPPORT](https://mmdeploy.readthedocs.io/en/latest/05-supported-backends/tensorrt.html)
431+
- [OPENVINO SUPPORT](https://mmdeploy.readthedocs.io/en/latest/05-supported-backends/openvino.html)
432+
- [More](https://github.com/open-mmlab/mmdeploy/tree/main/docs/en/05-supported-backends)
433433

434434
### πŸ› οΈ Step2. Convert Model
435435

436436
After the installation, you can enjoy the model deployment journey starting from converting PyTorch model to backend model by running MMDeploy's `tools/deploy.py`.
437437

438-
The detailed model conversion tutorial please refer to the [MMDeploy document](https://mmdeploy.readthedocs.io/en/1.x/02-how-to-run/convert_model.html). Here we only give the example of converting RTMPose.
438+
The detailed model conversion tutorial please refer to the [MMDeploy document](https://mmdeploy.readthedocs.io/en/latest/02-how-to-run/convert_model.html). Here we only give the example of converting RTMPose.
439439

440440
Here we take converting RTMDet-nano and RTMPose-m to ONNX/TensorRT as an example.
441441

442442
- If you only want to use ONNX, please use:
443-
- [`detection_onnxruntime_static.py`](https://github.com/open-mmlab/mmdeploy/blob/1.x/configs/mmdet/detection/detection_onnxruntime_static.py) for RTMDet.
444-
- [`pose-detection_simcc_onnxruntime_dynamic.py`](https://github.com/open-mmlab/mmdeploy/blob/1.x/configs/mmpose/pose-detection_simcc_onnxruntime_dynamic.py) for RTMPose.
443+
- [`detection_onnxruntime_static.py`](https://github.com/open-mmlab/mmdeploy/blob/main/configs/mmdet/detection/detection_onnxruntime_static.py) for RTMDet.
444+
- [`pose-detection_simcc_onnxruntime_dynamic.py`](https://github.com/open-mmlab/mmdeploy/blob/main/configs/mmpose/pose-detection_simcc_onnxruntime_dynamic.py) for RTMPose.
445445
- If you want to use TensorRT, please use:
446-
- [`detection_tensorrt_static-320x320.py`](https://github.com/open-mmlab/mmdeploy/blob/1.x/configs/mmdet/detection/detection_tensorrt_static-320x320.py) for RTMDet.
447-
- [`pose-detection_simcc_tensorrt_dynamic-256x192.py`](https://github.com/open-mmlab/mmdeploy/blob/1.x/configs/mmpose/pose-detection_simcc_tensorrt_dynamic-256x192.py) for RTMPose.
446+
- [`detection_tensorrt_static-320x320.py`](https://github.com/open-mmlab/mmdeploy/blob/main/configs/mmdet/detection/detection_tensorrt_static-320x320.py) for RTMDet.
447+
- [`pose-detection_simcc_tensorrt_dynamic-256x192.py`](https://github.com/open-mmlab/mmdeploy/blob/main/configs/mmpose/pose-detection_simcc_tensorrt_dynamic-256x192.py) for RTMPose.
448448

449-
If you want to customize the settings in the deployment config for your requirements, please refer to [MMDeploy config tutorial](https://mmdeploy.readthedocs.io/en/1.x/02-how-to-run/write_config.html).
449+
If you want to customize the settings in the deployment config for your requirements, please refer to [MMDeploy config tutorial](https://mmdeploy.readthedocs.io/en/latest/02-how-to-run/write_config.html).
450450

451451
In this tutorial, we organize files as follows:
452452

@@ -587,7 +587,7 @@ import argparse
587587

588588
import cv2
589589
import numpy as np
590-
from mmdeploy_python import PoseDetector
590+
from mmdeploy_runtime import PoseDetector
591591

592592

593593
def parse_args():
@@ -701,8 +701,8 @@ target_link_libraries(${name} PRIVATE mmdeploy ${OpenCV_LIBS})
701701

702702
#### Other languages
703703

704-
- [C# API Examples](https://github.com/open-mmlab/mmdeploy/tree/1.x/demo/csharp)
705-
- [JAVA API Examples](https://github.com/open-mmlab/mmdeploy/tree/1.x/demo/java)
704+
- [C# API Examples](https://github.com/open-mmlab/mmdeploy/tree/main/demo/csharp)
705+
- [JAVA API Examples](https://github.com/open-mmlab/mmdeploy/tree/main/demo/java)
706706

707707
## πŸš€ Step4. Pipeline Inference
708708

@@ -736,8 +736,8 @@ optional arguments:
736736

737737
#### API Example
738738

739-
- [`det_pose.py`](https://github.com/open-mmlab/mmdeploy/blob/dev-1.x/demo/python/det_pose.py)
740-
- [`det_pose.cxx`](https://github.com/open-mmlab/mmdeploy/blob/dev-1.x/demo/csrc/cpp/det_pose.cxx)
739+
- [`det_pose.py`](https://github.com/open-mmlab/mmdeploy/blob/main/demo/python/det_pose.py)
740+
- [`det_pose.cxx`](https://github.com/open-mmlab/mmdeploy/blob/main/demo/csrc/cpp/det_pose.cxx)
741741

742742
### Inference for a video
743743

@@ -792,8 +792,8 @@ optional arguments:
792792

793793
#### API Example
794794

795-
- [`pose_tracker.py`](https://github.com/open-mmlab/mmdeploy/blob/dev-1.x/demo/python/pose_tracker.py)
796-
- [`pose_tracker.cxx`](https://github.com/open-mmlab/mmdeploy/blob/dev-1.x/demo/csrc/cpp/pose_tracker.cxx)
795+
- [`pose_tracker.py`](https://github.com/open-mmlab/mmdeploy/blob/main/demo/python/pose_tracker.py)
796+
- [`pose_tracker.cxx`](https://github.com/open-mmlab/mmdeploy/blob/main/demo/csrc/cpp/pose_tracker.cxx)
797797

798798
## πŸ“š Common Usage [πŸ”](#-table-of-contents)
799799

@@ -846,7 +846,7 @@ The result is as follows:
846846
+--------+------------+---------+
847847
```
848848

849-
If you want to learn more details of profiler, you can refer to the [Profiler Docs](https://mmdeploy.readthedocs.io/en/1.x/02-how-to-run/useful_tools.html#profiler).
849+
If you want to learn more details of profiler, you can refer to the [Profiler Docs](https://mmdeploy.readthedocs.io/en/latest/02-how-to-run/useful_tools.html#profiler).
850850

851851
### πŸ“Š Model Test [πŸ”](#-table-of-contents)
852852

@@ -860,7 +860,7 @@ python tools/test.py \
860860
--device cpu
861861
```
862862

863-
You can also refer to [MMDeploy Docs](https://github.com/open-mmlab/mmdeploy/blob/dev-1.x/docs/en/02-how-to-run/profile_model.md) for more details.
863+
You can also refer to [MMDeploy Docs](https://github.com/open-mmlab/mmdeploy/blob/main/docs/en/02-how-to-run/profile_model.md) for more details.
864864

865865
## πŸ“œ Citation [πŸ”](#-table-of-contents)
866866

0 commit comments

Comments
Β (0)