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

feat: implement switch camera functionality #90

Merged
merged 5 commits into from
Jan 31, 2025
Merged

Conversation

asabri97
Copy link
Contributor

@asabri97 asabri97 commented Jan 25, 2025

Closes

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

This PR introduces multiple fixes, enhancements, and refactors across the YOLO Flutter app, improving the camera, object detection, and overall app functionality for mobile platforms. 📱

📊 Key Changes

  • Camera Handling:
    • Improved camera switching logic and preview stabilization on both iOS and Android. 🎥
    • Added handling for front and back camera orientations, including mirroring for front cameras.
  • Object Detection:
    • Enhanced bounding box alignment and transformations for more accurate predictions. 📏
    • Simplified transformation matrix logic in TFLite-based object detection module.
  • iOS-specific Updates:
    • Updated AppDelegate to use @main for better compatibility. 🍎
    • Improved iOS camera preview lifecycle and streamlined plugin registration.
  • Flutter Configurations:
    • Added .vscode/settings.json for development consistency. ⚙️
    • Updated dependencies (e.g., permission_handler, leak_tracker) to newer versions ensuring compatibility. 🔄

🎯 Purpose & Impact

  • Purpose: Streamline the app's object detection features while ensuring smoother camera usability and developer collaboration.
  • Impact:
    • Enhanced user experience with better camera preview and detection accuracy.
    • For developers, the improved configurations and debugging tools simplify the development process. 🛠️

@asabri97
Copy link
Contributor Author

I have read the CLA Document and I sign the CLA

@asabri97 asabri97 requested a review from john-rocky January 25, 2025 21:36
@UltralyticsAssistant UltralyticsAssistant added dependencies Dependencies and packages detect Object Detection issues, PR's enhancement New feature or request labels Jan 25, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @asabri97, thank you for submitting a yolo-flutter-app 🚀 PR! To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your feature or fix in your PR description. It’s great to see you've included detailed summaries and linked to any relevant issues! Please verify that your commit messages are clear and concise, adhering to the project’s conventions.
  • Synchronize with Source: Confirm your PR is up-to-date with the main branch of ultralytics/yolo-flutter-app. If it's behind, use the 'Update branch' button or run git pull and git merge main locally to resolve conflicts.
  • Ensure CI Checks Pass: Please check that all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, make the necessary adjustments to ensure your changes are error-free.
  • Update Documentation: For any new or modified features, ensure relevant sections are updated in the documentation.
  • Add Tests: If applicable, include or modify existing tests to reflect your changes. Don’t forget to confirm that all tests pass before submission.
  • Sign the CLA: If this is your first contribution to Ultralytics, make sure to sign our Contributor License Agreement (CLA). You can do so by adding "I have read the CLA Document and I sign the CLA" as a new message.
  • Minimize Changes: Reduce your edits to only what's necessary to implement your feature or fix. "Simplify, then add lightness" - Colin Chapman

For more information, please refer to our Contributing Guide. If you have any questions or need further clarification, please don’t hesitate to leave a comment on this PR.

This is an automated response, but an Ultralytics engineer will review your PR soon and provide additional feedback. Thank you for contributing to Ultralytics! 🌟

@asabri97 asabri97 self-assigned this Jan 25, 2025
Copy link
Collaborator

@john-rocky john-rocky left a comment

Choose a reason for hiding this comment

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

@asabri97
By deleting one line from ObjectDetector.swift for ios, it will work correctly on ios.
On android, the box is misaligned when using the front camera, so you will need to modify the native code.

ios/Classes/ObjectDetector.swift Outdated Show resolved Hide resolved
@asabri97 asabri97 requested a review from john-rocky January 29, 2025 02:06
@john-rocky john-rocky merged commit ae59675 into main Jan 31, 2025
5 checks passed
@john-rocky john-rocky deleted the feat/switch-camera branch January 31, 2025 11:59
@UltralyticsAssistant
Copy link
Member

🌟 What a phenomenal PR! 🌟

Thank you, @asabri97 and @john-rocky, for your incredible teamwork on this game-changing update to the YOLO Flutter app! From seamless camera handling to more precise object detection and improved development tools, your contributions shine throughout. 📱✨

As Henry Ford once said, "Coming together is a beginning, staying together is progress, and working together is success." Your hard work exemplifies this spirit and takes the app to new heights, enhancing both user experience and developer collaboration. 🚀

We’re so grateful for your dedication and expertise—this project wouldn’t be the same without you. Keep up the amazing work! 💪👊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependencies and packages detect Object Detection issues, PR's enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants