CoDi -- an exemplar-conditioned diffusion model for low-shot counting
On the map: Diffusion models → Image generation, text-to-image and editing
Abstract (arXiv)
Low-shot object counting addresses estimating the number of previously unobserved objects in an image using only few or no annotated test-time exemplars. A considerable challenge for modern low-shot counters are dense regions with small objects. While total counts in such situations are typically well addressed by density-based counters, their usefulness is limited by poor localization capabilities. This is better addressed by point-detection-based counters, which are based on query-based detectors. However, due to limited number of pre-trained queries, they underperform on images with very large numbers of objects, and resort to ad-hoc techniques like upsampling and tiling. We propose CoDi, the first latent diffusion-based low-shot counter that produces high-quality density maps on which object locations can be determined by non-maxima suppression. Our core contribution is the new exemplar-based conditioning module that extracts and adjusts the object prototypes to the intermediate layers of the denoising network, leading to accurate object location estimation. On FSC benchmark, CoDi outperforms state-of-the-art by 15% MAE, 13% MAE and 10% MAE in the few-shot, one-shot, and reference-less scenarios, respectively, and sets a new state-of-the-art on MCAC benchmark by outperforming the top method by 38% MAE. The code is available at https://github.com/gsustar/CoDi
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Image generation, text-to-image and editing, one of 14 directions in Diffusion models. Builds on 40 of its 62 references that are in the map. First posted on arXiv 23 Dec 2025.
Builds on
40 of 62 references.
References · 40
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2020Denoising Diffusion Probabilistic Modelscited by 20,851
- 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 19,604
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
- 2023Segment Anythingcited by 8,158
- 2023DINOv2: Learning Robust Visual Features without Supervisioncited by 7,764
- 2017Mask R-CNNcited by 7,259
- 2022Scalable Diffusion Models with Transformerscited by 5,931
- 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,861
- 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,290
- 2019Generative Modeling by Estimating Gradients of the Data Distributioncited by 4,067
- 2021Improved Denoising Diffusion Probabilistic Modelscited by 3,736
28 more
- 2023Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detectioncited by 3,274
- 2023Common Diffusion Noise Schedules and Sample Steps are Flawedcited by 308
- 2023AM-RADIO: Agglomerative Vision Foundation Model -- Reduce All Domains Into Onecited by 165
- 2021Learning To Count Everythingcited by 149
- 2018Class-Agnostic Countingcited by 85
- 2022Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Countingcited by 80
- 2022CounTR: Transformer-based Generalised Visual Countingcited by 79
- 2022A Low-Shot Object Counting Network With Iterative Prototype Adaptationcited by 65
- 2022Few-shot Object Counting with Similarity-Aware Feature Enhancementcited by 62
- 2024CountGD: Multi-Modal Open-World Countingcited by 59
- 2022Few-shot Object Counting and Detectioncited by 55
- 2024DAVE -- A Detect-and-Verify Paradigm for Low-Shot Countingcited by 49
- 2022Learning to Count Anything: Reference-less Class-agnostic Counting with Weak Supervisioncited by 41
- 2023Point-Query Quadtree for Crowd Counting, Localization, and Morecited by 40
- 2023Point, Segment and Count: A Generalized Framework for Object Countingcited by 39
- 2022Exemplar Free Class Agnostic Countingcited by 32
- 2023Vision Transformer Off-the-Shelf: A Surprising Baseline for Few-Shot Class-Agnostic Countingcited by 25
- 2024Improving Point-based Crowd Counting and Localization Based on Auxiliary Point Guidancecited by 22
- 2024A Novel Unified Architecture for Low-Shot Counting by Detection and Segmentationcited by 21
- 2023CrowdDiff: Multi-hypothesis Crowd Density Estimation using Diffusion Modelscited by 20
- 2025T2ICount: Enhancing Cross-modal Understanding for Zero-Shot Countingcited by 19
- 2023Can SAM Count Anything? An Empirical Study on SAM Countingcited by 18
- 2023ABC Easy as 123: A Blind Counter for Exemplar-Free Multi-Class Class-agnostic Countingcited by 13
- 2025YOLO-Count: Differentiable Object Counting for Text-to-Image Generationcited by 10
- 2023Learning Discriminative Features for Crowd Countingcited by 8
- 2025A Survey on Class-Agnostic Counting: Advancements from Reference-Based to Open-World Text-Guided Approachescited by 7
- 2023SQLNet: Scale-Modulated Query and Localization Network for Few-Shot Class-Agnostic Countingcited by 5
- 2025Generalized-Scale Object Counting with Gradual Query Aggregationcited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2024Detection-Driven Object Count Optimization for Text-to-Image Diffusion Models
- 2026RECOUNT: Reference-guided Counting with Synthetic Visual Exemplars
- 2024AFreeCA: Annotation-Free Counting for All
- 2024Object Pose Estimation via the Aggregation of Diffusion Features
- 2022DiffusionDet: Diffusion Model for Object Detection
- 2023SYRAC: Synthesize, Rank, and Count
- 2025CountSteer: Steering Attention for Object Counting in Diffusion Models
- 2024Diffusion-based Data Augmentation for Object Counting Problems