Faster-RCNN inferencing on a single image

Please provide the following information when requesting support.

• Hardware Xavier
• Network Type Faster_rcnn
• TLT Version 3.22.02

I successfully trained a Faster-RCNN model under TAO with my own dataset. Model has also be turn into a TRT engine plan. All the steps in the ‘faster_rcnn.ipynb’ notebook completed successfully. Inferencing done on a batch of images (tao faster_rcnn inference …) gave the expected result.
My question is how can I do inferencing (in Python) on a single image outside of TAO ?
I can load the exported/TRT model and do the inferencing. Two arrays (NMS, NMS_1) are generated but I don’t know how to turn them into bounding boxes and display then.
Do you have sample code that mimics the ‘tao faster_inference’ function ? Thanks for your help

As mentioned in TAO user guide, you can refer to GitHub - NVIDIA-AI-IOT/deepstream_tao_apps: Sample apps to demonstrate how to deploy models trained with TAO on DeepStream

thanks for the reply. I already took a look at this part of the documentation but it’s not answering my question.
In your documentation you mention:

4~7. RetinaNet / DSSD / SSD/ FasterRCNN

These three models have the same output layer named NMS which implementation can refer to TRT OSS nmsPlugin:

  • an output of shape [batchSize, 1, keepTopK, 7] which contains nmsed box class IDs(1 value), nmsed box scores(1 value) and nmsed box locations(4 value)
  • another output of shape [batchSize, 1, 1, 1] which contains the output nmsed box count.

After loading the TRT model in fp16 and doing a ‘predict’ I get as result back, a ‘detection_out’ array of shape (700,) and a ‘keepCount’ array of shape (1,)

Is it what I should expect? What the ‘detection_out’ represents? I’ve some values at different index which look like a confidence level (i.e. 0.98773, 0.64154, …) there are also ‘-1’ values I don’t understand what they represent.

Long story short, I’m quite lost and some help will be useful to move forward.

You can take a look at deepstream_tao_apps/nvdsinfer_custombboxparser_tao.cpp at master · NVIDIA-AI-IOT/deepstream_tao_apps · GitHub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.