Bahramdun Adil
Bahramdun Adil

Reputation: 6079

What size of image is better to have for the TensorFlow Object Detection API?

I want to know when training my own image dataset by using a pre-trained model (e.g: ssd_mobilenet_v1_coco, ssd_inception_v2_coco, faster_rcnn_inception_v2_coco, ...) what image size is better to resize the images before starting creating TF record and training?

I am asking this because when I collecting images it has different size, some are very large (1920x1080, ...), but I don't know if it is good or not to resize the images.

And also does it depends or not on the model I want to choose? If does, then what is the better size for every model?

Thanks in advance!

Upvotes: 1

Views: 4998

Answers (1)

Adnan S
Adnan S

Reputation: 1882

Most (all?) of the models you reference are trained on 224 x 224 size images. For best performance, you will need to scale your images to that size. Unless you are detecting tiny objects, resizing larger size images to smaller size required for the models does not seem to impact performance.

If your desired objects are tiny and you are afraid of losing resolution, you can crop the original image into smaller sections for training and then re-assemble. This will be time consuming but can work. My repo on detecting PSV symbols on diagrams uses this technique: https://github.com/siddiqaa/psvcounter

Upvotes: 1

Related Questions