Can I modify NvInfer? How can I get the last layers?

How can i get last layers before DetectNet runs openCV groupRectangles? Or i have to train a new model where this layer is no contained? Can I modify NVinfer, and if yes how, to change groupRectangles parameters? I would like to get set of bounding boxes generated for grid squares with predicted coverage values. I am a beginner.

Hi csadom,

You do not have to retrain DetectNet if you want to have unclustered output (i.e., one bounding box per coverage cell/grid square). Just remove the last “Python” layer from your trained DetectNet’s deploy.prototxt and you get the expected output after performing a forward pass. Which platform are you using? DRIVE PX 2 or DriveWorks on x86 architecture?

Best regards,
Oliver

Hy Oliver,
thanks for the rapid answer. I borrow a TX1 from university, and there is a Jetpack 3.0.
So you said that if i delete the last python layer and run the detect function, will I got it? What kind of format will be the output in this case? Thanks, i will try it tomorrow in university.

[Moving this thread to the TX1 forum]

I have the same problem too. How can I handle the new output(s)?

Hi,

Thanks for your question.

As nvik said, please remove the last python layer in .prototxt file and mark bbox and coverage as your output.

We have a sample code to demonstrate how to use DetectNet with TensorRT.

In this sample, tensorRT output bounding box and coverage.
And we extract and cluster the raw bounding boxes that meet the coverage threshold.(In detectNet.cpp)

Thanks.