1

I am preprocessing ImageNet data so all the data is the same shape, (256, 256, 3). My idea was to crop the data to (256, 256). However, I am running into issues because the images are of variable size and some are smaller than 256 in width/height, or both. Some example dimensions include (194, 150, 3) and (200, 300, 3). Do I just resize all the images to (256, 256)? This would potentially throw off aspect ratio and cause distortions. How do I best approach this? Any examples of this in tensorflow would also be helpful.

Jane Sully
  • 3,137
  • 10
  • 48
  • 87

1 Answers1

0

Padding then cropping is probably the good solution.

Ricocotam
  • 41
  • 7