qqwweee / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend)
MIT License
7.14k stars 3.44k forks source link

What happens to the input image? #707

Closed Kot-Nak8 closed 4 years ago

Kot-Nak8 commented 4 years ago

How is the image input to the detector processed? I'm not sure if this is correct, but the image I checked had these additional gray areas at the top and bottom. Will there be another process after this to add gray areas on the left and right? I hope someone can tell me about it. im2

Kot-Nak8 commented 4 years ago

Depending on the weights used, this can cause false positives at both ends of the screen. I would like to know how the processing of the input image affects both ends of the screen.

tfukumori commented 4 years ago

In conclusion, if the image is already resized to 416 x 416 like the one shown, I don't think it will be filled with even more gray.

The image size required by the YOLO 416 is 416 x 416 pixels. To make the input 416 x 416, filled it in with gray in the following code.

https://github.com/qqwweee/keras-yolo3/blob/master/yolo3/utils.py

def letterbox_image(image, size)` in /master/yolo3/utils.py

Translated with www.DeepL.com/Translator (free version)

Kot-Nak8 commented 4 years ago

Thanks to you, I see that there is no additional processing on either side. Thanks so much!