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

fixed bug in translate coords for detectImage func #70

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

Conversation

yangga
Copy link
Contributor

@yangga yangga commented Oct 26, 2024

There is a bug in detectImage function on iOS devices where the x coordinate is a bit weird. This PR is to fix that. And also remove unnecessary print.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improves object detection bounding box calculations for iOS devices in the YOLO Flutter app.

📊 Key Changes

  • Removed unnecessary print statements used for debugging.
  • Adjusted transformation calculations for bounding boxes on iPhones and iPads to improve precision.

🎯 Purpose & Impact

  • Cleaner Code: By removing print statements, the code is less cluttered and more efficient.
  • Enhanced Accuracy: Adjustments to bounding box transformations ensure better alignment on screens, enhancing object detection accuracy across different iOS devices. This leads to a more reliable user experience when using the app for detecting objects. 📱✅

@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working fixed Bug has been resolved labels Oct 26, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @yangga, thank you for submitting an ultralytics/yolo-flutter-app 🚀 pull request! This is an automated response, but an Ultralytics engineer will assist you soon. In the meantime, here are a few steps to help ensure your contribution is ready for review:

  • Define a Purpose: Clearly detail the goal of your bug fix in the PR description. Linking directly to any related issues would be beneficial. Your commit messages should be precise and adhere to the project's conventions.
  • Synchronize with Source: Double-check that your pull request aligns with the latest main branch of ultralytics/yolo-flutter-app. If it's outdated, update by clicking 'Update branch' or executing git pull and git merge main on your local repository.
  • Ensure CI Checks Pass: All our Continuous Integration (CI) checks should pass without issues. If any fail, please address these promptly.
  • Update Documentation: Make sure to adjust the documentation if your bug fix involves changes that impact the behavior or use of the software.
  • Add Tests: If possible, include or edit tests that cover your changes, ensuring that all tests pass successfully.
  • Sign the CLA: Confirm that you have signed our Contributor License Agreement if this is your first contribution. Write "I have read the CLA Document and I sign the CLA" in a new comment to complete this.
  • Provide an MRE: If not already included, provide a Minimum Reproducible Example to demonstrate the bug and how your changes address it. This helps expedite the review process. 🛠️

For more detailed guidance, our Contributing Guide is available as a resource. Feel free to ask questions by leaving a comment directly on this PR. Thanks again for contributing to Ultralytics and helping us make our projects better! 🎉

@glenn-jocher
Copy link
Member

@yangga thank you for the PR! Do you think we might need this change in https://github.com/ultralytics/yolo-ios-app as well?

@john-rocky FYI.

@yangga
Copy link
Contributor Author

yangga commented Oct 27, 2024

@yangga thank you for the PR! Do you think we might need this change in https://github.com/ultralytics/yolo-ios-app as well?

@john-rocky FYI.

@glenn-jocher No problem. I'm not sure that https://github.com/ultralytics/yolo-ios-app needs this change. (even I couldn't find the function such as detecting image). But if that repos has this change, it gonna be helpful for someone. Thanks.

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.

@glenn-jocher @yangga
The modified code works correctly in cases where the aspect ratio of the input image and the display image match, such as single image input.
However, in cases where the input camera image and the display size are different, such as real-time camera inference, the existing code works better. Therefore, I think the existing code is more suitable for Yolo-iOS-app, which performs real-time inference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Bug has been resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants