Code Monkey home page Code Monkey logo

dl_vqa's Introduction

dl_VQA

Deep Learning project about Visual Question Answering using TensorFLow

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Python 2.7 and Tensorflow have to be installed

Download Data and Preprocess

In the /data directory, execute the following to download the data and save it into raw json files

python vqa_preprocessing.py --download True --split 1
python vqa_preprocessing.py --split 2
python vqa_preprocessing.py --split 3

Back in the main directory, process the raw data into question+answer+vocab files

python preprocess.py --split 1 --subset False --num_ans 1000
python preprocess.py --split 2 --subset False --num_ans 1000
python preprocess.py --split 3 --subset False --num_ans 1000

To download the image-data and the ResNet_v1_101 checkpoint execute the following comman int he main directory

python download_data.py

To preprocess / split the images, execute the following command

python preprocess_img.py

This will save the sub-images in the following directories "/sub_img_train2014", "/sub_img_test2014" and "/sub_img_val2014"

Get Features using Resnet_v1_101

You will need to checkout the Tensorflow models repository. To do so, execute

git clone https://github.com/tensorflow/models/

To finish the setup you will need to add the directory <checkout_dir>/research/slim to your $PYTHONPATH variable.

We are now ready to extract the features of the sub-images. To do so, execute

example_feat_extract.py 
--network resnet_v1_101 
--checkpoint ./checkpoints/resnet_v1_101.ckpt 
--image_path ./images_dir/ 
--out_file ./features.h5
--num_classes 1000 
--layer_names resnet_v1_101/global_pool

dl_vqa's People

Contributors

philippwirth avatar jheitz avatar qweop avatar

Stargazers

时客 avatar

Watchers

 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.