This is a Pytorch implementation for stereo matching described in the paper: Efficient Deep learning for stereo matching
- Pytorch Version --v0.4 with CUDA > 8.0
- Numpy --v1.14
- OpenCV --v3.2
- Matplotlib --v2.1
First we need to generate the valid pixel locations.
- Download the KITTI 2015 dataset.
- 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
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
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
Implement the post-processing steps.
Original Code: https://bitbucket.org/saakuraa/cvpr16_stereo_public
Pytorch Code: https://github.com/vijaykumar01/stereo_matching
@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}
}