一个模型搞定所有精度效率需求,推理时随意调深度。
AnyDepth-DETR/-YOLO: Any-depth object detection with a single network

- 骨干和颈部分基础路径与可跳过优化路径,支持任意深度配置。
- 单个模型在最高效时速度提升1.82倍,精度仅降2.0 AP。
- 无需重训练,适配不同硬件部署,尤其适合边缘设备。
现有目标检测器为固定深度网络,针对单一部署场景优化,不同需求需独立模型。本文提出任意深度检测框架,通过推理时控制深度,使单一网络覆盖连续的精度-效率权衡,无需重训练。每个骨干和颈部阶段分为始终执行的基础路径与可跳过的优化路径;该设计保持了所有深度配置下的完整多尺度特征层次,区别于传统提前退出机制。训练中因同时优化多个深度子网络导致梯度冲突,我们通过仅在两端极端配置间进行自蒸馏,结合预测层与特征层对齐损失,实现阶段级模块化,确保各阶段输出在不同路径下兼容。在RT-DETR和YOLOv12上验证,全深度配置性能达到或超过对应SOTA基线,参数开销极小;最高效配置实现高达1.82倍的速度提升,精度仅下降2.0 AP,全部来自同一组权重。
原文摘要 · Abstract (English)
Modern object detectors are static, fixed-depth networks optimized for a single operating point, requiring separate models for different deployment scenarios. We present an any-depth detection framework that enables a single network to span a continuous range of accuracy--efficiency trade-offs by controlling depth at inference time without retraining. Each backbone and neck stage is divided into an essential path, which always executes, and a skippable refinement path; this decomposition preserves the full multi-scale feature hierarchy at every depth configuration, unlike conventional early exiting that discards entire stages. To train such a network, jointly optimizing many sub-networks of varying depth introduces conflicting gradient signals. We address this via self-distillation between only the two extremes, with prediction-level and feature-level alignment losses that enforce stage-wise modularity, ensuring the outputs of each stage remain compatible regardless of the paths taken. Instantiated on RT-DETR and YOLOv12, our full-depth configurations match or surpass their respective SOTA baselines with negligible parameter overhead, while the most efficient configurations achieve up to $1.82\times$ speedup at a cost of only 2.0 AP, all from a single set of weights.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。