Coder Social home page Coder Social logo

monodepth2's Introduction

Monodepth2

Based on the original version of Monodepth2, We added the test_cam.py to test Monodepth2 on image stream using a webcam.

example input output gif

⚙️ Setup

You can refer to the README from the original project to setup the required environment or just quickly go through the following steps:

Assuming a fresh Anaconda distribution, you can install the dependencies with:

conda install pytorch=0.4.1 torchvision=0.2.1 -c pytorch
pip install tensorboardX==1.4
conda install opencv=3.3.1   # just needed for evaluation and display the result

🔧 Usage

You can predict depth for a single image with:

python test_simple.py --image_path assets/test_image.jpg --model_name mono+stereo_640x192

Or you can predict depth using image stream with a webcam:

python test_cam.py
# The arguments can be added to run the above command is listed below
--model_name
# default="mono+stereo_640x192"
# choices=["mono_640x192",
# "stereo_640x192",
# "mono+stereo_640x192",
# "mono_no_pt_640x192",
# "stereo_no_pt_640x192",
# "mono+stereo_no_pt_640x192",
# "mono_1024x320",
# "stereo_1024x320",
# "mono+stereo_1024x320"]
--no_cuda
# if set, disables CUDA
--webcam
# default=0
# change to the desired by changing the value
--no_process
# if set, displays image in current process, might improve performance on machines without a GPU
--no_blend
# if set, does not display blended image
--no_display
# if set, does not display images, only prints fps

monodepth2's People

Contributors

mdfirman avatar sven97 avatar arjunkeerthi avatar mrharicot avatar

Watchers

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