FCN + Unet+FusionNet+segnet+deconvNet的区别--->个人的理解(可能有偏差)

1,FCN 开山之作
1)把全卷积转换成了卷积网络
2)像素级别融合+跳跃连接
3)反卷积
实验证明是FCN-8s是最佳网络。在这里插入图片描述
2、U-Net
1)继续沿用卷积神经网络
2)反卷积+对等层的通道数增加,不是像素数值增加,尺寸保持不变,可以不全以前丢失信息。
3)设计了加权损失函数,该函数可以使得细胞与细胞之间的很细很窄距离,通过该函数可以很好的确定下来。
是反卷积层的特征层和对应的encoder的卷积层两者进行channels连叠加,在进行卷积,然后在反卷积,然后再与对应的卷积层进行channels的叠加,以此类推。
在这里插入图片描述

3、FusionNet
1)改编了U-net,加入了padding
2)引入了残差快,是对应的像素数值叠加。
3)长连接,对应的层数连接。是对应的像素数值叠加。

在这里插入图片描述
4.SegNet
1)encoder-decoder-pixel-wise,解码编码的推广。
2)decoder,反池化pooling index进行的非线性上采样。
3)多做实验多对比
4)内存与准确率的比例设定得很好。
Segnet是把conv对应层数直接拿过来使用,然后进行最大反赤化的应用。

在这里插入图片描述
5.DeconvNet
1)在decoder部分是:反卷积+反池化,逐像素级别完成。
改论文最大优点,结构合理,在每部分的文字叙述中逻辑好,可以借鉴。

在这里插入图片描述
总结:
1)注意搜集实验数据,
2)注意经典段落的收集
3)错误实验结果也是论文一部分
4)复现经典论文,注意拿源代码,自己复现不能百分百实现,很正常,不要列举具体的数据标准,可能存在误差,属于剽窃,可以列举图片差别,最直接。

U-Net模型通常用于图像分割任务,包括医学图像分割。使用U-Net模型需要一些深度学习框架,如TensorFlow、PyTorch、Keras等。以下是使用PyTorch框架的U-Net模型的示例代码: ```python import torch import torch.nn as nn class DoubleConv(nn.Module): def __init__(self, in_channels, out_channels): super(DoubleConv, self).__init__() self.conv = nn.Sequential( nn.Conv2d(in_channels, out_channels, 3, 1, 1, bias=False), nn.BatchNorm2d(out_channels), nn.ReLU(inplace=True), nn.Conv2d(out_channels, out_channels, 3, 1, 1, bias=False), nn.BatchNorm2d(out_channels), nn.ReLU(inplace=True) ) def forward(self, x): return self.conv(x) class UNet(nn.Module): def __init__(self, in_channels=1, out_channels=1, features=[64, 128, 256, 512]): super(UNet, self).__init__() self.ups = nn.ModuleList() self.downs = nn.ModuleList() self.pool = nn.MaxPool2d(kernel_size=2, stride=2) # Down part of UNet for feature in features: self.downs.append(DoubleConv(in_channels, feature)) in_channels = feature # Up part of UNet for feature in reversed(features): self.ups.append(nn.ConvTranspose2d(feature*2, feature, kernel_size=2, stride=2)) self.ups.append(DoubleConv(feature*2, feature)) self.bottleneck = DoubleConv(features[-1], features[-1]*2) self.final_conv = nn.Conv2d(features[0], out_channels, kernel_size=1) def forward(self, x): skip_connections = [] # Down part of UNet for down in self.downs: x = down(x) skip_connections.append(x) x = self.pool(x) # Bottleneck of UNet x = self.bottleneck(x) # Up part of UNet for idx in range(0, len(self.ups), 2): x = self.ups[idx](x) skip_connection = skip_connections[len(skip_connections) - idx//2 - 1] if x.shape != skip_connection.shape: x = nn.functional.pad(x, (0, skip_connection.shape[3] - x.shape[3], 0, skip_connection.shape[2] - x.shape[2])) concat_skip = torch.cat((skip_connection, x), dim=1) x = self.ups[idx+1](concat_skip) return self.final_conv(x) ``` 在使用已构建好的U-Net模型时,需要先加载模型的权重文件,然后使用模型对输入数据进行预测。以下是一个使用PyTorch中已经训练好的U-Net模型进行图像分割的示例代码: ```python import torch import torch.nn as nn import numpy as np from PIL import Image # Load the pre-trained U-Net model model = torch.hub.load('mateuszbuda/brain-segmentation-pytorch', 'unet', in_channels=3, out_channels=1, init_features=32, pretrained=True) # Load the input image img = Image.open('input.jpg') # Preprocess the input image img = np.array(img) img = np.transpose(img, (2, 0, 1)) img = img.astype(np.float32) / 255.0 img = np.expand_dims(img, axis=0) # Perform the inference with torch.no_grad(): output = model(torch.from_numpy(img)) # Post-process the output image output = output.sigmoid().cpu().numpy() output = np.squeeze(output) output = np.transpose(output, (1, 2, 0)) output = (output * 255.0).astype(np.uint8) # Save the output image Image.fromarray(output).save('output.jpg') ``` 对于CT肺段的自动分割,U-Net模型是一种常用的方法。此外,还可以使用其他的深度学习模型,如FCNSegNet等。数据集的选择也很重要,应该选择具有足够多样性和数量的数据集。最后,模型的训练需要耗费大量时间和计算资源,因此推荐使用GPU进行训练。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值