AIM2020-ESR冠军方案解读:引入注意力模块ESA,实现高效轻量的超分网络(附代码实现)
极市导读
该文是南京大学提出的一种轻量&高效图像超分网络,它获得了AIM20-ESR竞赛的冠军。它在IMDN的基础上提出了两点改进,并引入RFANet的一种ESA注意力模块。如果从结果出发来看RFDN看上去很简单,但每一步的改进却能看到内在的一些思考与尝试。值得初入图像复原领域的同学仔细研究一下该文。
Abstract
提出一种轻量型残差特征蒸馏网络用于图像超分并取得了SOTA性能,同时具有更少的参数量;
系统的分析了IDM并对IMDN进行重思考,基于思考发现提出了FDC;
提出了浅层残差模块,它无需引入额外参数即可提升超分性能。
Method
Concat
进行融合得到输出:Rethinking the IMDB
Residual Feature Distillation Block
Framework
PixelShuffle
操作组合。在损失函数方面,RFDN采用了损失。Experiments
后记
class RFDB(nn.Module):
""" A little difference with the official code. """
def __init__(self, in_channels, distillation_rate=0.25):
super(RFDB, self).__init__()
distilled_channels = int(in_channels * distillation_rate)
remaining_channels = in_channels - distilled_channels * 3
self.d1 = nn.Conv2d(in_channels, distilled_channels, 1)
self.c1 = SRB(in_channels)
self.d2 = nn.Conv2d(in_channels, distilled_channels, 1)
self.c2 = SRB(in_channels)
self.d3 = nn.Conv2d(in_channels, distilled_channels, 1)
self.c3 = SRB(in_channels)
self.d4 = nn.Conv2d(in_channels, remaining_channels, 3, 1, 1)
self.act = nn.LeakyReLU(negative_slope=0.05, inplace=True)
self.fusion = nn.Conv2d(in_channels, in_channels, 1)
self.esa = ESA(in_channels)
def forward(self, inputs):
distilled_c1 = self.act(self.d1(inputs))
remaining_c1 = self.act(self.c1(inputs))
distilled_c2 = self.act(self.d2(remaining_c1))
remaining_c2 = self.act(self.c2(remaining_c1))
distilled_c3 = self.act(self.d3(remaining_c2))
remaining_c3 = self.act(self.c3(remaining_c2))
distilled_c4 = self.act(self.d4(remaining_c3))
out = torch.cat([distilled_c1, distilled_c2, distilled_c3, distilled_c4], dim=1)
out_fused = self.esa(self.fusion(out)) + inputs
return out_fused
赞 (0)