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

Dimension Mismatch regarding Image_size #79

Open
MOOnLyer opened this issue Sep 8, 2022 · 1 comment
Open

Dimension Mismatch regarding Image_size #79

MOOnLyer opened this issue Sep 8, 2022 · 1 comment

Comments

@MOOnLyer
Copy link

MOOnLyer commented Sep 8, 2022

I am using the latest version of torchvision. And I find the function transform_center_crop and transform_random_resized_crop are not working as expected (i.e., wrong output size or Input and output sizes should be greater than 0 error).

After a little digging, it seems that the problem is related to the issue #45 #44. The fix #46 back then, size <- get_image_size(img) image_width <- size[2] image_height <- size[1] is corresponding to an earlier version of get_image_size (without rev), where it has been changed in commit. In this case, I would recommend a simple fix - fallback wrt fix #46 in commit to comply with function get_image_size.magick-image (i.e., 1 - width, 2 - height).

rdinnager added a commit to rdinnager/torchvision that referenced this issue Sep 27, 2023
…spect change in get_image_size) for get_random_resized_crop_params() and transform_centre_crop.default()
@cregouby
Copy link
Contributor

Hello @MOOnLyer,

Could you create a pull-request here from your patch ?

Thanks !

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

2 participants