# tensorrt_inference **Repository Path**: bewithmeallmylife/tensorrt_inference ## Basic Information - **Project Name**: tensorrt_inference - **Description**: this is project base on https://github.com/linghu8812/tensorrt_inference - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-11-01 - **Last Updated**: 2023-10-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # **TensorRT Models Deploy from ONNX Plus** ## This project is base on [TensorRT Models Deploy from ONNX](https://github.com/linghu8812/tensorrt_inference) ## What differences between this project and [TensorRT Models Deploy from ONNX](https://github.com/linghu8812/tensorrt_inference) - Add mmpose HRNet whole body demo - You can run this project in ready build docker image and don't need to build docker image by yourself - Add Town-Down Multiple Person Pose Estimation Interface With YOLOv7 and HRNet ## **How to Use** - Clone the code ```shell git clone https://gitee.com/bewithmeallmylife/tensorrt_inference.git ``` - Download ONNX models, and put `weights` folder into folder `/your-code-parent-path/tensorrt_inference` [ONNX models](https://pan.baidu.com/s/1scqbfiDINinWMbTL8W94WA?pwd=46cz) - Run docker container ``` sudo docker run --net=host --gpus '"device=0"' --privileged -it -v /your-code-parent-path/tensorrt_inference:/app/tensorrt_inference -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY bewithmeallmylife/tensorrt-inference-app:cuda10.2-cudnn8-trt7-devel-ubuntu18.04 ``` - Build tensorrt_inference project in docker container: ``` cd /app/tensorrt_inference/project mkdir build && cd build cmake .. make -j ``` after these steps, the executable program `tensorrt_inference` and all support model shared libraries have been built. - Run tensorrt_inference ``` cd ../../bin ./tensorrt_inference ``` it will show: ``` Please design model arch, config file and folder name! ``` - Inference with models, take **yolov5** model as example, put `yolov5s.onnx` model into `weights` folder: ``` cd ../../bin/ ./tensorrt_inference yolov5 ../configs/yolov5/config.yaml ../samples/detection_segmentation ``` Use one model library example can reference here [example](example) ## **Build from docker But you don't have to do this** ``` cd Dokerfile-runtime/cuda-10.2 sudo docker build -t='bewithmeallmylife/tensorrt-inference-runtime:cuda10.2-cudnn8-trt7-devel-ubuntu18.04' . ``` ``` sudo docker build -t='bewithmeallmylife/tensorrt-inference-app:cuda10.2-cudnn8-trt7-devel-ubuntu18.04' . ``` ## **Supported Models** models|framework|instruction ---|---|--- [lenet](project/lenet)|PyTorch|An example from model training to TensorRT model deploy [alexnet](project/alexnet)|MXNet Gluon|MXNet Gluon example [arcface](project/arcface)|MXNet Symbol|MXNet Symbol and face recognition example [CenterFace](project/CenterFace)|ONNX|rewrite ONNX model and face detection example [efficientnet](project/efficientnet)|Keras|Keras to ONNX example [face_alignment](project/face_alignment)|MXNet Symbol|MXNet Symbol and face key points detection example [fast-reid](project/fast-reid)|PyTorch|PyTorch and pedestrian reid example [FCN](project/FCN)|GluonCV|MXNet GluonCV semantic segmentation example [gender-age](project/gender-age)|MXNet Symbol|MXNet Symbol and face gender and age recognize example [ghostnet](project/ghostnet)|PyTorch|PyTorch example [MiniFASNet](project/MiniFASNet)|PyTorch|PyTorch face anti spoofing example [mmpose](project/mmpose)|PyTorch|PyTorch person key points detect example [nanodet](project/nanodet)|PyTorch|PyTorchlightweight anchor-free object detection example [RetinaFace](project/RetinaFace)|MXNet Symbol|MXNet Symbol and face detection example [ScaledYOLOv4](project/ScaledYOLOv4)|PyTorch|YOLOv4 large with PyTorch implementation [scrfd](project/scrfd)|PyTorch|PyTorch scrfd face detection example [seresnext](project/seresnext)|PyTorch|PyTorch example [Swin-Transformer](project/Swin-Transformer)|timm|timm image classification example [yolor](project/yolor)|PyTorch|PyTorch and object detection example [Yolov4](project/Yolov4)|darknet|darknet and object detection example [yolov5](project/yolov5)|PyTorch|PyTorch and object detection example [YOLOv6](project/YOLOv6)|PyTorch|PyTorch and object detection example [yolov7](project/yolov7)|PyTorch|PyTorch and object detection example ## **Discussion Groups** - **QQ group:** 588966055