Forum

OpenCV Helppatch YOLO

HOLA

strange behavior when I try to use YOLO-helppatch

I downloaded all files and try to use the picture MargaretHamilton - no sucess

node YOLODetector blinks crazy - inside Create and Detect are blinking

“C:\Program Files\vvvv\vvvv_gamma_2019.1.0-0344-gd5eabf23a7\lib\packs\VL.OpenCV.0.2.89-alpha\content\assets\MargaretHamilton.jpg”

BUT it works with BerlinPedestrians.jpg, MattDamon.jpg it is even ok with Coins.jpg (doesn’t detect but also doesn’t blink)

AND it works with another BW picture

It even works with VideoIn(OpenCVSource)

i tried to edit and resave “MargaretHamilton.jpg” also other format - but no sucess
STRANGE

Greetings

Hmmm, weird indeed, tried to have a quick look at it but did not find anything out of place. @robotanton could you please have a look when you have a chance?

Hi!

@CeeYaa, thank you for reporting this. It looks like that something was changed in VL.OpenCV regarding the ImageReader or even deeper (@ravazquez)?

Yolo needs an RGB (or BGR) image (it can be BW, but still has 3 channels), but in the example with “MargaretHamilton.jpg” the ImageReader returns CV_8UC1 (one channel image) by default. Setting the ‘Flags’ pin of the ImageReader to ‘Color’ solves the problem.

I’ve checked the MargaretHamilton’s format: it is JPEG Grayscale (v1.1) which is very rare. Most of JPEGs are JPEG TrueColor (v1.1).

Best,
Anton

1 Like

@robotanton you are correct, ImageReader’s Flags was changed from “Color” to “Unchanged” which is more appropriate in general but in the case of this image and the example is causing issues. I proceeded to change the help patch to have the flag set to Color which should prevent any further issues.

@CeeYaa thanks for reporting!

Version 0.2.99-alpha includes the fix.