본문 바로가기
네이버 부스트캠프 AI Tech/Deep Learning Basics

[부스트캠프 AI Tech] Convolutional Neural Networks

by 중앙백 2022. 2. 8.
Convolutional Neural Networks(CNN)

 

  • Convolution?

convolution 연산

 

  • RGB Image Convolution
    ⊙ convolution layer depth = image depth
    ⊙ the number of convolution layer = output feature depth

 

  • CNN은 convolution layer, pooling layer, fully connected layer로 구성
    convolution layer & pooling layer : feature extraction
    fully connected layer : decision making(classification etc)

  • Parameter 개수 계산 연습

  • 1*1 convolution
    Dimension reduction
    To reduce the number of parameters while increasing depth

1 * 1 convolution

 


Modern CNN

 

  • AlexNet
    - 5개의 convolutional layer와 3개의 dense layer로 구성
    - ReLU(Rectified Linear Unit) activation : vanishing gradient 문제 극복. linear model의 특성 보존
    - 2 GPU implementation
    - Local response normalization, Overlapping polling
    - Data augmentation
    - Drop out
    AlexNet - 8 layers

 

 

  • VGGNet
    - convolution layer에 반복적인 3*3 convolution filters 사용 (AlexNet은 5*5도 같이 사용했음)
    - fully connected layer에서 1*1 convolution filter 사용
    - Dropout(p=0.5)

VGGNet - 19 layers

  • 3*3 convolution filter의 장점
    - Receptive field는 유지하면서 number of paremeter를 줄일 수 있다.
    같은 5 * 5 범위의 정보를 담을 수 있는데 3 * 3이 파라미터 개수가 더 적다.


  • GoogLeNet
    GoogLeNet - 22 layers


    - Inception blocks : 1*1 convolution을 이용해 채널 수를 줄이고 파라미터 개수를 줄임.
    Inception block


    - 1*1 convolution이 파라미터 개수를 줄이는 법
    같은 3 * 3 범위의 정보를 담고 있지만 1 * 1 matrix가 있을 때 파라미터 개수가 더 적다.

 

 

  • ResNet
    깊은 신경망일수록 학습하기 힘들었는데 ResNet은 identity map(skip connection)을 넣어 문제 해결

 

  • DenseNet
    - ResNet은 addition / DenseNet은 concatenation
    - concat연산을 계속하면 정보량이 무한히 늘어나므로 이를 방지하기 위한 Dense Block / Transition Block
    ⊙ Dense Block : 각 레이어에서 이전 레이어의 feature map을 concatenate하는 과정
    ⊙ Transition Block : BatchNorm → 1*1Conv → 2*2AvgPooling 과정을 거쳐 Dimension reduction

Computer Vision Applications
Semantic Segmentation

 - 각 이미지를 픽셀마다 분류하는 것.

 

  • fully convolutional network
    - dense layer를 없애기 위함
    - number of parameters는 동일. 다만 fully convolution하게 되면 heat map으로 classfication이 가능해진다는 장점
    - input size에 비해 output dimension은 줄어듦 → output dimension을 늘릴 방법이 필요하게 됨

일반적인 CNN
Fully convolutional network

 

  • Deconvolution(cov transpose)

 

Detection
  • R-CNN: 이미지 안에서 2000개 영역을 선택하고 똑같은 크기로 만든다. CNN으로 region의 feature을 얻고 linear SVMs을 이용해 분류
    이미지 안에서 bounding box를 2000개 뽑으면 CNN을 2000번 돌려야 한다는 단점
  • SPPNet: 이미지 안에서 CNN을 한 번만 돌리도록 개선.
    이미지 전체에서 convolution feature map을 만들고 필요한 bounding box위치의 convolution tensor만 끌어옴
  • Fast R-CNN: 마지막에 neural network를 추가로 활용
  • Faster R-CNN: bounding box를 뽑아내는 과정도 학습하자. Region Proposal Network + Fast R-CNN
    RPN이 하는 일: bounding box 내에 물체가 있을 것 같은지 확인해주는 것
  • YOLO
    bounding box를 따로 뽑는 스탭이 없음. bounding box를 찾음과 동시에 어떤 물체인지 평가하기 때문에 빠름

댓글