Repository navigation
fix(rtdetr): honor max_det in decoder exports and validation - #25153
Conversation
|
I have read the CLA Document and I sign the CLA |
|
👋 Hello @Hasnaathussain, thank you for submitting a
For more guidance, please refer to our Contributing Guide. This is an automated welcome message, and an Ultralytics engineer will assist with the review. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Clean PR. The added head attributes are consumed by the standard model lifecycle, and the top-k change safely caps RT-DETR decoder outputs at max_det while preserving the existing query/class selection behavior.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@Hasnaathussain Thanks for the contribution! We scoped max_det to the RT-DETR paths that own it: export uses decoder query capacity, while native prediction and validation limit detections after filtering. We removed the broader end2end lifecycle flags because RT-DETR does not use the standard YOLO criterion-update lifecycle. This is now merged. |
Co-authored-by: Glenn Jocher <[email protected]>
Fixes #3286
Summary
RT-DETR now honors
max_detat the layers that own it:max_detinRTDETRPredictor.max_detinRTDETRValidator.max_det, clamped by RT-DETR query capacity rather than YOLO anchor count.The earlier proposal marked RT-DETR as a standard YOLO end-to-end head. That was too broad: training resume uses that flag to enter the one-to-one criterion update lifecycle, which RT-DETR does not implement.
Deleted: the proposed
agnostic_nmsandend2endRTDETRDecoderflags and their incorrect standard-lifecycle integration.The source change is net-positive by 6 lines, plus 4 lines in an existing export test. Deletion alone cannot make exported decoder top-k configurable or apply validation post-filter limits; the remaining additions live at those two ownership boundaries.
Validation
max_det.max_dettruncation.