SEDNet
May 31, 2023 ยท View on GitHub
This is the Python implementation of the SEDNet with GwcNet backbone. (Learning the Distribution of Errors in Stereo Matching for Joint Disparity and Uncertainty Estimation. Published at CVPR 2023) [Paper]
Environment
- python 3.7
- Pytorch >= 0.10.2
- Cuda >= 11.0
- Anaconda
- Create environment by
conda env create -f sednet.ymlorconda create --name myenv --file sednet.txt
Data Preparation
Download datasets at:
Training
Training List
- Training/Test split used in the paper.
- You can also use files in generate_datas to generate your own split.
- Please save the split files to
./filenames.
Training Scripts
main.pyis used to training the SEDNet.- Training scripts are saved in
./scripts - For
--losstype,smooth_l1is the smooth L1 loss in Guo et al.,KGis the log-likelihood loss in Kendall and Gal.,UCis our novel divergence loss with the log-likelihood loss. - To train the LAF baseline, you need to run
./generate_datas/generate_laf_data.pyto save the cost volumn of stereo network at first.
Example of Scene Flow Datasets
- run the scripts
./scripts/sceneflow.shto traing on Scene Flow datasets - Please update
DATAPATHandSAVEPATHas your train data path and the log/checkpoints save path. - You can use
--loadckptto specific the pre-trained checkpoint file.
Evaluation
- Files in post_process are used to evaluate the models.
generate_statistic.pyis to compute the evaluation metrics.generate_conf_and_depth.pycan covert the disparity maps and uncertainty maps to depth maps and the confidence maps via gaussian error function.- Run
./scripts/sceneflow_analysis.shto generate the evaluation metric of models trained with Scene Flow datasets.
Save Outputs
- Run
./scripts/kitti15_save.shto save the disparity maps of the model is fine-tunned on KIITI 2015 dataset. Please update the--loadckptas your checkpoint file to generate the disparity maps.
Pretrained Models
- SceneFlow: SEDNet with a soft inlier threshold of 3 sigma and 11 bins in logspace.
- VKITT2: SEDNet with a soft inlier threshold of 3 sigma and 11 bins in logspace.
Citation
@inproceedings{chen2023learning,
title={Learning the Distribution of Errors in Stereo Matching for Joint Disparity and Uncertainty Estimation},
author={Chen, Liyan and Wang, Weihan and Mordohai, Philippos},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={17235--17244},
year={2023}
}