一、本文介绍
本文记录的是利用ScConv优化YOLOv10的目标检测网络模型。深度神经网络中存在大量冗余,不仅在密集模型参数中,而且在特征图的空间和通道维度中。ScConv
模块通过联合减少卷积层中空间和通道的冗余,有效地限制了特征冗余,本文利用ScConv
模块改进YOLOv10
,提高了模型的性能和效率。
专栏目录:YOLOv10改进目录一览 | 涉及卷积层、轻量化、注意力、损失函数、Backbone、SPPF、Neck、检测头等全方位改进
专栏地址:YOLOv10改进专栏——以发表论文的角度,快速准确的找到有效涨点的创新点!
文章目录
- 一、本文介绍
- 二、SCConv介绍
- 2.1、原理
- 2.2、优势
- 三、SCConv的实现代码
- 四、创新模块
- 4.1 改进点⭐
- 4.2 改进点⭐
- 五、添加步骤
- 5.1 修改一
- 5.2 修改二
- 5.3 修改三
- 六、yaml模型文件
- 6.1 模型改进版本⭐
- 6.2 模型改进版本⭐
- 七、成功运行结果
二、SCConv介绍
SCConv
:针对特征冗余的空间和通道重构卷积
SCConv(Spatial and Channel reconstruction Convolution)
模块是为了解决卷积神经网络中特征冗余导致的计算资源消耗大的问题而提出的,其设计的原理和优势如下:
2.1、原理
SCConv
由两个单元组成:空间重建单元(SRU)和通道重建单元(CRU)。- SRU:利用分离和重建操作来挖掘特征的空间冗余。具体来说,通过
Group Normalization(GN)层
的缩放因子评估不同特征图的信息含量,将特征图根据权重分为信息丰富的和信息较少的两部分,然后通过交叉重建操作将这两部分进行组合,以减少空间冗余并增强特征的表示。 - CRU:利用
Split - Transform - Fuse策略
来挖掘特征的通道冗余。首先将空间精炼后的特征图的通道进行分割和挤压,然后通过高效的卷积操作(如GWC和PWC)对分割后的特征图进行变换,以提取高级代表性信息并减少计算成本,最后使用简化的SKNet
方法自适应地融合输出特征,从而减少通道维度的冗余。
2.2、优势
- 减少冗余计算:通过挖掘空间和通道维度的冗余,
SCConv
能够减少模型的计算量和参数数量,从而降低计算成本。 - 促进代表性特征学习:SRU和CRU的设计有助于增强特征的表示能力,生成更具代表性和表达性的特征。
- 通用性和灵活性:
SCConv
是一个即插即用的模块,可以直接替换各种卷积神经网络中的标准卷积,无需对模型架构进行额外的修改。 - 性能提升:实验结果表明,嵌入
SCConv
的模型在降低复杂度和计算成本的同时,能够实现更好的性能,在图像分类和目标检测等任务中超越了其他先进的方法。
论文:https://openaccess.thecvf.com/content/CVPR2023/papers/Li_SCConv_Spatial_and_Channel_Reconstruction_Convolution_for_Feature_Redundancy_CVPR_2023_paper.pdf
三、SCConv的实现代码
SCConv模块
的实现代码如下:
import torch
import torch.nn as nn
import torch.nn.functional as Fclass GroupBatchnorm2d(nn.Module):def __init__(self, c_num: int,group_num: int = 16,eps: float = 1e-10):super(GroupBatchnorm2d, self).__init__()assert c_num >= group_numself.group_num = group_numself.weight = nn.Parameter(torch.randn(c_num, 1, 1))self.bias = nn.Parameter(torch.zeros(c_num, 1, 1))self.eps = epsdef forward(self, x):N, C, H, W = x.size()x = x.view(N, self.group_num, -1)mean = x.mean(dim=2, keepdim=True)std = x.std(dim=2, keepdim=True)x = (x - mean) / (std + self.eps)x = x.view(N, C, H, W)return x * self.weight + self.biasclass SRU(nn.Module):def __init__(self,oup_channels: int,group_num: int = 16,gate_treshold: float = 0.5,torch_gn: bool = True):super().__init__()self.gn = nn.GroupNorm(num_channels=oup_channels, num_groups=group_num) if torch_gn else GroupBatchnorm2d(c_num=oup_channels, group_num=group_num)self.gate_treshold = gate_tresholdself.sigomid = nn.Sigmoid()def forward(self, x):gn_x = self.gn(x)w_gamma = self.gn.weight / sum(self.gn.weight)w_gamma = w_gamma.view(1, -1, 1, 1)reweigts = self.sigomid(gn_x * w_gamma)# Gatew1 = torch.where(reweigts > self.gate_treshold, torch.ones_like(reweigts), reweigts)w2 = torch.where(reweigts > self.gate_treshold, torch.zeros_like(reweigts), reweigts)x_1 = w1 * xx_2 = w2 * xy = self.reconstruct(x_1, x_2)return ydef reconstruct(self, x_1, x_2):x_11, x_12 = torch.split(x_1, x_1.size(1) // 2, dim=1)x_21, x_22 = torch.split(x_2, x_2.size(1) // 2, dim=1)return torch.cat([x_11 + x_22, x_12 + x_21], dim=1)class CRU(nn.Module):def __init__(self,op_channel: int,alpha: float = 1 / 2,squeeze_radio: int = 2,group_size: int = 2,group_kernel_size: int = 3,):super().__init__()self.up_channel = up_channel = int(alpha * op_channel)self.low_channel = low_channel = op_channel - up_channelself.squeeze1 = nn.Conv2d(up_channel, up_channel // squeeze_radio, kernel_size=1, bias=False)self.squeeze2 = nn.Conv2d(low_channel, low_channel // squeeze_radio, kernel_size=1, bias=False)# upself.GWC = nn.Conv2d(up_channel // squeeze_radio, op_channel, kernel_size=group_kernel_size, stride=1,padding=group_kernel_size // 2, groups=group_size)self.PWC1 = nn.Conv2d(up_channel // squeeze_radio, op_channel, kernel_size=1, bias=False)# lowself.PWC2 = nn.Conv2d(low_channel // squeeze_radio, op_channel - low_channel // squeeze_radio, kernel_size=1,bias=False)self.advavg = nn.AdaptiveAvgPool2d(1)def forward(self, x):# Splitup, low = torch.split(x, [self.up_channel, self.low_channel], dim=1)up, low = self.squeeze1(up), self.squeeze2(low)# TransformY1 = self.GWC(up) + self.PWC1(up)Y2 = torch.cat([self.PWC2(low), low], dim=1)# Fuseout = torch.cat([Y1, Y2], dim=1)out = F.softmax(self.advavg(out), dim=1) * outout1, out2 = torch.split(out, out.size(1) // 2, dim=1)return out1 + out2def autopad(k, p=None, d=1):if d > 1:k = d * (k - 1) + 1 if isinstance(k, int) else [d * (x - 1) + 1 for x in k] # actual kernel-sizeif p is None:p = k // 2 if isinstance(k, int) else [x // 2 for x in k] # auto-padreturn pclass SCConv(nn.Module):def __init__(self,op_channel: int,group_num: int = 4,gate_treshold: float = 0.5,alpha: float = 1 / 2,squeeze_radio: int = 2,group_size: int = 2,group_kernel_size: int = 3,):super().__init__()self.SRU = SRU(op_channel,group_num=group_num,gate_treshold=gate_treshold)self.CRU = CRU(op_channel,alpha=alpha,squeeze_radio=squeeze_radio,group_size=group_size,group_kernel_size=group_kernel_size)def forward(self, x):x = self.SRU(x)x = self.CRU(x)return xdef autopad(k, p=None, d=1): # kernel, padding, dilation"""Pad to 'same' shape outputs."""if d > 1:k = d * (k - 1) + 1 if isinstance(k, int) else [d * (x - 1) + 1 for x in k] # actual kernel-sizeif p is None:p = k // 2 if isinstance(k, int) else [x // 2 for x in k] # auto-padreturn pclass Conv(nn.Module):"""Standard convolution with args(ch_in, ch_out, kernel, stride, padding, groups, dilation, activation)."""default_act = nn.SiLU() # default activationdef __init__(self, c1, c2, k=1, s=1, p=None, g=1, d=1, act=True):"""Initialize Conv layer with given arguments including activation."""super().__init__()self.conv = nn.Conv2d(c1, c2, k, s, autopad(k, p, d), groups=g, dilation=d, bias=False)self.bn = nn.BatchNorm2d(c2)self.act = self.default_act if act is True else act if isinstance(act, nn.Module) else nn.Identity()def forward(self, x):"""Apply convolution, batch normalization and activation to input tensor."""return self.act(self.bn(self.conv(x)))def forward_fuse(self, x):"""Perform transposed convolution of 2D data."""return self.act(self.conv(x))class Bottleneck(nn.Module):"""Standard bottleneck."""def __init__(self, c1, c2, shortcut=True, g=1, k=(3, 3), e=0.5):"""Initializes a standard bottleneck module with optional shortcut connection and configurable parameters."""super().__init__()c_ = int(c2 * e) # hidden channelsself.cv1 = Conv(c1, c_, k[0], 1)self.cv2 = Conv(c_, c2, k[1], 1, g=g)self.add = shortcut and c1 == c2def forward(self, x):"""Applies the YOLO FPN to input data."""return x + self.cv2(self.cv1(x)) if self.add else self.cv2(self.cv1(x))class C2f(nn.Module):"""Faster Implementation of CSP Bottleneck with 2 convolutions."""def __init__(self, c1, c2, n=1, shortcut=False, g=1, e=0.5):"""Initializes a CSP bottleneck with 2 convolutions and n Bottleneck blocks for faster processing."""super().__init__()self.c = int(c2 * e) # hidden channelsself.cv1 = Conv(c1, 2 * self.c, 1, 1)self.cv2 = Conv((2 + n) * self.c, c2, 1) # optional act=FReLU(c2)self.m = nn.ModuleList(Bottleneck(self.c, self.c, shortcut, g, k=((3, 3), (3, 3)), e=1.0) for _ in range(n))def forward(self, x):"""Forward pass through C2f layer."""y = list(self.cv1(x).chunk(2, 1))y.extend(m(y[-1]) for m in self.m)return self.cv2(torch.cat(y, 1))def forward_split(self, x):"""Forward pass using split() instead of chunk()."""y = list(self.cv1(x).split((self.c, self.c), 1))y.extend(m(y[-1]) for m in self.m)return self.cv2(torch.cat(y, 1))class RepVGGDW(torch.nn.Module):def __init__(self, ed) -> None:super().__init__()self.conv = Conv(ed, ed, 7, 1, 3, g=ed, act=False)self.conv1 = Conv(ed, ed, 3, 1, 1, g=ed, act=False)self.dim = edself.act = nn.SiLU()def forward(self, x):return self.act(self.conv(x) + self.conv1(x))def forward_fuse(self, x):return self.act(self.conv(x))@torch.no_grad()def fuse(self):conv = fuse_conv_and_bn(self.conv.conv, self.conv.bn)conv1 = fuse_conv_and_bn(self.conv1.conv, self.conv1.bn)conv_w = conv.weightconv_b = conv.biasconv1_w = conv1.weightconv1_b = conv1.biasconv1_w = torch.nn.functional.pad(conv1_w, [2,2,2,2])final_conv_w = conv_w + conv1_wfinal_conv_b = conv_b + conv1_bconv.weight.data.copy_(final_conv_w)conv.bias.data.copy_(final_conv_b)self.conv = convdel self.conv1class CIB(nn.Module):"""Standard bottleneck."""def __init__(self, c1, c2, shortcut=True, e=0.5, lk=False):"""Initializes a bottleneck module with given input/output channels, shortcut option, group, kernels, andexpansion."""super().__init__()c_ = int(c2 * e) # hidden channelsself.cv1 = nn.Sequential(Conv(c1, c1, 3, g=c1),Conv(c1, 2 * c_, 1),Conv(2 * c_, 2 * c_, 3, g=2 * c_) if not lk else RepVGGDW(2 * c_),Conv(2 * c_, c2, 1),Conv(c2, c2, 3, g=c2),SCConv(c2))self.add = shortcut and c1 == c2def forward(self, x):"""'forward()' applies the YOLO FPN to input data."""return x + self.cv1(x) if self.add else self.cv1(x)class C2fCIB_SCConv(C2f):"""Faster Implementation of CSP Bottleneck with 2 convolutions."""def __init__(self, c1, c2, n=1, shortcut=False, lk=False, g=1, e=0.5):"""Initialize CSP bottleneck layer with two convolutions with arguments ch_in, ch_out, number, shortcut, groups,expansion."""super().__init__(c1, c2, n, shortcut, g, e)self.m = nn.ModuleList(CIB(self.c, self.c, shortcut, e=1.0, lk=lk) for _ in range(n))
四、创新模块
4.1 改进点⭐
模块改进方法:直接加入SCConv
(第五节讲解添加步骤)。
SCConv
模块加入如下:
4.2 改进点⭐
模块改进方法:基于SCConv模块
的C2fCIB
(第五节讲解添加步骤)。
第二种改进方法是对YOLOv10
中的C2fCIB模块
进行改进,并将SCConv
在加入到C2fCIB
模块中。
改进代码如下:
首先对CIB
模块进行改进,加入SCConv模块
class CIB(nn.Module):"""Standard bottleneck."""def __init__(self, c1, c2, shortcut=True, e=0.5, lk=False):"""Initializes a bottleneck module with given input/output channels, shortcut option, group, kernels, andexpansion."""super().__init__()c_ = int(c2 * e) # hidden channelsself.cv1 = nn.Sequential(Conv(c1, c1, 3, g=c1),Conv(c1, 2 * c_, 1),Conv(2 * c_, 2 * c_, 3, g=2 * c_) if not lk else RepVGGDW(2 * c_),Conv(2 * c_, c2, 1),Conv(c2, c2, 3, g=c2),SCConv(c2))self.add = shortcut and c1 == c2def forward(self, x):"""'forward()' applies the YOLO FPN to input data."""return x + self.cv1(x) if self.add else self.cv1(x)
然后,将C2fCIB
重命名为C2fCIB_SCConv
class C2fCIB_SCConv(C2f):"""Faster Implementation of CSP Bottleneck with 2 convolutions."""def __init__(self, c1, c2, n=1, shortcut=False, lk=False, g=1, e=0.5):"""Initialize CSP bottleneck layer with two convolutions with arguments ch_in, ch_out, number, shortcut, groups,expansion."""super().__init__(c1, c2, n, shortcut, g, e)self.m = nn.ModuleList(CIB(self.c, self.c, shortcut, e=1.0, lk=lk) for _ in range(n))
注意❗:在第五小节
中需要声明的模块名称为:SCConv
和C2fCIB_SCConv
。
五、添加步骤
5.1 修改一
① 在ultralytics/nn/
目录下新建AddModules
文件夹用于存放模块代码
② 在AddModules
文件夹下新建SCConv.py
,将第三节中的代码粘贴到此处
5.2 修改二
在AddModules
文件夹下新建__init__.py
(已有则不用新建),在文件内导入模块:from .SCConv import *
5.3 修改三
在ultralytics/nn/modules/tasks.py
文件中,需要在两处位置添加各模块类名称。
首先:导入模块
其次:在parse_model函数
中注册SCConv
和C2fCIB_SCConv
模块
六、yaml模型文件
6.1 模型改进版本⭐
此处以ultralytics/cfg/models/v10/yolov10m.yaml
为例,在同目录下创建一个用于自己数据集训练的模型文件yolov10m-SCConv.yaml
。
将yolov10m.yaml
中的内容复制到yolov10m-SCConv.yaml
文件下,修改nc
数量等于自己数据中目标的数量。
📌 模型的修改方法是将骨干网络中的C2f
和C2fCIB模块
替换成SCConv模块
。
# Parameters
nc: 1 # number of classes
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'# [depth, width, max_channels]m: [0.67, 0.75, 768] # YOLOv8m summary: 295 layers, 25902640 parameters, 25902624 gradients, 79.3 GFLOPsbackbone:# [from, repeats, module, args]- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4- [-1, 3, SCConv, [128]]- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8- [-1, 6, SCConv, [256]]- [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16- [-1, 6, SCConv, [512]]- [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32- [-1, 3, SCConv, [1024]]- [-1, 1, SPPF, [1024, 5]] # 9- [-1, 1, PSA, [1024]] # 10# YOLOv8.0n head
head:- [-1, 1, nn.Upsample, [None, 2, "nearest"]]- [[-1, 6], 1, Concat, [1]] # cat backbone P4- [-1, 3, C2f, [512]] # 13- [-1, 1, nn.Upsample, [None, 2, "nearest"]]- [[-1, 4], 1, Concat, [1]] # cat backbone P3- [-1, 3, C2f, [256]] # 16 (P3/8-small)- [-1, 1, Conv, [256, 3, 2]]- [[-1, 13], 1, Concat, [1]] # cat head P4- [-1, 3, C2f, [512]] # 19 (P4/16-medium)- [-1, 1, SCDown, [512, 3, 2]]- [[-1, 10], 1, Concat, [1]] # cat head P5- [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large)- [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5)
6.2 模型改进版本⭐
此处以ultralytics/cfg/models/v10/yolov10m.yaml
为例,在同目录下创建一个用于自己数据集训练的模型文件yolov10m-C2fCIB_SCConv.yaml
。
将yolov10m.yaml
中的内容复制到yolov10m-C2fCIB_SCConv.yaml
文件下,修改nc
数量等于自己数据中目标的数量。
📌 模型的修改方法是将骨干网络中的C2fCIB模块
替换成C2fCIB_SCConv模块
。
# Parameters
nc: 1 # number of classes
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'# [depth, width, max_channels]m: [0.67, 0.75, 768] # YOLOv8m summary: 295 layers, 25902640 parameters, 25902624 gradients, 79.3 GFLOPsbackbone:# [from, repeats, module, args]- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4- [-1, 3, C2f, [128, True]]- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8- [-1, 6, C2f, [256, True]]- [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16- [-1, 6, C2f, [512, True]]- [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32- [-1, 3, C2fCIB_SCConv, [1024, True, True]]- [-1, 1, SPPF, [1024, 5]] # 9- [-1, 1, PSA, [1024]] # 10# YOLOv8.0n head
head:- [-1, 1, nn.Upsample, [None, 2, "nearest"]]- [[-1, 6], 1, Concat, [1]] # cat backbone P4- [-1, 3, C2f, [512]] # 13- [-1, 1, nn.Upsample, [None, 2, "nearest"]]- [[-1, 4], 1, Concat, [1]] # cat backbone P3- [-1, 3, C2f, [256]] # 16 (P3/8-small)- [-1, 1, Conv, [256, 3, 2]]- [[-1, 13], 1, Concat, [1]] # cat head P4- [-1, 3, C2f, [512]] # 19 (P4/16-medium)- [-1, 1, SCDown, [512, 3, 2]]- [[-1, 10], 1, Concat, [1]] # cat head P5- [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large)- [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5)
七、成功运行结果
打印网络模型可以看到SCConv
和C2fCIB_SCConv
已经加入到模型中,并可以进行训练了。
YOLOv10m-SCConv:
YOLOv10m-SCConv summary: 493 layers, 14278630 parameters, 14278614 gradients, 48.9 GFLOPs
from n params module arguments 0 -1 1 1392 ultralytics.nn.modules.conv.Conv [3, 48, 3, 2] 1 -1 1 41664 ultralytics.nn.modules.conv.Conv [48, 96, 3, 2] 2 -1 2 33984 ultralytics.nn.AddModules.SCConv.SCConv [96, 96] 3 -1 1 166272 ultralytics.nn.modules.conv.Conv [96, 192, 3, 2] 4 -1 4 269568 ultralytics.nn.AddModules.SCConv.SCConv [192, 192] 5 -1 1 78720 ultralytics.nn.modules.block.SCDown [192, 384, 3, 2] 6 -1 4 1073664 ultralytics.nn.AddModules.SCConv.SCConv [384, 384] 7 -1 1 228672 ultralytics.nn.modules.block.SCDown [384, 576, 3, 2] 8 -1 2 1206144 ultralytics.nn.AddModules.SCConv.SCConv [576, 576] 9 -1 1 831168 ultralytics.nn.modules.block.SPPF [576, 576, 5] 10 -1 1 1253088 ultralytics.nn.modules.block.PSA [576, 576] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 2 1993728 ultralytics.nn.modules.block.C2f [960, 384, 2] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 2 517632 ultralytics.nn.modules.block.C2f [576, 192, 2] 17 -1 1 332160 ultralytics.nn.modules.conv.Conv [192, 192, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 2 1846272 ultralytics.nn.modules.block.C2f [576, 384, 2] 20 -1 1 152448 ultralytics.nn.modules.block.SCDown [384, 384, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 2 1969920 ultralytics.nn.modules.block.C2fCIB [960, 576, 2, True, True] 23 [16, 19, 22] 1 2282134 ultralytics.nn.modules.head.v10Detect [1, [192, 384, 576]]
YOLOv10m-SCConv summary: 493 layers, 14278630 parameters, 14278614 gradients, 48.9 GFLOPs
YOLOv10m-C2fCIB_SCConv:
YOLOv10m-C2fCIB_SCConv summary: 525 layers, 18526822 parameters, 18526806 gradients, 68.0 GFLOPs
from n params module arguments 0 -1 1 1392 ultralytics.nn.modules.conv.Conv [3, 48, 3, 2] 1 -1 1 41664 ultralytics.nn.modules.conv.Conv [48, 96, 3, 2] 2 -1 2 111360 ultralytics.nn.modules.block.C2f [96, 96, 2, True] 3 -1 1 166272 ultralytics.nn.modules.conv.Conv [96, 192, 3, 2] 4 -1 4 813312 ultralytics.nn.modules.block.C2f [192, 192, 4, True] 5 -1 1 78720 ultralytics.nn.modules.block.SCDown [192, 384, 3, 2] 6 -1 4 3248640 ultralytics.nn.modules.block.C2f [384, 384, 4, True] 7 -1 1 228672 ultralytics.nn.modules.block.SCDown [384, 576, 3, 2] 8 -1 2 2658240 ultralytics.nn.AddModules.SCConv.C2fCIB_SCConv[576, 576, True, True] 9 -1 1 831168 ultralytics.nn.modules.block.SPPF [576, 576, 5] 10 -1 1 1253088 ultralytics.nn.modules.block.PSA [576, 576] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 2 1993728 ultralytics.nn.modules.block.C2f [960, 384, 2] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 2 517632 ultralytics.nn.modules.block.C2f [576, 192, 2] 17 -1 1 332160 ultralytics.nn.modules.conv.Conv [192, 192, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 2 1846272 ultralytics.nn.modules.block.C2f [576, 384, 2] 20 -1 1 152448 ultralytics.nn.modules.block.SCDown [384, 384, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 2 1969920 ultralytics.nn.modules.block.C2fCIB [960, 576, 2, True, True] 23 [16, 19, 22] 1 2282134 ultralytics.nn.modules.head.v10Detect [1, [192, 384, 576]]
YOLOv10m-C2fCIB_SCConv summary: 525 layers, 18526822 parameters, 18526806 gradients, 68.0 GFLOPs