Delio Vicini, Matej Hamas, Taivo Pungas (Department of Computer Science, ETH Zurich, Switzerland)
The code in this repository trains a convolutional neural network and adds a post-processing layer, for the task of detecting roads in satellite images. See project report here.
- Python
- scipy
- numpy
- scikit-learn
- tensorflow
- matplotlib
- Pillow
- skimage
- Copy the data so the
data/
folder contains the following:
test_set/
|-- downsampled/
|-- test_1.png
|-- test_2.png
|-- ...
|-- test_50.png
training/
|-- groundtruth/
| |-- downsampled/
| |-- satImage001.png
| |-- satImage002.png
| |-- ...
| |-- satImage100.png
|
|-- images/
|-- downsampled/
|-- satImage001.png
|-- satImage002.png
|-- ...
|-- satImage100.png
- Run
sh setup.sh
while in the project root folder to set up the necessary file structures (assumes a Bash shell).
Warning: running the code as-is requires around 100GB of memory.
- Run
python run.py
while in thesrc
folder to train the CNN, apply post-processing and generate predictions. - All results will be in the
results
folder, underCNN_Output/
,postprocessing_output/
and insubmission.csv
.
- Run
python baseline/model_baseline.py
while in thesrc
folder. - All results will be in the
results
folder, underCNN_Output_Baseline/
and inbaseline_submission.csv
.
The project has been tested with and is guaranteed to run on Python 3.5.0.