rodrigo2019 / keras_yolo2

MIT License
46 stars 15 forks source link

Small grid sizes #18

Closed UCRajkumar closed 4 years ago

UCRajkumar commented 4 years ago

I have an image of 512x512 and there are many small objects to predict inside the image. There are usually 550-100 objects per image and their scattered through the image. Hence, if they're clustered in some areas, lots of them are missed. What should I do? Is this because of the grid size?

I tried making the grid size 8x8, but that made it worse...

index

rodrigo2019 commented 4 years ago

you should change de backend structure, with less max poolings layers

UCRajkumar commented 4 years ago

Where exactly is the backend structure? You mean when I initialize the model? Won't that interfere with importing pre-trained weights?

stephandooper commented 4 years ago

The backend model is the model that is used to extract features, and is located in the keras_yolov2 folder under backend.py. The default is that it uses the Fullyolo model, and there are several others in that file as well. You should be able to change backends quite easily using the config.json file.

The only backend that probably does not work is the ResNet-50 backend since I believe there is something wrong with it if you are using newer versions of keras.

In general though, you should aim to use a model with a very large grid size for small objects. That means you need a network with few downsample operations so that the grid size becomes larger, as already mentioned by rodrigo.

rodrigo2019 commented 4 years ago

@stephandooper thank you. @stephandooper is right and sorry for late response, I didn't see your post