CVPR2023_N-Gram in Swin Transformers for Efficient Lightweight Image Super-Resolution 论文阅读记录_1

论文原文:https://arxiv.org/abs/2211.11436

针对问题:

原始的基于Swin-Transformer的超分辨率网络主要会面临一下两方面问题:

  1. 原始网络其感受野较小。(它使得网络不受到相邻窗口的影响,从而产生失真的图像)
  2. 原始网络具有较大的计算量。

问题说明:

问题A:如图二的h所示,红色方框的特征与邻居特征具有较为明显的不同,从而导致(e)红色方框中出现了失真现象。
问题B:如图(f、g),红色方框与邻居方框色彩有着较为明显的不同,说明网络在推理时没有利用到邻居特征。
上一行本文提出的方法,下一行是原始Swin产生的特征结果图。
N-Gram的定义
N-Gram的概念已经出现在语言模型中,其主要就是将目标词语的前后词语当作辅助信息输入即可。而图像中的N-Gram概念与其类似。

在这里插入图片描述

网络的整体架构

在这里插入图片描述

文章的重点主要为NSTB(架构如下)
在这里插入图片描述

N-Gram Window Partition主要由一下几步构成

  1. 对图像中的块分别进行特征提取,得到特征块(uni-Gram形式)。
  2. 对得到的多个特征快分别计算其WSA即得到了Forward-Gram以及Backward-Gram,其中特征的边缘可能出现前后没有特征值的问题。本文避免利用填充0的方案,对于Forward-Gram填充右下角的特征,填充值为填充边缘左边一格特征或者上面一格的特征值。对于Backward-Gram则填充左上角特征,同样填充值为右边一格或者下面一格的特征值。
    在这里插入图片描述
    在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
3. 利用一个卷积网络将Forward-Gram与Backward-Gram进行融合。
4. 将融合后的Gram作为偏置项添加到原始输入的特征中。

实验

引入N-Gram的消融实验
在这里插入图片描述
与其他网络的对比实验
在这里插入图片描述

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Gatys et al. (2016) proposed an algorithm for style transfer, which can generate an image that combines the content of one image and the style of another image. The algorithm is based on the neural style transfer technique, which uses a pre-trained convolutional neural network (CNN) to extract the content and style features from the input images. In this algorithm, the content and style features are extracted from the content and style images respectively using the VGG-19 network. The content features are extracted from the output of one of the convolutional layers in the network, while the style features are extracted from the correlations between the feature maps of different layers. The Gram matrix is used to measure these correlations. The optimization process involves minimizing a loss function that consists of three components: the content loss, the style loss, and the total variation loss. The content loss measures the difference between the content features of the generated image and the content image. The style loss measures the difference between the style features of the generated image and the style image. The total variation loss is used to smooth the image and reduce noise. The optimization is performed using gradient descent, where the gradient of the loss function with respect to the generated image is computed and used to update the image. The process is repeated until the loss function converges. The code for this algorithm is available online, and it is implemented using the TensorFlow library. It involves loading the pre-trained VGG-19 network, extracting the content and style features, computing the loss function, and optimizing the generated image using gradient descent. The code also includes various parameters that can be adjusted, such as the weight of the content and style loss, the number of iterations, and the learning rate.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值