Papers › Beyond Generation: Harnessing Text to Image Models for Object Detection and Segmentation

Beyond Generation: Harnessing Text to Image Models for Object Detection and Segmentation

12 Sep 2023arXiv:2309.05956archive 2025-07-28

Yunhao Ge, Jiashu Xu, Brian Nlong Zhao, Neel Joshi, Laurent Itti, Vibhav Vineet

We propose a new paradigm to automatically generate training data with accurate labels at scale using the text-to-image synthesis frameworks (e.g., DALL-E, Stable Diffusion, etc.). The proposed approach1 decouples training data generation into foreground object generation, and contextually coherent background generation. To generate foreground objects, we employ a straightforward textual template, incorporating the object class name as input prompts. This is fed into a text-to-image synthesis framework, producing various foreground images set against isolated backgrounds. A foreground-background segmentation algorithm is then used to generate foreground object masks. To generate context images, we begin by creating language descriptions of the context. This is achieved by applying an image captioning method to a small set of images representing the desired context. These textual descriptions are then transformed into a diverse array of context images via a text-to-image synthesis framework. Subsequently, we composite these with the foreground object masks produced in the initial step, utilizing a cut-and-paste method, to formulate the training data. We demonstrate the advantages of our approach on five object detection and segmentation datasets, including Pascal VOC and COCO. We found that detectors trained solely on synthetic data produced by our method achieve performance comparable to those trained on real data (Fig. 1). Moreover, a combination of real and synthetic data yields even much better results. Further analysis indicates that the synthetic data distribution complements the real data distribution effectively. Additionally, we emphasize the compositional nature of our data generation approach in out-of-distribution and zero-shot data generation scenarios. We open-source our code at https://github.com/gyhandy/Text2Image-for-Detection

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2309.05956")

Code

Syntology Ran 7 of 9 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 7 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

gyhandy/text2image-for-detection officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 7 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

7ran
2unverified

Licence: 9 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from gyhandy/text2image-for-detection. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

binarize_mask gyhandy/text2image-for-detection/cutpaste/background.py official repository ran no licence file found · pointer only · dec93047c9706811 · report
create_mask gyhandy/text2image-for-detection/cutpaste/pb.py official repository ran no licence file found · pointer only · 47caad7b315514da · report
get_area gyhandy/text2image-for-detection/cutpaste/foreground.py official repository ran fingerprinted no licence file found · pointer only · 338cddb61947c898 · report
get_box gyhandy/text2image-for-detection/cutpaste/foreground.py official repository ran no licence file found · pointer only · f4d263d621b7c43a · report
get_gradient_sum gyhandy/text2image-for-detection/cutpaste/pb.py official repository ran no licence file found · pointer only · 45759338adac308c · report
get_mixed_gradient_sum gyhandy/text2image-for-detection/cutpaste/pb.py official repository ran no licence file found · pointer only · ec845b137200d97a · report
sort_images gyhandy/text2image-for-detection/cutpaste/clip_postprocess.py official repository ran no licence file found · pointer only · 43bfb3c107e16439 · report
get_CLIP_score gyhandy/text2image-for-detection/cutpaste/clip_postprocess.py official repository unverified no licence file found · pointer only · 605bfe5472a780c1 · report
scores_for_one_caption gyhandy/text2image-for-detection/cutpaste/clip_postprocess.py official repository unverified no licence file found · pointer only · b16d4b8d3120eee3 · report

Tasks

Image CaptioningImage GenerationObjectObject Detectionobject-detection

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections