文章复现:SRCNN

12 年,AlexNet 在 ImageNet 图像分类比赛上的超神表现(参考链接【1】),证明了卷积神经网络在图像分类方面的强大能力,之后各个学者在 CNN 的基础上提出了多种改进的图像分类网络架构。

14 年,DONG 首次提出用 CNN 来进行图像的超分辨率重建工作(参考链接【2】),文章提出了 SRCNN 的架构。图像的超分可以认为是一种像素级的回归任务。

在 climate 领域,一般是回归任务,毕竟多数是连续值。

本文来复现一下 SRCNN。

文章摘要

::: block-1
We propose a deep learning method for single image super-
resolution (SR). Our method directly learns an end-to-end mapping be-
tween the low/high-resolution images. The mapping is represented as
a deep convolutional neural network (CNN) [15] that takes the low-
resolution image as the input and outputs the high-resolution one. We
further show that traditional sparse-coding-based SR methods can also
be viewed as a deep convolutional network. But unlike traditional meth-
ods that handle each component separately, our method jointly optimizes
all layers. Our deep CNN has a lightweight structure, yet demonstrates
state-of-the-art restoration quality, and achieves fast speed for practical
on-line usage.

:::
大意就是说本文提出了一种轻量化的、端到端的、基于CNN的神经网络,在图像超分任务上的表现超过了传统的稀疏编码方法,且速度很快。

网络架构

SRCNN的网络架构确实也很简单,其网络只有三个卷积层:

SRCNN-引用自参考【2】

对应代码:

class SRCNN(nn.Module):
    def __init__(self, inchannels):
        super(SRCNN, self).__init__()

        self.main = nn.Sequential(
            nn.Conv2d(inchannels, 64, kernel_size=9, stride=(1, 1), padding=(4, 4)),
            nn.ReLU(),

            nn.Conv2d(64, 32, kernel_size=1, stride=(1, 1), padding=(0, 0)),
            nn.ReLU(),

            nn.Conv2d(32, 1, kernel_size=5, stride=(1, 1), padding=(2, 2))
        )

    def forward(self, x):
        y = self.main(x)   
        return y
  • 本文采用的是9-1-5的卷积核,这个可以自己调整;
  • SRCNN的输入是先用双线性内插到目标尺寸,然后再输入到网络中;
  • 每一层padding的数量可以自己计算一下,确保输入和输出的大小一致;

SRCNN是用深度卷积来进行超分的第一篇,也算是开创性的工作,但是想要根据自己的研究进行应用,只能说道阻且长。。。。

参考

【1】CNN 用于图像分类的首篇:KRIZHEVSKY A, SUTSKEVER I, HINTON G E J C O T A 2012. ImageNet classification with deep convolutional neural networks. 60: 84 - 90.
【2】CNN 用于图像回归的首篇:DONG C, LOY C C, HE K, et al. Learning a Deep Convolutional Network for Image Super-Resolution[C]//Computer Vision – ECCV 2014.Springer International Publishing,2014:184-199. 10.1007/978-3-319-10593-2_13.

本文由mdnice多平台发布

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容