detectNet and custom bounding boxes in python

Hello,
I’m working on a project where I have to chose the color of bounding boxes drawn by detectNet according to the depth from a intel realsense camera (from red to green). At the moment I’m using the bounding box coordinates from the detection object than using OpenCV I can draw boxes and stream, frame by frame, the resulting ovelayed images. But openCV halves my fps with respect of glDisplay. Is there a way to still use glDisplay with custom boxes, or an easy way to do this in python?
thanks

Hi mattilsanguinario, currently the detectNet bounding box colors are generated programatically by class ID in this function:
https://github.com/dusty-nv/jetson-inference/blob/8846dcb274ff812880ef7bf9d42eb1dd75c9e7b7/c/detectNet.cpp#L426

Then at runtime, the color of the bounding box is looked up by the class ID here:
https://github.com/dusty-nv/jetson-inference/blob/8846dcb274ff812880ef7bf9d42eb1dd75c9e7b7/c/detectNet.cu#L109

You would need to update these to lookup a depth image and generate the color from that, and modify the Python bindings accordingly.

thanks for your reply
my dream was avoid c++ because I’ve no idea how to program in c++ but I think the time to start learning it has come ;)