The UDA architecture everyone else forgot to update
Official CVPR 2022 implementation that retools domain-adaptive semantic segmentation with a transformer backbone and three stubborn training tricks to stop synthetic-to-real models from overfitting rare classes.

What it does
DAFormer is a semantic segmentation architecture built specifically for unsupervised domain adaptation (UDA). It swaps the usual CNN backbones for a Transformer encoder paired with a multi-level context-aware feature fusion decoder, targeting scenarios like adapting synthetic GTA or Synthia data to real Cityscapes imagery, or clear-day Cityscapes to adverse-weather ACDC and DarkZurich. The repository includes the official implementation, pretrained checkpoints, and benchmark results.
The interesting bit
While most UDA research chased novel adaptation strategies, it kept using outdated network architectures. DAFormer argues the backbone matters: it pairs that architectural update with three simple but crucial training stabilizers—rare class sampling, a thing-class ImageNet feature distance, and learning rate warmup—to keep the model from overfitting its synthetic source domain.
Key highlights
- Claims a 10.8 mIoU jump over prior SOTA on GTA→Cityscapes (68.3 vs. ProDA’s 57.5) and 5.4 mIoU on Synthia→Cityscapes, per the README tables.
- Extends beyond classic UDA to domain generalization, where it reportedly lifts performance by +6.5 mIoU without requiring any target-domain images.
- Handles multiple adaptation scenarios: synthetic-to-real, clear-to-adverse-weather, and plain domain generalization.
- Provides demo inference, checkpoint downloads, and a
demo.gifshowing qualitative results on Cityscapes validation.
Caveats
- The README is upfront that you will need to wrangle several large datasets (Cityscapes, GTA, optional Synthia/ACDC/Dark Zurich) and manually restructure some folders.
- All reported experiments ran on an NVIDIA RTX 2080 Ti; whether it runs leaner or hungrier is unspecified.
- The repository is a research artifact with follow-up papers (HRDA, MIC, EDAPS, SemiVL), so active development has largely moved downstream.
Verdict
Worth a look if you are building or benchmarking domain-adaptive segmentation pipelines and need a modern transformer baseline. Skip it if you are after a plug-and-play production tool—this is a CVPR paper release, not a product.
Frequently asked
- What is lhoyer/DAFormer?
- Official CVPR 2022 implementation that retools domain-adaptive semantic segmentation with a transformer backbone and three stubborn training tricks to stop synthetic-to-real models from overfitting rare classes.
- Is DAFormer open source?
- Yes — lhoyer/DAFormer is an open-source project tracked on heatdrop.
- What language is DAFormer written in?
- lhoyer/DAFormer is primarily written in Python.
- How popular is DAFormer?
- lhoyer/DAFormer has 571 stars on GitHub.
- Where can I find DAFormer?
- lhoyer/DAFormer is on GitHub at https://github.com/lhoyer/DAFormer.