ultralytics / ultralytics

NEW - YOLOv8 πŸš€ in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
23.76k stars 4.74k forks source link

Fix single-image dataset failure mode #11694

Closed PacificDou closed 1 week ago

PacificDou commented 1 week ago

Bugfix for https://github.com/ultralytics/ultralytics/issues/11693

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements in RTDETR functionality and data buffering for improved training and prediction.

πŸ“Š Key Changes

🎯 Purpose & Impact

These changes aim to streamline development workflows and improve the system's reliability for users, potentially contributing to better model performance and user satisfaction.

PacificDou commented 1 week ago

I have read the CLA Document and I sign the CLA

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.76%. Comparing base (b6415e4) to head (900f7a9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #11694 +/- ## ========================================== - Coverage 70.65% 68.76% -1.90% ========================================== Files 122 122 Lines 15591 15591 ========================================== - Hits 11016 10721 -295 - Misses 4575 4870 +295 ``` | [Flag](https://app.codecov.io/gh/ultralytics/ultralytics/pull/11694/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | Coverage Ξ” | | |---|---|---| | [Benchmarks](https://app.codecov.io/gh/ultralytics/ultralytics/pull/11694/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `?` | | | [GPU](https://app.codecov.io/gh/ultralytics/ultralytics/pull/11694/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `37.38% <0.00%> (ΓΈ)` | | | [Tests](https://app.codecov.io/gh/ultralytics/ultralytics/pull/11694/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `66.73% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

glenn-jocher commented 1 week ago

@PacificDou thanks for the PR! I see you are right, this throws an error as COCO8 has only 4 train images:

yolo train data=coco8.yaml fraction=0.25
glenn-jocher commented 1 week ago

@PacificDou ok I've tested your fix (it works!), simplified it a bit and added a test for this failure mode. Running CI now and will merge after.

PacificDou commented 1 week ago

@glenn-jocher Wonderful! Thanks a lot for the prompt reply!

glenn-jocher commented 1 week ago

@PacificDou PR merged! Thank you for your contributions :)