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

山西网站建设多少钱该如何与网站设计公司沟通

山西网站建设多少钱,该如何与网站设计公司沟通,网站开发工具有哪些,江苏同隆建设集团有限公司网站第一步#xff1a;准备数据 动物马分割数据#xff0c;总共有328张图片#xff0c;里面的像素值为0和1#xff0c;所以看起来全部是黑的#xff0c;不影响使用 第二步#xff1a;搭建模型 psp模块的样式如下#xff0c;其psp的核心重点是采用了步长不同#xff0c;po…  第一步准备数据 动物马分割数据总共有328张图片里面的像素值为0和1所以看起来全部是黑的不影响使用 第二步搭建模型 psp模块的样式如下其psp的核心重点是采用了步长不同pool_size不同的平均池化层进行池化然后将池化的结果重新resize到一个hw上后再concatenate。 即 红色这是在每个特征map上执行全局平均池的最粗略层次用于生成单个bin输出。 橙色这是第二层将特征map划分为2×2个子区域然后对每个子区域进行平均池化。 蓝色这是第三层将特征 map划分为3×3个子区域然后对每个子区域进行平均池化。 绿色这是将特征map划分为6×6个子区域的最细层次然后对每个子区域执行池化。 第三步代码 1损失函数为交叉熵损失函数 2网络代码 import torch import torch.nn.functional as F from torch import nnfrom nets.mobilenetv2 import mobilenetv2 from nets.resnet import resnet50class Resnet(nn.Module):def __init__(self, dilate_scale8, pretrainedTrue):super(Resnet, self).__init__()from functools import partialmodel resnet50(pretrained)#--------------------------------------------------------------------------------------------## 根据下采样因子修改卷积的步长与膨胀系数# 当downsample_factor16的时候我们最终获得两个特征层shape分别是30,30,1024和30,30,2048#--------------------------------------------------------------------------------------------#if dilate_scale 8:model.layer3.apply(partial(self._nostride_dilate, dilate2))model.layer4.apply(partial(self._nostride_dilate, dilate4))elif dilate_scale 16:model.layer4.apply(partial(self._nostride_dilate, dilate2))self.conv1 model.conv1[0]self.bn1 model.conv1[1]self.relu1 model.conv1[2]self.conv2 model.conv1[3]self.bn2 model.conv1[4]self.relu2 model.conv1[5]self.conv3 model.conv1[6]self.bn3 model.bn1self.relu3 model.reluself.maxpool model.maxpoolself.layer1 model.layer1self.layer2 model.layer2self.layer3 model.layer3self.layer4 model.layer4def _nostride_dilate(self, m, dilate):classname m.__class__.__name__if classname.find(Conv) ! -1:if m.stride (2, 2):m.stride (1, 1)if m.kernel_size (3, 3):m.dilation (dilate//2, dilate//2)m.padding (dilate//2, dilate//2)else:if m.kernel_size (3, 3):m.dilation (dilate, dilate)m.padding (dilate, dilate)def forward(self, x):x self.relu1(self.bn1(self.conv1(x)))x self.relu2(self.bn2(self.conv2(x)))x self.relu3(self.bn3(self.conv3(x)))x self.maxpool(x)x self.layer1(x)x self.layer2(x)x_aux self.layer3(x)x self.layer4(x_aux)return x_aux, xclass MobileNetV2(nn.Module):def __init__(self, downsample_factor8, pretrainedTrue):super(MobileNetV2, self).__init__()from functools import partialmodel mobilenetv2(pretrained)self.features model.features[:-1]self.total_idx len(self.features)self.down_idx [2, 4, 7, 14]#--------------------------------------------------------------------------------------------## 根据下采样因子修改卷积的步长与膨胀系数# 当downsample_factor16的时候我们最终获得两个特征层shape分别是30,30,320和30,30,96#--------------------------------------------------------------------------------------------#if downsample_factor 8:for i in range(self.down_idx[-2], self.down_idx[-1]):self.features[i].apply(partial(self._nostride_dilate, dilate2))for i in range(self.down_idx[-1], self.total_idx):self.features[i].apply(partial(self._nostride_dilate, dilate4))elif downsample_factor 16:for i in range(self.down_idx[-1], self.total_idx):self.features[i].apply(partial(self._nostride_dilate, dilate2))def _nostride_dilate(self, m, dilate):classname m.__class__.__name__if classname.find(Conv) ! -1:if m.stride (2, 2):m.stride (1, 1)if m.kernel_size (3, 3):m.dilation (dilate//2, dilate//2)m.padding (dilate//2, dilate//2)else:if m.kernel_size (3, 3):m.dilation (dilate, dilate)m.padding (dilate, dilate)def forward(self, x):x_aux self.features[:14](x)x self.features[14:](x_aux)return x_aux, xclass _PSPModule(nn.Module):def __init__(self, in_channels, pool_sizes, norm_layer):super(_PSPModule, self).__init__()out_channels in_channels // len(pool_sizes)#-----------------------------------------------------## 分区域进行平均池化# 30, 30, 320 30, 30, 80 30, 30, 80 30, 30, 80 30, 30, 80 30, 30, 640#-----------------------------------------------------#self.stages nn.ModuleList([self._make_stages(in_channels, out_channels, pool_size, norm_layer) for pool_size in pool_sizes])# 30, 30, 640 - 30, 30, 80self.bottleneck nn.Sequential(nn.Conv2d(in_channels (out_channels * len(pool_sizes)), out_channels, kernel_size3, padding1, biasFalse),norm_layer(out_channels),nn.ReLU(inplaceTrue),nn.Dropout2d(0.1))def _make_stages(self, in_channels, out_channels, bin_sz, norm_layer):prior nn.AdaptiveAvgPool2d(output_sizebin_sz)conv nn.Conv2d(in_channels, out_channels, kernel_size1, biasFalse)bn norm_layer(out_channels)relu nn.ReLU(inplaceTrue)return nn.Sequential(prior, conv, bn, relu)def forward(self, features):h, w features.size()[2], features.size()[3]pyramids [features]pyramids.extend([F.interpolate(stage(features), size(h, w), modebilinear, align_cornersTrue) for stage in self.stages])output self.bottleneck(torch.cat(pyramids, dim1))return outputclass PSPNet(nn.Module):def __init__(self, num_classes, downsample_factor, backboneresnet50, pretrainedTrue, aux_branchTrue):super(PSPNet, self).__init__()norm_layer nn.BatchNorm2dif backboneresnet50:self.backbone Resnet(downsample_factor, pretrained)aux_channel 1024out_channel 2048elif backbonemobilenet:#----------------------------------## 获得两个特征层# f4为辅助分支 [30,30,96]# o为主干部分 [30,30,320]#----------------------------------#self.backbone MobileNetV2(downsample_factor, pretrained)aux_channel 96out_channel 320else:raise ValueError(Unsupported backbone - {}, Use mobilenet, resnet50..format(backbone))#--------------------------------------------------------------## PSP模块分区域进行池化# 分别分割成1x1的区域2x2的区域3x3的区域6x6的区域# 30,30,320 - 30,30,80 - 30,30,21#--------------------------------------------------------------#self.master_branch nn.Sequential(_PSPModule(out_channel, pool_sizes[1, 2, 3, 6], norm_layernorm_layer),nn.Conv2d(out_channel//4, num_classes, kernel_size1))self.aux_branch aux_branchif self.aux_branch:#---------------------------------------------------## 利用特征获得预测结果# 30, 30, 96 - 30, 30, 40 - 30, 30, 21#---------------------------------------------------#self.auxiliary_branch nn.Sequential(nn.Conv2d(aux_channel, out_channel//8, kernel_size3, padding1, biasFalse),norm_layer(out_channel//8),nn.ReLU(inplaceTrue),nn.Dropout2d(0.1),nn.Conv2d(out_channel//8, num_classes, kernel_size1))self.initialize_weights(self.master_branch)def forward(self, x):input_size (x.size()[2], x.size()[3])x_aux, x self.backbone(x)output self.master_branch(x)output F.interpolate(output, sizeinput_size, modebilinear, align_cornersTrue)if self.aux_branch:output_aux self.auxiliary_branch(x_aux)output_aux F.interpolate(output_aux, sizeinput_size, modebilinear, align_cornersTrue)return output_aux, outputelse:return outputdef initialize_weights(self, *models):for model in models:for m in model.modules():if isinstance(m, nn.Conv2d):nn.init.kaiming_normal_(m.weight.data, nonlinearityrelu)elif isinstance(m, nn.BatchNorm2d):m.weight.data.fill_(1.)m.bias.data.fill_(1e-4)elif isinstance(m, nn.Linear):m.weight.data.normal_(0.0, 0.0001)m.bias.data.zero_()第四步统计一些指标训练过程中的loss和miou 第五步搭建GUI界面 第六步整个工程的内容 整套算法系列语义分割实战演练_AI洲抿嘴的薯片的博客-CSDN博客 项目源码下载地址关注文末【AI街潜水的八角】回复【动物马分割】即可下载 整套项目源码内容包含 有训练代码和训练好的模型以及训练过程提供数据提供GUI界面代码
http://www.dnsts.com.cn/news/75260.html

相关文章:

  • 个人可以建门户网站吗p2p网站建设公司排名
  • 电子商务网站建设的参考文献系统门户网站建设常用功能
  • 网站后台开发费用手机活动网站模板
  • 青海建设工程信息网站坯子库登录成wordpress
  • 做恒生指数看什么网站做网站网上接单
  • 网站字体大连爱得科技网站建设公司怎么样
  • 网站的设计思路怎么写如何给wordpress文章部分内容加密
  • 郑州直播网站建设网站上传的流程图
  • 网站开发属于计算机系统开发吗wordpress挂黑页
  • 山东前网站建设成都住建局官网网上办事大厅
  • 网站入口东莞市企业信息公示网
  • 房天下官方网站那个网站可以做视频app制作的
  • 上海网站开发哪里有文字logo设计生成器
  • 杭州响应式网站案例杭州建设项目审批网站
  • html做网站需要服务器吗网站建设公司对比分析报告
  • 河南做网站推广网络营销课程设计计划书
  • 网站设计流行趋势wordpress网站网页加密
  • 性价比最高网站建设电话微商小程序制作
  • 网站建设部打码网站怎么做接口
  • 短视频素材下载网站 免费为什么百度搜出来的网站只有网址没有网站名和网页摘要.
  • 商城推广软文范文页面优化算法
  • asp.net网站安装顺序动漫制作专业有哪些职业岗位
  • 网站制作需要什么知识响应式网站开发视频
  • 免费追剧网站wordpress子页面密码
  • 建网站软件 优帮云网站备案的网站名称
  • 提高整个网站权重定期做图书推荐的网站
  • 网站安全建设进展情况做外贸的社交网站
  • 为审核资质帮别人做的网站wordpress 蛋花
  • 制作网站要花多少钱如何上海新建设建筑设计有限公司网站
  • 深圳建网站兴田德润可信建设银行广西分行网站