Detectnet Custom Parser

Hi,

I’m trying to implement the detectnet parser in https://github.com/AastaNV/DeepStream/blob/master/parser_detectnet/nvparsebbox.cpp to match with the Deepstream 4.0 API so I can do inference with a detectnet model.

I’ve figured out the DS 4.0 analogous variable of most of the ones in the github; however, I can’t figure out where batch_th is or what it means. What does this variable mean, and how can I find it in DS 4.0?

Thanks.

Hi,

Here is a sample for the detectNet bounding box parser:
https://github.com/AastaNV/DeepStream/tree/master/parser_detectnet

Although it is for older Deepstream version, the overall implementation is similar.
You can start from this sample.

Thanks.

Hi,

Thanks, I have seen that implementation. My question is about that implementation, and the batch_th variable in that implementation specifically (lines 18, 24, 42 in parser_detectnet/nvparsebbox.cpp).

I can figure out how to implement the rest of the parser, but I’m not sure what to do about the batch_th variable. It looks like there isn’t an analogous variable for the new version of deepstream, and I can’t seem to find any documentation saying what the batch_th variable is - batch threshold I’m guessing? Is that the max batch size?

What does the batch_th variable in the above implementation (lines 18, 24, 42 in parser_detectnet/nvparsebbox.cpp) mean, and where can I find a similar variable in the new version of Deepstream? Is it even required in the new version of Deepstream?

Thanks.

Hi,

I just ignored the batch_th variable to see what would happen, and implemented the rest of the parser.

Now, I am getting many many bounding boxes around the object of interest. Is there a way to combine these boxes, and if so, where would be a good place for me to start looking? Would this take place in the bbox parser itself? Do the multiple boxes have to do with the offsets being improperly calculated due to the batch_th variable?

Thanks for your help!

Hi,

batch_th is the information of batch number, which is used to calculate bounding box offset.

This parser doesn’t enable the bounding box merge for simplicity.
But you can check this example for the merge function of bbox:
https://github.com/dusty-nv/jetson-inference/blob/master/c/detectNet.cpp#L867

Thanks.

Hi,

Thank you so much for your help! I will check out the bbox merge function, and after increasing confidence threshold the parser is working as expected.

Thanks again!