Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBAM: Convolutional Block Attention Module #24

Open
chullhwan-song opened this issue Jul 23, 2018 · 3 comments
Open

CBAM: Convolutional Block Attention Module #24

chullhwan-song opened this issue Jul 23, 2018 · 3 comments

Comments

@chullhwan-song
Copy link
Owner

https://arxiv.org/abs/1807.06521

@chullhwan-song
Copy link
Owner Author

chullhwan-song commented Jul 23, 2018

What?

  • attention 기반의 cnn 을 이용한 image classification 관련 논문
  • 이전에 이와유사한 유명(?)한 논문이 있음 : Residual Attention Network for Image Classification
  • 이젠 RNN계열이나 CNN계열은 attention 개념이 필수(?)라 여겨지기 까지..함.
  • 이 논문은 channel 과 spatial의 동시에 수행하는 attention 개념을 애기하고 있음. > CBAM: Convolutional Block Attention Module

구조

image

Convolutional Block Attention Module

  • 위의 그림을 수식으로 보면,
    image
    • input : image
    • channel : image
    • spatial : image
    • image : element wise multiplication
    • F'는 conv feature map을 받고 image 를 생성한 Mc의 결과와 다시 conv feature map와 element wise multiplication 하여 결과를 생성.
    • F''는 F'을 입력값으로 받고 Ms의 결과와 F'의 element wise multiplication 하여 결과를 생성.
  • Channel attention module = Mc
    image
    • channel attention 모듈은 일반적으로 senet을 적용하는데 여기서도 그 idea를 차용.
    • average pooling & max pooling 기법을 동시에 하여 최종적으로 획득.
      • 원래 average pooling이 senet에서 시도한 내용
      • max pooling를 더한 case > 왠지 모든걸 다 시도해본 느낌.^^;
    • 최종적으로 다음과 같이 수식으로 표현.
      image
      • r is the reduction ratio.
      • image 는 sigmoid f
      • W_0, W_1은 learned, > 즉, 두개의 nets를 적용함.
        • W_O은 RELU
        • average pooling & max pooling과 서로 shared > ?

Spatial attention module = Ms

image

  • channel attention과 마찬가지로 average pooling & max pooling의 조합임.
    image
    • image 은 7x7 kernel
    • average pooling & max pooling의 결과를 concat하는 구조.

Arrangement of attention modules.

  • 위에서 언급해던 내용 즉, input과 channel 조합, input과 spatial 조합(parallel)이 보통인데..여기서는 그렇지 않고 input>채널>spatial 순(sequential)에 대한 설명
    • 결과적으로 실험에 의해 해보니 sequential 방법이 더 좋다고 설명
  • channel attention을 what 개념 & spatial attention을 where concept으로 표현.
    • 사실 channel attention을 what으로 표현하는것을 처음본것같은데.ㅎㅎㅎ(많이 논문을 안읽어서.ㅠ)

resnet 과의 응용

image

실험

image
image

@developer0hye
Copy link

CBAM 또한 BAM 과 마찬가지로 Bottleneck 위치에 추가되는 방식으로 실험이 진행된 건가요?

@developer0hye
Copy link

아... 저자의 repo를 보니 Bottleneck 위치에만 추가되는 방식이 아니군요. 감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants