FOSS4G 2022 general tracks

Philipe Borba

Cartographic Engineer. MSc. Python Dev. GIS Specialist. Deep Learning enthusiast.


Sessions

08-24
12:00
30min
Geoinformation Production Management System - A QGIS based open-source solution to nationwide geospatial data production management
Felipe de Carvalho Diniz, Philipe Borba

In the past seven years, the Brazilian Army Geographic Service has been putting effort into migrating the entire geospatial production chain into open-source. The first step was the use of PostgreSQL + PostGIS as the primary data storage solution, then the use of open standards such as OGC WMS and WFS for data sharing, then the use of QGIS as the main software for data acquisition, and finally, the development of DSGTools, QGIS plugin with several tools for data quality control and cartographic finishing.

The Geoinformation Production Management System (GPMS) comes as the latest addition to our open-source stack. It has two main goals: to manage the distribution of jobs between the staff automatically; and standardize workflows, layers, styles, tools, processes and parameters of each job.

For the first goal, the manager can create a profile for each team member, setting which parts of the workflow they are qualified to execute. When the user asks for a job, the system matches his qualifications with the available jobs on the current project and gives him the highest priority job. This, combined with the visualization of the live production status on QGIS, helps the manager improve resource allocation's decision management.

For the second goal, the manager can configure in detail each workflow, setting which database the job will be executed on, which layers the user needs to access, which styles are available for each layer, which QGIS Processes the user should run with pre-set parameters, which resources the user has access to, such as imagery and DEMs. GPMS also does the permission control in the PostgreSQL database based on the job the user currently is executing and allows spatial filtering, so the user only can work in a spatially defined subset of the data. In this way, when a user receives a job, he has everything he needs to complete it.

All the jobs information, such as user, start timestamp, end timestamp, and job parameters, are stored in the system, allowing the automatic generation of metadata compatible with Brazilian Standards and visualizations of the project's current state.

As the Brazilian Army Geographic Service has 5 Centers of Geoinformation, the use of a production management system helped with the standardization of procedures, since a standard configuration can be defined and replicated between centers to use the same consistent workflow, with the same database schema, same layers per job, same QGIS Styles, processes, parameters and so on.

The GPMS is available on Github on https://github.com/1cgeo/sap as a Node web service and requires a QGIS plugin for the client (https://github.com/1cgeo/Ferramentas_Producao) and a QGIS plugin for the manager (https://github.com/1cgeo/Ferramentas_Gerencia).

Use cases & applications
General online
08-26
14:15
30min
Building Footprint Extraction in Vector Format Using pytorch_segmentation_models_trainer, QGIS Plugin DeepLearningTools and The Brazilian Army Geographic Service Building Dataset
Philipe Borba

Building footprint extraction is a popular and booming research field. Annually, several research papers are published showing deep learning semantic segmentation-based methods to perform this kind of automated feature extraction. Unfortunately, many of those papers do not have open-source implementations for public usage, making it difficult for other researchers to access those implementations.

Having that in mind, we present DeepLearningTools and pytorch_segmentation_models_trainer. Both are openly available implementations of deep learning-based semantic segmentation. This way, we seek to strengthen the scientific community sharing our implementations.

DeepLearningTools is a QGIS plugin that enables building and visualizing masks from vector data. Moreover, it allows the usage of inference web services published by pytorch_segmentation_models_trainer, creating a more feasible way for QGIS users to train Deep Learning Models.

pytorch_segmentation_models_trainer (pytorch-smt) is a Python framework built with PyTorch, PyTorch-Lightning, Hydra, segmentation_models.pytorch, rasterio, and shapely. This implementation enables using YAML files to perform segmentation mask building, model training, and inference. In particular, it ships pre-trained models for building footprint extraction and post-processing implementations to obtain clean geometries. In addition, one can deploy an inference service built using FastAPI and use it in either web-based applications or a QGIS plugin like DeepLearningTools.

ResNet-101 U-Net Frame Field, ResNet-101 DeepLabV3+ Frame Field, HRNet W48 OCR Frame Field, Modified PolyMapper (ModPolyMapper), and PolygonRNN are some of the models available in pytorch-smt. These models were trained using the Brazilian Army Geographic Service Building Dataset (BAGS Dataset), a newly available dataset built using aerial imagery from the Brazilian States of Rio Grande do Sul and Santa Catarina. Pytorch-smt also enables training object detection and instance segmentation tasks using concise training configuration.

This way, considering the aforementioned, this talk presents the usage overview of both technologies and some demonstrations. Using metrics like precision, recall, and F1, we assess the results achieved by the implementations developed as a product of our research, showing that they have the potential to produce vector data more efficiently than manual acquisition methods.

DeepLearningTools is available at the QGIS plugin repository, while pytorch_segmentation_models_trainer is available at Python Package Manager (pip). The Brazilian Army Geographic Service develops both solutions, making their codes available at https://github.com/phborba/DeepLearningTools and https://github.com/phborba/pytorch_segmentation_models_trainer.

Use cases & applications
Room 4