Coder Social home page Coder Social logo

ml-lab / visual-concepts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from s-gupta/visual-concepts

0.0 3.0 0.0 655 KB

Code for detecting visual concepts in images.

Home Page: http://www.cs.berkeley.edu/~sgupta/captions/index.html

License: BSD 2-Clause "Simplified" License

Python 6.98% Jupyter Notebook 92.95% Shell 0.06%

visual-concepts's Introduction

From Captions to Visual Concepts and Back

Code for detecting visual concepts in images.

Installation Instructions

  1. Create directory, checkout code, caffe, coco-hooks
git clone [email protected]:s-gupta/visual-concepts.git code
git clone [email protected]:pdollar/coco.git code/coco
cd code/coco
git checkout 3736a0068b6e4634563b0c5847d7783dae9bd461
cd ../../
  1. Make caffe and pycaffe
git clone [email protected]:s-gupta/caffe.git code/caffe 
cd code/caffe 
git checkout mil
make -j 16
make pycaffe
cd ../../
  1. Get the COCO images, caffe imagenet models, pretrained models on COCO.
# Get the COCO splits, ground truth
wget ftp://ftp.cs.berkeley.edu/pub/projects/vision/im2cap-cvpr15b/data.tgz && tar -xf data.tgz

# Get the COCO images
cd code

# Download and unzip the images 
bash scripts/script_download_coco.sh

# The code assumes images to be stored heirarchically. 
# This python scripts does the required copying.
PYTHONPATH='.' python scripts/script_download_coco.py

# Get the caffe imagenet models 
wget ftp://ftp.cs.berkeley.edu/pub/projects/vision/im2cap-cvpr15b/caffe-data.tgz && tar -xf caffe-data.tgz

# Get the pretrained models. The precomputed results in the previous tarball
# were not complete. v2 tar ball fixes this.
wget ftp://ftp.cs.berkeley.edu/pub/projects/vision/im2cap-cvpr15b/trained-coco.v2.tgz && tar -xf trained-coco.v2.tgz 

Demo

Look at demo.ipynb for a demo in IPython notebook.

Training, Testing the model

cd code and execute relevant commands from the file scripts/scripts_all.py

Citing

If you find this codebase useful in your research, please consider citing the following paper:

@InProceedings{Fang_2015_CVPR,
  author = {Fang, Hao and Gupta, Saurabh and Iandola, Forrest and Srivastava, Rupesh K. and Deng, Li and Dollar, Piotr and Gao, Jianfeng and He, Xiaodong and Mitchell, Margaret and Platt, John C. and Lawrence Zitnick, C. and Zweig, Geoffrey},
  title = {From Captions to Visual Concepts and Back},
  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2015}
}

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.