Model package from "U-net-id, an Instance Segmentation Model for Building Extraction from Satellite Images"
Creators: name: Wagner, Fabien Hubert
Publisher: name: Zenodo
Year: 2020
Subjects: Built Environment, Building segmentation, Urban science, U-net Model, instance segmentation, Deep Learning

description: This model package contains the R codes for Windows of the instance segmentation algorithm called U-net-id described in the article « U-Net-Id, an Instance Segmentation Model for Building Extraction from Satellite Images - Case Study in the Joanópolis City, Brazil» (https://www.mdpi.com/2072-4292/12/10/1544). This code version works with TensorFlow 2. As I don't own the rights to publish the original very high resolution images, this example was made with a simulated image of WorldView-3 of the same resolution than the original data (0.3 m). The simulated objects to segment are geometric polygon (with similar size as houses) on a noisy green background (see in the directory (".data-raw/train"). To run the model, it is assumed that you have a computer with GPU sufficient to run deep learning models (CUDA compute capacity &gt;3.0), and Rstudio with the package keras already working (https://keras.rstudio.com/). This most of the code is based on an adaptation of the original codes for segmentation published on the RStudio AI Blog here: https://blogs.rstudio.com/ai/posts/2019-08-23-unet/. Our model, additionaly, to the segmentation given by the classical U-net model also give the instance segmentation (inner segment mask). To obtain the instances, after merging all the output images to obtain an image of the size of your original satellite image, 1- transform the inner band into polygons, 2- add an ID to each polygon, and 3- add a buffer to these polygons of the distance you have selected between the border of the segment and the border of the inner. Now you have polygons with individual IDs that cover the segment, your instances. you can further transform them to raster. optionally, before the step 1 you can multiplicate the inner tensor by the negative of the border tensor, if you object are very close this can help to better make the separation. With this dataset, the model validation accuracy starts to increase after ~1 to 3 epochs. After ~15 epochs, the validation accuracy is &gt;0.95 and reach 0.99% at epoch 150. On my computer, one epoch runs in 50s. The R codes and the simulated data are distributed in a .zip of ~295.8 Mo. The RGB images are in the directory "./data-raw/train" and the labelled masks of the objects coded in RGB ([1,0,0]=segment, [0,1,0]=inner segment and [0,0,1]=border) are in the directory "./data-raw/train_masks". Pretrained weights for 150 epochs are found in the directory "./weights_saved". The model was run with the following libraries: Python 3.7.6, RStudio Version 1.3.959, R version 4.0.2 (2020-06-22), R keras package version 2.3.0.0.9000, tensorflow version 2.2.0-rc4, tensorflow_addons version 0.10.0 and a Nvidia GeForce RTX 2080 (driver 451.48, CUDA 10.1 and cuDNN version 7.6.5.32). When using this dataset, please cite the original article : https://www.mdpi.com/2072-4292/12/10/1544 To install all requirements to run TensorFlow-2 within Rstudio on Windows see the manual here : https://zenodo.org/record/3929710