Skip to content

Guard-Net: Lightweight Stereo Matching Network via Global and Uncertainty-Aware Refinement for Autonomous Driving(IEEE TITS 2024)

Notifications You must be signed in to change notification settings

YJLCV/Guard-Net

Repository files navigation

Guard-Net

Contents

Introduction


The code of the paper Guard-Net: Lightweight Stereo Matching Network via Global and Uncertainty-Aware Refinement for Autonomous Driving(IEEE TITS 2024).

Installation


Environment

Create a virtual environment and activate it

conda create -n guard python=3.8
source activate guard

Dependencies

install PyTorch (An example works for me)

Linkhttps://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

Demo


Generate disparity images of SceneFlow test set:

Download SceneFlow Pre-trained Weights

Linkhttps://pan.baidu.com/s/1gbIT8CMvHTJiIMyJLFh67w?pwd=9d65

Code:9d65

python ./save_disp_sceneflow.py \
    --datapath SceneFlow Path \
    --loadckpt SceneFlow Pre-trained Weights Path

Training


Data Preparation

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

SceneFlow

Use the following command to train Guard-Net on SceneFlow

python ./main_coex.py \
    --datapath SceneFlow Path \
    --logdir logdir Path

KITTI

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

Testing


Use the following command to test Guard-Net on SceneFlow

python ./test_sceneflow.py \
    --datapath SceneFlow Path \
    --loadckpt SceneFlow Pre-trained Weights Path

Citation


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}
}

Acknowledgments


Thanks to Antyanta Bangunharcana for open-sourcing his excellent work CoEx. Thanks to Gangwei Xu for open-sourcing his PyTorch implementation.

About

Guard-Net: Lightweight Stereo Matching Network via Global and Uncertainty-Aware Refinement for Autonomous Driving(IEEE TITS 2024)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages