Closed EmmanuelMess closed 3 weeks ago
π Hello @EmmanuelMess, thank you for your interest in Ultralytics π! We appreciate your detailed report and enthusiasm for using YOLO models. It looks like you're encountering issues while benchmarking your customized YOLOv6 model. Let's work together to address this!
We recommend starting with the following steps:
Ensure you're using the latest version of ultralytics
since updates often resolve existing issues. Upgrade with:
pip install -U ultralytics
Verify that all dependencies have been correctly installed and meet the compatibility requirements. The full list of dependencies is available in our pyproject.toml.
If possible, try running your setup in a verified environment to isolate the issue. YOLO runs seamlessly in the following environments:
If this issue is a π Bug, it would be extremely helpful if you could provide a minimum reproducible example to help us debug it more effectively. You've already shared many details (thank you!) but please confirm if these are sufficient to reproduce the error as-is.
If this is a training or benchmarking-related β Question, consider reviewing our Training Tips or join the community for further assistance.
Meanwhile, feel free to join the Ultralytics community where you can engage with other users while awaiting an engineer's input:
This badge indicates the status of our Continuous Integration (CI) tests. A green badge ensures all tests are passing for verified operations across platforms.
An Ultralytics engineer will review this issue and assist you shortly. Thank you for your patience! π
You should load the best.pt or last.pt after training.
You should load the best.pt or last.pt after training.
I did, and I get a lot of NaN results, even if the exports work. I mention it in the issue.
If export succeeds and val fails, that's when you would see NaN and β. As opposed to β which indicates export failed.
You should check the logs for errors.
Thanks for raising this issue! A potential fix has been merged through PR #18894 by @Y-T-G with contributions from @glenn-jocher. π
This PR focuses on improving model file handling to enhance clarity and flexibility during benchmarking. The changes include:
model.pt_path
, falls back to model.ckpt_path
, and finally uses model.model_name
if needed. model.model_name
instead of solely relying on ckpt_path
, making the information more intuitive and useful.To test whether the changes in this PR resolve the issue, you can:
main
branch with:
pip install git+https://github.com/ultralytics/ultralytics.git@main
Please give the updates a try and share feedback on whether they address the issue for you. Your input is invaluable in ensuring the fix works as intended.
Thanks again for reporting the issue and helping us improve! π If the issue persists, don't hesitate to let us know, and we'll continue investigating. π
If export succeeds and val fails, that's when you would see NaN and β. As opposed to β which indicates export failed.
You should check the logs for errors.
Thanks! I was wondering what that meant. Will post the logs to another issue.
Opened #18904
Thank you for opening #18904! We'll review it and get back to you with updates or further assistance.
Search before asking
Ultralytics YOLO Component
Other
Bug
I have this model:
That I train with this code:
But running the benchmark crashes with:
Running with:
Mostly returns NaN even though I can actually export to Tensorflow Lite and NCNN (and probably others):
Environment
Minimal Reproducible Example
dataset:
model:
code:
Additional
Exporting works just fine.
Are you willing to submit a PR?