ultralytics / yolo-flutter-app

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

Unable to get prediction results. #1

Closed smfaizanahmed closed 2 months ago

smfaizanahmed commented 3 months ago

objectDetector.detect(imagePath: imagePath)

I am using this function to detect objects using Yolov8. The function returns Future<List<DetectedObject?>?>. The documentation does not provide how this will be used to take detections and render boxes. Please guide how can we use this output?

I want to know if there are widget functions that will directly preview the results on screen like Flutter_pytorch uses renderBoxes function. And how can we get those labels and boxes to save them in txt or display the results in dialogue boxes.

sergiossm commented 3 months ago

Hey @smfaizanahmed thanks for reaching out!

We're still working on the documentation and planning on making it as extensive as possible.

For your specific use case, if you look at the detect_view.dart file in the example app, you'll see how to draw the results of the detection for a static image in line 66.

else if (detectionList is List<DetectedObject>)
  CustomPaint(
    painter: ObjectDetectorPainter(
      detectionList,
    ),
  ),

Hope this helps!

github-actions[bot] commented 2 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 ⭐