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

Use the labelme sizes instead of recomputing them #9

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

Dexterp37
Copy link

In case of annotated images that have EXIF orientation, labelme would annotate the transformed image and provide the annotation coordinates in the re-oriented image. When computing the image sizes with Image.open, we ignore the EXIF orientation and thus save a different image dimension than the one in the labelme file (we swap the dimensions). Since we only use PIL to compute the image sizes and the labelme file provides these dimensions anyway, maybe we can just get away with using them.

In case of annotated images that have EXIF orientation,  labelme would annotate the transformed image and provide the annotation coordinates in the re-oriented image.
When computing the image sizes with `Image.open`, we ignore the EXIF orientation and thus save a different image dimension than the one in the labelme file (we swap the dimensions).
Since we only use PIL to compute the image sizes and the labelme file provides these dimensions anyway, maybe we can just get away with using them.
@Dexterp37
Copy link
Author

@fcakyon hi! Thoughts on this PR?

@Dexterp37
Copy link
Author

@fcakyon the test failures also seem to happen on the unchanged repository and are unlikely to come from this PR :'(

@fcakyon
Copy link
Owner

fcakyon commented Dec 28, 2022

@Dexterp37 currently tests are not correct so we cannot understand if your changes affect the results.

I will just merge it, thank you for your contributions!

@fcakyon fcakyon merged commit 8b37ca5 into fcakyon:master Dec 28, 2022
@Dexterp37 Dexterp37 deleted the patch-1 branch December 28, 2022 11:46
@Dexterp37
Copy link
Author

@Dexterp37 currently tests are not correct so we cannot understand if your changes affect the results.

I will just merge it, thank you for your contributions!

Thank you for the great tool!

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

Successfully merging this pull request may close these issues.

2 participants