Official PyTorch code for "CBAM: Convolutional Block Attention Module (ECCV2018)"
pip3 install torch
pip3 install torchvision
ResNet50 based examples are included. Example scripts are included under ./scripts/
directory.
ImageNet data should be included under ./data/ImageNet/
with foler named train
and val
.
# To train with CBAM (ResNet50 backbone)
# For 8 GPUs
python3 train_imagenet.py --ngpu 8 --workers 20 --arch resnet --depth 50 --epochs 100 --batch-size 256 --lr 0.1 --att-type CBAM --prefix RESNET50_IMAGENET_CBAM ./data/ImageNet
# For 1 GPUs
python3 train_imagenet.py --ngpu 1 --workers 20 --arch resnet --depth 50 --epochs 100 --batch-size 64 --lr 0.1 --att-type CBAM --prefix RESNET50_IMAGENET_CBAM ./data/ImageNet
GPU | FP32 |
---|---|
8 cards | Prec@1 76.216 fps:83.11 |
1 cards | fps:2634.37 |
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》