pypi ultralytics 8.4.134
v8.4.134 - Reduce TaskAlignedAssigner OOM recovery cost (#25990)

2 hours ago

🌟 Summary

v8.4.134 makes crowded-object training more resilient to GPU memory limits and increases the default hyperparameter search budget from 10 to 300 trials. πŸš€

πŸ“Š Key Changes

  • Faster TaskAlignedAssigner OOM recovery 🧠

    • When GPU memory runs out during target assignment, Ultralytics now retries the work one image at a time on the GPU instead of moving the entire operation to the CPU.
    • The model’s forward-pass batch size remains unchanged.
    • A warning is shown only once per training run and reports the assignment dimensions.
  • Lower memory usage during target assignment πŸ’Ύ

    • Removes unused trailing ground-truth padding before retrying.
    • Preallocates retry outputs and reuses dense metric buffers.
    • Keeps candidate masks in a compact integer format.
    • Computes box metrics only for valid anchor/ground-truth pairs.
    • Uses more memory-efficient in-place operations where possible.
  • Improved geometric and assignment processing βš™οΈ

    • Streamlines point-in-box checks and overlapping-ground-truth resolution.
    • Preserves compatible output behavior while reducing temporary tensor allocations.
  • Hyperparameter tuning now defaults to 300 trials πŸ”

    • The built-in tuner, direct Tuner usage, and Ray Tune all now use 300 trials by default, up from 10.
    • Documentation has been updated to reflect the shared default.
  • Version update πŸ“¦

    • Package version updated to 8.4.134.

🎯 Purpose & Impact

  • Much better recovery from GPU out-of-memory errors βœ…
    Large or highly crowded batches can continue training without falling back to a very slow full-CPU assignment. In the reported xView benchmark, optimized single-image GPU assignment used about 1.56 GB of peak memory and completed in 0.376 seconds, compared with 194.86 seconds and 85.62 GB for the previous GPU-to-CPU fallback.

  • More practical training on dense datasets πŸ™οΈ
    The changes are particularly valuable for aerial imagery, crowd analysis, and other datasets containing many objects per image.

  • No need to reduce the model’s forward batch size after recovery πŸ“ˆ
    The fallback is isolated to target assignment, helping retain the intended training configuration while handling temporary memory pressure.

  • More effective automatic hyperparameter tuning 🎯
    A 300-trial default gives the tuner substantially more opportunities to explore configurations and find stronger settings, especially for the broad YOLO26 search space.

  • Higher tuning cost unless overridden ⏱️
    Users who rely on defaults should expect tuning jobs to run considerably longer and consume more compute. Smaller runs can still be requested explicitly when time or budget is limited.

What's Changed

Full Changelog: v8.4.133...v8.4.134

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.