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 set the confidence threshold(Conf) for YOLO Paddle inference model? #70016

Open
cddddd6 opened this issue Dec 6, 2024 · 1 comment
Open
Assignees
Labels

Comments

@cddddd6
Copy link

cddddd6 commented Dec 6, 2024

请提出你的问题 Please ask your question

Hello:
I have exported my YOLO detect model to Paddle inference model. The YOLO detect model did not give the wrong box because the confidence threshold was set to be conf=0.45. while the Paddle inference model gave the wrong box. If I lower the confidence threshold for YOLO detect model to conf=0.30, it will give the exact same wrong box as Paddle inference model. I am wondering how to set the conf for paddle model when making inference, since it is not written in any Docs. Thank you and have a good day!

Export and infer code:

from ultralytics import YOLO

Load the YOLO11 model

model = YOLO("yolo11n.pt")

Export the model to PaddlePaddle format

model.export(format="paddle") # creates '/yolo11n_paddle_model'

Load the exported PaddlePaddle model

paddle_model = YOLO("./yolo11n_paddle_model")

Run inference

results = paddle_model("https://ultralytics.com/images/bus.jpg")

@zhink
Copy link
Contributor

zhink commented Dec 10, 2024

Can you give more paddle code? We can't see how it is reasoned. Maybe refer to cfg.valid_thresh or cfg.nms_thresh in test/dygraph_to_static/yolov3.py to get some ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants