The code of the paper Guard-Net: Lightweight Stereo Matching Network via Global and Uncertainty-Aware Refinement for Autonomous Driving(IEEE TITS 2024).
Create a virtual environment and activate it
conda create -n guard python=3.8
source activate guard
install PyTorch (An example works for me)
Link
:https://pan.baidu.com/s/1aUj3kB3wMkhFigTYdyHYGg?pwd=6acz
Code
:6acz
pip install torchvision-0.10.1+cu111-cp38-cp38-linux_x86_64.whl
pip install torch-1.9.1+cu111-cp38-cp38-linux_x86_64.whl
install extra dependencies
pip install -r requirements.txt
Generate disparity images of SceneFlow test set:
Download SceneFlow Pre-trained Weights
Link
:https://pan.baidu.com/s/1gbIT8CMvHTJiIMyJLFh67w?pwd=9d65
Code
:9d65
python ./save_disp_sceneflow.py \
--datapath SceneFlow Path \
--loadckpt SceneFlow Pre-trained Weights Path
In our setup, the dataset is organized as follows
└── datasets
├── KITTI
| ├── 2012
| │ ├── training
| │ ├── testing
| |
| ├── 2015
| │ ├── training
| │ └── testing
|
└── SceneFlow
├── flyingthings3d__frames_finalpass
├── flyingthings3d__disparity
├── driving__frames_finalpass
├── driving__disparity
├── flyingthings3d_final
├── monkaa__frames_finalpass
├── monkaa__disparity
Use the following command to train Guard-Net on SceneFlow
python ./main_coex.py \
--datapath SceneFlow Path \
--logdir logdir Path
Use the following command to train Guard-Net on KITTI (using pre-trained model on Scene Flow)
python ./coex_kitti.py \
--kitti15_datapath kitti15 Path \
--kitti12_datapath kitti12 Path \
--logdir logdir Path \
--loadckpt SceneFlow Pre-trained Weights Path
Use the following command to test Guard-Net on SceneFlow
python ./test_sceneflow.py \
--datapath SceneFlow Path \
--loadckpt SceneFlow Pre-trained Weights Path
If you find our work useful in your research, please consider citing our paper:
@article{liu2024Guard-Net,
title={Guard-Net: Lightweight Stereo Matching Network via Global and Uncertainty-Aware Refinement for Autonomous Driving},
author={Liu, Yujun and Zhang, Xiangchen and Luo, Yang and Hao, Qiaoqiao and Su, Jinhe and Cai, Guorong},
journal={IEEE Transactions on Intelligent Transportation Systems},
volume={25},
number={8},
pages={10260-10273},
year={2024},
publisher={IEEE}
}
Thanks to Antyanta Bangunharcana for open-sourcing his excellent work CoEx. Thanks to Gangwei Xu for open-sourcing his PyTorch implementation.