SPPNet : Spatial Pyramid Pooling 

in Deep Convolutional Networks for Visual Recognition


SPPNet

 

가장 큰 장점

1. R-CNN은 이미지 한 장당 수천 번의 CNN을 수행함(Time-Consuming).

이미지 안에서 bounding box Selective Search 방법을 사용.

반면에 SPPNet은 딱 한 번 CNN을 수행함(one-pass).

ImageFeature Map에서 어떤 위치에 해당하는 정보를 뽑아냄.

 

2. SPPNet은 이미지의 Scale(확대/축소), Size(크기), Aspect Ratio(종횡비)에 영향을 받지 않음.

 

기존의 CNN의 입력

무조건 고정 크기가 입력됨.

: Fully Connected Layer 때문이다(fixed-length Vector가 필요함).

 

Crop(자르기) : 전체 객체가 들어가지 않는 경우가 발생.

Warp(줄이거나 늘리기) : 원하지 않는 왜곡이 발생.

 

사실, Convolution Layer에는 고정 크기의 입력이 필요하지 않음.

 

BoW(Bag of Words) 기법의 확장


 [Box of Words]


1. Feature Extracting

2. Clustering : K-Means 알고리즘 사용, Codeword 찾아냄

3. Codebook Generation

4. Image Representation : Histogram화 시킴(bin 개수 = Codeword 개수)

5. Learning and Recognition : SVM 등의 방법으로 분류


R-CNN 방법과 SPPNet 방법


[R-CNN]


R-CNNImage 영역(Selective Search 방법으로 수천 개를 만듦.)을 추출하고 Warp 시킴.

원하지 않는 왜곡(Unwanted geometric distortion)이 발생함.

이후 추출한 영역을 CNN으로 학습시킴.

매우 느리다(time-consuming).

 

[Spatial Pyramid Pooling]


SPPNet Convolution 마지막 층에서 나온 Feature Map을 분할하여 평균을 내고 

고정 크기로 만들어버림.

→ '06년 발표된 Spatial Pyramid Matching 방법에서 나옴.    


[Spatial Pyramid Matching]


분할 방법은 “fast” mode of Selective Search

[논문 : “Segmentation as selective search for object recognition,” in ICCV, 2011.]

마지막 Pooling LayerSPP(Spatial Pyramid Pooling)로 대체함.

+ 내부적으로 Global Max Pooling 사용.

분할하는 크기만 동일하면 어떤 Size, Scale, Aspect Ratio를 가진 이미지가 와도 똑같은 크기의 

Vector가 출력됨.(이후 FC Layer에 입력으로 들어감.)

분류기 : 이진 선형 SVM


[Spatial Pyramid Pooling Network Architecture]

 

분할 크기(4-level Spatial Pyramid)

50 bins : {6x6, 3x3, 2x2, 1x1} 12,800-dimension(256x50) representations

30 bins : {4x4, 3x3, 2x2, 1x1}

→ stride를 각각의 크기 별로 따로 적용함.



SPP Layer의 출력

(K * M)-dimensional Vector (K는 마지막 Feature Mapdimension, Mbin의 크기)

 

Training

Single-size training : 224x224 size로만 학습, {3x3, 2x2, 1x1} SPP 사용.

2. Multi-size training : 180x180 and 224x224 두 종류를 학습.

180-Network224-Network의 출력은 동일하다.

? 나누고, 평균을 구해서 뽑기 때문.

Network Switching 방법? Epoch 1180-Network, Epoch 2224-Network... 반복!

 

실험 네트워크


[Test Network Architecture : 1. ZFNet, 2. AlexNet, 3. Overfeat Architecture]


ZFNetAlexNetConvolution Layer5

Overfeat 구조는 FC Layer1x1 Convolution으로 이해한 구조.

Sliding Window 개념 적용 가능, 연산량 감소 but 정확도는 높지 않음.

 

Improves Accuracy 



1. Multi-level Pooling

{6x6, 3x3, 2x2, 1x1}{4x4, 3x3, 2x2, 1x1}의 차이는 거의 없다.

하지만, SPP를 사용한 것과 사용하지 않은 것은 확실한 차이가 있다.

(50 bin pyramid : 34.98/14.14, no-SPP : 35.99/14.76)

 

2. Multi-size Training(그림 참조)

Multi-size SPPNet(Overfeat-7) : 29.68%

Single-size SPPNet : 30.36% / no-SPP : 32.01%


3. Full-image Representations



 다중 조합 뷰가 싱글 Full-Image 뷰보다 더 좋은 경우도 있음.

(We find that the combination of multiple views is substantially better than the single full-image view.)

 

하지만 여전히 Full-Image View는 장점이 있는데

1. 수십 개의 뷰를 조합한 경우에도 추가적인 두 개의 전체 이미지 뷰에서 약 0.2%의 성능 향상이 있음.

2. 전체 이미지 뷰는 원래의 방식과 동일하다.

3. 응용 프로그램에서 이미지 자체를 표현하는 것을 요구할 수 있음.

Detection Result



Positive Sample vs Negative Sample(Data Labeling) 


[Positive Sample and Negative Sample]


positive sample : ground-truth(=GT) Sample을 사용.

negative sample : positive sample과 최대 30% 겹치는 Sample을 사용(IOU 측정법).


[Intersection over Union]


Result 



Conclusion

- SPPNet은 다른 크기, 다른 사이즈, 다른 종횡비를 다루기 위한 유연한 방법이다.

ClassificationDetection에서 높은 정확성, 특히 DNN 기반의 Detection을 크게 빠르게 해줌.



Posted by NDC :