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

Changing conf parameter Inference API code has no effect on results #906

Open
1 task done
curtinmjc opened this issue Oct 29, 2024 · 3 comments
Open
1 task done
Labels
bug Something isn't working classify Image Classification issues, PR's HUB Ultralytics HUB issues

Comments

@curtinmjc
Copy link

Search before asking

  • I have searched the HUB issues and found no similar bug report.

HUB Component

Inference

Bug

I am opening this GitHub Issue (Bug) at the suggestion of pderrenger in Issue (Question) #893. The issue being raised here was raised in Issue #893 about 4 days ago. The example of the issue concerns classification model inference results that are the same for both "conf": 0.25 and 0.90. The model used in this test is YOLO11n Classify (cm_v11n_100epoch-640imgsz_20241027LatlPhoto); it is using the Ultralytics HUB.

I am attaching two screenshots: Python code w/ conf=0.25.png and Python code w/ conf=0.90.png. Both show the same results being returned with the response in both cases having confidence = 0.61369.

Python code w: conf=0 25 Python code w: conf=0 90

Environment

  • Computer: MacBook Pro (2023)
  • OS: 15.0.1
  • Browser: Firefox 131.0.3

Minimal Reproducible Example

Example is shown in above screenshots.

Additional

No response

@curtinmjc curtinmjc added the bug Something isn't working label Oct 29, 2024
@UltralyticsAssistant UltralyticsAssistant added classify Image Classification issues, PR's HUB Ultralytics HUB issues labels Oct 29, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @curtinmjc, thank you for bringing this issue to our attention regarding the Ultralytics HUB Inference API 🚀! We're here to help ensure everything runs smoothly. Our HUB documentation offers comprehensive guides and insights, which you might find useful:

  • Quickstart: Get started quickly with training and deploying YOLO models.
  • Inference API: Delve into the specifics of using the Inference API for running your trained models and generating predictions.

Based on your description, it sounds like you've encountered a potential 🐛 bug. To assist our engineering team further, could you please ensure that your bug report includes a detailed minimum reproducible example? This helps us replicate the issue on our side.

For debugging purposes, confirming the following would be beneficial:

  1. Double-check the API request structure and ensure it adheres to the expected format.
  2. Provide any relevant logs or additional error messages.

Rest assured, an Ultralytics engineer will review your issue soon to assist you further. Thank you for your patience and for helping us improve the Ultralytics HUB! 😊

@pderrenger
Copy link
Member

@curtinmjc hello!

Thank you for bringing this to our attention. It seems like you're experiencing an issue where changing the conf parameter in the Inference API doesn't affect the results as expected. This could be due to a few reasons, and I'd be happy to help troubleshoot this with you.

First, please ensure that you are using the latest version of the Ultralytics HUB and related packages, as updates may have addressed this issue. If the problem persists, it might be related to how the confidence threshold is applied in the classification model. Unlike detection models, classification models typically output a single prediction with the highest confidence, which might not be filtered by the confidence threshold in the same way.

To further investigate, you might want to try using a detection model to see if the conf parameter behaves as expected. This could help determine if the issue is specific to classification models.

If you continue to experience this issue, please feel free to provide more details or any additional observations. Your feedback is invaluable in helping us improve our tools. 😊

Thank you for your patience and for being a part of the YOLO community!

@yogendrasinghx
Copy link
Member

@curtinmjc Thank you for raising this issue. I have confirmed that this is a valid issue with the classification model in the Shared Inference API. I have reported this to the development team, and they are currently working on a fix. I will update you as soon as it is resolved. Thank you for your patience and for helping us improve the Ultralytics HUB!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working classify Image Classification issues, PR's HUB Ultralytics HUB issues
Projects
None yet
Development

No branches or pull requests

4 participants