이번 글은 PR12의 유재준님께서 Inception과 Xception을 동시에 다루는 관계로 Abstract는 생략하고 바로 요약단계로 넘어가는 것으로 하겠습니다. PR12는 현재 Season 3까지 만들어져, 현재 진행중인 스터디입니다. 블로그에 게시되는 논문은 주로 Season 1에서 다루는 것들을 공부합니다. 이 글이 부족하다면 다음 유재준님께서 발표하신 영상을 보시면 되겠습니다. 

링크로는 유튜브 대신 유재준님의 블로그를 올려두겠습니다. 

http://jaejunyoo.blogspot.com/2018/02/pr12-video-34-inception-and-xception.html

 

[PR12-Video] 34. Inception and Xception

Machine learning and research topics explained in beginner graduate's terms. 초짜 대학원생의 쉽게 풀어 설명하는 머신러닝

jaejunyoo.blogspot.com


요약

  • Inception을 처음 고안한 모델은 GoogLeNet이다. 모델 구조는 다음과 같다.

  • Xception은 성능 향상을 위해 극단적인 방법을 사용한 구조이다. 

  • 먼저 Inception V1은 이미지 분류와 같은 문제를 풀기 위해 더욱 깊게 층을 쌓으려고 한 모델이다. 하지만 깊이 쌓을수록 파라미터의 수가 늘어나고, 컴퓨터 자원적으로도 매우 한계가 있게 된다. 
  • 이 다음으로 층을 깊게 쌓는 것에 대한 수학적 증명 같은 것을 설명해 주시는데, 결론은 sparse connection을 이용하여 계산을 진행할 경우 수학적으로 좋다고 증명이 되었지만 컴퓨터 자원적으로 단점이 존재한다. 반면, dense connection은 수학적으로 좋지 않다고 증명이 되어있지만, 컴퓨터 자원적으로 효율적이다. 
  • 기존 Inception 모듈은 1x1 컨볼루션을 사용하지 않은 구조였는데, 이는 파라미터가 급격히 증가되기 때문에 잘 작동하지 않았다. 이를 이유로 1x1 컨볼루션을 파라미터를 효율적으로 줄이고, 표현력을 풍부하게 하도록 하였다.
  • Inception V2는 5x5 -> 3x3 + 3x3으로 변경하여 사용하였고, 이를 통해 28%의 파라미터 감소 효과를 누렸다.

  •  이후 Xception 논문에서는 Inception 모듈이 왜 잘되는지에 대해 분석해놓았는데, 첫 번쨰로는 1x1 컨볼루션과 다양한 크기의 컨볼루션을 사용하여 채널별 상관관계와 공간적 상관관계를 동시에 적절히 수행하였다는 점이다. 
  • Xception은 inception 모듈을 'extreme'하게 표현한 것인데, 여기서 Depthwise separable convolution이라는 용어가 나오게 된다.
  • Depthwise separable convolution은 기존의 1x1 -> 3x3의 순서를 3x3 -> 1x1로 변경한 것이다. 이를 다시 말하면 먼저 channel-wise의 연산을 수행한 뒤, point-wise의 연산을 수행한다는 것이다.
  • Inception 모듈은 기존 컨볼루션 방식과 Xception 논문에서 나오는 Depthwise separable convolution의 중간 어딘가쯤 존재하는 것이었다. 즉, Xception은 채널, 공간적 관계를 완전히 쪼개서 수행해보겠다는 것이 가설이다. 

Abstract

In object detection, reducing computational cost is as important as improving accuracy for most practical usages. This paper proposes a novel network structure, which is an order of magnitude lighter than other state-of-the-art networks while maintaining the accuracy. Based on the basic principle of more layers with less channels, this new deep neural network minimizes its redundancy by adopting recent innovations including C.ReLU and Inception structure. We also show that this network can be trained efficiently to achieve solid results on well-known object detection benchmarks: 84.9% and 84.2%mAP on VOC2007 and VOC2012 while the required compute is less than 10% of the recent ResNet-101.


객체 탐지에서 계산 비용을 감소시키는 것은 실용적인 측면에서 정확도를 높이는 것만큼 중요하다.

이 논문은 최신 성능을 유지하면서도 더 가벼운 특징을 가지는 신경망 구조를 제안한다.

적은 채널수와 많은 층을 쌓는 기본적인 원리에 기반해서, 인셉션 구조와 C.ReLU를 포함한 가장 최근의 혁신적인 구조의 중복을 최소화한 깊은 신경망이다.

또한, 다음과 같이 각종 데이터셋에서 효율적인 결과를 얻었다. 최근 각광받고 있는 ResNet-101보다 더 가벼운 모델로 VOC2007, VOC2012에서 각각 84.9%, 84.2% mAP를 얻었다.


요약

  • 이 논문은 Faster R-CNN의 형태를 개선한 논문이다.
  • 네트워크는 깊게 구성하면서도 채널 수는 줄여보자는 취지이다.
  • C.ReLU는 기존 방식과 다르게 Scale/Bias를 추가하여 Modified C.ReLU의 형태로 사용하였다.
  • Inception 모듈은 그 당시에 객체 탐지에서 잘 사용하지 않았는데, 사용한 이유는 다양한 receptive field를 얻을 수 있을 거라고 생각했기 때문이고, 실제로 사용해보았더니 잘되었다고 한다. 

  • 또한, skip connection과 구조가 동일한 Hyper-feature Concatenation을 사용하였다. 이때, Upscale할 때는 단순하게 Bilinear interpolation을 사용하였다. 

  • 이 논문은 RPN시에 최종 출력의 모든 feature를 사용하지 않고 128개의 채널만 떼서 사용한다. 기본적으로 RPN은 객체의 유무만 판단하는 단순한 연산이기 떄문이다. 반대로 분류하는 부분은 모든 채널을 전부 사용한다.

 

Reference

Hong, S., Roh, B., Kim, K. H., Cheon, Y., & Park, M. (2016). Pvanet: Lightweight deep neural networks for real-time object detection. arXiv preprint arXiv:1611.08588.

Abstract

We present a model that generates natural language descriptions of images and their regions. Our approach leverages datasets of images and their sentence descriptions to learn about the inter-modal correspondences between language and visual data. Our alignment model is based on a novel combination of Convolutional Neural Networks over image regions, bidirectional Recurrent Neural Networks over sentences, and a structured objective that aligns the two modalities through a multimodal embedding. We then describe a Multimodal Recurrent Neural Network architecture that uses the inferred alignments to learn to generate novel descriptions of image regions. We demonstrate that our alignment model produces state of the art results in retrieval experiments on Flickr8K, Flickr30K and MSCOCO datasets. We then show that the generated descriptions significantly outperform retrieval baselines on both full images and on a new dataset of region-level annotations.


이 논문은 각 region과 이미지에 해당하는 캡션을 생성하는 모델을 소개한다.

우리가 제안하는 방법은 이미지 데이터셋과 문장 설명을 활용하여 그 사이의 상호 대응 방식을 학습하는 것이다.

우리의 모델은 이미지 영역에서의 CNN, 문장을 다루는 Bidirectional RNN의 조합에 기반하고, 이를 결합하는 구조화된 목표를 가지고 있다. (multimodal이란 시각 + 언어, 소리 + 언어를 주로 가르키는 것 같음.)

또한, 이미지 영역에 대한 설명을 생성하도록 학습하여 추론된 문장을 사용할 수 있는 Multimodal RNN을 설명한다. 

우리는 각종 플리커 데이터셋과 MSCOCO에서의 실험을 통해 최고의 성능을 생성할 수 있음을 증명한다. 

더하여서, 새로운 데이터셋의 완전한 이미지를 주었을 때, 이를 설명하는 성능은 매우 우수하다. 


요약

  • 이미지에 대해 설명을 추가하려는 시도를 하는 첫 번째 논문이다.
  • CNN을 사용하여 이미지를 벡터로 임베딩하고, RNN을 통해 단어들을 임베딩한다. 그리고 두 벡터를 통해 연산을 하고 점수를 매긴다.
  • Bidirectional RNN을 사용한 이유는 문장 전체의 정보를 사용하기 위함이다. 

  • 결과는 위와 같이 만들어지게 되는데, 각 상자에서 검은색은 가장 확률이 낮은것이고 흰색은 그 반대이다. 이를 통해 점수를 계산한다.

  • loss function은 위와 같이 구성되어 있는데, ground_truth(여기서 s_kk)를 뺏을 때의 값을 기준으로 이를 minimize하는 방식이다. max를 이용하여 s_kl이나 s_lk와의 거리를 최대한 좁히려는 것이다.
  • 이 함수를 RNN, CNN을 학습시킬 때 사용하였다.
  • 에너지 function을 사용하여 이미지와 단어와의 관계가 찢어지는 현상을 해결하려고 했다. 
  • 마지막으로는 RNN을 사용하여 문장을 생성하려고 했다. 이때, 첫 번째 hidden state에는 가중치를 더해준다.
  • 논문에서 R@5, R@10과 같은 수치로 평가하는데, 이는 5번 돌려서 정답이 있을 확률, 10번 돌려서 정답이 있을 확률을 의미한다.

 

Reference

Karpathy, A., & Fei-Fei, L. (2015). Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 3128-3137).

Abstract

The move from hand-designed features to learned features in machine learning has been wildly successful. In spite of this, optimization algorithms are still designed by hand. In this paper we show how the design of an optimization algorithm can be cast as a learning problem, allowing the algorithm to learn to exploit structure in the problems of interest in an automatic way. Our learned algorithms, implemented by LSTMs, outperform generic, hand-designed competitors on the tasks for which they are trained, and also generalize well to new tasks with similar structure. We demonstrate this on a number of tasks, including simple convex problems, training neural networks, and styling images with neural art.


머신러닝으로 학습된 특징을 사용하는 작업은 매우 성공적이었다.

이와 같은 성공에도 불구하고 최적화 알고리즘은 여전히 직접 설계되어지고 있다.

이 논문은 최적화 알고리즘의 설계를 학습 문제로 정의하여 이를 문제에 맞게 자동으로 설계하게끔 하는 방법을 소개한다.

LSTM으로 구현된 이 알고리즘은 일반적인 최적화 알고리즘의 성능을 뛰어넘으며, 여러 문제에도 일반화될 수 있음을 보여주었다. 

우리는 neural art, 신경망 학습, 간단한 convex 문제를 포함한 여러 문제에 이 알고리즘을 적용하였다.


요약

  • Learning to learn은 Meta Learning이라고도 한다. 
  • 일반적으로 밑의 첫번째 그림과 같은 업데이트 방식을 사용하여 학습을 진행하는데, 이는 모든 문제에 일반화기 애매한 수식이다. 따라서 이 논문은 좀 더 일반화할 수 있는 최적화 알고리즘을 얻길 원한다.
  • loss function은 매우 간단하게 구성되어 있으며, 이에 존재하는 f를 optimizee라고 부른다.
  • 컴퓨팅 비용을 고려하여 RNN 대신 LSTM을 택하였다. 
  • 3번째 그림의 dashed line은 f_t의 second order derivative를 구하지 않으려고 한 부분이다.
  • 히든 레이어의 유닛 수를 늘린다던가, 레이어의 수를 늘렸을 떄는 좋은 성능을 보였지만, activation function을 바꾸면 학습이 잘 되지 않는다. 

 

Reference

Andrychowicz, M., Denil, M., Gomez, S., Hoffman, M. W., Pfau, D., Schaul, T., ... & De Freitas, N. (2016). Learning to learn by gradient descent by gradient descent. In Advances in neural information processing systems (pp. 3981-3989).

Abstract

Despite the breakthroughs in accuracy and speed of single image super-resolution using faster and deeper convolutional neural networks, one central problem remains largely unsolved: how do we recover the finer texture details when we super-resolve at large upscaling factors? The behavior of optimization-based super-resolution methods is principally driven by the choice of the objective function. Recent work has largely focused on minimizing the mean squared reconstruction error. The resulting estimates have high peak signal-to-noise ratios, but they are often lacking high-frequency details and are perceptually unsatisfying in the sense that they fail to match the fidelity expected at the higher resolution. In this paper, we present SRGAN, a generative adversarial network (GAN) for image super-resolution (SR). To our knowledge, it is the first framework capable of inferring photo-realistic natural images for 4× upscaling factors. To achieve this, we propose a perceptual loss function which consists of an adversarial loss and a content loss. The adversarial loss pushes our solution to the natural image manifold using a discriminator network that is trained to differentiate between the super-resolved images and original photo-realistic images. In addition, we use a content loss motivated by perceptual similarity instead of similarity in pixel space. Our deep residual network is able to recover photo-realistic textures from heavily downsampled images on public benchmarks. An extensive mean-opinion-score (MOS) test shows hugely significant gains in perceptual quality using SRGAN. The MOS scores obtained with SRGAN are closer to those of the original high-resolution images than to those obtained with any state-of-the-art method.


깊은 cnn을 활용하여 SR의 도메인에서 좋은 결과를 만들어내고 있지만, 큰 upscaling factor를 사용할 때 디테일한 부분을 어떻게 잡아낼 것인가에 대한 문제가 해결되지 않고 있다. 

최적화에 기반한 SR은 목적함수가 핵심이다.

최근 연구는 mean squared reconstruction error(per-pixel error같음)을 최소화 시키는 방향으로 나아가고 있다.

이를 통해 얻어진 결과는 노이즈는 잘 잡아내지만 디테일한 부분이 부족하다는 게 매우 만족스럽지 못하다.

이 논문은 GAN을 활용한 SRGAN을 소개한다.

4배의 upscaling factor를 사용하여 진짜 같은 이미지를 만들어내는 것에선 첫 번째 프레임워크이다.

이를 위해 우리는 adversarial, content loss로 우리어진 perceptual loss 함수를 제안한다.

adversarial loss는 진짜 이미지와 sr 이미지의 차이를 학습한 discriminator를 사용하여 자연스러운 이미지를 만들도록 도와준다.

content loss는 픽셀 공간의 유사성이 아닌 feature map(perceltual loss의 특징)의 유사성을 고려한다.

우리가 사용한 깊은 resnet은 다운샘플된 이미지를 진짜 같은 이미지로 복원할 수 있게한다.

SRGAN을 사용함에 따라 MOS에서 유의한 향상을 보였다. SRGAN과 MOS를 사용하면 더 좋은 결과를 만들어낼 수 있다.


요약

  • 이 논문은 진짜 같은 Super-Resolution을 생성하는게 목적이며, 기존에 SR은 여러 장의 이미지를 활용했다는 것에 반해 GAN을 이용하여 한장의 이미지로 결과물을 생성한다.
  • 기존의 per-pixel loss는 perceptual difference를 잡아내지 못하기 때문에, 이 논문 또한 perceptual loss를 활용한다.
  • Per-pixel MSE는 평균을 사용하기 때문에 디테일이 사라지게 되는 원인이다. 하지만 GAN을 사용하면 이를 보완할 수 있다. GAN은 sampling을 활용하기 때문인데, 이때 sampling된 이미지는 우리가 볼때는 괜찮지만 score 측면에서는 떨어지는 결과를 준다.
  • loss를 보면 VGG 네트워크를 사용했다고 나오는데, 이는 GAN 내부에 존재하는 것이 아니라 generator가 뽑아낸 target 값을 단순하게 imagenet weight가 load된 VGG를 사용하여 feature map을 도출하고, 이를 통해 loss를 계산하는 것이다.여기서 VGG는 따로 학습되지 않는다.
  • 마지막으로 밑 그림의 결과 사진을 보면 목도리나 손 같은 부분이 기존 결과보다 더 디테일한 것을 볼 수 있는데, 정답과는 상관이 없기 때문에 점수는 떨어진다.

 

Reference

Ledig, C., Theis, L., Huszár, F., Caballero, J., Cunningham, A., Acosta, A., ... & Shi, W. (2017). Photo-realistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 4681-4690).