ugorsahin / Generative-Negative-Mining

Enhancing Multimodal Compositional Reasoning of Visual Language Models with Generative Negative Mining, WACV 2024
Apache License 2.0
12 stars 1 forks source link

Generative Negative Mining

Project Page | Model Checkpoint | Dataset

This is the official implementation for the paper [ Enhancing Multimodal Compositional Reasoning of Visual Language Models with Generative Negative Mining](). We propose a framework that not only mines in both directions but also generates challenging negative samples in both modalities, i.e., images and texts. Leveraging these generative hard negative samples, we significantly enhance VLMs’ performance in tasks involving multimodal compositional reasoning.

Overview of the framework

Installation

Requirements: python>=3.8, cuda=11.3

git clone https://github.com/ugorsahin/Generative-Negative-Mining
cd Generative-Negative-Mining
pip install -r requirements.txt

We advise installing on a virtual environment to avoid library dependency crashes.

Data Generation

The semi-synthetic variations can be generated stage-by-stage or by using the pipeline script (if you don't have enough gpu memory)

To run the pipeline

Train

To train the clip

Evaluation

To evaluate the model checkpoints

Resources

Training annotation file (.json)

Training images (.zip)

Pretrained model (pytorch)

Citation

If you find our work helpful in your research, please consider citing us


@misc{sahin2023enhancing,
      title={Enhancing Multimodal Compositional Reasoning of Visual Language Models with Generative Negative Mining}, 
      author={Ugur Sahin and Hang Li and Qadeer Khan and Daniel Cremers and Volker Tresp},
      year={2023},
      eprint={2311.03964},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      journal = {Winter Conference on Applications of Computer Vision},
}

Acknowledgments