rodrigo2019 / keras_yolo2

MIT License
46 stars 15 forks source link

How to change grid dimensions ? #7

Closed sinhatushar closed 5 years ago

sinhatushar commented 5 years ago

Original YOLO9000 implementation divides the 416x416 image into 13x13 square grids where each square grid is of size 32x32 (416/13 = 32). I want to divide the image into 208x1 grids such that each grid size is 2x416(rectangular shaped grid).

What all changes do I need to make in the network and at other places in the implementation? Is changing GRID_H to 208 and GRID_W to 1 all that I need to do ?

rodrigo2019 commented 5 years ago

You need change the maxpooling layers inside your backend model

sinhatushar commented 5 years ago

image

If I change GRID_H and GRID_W to 208 and 1 respectively as shown in Yolo Step-by-Step.ipynb notebook, won't it work ? If not, can you please tell me which all maxpoollayers I have to change and to exactly what dimensions if I want to have grid sizes as described above? P.S. I am a beginner and hence my doubts may look like simple ones but please help me out.

rodrigo2019 commented 5 years ago

If I change GRID_H and GRID_W to 208 and 1 respectively as shown in Yolo Step-by-Step.ipynb notebook, won't it work ? No. If not, can you please tell me which all maxpoollayers I have to change and to exactly what dimensions if I want to have grid sizes as described above? Which network as backend are you using? E.g: if you are using Full Yolo as backend, go to the backend model e start to change the kernel size for each maxpooling, you will start to see differents types of grid, you also can exclude the maxpool layers, basically, for each maxpool layer excluded, your grid will be twice bigger

sinhatushar commented 5 years ago

Which network as backend are you using? Full Yolo.

Is it easier to change grid dimensions in any other backend configuration ?

I'm sorry I couldn't find anything named "e start". It appears to me that I will have to change all the maxpool layers in the network. Although I don't understand what will be the change in dimensions of maxpool layers for GRID_H = 208 and GRID_W = 1. Can you help if it doesn't require a deep dive from you end ?