experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 784 forks source link

Who can tell me how to change the input shape of YOLO #313

Open gwspotex opened 6 years ago

gwspotex commented 6 years ago

Who can tell me how to change the input shape of YOLO (because the input is grayscale), I don't want to waste time stacking single channels into three channels, so I change the code in the following places

input_image = Input(shape=(self.input_size, self.input_size, 3->1)) image

input_image = Input(shape=(input_size, input_size, 3->1)) image

after change have error image

but i try grayscale input is OK
image

rodrigo2019 commented 6 years ago

take a look in my fork , you can set the grayscale mode in config.json, also you can use a different size for width and height

gwspotex commented 6 years ago

image

sorry i can't find where is grayscale mode ?

rodrigo2019 commented 6 years ago

here. It is missing in readme.md, I will fix it