Git Product home page Git Product logo

mdepth's Introduction

Depth from a Single Image by Harmonizing Overcomplete Local Network Predictions

Copyright (C) 2016, Authors.

This is a reference implementation of the algorithm described in the paper:

Ayan Chakrabarti, Jingyu Shao, and Gregory Shakhnarovich, "Depth from a Single Image by Harmonizing Overcomplete Local Network Predictions," NIPS 2016.

It is being made available for non-commercial research use only. If you find this code useful in your research, please consider citing the paper.

Please see the project page and contact [email protected] with any questions.

Requirements

The top directory contains the inference code. It is entirely in MATLAB and has no external Caffe dependencies.

  1. You can download our trained neural network model weights, available as a .caffemodel.h5 file from the project page.

  2. This implementation requires a modern CUDA-capable high-memory GPU (it has been tested on an NVIDIA Titan X), and a recent version of MATLAB's Parallel Computing Toolbox that supports the GPUArray class.

  3. You will also need to compile the mex function postMAP. With modern versions of MATLAB, this can be done by running mexcuda postMAP.cu. Requires the CUDA toolkit with nvcc to be installed.

Usage

First, you will need to load the network weights from the model file as:

>>> net = load('/path/to/mdepth.caffemodel.h5');

Then given a floating-point RGB image img, normalized to [0,1], estimate the corresponding depth map as:

>>> Z = mdepth(img,net);

Note that we expect img to be of size 561x427, which corresponds to the axis aligned crops in the NYU dataset where there is a valid depth map projection. You can recover these as: img = imgOrig(45:471, 41:601, :).

Training with Caffe

See the training/ directory for code and instructions for training your own network.

mdepth's People

Contributors

ayanc avatar

Watchers

James Cloos 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.