edgeai-benchmark icon indicating copy to clipboard operation
edgeai-benchmark copied to clipboard

Example YAML Files - Crop & Resize Parameters

Open IsidoraR opened this issue 3 years ago • 3 comments

Hello,

In the example YAML files (https://github.com/TexasInstruments/edgeai-benchmark/tree/master/examples/configs/yaml), it says the value for the crop size parameter is "used to crop the resized input". This implies that the input image is first resized and then cropped. Is there a parameter that can be set so that the input image is first cropped and then resized?

Also, is the crop size value always used to crop around the center of the image? Is there a way to set the x and y coordinates for an off-center region of the image that should be cropped?

IsidoraR avatar Apr 07 '22 21:04 IsidoraR

Hi, Currently there is no way to do what you are looking for - to do crop first and then resize, to do an arbitrary crop. But hopefully it is not too difficult to modify the source code to add features that you are looking for.

mathmanu avatar Apr 22 '22 07:04 mathmanu

Hi, If I want to only resize (not crop) the images, should I just remove the crop parameter from the YAML file? If I do not want to resize or crop the images, should I just remove both the resize & crop parameters from the YAML file?

IsidoraR avatar Apr 22 '22 13:04 IsidoraR

The best way is to modify the code to achieve what you with to have. For example if you set crop to None, skip the cropping. I don't think we do that check today - but can be easily added if you modify the code I think. Let me know if you face any difficultly.

mathmanu avatar May 04 '22 06:05 mathmanu