SlideShare a Scribd company logo
1 of 15
Download to read offline
CNN Visualization Technique
KAIST 전산학부 정태영
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
• ILSVRC-2013 우승팀이 사용한 방법론
• 2012년 우승구조인 AlexNet을 Visualizing 한 뒤,
거기서 얻은 insight 를 바탕으로 CNN 구조를 개선한 논문
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
오른쪽은 평범한 CNN의 forward pass 구조,
왼쪽은 deconvolution을 진행하는 구조.
Convolution을 되돌리는 방법으로는 원래
필터를 transpose 시킨 것을 사용
Max Pooling은 forward pass 시 선택된
위치를 기억해서 해당 위치의 값만 되돌림
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
• 각 필터가 가장 활성화되는 이미지에 대해 필터를 시각화 한 결과
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
• 각 필터가 가장 활성화되는 이미지에 대해 필터를 시각화 한 결과
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
• AlexNet을 해당 방법으로 시각화 하면 학습된 필터에 계단 현상이 발생함
을 알 수 있음
• 이를 해결하기 위해 strid와 filter size를 줄였더니 더 좋은 성능이 나옴
=> 시각화로 CNN 구조를 이해한 뒤 더 개선함!
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
• 주어진 이미지에서 일정 부분을 가린 뒤 CNN을 통과시키는 방법으로
해당 이미지 중 어떤 부분이 판정에 가장 큰 영향을 미치는지도 추정 가능
deconvnet(2013)
Visualizing and Understanding Convolutional Networks
• 주어진 이미지의 크기 변경, 평행 이동, 회전이 CNN으로 계산한 인코딩에
어떤 영향을 주는지도 확인 가능
• 크기 변경(Scaling), 평행 이동(Translation)에는 큰 영향을 받지 않지만
회전(Rotation)의 경우 영향을 크게 받음
Guided Backpropagtion(2014)
Striving for Simplicity: The All Convolutional Net
• 논문 자체는 Max pooling을 모두 Convolution layer로 대체해도 성능
하락이 없다는 내용
• Max pooling이 없기 때문에 deconvnet과 달리 Unpooling에 필요한
위치 정보를 저장할 필요가 없음
Guided Backpropagtion(2014)
Striving for Simplicity: The All Convolutional Net
• backward pass에서의 부호만 고려하는 deconvnet과 달리, forward
pass에서의 부호도 고려해서 backprop을 해주면 좀 더 좋은
visualization을 얻을 수 있는 것을 발견함
Guided Backpropagtion(2014)
Striving for Simplicity: The All Convolutional Net
• backward pass에서의 부호만 고려하는 deconvnet과 달리, forward
pass에서의 부호도 고려해서 backprop을 해주면 좀 더 좋은
visualization을 얻을 수 있는 것을 발견함
Grad-CAM(2016)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
• CAM은 Class Activation Mapping의 약자로, 시각화 결과에 모델의
예측값이 반영되지 않은 기존 방법과 달리 각 예측값에 대한 시각화를
해주는 방법론 (Learning Deep Features for Discriminative Localization, CVPR 2016).
• 모델에 fully connected layer가 없어야 하는 CAM을 일반화 시킨 것이
이번에 소개하는 Grad-CAM
Grad-CAM(2016)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
• 위의 이미지에서 시각화에 준 condition(Cat / Dog)에 따라 그에
대응되는 부분만 표시해주는 것을 볼 수 있음
• 이미지에서 heatmap을 계산하는 것이므로 앞에서 나온 Guided
Backpropagation과 결합해 Guided-Grad-CAM으로도 사용 가능
Grad-CAM(2016)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
• heatmap은 단순히 주어진 레이블에 대한 중간 conv layer의 feature 값
의 gradien를 계산한 뒤, 이를 weigh로 사용해 sum을 한 뒤 ReLU를 씌
워서 구할 수 있음.
• ReLU를 사용하는 이유는 해당 레이블에 긍정적인 영향 (=positive
gradient)을 끼치는 이미지 부분만 찾기 위함
Grad-CAM(2016)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
• VQA나 Segmentation에도 활용 가능

More Related Content

Similar to CNN visualization

History of Vision AI
History of Vision AIHistory of Vision AI
History of Vision AITae Young Lee
 
강화학습과 LV&A 그리고 Navigation Agent
강화학습과 LV&A 그리고 Navigation Agent강화학습과 LV&A 그리고 Navigation Agent
강화학습과 LV&A 그리고 Navigation AgentYeChan(Paul) Kim
 
Slam algorithms
Slam algorithmsSlam algorithms
Slam algorithmsjdo
 
Image Deep Learning 실무적용
Image Deep Learning 실무적용Image Deep Learning 실무적용
Image Deep Learning 실무적용Youngjae Kim
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장Sunggon Song
 
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksOh Yoojin
 
[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networks[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networksKorea, Sejong University.
 
"Learning transferable architectures for scalable image recognition" Paper Re...
"Learning transferable architectures for scalable image recognition" Paper Re..."Learning transferable architectures for scalable image recognition" Paper Re...
"Learning transferable architectures for scalable image recognition" Paper Re...LEE HOSEONG
 
Imagination-Augmented Agents for Deep Reinforcement Learning
Imagination-Augmented Agents for Deep Reinforcement LearningImagination-Augmented Agents for Deep Reinforcement Learning
Imagination-Augmented Agents for Deep Reinforcement Learning성재 최
 
Summary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detectionSummary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detection창기 문
 
Summary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detectionSummary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detection창기 문
 
딥러닝 논문읽기 efficient netv2 논문리뷰
딥러닝 논문읽기 efficient netv2  논문리뷰딥러닝 논문읽기 efficient netv2  논문리뷰
딥러닝 논문읽기 efficient netv2 논문리뷰taeseon ryu
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Othersjdo
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNetjdo
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬현찬 양
 
[Paper] shuffle net an extremely efficient convolutional neural network for ...
[Paper] shuffle net  an extremely efficient convolutional neural network for ...[Paper] shuffle net  an extremely efficient convolutional neural network for ...
[Paper] shuffle net an extremely efficient convolutional neural network for ...Susang Kim
 
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...Gyubin Son
 
Guided policy search
Guided policy searchGuided policy search
Guided policy searchJaehyeon Park
 
[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement Learning[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement LearningKiho Suh
 

Similar to CNN visualization (20)

History of Vision AI
History of Vision AIHistory of Vision AI
History of Vision AI
 
강화학습과 LV&A 그리고 Navigation Agent
강화학습과 LV&A 그리고 Navigation Agent강화학습과 LV&A 그리고 Navigation Agent
강화학습과 LV&A 그리고 Navigation Agent
 
Slam algorithms
Slam algorithmsSlam algorithms
Slam algorithms
 
Image Deep Learning 실무적용
Image Deep Learning 실무적용Image Deep Learning 실무적용
Image Deep Learning 실무적용
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장
 
HistoryOfCNN
HistoryOfCNNHistoryOfCNN
HistoryOfCNN
 
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
 
[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networks[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networks
 
"Learning transferable architectures for scalable image recognition" Paper Re...
"Learning transferable architectures for scalable image recognition" Paper Re..."Learning transferable architectures for scalable image recognition" Paper Re...
"Learning transferable architectures for scalable image recognition" Paper Re...
 
Imagination-Augmented Agents for Deep Reinforcement Learning
Imagination-Augmented Agents for Deep Reinforcement LearningImagination-Augmented Agents for Deep Reinforcement Learning
Imagination-Augmented Agents for Deep Reinforcement Learning
 
Summary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detectionSummary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detection
 
Summary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detectionSummary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detection
 
딥러닝 논문읽기 efficient netv2 논문리뷰
딥러닝 논문읽기 efficient netv2  논문리뷰딥러닝 논문읽기 efficient netv2  논문리뷰
딥러닝 논문읽기 efficient netv2 논문리뷰
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 3 - GoogLeNet
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬
 
[Paper] shuffle net an extremely efficient convolutional neural network for ...
[Paper] shuffle net  an extremely efficient convolutional neural network for ...[Paper] shuffle net  an extremely efficient convolutional neural network for ...
[Paper] shuffle net an extremely efficient convolutional neural network for ...
 
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
 
Guided policy search
Guided policy searchGuided policy search
Guided policy search
 
[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement Learning[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement Learning
 

CNN visualization

  • 1. CNN Visualization Technique KAIST 전산학부 정태영
  • 2. deconvnet(2013) Visualizing and Understanding Convolutional Networks • ILSVRC-2013 우승팀이 사용한 방법론 • 2012년 우승구조인 AlexNet을 Visualizing 한 뒤, 거기서 얻은 insight 를 바탕으로 CNN 구조를 개선한 논문
  • 3. deconvnet(2013) Visualizing and Understanding Convolutional Networks 오른쪽은 평범한 CNN의 forward pass 구조, 왼쪽은 deconvolution을 진행하는 구조. Convolution을 되돌리는 방법으로는 원래 필터를 transpose 시킨 것을 사용 Max Pooling은 forward pass 시 선택된 위치를 기억해서 해당 위치의 값만 되돌림
  • 4. deconvnet(2013) Visualizing and Understanding Convolutional Networks • 각 필터가 가장 활성화되는 이미지에 대해 필터를 시각화 한 결과
  • 5. deconvnet(2013) Visualizing and Understanding Convolutional Networks • 각 필터가 가장 활성화되는 이미지에 대해 필터를 시각화 한 결과
  • 6. deconvnet(2013) Visualizing and Understanding Convolutional Networks • AlexNet을 해당 방법으로 시각화 하면 학습된 필터에 계단 현상이 발생함 을 알 수 있음 • 이를 해결하기 위해 strid와 filter size를 줄였더니 더 좋은 성능이 나옴 => 시각화로 CNN 구조를 이해한 뒤 더 개선함!
  • 7. deconvnet(2013) Visualizing and Understanding Convolutional Networks • 주어진 이미지에서 일정 부분을 가린 뒤 CNN을 통과시키는 방법으로 해당 이미지 중 어떤 부분이 판정에 가장 큰 영향을 미치는지도 추정 가능
  • 8. deconvnet(2013) Visualizing and Understanding Convolutional Networks • 주어진 이미지의 크기 변경, 평행 이동, 회전이 CNN으로 계산한 인코딩에 어떤 영향을 주는지도 확인 가능 • 크기 변경(Scaling), 평행 이동(Translation)에는 큰 영향을 받지 않지만 회전(Rotation)의 경우 영향을 크게 받음
  • 9. Guided Backpropagtion(2014) Striving for Simplicity: The All Convolutional Net • 논문 자체는 Max pooling을 모두 Convolution layer로 대체해도 성능 하락이 없다는 내용 • Max pooling이 없기 때문에 deconvnet과 달리 Unpooling에 필요한 위치 정보를 저장할 필요가 없음
  • 10. Guided Backpropagtion(2014) Striving for Simplicity: The All Convolutional Net • backward pass에서의 부호만 고려하는 deconvnet과 달리, forward pass에서의 부호도 고려해서 backprop을 해주면 좀 더 좋은 visualization을 얻을 수 있는 것을 발견함
  • 11. Guided Backpropagtion(2014) Striving for Simplicity: The All Convolutional Net • backward pass에서의 부호만 고려하는 deconvnet과 달리, forward pass에서의 부호도 고려해서 backprop을 해주면 좀 더 좋은 visualization을 얻을 수 있는 것을 발견함
  • 12. Grad-CAM(2016) Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization • CAM은 Class Activation Mapping의 약자로, 시각화 결과에 모델의 예측값이 반영되지 않은 기존 방법과 달리 각 예측값에 대한 시각화를 해주는 방법론 (Learning Deep Features for Discriminative Localization, CVPR 2016). • 모델에 fully connected layer가 없어야 하는 CAM을 일반화 시킨 것이 이번에 소개하는 Grad-CAM
  • 13. Grad-CAM(2016) Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization • 위의 이미지에서 시각화에 준 condition(Cat / Dog)에 따라 그에 대응되는 부분만 표시해주는 것을 볼 수 있음 • 이미지에서 heatmap을 계산하는 것이므로 앞에서 나온 Guided Backpropagation과 결합해 Guided-Grad-CAM으로도 사용 가능
  • 14. Grad-CAM(2016) Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization • heatmap은 단순히 주어진 레이블에 대한 중간 conv layer의 feature 값 의 gradien를 계산한 뒤, 이를 weigh로 사용해 sum을 한 뒤 ReLU를 씌 워서 구할 수 있음. • ReLU를 사용하는 이유는 해당 레이블에 긍정적인 영향 (=positive gradient)을 끼치는 이미지 부분만 찾기 위함
  • 15. Grad-CAM(2016) Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization • VQA나 Segmentation에도 활용 가능