Git Product home page Git Product logo

seltda's Introduction

Conference Paper

SelTDA

This repository will hold the official code of SelTDA, the self-training framework introduced in our CVPR 2023 paper "Q: How to Specialize Large Vision-Language Models to Data-Scarce VQA Tasks? A: Self-Train on Unlabeled Images!".

seltda_teaser

Environment

conda env create -f environment.yaml

Data

Downloads and Preprocessing

  • PathVQA
    • then use convert_pathvqa.py
  • RSVQA
    • then use convert_rsvqa.py
  • OK-VQA and A-OKVQA (use LAVIS)
    • LAVIS should automatically put them in the correct format, but if not, you can use convert_okvqa.py
  • VQA Counterexamples
    • then use convert_vqa_ce.py
  • AdVQA
    • then use convert_advqa.py
  • VQA Rephrasings
    • then use convert_vqa_rephrasings.py

In general, the code expects that each VQA dataset is represented by a single JSON object that is a list of dictionaries. In schemas.py, we provide Pydantic models which you can use to define your own datasets or verify that the data is in the correct format.

Experiments

See the examples/ directory to see examples of:

  • training the teacher
    • examples/train_teacher.sh
  • generating synthetic data with the teacher
    • examples/generate_synthetic_data.sh
  • self-training with the synthetic data
    • examples/self_train_synthetic.sh
  • evaluations
    • examples/evaluate.sh

Citation

@InProceedings{Khan_2023_CVPR,
    author    = {Khan, Zaid and BG, Vijay Kumar and Schulter, Samuel and Yu, Xiang and Fu, Yun and Chandraker, Manmohan},
    title     = {Q: How To Specialize Large Vision-Language Models to Data-Scarce VQA Tasks? A: Self-Train on Unlabeled Images!},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2023},
    pages     = {15005-15015}
}

Acknowledgements

This code is heavily based on salesforce/BLIP.

seltda's People

Contributors

codezakh avatar

Stargazers

Jeff Carpenter avatar Siwei Li avatar XingyuLi avatar  avatar Youngtaek Oh avatar Sungguk Cha avatar Sovin avatar Mengyin Liu avatar IronMan avatar

Watchers

 avatar Kostas Georgiou avatar  avatar

Forkers

jackzhousz

seltda's Issues

Evaluation script for aokvqa

Hi!

Thanks for your great work! I am wondering why the evaluation script for aokvqa dataset is not in the repository. Could you please share it?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.