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

How to get the detection result from this model #556

Closed
1 task done
MarcoHuixxx opened this issue Feb 3, 2024 · 7 comments
Closed
1 task done

How to get the detection result from this model #556

MarcoHuixxx opened this issue Feb 3, 2024 · 7 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@MarcoHuixxx
Copy link

Search before asking

Question

The first pic is the model properties, there should be one float32 output. However, after executing model.runSync([data]). The output is the second pic. I have no idea about how to get the detection result from this model.
螢幕截圖 2024-01-30 下午9 22 41
螢幕截圖 2024-01-30 下午9 22 52

Additional

No response

@MarcoHuixxx MarcoHuixxx added the question Further information is requested label Feb 3, 2024
Copy link

github-actions bot commented Feb 3, 2024

👋 Hello @MarcoHuixxx, thank you for raising an issue about Ultralytics HUB 🚀! Please visit our HUB Docs to learn more:

  • Quickstart. Start training and deploying YOLO models with HUB in seconds.
  • Datasets: Preparing and Uploading. Learn how to prepare and upload your datasets to HUB in YOLO format.
  • Projects: Creating and Managing. Group your models into projects for improved organization.
  • Models: Training and Exporting. Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
  • Integrations. Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
  • Ultralytics HUB App. Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
    • iOS. Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
    • Android. Explore TFLite acceleration on mobile devices.
  • Inference API. Understand how to use the Inference API for running your trained models in the cloud to generate predictions.

If this is a 🐛 Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix.

If this is a ❓ Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response.

We try to respond to all issues as promptly as possible. Thank you for your patience!

@MarcoHuixxx MarcoHuixxx changed the title ow to get the detection result from this model How to get the detection result from this model Feb 3, 2024
@MarcoHuixxx
Copy link
Author

anyone can help me!!!

@MarcoHuixxx
Copy link
Author

please

@UltralyticsAssistant
Copy link
Member

@MarcoHuixxx hello! It looks like you're trying to interpret the output from the model after running model.runSync([data]). The output you're seeing is likely a tensor or an array of values that represent detection results.

To extract meaningful detection information from this output, you typically need to post-process the data. This involves applying certain thresholds to filter out low-confidence detections, and then decoding the tensor to retrieve the bounding box coordinates, class IDs, and confidence scores for each detection.

The exact post-processing steps can vary depending on the model's output format. Generally, you would:

  1. Apply a confidence threshold to discard detections with low confidence.
  2. Apply non-maximum suppression (NMS) to remove overlapping bounding boxes.
  3. Decode the remaining detections into a human-readable format (e.g., bounding box coordinates and class labels).

Please refer to the Ultralytics HUB Docs for guidance on post-processing the model's output. The documentation should provide you with the necessary steps and explanations on how to handle the output tensor to get the detection results you're looking for.

If you're still having trouble, feel free to provide more details about the output you're getting, and I'll do my best to assist you further. 😊

@MarcoHuixxx
Copy link
Author

MarcoHuixxx commented Feb 4, 2024

The output format of a sample tensorflowlite model from the Tensorflow official doc is
螢幕截圖 2024-02-04 下午2 20 05. There are 4 separate independent array and it will be easier to extract the results. But the output of the tensorflowlite model generated by ultralytics has only one array. May I know the differences between the coco model and model from ultralytics? Also, I cannot find any doc about post-processing the model's output in Ultralytics HUB Docs. Please attach it, thanks!

@UltralyticsAssistant
Copy link
Member

@MarcoHuixxx the output format you're describing from the TensorFlow Lite model is indeed different from the Ultralytics model output. TensorFlow Lite models often provide separate arrays for boxes, classes, scores, and number of detections, which can be directly interpreted.

In contrast, Ultralytics models typically output a single tensor that contains all the detection information. This single tensor needs to be post-processed to separate out the bounding box coordinates, class IDs, and confidence scores.

The differences in output format are due to the way each model architecture is designed and how the outputs are structured. Ultralytics models are optimized for performance and may use a different output encoding to maximize speed and efficiency.

Regarding the documentation for post-processing the model's output, I apologize for any confusion. The Ultralytics HUB Docs should contain a section on how to interpret and handle the model outputs, including post-processing steps. If you're unable to find the relevant information, it's possible that the documentation may need to be updated to include these details.

As I'm unable to provide direct links or attachments here, I recommend checking the Ultralytics HUB Docs again for any updates or additional information that may have been added. If the information is still missing, please consider opening an issue on the GitHub repository to request detailed documentation on post-processing the outputs of Ultralytics models. The team values user feedback and strives to improve the documentation to better assist users like you. 😊

Copy link

github-actions bot commented Mar 6, 2024

👋 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 ⭐

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Mar 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants