Tim M 57b5cefde5 Updated all `.md` files to contain newest image il y a 2 ans
..
CMakeLists.txt dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
FindTensorRT.cmake dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
README.md 57b5cefde5 Updated all `.md` files to contain newest image il y a 2 ans
imagenet_classes.txt dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
pytorch_model.py dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
requirements.txt dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
resnet50.onnx dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
trt_inference.py dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
trt_sample.cpp dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans
turkish_coffee.jpg dfe15704ee add code for article How To Run Inference Using TensorRT C++ API il y a 4 ans

README.md

How To Run Inference Using TensorRT C++ API

This repository contains code for How To Run Inference Using TensorRT C++ API blogpost.

download

To run PyTorch part:

```shell script python3 -m pip install -r requirements.txt python3 pytorch_model.py


### To run TensorRT part:
1. Install [CMake](https://cmake.org/) at least 3.10 version
2. Download and install NVIDIA CUDA 10.0 or later following by official instruction: [link](https://developer.nvidia.com/cuda-10.0-download-archive)
3. Download and extract CuDNN library for your CUDA version (login required): [link](https://developer.nvidia.com/rdp/cudnn-download)
4. Download and extract NVIDIA TensorRT library for your CUDA version (login required): [link](https://developer.nvidia.com/nvidia-tensorrt-6x-download). The minimum required version is 6.0.1.5
5. Add the path to CUDA, TensorRT, CuDNN to PATH variable (or LD_LIBRARY_PATH)
6. Build or install a pre-built version of OpenCV and OpenCV Contrib. The minimum required version is 4.0.0.

```shell script
mkdir build
cd build
cmake -DOpenCV_DIR=[path-to-opencv-build] -DTensorRT_DIR=[path-to-tensorrt] ..
make -j8
trt_sample[.exe] resnet50.onnx turkish_coffee.jpg

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.