File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,25 @@ you can use darknet2pytorch to convert it yourself, or download my converted mod
212212
213213 Note:Errors will occur when using "pip install onnx-tf", at least for me,it is recommended to use source code installation
214214
215+ # 7. ONNX2TensorRT and DeepStream Inference
216+
217+ 1. Compile the DeepStream Nvinfer Plugin
218+ ```cd DeepStream
219+ make
220+ ```
221+ 2 . Build a TRT Engine.
222+ For single batch,
223+ ``` trtexec --onnx=<onnx_file> --explicitBatch --saveEngine=<tensorRT_engine_file> --workspace=<size_in_megabytes> --fp16 ```
224+
225+ For multi-batch,
226+ ``` trtexec --onnx=<onnx_file> --explicitBatch --shapes=input:Xx3xHxW --optShapes=input:Xx3xHxW --maxShapes=input:Xx3xHxW --minShape=input:1x3xHxW --saveEngine=<tensorRT_engine_file> --fp16 ```
227+
228+ Note : The maxShapes could not be larger than model original shape.
229+
230+ 3 . Write the deepstream config file for the TRT Engine.
231+
232+
233+
215234Reference:
216235- https://github.com/eriklindernoren/PyTorch-YOLOv3
217236- https://github.com/marvis/pytorch-caffe-darknet-convert
You can’t perform that action at this time.
0 commit comments