Description
Hi all. From my C++/TensorRT code, I import a tiny yolo v4 ONNX, and I need to adapt the network output tensor to the required nms layer input tensor shapes (boxes input + scores input (according to TensorRT/plugin/batchedNMSPlugin at master · NVIDIA/TensorRT · GitHub )
What i get as network output:
B, nb_boxes_per_cell * box_params_size, Cx, Cy (1, 3*(4+1+80), 13, 13 = 1, 255, 13, 13)
The tensor shapes required by the batchedNMSPlugin layer:
→ 1, 255, 80, 4 (boxes input) (*)
→ 1, 255, 80 (scores input) (**)
What Ive done
1, 255, 13, 13 → 1, 255, 1313 (using setReshapeDimensions of a 1st IShuffleLayer)
1, 255, 1313 → 1, 85, 13133 (using setReshapeDimensionsa of 2nd IShuffleLayer)
1, 85, 13133 → 1, 13133, 85 (using setSecondTranspose of the 2nd IShuffleLayer)
But now, how to reach (*) and (**)? Using the IGatherLayer? And in that case, how to define the dim indexes ITensor with constant values ?
Is there a alternative way to add nms to an imported tiny yolov4 onnx model (C++) ?
Please… help !
++