728x90
'Learning Deep Features for Discriminative Localization' 논문에 대해서 공부하였다. 본 논문은 CNN의 fully-connected layer을 삭제하고 Global Average Pooling을 삽입하여 기존에는 convolutional layer에서만 가능했던 localization을 end to end 차원에서도 가능한 Class Activation Map(CAM) 기법을 제시한다. GAP-CAM은 또한 generic한 성질을 가지고 있어 localization 뿐만 아니라 다른 다양한 task를 수행할 수도 있다.
원본 논문은 아래 링크에서 확인할 수 있다.
Learning Deep Features for Discriminative Localization
In this work, we revisit the global average pooling layer proposed in [13], and shed light on how it explicitly enables the convolutional neural network to have remarkable localization ability despite being trained on image-level labels. While this techniq
arxiv.org
아래는 논문을 요약 정리한 것이다.
1. Introduction
- convolutional units가 no supervision object detector로 사용될 수 있음
- 그러나 convolutional layer에서 localize 할 수 있더라도 classification에서 fully-connected layer가 사용되면 안됨
- 그래서 NIN, GoogLeNet 같은 fully-convolutional networks 제시
- global average pooling을 regularizer로 사용하여 training 도중 overfitting 방지
- 우리는 이 GAP가 regularizer를 넘어서 single forward-pass에서 localization 역할도 한다는 것을 발견.
의의
- weakly supervised object localiztion on ILSVRC benchmark에서 37.1% top-5 test error
- fully supervised AlexNet에서 34.2% top-5 test error
- localizability of the deep features → generic classification, localization, concept discovery에도 사용 가능
1.1. Related Work
- 우리는 localizing object를 넘어서 identifying exactly which regions of an image are being used for discrimination
Weakly-supervised object localization
- previous work
- Bergamo et al: self-taught object localization
- Cinbis et al: combine multiple-instance learning with CNN features
- Oquab et al: method for transferring mid-level image representations
→ 우리는 end-to-end으로 학습되어있고, single forward pass로 object를 localize 할 수 있다 - 우리와 가장 비슷한 3번 Oquab et al은 global max pooling 사용함
- 그래서 localization is limited to a point lying in the boundary of the object
- 우리는 GAP 사용
- identify complete extent of the object
- 또한, generic 하여 untrained set에도 사용 가능
- class activation map을 사용하여 표현
- GAP 자체가 참신한 기술은 아니지만 localization에 적용된다는 것은 unique하다.
Visualizing CNNs
- recent works that visualize the internal representation learned by CNNs
- Zeiler et al: use deconvolutional networks to visualize what patterns activate each unit
- Zhou et al: same network can perform both recognition and localization in a single forward pass
→ 우리는 remove the fully-connected layers, so can understand our network from the beginning to the end - works that invert fully-conncected layers.
- Mahendran et al and Dosovitskiy et al: analyze the visual encoding of CNNs by inverting deep features at different layers
→ 우리는 hightlight exactly which regions are important for discrimination
2. Class Activation Mapping
- GAP를 사용하여 CAM 생성하는 과정
- NIN, GoogLeNet과 같이 final output layer 전까지 convolutional layers고, GAP 후 나온 특징들을 가지고 fully-connected layer을 만들어서 output 생성
- weights of outputlayer을 convolutional feature maps에 project back하여 CAM 생성
- (수식)
GAP vs GMP
- GMP는 단 하나의 discriminative part만 분별한다면, GMP는 모든 부분을 다 찾아냄
- average pooling 할 때 GAP는 모든 discriminative parts를 찾아내고 모든 low activation 부분은 output을 reduce 하는 반면, GMP는 max가 아닌 다른 것들은 결과에 영향을 미치지 못한다
- ILSVRC dataset in Sec.3을 보면 GMP와 GAP가 classification에서는 비슷한 퍼포먼스를 내도, localization에서는 GAP가 GMP보다 월등히 높다
3. Weakly-supervised Object Localization
- 여기서는 CAM의 localization ability를 평가한다
- ILSVRC 2014 dataset 사용
- localization에 대해 학습할 때 classification 능력에 문제가 없다는 것을 보여준다
3.1. Setup
- CNN
- AlexNet
- VGGnet
- GoogLeNet
- 위 네트워크들에 대해 fully-connected layers를 삭제하고 GAP 삽입
- GAP의 spatial resolution(분해능)이 클수록 localize 잘한다 = mapping resolution 높다
- AlexNet 13x13, 나머지 14x14
- Classification
- model-GAP vs original
- Localization
- vs original+back propagation
- GAP vs GMP
- vs GoogLeNet-GMP
- top-1, top-5 error for evaluation
3.2. Results
Classification
- 1-2% 떨어짐
- 특히 AlexNet이 제일 크게 떨어짐 (19.5→26.3)
- 그래서 2 convolutional layers을 더 더해서 AlexNet*-GAP로 보완함 (20.9)
- classification 능력 보존
- GoogLeNet-GAP, GoogLeNet-GMP classification 능력은 비슷
Localization
- localiation을 수행하기 위해서는 bounding box와 category 생성해야 함
- bounding box 생성 과정: segment the heatmap
- outperform all the baseline approaches with GoogLeNet-GAP 43% error
- original has low mapping resolution (7x7) → prevents accurate localization
- outperform back prop.
- GoogLeNet-GAP > GoogLeNet-GMP
Weakly-supervised vs Fully-supervised
- 이 때는 weakly-supervised에서 heuristic 추가
- 1st, 2nd predicted classes 에서만 2 bounding boxes 선택하고 3rd 부터는 버림
- GoogLeNet-GAP + heuristic 과 fully-supervised AlexNet 별 차이 안남
- 한계: 그러나 똑같은 GoogLeNet-GAP 와 fully-supervised GoogLeNet을 비교하면 많이 떨어짐
4. Deep Features for Generic Localization
- higher level layers of CNN(fc6, fc7 of AlexNet 등)이 효과적인 generic features라고 한다
- 우리 GAP CNN도 못지않게 좋은 generic features이며 + localization까지 한다
- GoogLeNet-GAP vs fc7 from AlexNet vs ave pool from GoogLeNet
- GoogLeNet-GAP, GoogLeNet >> AlexNet
- GoogLeNet-GAP, GoogLeNet 차이도 크지 않음 despite having fewer convolutional layers
- localization도 잘함
4.1. Fine-grained Recognition
Fine-grained classification 은 Coarse-grained classification 보다 상대적으로 비슷한 특징을 가진 classs 들을 분류하는 것
- CUB-200-2011 dataset에서 200개의 새 품종 분류
- GoogLeNet-GAP on full image: category accuracy 63.0%
- when use bounding box → 70.5%
- identify bird bounding boxes as Sec 3.2. → use GoogLeNet-GAP to extract features again from the crops→retrain SVM: 67.8%
- can localize bird 41.0% under 0.5 intersection over IoU criterion.
4.2. Pattern Discovery
- 우리의 GAP-CAM 기술로 물체를 넘어서 요소나 패턴도 식별할 수 있다.
- ex) text, high-level concepts
- 공통 컨셉이 있는 이미지 셋을 이용하여 우리의 network가 어떤 지역을 중요하다고 식별하며, 그것이 input pattern과 일치하는지 알아보고자 함
- train linear SVM on the GAP layer of GoogLeNet-GAP → 그리고 CAM 을 적용하여 important region 식별
Discovering informative objects in the scenes
- 장면 식별에 중요한 물체 top6 일치
Concept localization in weakly labeled images
- 구문으로 되어 있는 추상적인 장면에서 important region 식별 가능
Weakly supervised text detector
- 텍스트 식별 가능
Interpreting visual question answering
- 질문에 대한 답과 관련된 지역 하이라이트
5. Visualizing Class-Specific Units
- Zhou et al 이 convolutional units가 visual concept detector(low-level concept: texture, materials to high-level concept: objects, scenes)로서 역할을 할 수 있다는 것을 밝혔으나, fully-connected layers에서는 어려움
- 우리는 해당 class에 가장 특징적인 units 제시할 수 있음
- 이걸 class-specific units라고 부르고자 함
- 또한, CNN이 bag of words를 학습한다
6. Conclusion
- 우리는 CAM for CNNs with GAP 기술을 제시한다
- 이 기술은 bounding box 없이 object localization이 가능하다
- 실험결과
- accurated object localizaiton
- generalizes to other visual recognition tasks
728x90