Stretch 3 deep perception image red color missing

I am working on a project that uses stretch deep perception for object detection. I have made a custom yolov5t model for detecting boxes, plastic bottles and tennis ball. When i use the demo code, (both with my custom model and the default yolov5s coco model) the rviz image has no red color in it and it won’t detect tennis balls or cardboard boxes correctly. When i run yolov5 detection on images it works correctly. What pipeline does the image processing take, i have tried to follow it to find where the images loses red color to try to fix it but haven’t found anything. The raw camera output has all colors.

Hi @Kristo_Kakkum,

It turns out the issue was caused by the color encoding not being converted back to RGB after the OpenCV image-processing step. The output image was still in BGR, which is why the red channel appeared missing (and showed up as blue instead). Converting the processed image back to RGB resolves the problem. This PR fixes an issue where the processed color image was being published with incorrect color channels.

When you get a chance, could you test it on your end and confirm that the colors and detections now look correct?

2 Likes