当前位置: 首页 > news >正文

园林景观网站模板什么是网站优化

园林景观网站模板,什么是网站优化,建个企业网站需要多少钱,开发一个app的资质要求原论文地址#xff1a;原论文地址 DoubleAttention网络结构的优点在于#xff0c;它能够有效地捕获图像中不同位置和不同特征的重要性#xff0c;从而提高了图像识别和分割的性能。 论文相关内容介绍#xff1a; 论文摘要#xff1a;学习捕捉远程关系是图像/视频识别的…原论文地址原论文地址 DoubleAttention网络结构的优点在于它能够有效地捕获图像中不同位置和不同特征的重要性从而提高了图像识别和分割的性能。  论文相关内容介绍 论文摘要学习捕捉远程关系是图像/视频识别的基础。现有的CNN模型通常依赖于增加深度来建模这种关系这是非常低效的。在这项工作中我们提出了“双注意块”这是一种新的组件它从输入图像/视频的整个时空空间中聚集和传播信息全局特征使后续卷积层能够有效地从整个空间中访问特征。该组件采用双注意机制分两步进行设计第一步通过二阶注意池将整个空间的特征聚集成一个紧凑的集合第二步通过另一个注意自适应地选择特征并将其分配到每个位置。所提出的双注意块易于采用并且可以方便地插入现有的深度神经网络中。我们对图像和视频识别任务进行了广泛的消融研究和实验以评估其性能。在图像识别任务上配备我们的双注意力块的ResNet-50在ImageNet-1k数据集上的性能优于更大的ResNet-152架构参数数量减少了40%以上FLOPs也减少了。在动作识别任务上我们提出的模型在Kinetics和UCF-101数据集上取得了最先进的结果效率显著高于最近的工作。 A2-Net与SENet有点类似但是不同点在于它的第一个注意力操作隐式地计算池化特征的二阶统计并能捕获SENet中使用的全局平均池化无法捕获的复杂外观和运动相关性 2.yolov8加入DoubleAttention的步骤 2.1 在/ultralytics/nn/modules/block.py添加代码到末尾 class DoubleAttention(nn.Module):def __init__(self, in_channels,c_m128,c_n128,reconstruct True):super().__init__()self.in_channelsin_channelsself.reconstruct reconstructself.c_mc_mself.c_nc_nself.convAnn.Conv2d(in_channels,c_m,1)self.convBnn.Conv2d(in_channels,c_n,1)self.convVnn.Conv2d(in_channels,c_n,1)if self.reconstruct:self.conv_reconstruct nn.Conv2d(c_m, in_channels, kernel_size 1)self.init_weights()def init_weights(self):for m in self.modules():if isinstance(m, nn.Conv2d):init.kaiming_normal_(m.weight, modefan_out)if m.bias is not None:init.constant_(m.bias, 0)elif isinstance(m, nn.BatchNorm2d):init.constant_(m.weight, 1)init.constant_(m.bias, 0)elif isinstance(m, nn.Linear):init.normal_(m.weight, std0.001)if m.bias is not None:init.constant_(m.bias, 0)def forward(self, x):b, c, h,wx.shapeassert cself.in_channelsAself.convA(x) #b,c_m,h,wBself.convB(x) #b,c_n,h,wVself.convV(x) #b,c_n,h,wtmpAA.view(b,self.c_m,-1)attention_mapsF.softmax(B.view(b,self.c_n,-1))attention_vectorsF.softmax(V.view(b,self.c_n,-1))# step 1: feature gatingglobal_descriptorstorch.bmm(tmpA,attention_maps.permute(0,2,1)) #b.c_m,c_n# step 2: feature distributiontmpZ global_descriptors.matmul(attention_vectors) #b,c_m,h*wtmpZtmpZ.view(b,self.c_m,h,w) #b,c_m,h,wif self.reconstruct:tmpZself.conv_reconstruct(tmpZ)return tmpZ 2.2 在/ultralytics/nn/modules/block.py的头部all里面将”DoubleAttention加入到末尾 __all__ (DFL,HGBlock,HGStem,SPP,SPPF,C1,C2,C3,C2f,C2fAttn,ImagePoolingAttn,ContrastiveHead,BNContrastiveHead,C3x,C3TR,C3Ghost,GhostBottleneck,Bottleneck,BottleneckCSP,Proto,RepC3,ResNetLayer,RepNCSPELAN4,ADown,SPPELAN,CBFuse,CBLinear,Silence,DoubleAttention,)2.3在/ultralytics/nn/modules/__init__.py的头部 from .block import ( 里面将”CoTAttention加入到末尾 from .block import (C1,C2,C3,C3TR,DFL,SPP,SPPF,Bottleneck,BottleneckCSP,C2f,C2fAttn,ImagePoolingAttn,C3Ghost,C3x,GhostBottleneck,HGBlock,HGStem,Proto,RepC3,ResNetLayer,ContrastiveHead,BNContrastiveHead,RepNCSPELAN4,ADown,SPPELAN,CBFuse,CBLinear,Silence,DoubleAttention, ) 2.4 在/ultralytics/nn/tasks.py from ultralytics.nn.modules import (C1, C2, C3, C3TR, SPP, SPPF, Bottleneck, BottleneckCSP, C2f, C3Ghost, C3x, Classify,Concat, Conv,ConvTranspose, Detect, DWConv, DWConvTranspose2d, Ensemble, Focus,GhostBottleneck, GhostConv, Segment, DoubleAttention) def parse_model(d, ch, verboseTrue):  加入以下代码: elif m is DoubleAttention:c1, c2 ch[f], args[0]if c2 ! nc:c2 make_divisible(min(c2, max_channels) * width, 8)args [c1, *args[1:]]2.5 yolov8_DoubleAttention.yaml # Ultralytics YOLO , GPL-3.0 license # YOLOv8 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/detect# Parameters nc: 4 # number of classes scales: # model compound scaling constants, i.e. modelyolov8n.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, 3, C2f, [128, True]]- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8- [-1, 6, C2f, [256, True]]- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16- [-1, 6, C2f, [512, True]]- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32- [-1, 3, C2f, [1024, True]]- [-1, 1, SPPF, [1024, 5]] # 9# YOLOv8.0n head head:- [-1, 1, nn.Upsample, [None, 2, nearest]]- [[-1, 6], 1, Concat, [1]] # cat backbone P4- [-1, 3, C2f, [512]] # 12- [-1, 1, nn.Upsample, [None, 2, nearest]]- [[-1, 4], 1, Concat, [1]] # cat backbone P3- [-1, 3, C2f, [256]] # 15 (P3/8-small)- [-1, 1, Conv, [256, 3, 2]]- [[-1, 12], 1, Concat, [1]] # cat head P4- [-1, 3, C2f, [512]] # 18 (P4/16-medium)- [-1, 1, Conv, [512, 3, 2]]- [[-1, 9], 1, Concat, [1]] # cat head P5- [-1, 3, C2f, [1024]] # 21 (P5/32-large)- [-1, 1, DoubleAttention, [1024]] - [[15, 18, 22], 1, Detect, [nc]] # Detect(P3, P4, P5)
http://www.pierceye.com/news/668276/

相关文章:

  • 正黄集团博弘建设官方网站达州高端网站建设
  • 七台河建设网站wordpress logo制作
  • 怎么设计一个自己的网站番禺网站建设效果
  • 网站哪家做的好淄博网站开发选网泰
  • 网站建设与制作与维护ppt百度广告联盟收益
  • 在线网站建设费用是多少大学生活动策划书模板
  • 动物网站建设wordpress无法跳转正确页面
  • 上海市建设工程 安全协会网站wordpress会员微信支付宝
  • pc网站转换手机网站代码桂林工作网招聘
  • 营销型网站建设的要素怎么建网站赚钱
  • 成都网站建设学习郑州制作网站推荐
  • 网站建设 镇江丹阳php网站开发实例教程代码
  • 佛山外贸网站建设方案专业网站建设系统
  • 做一个网站团队需要哪些人员花钱也可以哪些网站可以做推广广告
  • 各省施工备案网站做动漫网站的素材
  • 新余网站设计网站模板做网站
  • 防止服务器上的网站被进攻app推广兼职
  • 保定电商网站建设国内最好的crm软件
  • 企业网站建设哪家公司好莱芜金点子信息港房产网
  • 个人可以建设网站吗海淀网站建设本溪
  • 宜昌网站建设兼职怎样做自媒体拍视频赚钱
  • 我的世界做视频封面的网站免费的app源码网
  • 网站搭建wordpress参考消息电子版在线阅读
  • 成立一个网站平台要多少钱科技有限公司一般是做什么的
  • 邵阳 网站开发 招聘桂林阳朔楼盘最新价格
  • 如何建设网站导航内链接wordpress 特别慢
  • 蚌埠网站建设文章网站软件定制开发公司
  • 软件通网站建设百度收录网站电话
  • 取消网站备案制度正规的电商平台有哪些
  • 茶叶网站源码php6731官方网站下载