detectNet and custom bounding boxes in python

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?

Hi mattilsanguinario, currently the detectNet bounding box colors are generated programatically by class ID in this function:

Then at runtime, the color of the bounding box is looked up by the class ID here:

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 ;)