The Institut Cartogràfic i Geològic de Catalunya (ICCG) is the regional mapping agency in Cataluña and one of the largest mapping agencies in Spain. They are in charge of capturing, processing, and publishing imagery and imagery derivative data into their open data portal. Once a year, they fly over the entire region of Cataluña to capture and deliver up-to-date imagery services. One of the goals of ICGC is to quickly process large building change detection workflows and the extent of their captured imagery. This blog article covers one of the approaches you can take to accomplish change detection using deep learning in ArcGIS. ICGC made the imagery services available for this use case.
Change detection is a common workflow for most, if not all, mapping agencies. It is traditionally time- and resource-consuming, which presents a challenge in keeping basemaps up to date.
Deep learning tools in ArcGIS and pretrained models available in ArcGIS Living Atlas of the World can be a core piece in an end-to-end change detection workflow, and they can help your analysis and visualization results provide important insights. This example uses aerial imagery from 2018 and 2022 (courtesy ICGC).
This workflow shows how to overcome deep learning challenges and implement best practices. It is mainly focused on imagery management, how to improve a traditional deep learning approach, and how the multiple resolution approach can help you improve results.
Imagery management
Today, organizations are dealing with a large amount of data. This allows you to see an updated overview of what is happening—for example, the areas of urban expansion or how much a city has grown in the last 10 years, among other questions. But having lots of data can also present a big challenge: how to manage and access this large volume of imagery.
The first step of any deep learning workflow is data preparation and image management.
ICGC’s initial data included two sets of imagery for 2018 and 2022 in GeoTIFF format in 8 bits and 3 bands. Resolution was 0.25 meters and data size for the entire source was 110 GB, which is challenging if you need to share locally stored information across an organization.
First, create a mosaic dataset for each year collection for your imagery. These are used to manage, display, analyze, serve, and share imagery and raster data.
You can share data with people inside or outside of your organization by creating a map tile package in ArcGIS Pro. This is recommended for deep learning with RGB band imagery you need to share. In this example, a tile package was created and uploaded to ArcGIS Online.
By creating a map tile package, you can reduce the size of the data, which allows you to share it.
Now that you have prepared the data, you can get started with deep learning.
Use deep learning with the traditional approach
Once you have the data prepared, the second step is defining the approach that you will use. With Living Atlas pretrained models, you can achieve high-quality results and a reliable estimation of changes. Following this approach, you can avoid the need to train a model, which eliminates the steps of labeling, data preparation, and model training that involve imagery requirements and massive computing requirements.
One of these pretrained models is Building Footprint Extraction, which allows you to capture the buildings from aerial imagery and identify areas that have been built in the last four years.
To do that, this example shows inference in both imagery (2018 and 2022) and subtracts the results to get new buildings.
This allows you to get the best picture of changes and is faster since it is using a pretrained model.
Next, you will explore the traditional way to perform object detection.
Open the Detect Objects Using Deep Learning tool, add the input raster for inference, and select the downloaded deep learning package model from Living Atlas.
In a common workflow, you would leave the default tool parameters, but you can adjust the batch size, tile size, threshold, and more. See the Multiresolution Object Detection with Text SAM blog article for details about parameters.
The image shows the results of running the tool without adjusting the parameters. There are still some missed buildings, which is the second challenge.
Deep learning with multiple resolutions
At this point, you must decide if you will train a model or fine-tune the previous one. But there is still another option to consider before you train a new model. Adjusting the parameters can optimize the accuracy of your results and improve the outputs.
Why adjusting parameters can be crucial to get better results
Usually, the better resolution the better results you will get. However, while better resolution could allow you to capture smaller buildings, if you want to capture bigger size buildings, you may miss some buildings using the smallest cell size. Sometimes, the coarser resolution could be better to capture bigger size buildings.
In use cases like this in which you are detecting buildings, a model can deliver better results at multiple scales, as shown in the following images:
For this reason, multiple resolution deep learning is recommended for this kind of workflow.
Use deep learning with multiple resolutions
There is one essential parameter to ensure best results: Cell Size. The model that you are using was trained with data between 10 and 40 centimeters of resolution, but the imagery in the example is 25 centimeters. You can adjust this parameter to process using resampled imagery to 30, 40, and 50 centimeters.
If you overlay these three layers (results of running the tool at three cell sizes), you have a better and more complete picture of the buildings.
Once the model raw outputted features are extracted, improve the results with a wide range of data cleaning and data editing geospatial analysis tools in ArcGIS Pro. Running a quality assurance/quality control (QA/QC) workflow over the output data will guarantee that you move your data from intermediate fuzzy outputs to more production ready data. Using tools and capabilities such as Filter features with definition queries, Non Maximum Suppression (Image Analyst), Regularize Building Footprint (3D Analyst) and Fill Gaps (Topographic Production) will help you enhance the raw results of a feature extraction workflow. In the case of ICGC, buildings detected with an area larger than 4,500 square kilometers are filtered out. Regularization and Non Maximum Suppression were used too.
After getting a detailed view of the process to reach useable building features extracted through pretrained models, you see there are many tools and parameters to keep in mind in order to reach acceptable results. ArcGIS supports tool development with ArcPy and ArcGIS Python API libraries so you can automate the entire workflow of extracting buildings at multiple resolutions and then performing the needed QA/QC at once.
To extract the final features from the example data in this blog article, you can use the custom MultiResolutionDL geoprocessing tool. For more detailed information about how it works and parameters included in it, consult the Multiresolution Object Detection with Text SAM blog article.
Using this workflow allowed you to use ArcGIS Living Atlas Deep Learning models out of the box and allowed you to avoid going through a reinforcement learning or training a new model workflow.
Final results
To put all the above together, see the image below. It illustrates the two final 2018 and 2022 building layers in Cataluña and the detected change between them.
The benefits of this workflow can reach beyond the direct technical team that saved a large amount of time by automating the change detection workflow. In this example, the ICGC organization now has an updated image of the building footprints in their region. This will allow them to go beyond GeoAI and gather additional analysis-driven insights of new areas of development, urban density, and more.
Below, you will find examples of how ArcGIS offers commercial-off-the-shelf technology, such as ArcGIS Dashboards, to disseminate the results and share them with stakeholders.
View the Detección de Cambios Cataluña 2018-2022 dashboard
In this blog article, you learned how ArcGIS provides an end-to-end solution to tackle current global challenges—such as a changing urban area, landcover, or other visible features—through imagery.
Special thanks to my colleague Catalina Escudero Muñoz and Esri Spain. Without their contributions in running, writing, and sharing this proof of concept, it wouldn’t have been possible to share this blog post.
Article Discussion: