给YOLO瘦身微调,先算后做不瞎试
给YOLO这类实时目标检测模型做微调,以前是拿语言模型那套参数高效微调(PEFT)硬套,结果经常悄悄失败——因为检测模型里各种异构算子、检测专用组件,位置放不对就白搭。这篇提出YOLO-PEFT,把适配器放哪变成一道可审计的规划题:先给每个模块分配角色,再逐条检查算子兼容性、检测语义、图接口、部署条件,不合格的记下原因,最后要么给出预算内的方案,要么直接拒绝训练。在VOC07+12标准测试上,规划选出的RS-LoRA在YOLO11s和YOLO12s上mAP50-95分别到0.7138和0.7307,比全量微调高出一截;在RT-DETR-L上,七种LoRA配置全部跨过灾难性阈值,于是系统直接拒绝、退回全量微调。还有个受控审计:LoRA让峰值训练内存降43.9%,但训练时间变成1.72倍。它不是你明天就能用的工具,但方向值得盯:以后微调检测模型,可能不用再靠人肉试错,而是先让系统算一遍、给你一份看得懂的方案。
📄 原文摘要(英文)
Generic parameter-efficient fine-tuning (PEFT) methods transferred from language models can fail silently on real-time detectors, whose heterogeneous operators and detection-specific components impose placement constraints absent from regular Transformer stacks. We propose YOLO-PEFT, a structure-aware framework that formulates adapter placement as an auditable constraint-planning problem. Given a detector graph, a PEFT request, and a resource budget, YOLO-PEFT assigns operator and semantic roles, evaluates explicit operator-validity, detector-semantic, graph-interface, and deployment predicates, records a reason code for each excluded module, and either emits a budgeted target-module plan or returns Refuse before training. Under the official VOC07+12 trainval-to-VOC07 test protocol, planner-selected RS-LoRA reaches 0.7138 and 0.7307 mAP50-95 on YOLO11s and YOLO12s, respectively, compared with 0.6428 and 0.6662 for Full-SFT. On RT-DETR-L, all seven evaluated LoRA-family configurations cross the predefined catastrophic threshold, supporting a calibrated Refuse-to-Full-SFT decision within the evaluated coverage. A controlled YOLO11 audit further shows that LoRA reduces peak training memory by 43.9 percent, although training takes 1.72 times longer. Within the evaluated detector families, placement policies, and calibration coverage, YOLO-PEFT replaces manual target-module trial and error with explicit, inspectable planning while preserving verified train-save-merge-export paths; refusal on unseen detector architectures remains an open validation problem. Project Page: github.com/Tencent/YOLO-Master