Code Monkey home page Code Monkey logo

sgi's Introduction

VG-MLM: Visually Grounded Masked Language Model

Code for the paper Unsupervised Scene Graph Induction from Natural Language Supervision by Yanpeng Zhao and Ivan Titov.

VG-MLM is trained via multimodal masked language modeling

Data

Currently we consider only artificial datasets such as CLEVR and AbstractScene. We focus on CLEVR but may also discuss the pre-processing of AbstractScene.

Generate Bounding Boxes for CLEVR

We use CELVR v1.0 and rely on this repo to generate bounding boxes for the CLEVR images.

For AbstractScene images, bounding boxes can be automatically inferred (see this script).

Pre-encode Images

Check out the running script bash/run_obj_enc.sh.

Generate Captions

Check out this repo.

Learning

Learning with symbolic object representations: bash/run_clevr_sym.sh.

Learning with visual object representations: bash/run_clevr_vis.sh.

Learning with additional causal language modeling (CLM): bash/run_clevr_clm.sh.

Inference

Currently we do not have a specific script for inference since evaluation (i.e., inference) is automatically performed after every training epoch. If you want to create an inference script, you may want to check out bash/run_clevr_eval.sh and the associated inference function.

Dependencies

git clone --branch beta https://github.com/zhaoyanpeng/sgi.git
cd sgi
virtualenv -p python3.8 ./pyenv/oops
source ./pyenv/oops/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install -r requirements.txt

Citation

@misc{VC-MLM,
  author = {Yanpeng Zhao and Ivan Titov},
  title = {Unsupervised Scene Graph Induction from Natural Language Supervision},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub Repository},
  howpublished = {\url{https://github.com/zhaoyanpeng/sgi}},
}

License

MIT

sgi's People

Contributors

zhaoyanpeng avatar

Watchers

 avatar  avatar

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.