0. Abstract
- 생략
1. Introduction
- 최근의 state-of-the-art methods는 대부분 convNets-based로 되어 있는데, 이는 인상적인 results를 얻을 수 있었지만, long-range dependencies를 capture하는데 한계가 있었다.
- 이 문제를 해결하기 위해, 몇몇의 최근의 연구는 단일한 혹은 몇개의 self-attention layers를 low resolution feature maps에 이용하는 방법을 이용했는데, 왜 low resolution에 적용을 하나면, self-attention의 computational complexity가 feature map size의 제곱이 되기 때문이다.
- 본 논문에서는, 더욱 다양한 이미지 details를 복구하기 위해, 다양한 크기의 해상도에서(multi-scale resolution)의 feature maps에서 self-attention을 하는것에 목표를 두고 있다.
- 이를 위해, 본 논문에서는 Uformer를 제안하는데, image restoration에서 효과적이고 효율적인 Transformer-based structure한 모델이다.
-Uformer은 UNet에서 온 모델인데, 본 논문에서는 전체적으로 계층적인 encoder-decoder structure과 skip-connection을 유지하면서 convolution layers를 Transformer blocks로 수정하였다.
-본 논문에서는 이를 위해 두가지 core designs을 제안한다.
1) Locally-enhanced Window(LeWin) Transformer block
- LeWin transformer block은 global self-attention이 아닌 겹치는 것이 없는, non-overlapping window-based self attention을 수행하여, 이를 통해 high-resolution feature maps에서 computational complexity를 현저하게 줄일 수 있다.
- 본 논문에서는 계층적인 fature maps를 만들고 window size를 unchange하기 때문에, low-resolution에서 진행되는window-based self-attention은 더욱 많은 global depencencies를 capture할 수 있다.
- 다른 한편으로는, local context는 image restoration에 필수적인데, 본 논문에서는 Transformer block에서 feed-forward network안에 있는 두개의 fully-connected layers 사이에 depth-wise convolutional layer를 진행한다.
2) learnable multi-scale restoration modulator to handle various image degradations
- 이를 multi-scale spatial biase form으로 나타내는데, 이는 Uformer decoder의 다중 layers안의 features를 adjust하기 위함이다.
3. Method
3.1 Overall Pipeline
- Fig.2(a)에서 보였듯이, 제안된 Uformer의 전체적인 구조는 encoder과 decoder사이에 skip connections이 있는 U-shaped hierarchical network이다. 좀 더 specific하게 말하자면, degraded image I가 주어졌을 때, Uformer는 처음에 LeakyReLU와 3*3 convolution layer를 적용해 줘서, low-level features X0를 추출한다.
- 다음에, U-shaped structures를 따라서, X0의 feature maps은 K encoder stages를 통과하게 된다.
- 각각의 stage에는 제안된 LeWin Transformer blocks과 하나의 down-sampling layer의 stack으로 이루어져 있다.
- 앞에서 말했듯이, LeWin Transformer blocks은 self-attention mechanisms을 통해 long-range dependencies를 capture 할 수 있고, 또한 feature maps의 non-overlapping window를 통해 computational cost를 줄일 수 있다.
- down-sampling layer에서는, 본 논문에서는 처음에 flatten된 features를 2D spatial feature maps로 reshape하고, 그리고 나서 down-sampling에서, 4*4, stride 2, channel인 filter로 convolution을 진행한다.
- LeWin Transformer blocks의 stack이 있는 bottleneck stage가 encoder 끝에 추가된다. 이 stage에서, hierarchical structure 덕분에, Transformer blocks은 longer dependencies를 capture 할 수 있게 된다.
- feature reconstruction에서, 제안된 decoder은 또한 K stages를 가진다. 각각은 encoder과 유사하게 up-sampling layer와 LeWing Transformer blocks의 stack으로 이루어져 있다.
- 본 논문에서는 upsampling을 위해 stride 2인 transposed convolution을 이용한다. 이 layer에서는 feature channels를 반으로 줄이고, 그 이후에, LeWin Transformer blocks에 들어가는 features은 upsampling feature과 skip-connection을 통해 encoder에 해당되는 features의 concatenation이다.
* transposed convolution이란?
- feature map을 커지게 하기 위해, convolution 계산 과정을 역으로 진행하는 것
- 다음에, LeWin Transformer blocks는 image를 restore하기 위한 학습을 위해 이용된다. 이렇게 K개의 decoder stage 후에, flatten된 features를 2D feature maps로 reshape하고, 3*3 convolution layer를 진행하여 residual image R을 얻는다.
- 마지막으로, 그 restore된 image는 I' = I + R을 통해 얻게 된다.
- 본 논문에서는 Uformer를 Charbonnier loss를 통해 train한다고 한다.
3.2 LeWin Transformer Block
- Transformer를 image restoration에 적용하기 위해서는 두 가지 chalenges가 존재한다.
1. standard Transformer architecture은 self-attention 계산을 global하게 하기 때문에, 계산이 제곱이 되게 된다. 이러한 성질 때문에, high-resolution feature maps에 적용하기에는 unsuitable했다.
2. image restoration task를 위해서는 local context information이 필수적이였는데, 왜냐하면 degraded pixel의 주변을 활용하여 깨끗한 version을 복원할 수 있기 때문이다. 그러나, 이전의 연구에서 Transformer은 local dependencies를 capture하는데에 한계가 있었다.
- 위의 두 문제를 해결하기 위해, 본 논문에서는 Locally-enhanced Window (LeWin)Transformer block을 제안한다.(Fig 2(b)) Transformer 안의 self-attention은 long-range dependencies를 capture할 수 있었고, Transformer안의 convolution 계산을 통해 local context를 capture할 수 있었다.
- l-1 block X(l-1)의 feature가 주어졌을 때, 두개의 core designs을 개발하였다.
(1) non-overlapping Window-based Multi-head Self-Attention(W-MSA)
(2)Locally-enhanced Feed_forward Network(LeFF)
* Window-based Multi-head Self-Attention(W-MSA)
- 기존의 vanilla Transformer같은 global self-attention을 이용하는 대신, 본 논문에서는 non-overlapping local windows 내에서 self-attention을 수행한다. 이를 통해 computational cost를 현저하게 줄일 수 있었다.
- 이렇게 Window-based self-attention은 현저하게 computatinal cost를 줄일 수 있었다.
- 만약 feature maps이 X(C*H*W)로 주어진다면, 기존의 방법의 complexity는 O(H^2*W^2*C)였는데, 이는 O((HW/M*2)*M^4*C) = O(M*2HWC)로 drop할 수 있게 되었다.
- Uformer를 hierarchical architecture로 구상하였기 때문에, 본 논문의 low-resolution feature maps의 window-based self-attention은 larger receptive fields을 얻을 수 있고 이는 long-range dependencies를 얻기에 충분하다.
- 본 논문은 또한 각각의 stage의 짝수의 LeWin Transformer block에서 shifted-window strategy를 이용하여 더욱 좋은 결과를 내고 있다.
* Locally-enhanced Feed-Forward Network (LeFF)
- 앞에서 언급했듯이, standard Transformer은 local context를 활용하는 능력에 한계가 있었다.
- 이러한 한계를 극복하기 위해, 본 논문에서는 depth-wise convolutional block을 FFN에 도입한다.
3.3 Multi-Scale Restoration Modulator
- image degradation의 다른 종류들(e.g. blur, noise, rain, etc.)들은 처리되거나 restored할 고유한 교란 패턴을 가진다.
- 본 논문의 Uformer의 성능을 더욱 boost하기 위해, 본 논문에서 features를 보정(calibrate)하고, 더 많은 details가 recover되도록 encourage하는 light-weight multi-scale restoration modulator를 제안한다.
- Fig2 (a), (c) 에서 보이듯이, Uformer decoder에 multi-scale restoration modulator를 적용한다. 각 LeWin Transformer block에서, modulator은 M*M*C의 모양을 가진 학습 가능한 텐서로 공식화된다. 여기서 M은 window size이고, C는 현재 feature map의 channel dimension이다. 각 modulator은 단순히 self-attention모듈 이전에 중첩되지 않는 모든 window에 추가되는 share bias term 역활을 한다. 이 light-weight addition operation과 window-sized shaped때문에, multi-scale restoration modulator는 미미한 추가 parameters과 computational cost를 접하게 된다.
- 본 논문에서는 두개의 image restoration tasks(image deblurring과 image denoising)를 통해 multi-scale restoration modulator의 효과를 증명해 냈다.(Fig4)
- 이에 대한 이유로, decoder의 각각의 stage에 modulators를 더하는 것은 feature maps의 flexible adjustment를 가능하게 되고, 이를 통해 restoring details의 성능을 boosts할 수 있다고 한다.
4.Experiments