D2D: Detector-to-Differentiable Critic for Improved Numeracy in Text-to-Image Generation
Nobline Yoo, Olga Russakovsky, Ye Zhu
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: Diffusion & Image Generation › Diffusion Text-to-Image Composition and Control · Type: new method · Keywords: text-to-image generation, object counting, differentiable critics, detector transformation, diffusion models
Areas: Generative Models (Diffusion & Flows) › Visual Editing and Conditioning › Text-to-Image Conditioning
Summary
D2D is a framework that converts non-differentiable detector models into differentiable critics to improve object counting in text-to-image generation.
Explained to a 5-year-old
Computers draw pictures from words, but sometimes they don't draw the right number of things. To help them count, we use models that can see and count objects. These counting models are not easy to use because they can't be changed with learning. So we make them work like they can learn by turning their counting results into soft signals. Then we use these signals to guide the picture drawing, so the pictures have the right number of objects.
Explained to a 5-year-old, longer
When we ask a computer to draw a picture based on a sentence, it should put the right number of objects in the picture. For example, if we say "three cats", the picture should have three cats. Usually, the computer uses a counting helper that can give a number, but this helper must be able to learn, which limits its accuracy. There are other helpers that are really good at counting by looking at the picture, but they cannot learn because they work in a different way. To solve this, we turn those good counting helpers into something that can learn by softening their counting results. This softening makes the counting information smooth and usable during the drawing process. Then we feed this smooth counting information into the picture-drawing system. The drawing system uses the counting hints to adjust how it creates the image. As a result, the final picture matches the number of objects we asked for more often. The method works well on many different kinds of picture-making tasks, from simple scenes to busy ones. It also keeps the pictures looking nice and doesn't make the computer slower. In short, we make a bridge between accurate counting and learning picture-drawing, so the computer can draw the right number of things.
For a technical reader
The paper introduces D2D, a framework that converts non-differentiable object detectors into differentiable critics for text-to-image generation. By designing custom activation functions, detector logits are transformed into soft binary indicators that can provide gradient signals during inference. These differentiable signals are then used to steer the noise prior of pre-trained diffusion models, improving object counting without retraining the models. Experiments on several diffusion backbones (SDXL-Turbo, SD-Turbo, Pixart-DMD) across low-density, high-density, and multi-object benchmarks show up to a 13.7% gain in counting accuracy while preserving image quality and computational cost.
Problem
Text-to-image diffusion models often fail to generate the correct number of objects as specified in prompts. Current solutions rely on differentiable counting networks, which limits the use of more accurate detector-based counting methods that are non-differentiable.
Method
The approach transforms non-differentiable detection models into differentiable critics by designing custom activation functions that convert detector logits into soft binary indicators. These differentiable signals are then used to optimize the noise prior during inference with pre-trained text-to-image models.
Results
The approach consistently improves object counting accuracy, achieving up to a 13.7% boost on a low-density benchmark, while maintaining image quality and computational efficiency.
Contributions
It introduces a technique to render non-differentiable detector outputs differentiable, enabling the use of high-accuracy counting models in text-to-image generation, and demonstrates strong gains across multiple benchmark scenarios.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction