Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Center crop preprocessing is different from original #126

Open
DavideStenner opened this issue Jul 28, 2020 · 0 comments
Open

Center crop preprocessing is different from original #126

DavideStenner opened this issue Jul 28, 2020 · 0 comments

Comments

@DavideStenner
Copy link

Hi i was looking at your center_crop_and_resize preprocessing function and i found that is different from original for 1 parameter.
In your function you set to preserve the range of values when you call resize function from:

image_crop = image[
             offset_height: padded_center_crop_size + offset_height,
             offset_width: padded_center_crop_size + offset_width,
             ]
resized_image = resize(
    image_crop,
    (image_size, image_size),
    order=MAP_INTERPOLATION_TO_ORDER[interpolation],
    preserve_range=True,
)

By looking at original code:

https://github.com/tensorflow/tpu/blob/d35e48588cfdab24aaddd045e37d0e967166931f/models/official/efficientnet/preprocessing.py#L118-L135

there isn't any preserve_range parameter.

If you set preserve_range = False you obtain same results as original code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant