There is a example at /usr/sre/tensorrt/sample/python/yolov3_onnx
And you can find the step to test it. But the step 1 is a huge challenge.
You need build onnx-tensorrt.
Problem 1: I meet can not find protobuf problem.
cd onnx-tensorrt
mkdir build
cd build
cmake .. -DTENSORRT_ROOT=<tensorrt_install_dir>
OR
cmake .. -DCUDA_INCLUDE_DIRS=/usr/local/cuda/include -DTENSORRT_ROOT=/ust/src/tensorrt -DGPU_ARCHS="53"
make -j4
sudo make install
At the official project make command didn’t have -DCUDA_INCLUDE_DIRS=…
If you didn’t add it, you will meet fatal error problem.
I follow the above steps. still not work. error is below
– Protobuf libraries : /usr/lib/aarch64-linux-gnu/libprotobuf.so;-lpthread
– BUILD_ONNX_PYTHON : OFF
– Found TensorRT headers at /usr/include/aarch64-linux-gnu
– Find TensorRT libs at /usr/lib/aarch64-linux-gnu/libnvinfer.so;/usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so;TENSORRT_LIBRARY_MYELIN-NOTFOUND
– Could NOT find TENSORRT (missing: TENSORRT_LIBRARY)
ERRORCannot find TensorRT library.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TENSORRT_LIBRARY_MYELIN
linked by target “nvonnxparser_static” in directory /home/michael/onnx-tensorrt
linked by target “nvonnxparser” in directory /home/michael/onnx-tensorrt
– Configuring incomplete, errors occurred!
See also “/home/michael/onnx-tensorrt/build/CMakeFiles/CMakeOutput.log”.
See also “/home/michael/onnx-tensorrt/build/CMakeFiles/CMakeError.log”.