Jongchan/attention-module
PyTorch implementation of two attention mechanisms (BAM, CBAM) for improving CNN performance on visual recognition tasks.

This repository provides official PyTorch implementations of BAM (Bottleneck Attention Module) and CBAM (Convolutional Block Attention Module), two attention mechanisms designed to improve convolutional neural networks. Both modules can be plugged into existing CNN architectures like ResNet to boost performance on image classification. The code includes training scripts for ImageNet, pretrained checkpoints, and can be extended to other vision tasks.