1. Introduce
VGG는 신경망의 깊이가 어떤 영향을 주는지 연구를 하기 위해 설계된 모델로 가장 작은 3x3 kernel을 통해 깊은 신경망 모델을 만들었다. (kernel 사이즈가 크면 이미지 사이즈가 금방 작아서 신경망을 깊게 구성할 수 없음)
2. 특징
VGG 이전의 방식들은 1번의 convolution(ReLU) 연산으로 4x4 feaure map이 만들어진 반면
VGG는 3번의 convolution(ReLU) 연산으로 4x4 feature map을 만들었다.
이런 방식으로 모델 깊이가 깊어지고 비선형성이 증가하여 feature 식별성이 증가하고 파라미터 수를 감소할 수 있다.
* 7x7 filter의 파라미터 수 -> 7x7x1 = 49
* 3x3 filter의 파라미터 수 -> 3x3x3 = 27

3. Architecture

VGG-16의 구조
[Input – C1 – C2 – MaxPool2 – C3 – C4 – MaxPool4 – C5 – C6 – C7 – MaxPool7 – C8 – C9 – C10 – MaxPool10 – C11 – C12 – C13 – MaxPool13 – FC14 – FC15 – FC16(Output)]
- 13 Convolution Layers + 3 Fully connected Layers
- 3x3 convolution filters
- 1 stride & 1 padding
- 2x2 max pooling (2 stride)
- ReLU
Input
입력 이미지 3x224x224
Layer C1
3x3 크기의 kernel 64개, stride=1, padding=1인 convolutional layer
입력 크기는 3x224x224 이고, 출력 크기는 64x224x224
Layer C2 3x3 크기의 kernel 64개, stride=1, padding=1인 convolutional layer
입력 크기는 64x224x224 이고, 출력 크기는 64x224x224
Layer Maxpool2
2x2 크기의 kernel, stride=2인 maxpooling layer
입력 크기는 64x224x224 이고, 출력 크기는 64x112x112
Layer C3
3x3 크기의 kernel 128개, stride=1, padding=1인 convolutional layer
입력 크기는 64x112x112 이고, 출력 크기는 128x112x112
Layer C4
3x3 크기의 kernel 128개, stride=1, padding=1인 convolutional layer
입력 크기는 128x112x112 이고, 출력 크기는 128x112x112
Layer Maxpool4
2x2 크기의 kernel, stride=2인 maxpooling layer
입력 크기는 128x112x112 이고, 출력 크기는 128x56x56
Layer C5
3x3 크기의 kernel 256개, stride=1, padding=1인 convolutional layer
입력 크기는 128x56x56 이고, 출력 크기는 256x56x56
Layer C6
3x3 크기의 kernel 256개, stride=1, padding=1인 convolutional layer
입력 크기는 256x56x56 이고, 출력 크기는 256x56x56
Layer C7
3x3 크기의 kernel 256개, stride=1, padding=1인 convolutional layer
입력 크기는 256x56x56 이고, 출력 크기는 256x56x56
Layer Maxpool7
2x2 크기의 kernel, stride=2인 maxpooling layer
입력 크기는 256x56x56 이고, 출력 크기는 256x28x28
Layer C8
3x3 크기의 kernel 512개, stride=1, padding=1인 convolutional layer
입력 크기는 256x28x28 이고, 출력 크기는 512x28x28
Layer C9
3x3 크기의 kernel 512개, stride=1, padding=1인 convolutional layer
입력 크기는 512x28x28 이고, 출력 크기는 512x28x28
Layer C10
3x3 크기의 kernel 512개, stride=1, padding=1인 convolutional layer
입력 크기는 512x28x28 이고, 출력 크기는 512x28x28
Layer Maxpool10
2x2 크기의 kernel, stride=2인 maxpooling layer
입력 크기는 512x28x28 이고, 출력 크기는 512x14x14
Layer C11
3x3 크기의 kernel 512개, stride=1, padding=1인 convolutional layer
입력 크기는 512x14x14 이고, 출력 크기는 512x14x14
Layer C12
3x3 크기의 kernel 512개, stride=1, padding=1인 convolutional layer
입력 크기는 512x14x14 이고, 출력 크기는 512x14x14
Layer C13
3x3 크기의 kernel 512개, stride=1, padding=1인 convolutional layer
입력 크기는 512x14x14 이고, 출력 크기는 512x14x14
Layer Maxpool13
2x2 크기의 kernel, stride=2인 maxpooling layer
입력 크기는 512x14x14 이고, 출력 크기는 512x7x7
Layer FC14
ReLU를 활성화 함수로 이용하는 fully connected layer
입력 크기는 25088 이고, 출력 크기는 4096
Layer FC15
ReLU를 활성화 함수로 이용하는 fully connected layer
입력 크기는 4096 이고, 출력 크기는 4096
Layer FC16
ReLU를 활성화 함수로 이용하는 output layer
입력 크기는 4096 이고, 출력 크기는 1000
4. Fully convolutional Networks
Train이 완료된 모델 Test 할 때, 마지막 3개의 Fully-Connected Layers(FC)를 Convolutional Layer로 변환
첫번째 FC Layer -> 7x7 Conv
두번째 FC Layer -> 1x1 Conv
세번째 FC Layer -> 1x1 Conv
이렇게 신경망을 convolution Layer로만 구성하면 이미지 크기에 제약이 사라진다.
FCN은 어떠한 이미지를 넣어도 해당 이미지와 동일한 사이즈의 이미지로 semantic segmentation 결과를 출력한다.
[참고]
https://arxiv.org/pdf/1409.1556v6.pdf
https://brave-greenfrog.tistory.com/47
'DL' 카테고리의 다른 글
| [논문리뷰]CLIP (Learning Transferable Visual Models From Natural Language Supervision) (0) | 2024.11.13 |
|---|---|
| Contrastive Learning (2) | 2024.11.12 |
| GAN(Generative Adversarial Networks) 리뷰 (1) | 2024.03.16 |
| ResNet(Residual Neural Network) 리뷰 (0) | 2024.03.12 |
| YOLO 리뷰 (2) | 2024.03.12 |