A MULTI-TASK FRAMEWORK WITH FEATURE PASSING MODULE FOR SKIN LESION CLASSIFICATION AND SEGMENTATION

摘要:

1.分割任务和分类任务是有联系的

2.设计了一个特征融合模块在分类分支和分割分支之间传递信息

3.有些信息是有用有些信息是无用的,所以设置了一个门函数来控制信息之间的传递

 

introduction:

1.低层共享特征,我们提出多任务结构,能够稍微提高准确率和节省时间

2.为了进一步深挖两个任务之间的依赖,用门函数来控制传送信息

3.可学习的门功能用于控制消息传输,因此只有有用的信息才能通过。 实验结果表明了我们提出的方法的优越性。

THE PROPOSED METHODS:

所提算法的概述如图1所示。我们首先使用FeatureNet从输入的皮肤镜图像中提取特征,然后将它们提供给ClsNet进行分类,将SegNet提供给分割。 建议的特征传递模块用于链接ClsNet和SegNet,以便来自两个任务的信息可以相互流动。在本节中,我们首先描述多任务架构,包括FeatureNet,ClsNet和SegNet。 然后我们进入功能传递模块的细节。

2.1. Multi-task architecture:

1.FeartureNet:

使用resnet101,直到conv4_10为止,用来提取特征(为什么是到这一层)

2.ClsNet:

用101从conv4_10的后面的层用来分类

3.SegNet:

使用SegNet来分割

数据不平衡问题的解决:

对损失函数进行加权用于分割问题:

然后gate function控制特征的流动:

没看懂,这个门网络到底和SEnet的区别在哪里,第二,为什么Xseg,Xcls乘权重 而不是feature map乘权重??

门函数是卷积层,后跟sigmoid函数,使信息传递率在(0,1)范围内。

跟MICCAI18年peresia那篇文章的RRblock有点类似,都是使用卷积来收集上下文和空间信息

数据增强方法:

crop, zoom, rotate,flip and add gaussian noise

训练细节:

我们使用随机梯度下降(SGD)训练我们的网络,其中包含16个图像的小批量。首先,我们在没有SegNet的情况下训练FeatureNet和ClsNet大约80个epoch,学习率为0.00001。 然后,我们使用ClsNet的权重来初始化SegNet(与[7]中的初始化方法相同),并使用FeatureNet和ClsNet训练SegNet,固定约150个epoch,学习率为0.0001。 最后,我们在ClsNet和SegNet之间添加了特征传递模块,并以0.0001的学习速率联合训练整个网络约45个epoch。 图像的输入尺寸设置为233×233,并且观察到输入尺寸对性能的影响很小。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Sure, here's an example implementation of a linear SVM model for binary classification using PyTorch and autograd for optimization: ``` import torch import torch.nn as nn import torch.optim as optim class LinearSVM(nn.Module): def __init__(self, input_dim): super(LinearSVM, self).__init__() self.weights = nn.Parameter(torch.randn(input_dim)) self.bias = nn.Parameter(torch.randn(1)) def forward(self, x): linear_output = torch.dot(x, self.weights) + self.bias return linear_output # Define training data and labels train_data = torch.tensor([[1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0]]) train_labels = torch.tensor([1, 1, -1, -1]) # Initialize model and optimizer svm = LinearSVM(input_dim=2) optimizer = optim.SGD(svm.parameters(), lr=0.01) # Define training loop num_epochs = 1000 for epoch in range(num_epochs): svm.train() optimizer.zero_grad() output = svm(train_data) loss = torch.mean(torch.clamp(1 - train_labels * output, min=0)) loss.backward() optimizer.step() # Evaluate model on test data test_data = torch.tensor([[1.0, 1.0], [2.0, 2.0], [3.0, 3.0], [4.0, 4.0]]) svm.eval() test_predictions = torch.sign(svm(test_data)).detach().numpy() print(test_predictions) ``` In this example, we define a `LinearSVM` class that inherits from `nn.Module` and implements a linear SVM model with a single linear layer. We use `nn.Parameter` to define the model's weight and bias parameters, which are then optimized using the `optim.SGD` optimizer. In the training loop, we compute the SVM loss using the hinge loss function and backpropagate the gradients using autograd. We then update the model parameters using the optimizer's `step` method. Finally, we evaluate the trained model on some test data by passing it through the model and taking the sign of the output (since the SVM is a binary classifier). We use `detach().numpy()` to convert the output to a numpy array for easier interpretation. Note: This is just a simple example implementation of a linear SVM in PyTorch using autograd. In practice, you may want to use a more robust implementation or library for SVMs, such as LIBLINEAR or scikit-learn.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值