ultralytics / yolo-flutter-app

A Flutter plugin for Ultralytics YOLO computer vision models
https://ultralytics.com
GNU Affero General Public License v3.0
107 stars 42 forks source link

Is it possible to remove the auto-scaling of the detectImage method and return the raw result directly to be processed by the user? #23

Closed x2031 closed 4 months ago

x2031 commented 6 months ago

Recognizing results by images should return the original results

pderrenger commented 6 months ago

Hello! Yes, you can modify the behavior of the detectImage method to skip auto-scaling and return the raw detection results. You'll need to adjust the image preprocessing steps in the method to bypass scaling and maintain the original image dimensions.

Here's a basic example of how you might adjust the code:

def detectImage(image):
    # Your code to handle the image without scaling
    results = model(image)
    return results

Make sure to handle the image appropriately to fit your model's input requirements. If you have further questions or need more specific guidance, feel free to ask. Happy coding! 😊

x2031 commented 6 months ago

你好!是的,您可以修改该方法的行为以跳过自动缩放并返回原始检测结果。您需要调整方法中的图像预处理步骤,以绕过缩放并保持原始图像尺寸。detectImage

下面是一个基本示例,说明如何调整代码:

def detectImage(image):
    # Your code to handle the image without scaling
    results = model(image)
    return results

确保适当地处理图像以满足模型的输入要求。如果您还有其他问题或需要更具体的指导,请随时提问。祝您编码愉快!😊

Yes, I have implemented and tested if it is possible to submit a pull

pderrenger commented 6 months ago

Hello! Great to hear that you've implemented and tested the changes successfully! 😊 If you're considering submitting a pull request, please ensure your changes are well-documented and tested across different scenarios. Once ready, you can submit a pull request on GitHub, and we'll review it accordingly. Thanks for contributing to the project!

github-actions[bot] commented 5 months ago

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐