# houqb/CoordAttention

Code for our CVPR2021 paper coordinate attention

Repository: https://github.com/houqb/CoordAttention
Canonical: https://ross.abutalabs.com/products/coordattention
Language: Python
License: MIT
License Family: permissive
Topics: attention, mobilenetv2, mobilenext
Last push: 2021-06-08T02:46:46+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2009, "days_push": 1912, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1152, forks 125 (observed 2026-08-28T04:03:47.277297+00:00)

## What it is
A PyTorch implementation of Coordinate Attention (CoordAttention), an efficient attention mechanism for mobile networks introduced in a CVPR 2021 paper. It provides a pluggable attention block that can be inserted into classic building blocks like MobileNetV2 inverted residuals and MobileNeXt sandglass blocks to improve feature representation.

## Use cases
- add coordinate attention to a MobileNetV2 model
- improve ImageNet classification accuracy on lightweight networks
- plug an attention block into custom CNN backbones
- train object detection models with coordinate attention
- boost semantic segmentation performance on mobile networks
- compare SE, CBAM, and coordinate attention blocks
- download a pretrained MobileNetV2 with CA weights

## When to choose
- you need an efficient attention mechanism for mobile or lightweight vision models
- you want to plug attention into existing CNN building blocks with minimal code
- you are reproducing CVPR 2021 coordinate attention results on ImageNet, COCO, or segmentation benchmarks

## When to avoid
- you need transformer-style self-attention for large vision models
- you require a maintained library with frequent updates and broad model zoo support
- you work outside PyTorch

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: computer-vision, image-processing, deep-learning
- platform: python
- tags: attention-mechanism, pytorch, cvpr2021, mobilenet, lightweight-networks, pretrained-models

## Member repositories
- houqb/CoordAttention (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:47.277297+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:33:33.195301+00:00, confidence not recorded.
  - readme: https://github.com/houqb/CoordAttention (fetched 2026-08-28T04:03:47.277297+00:00, sha 4de7f4fce331)
- Data as of 2026-08-30T08:39:29.467469+00:00.
