 The today's talk will be an interesting topic where in which we will be looking at how we have used Python, specifically geospatial Python libraries for addressing hazard risk situations such as flood, heat wave, as well as earthquake. This specific presentation will be with respect to the flood analytics model that we have created. Most of the libraries and the processes are Python workflows. There will be some interesting code basis that I would like to share with you and the results that I would like to share with you. If time permits, I will scheme through code in detailed manner, otherwise I will just scheme through it. So having said that, a little bit about me, I currently work as a geospatial data scientist at Grammina. I have been working in geospatial data science field since the past four years. I have worked on different projects under Microsoft AI for Earth, as well as various projects under smart city analytics, as well as disaster risk management. So these are my different profiles if anyone wants to reach out and connect with on the different types of topics that you might be working on, please feel free to reach out. Now let's talk about flood, right? So flood being hit in India and devastated many lives together. And it has been a recurrent event for different like time spans. As you can see this particular lady, she had a, you know, a great story to tell that how they survived in such kind of cyclone induced floods. There were like 1500 deaths in India, like considering the time span between 2011 to 2020. Now some few more flags about the cyclone induced floods, like there are various different different parts through which India is visible to the sea coast. There will be many other countries who are facing the similar problems. So whenever the cyclone hits, it creates a cyclone induced heavy rainfalls and ultimately creating a huge floods in this particular situations. The problem is, is there any identification mechanism that we get to know these areas will be flooded and we can do rescue evacuation operations beforehand before we like whenever we get to know an alarm that there is, there will be a cyclone and there could be a cyclone induced flood. We should know which houses to rescue first, which are the houses which can get into flood first. These particular things are very, you know, difficult to do while doing it physically. There was physically you cannot see each in every house. The best way to do it with respect to the satellite images. And in an automated way such that you get to know exact inside about each and every house and what type of risk level they are at considering different different parameters. Now for such kind of situation, what we thought right is there should be an intelligent system which can, you know, control the loss of lives and destruction to properties and we can do proactive measures for that. So if we get to know on the basis of topography of the house, previous events, what is the roof type of the house, is that house is at very low elevation level. The house is, you know, towards like very impervious surface area where water cannot percolate. Considering these particular problems, if we can make an intelligent system which can avoid such kind of losses, help disaster communities to work faster towards, you know, recovery of the process. Thinking in mind, we came up with a solution that can give house whole level risk scores to each and every house. So basically we are assigning a risk score to the house by using satellite images, different different data sets, and using Python for all of these workflow together. Now there were different different data sets which are involved. Now this system, so for any particular system to be able to run well as a model, particularly will be having different data sets. So unlike other normal machine learning kind of algorithms where you play with one kind of data set, which is say a CSV data set or Data Frame or Excel or one kind of imagery format, geospatial technology differs the most. Geospatial technology comes with a number of different types of data set as you can see here. So we need to take care about if there are any water bodies present. What is the digital elevation model which talks about topography of the surface. We also have to have high resolution satellite imageries which can help us to identify where are those exactly building footprints and how are they separated from each other. We also need to know what are the ocean boundaries and how they rise and go back over the period of last 10 years data set. We also need to know if there are any road networks, state networks through which people can be evacuated. And the last and one of the most important one is one of the satellite data which is known as Landsat data set which helps us to calculate different types of indices which includes if there is any particular vegetation and that can be extracted. If there is any particular kind of water body and if there are any impervious surfaces for all of those particular processing calculations we can use Landsat data set. So these were pretty like main components of the overall data set that we have figured out. Now how we modeled it so just don't get you know emphasized with all of this solution all together. I will create I will have a simple flow which tells what exactly modeling that we are doing. This flow particularly talks about the entire application towards the end where in which I will just came through two, three main things which is high resolution satellite imagery is the different parameters that I told you and if there are any ancillary and data sets and ground truthing. What we generally do is do data enrichment you know bring it to a deep learning spatial format level assign the classifications course run the AI model on that and pull out the results in the format of GeoJSON or household level risk which I will show in the application format as well. Now this is a simple process for so for example if you have a road network a building footprint as well as the digital elevation model slope of that particular area or the impervious surfaces vegetation we bring that all together into a system called as multi criteria decision making. So what do we generally do is on the basis of vetages we assign a risk course to each and every particular parameter that has been used here. So for example closeness to water body is more dangerous than closeness to road. So that becomes a road has less weightage than water body. So just like that we had assigned different different weightages to different input parameters and created a multi criteria decision making which is also known as like which has also a sub part as analytical hierarchy process. So we give hierarchical weights and it gives us a particular constant ratio. So there is one term called as consistency ratio for all of these particular input models the consistency ratio should be less than 10 percent. And fortunately all of these particular input weight models that we have created falls into that particular category which can give us like household level risk course like this as well as what are the parameters in terms of raster data set or the imagery format because most of the data set is in image some of the data set is in into a raster imagery format. Now let's take a quick look at results and I will scheme you through the Python snippets of the code that we have looked at. So consider for building footprint extraction we wanted to know you know take a high resolution imagery that can help us identify where are the building footprints and what is the type of the building that it is when I say type of the building it's just the roof type of the building because in countries like India and all that there will be different roof types present all across different geographies based on you know the seasons in that particular area if there are some areas where summer is more they will have different types of roofing if there are areas where cold is more they have different types of roofing. So we wanted to include different different types of roofing we included around like more than 10 to 12 roof type and then we identified the building footprints for that particular area. So this is normal satellite imagery and how one of the deep learning model classifies this particular imagery. Now these use up like our deep learning model creates polygon across like each and every particular building it has a certain accuracy which I will share it with you in the next slide. Now this is one of the example I will show the live demo of this also but say this is the live example of the final application where in which you get to see which are the houses which are in high risk or what is the risk code level for that particular house and what is the area of the house. The label is just an encoded label of the house type which I mentioned. So like we have publication of this particular current solution right now you can I will share these links if needed into the chat box but let's move on to the coding part because that's one of the more interesting part right now. So the coding part involves like four main steps and fifth as a larger part. So four main steps involves creating tiles like for example when we have a satellite imagery those imageries are kind of big in terms of size in terms of area as well because we are talking about the city level imagery. Now these particular images needs to be classified into different different image chips we converted in into 512 by 512 chips now on that particular basis we created a model which identifies like segments the building footprints and simplifies it. So whenever the building footprint is created generally the shape is not good. So there are a lot of nodes which are coming around the ages. We need to smoothen the ages and give you know normalized age related building. So building will have some instead of smooth edges it will have you know tiny ages altogether so we wanted to simplify those geometries. Lastly when we have building footprints we classify them into 10 to 15 classes that we have and towards the end once we have this building footprint data set ready we merge it with the last step which has all the other data sets which were mentioned and clubs them all together to find a flood level risk at that particular house. Now let's move on to these particular notebooks one by one and these particular notebooks I can share a link with you and or across the team over here. Now as I said the first step is to create the tiles. So what do we generally do is we feed the input to the model and we give what is the size that we require just to break that particular image into number of chips. When the chips are getting converted we are saving each and every each and every image which is created out of tip and writing it to a specific location that's the only thing that this particular notebook creates. All of this particular notebooks are run sequentially as an orchestration part so that whenever a new city part comes we can run this notebook one after the other automatically and get the results out. Now once we have the building footprints created with us what we do is this goes into more of a deep learning model or machine learning part I will will not go more deep into that I will focus on more of the Python related part right now but here what we have done is we have used efficient v6 model just to create the building footprints. I hope the screen is visible right now. Now since we have already trained models on different different building footprints we have also used some of the Kaggle examples from SpaceNet as well as like from the areas like Rio de Janeiro which is kind of similar to Indian related houses and we trained we trained a transfer learning model on that. This notebook represents how to use that particular model created and apply as a check points for the building segmentation part. These particular checkpoints are you know run on different different images that were created as a part of tiles like image chips and we are running it through the number of tiles and whatever the number of tiles which is you know it is running on it will show which tile it is showing so that we get to know how much training is how much prediction is completed on that. There is a trick to this what we had to do was one of the important thing is one of the important thing is since there are a lot of building footprints which are agglomerated to each other we need to adjust the zoom level of the imageries. So we scale up and scale down the imageries as per needed. So that was one of the key learning part because if there are a lot of buildings all together the model was not you know working well on that and was creating a whole bunch of houses together as one block we didn't want it to run. So we need to have a separated buildings for which we applied zooming in and zooming out section which takes into account this particular area where you can see that particular image clearly. Now moving on to the next part like we have also created inception v3 model for classification of these particular roof tiles. Again we feed our images for the reclassification purpose one by one and after we are done with that we have since these particular images are into the geotiff formats they are assigned with the geokey for each and every pixel. We again assign them the output to 4326 like geographic information system and output that is generated is into G adjacent format. It's just like the json format but with the geokeys attached to it. So whatever the classified outputs that we get from the image we are simply converting it into json format. Now here comes the last step where in which we are doing all the hassle together. So in flood risk modeling seems like a problem just a second okay cool. So in flood risk modeling what's the main thing that we are attempting to do is to get all of this data together and form a particular equation which can give us a risk score as analytical hierarchy process. So what are we basically trying to do is whatever the data that has been saved into this output models we are taking the boundary of the region for which we want to run this particular model onto just to get and clip our satellite images to these particular extents. Now once we have these particular geosites and boundaries for those boundaries we use overpass API just to you know extract the water bodies as well as roads layers which in turn are given with proximity scores. So what does it mean by proximity scores we convert these data sets into raster format like on the vector data set into image format and we assign distance threshold. So if there is a water body farther the house lesser the risk from the you know from the water body filling out and spreading all over. So this kind of simple technique is used for proximity analysis. So we had created distances layer which looks something like this. So see once this is a water body that we have we created different different types of buffers around this so as to get which are those areas which are under high impact. So these particular distances were taken into account through different different research papers that has been through and the ground reality is present. Now once we do this we also calculate what is the elevation in that particular area. So this is one of the region in Puri which is near to the sea level if you can see. And this gives us topographic witness index which means which areas will be you know relatively get weight faster and remain wait for the longer period of time based on digital elevation model it takes into consideration upslope and on stroke modeling. Now once we have all of this what we do is we calculate the landsat satellites different different indices which can give us vegetation as well as water bodies and if there is any built up present all of that that might look like like I will just skin you through that. So this is example of the build up index. So whatever the lighter color that you see apart from water body is kind of you know converted into say built up areas mostly. Now we can just extract those core in person impervious surfaces as well and we can assign landslide risk or if there are any landslide risk that might happen due to heavy rainfall. So considering all of this we now bring of the data footprints to the model. So what it takes into consideration is whatever the classified footprints that we have created which has a label of the house like what particular building footprint that is and the geometry which tells what is the area of the house. We convert that into raster again and we feed it to with respect to the other images that we have. So combinedly we create a threshold level score. So for example if a particular house is within 75 meters of water body it has higher risk higher the risk higher the value. So one two three four five means five has a higher value one has a lower value. Similarly we do it for all the layers that has been taken into consideration. Now once we have all of this we create a particular AHP framework like analytical hierarchy framework which crops the unnecessary parts of images and gives us the exact building footprint related raster part. Before that you can see the ventures which are given. So we have given more ventures to like building footprint areas because we want to know what is the risk to that particular house followed by building footprint area and then followed by different different parameters topographic witness index also being one of the main parameter. Now there will be some parts which are not like which are not closer to see. So in that we are not considering the ocean part. So that's the only difference between these two. Now once we have this we get such kind of areas which gives us the risk score and then we assign our risk score labels on the top of that. Now since we have a very less amount of time right now I will just quickly shift to one of the areas in down south which is in Kerala, India. If you see like there is a ocean present over here and there are a lot of houses. This particular part was eventually impacted due to one of the hazard known as Cyclone New Earth and then before that we happen to model the risk score for this particular area which is if you see is hidden into different vegetation parts as well as it's a remote area since it does not have too much agglomeration of the buildings. But it's still trying to identify most of the houses and assign a risk score to that particular house. The risk score assigned is also dependent upon the roof type. So if there are any tarpor and related roofs or CGI roofs will be at higher risk because Cyclone industry comes with heavy bins and all that. We don't have on ground level bin data so that's why we have considered roof type as one of the major proxies to that. So this is how it looks. You can select any of the particular risk level that you want to see and those will be highlighted. So this is much of it from my side. Let me know if you have any particular questions as such. I will stop the screen sharing right now or if anyone wants to know anything in detail from the particular slide let me know. So if someone has a question you can come right in the microphone or I wanted to ask a question. I will take my privilege as a session chair and because I'm not so apologised for my ignorance I'm not so I don't know so much about J-Way and technology but I wanted to know if you can describe some real case scenarios that J-Way I was used to prevent or to save actually lives. Yeah definitely. So this particular model actually helped so this we have deployed it as a real time model for a particular NGO organisation in India, the industry. There was one of the cyclones which came and hit across east ocean of India during which since they already had these particular houses which they can evacuate it was a good case with them that they help to save at least like one hundred and one hundred and seventeen lives in that particular city area. So that's one of the examples. This application has been built recently right now that will be used over the period of time and we want to increase the number of cities on which this has been applied to. We slowly want to cover most of India's part and towards the sea coastline as a first priority. And the second question as to continue this is do you think of some obstacles, some bludging things that they will not allow this technology to expand to increase its users for example in India? I couldn't hear the question clearly. So you mean to say are there any obstacles which can prevent the cyclone is it? Yeah yeah yeah exactly. Yeah so one of the main obstacles for these particular areas are generally hilly regions as I know but these particular cyclones since being in the ocean itself it has impact the cyclone does not really turn into you know land part usually but it has impact on the land in terms of rain which is heavy rainfall and that rainfall is something which is anomaly event for that particular area but it does not happen like usually in every monsoon but whenever that cyclone hits as an impact of cyclone it rains heavily due to the emotions in the ocean so that's the one of the thing. So it doesn't have any particular specific pillar or anything or a boundary to which we can stop the cyclone. I hope that I got your question as well. Yeah thank you very much and thank you very much for your presentation. We have one more question. Hi first of all thank you for your talk I was wondering in the variable your weight dictionary risk the parameters were hard coded to weights how did you determine the values of these risk parameters? Yeah definitely so for this particular parameters what we had been through is different types of research papers and we had been to these disaster management authorities they have certain kind of guidelines for that and we also had priorities like for example as I told you like water body should have more priority or the nearby roads which are impervious on which water can cannot directly percolate but flows around all over the city is important. So based on the guidance from these particular technicians as well as the research holders we came up to a particular risk matrix which is generic in terms of coastal regions so that's why they were kind of hard coded. Then we also included the conflict file which can be changed with respect to different areas as we want. Okay thank you very much. Thank you so much. Thank you very much. Any more questions? Bye. Bye bye. Bye bye. Bye bye.