ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
138 stars 14 forks source link

Regarding image dataset rotation #853

Closed snowfluke closed 1 week ago

snowfluke commented 1 month ago

Search before asking

HUB Component

Datasets

Bug

Hi, I think I found a bug the way the web (HUB) render an image. In my computer, all the dataset images appear to be in the correct orientation, several images before has been rotated. Then I upload the images, but several images orientation comes back. To get a better understanding of the problem, here's the picture:

image

Environment

Minimal Reproducible Example

  1. Rotate an image in Windows 11 default picture preview app
  2. Save it as the same filename and overwrite it
  3. Upload the image as dataset to hub

Additional

No response

UltralyticsAssistant commented 1 month ago

👋 Hello @snowfluke, thank you for reporting an issue with the Ultralytics HUB 🚀!

Please check out our HUB Docs for more insights on various functionalities:

As you reported a 🐛 bug, could you please provide additional screenshots and steps to ensure the issue is clear? A minimum reproducible example will greatly assist us in diagnosing and resolving the problem.

Please note that this is an automated response, and an Ultralytics engineer will also review and assist you soon. Thank you for your understanding and patience! 😊

pderrenger commented 1 week ago

@snowfluke hello! 😊

Thank you for bringing this to our attention. It seems like the issue might be related to how image metadata, specifically EXIF orientation data, is being handled during the upload process. When images are rotated using certain applications, the rotation might be stored in the metadata rather than being applied directly to the image pixels. This can sometimes lead to discrepancies in how images are displayed across different platforms.

To help resolve this, you can try the following steps:

  1. Strip EXIF Data: Use an image editor to rotate the image and save it without EXIF data. This ensures that the rotation is applied directly to the image pixels.

  2. Re-upload the Image: After saving the image without EXIF data, try uploading it again to the Ultralytics HUB.

If the issue persists, please ensure that you are using the latest version of the Ultralytics HUB. If the problem continues, feel free to update this thread with any additional details, and we'll be happy to assist further.

Thank you for your patience and for using Ultralytics HUB! 🚀

yogendrasinghx commented 1 week ago

@snowfluke Thank you for reporting this issue and for your patience. As mentioned by @pderrenger, it appears the issue may be related to EXIF metadata affecting image orientation during upload. Please try rotating the image in an editor and saving it without EXIF data, then re-uploading it to the Ultralytics HUB.

If the issue persists after trying this, let us know, and we’ll investigate further. Thank you for helping us improve the platform!