README.md 6.23 KB
Newer Older
gencersumbul's avatar
gencersumbul committed
1
2
# Deep Learning Models for BigEarthNet-S2 with 19 Classes
This repository contains code to use the [BigEarthNet](http://bigearth.net) Sentinel-2 (denoted as BigEarthNet-S2) archive with the nomenclature of 19 classes for deep learning applications. The nomenclature of 19 classes was defined by interpreting and arranging the CORINE Land Cover (CLC) Level-3 nomenclature based on the properties of Sentinel-2 images. This class nomenclature is the product of a collaboration between the [Direção-Geral do Território](http://www.dgterritorio.pt/) in Lisbon, Portugal and the [Remote Sensing Image Analysis (RSiM)](https://www.rsim.tu-berlin.de/) group at TU Berlin, Germany.
tristan.kreuziger's avatar
tristan.kreuziger committed
3

gencersumbul's avatar
gencersumbul committed
4
5
If you use the BigEarthNet-S2 archive or our pre-trained models, please cite the paper given below:

gencersumbul's avatar
gencersumbul committed
6
> G. Sumbul, A. d. Wall, T. Kreuziger, F. Marcelino, H. Costa, P. Benevides, M. Caetano, B. Demir, V. Markl, “[BigEarthNet-MM: A Large Scale Multi-Modal Multi-Label Benchmark Archive for Remote Sensing Image Classification and Retrieval](https://arxiv.org/abs/2105.07921)”,  IEEE Geoscience and Remote Sensing Magazine, vol. 9, no. 3, pp. 174-180, 2021, doi: 10.1109/MGRS.2021.3089174.
gencersumbul's avatar
gencersumbul committed
7
8

```
gencersumbul's avatar
gencersumbul committed
9
@article{BigEarthNet-MM,
gencersumbul's avatar
gencersumbul committed
10
11
      title={BigEarthNet-MM: A Large Scale Multi-Modal Multi-Label Benchmark Archive for Remote Sensing Image Classification and Retrieval}, 
      author={Gencer Sumbul, Arne de Wall, Tristan Kreuziger, Filipe Marcelino, Hugo Costa, Pedro Benevides, Mário Caetano, Begüm Demir and Volker Markl},
gencersumbul's avatar
gencersumbul committed
12
      journal={IEEE Geoscience and Remote Sensing Magazine},
gencersumbul's avatar
gencersumbul committed
13
14
      volume={9},
      number={3},
gencersumbul's avatar
gencersumbul committed
15
      pages={174-180},
gencersumbul's avatar
gencersumbul committed
16
      year={2021},
gencersumbul's avatar
gencersumbul committed
17
      doi={10.1109/MGRS.2021.3089174}
gencersumbul's avatar
gencersumbul committed
18
19
20
21
}
```

If you are interested in BigEarthNet-S2 with the original CLC Level-3 class nomenclature of 43 classes, please check [here](https://git.tu-berlin.de/rsim/BigEarthNet-S2_43-classes_models).
tristan.kreuziger's avatar
tristan.kreuziger committed
22

gencersumbul's avatar
gencersumbul committed
23
24
## Pre-trained Deep Learning Models
We provide code and model weights for the following deep learning models that have been pre-trained on BigEarthNet-S2 with the nomenclature of 19 classes for scene classification:
tristan.kreuziger's avatar
tristan.kreuziger committed
25
26


gencersumbul's avatar
gencersumbul committed
27
28
| Model Names  | Pre-Trained TensorFlow Models                                | 
| ------------ | ------------------------------------------------------------ | 
gencersumbul's avatar
gencersumbul committed
29
30
31
32
| K-Branch CNN | [K-BranchCNN.zip](http://bigearth.net/static/pretrained-models/BigEarthNet-S2_19-Classes/K-BranchCNN.zip) | 
| VGG16        | [VGG16.zip](http://bigearth.net/static/pretrained-models/BigEarthNet-S2_19-Classes/VGG16.zip) | 
| VGG19        | [VGG19.zip](http://bigearth.net/static/pretrained-models/BigEarthNet-S2_19-Classes/VGG19.zip) | 
| ResNet50     | [ResNet50.zip](http://bigearth.net/static/pretrained-models/BigEarthNet-S2_19-Classes/ResNet50.zip) | 
gencersumbul's avatar
gencersumbul committed
33
| ResNet101    | [ResNet101.zip](http://bigearth.net/static/pretrained-models/BigEarthNet-S2_19-Classes/ResNet101.zip) | 
gencersumbul's avatar
gencersumbul committed
34
| ResNet152    | [ResNet152.zip](http://bigearth.net/static/pretrained-models/BigEarthNet-S2_19-Classes/ResNet152.zip) |
tristan.kreuziger's avatar
tristan.kreuziger committed
35

tristan.kreuziger's avatar
tristan.kreuziger committed
36
The TensorFlow code for these models can be found [here](https://git.tu-berlin.de/rsim/bigearthnet-models-tf).
tristan.kreuziger's avatar
tristan.kreuziger committed
37

gencersumbul's avatar
gencersumbul committed
38
The pre-trained models associated to other deep learning libraries will be released soon.
Jian Kang's avatar
Jian Kang committed
39

gencersumbul's avatar
gencersumbul committed
40
41
## Generation of Training/Test/Validation Splits
After downloading the raw images from http://bigearth.net, they need to be prepared for your ML application. We provide the script `prep_splits_19_classes.py` for this purpose. It generates consumable data files (i.e., TFRecord) for training, validation and test splits which are suitable to use with TensorFlow. Suggested splits can be found with corresponding csv files under `splits` folder. The following command line arguments for `prep_splits_19_classes.py` can be specified:
tristan.kreuziger's avatar
tristan.kreuziger committed
42
43
44
45

* `-r` or `--root_folder`: The root folder containing the raw images you have previously downloaded.
* `-o` or `--out_folder`: The output folder where the resulting files will be created.
* `-n` or `--splits`: A list of CSV files each of which contains the patch names of corresponding split.
gencersumbul's avatar
gencersumbul committed
46
* `-l` or `--library`: A flag to indicate for which ML library data files will be prepared: TensorFlow.
gencersumbul's avatar
gencersumbul committed
47
* `--update_json`: A flag to indicate that this script will also change the original json files of the BigEarthNet-S2 by updating labels 
48

gencersumbul's avatar
gencersumbul committed
49
To run the script, either the GDAL or the rasterio package should be installed. The TensorFlow package should also be installed. The script is tested with Python 2.7, TensorFlow 1.3, and Ubuntu 16.04. 
tristan.kreuziger's avatar
tristan.kreuziger committed
50

gencersumbul's avatar
gencersumbul committed
51
**Note**: BigEarthNet-S2 patches with high density snow, cloud and cloud shadow are not included in the training, test and validation sets constructed by the provided scripts (see the list of patches with seasonal snow [here](http://bigearth.net/static/documents/patches_with_seasonal_snow.csv) and that of cloud and cloud shadow [here](http://bigearth.net/static/documents/patches_with_cloud_and_shadow.csv)). 
tristan.kreuziger's avatar
tristan.kreuziger committed
52

gencersumbul's avatar
gencersumbul committed
53
## Authors
gencersumbul's avatar
gencersumbul committed
54
[**Gencer Sümbül**](http://www.user.tu-berlin.de/gencersumbul/)
tristan.kreuziger's avatar
tristan.kreuziger committed
55

gencersumbul's avatar
gencersumbul committed
56
[**Tristan Kreuziger**](https://www.rsim.tu-berlin.de/menue/team/tristan_kreuziger/)
tristan.kreuziger's avatar
tristan.kreuziger committed
57
58


gencersumbul's avatar
gencersumbul committed
59
## License
tristan.kreuziger's avatar
tristan.kreuziger committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
The BigEarthNet Archive is licensed under the **Community Data License Agreement – Permissive, Version 1.0** ([Text](https://cdla.io/permissive-1-0/)).

The code in this repository to facilitate the use of the archive is licensed under the **MIT License**:

```
MIT License

Copyright (c) 2019 The BigEarthNet Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```