当前位置: 首页> 汽车> 报价 > 促销推广方式有哪些_建筑工程办理资质_百度q3财报减亏170亿_广州专门做网站

促销推广方式有哪些_建筑工程办理资质_百度q3财报减亏170亿_广州专门做网站

时间:2025/7/11 14:59:12来源:https://blog.csdn.net/m0_67647321/article/details/143192018 浏览次数: 0次
促销推广方式有哪些_建筑工程办理资质_百度q3财报减亏170亿_广州专门做网站

秋招面试专栏推荐 :深度学习算法工程师面试问题总结【百面算法工程师】——点击即可跳转


💡💡💡本专栏所有程序均经过测试,可成功执行💡💡💡


本文给大家带来的教程是将YOLO11的backbone替换为SimRepCSP结构来提取特征。文章在介绍主要的原理后,将手把手教学如何进行模块的代码添加和修改,并将修改后的完整代码放在文章的最后,方便大家一键运行,小白也可轻松上手实践。以帮助您更好地学习深度学习目标检测YOLO系列的挑战。 

专栏地址:YOLO11入门 + 改进涨点——点击即可跳转 欢迎订阅

目录

1.论文

2. SimRepCSP代码实现

2.1 将SimRepCSP添加到YOLO11中

2.2 更改init.py文件

2.3 添加yaml文件

2.4 在task.py中进行注册

2.5 执行程序

3. 完整代码分享

4. GFLOPs

6. 进阶

7.总结


1.论文

官方论文:Modified YOLO Model for Small Platform Application using SimRepCSP Module with Case Study——点击即可跳转

2. SimRepCSP代码实现

2.1 将SimRepCSP添加到YOLO11中

关键步骤一:将下面代码粘贴到在/ultralytics/ultralytics/nn/modules/block.py中

class RepConv(nn.Module):# Represented convolution# https://arxiv.org/abs/2101.03697def __init__(self, c1, c2, k=3, s=1, p=None, g=1, act=True, deploy=False):super(RepConv, self).__init__()self.deploy = deployself.groups = gself.in_channels = c1self.out_channels = c2assert k == 3assert autopad(k, p) == 1padding_11 = autopad(k, p) - k // 2self.act = nn.SiLU() if act is True else (act if isinstance(act, nn.Module) else nn.Identity()) #if deploy:self.rbr_reparam = nn.Conv2d(c1, c2, k, s, autopad(k, p), groups=g, bias=True)else:self.rbr_identity = (nn.BatchNorm2d(num_features=c1) if c2 == c1 and s == 1 else None)self.rbr_dense = nn.Sequential(nn.Conv2d(c1, c2, k, s, autopad(k, p), groups=g, bias=False),nn.BatchNorm2d(num_features=c2),)self.rbr_1x1 = nn.Sequential(nn.Conv2d( c1, c2, 1, s, padding_11, groups=g, bias=False),nn.BatchNorm2d(num_features=c2),)def forward(self, inputs):if hasattr(self, "rbr_reparam"):return self.act(self.rbr_reparam(inputs))if self.rbr_identity is None:id_out = 0else:id_out = self.rbr_identity(inputs)return self.act(self.rbr_dense(inputs) + self.rbr_1x1(inputs) + id_out)def get_equivalent_kernel_bias(self):kernel3x3, bias3x3 = self._fuse_bn_tensor(self.rbr_dense)kernel1x1, bias1x1 = self._fuse_bn_tensor(self.rbr_1x1)kernelid, biasid = self._fuse_bn_tensor(self.rbr_identity)return (kernel3x3 + self._pad_1x1_to_3x3_tensor(kernel1x1) + kernelid,bias3x3 + bias1x1 + biasid,)def _pad_1x1_to_3x3_tensor(self, kernel1x1):if kernel1x1 is None:return 0else:return nn.functional.pad(kernel1x1, [1, 1, 1, 1])def _fuse_bn_tensor(self, branch):if branch is None:return 0, 0if isinstance(branch, nn.Sequential):kernel = branch[0].weightrunning_mean = branch[1].running_meanrunning_var = branch[1].running_vargamma = branch[1].weightbeta = branch[1].biaseps = branch[1].epselse:assert isinstance(branch, nn.BatchNorm2d)if not hasattr(self, "id_tensor"):input_dim = self.in_channels // self.groupskernel_value = np.zeros((self.in_channels, input_dim, 3, 3), dtype=np.float32)for i in range(self.in_channels):kernel_value[i, i % input_dim, 1, 1] = 1self.id_tensor = torch.from_numpy(kernel_value).to(branch.weight.device)kernel = self.id_tensorrunning_mean = branch.running_meanrunning_var = branch.running_vargamma = branch.weightbeta = branch.biaseps = branch.epsstd = (running_var + eps).sqrt()t = (gamma / std).reshape(-1, 1, 1, 1)return kernel * t, beta - running_mean * gamma / stddef repvgg_convert(self):kernel, bias = self.get_equivalent_kernel_bias()return (kernel.detach().cpu().numpy(),bias.detach().cpu().numpy(),)def fuse_conv_bn(self, conv, bn):std = (bn.running_var + bn.eps).sqrt()bias = bn.bias - bn.running_mean * bn.weight / stdt = (bn.weight / std).reshape(-1, 1, 1, 1)weights = conv.weight * tbn = nn.Identity()conv = nn.Conv2d(in_channels = conv.in_channels,out_channels = conv.out_channels,kernel_size = conv.kernel_size,stride=conv.stride,padding = conv.padding,dilation = conv.dilation,groups = conv.groups,bias = True,padding_mode = conv.padding_mode)conv.weight = torch.nn.Parameter(weights)conv.bias = torch.nn.Parameter(bias)return convdef fuse_repvgg_block(self):    if self.deploy:returnprint(f"RepConv.fuse_repvgg_block")self.rbr_dense = self.fuse_conv_bn(self.rbr_dense[0], self.rbr_dense[1])self.rbr_1x1 = self.fuse_conv_bn(self.rbr_1x1[0], self.rbr_1x1[1])rbr_1x1_bias = self.rbr_1x1.biasweight_1x1_expanded = torch.nn.functional.pad(self.rbr_1x1.weight, [1, 1, 1, 1])# Fuse self.rbr_identityif (isinstance(self.rbr_identity, nn.BatchNorm2d) or isinstance(self.rbr_identity, nn.modules.batchnorm.SyncBatchNorm)):# print(f"fuse: rbr_identity == BatchNorm2d or SyncBatchNorm")identity_conv_1x1 = nn.Conv2d(in_channels=self.in_channels,out_channels=self.out_channels,kernel_size=1,stride=1,padding=0,groups=self.groups, bias=False)identity_conv_1x1.weight.data = identity_conv_1x1.weight.data.to(self.rbr_1x1.weight.data.device)identity_conv_1x1.weight.data = identity_conv_1x1.weight.data.squeeze().squeeze()# print(f" identity_conv_1x1.weight = {identity_conv_1x1.weight.shape}")identity_conv_1x1.weight.data.fill_(0.0)identity_conv_1x1.weight.data.fill_diagonal_(1.0)identity_conv_1x1.weight.data = identity_conv_1x1.weight.data.unsqueeze(2).unsqueeze(3)# print(f" identity_conv_1x1.weight = {identity_conv_1x1.weight.shape}")identity_conv_1x1 = self.fuse_conv_bn(identity_conv_1x1, self.rbr_identity)bias_identity_expanded = identity_conv_1x1.biasweight_identity_expanded = torch.nn.functional.pad(identity_conv_1x1.weight, [1, 1, 1, 1])            else:# print(f"fuse: rbr_identity != BatchNorm2d, rbr_identity = {self.rbr_identity}")bias_identity_expanded = torch.nn.Parameter( torch.zeros_like(rbr_1x1_bias) )weight_identity_expanded = torch.nn.Parameter( torch.zeros_like(weight_1x1_expanded) )            #print(f"self.rbr_1x1.weight = {self.rbr_1x1.weight.shape}, ")#print(f"weight_1x1_expanded = {weight_1x1_expanded.shape}, ")#print(f"self.rbr_dense.weight = {self.rbr_dense.weight.shape}, ")self.rbr_dense.weight = torch.nn.Parameter(self.rbr_dense.weight + weight_1x1_expanded + weight_identity_expanded)self.rbr_dense.bias = torch.nn.Parameter(self.rbr_dense.bias + rbr_1x1_bias + bias_identity_expanded)self.rbr_reparam = self.rbr_denseself.deploy = Trueif self.rbr_identity is not None:del self.rbr_identityself.rbr_identity = Noneif self.rbr_1x1 is not None:del self.rbr_1x1self.rbr_1x1 = Noneif self.rbr_dense is not None:del self.rbr_denseself.rbr_dense = None

2.2 更改init.py文件

关键步骤二:修改modules文件夹下的__init__.py文件,先导入函数

然后在下面的__all__中声明函数

2.3 添加yaml文件

关键步骤三:在/ultralytics/ultralytics/cfg/models/11下面新建文件yolo11_SimRepCSP.yaml文件,粘贴下面的内容

  • 目标检测
# Ultralytics YOLO 🚀, AGPL-3.0 license
# YOLOv8 object detection model. More improvement points for YOLOv8, please see https://github.com/iscyy/ultralyticsPro# Parameters
nc: 80  # number of classes
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'# [depth, width, max_channels]n: [0.33, 0.25, 1024]  # YOLOv8n summary: 225 layers,  3157200 parameters,  3157184 gradients,   8.9 GFLOPss: [0.33, 0.50, 1024]  # YOLOv8s summary: 225 layers, 11166560 parameters, 11166544 gradients,  28.8 GFLOPsm: [0.67, 0.75, 768]   # YOLOv8m summary: 295 layers, 25902640 parameters, 25902624 gradients,  79.3 GFLOPsl: [1.00, 1.00, 512]   # YOLOv8l summary: 365 layers, 43691520 parameters, 43691504 gradients, 165.7 GFLOPsx: [1.00, 1.25, 512]   # YOLOv8x summary: 365 layers, 68229648 parameters, 68229632 gradients, 258.5 GFLOPs# YOLOv8.0n backbone
backbone:# [from, repeats, module, args]- [-1, 1, Conv, [64, 3, 2]]  # 0-P1/2- [-1, 1, Conv, [128, 3, 2]]  # 1-P2/4- [-1, 1, Conv, [64, 1, 1]]- [-1, 1, RepConv, [64, 3, 1]]- [[-1,-2], 1, Concat, [1]] #4- [-1, 1, Conv, [128, 1, 1]]- [-1, 1, Conv, [256, 3, 2]]- [-1, 1, Conv, [128, 1, 1]] #7- [-1, 1, RepConv, [128, 3, 1]] #8- [[-1,-2], 1, Concat, [1]] #9-  [-1, 1, Conv, [256, 1, 1]]  #10 -P4/16 - [-1, 1, Conv, [512, 3, 2]] #11- [-1, 1, Conv, [256, 1, 1]] #12- [-1, 1, RepConv, [256, 3, 1]] #13- [[-1,-2], 1, Concat, [1]] #14- [-1, 1, Conv, [512, 1, 1]] #15- [-1, 1, Conv, [1024, 3, 2]]  # 7-P5/32 16- [-1, 1, Conv, [512, 1, 1]] #17- [-1, 1, RepConv, [512, 3, 1]] #18- [[-1,-2], 1, Concat, [1]] #19- [-1, 1, Conv, [1024, 1, 1]] #20- [-1, 1, SPPF, [1024, 5]]  # 21# YOLOv8.0n head
head:- [-1, 1, Conv, [512, 1, 1]] #22- [-1, 1, nn.Upsample, [None, 2, 'nearest']]- [[-1, 11], 1, Concat, [1]]  # cat backbone P4- [-1, 3, C3k2, [512, False]]  # 25- [-1, 1, Conv, [256, 1, 1]] #26- [-1, 1, nn.Upsample, [None, 2, 'nearest']]- [[-1, 6], 1, Concat, [1]]  #28 cat backbone P3- [-1, 3, C3k2, [256, False]] # 29 (P3/8-small)- [-1, 1, Conv, [256, 3, 2]]- [[-1,26], 1, Concat, [1]]  # 31 cat head P4- [-1, 3, C3k2, [512, False]]  # 32 (P4/16-medium)- [-1, 1, Conv, [512, 3, 2]]- [[-1, 22], 1, Concat, [1]]  #34 cat head P5- [-1, 3, C3k2, [1024, False]]  #35 (P5/32-large)- [[29, 32, 35], 1, Detect, [nc]]  # Detect(P3, P4, P5)
  • 语义分割
# Ultralytics YOLO 🚀, AGPL-3.0 license
# YOLOv8 object detection model. More improvement points for YOLOv8, please see https://github.com/iscyy/ultralyticsPro# Parameters
nc: 80  # number of classes
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'# [depth, width, max_channels]n: [0.33, 0.25, 1024]  # YOLOv8n summary: 225 layers,  3157200 parameters,  3157184 gradients,   8.9 GFLOPss: [0.33, 0.50, 1024]  # YOLOv8s summary: 225 layers, 11166560 parameters, 11166544 gradients,  28.8 GFLOPsm: [0.67, 0.75, 768]   # YOLOv8m summary: 295 layers, 25902640 parameters, 25902624 gradients,  79.3 GFLOPsl: [1.00, 1.00, 512]   # YOLOv8l summary: 365 layers, 43691520 parameters, 43691504 gradients, 165.7 GFLOPsx: [1.00, 1.25, 512]   # YOLOv8x summary: 365 layers, 68229648 parameters, 68229632 gradients, 258.5 GFLOPs# YOLOv8.0n backbone
backbone:# [from, repeats, module, args]- [-1, 1, Conv, [64, 3, 2]]  # 0-P1/2- [-1, 1, Conv, [128, 3, 2]]  # 1-P2/4- [-1, 1, Conv, [64, 1, 1]]- [-1, 1, RepConv, [64, 3, 1]]- [[-1,-2], 1, Concat, [1]] #4- [-1, 1, Conv, [128, 1, 1]]- [-1, 1, Conv, [256, 3, 2]]- [-1, 1, Conv, [128, 1, 1]] #7- [-1, 1, RepConv, [128, 3, 1]] #8- [[-1,-2], 1, Concat, [1]] #9-  [-1, 1, Conv, [256, 1, 1]]  #10 -P4/16 - [-1, 1, Conv, [512, 3, 2]] #11- [-1, 1, Conv, [256, 1, 1]] #12- [-1, 1, RepConv, [256, 3, 1]] #13- [[-1,-2], 1, Concat, [1]] #14- [-1, 1, Conv, [512, 1, 1]] #15- [-1, 1, Conv, [1024, 3, 2]]  # 7-P5/32 16- [-1, 1, Conv, [512, 1, 1]] #17- [-1, 1, RepConv, [512, 3, 1]] #18- [[-1,-2], 1, Concat, [1]] #19- [-1, 1, Conv, [1024, 1, 1]] #20- [-1, 1, SPPF, [1024, 5]]  # 21# YOLOv8.0n head
head:- [-1, 1, Conv, [512, 1, 1]] #22- [-1, 1, nn.Upsample, [None, 2, 'nearest']]- [[-1, 11], 1, Concat, [1]]  # cat backbone P4- [-1, 3, C3k2, [512, False]]  # 25- [-1, 1, Conv, [256, 1, 1]] #26- [-1, 1, nn.Upsample, [None, 2, 'nearest']]- [[-1, 6], 1, Concat, [1]]  #28 cat backbone P3- [-1, 3, C3k2, [256, False]] # 29 (P3/8-small)- [-1, 1, Conv, [256, 3, 2]]- [[-1,26], 1, Concat, [1]]  # 31 cat head P4- [-1, 3, C3k2, [512, False]]  # 32 (P4/16-medium)- [-1, 1, Conv, [512, 3, 2]]- [[-1, 22], 1, Concat, [1]]  #34 cat head P5- [-1, 3, C3k2, [1024, False]]  #35 (P5/32-large)- [[29, 32, 35], 1, Segment, [nc, 32, 256]] # Segment(P3, P4, P5)
  • 旋转目标检测
# Ultralytics YOLO 🚀, AGPL-3.0 license
# YOLOv8 object detection model. More improvement points for YOLOv8, please see https://github.com/iscyy/ultralyticsPro# Parameters
nc: 80  # number of classes
scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n'# [depth, width, max_channels]n: [0.33, 0.25, 1024]  # YOLOv8n summary: 225 layers,  3157200 parameters,  3157184 gradients,   8.9 GFLOPss: [0.33, 0.50, 1024]  # YOLOv8s summary: 225 layers, 11166560 parameters, 11166544 gradients,  28.8 GFLOPsm: [0.67, 0.75, 768]   # YOLOv8m summary: 295 layers, 25902640 parameters, 25902624 gradients,  79.3 GFLOPsl: [1.00, 1.00, 512]   # YOLOv8l summary: 365 layers, 43691520 parameters, 43691504 gradients, 165.7 GFLOPsx: [1.00, 1.25, 512]   # YOLOv8x summary: 365 layers, 68229648 parameters, 68229632 gradients, 258.5 GFLOPs# YOLOv8.0n backbone
backbone:# [from, repeats, module, args]- [-1, 1, Conv, [64, 3, 2]]  # 0-P1/2- [-1, 1, Conv, [128, 3, 2]]  # 1-P2/4- [-1, 1, Conv, [64, 1, 1]]- [-1, 1, RepConv, [64, 3, 1]]- [[-1,-2], 1, Concat, [1]] #4- [-1, 1, Conv, [128, 1, 1]]- [-1, 1, Conv, [256, 3, 2]]- [-1, 1, Conv, [128, 1, 1]] #7- [-1, 1, RepConv, [128, 3, 1]] #8- [[-1,-2], 1, Concat, [1]] #9-  [-1, 1, Conv, [256, 1, 1]]  #10 -P4/16 - [-1, 1, Conv, [512, 3, 2]] #11- [-1, 1, Conv, [256, 1, 1]] #12- [-1, 1, RepConv, [256, 3, 1]] #13- [[-1,-2], 1, Concat, [1]] #14- [-1, 1, Conv, [512, 1, 1]] #15- [-1, 1, Conv, [1024, 3, 2]]  # 7-P5/32 16- [-1, 1, Conv, [512, 1, 1]] #17- [-1, 1, RepConv, [512, 3, 1]] #18- [[-1,-2], 1, Concat, [1]] #19- [-1, 1, Conv, [1024, 1, 1]] #20- [-1, 1, SPPF, [1024, 5]]  # 21# YOLOv8.0n head
head:- [-1, 1, Conv, [512, 1, 1]] #22- [-1, 1, nn.Upsample, [None, 2, 'nearest']]- [[-1, 11], 1, Concat, [1]]  # cat backbone P4- [-1, 3, C3k2, [512, False]]  # 25- [-1, 1, Conv, [256, 1, 1]] #26- [-1, 1, nn.Upsample, [None, 2, 'nearest']]- [[-1, 6], 1, Concat, [1]]  #28 cat backbone P3- [-1, 3, C3k2, [256, False]] # 29 (P3/8-small)- [-1, 1, Conv, [256, 3, 2]]- [[-1,26], 1, Concat, [1]]  # 31 cat head P4- [-1, 3, C3k2, [512, False]]  # 32 (P4/16-medium)- [-1, 1, Conv, [512, 3, 2]]- [[-1, 22], 1, Concat, [1]]  #34 cat head P5- [-1, 3, C3k2, [1024, False]]  #35 (P5/32-large)- [[29, 32, 35], 1, OBB, [nc, 1]] # OBB(P3, P4, P5)

温馨提示:本文只是对yolo11基础上添加模块,如果要对yolo11n/l/m/x进行添加则只需要指定对应的depth_multiple 和 width_multiple


# YOLO11n
depth_multiple: 0.50  # model depth multiple
width_multiple: 0.25  # layer channel multiple
max_channel:1024# YOLO11s
depth_multiple: 0.50  # model depth multiple
width_multiple: 0.50  # layer channel multiple
max_channel:1024# YOLO11m
depth_multiple: 0.50  # model depth multiple
width_multiple: 1.00  # layer channel multiple
max_channel:512# YOLO11l 
depth_multiple: 1.00  # model depth multiple
width_multiple: 1.00  # layer channel multiple
max_channel:512 # YOLO11x
depth_multiple: 1.00  # model depth multiple
width_multiple: 1.50 # layer channel multiple
max_channel:512

2.4 在task.py中进行注册

关键步骤四:在parse_model函数中进行注册,添加GCNet

先在task.py导入函数

然后在task.py文件下找到parse_model这个函数,如下图,添加GCNet

2.5 执行程序

关键步骤五: 在ultralytics文件中新建train.py,将model的参数路径设置为yolo11_SimRepCSP.yaml的路径即可

from ultralytics import YOLO
import warnings
warnings.filterwarnings('ignore')
from pathlib import Pathif __name__ == '__main__':# 加载模型model = YOLO("ultralytics/cfg/11/yolo11.yaml")  # 你要选择的模型yaml文件地址# Use the modelresults = model.train(data=r"你的数据集的yaml文件地址",epochs=100, batch=16, imgsz=640, workers=4, name=Path(model.cfg).stem)  # 训练模型

   🚀运行程序,如果出现下面的内容则说明添加成功🚀  

                   from  n    params  module                                       arguments0                  -1  1       464  ultralytics.nn.modules.conv.Conv             [3, 16, 3, 2]1                  -1  1      4672  ultralytics.nn.modules.conv.Conv             [16, 32, 3, 2]2                  -1  1       544  ultralytics.nn.modules.conv.Conv             [32, 16, 1, 1]3                  -1  1      2624  ultralytics.nn.modules.conv.RepConv          [16, 16, 3, 1]4            [-1, -2]  1         0  ultralytics.nn.modules.conv.Concat           [1]5                  -1  1      1088  ultralytics.nn.modules.conv.Conv             [32, 32, 1, 1]6                  -1  1     18560  ultralytics.nn.modules.conv.Conv             [32, 64, 3, 2]7                  -1  1      2112  ultralytics.nn.modules.conv.Conv             [64, 32, 1, 1]8                  -1  1     10368  ultralytics.nn.modules.conv.RepConv          [32, 32, 3, 1]9            [-1, -2]  1         0  ultralytics.nn.modules.conv.Concat           [1]10                  -1  1      4224  ultralytics.nn.modules.conv.Conv             [64, 64, 1, 1]11                  -1  1     73984  ultralytics.nn.modules.conv.Conv             [64, 128, 3, 2]12                  -1  1      8320  ultralytics.nn.modules.conv.Conv             [128, 64, 1, 1]13                  -1  1     41216  ultralytics.nn.modules.conv.RepConv          [64, 64, 3, 1]14            [-1, -2]  1         0  ultralytics.nn.modules.conv.Concat           [1]15                  -1  1     16640  ultralytics.nn.modules.conv.Conv             [128, 128, 1, 1]16                  -1  1    295424  ultralytics.nn.modules.conv.Conv             [128, 256, 3, 2]17                  -1  1     33024  ultralytics.nn.modules.conv.Conv             [256, 128, 1, 1]18                  -1  1    164352  ultralytics.nn.modules.conv.RepConv          [128, 128, 3, 1]19            [-1, -2]  1         0  ultralytics.nn.modules.conv.Concat           [1]20                  -1  1     66048  ultralytics.nn.modules.conv.Conv             [256, 256, 1, 1]21                  -1  1    164608  ultralytics.nn.modules.block.SPPF            [256, 256, 5]22                  -1  1     33024  ultralytics.nn.modules.conv.Conv             [256, 128, 1, 1]23                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']24            [-1, 11]  1         0  ultralytics.nn.modules.conv.Concat           [1]25                  -1  1     94912  ultralytics.nn.modules.block.C3k2            [256, 128, 1, False]26                  -1  1      8320  ultralytics.nn.modules.conv.Conv             [128, 64, 1, 1]27                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']28             [-1, 6]  1         0  ultralytics.nn.modules.conv.Concat           [1]29                  -1  1     23904  ultralytics.nn.modules.block.C3k2            [128, 64, 1, False]30                  -1  1     36992  ultralytics.nn.modules.conv.Conv             [64, 64, 3, 2]31            [-1, 26]  1         0  ultralytics.nn.modules.conv.Concat           [1]32                  -1  1     78528  ultralytics.nn.modules.block.C3k2            [128, 128, 1, False]33                  -1  1    147712  ultralytics.nn.modules.conv.Conv             [128, 128, 3, 2]34            [-1, 22]  1         0  ultralytics.nn.modules.conv.Concat           [1]35                  -1  1    312704  ultralytics.nn.modules.block.C3k2            [256, 256, 1, False]36        [29, 32, 35]  1    464912  ultralytics.nn.modules.head.Detect           [80, [64, 128, 256]]
YOLO11_SimRepCSP summary: 246 layers, 2,109,280 parameters, 2,109,264 gradients, 5.4 GFLOPs

3. 完整代码分享

这个后期补充吧~,先按照步骤来即可

4. GFLOPs

关于GFLOPs的计算方式可以查看百面算法工程师 | 卷积基础知识——Convolution

未改进的YOLO11n GFLOPs

改进后的GFLOPs

6. 进阶

可以与其他的注意力机制或者损失函数等结合,进一步提升检测效果

7.总结

通过以上的改进方法,我们成功提升了模型的表现。这只是一个开始,未来还有更多优化和技术深挖的空间。在这里,我想隆重向大家推荐我的专栏——<专栏地址:YOLO11入门 + 改进涨点——点击即可跳转 欢迎订阅>。这个专栏专注于前沿的深度学习技术,特别是目标检测领域的最新进展,不仅包含对YOLO11的深入解析和改进策略,还会定期更新来自各大顶会(如CVPR、NeurIPS等)的论文复现和实战分享。

为什么订阅我的专栏? ——专栏地址:YOLO11入门 + 改进涨点——点击即可跳转 欢迎订阅

  1. 前沿技术解读:专栏不仅限于YOLO系列的改进,还会涵盖各类主流与新兴网络的最新研究成果,帮助你紧跟技术潮流。

  2. 详尽的实践分享:所有内容实践性也极强。每次更新都会附带代码和具体的改进步骤,保证每位读者都能迅速上手。

  3. 问题互动与答疑:订阅我的专栏后,你将可以随时向我提问,获取及时的答疑

  4. 实时更新,紧跟行业动态:不定期发布来自全球顶会的最新研究方向和复现实验报告,让你时刻走在技术前沿。

专栏适合人群:

  • 对目标检测、YOLO系列网络有深厚兴趣的同学

  • 希望在用YOLO算法写论文的同学

  • 对YOLO算法感兴趣的同学等

关键字:促销推广方式有哪些_建筑工程办理资质_百度q3财报减亏170亿_广州专门做网站

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: