onnx / models

A collection of pre-trained, state-of-the-art models in the ONNX format
http://onnx.ai/models/
Apache License 2.0
8.02k stars 1.41k forks source link

Postprocessing - Ultraface within TensorRT Inference #461

Open tsedlmeier opened 3 years ago

tsedlmeier commented 3 years ago

Hello Everyone,

i wrote a Inference within Nvidias TensorRT and got Predictions from my model. However i dont know how to properly postprocess the predictions to get and draw the right bboxes. I do know that i have to do some NMS. Can anyone help and show me which Code-Snippets to use for my specific use-case? I found an interesting Plugin https://github.com/NVIDIA/TensorRT/tree/master/plugin/batchedNMSPlugin but i dont know how to integrate it.

Model: https://github.com/onnx/models/blob/master/vision/body_analysis/ultraface/models/version-RFB-640.onnx Inference: inference_face_detection.txt

Thanks for your help and have a nice day!

Toni

wenbingl commented 3 years ago

You may check this Python source file about the post-processing for this model to generate the boxes. https://github.com/onnx/models/blob/master/vision/body_analysis/ultraface/dependencies/box_utils.py