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

Fix to handle orientation Exif data in vertical images, improving alignment #961

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix to handle orientation Exif data in vertical images, improving alignment #961

wants to merge 2 commits into from

Conversation

gavinwtaylor
Copy link

The current use of scipy.misc for image reading/writing/resizing in the
implementation of mtcnn will be deprecated with the new version of scipy. In
addition, (and most motivating for me), the scipy.misc imread function ignores
the image's Orientation Exif flag, meaning vertical images can be read in
rotated, greatly decreasing alignment performance.

This branch converts all scipy.misc functions in align_dataset_mtcnn.py to the
appropriate and suggested equivalents in the imageio package. This introduces
a new project dependency on imageio, but the orientation data is now
considered and handled appropriately.

implementation of mtcnn will be deprecated with the new version of scipy.  In
addition, (and most motivating for me), the scipy.misc imread function ignores
the image's Orientation Exif flag, meaning vertical images can be read in
rotated, greating decreasing performance.

This branch converts all scipy.misc functions in align_dataset_mtcnn.py to the
appropriate and suggested equivalents in the imageio package.  This introduces
a new project dependency on imageio, but the orientation data is now
considered and handled appropriately.
@gavinwtaylor
Copy link
Author

I'll note these changes should probably also be made everywhere else scipy.misc is used to keep behavior consistent.

@gauravzende
Copy link

@gavinwtaylor please
can you share me your code and procedure to run it?

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