 Good afternoon, everybody. I'm Giuseppe Camerota. I work at Biopen Solution. It's a company that works with satellite imagery and more in general with geospatial data, and it's located in Rome. So I'm gonna talk about activity map from space supporting mine clearance with Python. So there are these four topics that we are going to talk about, activity map. What's the activity map is? Why it is from space? What's a mine clearance? Mine clearance, and what's Python? So let's start from the end. What's Python? Does anybody knows what Python is? You better say yes, because I put this slide just for the sake of completeness. So let's go to the mine clearance. And mine clearance is the process of searching and removing land mines from the ground. It has some weakness, a couple of weakness that will show them. First weakness, mine clearance is low. It's a very slow process. You have this wide, this huge area you have to clean from land mines, and nobody will tell you where the mines are on the ground. And national army are not so collaborative in this topic. Nobody likes to admit that they deploy land mines. So you have this huge area you have to search for land mines on. Then these huge areas you have to check for land mines step by step, spot by spot, very slow. It's a very slow process. You are always in danger, is low. When you are close by to what you think it's a mine, you have to approach it very slowly, try to clean the area around it. Finally, reach it and try to remove it. Like very slowly for obvious reason. Another problem of mine clearance is that, as I said, is dangerous. Injuries happens more often than you might think, even within professionals. This is why at some point they thought about using animals to search for land mines, to sniff them. And at first they try in using dogs, but sometimes you just need a weight of one kilo and a half to detonate a land mine. So it's dangerous also for dogs. So a couple of years ago they start using rats for searching land mines. They weigh just a few hundred grams and they have a brilliant mel, so they seem perfect. And there are more rat killed for searching for cheese and trapped by a trap that during this project actually is true. Zero rat have been killed during this job, but we can do better if we go in the space. I mean, where earth is plenty of sudden light with huge capabilities. This is a simulation of the Italian constellation Cosmos Chimed. It produces radar images that are the ones that have been used for this job. The constellation is formed by four satellites and they travel at between 600 and 700 kilometers from the ground, so they will be safe from land mines. And they complete a single orbit in 90 minutes. So every 90 minutes they complete an orbit around the earth. So they are fast as well. They seem to cover to fix the problem of land mines. So as I said they produce radar images that is a coherent sensor, so you have both information about the amplitude of the signal and the phase of the signal and we are going to use both of them. So let's go to what an activity map is. So an activity map is a map that gives information about the activities that goes over a certain area. For activities it is meant like everything that produces changes on the ground. I mean, if you build a new site or if you just remove trees or the best part, if you use a road, if your roads are used, you can say that there is activity and you can see it from satellite. So basically an activity map classifies areas based on the level of activity. In this case the green areas are the ones that are active and the red ones are not so visible, but the little red dots are the areas where there is no activity. This is very important for land mines because if there is activity on the ground you can say that the area is safe, otherwise the mine would have been blasted. So this is a very good information. And about the velocity of the process, this is an example of an area in Bosnia and it is 5 km by 4 km, so we are talking about 20 km2 that will take ages to check completely, I would say a month. But we can reduce this time, just overlaying on top of this an activity map. So you can tell immediately why you don't need to go to search for land mines where it's green because something has happened here and you know that it's safe. And you can focus your effort on searching for land mines on the other zone where there is no information about it. So what do we use to produce an activity map? We use radar images, as I said, so this is an example of an amplitude of a radar image. This is 10 by 10 km, with a resolution of 1 m. This was taken on the 18. of July 2014, it is over Dolak area, that is a city in Bosnia, Herzegovina. Then with at least a second image, just to compare with the first, this one was taken on the 3. of August 2014, in this way you can search for changes. Then using faces of these two images, you can compute what we call interferometry coherence, that basically tells where things have changed between the two images. The darker the pixel is, the area has changed, this is the scale. So where it is white, there is a city there, so they are mostly buildings, they are keeping the same between the two images. While where it is dark is mostly vegetated area, so leaves moves and you can see that things have changed, so it's very dark. The things that we use to compute activity map is what we call coherent changes. So these are the changes that you can see, just comparing the amplitude. So the interferometry coherence, I showed you in the slide before, it was computing, it was done using the faces of the images. This is an RGB color composite images, which means that in the red layer has been put the first images, the one taken on the 18th of July, and in the green and the blue layers has been put the second images. So if the two amplitude would have been the same, you would have seen totally black and white images. But since you see some reddish part and some cyan color, that means that in that zone, where is red, for example, the amplitude of the image in the red layer is higher, is brighter, there in the cyan, so that's why you see red. So in this way you can see some changes, already comparing the amplitude. Then if we do the same with another kind of RGB composite images, so it's just using the coherence in the blue layer instead of the amplitude, you can produce these uncoherent changes that has more detailed information. In fact, we use these to produce what we call land use and a layer called land use or land cover that tells you in a semi-automatic way what is on the area you are seeing. For example, you can detect where the water is, where the urban area are, where the soil is, grass, trees, and so on. And we use also this layer to produce an activity map. So the steps for producing an activity map. First of all, once you have the data, you have to stretch it and filter it. So just using NumPy here and some stretching function, like a square root function or a linear stretching, and then filtering it with function from SciPy library. Here, what we do is basically build the histogram of the images, and then decide where to cut the dynamic of the signal, like deciding where the left bound has to be, where the right bound has to be, and then compute the stretching in this new dynamic. Just to show the effect of this step, this is the data input of the steps. So before wrapping any stretch or any filter, this is the same image once it's been stretched and filtered. So every feature in the images is more recognizable. You can see fields, roads, houses, and trees. Then the second step, that is the changes classification. This is a very simple code, we say, with just one instruction in the for loop, we can classify all the images. We just decide where are the thresholds for deciding which class every pixel belongs, and then we launch these for loops. Again, an example of this. This is the input images of this step, is the coherent, interferometric coherence, I showed you before. It goes from zero to one, meaning zero there is no coherence at all, as I said, so there is totally has changed. One is full coherent, so everything has skipped the same between the two images. After the classification projects, you just have a classificated images. Here there are six classes, where zero is no data, it's outside the images. Then there is the third step, that is the combination between the changes classification and the land cover, land use layer, that I talked about it before. This is because if you can detect a change, if this has happened over a road, is a different meaning if it has happened on the water or if it has happened over a vegetated area. So this is just a very simple, I would say a new classification that take this aspect into account. So there are, for example, classes like three, that is water, that will always be safe. No one put land mines in the water or in the urban classes, it means that there is a building, no one put land mines under a building. And then, again, you just have this new classification, so that takes into account this thematic information of the area. This is, again, an example of what these steps does on data. So this is the first input, the coherence and the change images. Together with the changes and use layer input. And then, this is the output, is the matrix, this is the array of the activity map with a classification. So you can see that the cyan roads, for example, are not active, so you have to search there. While the red zone are active, so you don't need to go there and then there is this yellowish part where the process we are applying is not applicable. That is because of some intrinsic limit of the radar signal. And it can be solved using some other kind of sensor, like optical or infrared, thermal infrared and so on. That can be added to this product. I'm not showing it now, but you can do it. Then, the final step. Once you have the matrix with the activity map, you just have to add the geographical information and Jidal library does brilliantly this job. It's a very simple code. So this is the step to pass from these. It is just a matrix with a value and the color associated to it, to this. So a layer with geographical information that can be used by professionals, can be used on Google Earth or every Giz software is in commerce, like ArcGiz, QGiz. So just for concluding my talk, I will just find some final remarks. The activity map is a second level product that is supposed to help to support mind clearance professionals, trying to reduce time and some money invested in this process and to reduce the danger of doing such a job. This activity map is a product that was developed in the frame of an European Space Agency project called Space Asset for Enhancing the Mining and this project is going to be tested in real field next September in Sarajevo. I'm done. Thank you very much. Have questions? So my question is less about Python and more about the data sources. How widely available are these remote data sources? Did you have to, I guess, make special requests to get coverage or is the data from every pass, every day, somewhere available? Well, you mean the satellite images? Well, this data source, you have to get in contact with the company that produces this data. You just ask for them, you place an order, you say, and it's fixed. So the satellite will pass over the area of your interest just in that date and then it will keep passing for 24 hour in the same point. Just because the satellite keep orbiting around the Earth, the Earth is under it that is rotating. So after 24 hours there will be the same configuration again. You need the same configuration to compute the coherent images because you need the phase. So you need that the satellite has to be in the same position and you get the same geometry of the images. You could have at minimum at least four images a day on the same area but they will not be on the same geometry. I mean, what I'm saying is that satellite is looking under Earth from a point of view. Then after 90 minutes the orbit is complete and the satellite is again in same position but the Earth is slightly rotated. So it will just see, it sees again the same area but just with another angle. So if you want just to see the area you can do it at least, I said four times a day. It depends on the latitude. On the north you go from the equator the more passes you have. But you just can do the phases analysis using images that have been taken with the same geometry. So that's why you just have to wait for 24 hours for the second and third images. Need more questions? Ok, so thank you Giuseppe. Thank you again.