This repository contains the code related to the paper:
M. Pastorino, G. Moser, S. B. Serpico, and J. Zerubia, "Fully convolutional and feedforward networks for the semantic segmentation of remotely sensed images," 2022 IEEE International Conference on Image Processing, 2022, https://hal.inria.fr/hal-03720693.
When using this work, please cite our IEEE ICIP'22 conference paper:
M. Pastorino, G. Moser, S. B. Serpico, and J. Zerubia, "Fully convolutional and feedforward networks for the semantic segmentation of remotely sensed images," in IEEE International Conference on Image Processing, Bordeaux, France, 2022.
@ARTICLE{pastorino_icip22,
author={Pastorino, Martina and Moser, Gabriele and Serpico, Sebastiano B. and Zerubia, Josiane},
journal={IEEE International Conference on Image Processing},
title={Fully convolutional and feedforward networks for the semantic segmentation of remotely sensed images},
year={2022},
volume={},
number={},
pages={},
doi={}}
The code was built on a virtual environment running on Python 3.9
git clone --recursive https://github.com/Ayana-Inria/FCN-FFNET_RS-semantic-segmentation.git
cd FCN-FFNET_RS-semantic-segmentation
pip install -r requirements.txt
- Train the model on a scarce GT set
python main.py -r -g conncomp
- Infer on data
python main.py -g full
semantic_segmentation
├── dataset - contains the data loader
├── input - images to train and test the network
├── net - contains the loss, the network, and the training and testing functions
├── output - should contain the results of the training / inference
| ├── exp_name
| └── model.pth
├── utils - misc functions
└── main.py - program to run
The model is trained on the ISPRS Vaihingen dataset and ISPRS Potsdam dataset. The two datasets consist of VHR optical images (spatial resolutions of 9 and 5cm, respectively), we used the IRRG channels. They can be downloaded on Kaggle and should be inserted in the folder /input
.
The data should have the following structure.
input
├── top
| └── top_mosaic_09cm_area{}.tif
├── gt
| └── top_mosaic_09cm_area{}.tif
└── gt_eroded
└── top_mosaic_09cm_area{}_noBoundary.tif
The code is released under the GPL-3.0-only license. See LICENSE.md
for more details.
This work was conducted during my joint PhD at INRIA, d'Université Côte d'Azur and at the University of Genoa. The ISPRS 2D Semantic Labeling Challenge Datasets were provided by the German Society for Photogrammetry, Remote Sensing and Geoinformation (DGPF). The code to deal with the ISPRS dataset derives from the GitHub repository Deep learning for Earth Observation.