# Detection of Flooded Regions from Satellite Images Using Modified UNET

S. M. Jaisakthi, P. R. Dhanya, S. Jitesh Kumar

► To cite this version:

S. M. Jaisakthi, P. R. Dhanya, S. Jitesh Kumar. Detection of Flooded Regions from Satellite Images Using Modified UNET. 4th International Conference on Computational Intelligence in Data Science (ICCIDS), Mar 2021, Chennai, India. pp.167-174, 10.1007/978-3-030-92600-7_16 . hal-03772928

HAL Id: hal-03772928

https://inria.hal.science/hal-03772928v1

Submitted on 8 Sep 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Detection of Flooded Regions from Satellite Images using Modified UNET*

S M Jaisakthi¹[0000-0001-9136-1300], Dhanya P R¹[0000-0001-8294-7908], and Jitesh Kumar S²

¹ School of Computer Science and Engineering, Vellore Institute of Technology, Vellore, India

{jaisakthi.murugaiyan, dhanya.pr}@vit.ac.in

² Sri Venkateshwara College of Engineering, Chennai, India
2018cse0716@svce.ac.in

**Abstract.** It is necessary to analyze the accessibility of flood-affected regions for better planning of response. Flood level detection using remotely sensed images could minimize costs and can also allow taking adequate preparation for fast recovery. MediaEval 2017 multimedia satellite task dataset is used for flood detection in satellite images. The image segmentation technique on satellite images using the modified UNET convolutional neural network is applied after pre-processing to analyze flood-affected regions and compared them to the corresponding segmented regions during the period of a flood event. Initially, all images were segmented using conventional segmentation methods like the Mean shift clustering algorithm. It is observed that the U-Net model produced a good measure for Intersection over Union (IoU) as 99.46 % with 99.41 % accuracy. The segmented images are then considered for further conventional processing to get meaningful information of flooded regions from satellite imagery.

**Keywords:** Flooded Region Segmentation · Convolutional Neural Network (CNN) · UNET.

## 1 Introduction

A flood event is a major disaster that causes several damages and needs emergency responses. The information about road conditions and accessibility is essential for fast response and recovery during flooding. The inundated roads are often the leading cause of harm to lives from most calamities. Newly discovered tools using satellite imagery could reduce monitoring costs and it also helps to take necessary and immediate response to floods. Satellite images should be pre-processed because they may contain noise such as vegetation, varying illumination conditions, and atmospheric distortion. Flooded regions in the satellite images can be segmented using Deep Neural Networks. The convolution Neural

* Supported by Department of Science and Technology, Science and Engineering Research Board, Government of India (DST-SERB)
Networks algorithm makes use of previous and current imagery of flood events. The CNN algorithm detects irregularities from a pre-flood stage by analysing the difference between the flooded and non-flooded images of a region with segments.

The Convolutional, Relational, and Dilated convolutional networks were used to segment flooded regions from satellite images with 88.23 % of Mean Intersection over Union [1]. A convolutional InceptionV3 network using the pre-trained weights on ImageNet [2] and finely refine the last inception model in the network used for the segmentation task [3]. A fully convolutional network was also used for semantic segmentation of flooded regions and obtained good results when incorporating RGB and Infrared channels into the model. It shows IR information has vital importance for detecting flooded areas in satellite imagery [4]. Accuracy and the prediction performances of recent deep learning algorithms such as SegNet, UNet, PSPnet, and FCN were compared and analysed for the water segmentation task [5]. A Generative Adversarial network is also used for the segmentation task with an IoU of 0.83 [6]. Deep convolutional neural networks pre-trained on ImageNet along with a transfer learning mechanism, is employed to detect if an area has been affected by a flood in terms of access. The best models achieved averaged F1-Score value of 73.27 % on the segmentation task [7]. The conventional methods employed to study and compare various methods for detecting and road passability by analysing the tweets which share images of flood and its metadata [8]. A Deep neural network ResNet50 pre-trained on ImageNet and Support Vector Machine used for the flood detection task with Twitter data [9]. Some studies depend on a convolutional neural network (CNNs) and a transfer learning-based classification method attains the F1-score of 62.30 % and 61.02 % for two runs [10]. A methodology adopted was based on a threshold decision tree classification of a simple three-band difference image, incorporating a newly developed “woody index”, ETM+ Band 2 and ETM+ Band 5 [11]. A Difference of Normalized Difference Water Indices (DNDWI) that maps flooded regions received an accuracy of 85.68 % and the non-flooded regions received an accuracy of 92.13 % [12]. A reliable and flexible system for the contextual and semantic embellishment of satellite imagery by analyzing multimedia content from the social media platform uses Twitter as the prime data source for collecting data and computing multimedia content such as images [13]. The mask R-CNN and Fully Convolutional Network (FCN) are compared to select the apt model for the image segmentation task [14]. A study concentrated on the various techniques derived from the two case studies for flood extent mapping using the fusion of the MODIS imagery and passive microwave [15]. A paper provides a summary of remote sensing and modelling practices for predicting the vulnerability to flooding, calculating the intensity of flooding, and analysing the destruction caused by the flood [16]. A study demonstrates data taken from non-authoritative sources such as Volunteered Geographic Information, tweets, real-time traffic conditions and a list of bridge closures and Calgary road are used to extend traditional data and methods for flood extent mapping to identify flood-affected roads [17]. The Experimental results of a study show that integrating local semantic information yields slightly better performance than
only using image-level CNN representation. Text features are not competitive when considering social media images [18]. It observed that media persons are required to contact by analysing different communication channels such as social media in particular, during flood events [19].

In this paper, a modified U-Net is employed to segment flooded regions in satellite images. The paper uses the Mediaeval 2017 dataset for the processing and evaluation of proposed model. A pre-trained MobileNetV2 used as an encoder and the decoder is the upsample block. The modified UNET model gives good values for accuracy and Intersection over Union (IOU). Different types of optimizers, loss functions and activation functions tried with the proposed model. The best functions selected for compiling and training the model.

# 2 Proposed Method

## 2.1 Dataset

This paper is intended to develop a method using deep neural networks that can recognize flood-affected regions in satellite imagery. This paper uses the MediaEval 2017 multimedia satellite task dataset for the segmentation task. The dataset comprises satellite image patches obtained from Planet's 4-band satellites with the shape of 320 x 320 x 4 pixels and patches are in the form of GeoTiff format. Each image patch gives four-channel information such as with Red, Green, Blue, and Near-Infrared band. The dataset included 462 image patches from six different locations, and also its pixel values are in the 16-bit digital number format. They provided a segmentation mask of the flooded area and extracted it by human annotators (0 represents background and 1 for the flooded area) for each patch [20].

## 2.2 Methodology

Initially, the dataset is processed with a data augmentation technique which is used to improve the diversity of the training set by adding some random but realistic transformations. Augmentation techniques such as random rotation and horizontal flipping are used to increase diversity. There are many traditional methods for the segmentation of images such as point, line, and edge detection methods, morphological approaches, thresholding, region-based and pixel-based clustering. Different kind of methods developed for segmentation using convolutional neural networks that have become the most relevant technology to handle advanced challenges in the area of image segmentation. A modified U-Net model [21] used to segment flooded regions in satellite images (see Fig. 1). The satellite image is reshaped to 224 x 224. A typical U-Net model comprises an encoder and a decoder. A pre-trained model is used as the encoder to learn significant features and lower the number of trainable variables. Thus, the encoder for the segmentation task is a pre-trained MobileNetV2 [22] model and its intermediate outputs are used. The decoder for the model is the upsample block.
Different types of optimizers and losses are tried to compile the model. An adam optimizer, replacement optimization algorithm for stochastic gradient descent with a learning rate of 1e-3 has used when compiling the model. The model has compiled with a loss of Mean Squared Error (MSE). It computes the mean of squares of errors between labels and predictions. The model trained with 500 epochs and a batch size of 64. After training the model, an Otsu thresholding [23] algorithm that returns a single intensity threshold used to separate pixels into two classes, foreground and background.

<figure><img src="image_3.png" /><figcaption>Fig. 1. Proposed Method.</figcaption></figure>

## 3 Result and Discussion

Intersection over Union (IoU) metric i.e. the Jaccard Index used for the primary and formal evaluation that is $IoU = \text{True Positive} / (\text{True Positive} + \text{False Positive} + \text{False Negative})$. It determined over the test dataset to analyse the efficiency of generated segmentation masks for flooded regions in the satellite image patches. The IoU measures [24] the accuracy for the pixel-wise classification. The dice coefficient is given by the ratio of, two times the Area of Overlap
and the total number of pixels in both images. Soft Dice loss is given by the difference of Dice coefficient from unity. Initially, satellite images were processed with a mean shift clustering algorithm. But when analyzing the values for segmenting, it is clear that it does not give better value for IoU. So metrics for the proposed modified U-Net model has given in TABLE 1.

<table><caption>**Table 1.** IoU, Soft Dice Loss, Loss and Accuracy of each Dataset</caption><thead><tr><td>Splitting of dataset</td><td>IoU( % )</td><td>Soft Dice Loss( % )</td><td>Loss( % )</td><td>Accuracy( % )</td></tr></thead><tbody><tr><td>Training set</td><td>99.46</td><td>1.64</td><td>0.46</td><td>99.41</td></tr><tr><td>Validation set</td><td>71.35</td><td>49.59</td><td>27.57</td><td>68.55</td></tr><tr><td>Test set</td><td>71.55</td><td>47.71</td><td>27.72</td><td>68.78</td></tr></tbody></table>

<figure><img src="image_4.png" /><figcaption>**Fig. 2.** Loss, Accuracy, IoU and Soft Dice Loss per epoch (a) Training and validation loss (b) Inter-section.</figcaption></figure>

The modified U-Net model gives good values for IoU and soft dice loss. An Intersection over a Union value which is greater 50 is generally considered as a good prediction. It is evident that accuracy increase with an increase in
<figure><img src="image_5.png" /><figcaption>Fig. 3. Satellite image segmentation using test images</figcaption></figure>
epochs. The model gives the best values for IoU on the training test which means this model is apt for flood-affected region detection in satellite imagery. The model detects the flooded regions from satellite images (see Fig. 3) with desirable accuracy. There is a significant decrease in soft dice loss per epochs. In our case, the training loss is less than the validation loss (see Fig. 2). This shows that our model is fitting very precisely in the training data set but not in the validation data. It means that it's not generalizing accurately to unseen data. It is negligible since the primary concern is the value of IoU.

## 4 Conclusion and Future work

A modified U-Net model is a good model for flood detection in satellite images. It will also be good to implement different CNN architectures to analyse the model and compare the efficiency. It will also be good to retrieve some meaningful information by processing with metadata and other data if available.

## References

1. Nogueira, K., Fadel, S. G., Dourado, I., C., Werneck, R. d. O., Muñoz, J. A. V., Penatti, O. A. B., Calumby, R. T., Li, L. T., dos Santos, J. A., and Torres, R. d. S.: Data-Driven Flood Detection using Neural Networks, MediaEval’17, Dublin, Ireland (2017).

2. Said, N., Pogorelov, K., Ahmad, K., Riegler, M., Ahmad, N., Ostroukhova, O., Halvorsen, P., Conci, N.: Deep learning approaches for flood, MediaEval’18, Sophia Antipolis, France (2018).

3. Lopez-Fuentes, L., Weijer, J. v. d., Bolaños, M., Skinnemoen, H.: Multi-modal Deep Learning Approach for Flood Detection, MediaEval’17, Dublin, Ireland (2017).

4. Bischke, B., Bhardwaj, P., Gautam, A., Helber, P., Borth, D., Dengel, A.: Detection of Flooding Events in Social Multimedia and Satellite, MediaEval’17, Dublin, Ireland (2017).

5. Zaffaroni, M., Rossi, C., Water Segmentation with Deep Learning Models for Flood Detection, Proceedings of the 17th ISCRAM Conference, VA, USA (2020).

6. Ahmad, K., Konstantin, P., Riegler, M., Conci, N., Holversen, P.: CNN and GAN Based Satellite and Social Media Data Fusion for MediaEval’17, Dublin, Ireland (2017).

7. Bischke, B., Helber, P., Christian, S., Srinivasan, V., Dengel, A., Borth, D.: The Multimedia Satellite Task at MediaEval 2017, MediaEval’17, Dublin, Ireland (2017).

8. Ronneberger, O., Fischer, P., Brox, T.: U-Net: Convolutional Networks for Biomedical Image Segmentation, International Conference on Medical image computing and computer-assisted intervention, Springer, Cham (2015).

9. Mark, S., Andrew, H., Menglong, Z., Andrey, Z., Liang-Chieh, C.: Mobilenetv2: Inverted residuals and linear bottlenecks, Proceedings of the IEEE conference on computer vision and pattern recognition (2018).

10. Otsu, N.: A threshold selection method from gray-level histograms, IEEE transactions on systems, man, and cybernetics, 9(1), 62-66, (1979).
11. Rezatofighi, H., Tsoi, N. Gwak, J., Sadeghian, A.: Generalized intersection over union: A metric and a loss for bounding box regression., Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. (2019)

12. Dias, D., Dias, U., Flood detection from social multimedia and satellite images using ensemble and transfer learning with CNN architectures, MediaEval'18, Sophia Antipolis, France (2018)

13. Lopez-Fuentes, L., Farasin, A., Skinnemoen, H., Garza, P., Deep Learning models for passability detection of flooded roads, MediaEval'18, Sophia Antipolis, France (2018)

14. Kirchknopf, A., Slijepcevic, D., Zeppelzauer, M., Seidl, M.: Detection of Road Passability from Social Media and Satellite Images, MediaEval'18, Sophia Antipolis, France (2018)

15. Said, N., Pogorelov, K., Ahmad, K., Riegler, M., Ahmad, N., Ostroukhova, O., Halvorsen, P., Conci, N.: Deep learning approaches for flood classification and flood aftermath detection, MediaEval'18, Sophia Antipolis, France (2018) Gerald, W. J., Bisshop, W., Senarath, U., Stewart, A.: Methodology for mapping change in woody landcover over Queensland from 1999 to 2001 using Landsat ETM + (2002).

16. Gerald, W. J., Bisshop, W., Senarath, U., Stewart, A.: Methodology for mapping change in woody landcover over Queensland from 1999 to 2001 using Landsat ETM + (2002).

17. O. I, Curtarelli, M., F. C.: The Use of Optical Remote Sensing For Mapping Flooded Areas (2013)

18. Bischke, B., Borth, D., Schulze, C., Denge, A.: Contextual Enrichment of Remote-Sensed Events with Social Media Streams, Proceedings of the 24th ACM international conference on Multimedia (MM '16). Association for Computing Machinery, New York, NY, USA (2016)

19. Sébastien., O., Building segmentation on satellite images (2018)

20. Ticehurst, J. C., D, P., G, J. P.: Using passive microwave and optical remote sensing to monitor flood inundation in support of hydrologic modelling, 18th World IMACS / MODSIM Congress, Congress, Cairns, Australia (2009)

21. Klemas, V., "Remote sensing of floods and flood-prone areas: an overview," ournal of Coastal Research, J31(4), 1005-1013 (2015)

22. Schnebele, E., Cervone, G., Kumar, S., Waters, N., Real time estimation of the Calgary floods using limited remote sensing data, Water, 6(2), 381-398 (2014)

23. Liebrecht, C.: PDF hosted at the Radboud Repository of the Radboud University Nijmegen the perfect solution for detecting sarcasm in tweets# not, In Proc. 4th Work. Comput. Approaches to Subj. Sentim. Soc. Media Anal. (2014)

24. Ahmed, A Sinnappan, S.: The role of social media during Queensland floods: An empirical investigation on the existence of multiple communities of practice (MCoPs), Pacific Asia Journal of the Association for Information Systems, 5(2) (2013)