In disaster zones, especially in developing countries, maps and accessibility information are crucial for crisis response. This dataset was obtained from Road Extraction Challenge Track in DeepGlobe Challenge (see publication below for more information on data source). As an initial step towards automated emergency response and expanded map connectivity, we present the challenge of using satellite imagery to automatically identify and extract road and street networks from remote locations.
DeepGlobe 2018: A Challenge to Parse the Earth through Satellite Images. (2008) Demir, I., Koperski, K., Lindenbaum, D., Pang, G., Huang, J., Basu, S., Hughes, F., Tuia, D., & Raskar, R.
deepglobe-road-segmentation
βββ LICENSE
βββ README.md
βββ deep_globe_seg
β βββ helpers.py
βββ environment.yml
βββ data
β βββ train
β β βββ image_001.jpg
β β βββ image_002.jpg
β β βββ ...
β βββ test
β β βββ image_101.jpg
β β βββ image_102.jpg
β β βββ ...
β βββ valid
β β βββ image_201.jpg
β β βββ image_202.jpg
β β βββ ...
β βββ class_dict.csv
β βββ metadata.csv
βββ logs
β βββ training_log.csv
βββ notebooks
β βββ deep-globe-road-segmentation.ipynb
βββ saved_models
βββ unet.weights.h5
This analysis provides a complete pipeline for training and evaluating a road extraction model from satellite imagery, which could be useful for various applications in urban planning, navigation, and geographic information systems. It uses deep learning to automatically detect and extract roads from satellite imagery. It employs a U-Net architecture with a ResNet50 backbone for image segmentation.
Model Features:
- Utilizes the segmentation_models library for implementing the U-Net model.
- Implements custom data loading and augmentation pipelines.
- Trains on a dataset of satellite images and corresponding road masks.
- Uses a combination of Dice loss and Focal loss for training.
- Evaluates the model using IoU (Intersection over Union) and F1 score metrics.
Workflow:
- Loads and preprocesses the dataset, splitting it into train, validation, and test sets.
- Applies data augmentation to the training set.
- Trains the U-Net model with early stopping and learning rate reduction.
- Evaluates the model's performance on training, validation, and test sets.
- Visualizes the original images, ground truth masks, and model predictions.
Results:
- The model achieves an IoU of over 0.5. A sample of predictions is shown below, for illustrative purposes.
Ensure you have conda installed on your system before creating the environment. You can refer to the official conda documentation for installation instructions.
Ensure you have the following dependencies installed on your system:
- Python:
3.9
- JupyterNotebook:
version v7.1.3
- Clone the deepglobe-road-segmentation repository:
git clone git@github.com:sg-peytrignet/deepglobe-road-segmentation.git
- Change to the project directory:
cd deepglobe-road-segmentation
- Install the dependencies with conda:
conda env create -f environment.yml
conda activate road_extraction_env
The images can be downloaded from this dataset page on Kaggle. Include the data folder into your local clone of this repository as shown in the tree above. You will need 4.15 GB of free disk space.
Run each notebook in the IDE of your choice, such as JupyterLab or Visual Studio. You may launch Jupyter from the terminal:
jupyter notebook
In the Jupyter interface that opens in your web browser, click on the .ipynb
file to open it. You can now run cells, modify code, and interact with the notebook.
This project is protected under the MIT License.
- Thanks to @qubvel and their segmentation-models Python package, including the example notebooks provided as part of the package.