RCAN: Image Super-Resolution Using Very DeepResidual Channel Attention Networks

RCAN是引用较高的超分模型。paper code
作者观察到两个问题:

  1. 深层网络有训练难度。
  2. LR中有低频成分,和相对高频且更重要的成分。但二者被平等对待。

针对这两点的解决思路:

  1. 采用嵌套的残差结构加深网络,RIR residual in residua。
  2. 在通道(不同成分)上增加注意力(权重)。

RCAN网络结构:
RCAB结构:
在这里插入图片描述
RCAB代码:

## Residual Channel Attention Block (RCAB)
class RCAB(nn.Module):
    def __init__(
        self, conv, n_feat, kernel_size, reduction,
        bias=True, bn=False, act=nn.ReLU(True), res_scale=1):

        super(RCAB, self).__init__()
        modules_body = []
        for i in range(2):
            modules_body.append(conv(n_feat, n_feat, kernel_size, bias=bias))
            if bn: modules_body.append(nn.BatchNorm2d(n_feat))
            if i == 0: modules_body.append(act)
        modules_body.append(CALayer(n_feat, reduction))
        self.body = nn.Sequential(*modules_body)
        self.res_scale = res_scale

    def forward(self, x):
        res = self.body(x)
        #res = self.body(x).mul(self.res_scale)
        res += x
        return res

channel attention:
在这里插入图片描述CA代码:

class CALayer(nn.Module):
    def __init__(self, channel, reduction=16):
        super(CALayer, self).__init__()
        # global average pooling: feature --> point
        self.avg_pool = nn.AdaptiveAvgPool2d(1)
        # feature channel downscale and upscale --> channel weight
        self.conv_du = nn.Sequential(
                nn.Conv2d(channel, channel // reduction, 1, padding=0, bias=True),
                nn.ReLU(inplace=True),
                nn.Conv2d(channel // reduction, channel, 1, padding=0, bias=True),
                nn.Sigmoid()
        )

    def forward(self, x):
        y = self.avg_pool(x)
        y = self.conv_du(y)
        return x * y

思考:

  1. 在训练初期,每个kernal还没有区分度,CA本身的学习和初始化参数是否会对网络参数学习产生影响?

参考文献:

  1. https://blog.cython.top/paper-notes-1.html#architecture
  2. https://www.kesci.com/home/project/5db292f875df5c002b23cda0
  3. http://www.jeepxie.net/article/611013.html
  4. https://perper.site/2019/09/05/Image-Super-Resolution-Using-Very-Deep-Residual-Channel-Attention-Networks-RCAN/
  5. https://www.jianshu.com/p/07334544b4b0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值