GithubHelp home page GithubHelp logo

vito's Introduction

Vision as Tokens

  • This repo is the implementation of my bachelor thesis: Towards Unifying Visual Discriminative Tasks from Generative Representation, which is not published yet.

  • We provide two settings, named MDETR and VQGAN respectively, to uniformly handle three visual discriminative tasks:

    • Phrase Grounding
    • Phrase Segmentation
    • Depth Estimation
  • Note: this repo may be not well-organized, and if you have any confusion or relevant idea, feel free to contact me at [email protected].

Installation

  • Environment

    conda create -n vito python=3.8
    conda activate vito
  • Requirements

    conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
    pip install -r requirements.txt
  • Dependencies about VQGAN. Please refer to 'Training on custom data' in VQGAN for setup. Specify the configurations and finish stage-one training, which we are going to utilize during stage-two for quantized representation.

Data preparation

Configuration

  • Modify config/vito.yaml
    • output_dir, holding running results
    • refexp_data, which contains a folder and two subfolders: images/mscoco, images/saiapr_tc-12
    • refexp_anno, partitioned into subfolders of datasets, each of which containing json annotataions
    • refexp_mask, partitioned into subfolders of datasets, each of which containing binary masks

Training

  • Run distributed training

      python train_distr.py exp_name=${your_exp_name} task=[bbox]   # bbox task
      
      python train_distr.py exp_name=${your_exp_name} task=[mask]   # mask task
      
      python train_distr.py exp_name=${your_exp_name} task=[depth]   # depth task
      
      # joint training
      python train_distr.py exp_name=${your_exp_name} task=[bbox,mask,depth]

Evaluation

  • Evaluation on validation and test datasets

    python eval_testset.py exp_name=${your_exp_name} task={your_task}

vito's People

Contributors

huangjy-pku avatar

Stargazers

Haojun Chen avatar Xiaoyuan Zhang avatar  avatar Baoxiong Jia avatar SiyuanHuang avatar

Watchers

SiyuanHuang avatar Baoxiong Jia 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.