Skip to content

Commit bc9db63

Browse files
committed
add triton demo readme
1 parent b901112 commit bc9db63

File tree

18 files changed

+360
-29
lines changed

18 files changed

+360
-29
lines changed
Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,40 @@
1-
python tools/deploy.py configs/mmpretrain/classification_tensorrt_static-224x224.py ../mmpretrain/configs/resnet/resnet18_8xb32_in1k.py ../checkpoints/resnet18_8xb32_in1k_20210831-fbbb1da6.pth ../mmclassification/demo/demo.JPEG --device cuda --work-dir work_dirs/resnet --dump-info
1+
# Image classification serving
2+
3+
4+
## Starting a docker container
5+
```
6+
docker run -it --rm --gpus all openmmlab/mmdeploy:triton-22.12
7+
```
8+
9+
## Convert pytorch model to tensorrt model
10+
```
11+
cd /root/workspace/mmdeploy
12+
python3 tools/deploy.py \
13+
configs/mmpretrain/classification_tensorrt_static-224x224.py \
14+
../mmpretrain/configs/resnet/resnet18_8xb32_in1k.py \
15+
https://download.openmmlab.com/mmclassification/v0/resnet/resnet18_8xb32_in1k_20210831-fbbb1da6.pth \
16+
../mmpretrain/demo/demo.JPEG \
17+
--device cuda \
18+
--work-dir work_dir/resnet \
19+
--dump-info
20+
```
21+
22+
## Convert tensorrt model to triton format
23+
```
24+
cd /root/workspace/mmdeploy
25+
python3 demo/triton/to_triton_model.py \
26+
/root/workspace/mmdeploy/work_dir/resnet \
27+
/model-repository
28+
```
29+
30+
## Start triton server
31+
```
32+
tritonserver --model-repository=/model-repository
33+
```
34+
35+
## Run client code output container
36+
```
37+
python3 demo/triton/image-classification/grpc_client.py \
38+
model \
39+
/path/to/image
40+
```

demo/triton/image-classification/README_CN.md

Whitespace-only changes.
Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,40 @@
1-
python tools/deploy.py configs/mmdet/instance-seg/instance-seg_tensorrt_dynamic-320x320-1344x1344.py ../mmdetection/configs/mask_rcnn/mask-rcnn_r50_fpn_2x_coco.py https://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_fpn_2x_coco/mask_rcnn_r50_fpn_2x_coco_bbox_mAP-0.392__segm_mAP-0.354_20200505_003907-3e542a40.pth ../mmdetection/demo/demo.jpg --work-dir work_dir/maskrcnn --dump-info --device cuda
1+
# Instance segmentation serving
2+
3+
4+
## Starting a docker container
5+
```
6+
docker run -it --rm --gpus all openmmlab/mmdeploy:triton-22.12
7+
```
8+
9+
## Convert pytorch model to tensorrt model
10+
```
11+
cd /root/workspace/mmdeploy
12+
python3 tools/deploy.py \
13+
configs/mmdet/instance-seg/instance-seg_tensorrt_dynamic-320x320-1344x1344.py \
14+
../mmdetection/configs/mask_rcnn/mask-rcnn_r50_fpn_2x_coco.py \
15+
https://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_fpn_2x_coco/mask_rcnn_r50_fpn_2x_coco_bbox_mAP-0.392__segm_mAP-0.354_20200505_003907-3e542a40.pth \
16+
../mmdetection/demo/demo.jpg \
17+
--work-dir work_dir/maskrcnn \
18+
--dump-info \
19+
--device cuda
20+
```
21+
22+
## Convert tensorrt model to triton format
23+
```
24+
cd /root/workspace/mmdeploy
25+
python3 demo/triton/to_triton_model.py \
26+
/root/workspace/mmdeploy/work_dir/maskrcnn \
27+
/model-repository
28+
```
29+
30+
## Start triton server
31+
```
32+
tritonserver --model-repository=/model-repository
33+
```
34+
35+
## Run client code output container
36+
```
37+
python3 demo/triton/instance-segmentation/grpc_client.py \
38+
model \
39+
/path/to/image
40+
```

demo/triton/instance-segmentation/README_zh-CN.md

Whitespace-only changes.
Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
1-
python tools/deploy.py configs/mmpose/pose-detection_tensorrt_static-256x192.py ../mmpose/configs/body_2d_keypoint/topdown_heatmap/coco/td-hm_hrnet-w32_8xb64-210e_coco-256x192.py ../checkpoints/td-hm_hrnet-w32_8xb64-210e_coco-256x192-81c58e40_20220909.pth demo/resources/human-pose.jpg --work-dir work_dir/hrnet --dump-info --device cuda
1+
# Keypoint detection serving
22

3-
python tools/deploy.py configs/mmpose/pose-detection_simcc_tensorrt_dynamic-256x192.py ../mmpose/configs/body_2d_keypoint/simcc/coco/simcc_res50_8xb64-210e_coco-256x192.py https://download.openmmlab.com/mmpose/v1/body_2d_keypoint/simcc/coco/simcc_res50_8xb64-210e_coco-256x192-8e0f5b59_20220919.pth demo/resources/human-pose.jpg --work-dir work_dir/pose2 --dump-info --device cuda
3+
## Starting a docker container
4+
```
5+
docker run -it --rm --gpus all openmmlab/mmdeploy:triton-22.12
6+
```
47

8+
## Convert pytorch model to tensorrt model
9+
```
10+
cd /root/workspace/mmdeploy
11+
python3 tools/deploy.py \
12+
configs/mmpose/pose-detection_tensorrt_static-256x192.py \
13+
../mmpose/configs/body_2d_keypoint/topdown_heatmap/coco/td-hm_hrnet-w32_8xb64-210e_coco-256x192.py \
14+
https://download.openmmlab.com/mmpose/v1/body_2d_keypoint/topdown_heatmap/coco/td-hm_hrnet-w32_8xb64-210e_coco-256x192-81c58e40_20220909.pth \
15+
demo/resources/human-pose.jpg \
16+
--work-dir work_dir/hrnet \
17+
--dump-info \
18+
--device cuda
19+
```
20+
21+
## Convert tensorrt model to triton format
22+
```
23+
cd /root/workspace/mmdeploy
24+
python3 demo/triton/to_triton_model.py \
25+
/root/workspace/mmdeploy/work_dir/hrnet \
26+
/model-repository
27+
```
28+
29+
## Start triton server
30+
```
31+
tritonserver --model-repository=/model-repository
32+
```
33+
34+
## Run client code output container
35+
```
36+
python3 demo/triton/keypoint-detection/grpc_client.py \
37+
model \
38+
/path/to/image
39+
```

demo/triton/keypoint-detection/README_CN.md

Whitespace-only changes.
Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,39 @@
1-
python tools/deploy.py configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py ../mmdetection/configs/retinanet/retinanet_r18_fpn_1x_coco.py https://download.openmmlab.com/mmdetection/v2.0/retinanet/retinanet_r18_fpn_1x_coco/retinanet_r18_fpn_1x_coco_20220407_171055-614fd399.pth ../mmdetection/demo/demo.jpg --work-dir work_dir/retinanet --dump-info --device cuda
1+
# Object detection serving
2+
3+
## Starting a docker container
4+
```
5+
docker run -it --rm --gpus all openmmlab/mmdeploy:triton-22.12
6+
```
7+
8+
## Convert pytorch model to tensorrt model
9+
```
10+
cd /root/workspace/mmdeploy
11+
python3 tools/deploy.py \
12+
configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \
13+
../mmdetection/configs/retinanet/retinanet_r18_fpn_1x_coco.py \
14+
https://download.openmmlab.com/mmdetection/v2.0/retinanet/retinanet_r18_fpn_1x_coco/retinanet_r18_fpn_1x_coco_20220407_171055-614fd399.pth \
15+
../mmdetection/demo/demo.jpg \
16+
--work-dir work_dir/retinanet \
17+
--dump-info \
18+
--device cuda
19+
```
20+
21+
## Convert tensorrt model to triton format
22+
```
23+
cd /root/workspace/mmdeploy
24+
python3 demo/triton/to_triton_model.py \
25+
/root/workspace/mmdeploy/work_dir/retinanet \
26+
/model-repository
27+
```
28+
29+
## Start triton server
30+
```
31+
tritonserver --model-repository=/model-repository
32+
```
33+
34+
## Run client code output container
35+
```
36+
python3 demo/triton/object-detection/grpc_client.py \
37+
model \
38+
/path/to/image
39+
```

demo/triton/object-detection/README_zh-CN.md

Whitespace-only changes.
Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,39 @@
1-
python tools/deploy.py configs/mmrotate/rotated-detection_tensorrt_dynamic-320x320-1024x1024.py ../mmrotate/configs/rotated_faster_rcnn/rotated-faster-rcnn-le90_r50_fpn_1x_dota.py ../../mmrotate/checkpoint/rotated_faster_rcnn_r50_fpn_1x_dota_le90-0393aa5c.pth ../mmrotate/demo/demo.jpg --dump-info --work-dir work_dir/rrcnn --device cuda
1+
# Oriented object detection serving
2+
3+
## Starting a docker container
4+
```
5+
docker run -it --rm --gpus all openmmlab/mmdeploy:triton-22.12
6+
```
7+
8+
## Convert pytorch model to tensorrt model
9+
```
10+
cd /root/workspace/mmdeploy
11+
python3 tools/deploy.py \
12+
configs/mmrotate/rotated-detection_tensorrt_dynamic-320x320-1024x1024.py \
13+
../mmrotate/configs/rotated_faster_rcnn/rotated-faster-rcnn-le90_r50_fpn_1x_dota.py \
14+
https://download.openmmlab.com/mmrotate/v0.1.0/rotated_faster_rcnn/rotated_faster_rcnn_r50_fpn_1x_dota_le90/rotated_faster_rcnn_r50_fpn_1x_dota_le90-0393aa5c.pth \
15+
../mmrotate/demo/demo.jpg \
16+
--dump-info \
17+
--work-dir work_dir/rrcnn \
18+
--device cuda
19+
```
20+
21+
## Convert tensorrt model to triton format
22+
```
23+
cd /root/workspace/mmdeploy
24+
python3 demo/triton/to_triton_model.py \
25+
/root/workspace/mmdeploy/work_dir/rrcnn \
26+
/model-repository
27+
```
28+
29+
## Start triton server
30+
```
31+
tritonserver --model-repository=/model-repository
32+
```
33+
34+
## Run client code output container
35+
```
36+
python3 demo/triton/oriented-object-detection/grpc_client.py \
37+
model \
38+
/path/to/image
39+
```

demo/triton/oriented-object-detection/README_zh-CN.md

Whitespace-only changes.

0 commit comments

Comments
 (0)