Coder Social home page Coder Social logo

depthgan's Introduction

On the Benefit of Adversarial Learning for Monocular Depth Estimation

This is the repository for our CVIU work 'On the Benefit of Adversarial Learning for Monocular Depth Estimation'. Two works have served as baselines for this work:
Unsupervised Monocular Depth Estimation with Left-Right Consistency
arXiv

Unsupervised Adversarial Depth Estimation using Cycled Generative Networks arXiv

This repository implements the basic training and evaluation code, to prevent clutter.

Dependencies

A requirements file is available to retrieve all dependencies. Create a new python environment and install using:

pip install -r requirements.txt

Training

Models can be trained by specifying your data directory, a model name and any architecture.

python main.py --data_dir data/ --model_name [MODEL_NAME] --architecture wgan

Resume training is possible by filling in the resume flag with the path to the saved model:

python main.py --data_dir data/ --model_name [MODEL_NAME] --architecture wgan --resume saved_models/[MODEL_NAME]/model_best.pth.tar

There are many, many options for training the models. Have a look at the options with three python files containing options for training, testing and evaluation.

Testing

To test change the --mode flag to test, the network will output the disparities in the output folder.

python main.py --data_dir data/ --model_name [MODEL_NAME] --mode test

Evaluation of Depth

Run the following script to run any evaluation, given that a disparities file is present in output:

python evaluate.py --data_dir data/ --predicted_disp_path output/disparities_[DATASET]_[MODEL_NAME].npy  

Data

This work has been trained on rectified stereo pairs. For this two datasets have been used: KITTI and CityScapes.

In this work the split of eigen is used to train and test model. This set contains 22600 training images, 888 validation imagesn and 697 test images.
In the filenames folder there are lists that detail which images correspond to which set. All data can be downloaded by running:

wget -i utils/kitti_archives_to_download.txt -P ~/my/output/folder/

To access data of the CityScapes dataset, one has to register an account and then request special access to the ground truth disparities.
When this data is retrieved the following directories should be put in the data folder:
cs_camera/ with all camera parameters.
cs_disparity/ with all ground truth disparities.
cs_leftImg8bit/ with all left images.
cs_rightImg8bit/ with all right images.

Results

Results are available upon request.

References

A few repositories were the inspiration for this work. These are:

Unsupervised Monocular Depth Estimation with Left-Right Consistency
Unsupervised Adversarial Depth Estimation using Cycled Generative Networks
Club AI's Pytorch Implementation of MonoDepth
Cycle GAN and Pix2Pix in Pytorch

depthgan's People

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.