Convolutional Block Attention Module (CBAM) is an attention module for convolutional neural networks. Given an intermediate feature map, the module sequentially infers attention maps along two separate dimensions, channel and spatial, then the attention maps are multiplied to the input feature map for adaptive feature refinement.
Given an intermediate feature map $\mathbf{F} \in \mathbb{R}^{C×H×W}$ as input, CBAM sequentially infers a 1D channel attention map $\mathbf{M}_{c} \in \mathbb{R}^{C×1×1}$ and a 2D spatial attention map $\mathbf{M}_{s} \in \mathbb{R}^{1×H×W}$. The overall attention process can be summarized as:
$$ \mathbf{F}' = \mathbf{M}_{c}\left(\mathbf{F}\right) \otimes \mathbf{F} $$
$$ \mathbf{F}'' = \mathbf{M}_{s}\left(\mathbf{F'}\right) \otimes \mathbf{F'} $$
During multiplication, the attention values are broadcasted (copied) accordingly: channel attention values are broadcasted along the spatial dimension, and vice versa. $\mathbf{F}''$ is the final refined output.
Source: CBAM: Convolutional Block Attention ModulePaper | Code | Results | Date | Stars |
---|
Task | Papers | Share |
---|---|---|
Image Classification | 3 | 10.71% |
Object Detection | 2 | 7.14% |
Anomaly Detection | 2 | 7.14% |
Semantic Segmentation | 2 | 7.14% |
medical image detection | 1 | 3.57% |
Medical Object Detection | 1 | 3.57% |
Real-Time Object Detection | 1 | 3.57% |
Small Object Detection | 1 | 3.57% |
Instance Segmentation | 1 | 3.57% |
Component | Type |
|
---|---|---|
Channel Attention Module
|
Image Model Blocks | |
Spatial Attention Module
|
Image Model Blocks |