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

Keep EXIF rotation during YOLO importing #27

Merged
merged 11 commits into from
Sep 14, 2023
Merged

Conversation

sizov-kirill
Copy link

@sizov-kirill sizov-kirill commented Sep 13, 2023

Summary

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2022 CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT

@sizov-kirill
Copy link
Author

sizov-kirill commented Sep 13, 2023

@zhiltsov-max Please review this PR. The main changes are in util/image.py and plugins/yolo_format/extractor.py. Anything else was made just to make this PR green

@@ -156,14 +162,23 @@ def name_from_path(cls, path: str) -> str:

return osp.splitext(path)[0]

@classmethod
def _image_loader(cls, *args, **kwargs):
return load_image(*args, **kwargs, keep_exif=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that this change is local for yolo, but at the same time other formats are probably suffering from this as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would suggest merging this hotfix first, and then implement a more universal solution

@sizov-kirill
Copy link
Author

@zhiltsov-max I've added test

@zhiltsov-max zhiltsov-max merged commit 8a14a99 into develop Sep 14, 2023
30 checks passed
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