Authors: Minho Kim, Doyoung Jeong, Yongil Kim
The code is provided for the Multi-Scale, Multi-Level Attention Network (MSMLA) proposed in Local climate zone classification using a multi-scale, multi-level attention network accepted in ISPRS J.
The model is shown below:
All experiments were trained from scratch and were performed using an Intel Core i7-6700 CPU at 3.40 GHz and an NVIDIA GeForce RTX 2070 Super Graphics Processor Unit (GPU) with 8 GB of memory. Python 3.7.9 was used with Tensorflow 2.3.0. For training hyperparameters, an early stop of 15 epochs, a learning rate of 0.002, and a decay factor of 0.004 were used. The adaptive moment estimation (adam) optimizer was chosen to minimize the cross-entropy loss function. Filter weights were initialized using “He normal” initialization.
- python=3.7.9
- tensorflow-gpu=2.3
- tensorflow-addons
- scikit-learn
- matplotlib
- pandas
- albumentations (pip)
- Install a new conda environment
$ conda env create --name msmla --file environment.yml
- Activate the new environment and navigate to the "src" folder
$ conda activate msmla
$ cd src
- Download train, test, validation sample .h5 files. The data_link.rtf text file in the LCZ_MSMLA/data folder contains a download link. Make sure to move the .h5 files into the LCZ_MSMLA/data folder.
- Run the train.py code
$ python train.py --path /YOUR/LOCAL/DIRECTORY/LCZ_MSMLA # Only change /YOUR/LOCAL/DIRECTORY without " "
Classification accuracy results of benchmark and proposed models using “All + Ancillary” (Sentinel-2 10 bands, OSM, DSM, NLCM) data with 48x48 pixel patches. Please refer to the paper for more results and details.
Model | Trainable Parameters | OA (%) | WA (%) | OABU (%) | OAN (%) | F1 (%) |
---|---|---|---|---|---|---|
Sen2LCZ | 793,348 | 81.0 | 73.9 | 54.4 | 84.8 | 78.7 |
LCZNet | 3,181,809 | 83.0 | 79.8 | 63.8 | 86.5 | 82.2 |
CNN | 235,105 | 83.4 | 78.1 | 61.1 | 89.0 | 82.2 |
MSMLA-18* | 181,867 | 84.4 | 80.4 | 64.7 | 89.4 | 83.5 |
MSMLA-50* | 808,913 | 87.1 | 85.0 | 72.4 | 91.8 | 86.5 |
* Proposed models
- [Sen2LCZ-Net] Qiu, C., Tong, X., Schmitt, M., Bechtel, B., & Zhu, X. X. (2020). Multilevel feature fusion-based CNN for local climate zone classification from sentinel-2 images: Benchmark results on the So2Sat LCZ42 dataset. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 13, 2793-2806.
- [LCZNet] Liu, S., & Shi, Q. (2020). Local climate zone mapping as remote sensing scene classification using deep learning: A case study of metropolitan China. ISPRS Journal of Photogrammetry and Remote Sensing, 164, 229-242.
- [CNN] Rosentreter, J., Hagensieker, R., & Waske, B. (2020). Towards large-scale mapping of local climate zones using multitemporal Sentinel 2 data and convolutional neural networks. Remote Sensing of Environment, 237, 111472.
Please cite the journal paper if this code is useful and helpful for your research.
@article{kim2021local,
title={Local climate zone classification using a multi-scale, multi-level attention network},
author={Kim, Minho and Jeong, Doyoung and Kim, Yongil},
journal={ISPRS Journal of Photogrammetry and Remote Sensing},
volume={181C},
pages={345--366},
year={2021},
publisher={Elsevier}
}