🔥🔥🔥 Our Grounding survey (TPAMI, Arxiv, Project) has been accepted by TPAMI on October 30, 2025 !!!
:fire: Update on 2024/12/28: We conducted a survey of Visual Grounding over the past decade, entitled "Towards Visual Grounding: A Survey" (Paper, Project), Comments are welcome !!!
:fire: Update on 2024/09/26: Our advanced grounding work OneRef (Paper, Code) has acceptance by top conference NeurIPS 2024 in October 2024!
:fire: Update on 2024/07/16: Our advanced grounding work HiVG (Paper, Code) has acceptance by top conference ACM MM 2024 in July 2024!
Update on 2024/04/20: We release an advanced version of CLIP-VG, namely HiVG (paper, github).
Update on 2023/12/13: All of the code, models and datasets have been released.
Update on 2023/9/25: Our paper has been accepted by the top journal IEEE Transaction on Multimedia (2023)!
Update on 2023/05/18: Release the repository and training code.
Citation
If you find our work helpful for your research, please consider citing the following BibTeX entry.
bibtex
1@article{xiao2023clip,
2 title={CLIP-VG: Self-paced Curriculum Adapting of CLIP for Visual Grounding},
3 author={Xiao, Linhui and Yang, Xiaoshan and Peng, Fang and Yan, Ming and Wang, Yaowei and Xu, Changsheng},
4 journal={IEEE Transactions on Multimedia},
5 year={2023},
6 publisher={IEEE}
7}
CLIP for Visual Grounding. a state-of-the-art baseline for unsupervised and fully supervised visual grounding with CLIP model.
Single-source and Multi-source pseudo-language labels. The generation and usage of multi-source pseudo-labels.
Self-paced Curriculum Adapting Algorithm. A plugin-like algorithmic idea that can be applied to any pseudo-label scenario.
TODO
Release model code and inference code.
Release unsupervised and fully supervised checkpoints.
Release the complete multi-source pseudo-language labels and its generation code.
Release the reliability measurement code.
Introduction
In order to utilize vision and language pre-trained models to address the grounding problem, and reasonably take
advantage of pseudo-labels, we propose CLIP-VG, a novel method that can conduct self-paced curriculum adapting of CLIP
with pseudo-language labels.
We propose a simple yet efficient end-to-end network architecture to realize the transfer
of CLIP to the visual grounding. Based on the CLIP-based architecture, we further propose single-source and
multi-source curriculum adapting algorithms, which can progressively find more reliable pseudo-labels to learn an
optimal model, thereby achieving a balance between reliability and diversity for the pseudo-language labels.
Our method outperforms the current state-of-the-art unsupervised method Pseudo-Q, by a significant margin on RefCOCO/+/g datasets in both
single-source and multi-source scenarios. Furthermore, our approach even outperforms existing weakly supervised methods.
In comparison with the fully supervised SOTA model QRNet, we achieve comparable results with only 7.7% of its
updated parameters, while obtaining significant speedups in both training and inference, up to 26.84× and 7.41×, respectively.
In summary, the contributions of this work are four-fold:
As far as we know, we are the first to adapt CLIP to realize unsupervised visual grounding. Our method can
transfer the cross-modal learning ability of CLIP to visual grounding with only a small training cost.
We first introduce the self-paced curriculum learning in unsupervised visual grounding. Our proposed reliability measurement and single-source self-paced adapting
can progressively enhance the CLIP-based visual grounding model by utilizing pseudo-labels in an easy-to-hard
learning paradigm.
We first propose the multi-source self-paced adapting algorithm to extend our method for accessing multiple
sources of pseudo-labels, which can flexibly improve the diversity of language taxonomy.
We conduct extensive experiments to evaluate the effectiveness of our approach. Results show that our method
obtains significant improvements in unsupervised setting and is also competitive in fully supervised setting.
Our model is easy to deploy in a variety of environments and has been successfully tested on multiple pytorch versions.
If you are interested in the pseudo language label generation module, more detailed instructions will be found at usage instructions.
Image Data Preparation
1.You can download the images from the original source and place them in your disk folder, such as $/path_to_image_data:
MS COCO 2014 (for RefCOCO, RefCOCO+, RefCOCOg dataset, almost 13.0GB)
We provide a script to download the mscoco2014 dataset, you just need to run the script in terminal with the following command:
bash download_mscoco2014.sh
Or you can also follow the data preparation of TransVG, which can be found in GETTING_STARTED.md.
Only the image data in these datasets is used, and these image data is easily find in similar repositories of visual grounding work, such as TransVG etc.
Finally, the $/path_to_image_data folder will have the following structure:
$/path_to_image_data/image_data/Flickr30k/flickr30k-images/: Image data for the Flickr30K dataset, please download from this link. Fill the form and download the images.
$/path_to_image_data/image_data/other/images/: Image data for RefCOCO/RefCOCO+/RefCOCOg, i.e., mscoco2014.
$/path_to_image_data/image_data/referit/images/: Image data for ReferItGame.
Text-Box Anotations / Pseudo-Labels Prepare
The following are the pseudo-language labels generated by the pseudo-language label generation module in an unsupervised setting.
The single-source scenario includes a pseudo-template label derived from Pseudo-Q.
Multi-source scenario include pseudo-template labels, pseudo-relation labels, and pseudo-caption labels.
Please refer to pseudo-language label generation module for specific details
on how they are generated if interested.
Additionally, we also provide the pseudo-labels that selected through our single-source self-paced curriculum adapting (SSA)
and multi-source self-paced curriculum adapting (MSA) algorithms, which can be conveniently and directly used by the following researchers.
The labels in the fully supervised scenario is consistent with previous works such as TransVG.
It is worth noting that the test split in the unsupervised scenario are exactly the same as those used in the fully supervised scenario.
* Since we observed a relatively clear performance increase on the RefCOCOg-u dataset in the fully supervised setting,
we provide data for this dataset after applying our SSA algorithm for curriculum selecting. Typically, by using this
filtered data, there is an approximate ~1.0 increase in performance on both val-u and test-u.
Download the above annotations to a disk directory such as $/path_to_split; then will have the following similar directory structure:
* Note that the performance of our provided model on the refcocog-val-g dataset in the unsupervised single-source scenario is approximately higher ~2.0
than reported in the paper, i.e., (54.16) --> (56.46).
* Note that the performance of our provided model on the refcoco+ dataset in the fully supervised setting is approximately higher ~2.0
than reported in the paper, i.e., (69.55, 77.33, 57.62) --> (71.08, 79.17, 59.40).
Training and Evaluation
You just only need to change $/path_to_split, $/path_to_image_data, $/path_to_output to your own file directory to execute the following command.
The first time we run the command below, it will take some time for the repository to download the CLIP model.
We strongly recommend to use the following commands to training or testing with different datasets and splits,
which will significant reduce the training workforce.
Curriculum reliability measurement or scoring for the pseudo-language labels:
It is only needs to change eval.py to eval_for_reliability_distribution.py and rename the training pseudo labels as test.pth
in the corresponding datasets during Evaluation:
Then, you can construct a new pseudo-label training split.
Results
RefCOCO, RefCOCO+, and RefCOCOg datasets
COCO
ReferIt and Flickr datasets
COCO
Our model also has significant energy efficiency advantages.
COCO
Compared to QRNet, we updated only 7.7% of its parameters and achieved impressive training and inference speedups,
up to 26.84× and 7.41×, respectively, while also obtaining competitive results.
Methods
Visualization
The figure presents the histograms of Single-Source Reliability (SR) and Cross-source Reliability (CR) for pseudo-language
labels in the range of (0.0, 1.0] with 1000 bins, where each bin represents the number of samples. The figure illustrates
that different sources exhibit distinct distributions due to their specific quality and language taxonomy of pseudo-language
labels (e.g., Fig.5-(a1)-(b2)-(c3)), while different reliability measures have varying discrimination abilities on the
same source (e.g., Fig.5-(a1)-(b1)-(c1)).
Before the execution of MSA, the distribution of the pseudo-language labels and the ground-truth query labels is quite
different, but after the execution of MSA, the distribution discrepancy significantly becomes smaller. This shows that
MSA can effectively select pseudo-labels that are more reliable or closer to the distribution of ground-truth query labels.
Among the various types of unreliable pseudo-language labels, referring to ambiguity is more frequent, particularly in
images with similar classification objects. If future research aims to further enhance model performance, addressing
ambiguity is a critical issue.