Skip to content

How to set landscape detection on iOS #95

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

Closed
menghengmen opened this issue Feb 24, 2025 · 3 comments · Fixed by #233
Closed

How to set landscape detection on iOS #95

menghengmen opened this issue Feb 24, 2025 · 3 comments · Fixed by #233
Labels
fixed Bug has been resolved TODO High priority items

Comments

@menghengmen
Copy link

No description provided.

@pderrenger
Copy link
Member

@menghengmen for iOS orientation handling, you'll need to implement landscape detection in your application's image preprocessing pipeline before passing frames to YOLO. Ultralytics YOLO models process input images as provided without inherent orientation awareness.

Ensure your iOS application:

  1. Uses native iOS image handling (UIImage/Vision frameworks) to detect device orientation
  2. Rotates input images to your desired orientation using Core Graphics transforms
  3. Maintains aspect ratio and proper scaling for model input

For implementation details, see Apple's UIImage orientation documentation and the Vision framework image handling guide.

If you're using YOLO commercially on iOS, please ensure compliance with our Ultralytics Licensing requirements.

@john-rocky john-rocky added the TODO High priority items label May 31, 2025
@john-rocky
Copy link
Collaborator

@menghengmen Thank you for your feedback!
Currently the package only works in portrait orientation, landscape is in the works.

@john-rocky john-rocky reopened this May 31, 2025
@asabri97 asabri97 linked a pull request Jun 10, 2025 that will close this issue
@UltralyticsAssistant UltralyticsAssistant added the fixed Bug has been resolved label Jun 10, 2025
@UltralyticsAssistant
Copy link
Member

A potential fix for this issue has been merged in PR #233, which introduces several key improvements to the Ultralytics YOLO Flutter app. This update adds full landscape mode support, enhances detection accuracy with more robust bounding box calculations, and improves camera controls for a smoother, more flexible user experience. UI elements now adapt better to both portrait and landscape orientations, and overall app performance and stability have been refined. The PR also brings updated documentation for easier integration and development.

Special thanks to the author and contributors for their valuable work on this enhancement!

To test if these changes resolve the issue, please update your local version of the app or install directly from the main branch using:

pip install git+https://github.com/ultralytics/yolo-flutter-app.git@main

Alternatively, you may wait for the next official release if you prefer.

Feedback on whether this resolves the issue would be greatly appreciated. Thanks again for reporting the issue, and feel free to share any further feedback if you encounter any related problems!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Bug has been resolved TODO High priority items
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants