DataAugmentationForObjectDetection icon indicating copy to clipboard operation
DataAugmentationForObjectDetection copied to clipboard

Difference between resizing and scaling?

Open ogencoglu opened this issue 7 years ago • 2 comments

What is the difference between resizing and scaling? Seems like scaling is just a special case of resizing.

ogencoglu avatar Sep 26 '18 11:09 ogencoglu

Scaling scales the image while keeping the dimensions constant. If you were to scale a image 2x, you will see a zooming effect with some part of the image expelled from the frame. Now I think I should rename it to zooming. The dimensions don't change.

Resize is a case where the actual dimensions of the image change say (1920 x 720) -> (416,416)

ayooshkathuria avatar Sep 27 '18 06:09 ayooshkathuria

It looks like the Resize function doesn't allow you to change the aspect ratio though:

https://github.com/Paperspace/DataAugmentationForObjectDetection/blame/master/data_aug/data_aug.py#L675

It looks like it takes a tuple of integers but letterbox_image is expecting a single integer (despite the docstring to the contrary):

https://github.com/Paperspace/DataAugmentationForObjectDetection/blob/master/data_aug/bbox_util.py#L289

davidlmorton avatar Oct 16 '18 14:10 davidlmorton