World to Code: Multi-modal Data Generation via Self-Instructed Compositional Captioning and Filtering
Jiacong Wang, Bohong Wu, Haiyong Jiang, Xun Zhou, Xin Xiao, Haoyuan Guo, Jun Xiao
TL;DR
World to Code (W2C) presents a self-instructed, fully automated pipeline for generating high-quality multi-modal data by prompting Vision-Language Models to produce region-level captions and OCR data, followed by cross-prompt consistency filtering. The outputs are organized into Python code format to capture structured, executable visual information, reducing reliance on human annotation and specialized annotators. Empirical results show W2C improves a range of VQA and grounding benchmarks across multiple LLaVA backbones, and ablations demonstrate the benefits of code-format data and combined filtering. A key finding is that code-parsing outputs enable stronger few-shot performance than traditional detail captions, suggesting practical advantages for cross-modal understanding and downstream reasoning tasks.
Abstract
Recent advances in Vision-Language Models (VLMs) and the scarcity of high-quality multi-modal alignment data have inspired numerous researches on synthetic VLM data generation. The conventional norm in VLM data construction uses a mixture of specialists in caption and OCR, or stronger VLM APIs and expensive human annotation. In this paper, we present World to Code (W2C), a meticulously curated multi-modal data construction pipeline that organizes the final generation output into a Python code format. The pipeline leverages the VLM itself to extract cross-modal information via different prompts and filter the generated outputs again via a consistency filtering strategy. Experiments have demonstrated the high quality of W2C by improving various existing visual question answering and visual grounding benchmarks across different VLMs. Further analysis also demonstrates that the new code parsing ability of VLMs presents better cross-modal equivalence than the commonly used detail caption ability. Our code is available at https://github.com/foundation-multimodal-models/World2Code.
