Datasets:

ArXiv:
gRefCOCO / README.md
nielsr's picture
nielsr HF Staff
Add task categories and link to GREx paper
2930a48 verified
|
raw
history blame
4.53 kB
metadata
task_categories:
  - image-segmentation
  - object-detection
  - image-to-text

gRefCOCO - Dataset for Generalized Referring Expression Segmentation, Comprehension, and Generation (GREx)

PyTorch Python PWC

🏠[Project page]   πŸ“„[Paper (GREx)]   πŸ“„[GRES Arxiv]   πŸ“„[GREC Arxiv]

This repository contains information and tools for the gRefCOCO dataset, proposed in the paper:

GREx: Generalized Referring Expression Segmentation, Comprehension, and Generation
Chang Liu, Henghui Ding, Xudong Jiang

gRefCOCO is the first large-scale GREx dataset that contains multi-target, no-target, and single-target expressions and their corresponding images with labeled targets. It is designed to be backward-compatible with classic Referring Expression (REx) tasks.


Usage

  • Like RefCOCO, gRefCOCO also should be used together with images from the train2014 of MS COCO.
  • An example of dataloader grefer.py is provided.
  • We will update this repository with full API package and documentation soon. Please follow the usage in the baseline code for now.

Task 1 - GREC: Generalized Referring Expression Comprehension

  • The GREC evaluation metric code is here.

  • We provide code based on MDETR, its training and inference are as follows:

Training (Finetuning)

  1. Process grefcoco to coco format.
python scripts/fine-tuning/grefexp_coco_format.py --data_path xxx --out_path mdetr_annotations/ --coco_path xxx
  1. Training and download pretrained_resnet101_checkpoint.pth from MDETR
python -m torch.distributed.launch --nproc_per_node=2 --use_env main.py --dataset_config configs/grefcoco.json --batch_size 4  --load pretrained_resnet101_checkpoint.pth  --ema --text_encoder_lr 1e-5 --lr 5e-5 --output-dir grefcoco

Inference

  1. Obtain checkpoint.pth after training or download trained model here ☁️ Google Drive
  2. For test results, pass --test and --test_type test or testA or testB according to the dataset.
python -m torch.distributed.launch --nproc_per_node=2 --use_env main.py --dataset_config configs/grefcoco.json --batch_size 4  --resume grefcoco/checkpoint.pth --ema --eval

Task 2 - GRES: Generalized Referring Expression Segmentation

Please refer to ReLA for more details.

Acknowledgement

Our project is built upon refer and cocoapi. Many thanks to the authors for their great works!

BibTeX

Please consider to cite GRES/GREC/GREx if it helps your research.

@article{GREx,
  title={{GREx}: Generalized Referring Expression Segmentation, Comprehension, and Generation},
  author={Liu, Chang and Ding, Henghui and Jiang, Xudong},
  journal={arXiv preprint arXiv:2601.05244},
  year={2026}
}
@inproceedings{GRES,
  title={{GRES}: Generalized Referring Expression Segmentation},
  author={Liu, Chang and Ding, Henghui and Jiang, Xudong},
  booktitle={CVPR},
  year={2023}
}
@article{GREC,
  title={{GREC}: Generalized Referring Expression Comprehension},
  author={He, Shuting and Ding, Henghui and Liu, Chang and Jiang, Xudong},
  journal={arXiv preprint arXiv:2308.16182},
  year={2023}
}