YOLOv13如何提升NEU-DET的检测精度 | CVPR2026 FAAFusion 解决Neck跨尺度方向冲突,实现涨点
原始YOLO网络的问题点方向信息丢失YOLO的neck通过上采样nn.Upsample和拼接Concat融合多尺度特征但高层特征语义强方向模糊低层特征细节强方向精确。简单拼接导致两种方向信号直接叠加产生冲突使融合特征的方向语义混乱。旋转目标检测性能差由于缺乏方向对齐YOLO对遥感图像中任意朝向的飞机、船舶等旋转目标的角度回归不准确容易产生预测偏差尤其在目标密集或小尺度场景下。 FAAFusion的解决方案消除方向不一致FAAFusion先利用频域估计低层特征的主方向再旋转高层特征使其与低层方向对齐然后融合。确保跨尺度特征方向一致避免冲突。提升旋转检测精度对齐后的多尺度特征为检测头提供更准确的方向线索显著改善角度回归和定位精度。保持轻量高效仅增加少量频域计算不破坏YOLO的实时性。本文改进FAAFusion引入YOLO neck ,代替nn.Upsample和Concat 在NEU-DET数据集下验证原始mAP50原始为0.742 提升至 0.75 R 原始为0.659 提升至0.695 mAP75原始为0.433 提升至0.452 mAP50-95原始为0.407提升至0.432博主简介AI小怪兽 | 计算机视觉布道者 | 视觉检测领域创新者深耕计算机视觉与深度学习领域专注于视觉检测前沿技术的探索与突破。长期致力于YOLO系列算法的结构性创新、性能极限优化与工业级落地实践旨在打通从学术研究到产业应用的最后一公里。 核心专长与技术创新YOLO算法结构性创新于CSDN平台原创发布《YOLOv13魔术师》、《YOLOv12魔术师》等全系列深度专栏。系统性提出并开源了多项原创自研模块在模型轻量化设计、多维度注意力机制融合、特征金字塔重构等关键方向完成了一系列突破性实践为行业提供了具备高参考价值的技术路径与完整解决方案。技术生态建设与知识传播独立运营“计算机视觉大作战”公众号粉丝1.6万成功构建高质量的技术交流社群。致力于将复杂算法转化为通俗易懂的解读与可复现的工程代码显著降低了计算机视觉的技术入门门槛。 行业影响力与商业实践荣获腾讯云年度影响力作者与创作之星奖项内容质量与专业性获行业权威平台认证。全网累计拥有7万垂直领域技术受众专栏文章总阅读量突破百万在目标检测领域形成了广泛的学术与工业影响力。具备丰富的企业级项目交付经验曾为工业视觉检测、智慧城市安防等多个关键领域提供定制化的算法模型与解决方案驱动业务智能化升级。 未来方向与使命秉持“让每一行代码都有温度”的技术理念未来将持续聚焦于实时检测、语义分割及工业缺陷检测的商业化闭环等核心方向。愿与业界同仁协同创新共同推动技术边界以坚实的技术能力赋能实体经济与行业变革。原创自研系列26年计算机视觉顶会创新点《YOLO26魔术师》原创自研系列25年计算机视觉顶会创新点《YOLOv13魔术师》《YOLOv12魔术师》《YOLO11魔术师》《YOLOv8原创自研》《YOLOv5原创自研》《YOLOv7原创自研》《YOLOv9魔术师》《YOLOv10魔术师》 应用系列篇《YOLO小目标检测》《深度学习工业缺陷检测》《YOLOv8-Pose关键点检测》23、24年最火系列加入24年改进点内涵100优化改进篇涨点小能手助力科研好评率极高《YOLOv8魔术师》《YOLOv7魔术师》《YOLOv5/YOLOv7魔术师》《RT-DETR魔术师》1.YOLOv13介绍论文[2506.17733] YOLOv13: Real-Time Object Detection with Hypergraph-Enhanced Adaptive Visual Perception摘要—YOLO 系列模型因其卓越的准确性和计算效率在实时目标检测领域占据主导地位。然而无论是 YOLO11 及更早版本的卷积架构还是 YOLOv12 引入的基于区域的自注意力机制都仅限于局部信息聚合和成对相关性建模缺乏捕捉全局多对多高阶相关性的能力这限制了在复杂场景下的检测性能。本文提出了一种准确且轻量化的YOLOv13 目标检测器。为应对上述挑战我们提出了一种基于超图的自适应相关性增强HyperACE机制通过超图计算自适应地利用潜在的高阶相关性克服了以往方法仅基于成对相关性建模的限制实现了高效的全局跨位置和跨尺度特征融合与增强。随后我们基于 HyperACE 提出了全链路聚合与分配FullPAD范式通过将相关性增强特征分配到整个网络有效实现了全网的细粒度信息流和表征协同。最后我们提出用深度可分离卷积代替常规的大核卷积并设计了一系列块结构在不牺牲性能的前提下显著降低了参数量和计算复杂度。我们在广泛使用的 MS COCO 基准测试上进行了大量实验结果表明我们的方法在参数更少、浮点运算量更少的情况下达到了最先进性能。具体而言我们的 YOLOv13-N 相比 YOLO11-N 提升了 3.0% 的 mAP相比 YOLOv12-N 提升了 1.5% 的 mAP。以往的YOLO 系列遵循 “骨干网络 → 颈部网络 → 检测头” 的计算范式这本质上限定了信息流的充分传输。相比之下我们的模型通过超图自适应关联增强HyperACE机制实现全链路特征聚合与分配FullPAD从而增强传统的 YOLO 架构。因此我们提出的方法在整个网络中实现了细粒度的信息流和表征协同能够改善梯度传播并显著提升检测性能。具体而言如图 2 所示我们的 YOLOv13 模型首先使用类似以往工作的骨干网络提取多尺度特征图 B1、B2、B3、B4、B5但其中的大核卷积被我们提出的轻量化 DS-C3k2 模块取代。然后与传统 YOLO 方法直接将 B3、B4 和 B5 输入颈部网络不同我们的方法将这些特征收集并传递到提出的 HyperACE 模块中实现跨尺度跨位置特征的高阶关联自适应建模和特征增强。随后我们的 FullPAD 范式利用三个独立通道将关联增强后的特征分别分配到骨干网络与颈部网络的连接处、颈部网络的内部层以及颈部网络与检测头的连接处以优化信息流。最后颈部网络的输出特征图被传递到检测头中实现多尺度目标检测。ultralytics/cfg/models/v13/yolov13.yamlnc: 80 # number of classes scales: # model compound scaling constants, i.e. modelyolov13n.yaml will call yolov13.yaml with scale n # [depth, width, max_channels] n: [0.50, 0.25, 1024] # Nano s: [0.50, 0.50, 1024] # Small l: [1.00, 1.00, 512] # Large x: [1.00, 1.50, 512] # Extra Large backbone: # [from, repeats, module, args] - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 - [-1, 1, Conv, [128, 3, 2, 1, 2]] # 1-P2/4 - [-1, 2, DSC3k2, [256, False, 0.25]] - [-1, 1, Conv, [256, 3, 2, 1, 4]] # 3-P3/8 - [-1, 2, DSC3k2, [512, False, 0.25]] - [-1, 1, DSConv, [512, 3, 2]] # 5-P4/16 - [-1, 4, A2C2f, [512, True, 4]] - [-1, 1, DSConv, [1024, 3, 2]] # 7-P5/32 - [-1, 4, A2C2f, [1024, True, 1]] # 8 head: - [[4, 6, 8], 2, HyperACE, [512, 8, True, True, 0.5, 1, both]] - [-1, 1, nn.Upsample, [None, 2, nearest]] - [ 9, 1, DownsampleConv, []] - [[6, 9], 1, FullPAD_Tunnel, []] #12 - [[4, 10], 1, FullPAD_Tunnel, []] #13 - [[8, 11], 1, FullPAD_Tunnel, []] #14 - [-1, 1, nn.Upsample, [None, 2, nearest]] - [[-1, 12], 1, Concat, [1]] # cat backbone P4 - [-1, 2, DSC3k2, [512, True]] # 17 - [[-1, 9], 1, FullPAD_Tunnel, []] #18 - [17, 1, nn.Upsample, [None, 2, nearest]] - [[-1, 13], 1, Concat, [1]] # cat backbone P3 - [-1, 2, DSC3k2, [256, True]] # 21 - [10, 1, Conv, [256, 1, 1]] - [[21, 22], 1, FullPAD_Tunnel, []] #23 - [-1, 1, Conv, [256, 3, 2]] - [[-1, 18], 1, Concat, [1]] # cat head P4 - [-1, 2, DSC3k2, [512, True]] # 26 - [[-1, 9], 1, FullPAD_Tunnel, []] - [26, 1, Conv, [512, 3, 2]] - [[-1, 14], 1, Concat, [1]] # cat head P5 - [-1, 2, DSC3k2, [1024,True]] # 30 (P5/32-large) - [[-1, 11], 1, FullPAD_Tunnel, []] - [[23, 27, 31], 1, Detect, [nc]] # Detect(P3, P4, P5)1.1 HyperACE超图自适应相关性增强机制 HyperACE超图理论借鉴与创新借鉴超图理论将多尺度特征图的像素视为超图顶点不同的是传统超图方法依赖手工设定参数构建超边而 HyperACE 设计了可学习的超边生成模块能自适应地学习并构建超边动态探索不同特征顶点间的潜在关联。超图卷积操作在生成自适应超边后通过超图卷积操作进行特征聚合与增强。每条超边先从其连接的所有顶点处聚合信息形成高阶特征再将这些高阶特征传播回各个顶点更新与增强顶点特征从而实现高效地跨位置和跨尺度的特征融合与增强强化不同尺度特征间的语义关联对小目标和密集目标检测效果显著。class HyperACE(nn.Module): Hypergraph-based Adaptive Correlation Enhancement (HyperACE). This is the core module of YOLOv13, designed to model both global high-order correlations and local low-order correlations. It first fuses multi-scale features, then processes them through parallel branches: two C3AH branches for high-order modeling and a lightweight DSConv-based branch for low-order feature extraction. Attributes: c1 (int): Number of input channels for the fuse module. c2 (int): Number of output channels for the entire block. n (int, optional): Number of blocks in the low-order branch. Defaults to 1. num_hyperedges (int, optional): Number of hyperedges for the C3AH branches. Defaults to 8. dsc3k (bool, optional): If True, use DSC3k in the low-order branch; otherwise, use DSBottleneck. Defaults to True. shortcut (bool, optional): Whether to use shortcuts in the low-order branch. Defaults to False. e1 (float, optional): Expansion ratio for the main hidden channels. Defaults to 0.5. e2 (float, optional): Expansion ratio within the C3AH branches. Defaults to 1. context (str, optional): Context type for C3AH branches. Defaults to both. channel_adjust (bool, optional): Passed to FuseModule for channel configuration. Defaults to True. Methods: forward: Performs a forward pass through the HyperACE module. Examples: import torch model HyperACE(c164, c2256, n1, num_hyperedges8) x_list [torch.randn(2, 64, 64, 64), torch.randn(2, 64, 32, 32), torch.randn(2, 64, 16, 16)] output model(x_list) print(output.shape) torch.Size([2, 256, 32, 32]) def __init__(self, c1, c2, n1, num_hyperedges8, dsc3kTrue, shortcutFalse, e10.5, e21, contextboth, channel_adjustTrue): super().__init__() self.c int(c2 * e1) self.cv1 Conv(c1, 3 * self.c, 1, 1) self.cv2 Conv((4 n) * self.c, c2, 1) self.m nn.ModuleList( DSC3k(self.c, self.c, 2, shortcut, k13, k27) if dsc3k else DSBottleneck(self.c, self.c, shortcutshortcut) for _ in range(n) ) self.fuse FuseModule(c1, channel_adjust) self.branch1 C3AH(self.c, self.c, e2, num_hyperedges, context) self.branch2 C3AH(self.c, self.c, e2, num_hyperedges, context) def forward(self, X): x self.fuse(X) y list(self.cv1(x).chunk(3, 1)) out1 self.branch1(y[1]) out2 self.branch2(y[1]) y.extend(m(y[-1]) for m in self.m) y[1] out1 y.append(out2) return self.cv2(torch.cat(y, 1))代码位置ultralytics/nn/modules/block.py1.2 FullPAD_Tunnel全流程聚合 - 分发范式 FullPAD多通道特征传递打破传统的 “骨干→颈部→头部” 单向计算范式通过三条独立通路传递特征即主干 - 颈部连接层、颈部内部层、颈部 - 头部连接层将 HyperACE 聚合后的多尺度特征通过这些 “隧道” 分发回网络的不同位置实现细粒度信息流与全流程表征协同。改善梯度传播该范式有效解决了梯度消失或爆炸问题显着改善了梯度传播效率从而提升模型整体的检测性能使模型在复杂场景下能够更好地捕捉目标特征提高检测的准确性和稳定性。class FullPAD_Tunnel(nn.Module): A gated fusion module for the Full-Pipeline Aggregation-and-Distribution (FullPAD) paradigm. This module implements a gated residual connection used to fuse features. It takes two inputs: the original feature map and a correlation-enhanced feature map. It then computes output original gate * enhanced, where gate is a learnable scalar parameter that adaptively balances the contribution of the enhanced features. Methods: forward: Performs the gated fusion of two input feature maps. Examples: import torch model FullPAD_Tunnel() original_feature torch.randn(2, 64, 32, 32) enhanced_feature torch.randn(2, 64, 32, 32) output model([original_feature, enhanced_feature]) print(output.shape) torch.Size([2, 64, 32, 32]) def __init__(self): super().__init__() self.gate nn.Parameter(torch.tensor(0.0)) def forward(self, x): out x[0] self.gate * x[1] return out代码位置ultralytics/nn/modules/block.py1.3 DSC3k2基于深度可分离卷积的轻量化模块模块创新与替代采用深度可分离卷积构建了 DSConv、DS-Bottleneck、DS-C3k 等模块替代传统的大核卷积。例如使用 DS-C3k2 模块作为轻量化的骨干网络提取多尺度特征在保持感受野的同时大幅降低了参数量与计算量提高了模型的计算效率。性能与效率平衡在几乎不牺牲性能的前提下显著减少了模型的参数量和计算复杂度使得 YOLOv13 能够在保持较高检测精度的同时具备更快的推理速度适合实时目标检测应用场景降低了模型的部署难度和资源消耗。class DSC3k2(C2f): An improved C3k2 module that uses lightweight depthwise separable convolution blocks. This class redesigns C3k2 module, replacing its internal processing blocks with either DSBottleneck or DSC3k modules. Attributes: c1 (int): Number of input channels. c2 (int): Number of output channels. n (int, optional): Number of internal processing blocks to stack. Defaults to 1. dsc3k (bool, optional): If True, use DSC3k as the internal block. If False, use DSBottleneck. Defaults to False. e (float, optional): Expansion ratio for the C2f modules hidden channels. Defaults to 0.5. g (int, optional): Number of groups for grouped convolution (passed to parent C2f). Defaults to 1. shortcut (bool, optional): Whether to use shortcut connections in the internal blocks. Defaults to True. k1 (int, optional): Kernel size for the first DSConv in internal blocks. Defaults to 3. k2 (int, optional): Kernel size for the second DSConv in internal blocks. Defaults to 7. d2 (int, optional): Dilation for the second DSConv in internal blocks. Defaults to 1. Methods: forward: Performs a forward pass through the DSC3k2 module (inherited from C2f). Examples: import torch # Using DSBottleneck as internal block model1 DSC3k2(c164, c264, n2, dsc3kFalse) x torch.randn(2, 64, 128, 128) output1 model1(x) print(fWith DSBottleneck: {output1.shape}) With DSBottleneck: torch.Size([2, 64, 128, 128]) # Using DSC3k as internal block model2 DSC3k2(c164, c264, n1, dsc3kTrue) output2 model2(x) print(fWith DSC3k: {output2.shape}) With DSC3k: torch.Size([2, 64, 128, 128]) def __init__( self, c1, c2, n1, dsc3kFalse, e0.5, g1, shortcutTrue, k13, k27, d21 ): super().__init__(c1, c2, n, shortcut, g, e) if dsc3k: self.m nn.ModuleList( DSC3k( self.c, self.c, n2, shortcutshortcut, gg, e1.0, k1k1, k2k2, d2d2 ) for _ in range(n) ) else: self.m nn.ModuleList( DSBottleneck( self.c, self.c, shortcutshortcut, e1.0, k1k1, k2k2, d2d2 ) for _ in range(n) )代码位置ultralytics/nn/modules/block.py2.NEU-DET数据集介绍NEU-DET钢材表面缺陷共有六大类一共1800张类别分别为crazing,inclusion,patches,pitted_surface,rolled-in_scale,scratches数据集下载地址https://download.csdn.net/download/m0_63774211/89846379?spm1001.2014.3001.5503标签可视化3 引入 FAAFusion频域对齐融合模块3.1 原理介绍论文Fourier Angle Alignment for Oriented Object Detection in Remote Sensing摘要在遥感旋转目标检测中主流方法存在两个瓶颈检测器颈部的方向不一致性和检测头的任务冲突。利用傅里叶旋转等变性我们引入了傅里叶角度对齐该方法通过频谱分析角度信息并将主方向对齐到特定方向。随后我们提出了两个即插即用模块FAAFusion和FAA Head。FAAFusion 作用于检测器颈部将高层特征的主方向对齐到低层特征后进行融合。FAA Head 作为一个新的检测头将 RoI 特征预对齐到规范角度并在分类和回归之前将其与原始特征相加。在 DOTA-v1.0、DOTA-v1.5 和 HRSC2016 上的实验表明我们的方法能显著提升先前工作的性能。特别地在单尺度训练和测试下我们的方法在 DOTA-v1.0 数据集上达到了 78.72% mAP 的新最先进结果在 DOTA-v1.5 数据集上达到了 72.28% mAP验证了我们的方法在遥感目标检测中的有效性。方法在本节中我们首先介绍我们的公式和动机。接着我们将详细描述我们的傅里叶角度对齐方法。然后我们将介绍 FAA 在检测器不同位置的应用即 FAAFusion 和 FAAHead这将在 3.3 和 3.4 节中详细说明。3.2 yolov13-FAAFusion结构框图源码详见https://cv2023.blog.csdn.net/article/details/1602694304.实验结果分析4.1 原始结果YOLOv13原始mAP50为0.742YOLOv13n summary: 535 layers, 2,449,065 parameters, 0 gradients, 6.2 GFLOPs Class Images Instances Box(P R mAP50 mAP75 mAP50-95): 100%|██████████| 16/16 [00:1100:00, 1.37it/s] all 486 1069 0.749 0.659 0.742 0.433 0.426 crazing 69 149 0.781 0.143 0.385 0.0432 0.128 inclusion 87 222 0.773 0.77 0.818 0.425 0.45 patches 92 243 0.824 0.905 0.946 0.752 0.614 pitted_surface 93 130 0.779 0.746 0.803 0.581 0.54 rolled-in_scale 81 171 0.71 0.544 0.647 0.219 0.3 scratches 90 154 0.629 0.844 0.85 0.58 0.5234.2FAAFusion引入YOLOv13 neck原始mAP50原始为 0.742 提升至 0.75 R 原始为 0.659 提升至0.695 mAP75原始为0.433 提升至0.452 mAP50-95原始为0.407提升至0.432YOLOv13-FAAFusion summary: 546 layers, 2,468,779 parameters, 0 gradients, 6.1 GFLOPs Class Images Instances Box(P R mAP50 mAP75 mAP50-95): 100%|██████████| 16/16 [00:1900:00, 1.19s/it] all 486 1069 0.722 0.695 0.75 0.452 0.432 crazing 69 149 0.689 0.268 0.43 0.0697 0.146 inclusion 87 222 0.676 0.781 0.809 0.46 0.446 patches 92 243 0.844 0.909 0.937 0.731 0.619 pitted_surface 93 130 0.776 0.747 0.811 0.541 0.531 rolled-in_scale 81 171 0.656 0.556 0.618 0.271 0.292 scratches 90 154 0.692 0.909 0.897 0.64 0.561