I have tested tiny-yolov3 on jetson nano using deepstream and it works fine.
Now i have a modified yolo model whose input is not square (because in my scenerio non-square grid size gives better results), when i tried to load this model to convert it in deepstream to tensorrt it got errors because the sample provided only supports symmetric input.
So i made changes in nvdsinfer_custom_impl_Yolo code inside objectDetector_Yolo and i was able to load and run the network.
Changes i made were removal of some size check asserts, calculation and use of gridSize and stride in both H and W dimension and some others.
But the network produced incorrect output and in cases did not produce any output.
What i noticed was that the network info printed by darknet and nvdsinfer differed, after the first maxpool the output dimensions printed by nvdsinfer were same in size (which should not be happening)
Darknet output: https://imgur.com/a/evM8ABl
NvdsInfer output: https://imgur.com/a/H41W1a8
I tried debugging and found that the dimensions returned by nvinder1::IPollingLayer in netAddMaxpool in trt_utils.cpp are wrong (output dimensions are same in size even though input in asymmetric).
my config file:
[net] # Testing # batch=1 # subdivisions=1 # Training batch=64 subdivisions=8 height=128 width=288 channels=3 momentum=0.9 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1 learning_rate=0.001 #burn_in=1200 max_batches = 25000 policy=steps steps=2000,6000,9000,22000 scales=.1,.1,.1,.1 [convolutional] batch_normalize=1 filters=16 size=3 stride=1 pad=1 activation=leaky [maxpool] size=2 stride=2 [convolutional] batch_normalize=1 filters=32 size=3 stride=1 pad=1 activation=leaky [maxpool] size=2 stride=2 [convolutional] batch_normalize=1 filters=96 size=3 stride=1 pad=1 activation=leaky [convolutional] batch_normalize=1 filters=32 size=1 stride=1 pad=1 activation=leaky [maxpool] size=2 stride=2 [convolutional] batch_normalize=1 filters=160 size=3 stride=1 pad=1 activation=leaky [convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=64 activation=leaky [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=192 activation=leaky [convolutional] size=1 stride=1 pad=1 filters=12 activation=linear [yolo] iou_loss= giou mask = 0,1 anchors = 33,35, 22,53 classes=1 num=2 jitter=.3 random=0