A Keras implementation of GC Network by HungShi Lin([email protected]). The paper can be found here. I do some modifications by adding a linear output function and enable training highway block at the second stage.
- Model performance can't acheive that in the original paper.
Model can be trained with image with size (256, 512)
tensorflow(install from here), keras(install from here)
I trained my model with drivingfinalpass dataset, which contains more than 4000 stereo images with 2 epochs.
We crop training patches with size of 256x256 (different from that in the paper) from training images and normalize each channel.
Run the following command:
git clone https://github.com/LinHungShi/GCNetwork.git
- create subdirectories sceneflow/driving in data, download and tar driving_final pass and driving_disparity from here.
- You can also issue command
“sh download.sh”
which will create subdirectories and download datasets.
Run the following command:
python train.py
- create a directory, which contains two subdirectories -- left and right.
- Run the following command
python test.py -data <path/to/directory> -wpath <path/to/weight> [option]
- The default file will be saved as npy file named prediction.npy, you can replace it with -pspath when issuing the above command.
- Set it in train_params.py
- python train.py -wpath
-
To enable training with Monkaa dataset, a. Download Monkaa dataset from previous link.
b. Create a directory in data, which has the name as monkaa_root in src/environment.json.
c. Create a subdirectory, which has the name as monkaa_train in src/environment.json.
d. Create a subdirectory, which has the name as monkaa_label in src/environment.json.
-
All hyperparameters used for building the model can be found in src/hyperparams.json
Kendall, Alex, et al. "End-to-End Learning of Geometry and Context for Deep Stereo Regression." arXiv preprint arXiv:1703.04309 (2017).