1.
Our default OpenCV doesn’t support dnn module.
Please build it from source.
2.
This plugin requires TensorRT4.0, which is only available in JetPack3.3.
How do you get the TensorRT 4.0 work with JetPack3.2.
Please remember that there is some limitation between CUDA driver(within OS) and CUDA toolkit.
You may meet some dependency issue if you mix-use the package from different JetPack.
3.
Please also noticed that deepStream for Jetson is only available on JetPack3.2/3.2.1.
You may need to reset it to a previous commitment to make it compatible to TRT3.0.
Okay. I had that doubt as I checked for the module in /usr/
I will install it
I have Jetpack 3.2.1. It came with TensorRT 4.0.
# R28 (release), REVISION: 2.1, GCID: 11272647, BOARD: t186ref, EABI: aarch64, DATE: Thu May 17 07:29:06 UTC 2018
TensorRT -
ii libnvinfer-dev 4.0.4-1+cuda9.0 arm64 TensorRT development libraries and headers
This plugin requires TensorRT 4.0, which is only available in JetPack3.3.
Please also noticed that deepStream for Jetson is only available on JetPack3.2/3.2.1.
This Yolo plugin was targeted for DS2.0 on Tesla and it is recently updated with a standalone TensorRT app to enable Jetson user.
You can find this information in our readme: https://github.com/vat-nvidia/deepstream-plugins#note
[i]--------------------------------------------------- Note
…
Tegra users who are currently using Deepstream 1.5, please use the standalone TRT app as your starting point and incorporate that inference pipeline in your inference plugin.
[/i]
You can also use this code to write your own deepstream plugins for YOLO on Jetson.
Thanks.
Looks like it was CUDA version issue.
Changed CUDA version variable. The bug is solved. Now getting error -
In file included from trt_utils.h:40:0,
from ds_image.h:28,
from calibrator.h:29,
from calibrator.cpp:26:
plugin_factory.h:72:23: error: ‘RegionParameters’ in namespace ‘nvinfer1::plugin’ does not name a type
nvinfer1::plugin::RegionParameters m_RegionParameters{m_NumBoxes, m_NumCoords, m_NumClasses,
^
Makefile:62: recipe for target 'build/calibrator.o' failed
make[1]: *** [build/calibrator.o] Error 1
make[1]: Leaving directory '/home/nvidia/deepstream-plugins/sources/gst-yoloplugin/yoloplugin_lib'
Makefile:53: recipe for target 'deps' failed
make: *** [deps] Error 2
One more experiment I did was to load the Tiny weights and run the model.
For Tiny V2
File does not exist : /home/nvidia/deepstream-plugins/sources/gst-yoloplugin/yoloplugin_lib/models/yolov2-kFLOAT-batch8.engine
Unable to find cached TensorRT engine for network : yolov2 precision : kFLOAT and batch size :8
Creating a new TensorRT Engine
Loading pre-trained weights...
Loading complete!
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 416 x 416 16 x 416 x 416 496
(2) maxpool 16 x 416 x 416 16 x 208 x 208 496
(3) conv-bn-leaky 16 x 208 x 208 32 x 208 x 208 5232
(4) maxpool 32 x 208 x 208 32 x 104 x 104 5232
(5) conv-bn-leaky 32 x 104 x 104 64 x 104 x 104 23920
(6) maxpool 64 x 104 x 104 64 x 52 x 52 23920
(7) conv-bn-leaky 64 x 52 x 52 128 x 52 x 52 98160
(8) maxpool 128 x 52 x 52 128 x 26 x 26 98160
(9) conv-bn-leaky 128 x 26 x 26 256 x 26 x 26 394096
(10) maxpool 256 x 26 x 26 256 x 13 x 13 394096
(11) conv-bn-leaky 256 x 13 x 13 512 x 13 x 13 1575792
(12) maxpool 512 x 13 x 13 512 x 12 x 12 1575792
(13) conv-bn-leaky 512 x 12 x 12 1024 x 12 x 12 6298480
(14) conv-bn-leaky 1024 x 12 x 12 512 x 12 x 12 11019120
(15) conv-linear 512 x 12 x 12 425 x 12 x 12 11237145
(16) region 425 x 12 x 12 425 x 12 x 12 11237145
Output layers :
region_16
Building the TensorRT Engine...
Building complete!
Serializing the TensorRT Engine...
Serialized plan file cached at location : /home/nvidia/deepstream-plugins/sources/gst-yoloplugin/yoloplugin_lib/models/yolov2-kFLOAT-batch8.engine
Loading TRT Engine...
Loading Complete!
TRT-yolo-app: yolov2.cpp:40: YoloV2::YoloV2(uint): Assertion `m_OutputIndex != -1' failed.
Aborted (core dumped)
Edit: Made the region_16 as OutputBlobname. Compiled and ran, But No detection was made.
For Tiny V3
File does not exist : /home/nvidia/deepstream-plugins/sources/gst-yoloplugin/yoloplugin_lib/models/yolov3-kFLOAT-batch8.engine
Unable to find cached TensorRT engine for network : yolov3 precision : kFLOAT and batch size :8
Creating a new TensorRT Engine
Loading pre-trained weights...
Loading complete!
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 416 x 416 16 x 416 x 416 496
(2) maxpool 16 x 416 x 416 16 x 208 x 208 496
(3) conv-bn-leaky 16 x 208 x 208 32 x 208 x 208 5232
(4) maxpool 32 x 208 x 208 32 x 104 x 104 5232
(5) conv-bn-leaky 32 x 104 x 104 64 x 104 x 104 23920
(6) maxpool 64 x 104 x 104 64 x 52 x 52 23920
(7) conv-bn-leaky 64 x 52 x 52 128 x 52 x 52 98160
(8) maxpool 128 x 52 x 52 128 x 26 x 26 98160
(9) conv-bn-leaky 128 x 26 x 26 256 x 26 x 26 394096
(10) maxpool 256 x 26 x 26 256 x 13 x 13 394096
(11) conv-bn-leaky 256 x 13 x 13 512 x 13 x 13 1575792
(12) maxpool 512 x 13 x 13 512 x 12 x 12 1575792
(13) conv-bn-leaky 512 x 12 x 12 1024 x 12 x 12 6298480
(14) conv-bn-leaky 1024 x 12 x 12 256 x 12 x 12 6561648
(15) conv-bn-leaky 256 x 12 x 12 512 x 12 x 12 7743344
(16) conv-linear 512 x 12 x 12 255 x 12 x 12 7874159
(17) yolo 255 x 12 x 12 255 x 12 x 12 7874159
(18) route - 256 x 12 x 12 7874159
(19) conv-bn-leaky 256 x 12 x 12 128 x 12 x 12 7907439
(20) upsample 128 x 12 x 12 128 x 24 x 24 -
ERROR: route_20: all concat input tensors must have the same dimensions except on the concatenation axis
TRT-yolo-app: trt_utils.cpp:295: std::__cxx11::string dimsToString(nvinfer1::Dims): Assertion `d.nbDims >= 1' failed.
Aborted (core dumped)