This repository contains the replication code for the paper Mapping Africa’s Settlements: High Resolution Urban and Rural Map by Deep Learning and Satellite Imagery. It includes a link to access the urban-rural map product, instructions for using the trained model to predict LULC in any desired location, and step-by-step guidance for replicating and reproducing the study's results.
This README provides comprehensive instructions for setting up and using our system to generate LULC-Rural-Urban maps. It is designed to help users replicate the process by providing Python script files. The README is organized into a step-by-step guide, with important notes Furthermore, all script files are thoroughly commented to aid users in following the instructions effectively.
The simulation setup consists of several phases, each designed to serve a specific purpose, including dataset handling, training of deep models, evaluation, and LULC prediction/map generation. The procedure can be summarized as follows:
- Handling dataset: This phase involves generating and managing the dataset across the entire African continent.
- Training deep models: This phase is dedicated to training the deep learning models using a five-fold dataset configuration.
- Evaluation: This phase involves evaluating the performance of the trained models and analyzing the results.
- Prediction: This phase focuses on using the trained models for map generation. It can be run independently for those who wish to utilize the trained model for predictions at custom locations without replicating the entire workflow.
Now, let's dive into each phase in detail.
This phase involves downloading data from GEE and preparing the dataset for both the model training and prediction phases.
Investigating the class distribution when combining LULC classes with JRC SMOD classes. Jupyter notebook
Bulk Country-Wise Data Downloading from GEE: Landsat-8 and VIIRS Nighttime Light Dataset. Jupyter notebook We are looking to perform bulk data downloads on a country-wise basis from GEE. This will include both Landsat-8 imagery and VIIRS nighttime light datasets.
Downloading data relevant to a specific set of coordinates. Jupyter notebook
Downloading tiles covering a square area. Jupyter notebook . We are looking to download data tiles that cover a defined square area.
The definition of the DeepLabV3 model used in this work is available in the python script.
The modules used during the training and testing phases, including the data loader, data pipeline, preprocessing, and GPU workload distribution, can be found in this Python script
For the definition of the five data folds and the relevant trained models, as well as using the modules for training model, refer to this Python script
The model was trained using the NAISS cloud computing service by executing this Bash script
Evaluating the performance of the model temporally python script
Evaluating the performance of the model country-wise python script
Metric analysis including accuracy, precission, recall, IoU and F1-score. Jupyter notebook
Metric analysis for country-wise Box plot visualization Jupyter notebook
Metric analysis for country-wise CSV generation Jupyter notebook
Using DHS dataset to evaluate JRC SMOD and ours generated maps GEE JavaScript
Predict and visualize the LULC with rural/urban classes, and smooth the prediction using a sliding window Jupyter notebook
Predict and save the LULC with rural/urban classes, and smooth the prediction using a sliding window Jupyter notebook