Towards Conditional Feature Alignment for Cross-Domain Counting

Zhuonan Liang, Dongnan Liu, Jianan Fan, Yaxuan Song, Qiang Qu +4 more
6/20/2025
cs.CV

No confident code implementation found for this paper.

Abstract

Object counting models often degrade under cross-domain deployment because density composition varies across domains and is itself task-relevant. Standard feature alignment methods tend to suppress such variation by encouraging global domain invariance, which can be harmful when source and target domains contain different proportions of background, sparse foreground, and dense foreground.

Show full abstract

We propose Conditional Feature Alignment (CFA), a cross-domain counting framework that aligns representations within label-induced conditions rather than across full marginal feature distributions. Given density annotations or pseudo-density predictions, CFA constructs foreground/background or density-level conditions and aligns only features belonging to matching conditions. We formalise this idea through a conditional divergence perspective, characterising an ideal conditionally aligned state with no within-condition discrepancy while preserving condition-marginal density shift. For unsupervised domain adaptation, CFA estimates source conditions from annotations and target conditions from detached pseudo-density maps, then performs condition-wise adversarial alignment with full-image consistency regularisation. For source-domain generalisation, we instantiate the same principle with MPCount by enforcing condition-wise memory-consistency between generated source-domain views. Experiments on crowd and cell counting benchmarks show competitive or improved performance across diverse UDA and DG settings. For example, on JHU-CROWD++ FH->SN, CFA-DG reduces MAE/RMSE from MPCount's 216.3/421.4 to 90.5/169.9, showing a marked improvement on this large weather- and density-induced shift. These results suggest that condition-wise alignment is a promising design principle for domain-adaptive counting.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liang2025towards,
  title  = {Towards Conditional Feature Alignment for Cross-Domain Counting},
  author = {Zhuonan Liang and Dongnan Liu and Jianan Fan and Yaxuan Song and Qiang Qu and Runnan Chen and Yu Yao and Peng Fu and Weidong Cai},
  year   = {2025},
  eprint = {2506.17137},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.17137v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.17137.svg)](https://codeofpaper.com/paper/2506.17137)

Discussion