atlas

Research map / Image generation / Text-to-image diffusion

Make It Count: Text-to-Image Generation with an Accurate Number of Objects

CVPR 2025 · Image generation › Text-to-image diffusion · approach: Text-driven synthesis and semantic guidance · 5 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes CountGen, which finds instance-identity features in SDXL self-attention, corrects object counts in the intermediate layout with a trained ReLayout U-Net, and guides denoising with layout losses to generate the prompted number of objects.

Problem

Text-to-image diffusion models often generate the wrong number of objects specified in the prompt, especially for counts above three.

Approach

Uses SDXL self-attention features (layer up_52 at t=500) with cross-attention foreground masks and DBSCAN to detect instances mid-denoising; a U-Net (ReLayout) trained on self-generated k vs k+1 mask pairs adds or removes instances; then test-time cross-attention layout loss and self-attention masking enforce the corrected layout.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
apply CountGen to SDXLSDXL · CoCoCountHuman accuracy: 26 -> 52Helped
apply CountGen to SDXLSDXL · T2I-Compbench-CountHuman accuracy: 29 -> 48Helped
apply CountGen to SDXLSDXL · CoCoCountYOLOv9 accuracy: 28 -> 50Helped
replace CountGen-Image with Bounded Attention (ablation)CountGen · CoCoCountHuman accuracy: 52 -> 42Hurt
replace CountGen-Layout with random masks (ablation)CountGen · CoCoCountHuman accuracy: 52 -> 44Hurt
remove self-attention masking (ablation)CountGen-Image · CountGen-Image layout adherencePrecision: 59±3.1 -> 48±3.1Hurt
remove self-attention masking (ablation)CountGen-Image · CountGen-Image layout adherenceRecall: 82±2.5 -> 81±2.7No clear effect
remove self-attention masking (ablation)CountGen-Image · CountGen-Image layout adherenceIOU: 52±1.2 -> 51±1.5No clear effect
remove object layout loss (ablation)CountGen-Image · CountGen-Image layout adherenceRecall: 82±2.5 -> 64±2.5Hurt
remove object layout loss (ablation)CountGen-Image · CountGen-Image layout adherenceIOU: 52±1.2 -> 36±1.4Hurt

Surprising findings

Limitations

Experimental setup

Datasets: T2I-CompBench-Count (218 prompts) self-generated SDXL k/k+1 mask pairs

Benchmarks: T2I-CompBench-Count CoCoCount

Metrics: count accuracy (human) count accuracy (YOLOv9 detection) precision recall IOU image quality preference

Baselines: SDXL Repeated Object Reason Out Your Layout DALL-E 3 Random masks + Bounded Attention Counting Guidance RPG Token Optimization

Builds on: SDXL Bounded Attention Attend-and-Excite Layout-guided generation DBSCAN

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy