Giter VIP home page Giter VIP logo

edlsm_pytorch's Introduction

EDLSM

This is a Pytorch implementation for stereo matching described in the paper: Efficient Deep learning for stereo matching

Sample Output

alt text

Prerequisites

  1. Pytorch Version --v0.4 with CUDA > 8.0
  2. Numpy --v1.14
  3. OpenCV --v3.2
  4. Matplotlib --v2.1

Preparing training and validation data

First we need to generate the valid pixel locations.

  1. Download the KITTI 2015 dataset.
  2. Go to the cloned EDLSM folder and run the following command:
mkdir dataset

python prepare_kitti_dataset.py  --dataset_dir=/path/to/data_scene_flow/training --dump_root=./dataset

Note: In order to see other changeable parameters such as patch size, image height/width, train/val split etc, run the following command:

python prepare_kitti_dataset.py  --h

Training

Once the data is successfully prepared, the model can be trained by running the following command:

python train.py --dataset_dir=/path/to/data_scene_flow/training --train_dataset_name=tr_160_18_100.txt --checkpoint_dir=/where/to/store/checkpoints

Note: In order to see other changeable parameters such as batch size, image height/width, pixel weights, etc., run the following command:

python prepare_kitti_dataset.py  --h

In order to see the training loss graph open a tensorboard session by

tensorboard --logdir=./logs --port 8080

Inference

Once model is trained, we can generate disparity map by running the following command:

python inference_match.py --dataset_dir=/path/to/data_scene_flow/training --checkpoint_dir=/where/checkpoints/stored --checkpoint_file=eldsm_38000 --test_num=82

Note: In order to see other changeable parameters such as image height/width,disparity range, etc, run the following command:

python inference_match.py  --h

Future Work

Implement the post-processing steps.

Code citation

Original Code: https://bitbucket.org/saakuraa/cvpr16_stereo_public

Pytorch Code: https://github.com/vijaykumar01/stereo_matching

Paper citation

@inproceedings{luo2016efficient,
  title={Efficient deep learning for stereo matching},
  author={Luo, Wenjie and Schwing, Alexander G and Urtasun, Raquel},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={5695--5703},
  year={2016}
}

edlsm_pytorch's People

Contributors

tonyjo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

edlsm_pytorch's Issues

about post-processing

Thanks for your code!
I just want to know if you have some access to the post-processing code. I have went through the page of the author, but he does not provide the post-processing code. Or do you know some tools from OpenCV for smoothing?

Patch size inconsist

Hi, when I run the code an error occurred which says the size of tensors does not match. And I find sometimes the patch generated by the data loader is of size (3, 34, 37). How to solve this?

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.