The source code is released under the MIT License.
You can see the high-quality video at:
https://haram-kim.github.io/Hetero_Stereo_Matching/
We tested our code on Python version 3.8.0
[Download]
We use OpenCV to visualize and manipulate images.
We use CUDA for parallel computation.
[Download] [Installation guide]
We use python wrapper pyCUDA for CUDA.
You can install dependent libararies by running :
pip install opencv pycuda pyyaml scipy tqdm h5py hdf5plugin
The code works best on Ubuntu 20.04
-
Download DSEC data set
DSEC [Download]0-1. (Optional) If you want to download only the preprocessed data, please download:
'interlaken_00_c_processed_data' (8.71GB)
'interlaken_00_d_processed_data' (34.4GB)
'interlaken_00_e_processed_data' (26.9GB)
'interlaken_00_f_processed_data' (14.6GB)
'interlaken_00_g_processed_data' (14.2GB)
(Still, '[DATA_SEQUENCE]_calibration' must be download.)
Directory structure :
/PATH_TO_DSEC
├────interlaken_00_c
│ ├────interlaken_00_c_calibration
│ ├────interlaken_00_c_disparity_event
│ ├────interlaken_00_c_disparity_image
│ ├────interlaken_00_c_events_left
│ ├────interlaken_00_c_events_right
│ ├────interlaken_00_c_images_rectified_left
│ ├────interlaken_00_c_images_rectified_right
│ ├────interlaken_00_c_disparity_timestamps.txt
│ └────interlaken_00_c_image_timestamps.txt
│
├────interlaken_00_c_processed_data.hdf5 (Please locate the preprocessed data to this.)
...
├────interlaken_00_g
│ ├────interlaken_00_g_calibration
│
│ ...
│
│ └────interlaken_00_g_image_timestamps.txt
└────interlaken_00_g_processed_data.hdf5
- Clone this repository:
$ git clone https://github.com/Haram-kim/Hetero_Stereo_Matching.git
- Run the code
$ cd HSM
$ python main.py [PATH_TO_DSEC] [DATA_SEQUENCE]
Example) $ python main.py /c/DSEC/ interlaken_00_c
feature num - the number of features
track_err_thres - KLT traker error threshold
track_win_size - KLT tracker window size
extract_win_size - Feature extractor window size
feature num: 1000
track_err_thres: 10
track_win_size:
- 21
- 21
extract_win_size: 12
disparity_range - disparity range (0 - max_disp)
kernel_radius - patch radius
ncc_gaussian_std - standard deviation of Gaussian filter
msd_gap - Maximum Shift Distance interval
disparity_range: 100
kernel_radius: 12
ncc_gaussian_std: 2
msd_gap: 10
If you want to estimate the computation time, you can run the time_estimation mode.
time_estimation: True
'show disparity inlier' requires ground truth disparity.
If you want to see all estimated disparity of the proposed method, please change the flag 'show_disparity' False to True
If you want to see estimated disparity on edges of the proposed method, please change the flag 'semi_dense' False to True
show_disparity_inlier: True
show_disparity: True
semi_dense: True