GithubHelp home page GithubHelp logo

nkm's Introduction

NKM

This is the code page for NKM work. Since we are currently working on a relevant project that share the same codebase, we do not release the code yet. The full code will be available soon.

Scene Graph Generation Part

  1. Download and unpack Visual Genome images as well as the annotations, class info and image meta-data
  2. Get initial scene graph with VCT
  3. Next, run train_graph.py to train the scene graph generation
python train_graph.py --input_scene_dir <path/to/input/scene/dir> --output_scene_dir <path/to/output/scene/dir> 
  1. Finally, load the images from VQA to first get initial graph and next get the semantic enriched scene graph.

VQA Training Part

  1. Download Glove pretrained word vectors
  2. Preprocess VQA2.0 questions to obtain train_questions.pt and vocab.json
python preprocess_questions.py --glove_pt </path/to/generated/glove/pickle/file> --input_questions_json </your/path/to/v2_OpenEnded_mscoco_train2014_questions.json> --input_annotations_json </your/path/to/v2_mscoco_train2014_annotations.json> --output_pt </your/output/path/train_questions.pt> --vocab_json </your/output/path/vocab.json> --mode train
  1. Download grounded features from paper Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering repo
  2. Preprocess featurs
python preprocess_features.py --input_tsv_folder /your/path/to/trainval_36/ --output_h5 /your/output/path/trainval_feature.h5
  1. Train the model
python train.py --input_dir <path/to/preprocessed/files> --save_dir </path/for/checkpoint> --val
  1. Validate
python train.py --input_dir <path/to/preprocessed/files> --save_dir </path/for/checkpoint> --mode val
  1. Test
python train.py --input_dir <path/to/preprocessed/files> --save_dir </path/for/checkpoint> --mode test

nkm's People

Contributors

superjohnzhang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fishingmapache

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.