Publication Date: 2021-02-15
Approval Date: 2021-02-10
Submission Date: 2020-11-20
Reference number of this document: OGC 20-015r2
Reference URL for this document: http://www.opengis.net/doc/PER/t16-D015
Category: OGC Public Engineering Report
Editor: Panagiotis (Peter) A. Vretanos
Title: OGC Testbed-16: Machine Learning Engineering Report
COPYRIGHT
Copyright © 2021 Open Geospatial Consortium. To obtain additional rights of use, visit http://www.ogc.org/
WARNING
This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, any OGC Public Engineering Report should not be referenced as required or mandatory technology in procurements. However, the discussions in this document could very well lead to the definition of an OGC Standard.
LICENSE AGREEMENT
Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.
If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.
THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD. THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.
This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications.
This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.
None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported in violation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable.
- 1. Subject
- 2. Executive Summary
- 3. Standard and/or Domain Working Group review
- 4. References
- 5. Terms and definitions
- 6. Abbreviated terms
- 7. Overview
- 8. Scenario
- 9. Infrastructure overview
- 10. Training, deployment and execution of machine learning models
- 11. Visualization of ML Results
- 12. Research questions
- 12.1. Overview
- 12.2. Does ML require "data interoperability"?
- 12.3. Where do trained datasets (i.e. trained model and training datasets) go and how can they be re-used?
- 12.4. How can we ensure the authenticity of trained datasets?
- 12.5. Is it necessary to have analysis ready data (ARD) for ML?
- 12.6. What is the value of datacubes for ML?
- 12.7. How do we address interoperability of distributed datacubes maintained by different organizations?
- 12.8. What is the potential of MapML in the context of ML?
- 12.9. How to discover and run an existing ML model?
- 13. Issues
- Appendix A: Revision History
- Appendix B: Bibliography
1. Subject
This engineering report describes the work performed in the Machine Learning Thread of OGC’s Testbed-16 initiative.
Previous OGC testbed tasks concerned with Machine Learning (ML) concentrated on the methods and apparatus of training models to produce high quality results. The work reported in this ER, however, focuses less on the accuracy of machine models and more on how the entire machine learning processing chain from discovering training data to visualizing the results of a ML model run can be integrated into a standards-based data infrastructure specifically based on OGC interface standards.
The work performed in this thread consisted of:
-
Training ML models;
-
Deploying trained ML models;
-
Making deployed ML models discoverable;
-
Executing an ML model;
-
Publishing the results from executing a ML model;
-
Visualizing the results from running a ML model.
At each step, the following OGC and related standards were integrated into the workflow to provide an infrastructure upon which the above activities were performed:
-
OGC API - Features: Approved OGC Standard that provides API building blocks to create, retrieve, modify and query features on the Web.
-
OGC API - Coverages: Draft OGC Standard that provides API building blocks to create, retrieve, modify and query coverages on the Web.
-
OGC API - Records: Draft OGC Standard that provides API building block to create, modify and query catalogues on the Web.
-
Application Deployment and Execution Service: Draft OGC Standard that provides API building blocks to deploy, execute and retrieve results of processes on the Web.
-
MapML is a specification that was published by the Maps For HTML Community Group. It extends the base HTML map element to handle the display and editing of interactive geographic maps and map data without the need of special plugins or JavaScript libraries. The Design of MapML resolves a Web Platform gap by combining map and map data semantics into a hypermedia format that is syntactically and architecturally compatible with and derived from HTML. It provides a standardized way for declarative HTML content to communicate with custom spatial server software (which currently use HTTP APIs based on multiple queries and responses). It allows map and map data semantics to be either included in HTML directly, or referred to at arbitrary URLs that describe stand-alone layers of map content, including hyper-linked annotations to further content.
-
Particular emphasis was placed on using services based on the emerging OGC API Framework suite of API building blocks.
|
Note
|
This ER does not cover the specific details concerning the discovery and reusability of training data sets. A complete description of this topic can be found in the D016 Machine Learning Training Data Engineering Report. |
2. Executive Summary
2.1. Business statement
The integration of Machine Learning (ML) tools into a framework composed of catalogues, data access services and data processing services that comply with OGC standards can result in a ML processing chain that can extract knowledge and insight from the vast amount of geospatial data being collected and deployed in cloud platforms.
2.2. Goals
The OGC Testbed-16 goals for the Machine Learning Thread are:
-
Discovery and reusability of data used to train predictive ML models.
-
The integration of predictive ML models into a standards-based data infrastructure.
-
Cost-effective visualization and data exploration technologies based on the use of the Map Markup Language (MapML).
2.3. Scenario / Use-cases
These goals are explored and addressed using the backdrop of a wildland fires scenario.
Wildland fires are those that occur in forests, shrublands and grasslands. While representing a natural component of forest ecosystems, wildland fires can present risks to human lives and infrastructure. Being able to properly plan for and respond to wildland fire events is thus a critical component of forestry management and emergency response.
Appropriate responses to wildland fire events benefit from planning activities undertaken before events occur. ML presents a new opportunity to advance wildland fire planning using diverse sets of geospatial information such as satellite imagery, Light Detection and Ranging (LiDAR) data, land cover information and building footprints. As much of the required geospatial information is available using OGC standard interfaces and encodings, a requirement exists to understand how well these standards can support ML in the context of wildland fire planning. Testbed-16 explored how to leverage ML, cloud deployment and execution, and geospatial information, provided through OGC standards, to improve planning approaches for wildland fire events. Findings inform future improvement and/or development activities for OGC Standards, leading to improved potential for the use of OGC standards within an infrastructure that includes ML applications.
Advanced planning for wildland fire events can greatly improve the ability of first responders to address a situation. However, accounting for the many variables (e.g. wind, dryness, fuel loads) and their combinations that will be present at the exact time of an event is very difficult. As such, there is an opportunity to evaluate how ML approaches, combined with geospatial information delivered using OGC Standards, can improve response planning throughout the duration and aftermath of wildland fire occurrences.
Thus, in addition to planning related work, Testbed-16 explored how to leverage ML technologies for dynamic wildland fire response. The planned work provided insight into how OGC Standards can support wildland fire response activities in a dynamic context. Any identified limitations of existing OGC Standards were documented and will be used to plan improvements to these frameworks. The Testbed was also an opportunity to explore how OGC Standards may be able to support the upcoming Canadian WildFireSat mission.
|
Important
|
Though this task uses a wildland fire scenario, the emphasis is not on the quality of the modelled results, but on the integration of externally provided source and training data, the deployment of the ML model on remote clouds through a standardized interface, and the visualization of model output. |
2.4. Research questions
This ER addresses the following research questions:
-
Does ML require "data interoperability"? Or can ML enable "data interoperability"?
-
How do existing and emerging OGC Standards contribute to a data architecture flow towards "data interoperability"?
-
Is it necessary to have analysis ready data (ARD) for ML? Can ML help ARD development?
-
What is the value of datacubes for ML?
-
How do we address interoperability of distributed datacubes maintained by different organizations?
-
What is the potential of MapML in the context of ML? Where does it need to be enhanced?
-
How to discover and run an existing ML model?
2.5. Primary findings
The answers to the research questions can be found in the Research questions section. The following additional findings of the ML thread in OGC Testbed-16 are noted:
-
The use of catalogues, data access services and data processing services that comply with OGC standards facilitates the modular deployment and expandability of ML processing chains.
-
While the older OGC W*S services (e.g. WMS, WMTS, WFS, CSW, etc.) can be suitably integrated into the processing chain, the newer OGC API interfaces are easier to use and easier to integrate into a ML processing chains.
-
The OGC API - Tiles interface is a good candidate for model training as both value datasets and label datasets can be retrieved.
-
The older WMS interface can also be used for model training but relies on the existence of optional capabilities (i.e. LegendURL and GetStyles) in the service instances being used.
-
The OGC API - Records interface offered a high level of flexibility, allowing both the discovery of training datasets and providing the binding information necessary for data extraction by a ML algorithm. The catalogue is capable of harvesting repositories of different typologies and to list the relevant information for ML applications. This is an emerging OGC standard that can potentially contribute to a data architecture flow towards "data interoperability".
-
Using Docker to encapsulate both trained ML models as well as the entire processing chain facilitated testing the processing chain, as well as scaling it in production.
-
The use of Application Deployment and Execution Service (ADES) and Execution Management Service (EMS) allows the dynamic deployment of trained models encapsulated in Docker containers and provides a consistent interface for executing ML models and retrieving the results of processing. Those results can be persistently stored for use by downstream actors.
-
There are plenty of development libraries available that implement support for OGC standards. Conveniently for the ML domain, numerous Python libraries with OGC standards support exist.
2.6. Future work
The following future-work items where identified:
-
Data Authenticity: This aspect needs to be investigated in order to be sure that the model is trained and inferred with authentic data (the issue of data tampering in satellite imagery was also noted).
-
Analysis Ready Data (ARD): Another important aspect to take into consideration when the framework deals with different data sources like datacubes where some data could be already in ARD format and some other not.
-
ONNX check points: for the time being the actual model stores its checkpoints in native format, but it could be useful to take into consideration the Open Neural Network eXchange (ONNX) format.
-
Training dismissal: another important aspect to be covered is the expected behavior in case it is required to interrupt the training. For instance, all the intermediate training has to be maintained or not?
3. Standard and/or Domain Working Group review
3.1. Overview
The Machine Leaning (ML) thread participants and sponsors believed that the work of the ML task is relevant to work being done in the OGC Standards and Domain Working Groups (SWGs, DWGs) listed below. A request for review of this ER by the SWG/DWG members was forwarded to the working groups by the editor.
3.2. Artificial Intelligence in Geoinformatics (GeoAI) DWG
The Artificial Intelligence in Geoinformatics (GeoAI) DWG is chartered to identify use cases and applications related to Artificial Intelligence (AI) in geospatial domains and focused on the Internet-of-Things (e.g., healthcare, smart energy), robots (e.g., manufacturing, self-driving vehicles), or ‘digital twins’ (e.g., smart buildings and cities). This DWG provides an open forum for broad discussion and presentation of use cases with the purpose of bringing geoscientists, computer scientists, engineers, entrepreneurs, and decision makers from academia, industry, and government together to develop, share, and research the latest trends, successes, challenges, and opportunities in the field of AI with geospatial data. The working group aims to investigate the feasibility and interoperability of OGC standards in incorporating geospatial information with AI and describe gaps and issues which can lead to new geospatial standardization to advance trustworthiness and accountability for this domain community. Furthermore, existing OGC Web Services need to be carefully examined for changes that may need to be made in the context of AI-empowered applications. As some AI methods are already included in OGC standards, it is expected that AI methods will also impact many OGC standards in the future. For example, routing services have not yet been built according to human-centered AI, despite some suggestions to extend the Open Location Services (OpenLS) standard.
The goal of the ML task in Testbed-16 is to explore how to leverage ML through OGC standards to improve planning approaches for wildland fire events and this seems to align with the goals of a GeoAI DWG especially as it relates to incorporating and integrating geospatial information with AI.
3.3. Document contributor contact points
All questions regarding this document should be directed to the editor or the contributors:
Contacts
| Name | Organization | Role |
|---|---|---|
Panagiotis (Peter) A. Vretanos |
CubeWerx Inc. |
Editor |
Samuel Foucher |
CRIM |
Contributor |
Francis Charette-Migneault |
CRIM |
Contributor |
Matthes Rieke |
52°North |
Contributor |
Andrea Cavallini |
RHEA Group |
Contributor |
Nicola Lorusso |
RHEA Group |
Contributor |
Valerio Fontana |
RHEA Group |
Contributor |
3.4. Foreword
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.
Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.
4. References
The following normative documents are referenced in this document.
5. Terms and definitions
For the purposes of this report, the definitions specified in Clause 4 of the OWS Common Implementation Standard OGC 06-121r9 shall apply. In addition, the following terms and definitions apply.
- ● container
-
a software package that contains everything needed to run a program or application; this includes the executable program as well as system tools, libraries, and settings
- ● convolutional neural network (CNN)
-
a class of deep neural networks commonly applied to analyzing visual imagery
- ● deployment
-
a trained model available for execution behind a standardized API; in OGC this standardized API is defined by the OGC API - Processes specification with extensions.
- ● Docker
-
a software platform for building applications based on containers
- ● model inference
-
refers to the process of taking a machine learning model that has already been trained and using that trained model to make useful predictions based on new data
- ● trained model
-
providing a machine learning algorithm with known data from which it can learn; the model artifact created by the training process is called a trained model
6. Abbreviated terms
-
ADES - Application Deployment and Execution System
-
AI - Artificial Intelligence
-
API - Application Programming Interface
-
ARD - Analysis Ready Data
-
CNN - Convolutional Neural Networks
-
CRIM - Computer Research Institute of Montréal
-
CRS - Coordinate Reference System
-
CSW - Catalogue Service for the Web
-
CWL - Common Workflow Language
-
DL - Deep Learning
-
ER - Engineering Report
-
EMS - Execution Management System
-
HTTP - Hypertext Transfer Protocol
-
JSON - JavaScript Object Notation
-
LiDAR - Light Detection and Ranging
-
MapML - Map Markup Language
-
ML - Machine Learning
-
OGC - Open Geospatial Consortium
-
ONNX - Open Neural Network Exchange Format
-
OWS - OGC Web Services
-
Pub/Sub - Publication/Subscription
-
REST - Representational State Transfer
-
RNN - Recurrent Neural Network
-
SAR - Synthetic Aperture Radar
-
TIE - Technology Integration Experiments
-
URL - Uniform Resource Locator
-
VCS - Version Control Systems
-
WCS - Web Coverage Service
-
WES - Web Enterprise Suite
-
WFS - Web Feature Service
-
WMS - Web Map Service
-
WPS - Web Processing Service
-
WPS-T - Transactional Web Processing Service
7. Overview
The "Scenario" section provides a detailed description of the scenario and use cases used to drive the participants' implementations.
The "Infrastructure overview" section provides background information about ML and Deep Learning (DL) as well as some of the underlying OGC technologies such as the Application Deployment and Execution Service (ADES) which is an emerging technology developed in OGC Testbeds 13, 14 and 15.
The "Training, deployment and execution of machine learning models" section describes how machine learning models were deployed via existing and emerging OGC APIs in the ML task. Specifically the clause describes how ML models are packaged into containers and deployed via an ADES.
The "Visualization of ML Results" section describes how MapML was used to visualize and interact with geospatial information within a web browser.
The "Research questions" section attempt to answer research-questions originally expressed in the OGC Testbed-16: Call for Participation (CFP) based on the experiences of the thread participants.
The "Issues" section provides a summary of the issues discussed during the Testbed.
8. Scenario
8.1. Overview
The Machine Learning task scenario addresses two phases of wildland fire management,
-
Wildland Fire Planning
-
Wildland Fire Response.
For both scenarios, various steps of training and analysis data integration, processing and visualization were performed as outlined below. The scenarios serve the purpose of guiding the activity through the various steps in the two phases of wildland fire planning and response. The scenarios help to ground all work in a real-world situation.
The Wildland fire planning scenario includes the following major steps:
-
Investigate the application of different ML frameworks (e.g. Mapbox RoboSat, Azavea’s Raster Vision, GeoDeepLearning) to multiple types of remotely sensed information such as synthetic aperture radar, optical satellite imagery, and LiDAR. Access to these data sources was provided through OGC standards. The focus was to identify fuel availability within targeted forest regions.
-
Explore interoperability challenges related to ML training data. Develop solutions that allow the wildland fire training data, test data, and validation data be structured, described, generated, discovered, accessed, and curated within data infrastructures.
-
Explore the interoperability and reusability of trained ML models to determine potential for applications using different types of geospatial information. Interoperability, reusability and discoverability are essential elements for cost-efficient ML. The structure and content of the trained ML models have to provide information about its purpose. Questions such as: “What is the ML model trained to do?” or “What data was the model trained on?” or “Where is the model applicable?” need to be answered sufficiently in order to provide guidance on the appropriate use of a model. For example, models trained with data from a specific area that contains a specific features profile (e.g. forested land) may not be appropriate for use in another area with a different features profile (e.g. grassland). Interoperability of training data should be addressed equivalently.
-
Deep Learning (DL) architectures can use LiDAR to classify field objects (e.g. buildings, low vegetation, etc.). These architectures mainly use the TIFF and ASCII image formats. Other DL architectures use 3D data stored in a raster or voxel form. However, 3D voxels or raster forms may have many approximations that make classification and segmentation vulnerable to errors. Therefore, Testbed-16 participants should apply advanced DL architectures directly to the raw point cloud to classify points and segments of individual items (e.g. trees, etc.). The PointNET architecture for this or propose different approaches should be investigated. If different DL architectures are proposed, an alternative to PointNET could be considered.
-
Leverage outcomes from the previous steps to predict wildland fire behavior within a given area through ML. Incorporate training of ML using historical fire information and the Canadian Forest Fire Danger Rating system (fire weather index, fire behavior prediction) leveraging weather, elevation models, fuels.
-
Using ML to discover and map suitably sized and shaped water bodies for water bombers and helicopters.
-
Investigate the use of ML to develop smoke forecasts based on weather conditions, elevation models, vegetation/fuel and active fires (size) based on distributed data sources and datacubes using OGC standards.
The Wildland fire response scenario includes the following major steps:
-
Explore ML methods for identifying active wildland fire locations through analysis of fire information data feeds (e.g. the Canadian Wildland Fire Information System, the United States Geological Survey LANDFIRE system) and aggregation methods. Explore the potential of MapML as an input to the ML process and the usefulness of a structured Web of geospatial data in this context.
-
Implement ML to identify potential risks to buildings and other infrastructure given identified fire locations. Consider the potential for estimating damage costs.
-
Investigate how existing standards related to water resources (e.g. WaterML, Common Hydrology Features (CHyF), in conjunction with ML, can be used to locate potential water sources for wildland fire event response.
-
Develop evacuation and first responder routes based on ML predictions of active fire behavior and real-time conditions (e.g. weather, environmental conditions).
-
Based on smoke forecasts and suitable water bodies, determine if suitable water bodies are accessible to water bombers and helicopters.
-
Explore the communication of evacuation and first responder routes, as well as other wildland fire information, through Publication/Subscription (Pub/Sub) messaging.
-
Examine how ML can be used to identify watersheds/water sources that will be more susceptible to degradation (e.g. flooding, erosion, poor water quality) after a fire has occurred.
-
Identify how OGC standards and ML may be able to support the goals of the upcoming Canadian WildFireSat mission.
8.2. Components
The following diagram provides an overview of the main work items for this task. The diagram is structured to show the training data at the bottom, existing platforms and corresponding APIs to the left, and Machine Learning models and visualization efforts to the right.
The following overarching research questions further helped to guide the work in this task:
-
Does ML require "data interoperability"?
-
Or can ML enable "data interoperability"?
-
How do existing and emerging OGC standards contribute to a data architecture flow towards "data interoperability"?
-
-
Where do trained datasets go and how can they be re-used?
-
How can we ensure the authenticity of trained datasets?
-
Is it necessary to have analysis ready data (ARD) for ML? Can ML help ARD development?
-
For the purposes of serving the data from OGC API sources such as coverage server the data needs to be orthorectified
-
This is probably true for ML models as well
-
-
What is the value of datacubes for ML?
-
How do we address interoperability of distributed datacubes maintained by different organizations?
-
What is the potential of MapML in the context of ML?
-
Where does it need to be enhanced?
-
-
How to discover and run an existing ML model?
9. Infrastructure overview
9.1. Introduction
A primary task of this thread was to explore the use of existing and emerging OGC APIs to enable a processing chain that starts with discovering training data for a specific purpose and ends with a deployed ML model that can be executed and its results visualized using a browser.
The following components diagram shows the interactions of the various ML and OGC components used in the thread:
This diagram covers all the components except those related to training data which are discussed in detail in the D016 Machine Learning Training Data ER.
This section provides a brief overview of each of the OGC components that were integrated to create an infrastructure upon with the activities of the testbed where performed.
9.2. Functional description
A summary of Application Deployment and Execution Service (ADES) and Execution Management Service (EMS) can be found in the OGC Testbed-14: ADES & EMS Results and Best Practices Engineering Report (OGC 18-050r1).
9.2.1. Dockerization
The left side of the diagram illustrates the bundling of an ML instance into a Docker container. This Docker container is the execution unit for the ML instance once it is deployed to the ADES.
In order to make it discoverable, a catalogue record describing the details of the ML instance is created.
9.2.2. Deployment
The bottom center of the diagram illustrates an exploitation platform to which the Dockerized ML model is deployed. Once deployed, the model can be executed using the Application Deployment and Execution Service (ADES) and the Execution Management Service (EMS) APIs.
9.2.3. Discovery and execution
The center of the diagram illustrates an Execution Management Service,(EMS).
The EMS interacts with a catalogue, illustrated in the top right of the diagram, to provide discovery capabilities for ML models and data.
Once a suitable combination of the ML model and input data has been identified, the EMS interacts with the ADES to coordinate execution of the model.
9.2.4. Visualization
Once a ML model has been executed the EMS mediates handling of the results. This can involve passing the results (e.g. a GeoTIFF) directly to the client or publishing the results via OGC-based services (e.g. OGC API - Maps or OGC API - Tiles servers) for later retrieval. In the latter case, technologies such as MapML can be leveraged to view the results and federate with other authoritative sources.
9.3. OGC Interfaces
9.3.1. Overview
For the Testbed ML activity, the preferred OGC interfaces are the those being defined for the OGC API framework. This section provides an overview of the specific APIs referenced in the Figure 3.
Two of the planned OGC APIs, such as OGC API - Features - Part 1:Core and OGC API - Features - Part 2:Coordinate Reference Systems by Reference, are official OGC standards. Others, such as OGC API - Processes or OGC API - Coverages, will become OGC standards sometime in 2021. Finally, several of the APIs (e.g. OGC API - Common, OGC API - Maps, OGC API - Tiles) are still under development within the OGC standards process.
9.3.2. OGC API Common
9.3.2.1. Overview
The OGC API framework is organized by resource type (e.g. features, coverages, maps, tiles). Each resource has an associated API standard. These resource-specific API standards are built using shared API modules. The OGC API-Common suite of standards stages the requirements and conformance that define these shared modules.
OGC API - Common - Part 1: Core defines the resources and operations which are be common to all OGC API standards. This draft Standard defines the minimal requirements for an API to be discovered and used by any client.
OGC API - Common - Part 2: Collections provides a common connection between the API landing page and resource-specific details for collections. That connection includes metadata which describes the collections of hosted resources, common parameters for selecting subsets of those collections, and URI templates for identifying the above.
9.3.2.2. API Summary
| Resource | URI | HTTP Method | Description |
|---|---|---|---|
Landing Page |
/ |
GET |
The purpose of the landing page is to provide clients with a starting point for using the API. Any resource exposed through an API can be accessed by following paths or links starting from the landing page. |
API definition |
/api |
GET |
Every API should provide an API Definition resource which describes capabilities provided by that API. This resource can be used by developers to understand the API, by software clients to connect to the server, and by development tools to support the implementation of servers and clients. |
Conformance |
/conformance |
GET |
Provides a list of conformance classes implemented by an API. |
Collections |
/collections |
GET |
Information which describes the set of supported Collections. |
Collection |
/collections |
GET |
Information about a specific collection. |
| Parameter Name | Target | Description |
|---|---|---|
Bounding Box |
Extent |
Selects resources which have an Extent element that intersects the bounding box |
Date-Time |
Extent |
Selects resources which have an Extent element that intersects the specified time period |
Limit |
Result set |
Limits the number of resources returned in a single response |
9.3.3. OGC API - Features
9.3.3.1. Overview
The OGC API - Features Standard defines API building blocks to create, modify and query features on the Web. OGC API - Features is comprised of multiple parts, each of which is a separate standard.
OGC API - Features - Part 1: Core specifies the core capabilities and is restricted to fetching features where geometries are represented in the World Geodetic System 1984 coordinate reference system (WGS 84) with axis order longitude/latitude. The API further specifies discovery and query operations that are implemented using the HTTP GET method.
By default, every API implementing Part 1 will provide access to a single dataset. Rather than sharing the data as a complete dataset, OGC API Features offers direct, fine-grained access to the data at the feature (object) level.
Discovery operations defined in Part 1 enable clients to interrogate the API to determine its capabilities and retrieve information about this distribution of the dataset, including the API definition and metadata about the feature collections provided by the API.
Query operations defined in Part 1 enable clients to retrieve features from the underlying data store based upon simple selection criteria, defined by the client.
OGC API - Features - Part 2: Coordinate Reference Systems by Reference extends Part 1 to support additional coordinate reference systems in addition to WGS84 CRS specified in the core. This is an approved OGC standard.
OGC API - Features - Part 3: Filtering and the Common Query Language (CQL) extends Part 1 to support richer filtering capabilities beyond the simple selection capabilities defined in Part 1. This is a draft standard.
The API building blocks specified in the OGC API - Features suite of standards are consistent with the architecture of the Web. In particular, the API design is guided by the Internet Engineering Task Force (IETF) HTTP/https://tools.ietf.org/html/rfc2818[HTTPS] RFCs, the W3C Data on the Web Best Practices, the W3C/OGC Spatial Data on the Web Best Practices and the emerging OGC Web API Guidelines. A particular example is the use of the concepts of datasets and dataset distributions as defined in the W3C Data Catalog Vocabulary (DCAT) and used in schema.org.
In this thread, a features server was deployed to offer vector data for the training of ML models and as input data when executing trained models. Specifically, an OGC API Features server supporting both parts 2 and 3 was deployed to host the Canvec Series of Topographic Data of Canada.
9.3.4. OGC API - Coverages (Draft)
9.3.4.1. Overview
Coverages - as per OGC, and ISO standardization - constitute a unifying paradigm for the digital representations of space/time varying phenomena. Specifically, these are data defined as spatio-temporal regular and irregular grids, point clouds, and general meshes. In particular, multi-dimensional datacubes fall under this category, such as 1-D sensor time series, 2-D satellite imagery, 3-D x/y/t image time series and x/y/z geoscientific models, 4-D x/y/z/t climate and ocean data sets, and more.
The draft OGC API - Coverages standard establishes how to access coverages. Like OGC API Features, OGC API - Coverages is comprised of multiple parts, each of them as a separate standard.
The draft OGC API - Coverages - Part 1: Core, established how to access coverages as defined by the Coverage Implementation Schema (CIS) 1.1.
Part 1 defines coverage extraction and includes subsetting capabilities, including band subsetting, scaling, CRS conversion and data format encoding. Gridded coverages or 'point-cloud' multi-point coverages are the primary data types considered but other kinds of datasets are not excluded.
In this Testbed thread, a coverage server was deployed serving Sentinel S1A and S1B satellite imagery from Canada. This data was used for training ML models and as input when executing trained models.
9.3.4.2. API Summary
| Resource | URI | HTTP Method | Description |
|---|---|---|---|
Coverage |
/collections/{coverageId}/coverage |
GET |
Returns a coverage and all its components |
Range set |
/collections/{coverageId}/coverage/rangeset |
GET |
Returns the rangeset of the coverage |
Range type |
/collections/{coverageId}/coverage/rangetype |
GET |
Returns the rangetype of the coverage |
Features |
/collections/{coverageId}/coverage/domainset |
GET |
Returns the domainset of the coverage |
Metadata |
/collections/{coverageId}/coverage/metadata |
GET |
Returns associated metadata defined by the CIS model |
9.3.5. OGC API - Maps and OGC API - Tiles (Drafts)
OGC API - Tiles - Part 1: Core specifies the behavior of Web APIs that provide access to tiles of one geospatial data resource or more than one geospatial data resource. This standard defines how to discover which resources offered by the API can be retrieved as tiles, what are the tile matrix sets supported by the geospatial data resources, which are the limits of the tiled space and how to request one tile at a time.
OGC API - Maps - Part 1: Core describes an API that presents maps portraying data that has been rendered according to a style. The maps served by implementations of the draft OGC API - Maps Standard are retrieved as images of any size, generated on-the-fly, representing a geospatial extent determined by the client application, and with the styling also determined by the client application. When used together with OGC API - Tiles, the two APIs enable support for map tiles.
In this thread, a server was deployed that offered map and tile access OGC API interfaces to Sentinel S1A and S1B satellite imagery from Canada and to the Canvec Series of Topographic Data of Canada. Both the Sentinel and Canvec data were used to train ML model and as input data when executing trained models.
9.3.5.1. API Summary
| Resource name | Common path |
|---|---|
Tiling Schemas |
|
Tiling Schema |
|
Tiles |
|
Vector Tiles description |
|
Vector Tiles description in one tile matrix set |
|
Vector Tile |
|
Vector Tiles description (geospatial resources1) |
|
Vector Tile |
|
Vector tile (geospatial resources1) |
|
Maps |
|
Maps description2 |
|
Maps description (geospatial resources1)2 |
|
Map tiles |
|
Map tiles description |
|
Map tiles description in one tile matrix set |
|
Map tiles description (geospatial resources1) |
|
Map tiles description (geospatial resources1) in one tile matrix set |
|
Map tile |
|
Map tile (geospatial resources1) |
|
1: The expression "geospatial resources" means "from more than one geospatial resource or collection" 2: Specified in the draft OGC API - Maps – Part 1: Core specification.
9.3.6. OGC API - Processes / Application Deployment and Execution Service (Draft)
9.3.6.1. Overview
OGC API - Processes - Part 1: Core, specifies building blocks that enable the execution of geospatial computing processes on the Web. The draft standard defines requirements and conformance for providing process inputs and for retrieving the results of processing. Processes can be executed synchronously or asynchronously. The API also defines discovery resources for the retrieval of metadata describing the purpose and functionality of each process. Typically, these processes combine raster, vector, coverage and/or point cloud data with well-defined algorithms to produce new raster, vector, coverage and/or point could information.
Part 1 of OGC API - Processes only offers a static set of processes. Previous OGC Testbed work in OGC Testbeds 13 and 14 extended the processes API to allow for the dynamic deployment of processes. This extension is currently referred to as the Application Deployment and Execution Service.
The draft OGC API - Processes - Part 2: Transactions specification formalizes the work done in testbeds 13, 14 and 15 to extend the core to add transactional capability; that is the ability to dynamically deploy and "undeploy" processes.
9.3.6.2. Application Deployment and Execution Service (ADES)
A service that implements these two parts of the OGC API - Processes suite of standards is referred to as an "Application Deployment and Execution Service".
The ADES allows clients to deploy processes bundled in Docker containers and manages the environment required to execute those containers. Typically, this requires that an ADES understand:
-
The data that is available for processing and the interfaces required to access that data.
-
Initialize the execution environment for the Docker container.
The first item requires that the ADES understands how to access data and stage it for use by an application in a Docker container. This may require that the ADES know how to retrieve data from an OGC API such as OGC API - Features or it may require that the ADES know how to read data from other APIs such as Amazon’s S3 object store.
The second item requires that the ADES understand how to interact with the specific platform upon which it is deployed in order to stage data for the Dockerized application and execute the Docker container. For example, an ADES deployed to an Amazon Cloud needs to understand how to interact with AWS’s Elastic Container Service (ECS) or Elastic Kubernetes Service (EKS) in order to execute Docker containers at scale. Similar statements are applicable for ADES' deployed on the Google Cloud Platform or on OpenStack-based cloud such as the Boreal Cloud of Natural Resources Canada (NRCan).
9.3.6.3. Execution Management Service (EMS)
The Execution Management Service (EMS) is basically an ADES that does not actually "execute" processes but rather acts as a coordinating node in a federation of ADESs. Typically, an EMS knows how to:
-
Coordinate the deployment of new processes across the federation.
-
Interact with catalogues to facilitate the discovery of data and processes required to perform a desired analysis.
-
Dispatch the execution of a process to an appropriate ADES node in the federation that offers the discovered data and processing capabilities.
-
Coordinate the execution of a workflow composed of a number of processing steps across the federation.
-
Combine or aggregate the results of each processing step to present the final result of executing a workflow to the client.
So, even though the API presented by the EMS is the same as that presented by the ADES the role of each component is very different. It should be noted, however, that many implementations can be deployed for fulfill either or both roles (i.e. EMS or ADES).
9.3.6.4. API Summary
The following API summary also includes elements of the OGC API - Processes transactional extension which allows processes to be dynamically deployed and undeployed thus extending the API.
| Resource | URI | HTTP Method | Description |
|---|---|---|---|
Processes |
/processes |
GET |
List of available processes |
POST |
Deploy a new process |
||
Process |
/processes/{processId} |
GET |
Get a description of a specific process |
PUT |
Update a deployed job |
||
DELETE |
Undeploy a job |
||
List of jobs |
/processes/{processId}/jobs |
GET |
Get a list of jobs for the specified process |
Job status |
/processes/{processId}/jobs/{jobId} |
GET |
Get the status of the specified job |
Job results |
/processes/{processId}/jobs/{jobId}/results |
GET |
Get the results for the specified job |
|
Note
|
Although this clause focuses primarily on describing the upcoming OGC API interface for the ADES/EMS, the previous version of these servers — based on the current Web Processing Service standard — was also used in the Testbed-16 ML Thread. |
9.3.7. OGC API - Records (Draft)
9.3.7.1. Overview
OGC API - Records - Part 1: Core defines an API that supports the ability to search collections of descriptive information, called records, about resources such as data collections, services, processes, styles, code lists and other related resources. Records represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software.
Part 1 defines a set of core queryables that represent a list of mandatory and optional properties that a catalogue records should contain to provide a minimum, useful amount of information about the resource the record is describing.
The draft API for Part 1 is very similar to that for OGC API - Features - Part 1: Core but also includes additional query parameters that extend the query capabilities of the API.
Part 1 also makes recommendations about the encoding of a record. GeoJSON is specified as the JSON encoding of a record. There are recommendations for XML and HTML encoding but these where not used in the ML Testbed activity.
9.3.7.2. API Summary
The following table lists mandatory (indicated by "M") and recommended optional ("O") properties that every catalogue record should include. This list of properties is referred to as the "core queryables".
| Queryable | O/M | Description |
|---|---|---|
recordId |
M |
A unique record identifier assigned by the catalogue. |
recordcreated |
M |
The date the records was created in the catalogue. |
recordmodified |
M |
The most recent date on which the record was changed. |
title |
M |
A human-readable name given to the resource. |
description |
M |
A free-text description of the resource. |
keywords |
M |
A list of keywords or tags describing the resource. |
type |
M |
The nature or genre of the resource. |
language |
O |
This refers to the natural language used for textual values (i.e. titles, descriptions, etc) of a resource. |
externalId |
O |
An identifier for the resource assigned by an external entity (i.e. not the catalogue). |
modified |
O |
Most recent date on which the resource was changed. |
publisher |
O |
The entity for making the resource available. |
themes |
O |
A knowledge organization system used to classify the record. |
formats |
O |
A list of available distribution formats for the resource. |
contactPoint |
O |
An entity to contact about the resource. |
license |
O |
A legal document under which the resource is made available. |
rights |
O |
A statement that concerns all rights not addressed by the license, such as copyright statements. |
extent |
O |
The spatio-temporal coverage of the resource. |
links |
O |
A list of links for navigating the catalogue API. |
associations |
O |
A list of links to resources associated with this resource. |
The following table lists the set of query parameters that every implementation of the OGC API - Records draft standard must provide. The bbox, datetime
and limit parameters are inherited from OGC API - Features - Part 1: Core standard.
| Parameter name | Description |
|---|---|
bbox |
A bounding box. If the spatial extent of the record intersects the specified bounding box then the record shall be presented in the response document. |
datetime |
A time instance or time period. If the temporal extent of the record intersects the specified data/time value then the record shall be presented in the response document. |
limit |
The number of records to be presented in a response document. |
type |
A resource type. Only records of the specified type shall be presented in the response document. |
q |
A space-separated list of search terms. If any server-chosen text field in the record contains 1 or more of the terms listed then this records hall appear in the response set. |
externalIds |
A comma-separated list of external identifiers. Only records with the specified names shall appear in the response document. |
10. Training, deployment and execution of machine learning models
10.1. Overview
The topic of training ML models is covered in the D016 Machine Learning Training Data ER.
Once the model is trained the next step in the machine learning life-cycle is the deployment of the trained model. In the context of the Testbed-16 ML activity, deploying a trained model means that:
-
The model is deployed behind a standards-based interface.
-
A description of the model is published to a catalogue.
The first point hides the specific details of the model (algorithm, ML platform, programming language, etc.) behind a standards-based API. This allows the model to be consistently invoked with new input data and the results of the run to be retrieved or published in a manner that allows for later retrieval, ideally also through a standards-based API. In the Testbed activity the ADES was used as the API for deploying and invoking ML models.
The second point enables a user to search a catalogue for data and models that meet their needs and invoke the discovered model with the discovered input data. The goal was to use the draft OGC API - Records interface as the discovery API.
This section describes the standards-based machine learning environments implemented by the Testbed-16 ML participants.
10.2. Machine Learning Environment 1 (D132 - 52°North)
52°North targeted the implementation of an ML environment that focused on the detection of water bodies using satellite radar data. The overall goal was to create a trained model that was ready for execution within a Docker container. The following figure illustrates the steps involved to prepare the model.
10.2.1. Use Cases
Since forest fires regularly occur in Canada, obtaining knowledge on water bodies that are candidates for serving water-bomber planes or helicopters is of high value. Many of the natural water bodies in the Canada backcountry vary in extent and water level. A ML model can provide insightful information using up-to-date radar measurements such as Synthetic Aperture Radar (SAR) data. Therefore, the goal was to train a model with historic SAR data and corresponding labels in order to apply the model to recent SAR data.
10.2.2. Data and Training Data Considerations
10.2.2.1. Radarsat-1
Early in the preparation phase of the model development, different data sources were taken into consideration. In particular, the Radarsat-1 data provided by NRCan was assessed with regards to its feasibility within the ML application. For pre-processing the Sentinel Application Platform (SNAP) built-in Radarsat importer was used. A set of issues arose in the course of this workflow:
-
File structure conventions: Two different variants of Radarsat-1 data structures were identified. One variant was not supported by SNAP. The
*01f.sardformat (used from 2010 onward) could not be imported while the older format (dat_01.001, …) could be loaded. -
Geographic Inaccuracy: after applying a default set of pre-processing steps (i.e. Speckle Filtering with "lee filter" and Terrain Correction using Ellipsoid Correction to Geogrid Location from the SNAP toolkit) the resulting raster data always featured an offset, varying in extremity. The below Figure illustrates the issue.
After consideration with SAR experts at NRCan participants decided to opt for a Sentinel-1 based model approach as the data was very well supported in terms of pre-processing functionality and accuracy.
10.2.2.2. Training Data
Two training datasets where used: pre-processed Sentinel-1 scenes and water body data (the CanVec dataset "Lakes, Rivers and Glaciers in Canada - CanVec Series - Hydrographic Features"; see https://open.canada.ca/data/en/dataset/9d96e8c9-22fe-4ad2-b5e8-94a6991b744b). As described in section OGC API - Maps and OGC API - Tiles (Drafts), both the Sentinel-1 and the label data were provided by a prototype OGC API Tiles implementation. The below Figure illustrates the tile-based approach.
10.2.3. Model Training
A specialized convolutional neural network (CNN) for training the model was used. This was the U-Net CNN developed for biomedical image segmentation. U-Net provides very good performance using modern GPUs, applying a segmentation of 512x512 images (the size of a tile) in approximately one second.
A dedicated data retrieval process was used to download the tiles for a specific area of interest from the prototype OGC API - Tiles instance. The retrieval process was implemented using a Jupyter Notebook and is available at https://nbviewer.jupyter.org/github/52North/testbed16-jupyter-notebooks/blob/master/ml/tiles/tile-resolution.ipynb. The prototype OGC API - Tiles integration made the usage of training data seamless and straightforward. The amount of training data can be very easily be scaled by applying a larger area of interest. The only mandatory manual step was the identification of the optimal zoom level. This was due to Sentinel-1 data only providing limited spatial resolution.
The model was then executed using the set of downloaded tiles. The matching tiles of the Sentinel-1 and the water body label data share the same file name in different folders which allowed the application of the U-Net segmentation in an efficient manner.
10.2.4. Model Inference Results
The model trained with the tiles can then be applied to other Sentinel-1 scenes. The only prerequisite is that the scenes are pre-processed in the same way as the retrieved tiles were. Using GeoTIFF as the input format, an output raster (also GeoTIFF) with Boolean pixel values (1 = water body) can be created. An example is illustrated in the below Figure (base layer © OpenStreetMap contributors), where the red areas are the overlaid inference results.