RAM: Residual Attention Module for Single Image Super-Resolution

1. 摘要

注意力机制是深度神经网络的一个设计趋势,其在各种计算机视觉任务中都表现突出。但是,应用到图像超分辨领域的注意力模型大都没有考虑超分辨和其它高层计算机视觉问题的天然不同。

作者提出了一个新的注意力模型,由针对 SR 问题优化的新的通道和空间注意力机制以及将这两者结合起来的融合机制组成。基于此,作者设计了一个残差注意力模块(RAM)以及用来超分辨的 SRRAM 网络。

2. 介绍

通常,大多数基于 CNN 来进行图像超分辨的方法在内部同等地处理所有类型的信息,这可能无法有效地区分内容的详细特征(例如低频和高频信息)。换句话说,网络选择性地使用特征的能力有限。

最近,注意力机制是各种计算机视觉问题中值得注意的网络结构之一。它允许网络重新校准提取的特征图,从而可以进行更加自适应和有效的训练。许多研究者也尝试了将注意力模型引入图像超分辨领域,但却都是从其他视觉任务(比如分类)中直接借鉴来的,针对超分辨问题则可能不是最优的。

因此,作者提出了一个新的注意力模型,可以有效地将通道注意力和空间注意力融合起来,并且是专门针对图像超分辨问题设计的。将这个注意力模型和基于 ResNet 的结构相结合,作者设计了一个 SRRAM 网络取得了比以往方法更好的效果。

3. 网络结构

3.1. 一些相关的注意力机制

RCAB 只有通道注意力,CBAM 以顺序的方式引入通道注意力和空间注意力,而 CSAR 则以并行的方式引入通道注意力和空间注意力。具体细节可参阅每篇论文阅读笔记。

3.2. RAM

在以前的方法中,通道注意力(CA)大多采用平均池化或者最大池化。但是,作者认为超分辨问题旨在恢复出图像的高频成分,因此利用通道的高频特性来学习注意力更加合理。所以,这里采取方差池化,也就是求得每个通道大小为 W×H 的特征图的方差。后续步骤与之前方法类似,通过两层神经网络来预测注意力图。

在空间注意力(SA)中,每个通道代表着一种滤波器,不同的滤波器负责提取图像的不同特征。例如,在提取到的边缘或复杂纹理特征图中,更详细的信息,即来自复杂滤波器的信息更重要。另一方面,在该区域几乎没有诸如天空或漫画图像的均匀区域之类的高频分量的情况下,相对较不详细的信息更重要并且需要被关注。也就是说,我们需要区别对待不同的通道,而不是像之前的注意力机制那样直接对通道维度进行压缩。这里,作者采用了深度可分离卷积,针对每个通道的特征分别卷积得到注意力图。

最后,将通道注意力图和空间注意力图相加后经过一个 Sigmoid 函数再与原特征相乘即可,与残差网络结合便得到了上图所示的 RAM 结构。其一个 TensorFlow 实现如下。

def RAM(input, reduction):
    """
    @Residual Attention Module for Single Image Super-Resolution
    Residual Attention Module
    """

    _, width, height, channel = input.get_shape()  # (B, W, H, C)

    u = tf.layers.conv2d(input, channel, 3, padding='same', activation=tf.nn.relu)  # (B, W, H, C)
    u = tf.layers.conv2d(u, channel, 3, padding='same')  # (B, W, H, C)

    # channel attention
    _, x = tf.nn.moments(u, axes=[1, 2], keep_dims=True)   # (B, 1, 1, C)
    x = tf.layers.conv2d(x, channel // reduction, 1, activation=tf.nn.relu)     # (B, 1, 1, C // r)
    x = tf.layers.conv2d(x, channel, 1)   # (B, 1, 1, C)

    # spatial attention
    filter = tf.random_normal([3, 3, int(channel), 1], stddev=0.01)
    y = tf.nn.depthwise_conv2d(u, filter, strides=[1, 1, 1, 1], padding='SAME')     # (B, W, H, C)

    z = tf.add(x, y)    # (B, W, H, C)
    z = tf.nn.sigmoid(z)
    z = tf.multiply(u, z)
    z = tf.add(input, z)

    return z
3.3. SRRAM

整体网络结构由特征提取和上采样组成,特征提取由 R 个 RAM 模块以及长跳跃连接组成,上采样网络负责提高图像的分辨率。

4. 实验结果

4.1. Ablation studies

引入 CA 后模型在所有数据集上的平均表现比基线模型要高出 0.1 dB,同时引入 CA 和 SA 后模型表现继续有更大提升,而且在大部分情况下也都优于其他注意力机制。

4.2. 客观和主观评价对比

image.png

获取更多精彩,请关注「seniusen」!

Image super-resolution (SR) is the process of increasing the resolution of a low-resolution (LR) image to a higher resolution (HR) version. This is an important task in computer vision and has many practical applications, such as improving the quality of images captured by low-resolution cameras or enhancing the resolution of medical images. However, most existing SR methods suffer from a loss of texture details and produce overly smooth HR images, which can result in unrealistic and unappealing results. To address this issue, a new SR method called Deep Spatial Feature Transform (DSFT) has been proposed. DSFT is a deep learning-based approach that uses a spatial feature transform layer to recover realistic texture in the HR image. The spatial feature transform layer takes the LR image and a set of HR feature maps as input and transforms the features to a higher dimensional space. This allows the model to better capture the high-frequency details in the image and produce more realistic HR images. The DSFT method also employs a multi-scale approach, where the LR image is processed at multiple scales to capture both local and global features. Additionally, the model uses residual connections to improve the training process and reduce the risk of overfitting. Experimental results show that DSFT outperforms state-of-the-art SR methods in terms of both quantitative metrics and visual quality. The method is also shown to be robust to different noise levels and image degradation scenarios. In summary, DSFT is a promising approach for realistic texture recovery in image super-resolution. Its ability to capture high-frequency details and produce visually appealing HR images makes it a valuable tool for various applications in computer vision.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值