Try to tensorrt inference for yolov3-ssp.weight ,Number of unused weights left : 524288 ?

Try to used tensorrt inference for yolov3-ssp.weight ,cuda10.0 ,tensorrt5.1.5,

fix lib/yolo.cpp :385
if ((m_configBlocks.at(i).at(“size”) == “2” && m_configBlocks.at(i).at(“stride”) == “1”)||(m_configBlocks.at(i).at(“size”) == “9” && m_configBlocks.at(i).at(“stride”) == “1”)||(m_configBlocks.at(i).at(“size”) == “5” && m_configBlocks.at(i).at(“stride”) == “1”)||(m_configBlocks.at(i).at(“size”) == “13” && m_configBlocks.at(i).at(“stride”) == “1”))

cd deepstream_reference_apps/yolo/
$trt-yolo-app --flagfile=config/yolov3-ssp.txt
cfg : wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3-spp.cfg
weights: wget https://pjreddie.com/media/files/yolov3-spp.weights
Loading pre-trained weights…
Loading complete!
Total Number of weights read : 63052381
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 608 x 608 32 x 608 x 608 992
(2) conv-bn-leaky 32 x 608 x 608 64 x 304 x 304 19680
(3) conv-bn-leaky 64 x 304 x 304 32 x 304 x 304 21856
(4) conv-bn-leaky 32 x 304 x 304 64 x 304 x 304 40544
(5) skip 64 x 304 x 304 64 x 304 x 304 -
(6) conv-bn-leaky 64 x 304 x 304 128 x 152 x 152 114784
(7) conv-bn-leaky 128 x 152 x 152 64 x 152 x 152 123232
(8) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 197472
(9) skip 128 x 152 x 152 128 x 152 x 152 -
(10) conv-bn-leaky 128 x 152 x 152 64 x 152 x 152 205920
(11) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 280160
(12) skip 128 x 152 x 152 128 x 152 x 152 -
(13) conv-bn-leaky 128 x 152 x 152 256 x 76 x 76 576096
(14) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 609376
(15) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 905312
(16) skip 256 x 76 x 76 256 x 76 x 76 -
(17) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 938592
(18) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 1234528
(19) skip 256 x 76 x 76 256 x 76 x 76 -
(20) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 1267808
(21) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 1563744
(22) skip 256 x 76 x 76 256 x 76 x 76 -
(23) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 1597024
(24) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 1892960
(25) skip 256 x 76 x 76 256 x 76 x 76 -
(26) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 1926240
(27) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 2222176
(28) skip 256 x 76 x 76 256 x 76 x 76 -
(29) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 2255456
(30) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 2551392
(31) skip 256 x 76 x 76 256 x 76 x 76 -
(32) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 2584672
(33) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 2880608
(34) skip 256 x 76 x 76 256 x 76 x 76 -
(35) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 2913888
(36) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 3209824
(37) skip 256 x 76 x 76 256 x 76 x 76 -
(38) conv-bn-leaky 256 x 76 x 76 512 x 38 x 38 4391520
(39) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 4523616
(40) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 5705312
(41) skip 512 x 38 x 38 512 x 38 x 38 -
(42) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 5837408
(43) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 7019104
(44) skip 512 x 38 x 38 512 x 38 x 38 -
(45) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 7151200
(46) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 8332896
(47) skip 512 x 38 x 38 512 x 38 x 38 -
(48) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 8464992
(49) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 9646688
(50) skip 512 x 38 x 38 512 x 38 x 38 -
(51) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 9778784
(52) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 10960480
(53) skip 512 x 38 x 38 512 x 38 x 38 -
(54) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 11092576
(55) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 12274272
(56) skip 512 x 38 x 38 512 x 38 x 38 -
(57) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 12406368
(58) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 13588064
(59) skip 512 x 38 x 38 512 x 38 x 38 -
(60) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 13720160
(61) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 14901856
(62) skip 512 x 38 x 38 512 x 38 x 38 -
(63) conv-bn-leaky 512 x 38 x 38 1024 x 19 x 19 19624544
(64) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 20150880
(65) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 24873568
(66) skip 1024 x 19 x 19 1024 x 19 x 19 -
(67) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 25399904
(68) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 30122592
(69) skip 1024 x 19 x 19 1024 x 19 x 19 -
(70) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 30648928
(71) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 35371616
(72) skip 1024 x 19 x 19 1024 x 19 x 19 -
(73) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 35897952
(74) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 40620640
(75) skip 1024 x 19 x 19 1024 x 19 x 19 -
(76) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 41146976
(77) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 45869664
(78) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 46396000
maxpool: 512 x 19 x 19
(79) maxpool 512 x 19 x 19 512 x 19 x 19 46396000
(80) route - 512 x 19 x 19 46396000
maxpool: 512 x 19 x 19
(81) maxpool 512 x 19 x 19 512 x 19 x 19 46396000
(82) route - 512 x 19 x 19 46396000
maxpool: 512 x 19 x 19
(83) maxpool 512 x 19 x 19 512 x 19 x 19 46396000
(84) route - 1024 x 19 x 19 46396000
(85) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 46922336
(86) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 51645024
(87) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 52171360
(88) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 56894048
(89) conv-linear 1024 x 19 x 19 255 x 19 x 19 57155423
(90) yolo 255 x 19 x 19 255 x 19 x 19 57155423
(91) route - 512 x 19 x 19 57155423
(92) conv-bn-leaky 512 x 19 x 19 256 x 19 x 19 57287519
(93) upsample 256 x 19 x 19 256 x 38 x 38 -
(94) route - 768 x 38 x 38 57287519
(95) conv-bn-leaky 768 x 38 x 38 256 x 38 x 38 57485151
(96) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 58666847
(97) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 58798943
(98) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 59980639
(99) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 60112735
(100) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 61294431
(101) conv-linear 512 x 38 x 38 255 x 38 x 38 61425246
(102) yolo 255 x 38 x 38 255 x 38 x 38 61425246
(103) route - 256 x 38 x 38 61425246
(104) conv-bn-leaky 256 x 38 x 38 128 x 38 x 38 61458526
(105) upsample 128 x 38 x 38 128 x 76 x 76 -
(106) route - 384 x 76 x 76 61458526
(107) conv-bn-leaky 384 x 76 x 76 128 x 76 x 76 61508190
(108) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 61804126
(109) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 61837406
(110) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 62133342
(111) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 62166622
(112) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 62462558
(113) conv-linear 256 x 76 x 76 255 x 76 x 76 62528093
(114) yolo 255 x 76 x 76 255 x 76 x 76 62528093
Number of unused weights left : 524288
trt-yolo-app: /home/ai/TensorRT_yolo3_module/deepstream_reference_apps/yolo/lib/yolo.cpp:409: void Yolo::createYOLOEngine(nvinfer1::DataType, Int8EntropyCalibrator*): Assertion `0’ failed.
Aborted (core dumped)

Number of unused weights left : 524288 ?

Hi,

Currently, we only verify following YOLO models: yoloV2, yoloV2_tiny, yoloV3 and yoloV3_tiny.
This is a new model and need further investigation.
We are passing this request to our internal team. Will update more information with you later.

By the way, it looks like you are still using trt-yolo-app.
Please noticed that the YOLO sample is already integrated into Deepstream 4.0.
It’s recommended to move to our sample located in Deepstream SDK to get the further support.

Thanks.

Hi,

Do you solve this problem already?
I have run yolov3-spp successfully, but the precision decreased a lot.

Hi, I would like to know how you were able to fix the unsused weight?

hi, whether the problem of accuracy reduction has been solved and how to do it?