๐Ÿ“ฆ How to Prepare Datasets for ControlMLLM

July 14, 2025 ยท View on GitHub

This document provides detailed instructions for preparing datasets required by ControlMLLM++, including for the ROC, RTC, and Reference Description (RD) tasks.

We recommend placing all datasets under a root folder, e.g., $DATA/, for consistency and ease of path management. You may create symbolic links to reuse existing dataset files.


๐Ÿง  Task Overview

  • ROC (Referring Object Classification)
    Given an image and a region, the model classifies the type of the object referred by the region.

  • RTC (Referring Text Classification)
    Given an image and a text region, the model classifies or interprets the text content shown in the image.

  • RD (Reference Description)
    The model is asked to generate a natural language description of a referred region, aiming at free-form expression and understanding.

In all tasks, we focus on single-region prompts to keep input precise and interpretable.


๐Ÿ“ Directory Structure Overview


\$DATA/
โ”œโ”€โ”€ ROC/
โ”‚   โ”œโ”€โ”€ question_roc.json
โ”‚   โ””โ”€โ”€ LVIS/
โ”‚       โ”œโ”€โ”€ image/
โ”‚       โ””โ”€โ”€ mask/
โ”œโ”€โ”€ RTC/
โ”‚   โ”œโ”€โ”€ question_rtc.json
โ”‚   โ””โ”€โ”€ COCO-Text/
โ”‚       โ”œโ”€โ”€ image/
โ”‚       โ””โ”€โ”€ mask/
โ”œโ”€โ”€ RD/
โ”‚   โ”œโ”€โ”€ RefCOCOg/
โ”‚   โ”‚   โ”œโ”€โ”€ refcocog.json
โ”‚   โ”‚   โ””โ”€โ”€ COCO2014/
โ”‚   โ”‚       โ”œโ”€โ”€ train2014/
โ”‚   โ”‚       โ””โ”€โ”€ annotations/
โ”‚   โ”‚           โ””โ”€โ”€ instances_train2014.json
โ”‚   โ””โ”€โ”€ ScreenSpot/
โ”‚       โ”œโ”€โ”€ question_screenspot.json
โ”‚       โ””โ”€โ”€ image/


๐Ÿ”ฝ Dataset Download

ROC + RTC

๐Ÿ“Ž Download ROC & RTC (Google Drive)

Unzip the contents and place them in:


\$DATA/
โ”œโ”€โ”€ ROC/
โ””โ”€โ”€ RTC/

RefCOCOg

Unpack files and organize as:


RD/RefCOCOg/
โ”œโ”€โ”€ refcocog.json
โ””โ”€โ”€ COCO2014/
    โ”œโ”€โ”€ train2014/
    โ””โ”€โ”€ annotations/
        โ””โ”€โ”€ instances_train2014.json

ScreenSpot

Organize as:


RD/ScreenSpot/
โ”œโ”€โ”€ question_screenspot.json
โ””โ”€โ”€ image/


๐Ÿ—ฃ Prompt Format

ScreenSpot

ScreenSpot is an evaluation benchmark for GUI grounding, comprising over 1,200 instructions from diverse environments including iOS, Android, macOS, Windows, and Web. Each data point is annotated with element type (Text or Icon).

  • For Icon elements:
    "What is this icon used for?"

  • For Text elements:
    "What does this text say?"

RefCOCOg

The RefCOCOg dataset is a referring expression generation (REG) benchmark used to evaluate understanding of language that refers to specific objects in natural images.

  • Generic prompt:
    "Can you provide a description of the region in a sentence?"

Prompt Differences by Model

  • LLaVA-based models (no localization pretraining): Use direct natural language queries as above.

  • Qwen2.5-VL (trained with grounding): Include box location to enhance region awareness:
    "Can you provide me with a detailed description of the region in the picture marked by box @ [x1, y1, x2, y2]."


๐Ÿ“ Final Notes

  • Make sure all .json files and images/masks follow the specified structure.
  • Task scripts will expect the default root directory to be data/ (relative to project root).
  • You may modify --data_path arguments to specify custom locations during execution.