Hello! This blog is part of a series around the AI Sonobuoy project by IQT Labs—a learn-by-doing exploration in maritime situational awareness. Please visit the first through fourth blogs in the series:
- IQT Labs AI Sonobuoy – A Deeper Look at AI at the Edge
- IQT Labs Identifies AI Hierarchy Of Modeling That Accelerates Edge Intelligence
- The Hard Stuff: Designing a Cheap-Yet-Powerful Maritime AI Dataset Collector
- Maritime Mysteries: Solving AI Data-Labeling Challenges at Sea
We are announcing the release of our EdgeTech Core framework on GitHub and exploring our data-first software architecture principles for AI at the Edge.
We are excited to introduce EdgeTech Core: a lightweight robotics framework to enable AI at the Edge. You can find it on GitHub!
This framework is the culmination of several years of building software systems for AI at the Edge and implements what we call data-first software architecture. It emphasizes system robustness and high-fidelity data-recoding because, as we stressed in The Hierarchy of AI Modeling, raw sensor data is the foundational tenet of our Edge-enabling software stack.
In this blog, we explore EdgeTech Core in the context of the AI Sonobuoy Collector system, where it was first introduced and applied. We are also open-sourcing another 10 EdgeTech Core modules that compromise the AI Sonobuoy Collector software. Please reach out at email@example.com if you are interested in collaborating with us or have any questions.
Data-First Software: Supercharging EdgeTech Core
The EdgeTech Core framework is founded around maximizing the availability of the system and the fidelity of the data recorded. There are several core tenets:
(1) Promoting speed and flexibility while minimizing overhead [Message Queue Telemetry Transport (MQTT)];
(2) Emphasizing cross-platform compatibility [Docker containerization];
(3) Keeping modules simple [polymorphism].
To achieve the first tenet, the high-level software architecture is a centralized bus-based system. We are using the Eclipse Foundation’s Mosquitto™ MQTT centralized bus. Unifying around a centralized bus-based architecture allows for adaptive responses to external stimuli and makes multiple operations on the same data possible with minimal overhead. It also means that one sub-module fault will not take down the entire system. Lastly, and most importantly for us, it promotes speed and flexibility of experimentation and debugging. All that is needed to try a new module is to attach it to MQTT and consume the necessary data.
We emphasized cross-platform compatibility through Docker containerization. Anywhere Docker will run, EdgeTech Core systems will run. Each container can be configured to restart should a fault occur, promoting overall system robustness. This implementation also makes standing up the entire software system as simple as running a single Docker Compose startup command!
As noted above, the third key tenet of the framework is to keep modules as simple as possible. Each module is designed to perform one primary function with the minimum amount of custom code required. This is done through polymorphism. Each module inherits and extends functionality of core one and is implemented in Python. EdgeTech Core is the “parent” and contains all functionality needed to t up and maintain a connection with the MQTT bus. The other EdgeTech Core modules inherit all this functionality as “children” and can be found on GitHub as “EdgeTech-<INSERT MODULE NAME>.” These modules are intentionally broken into separate repositories to promote reuse across many different system designs. System-specific versions of the modules can then further extend those capabilities by leveraging the same inheritance.
This framework was created during the development of the AI Sonobuoy Collector and therefore has a strong grounding in field-deployed robotics. At IQT Labs, we take a learning-by-doing approach to our work and this framework is a clear embodiment of that mentality. We are looking to improve the framework continuously, so please come and collaborate with us on GitHub!
AI Sonobuoy Collector Software
To ground the EdgeTech Core system in a practical implementation, here is how it was used in the AI Sonobuoy Collector software stack.
Broadly speaking, the AI Sonobuoy system is a collection of various sensors that record different modalities of data at different times. As these devices’ geographical location and number can vary widely, an onboard data-management system becomes vital to preserve the collected data. The software used for this can be broken down into six categories:
- Sensor Inputs
- Data Manipulators
- MQTT Bus
- Command-and-Control (C2)
- Open-Source Package Integration
- Cloud Pushes
These are illustrated in the software diagram below.
Sensor inputs are read from their respective devices by their corresponding modules and dumped onto the bus. That data is read and written to a file locally and inserted into a database called CouchDB. At a cadence controlled by the command-and-control (C2) module, the local CouchDB is synchronized with its cloud equivalent and the files are uploaded to Amazon Web Services S3 as a backup. The C2 module also helps maintain time-correlation among the various data streams on the collector (AIS and audio) by almost simultaneously publishing events to cycle data files and trigger uploads.
All raw data is preserved and sent to the cloud, where it can be processed off the device, minimizing the computational overhead required and making collection errors easier to identify and correct. Running a model on the device to select what data to push to the cloud significantly reduces the cloud overhead requirements—something that we are also experimenting with in our SkyScan project. Given that the volume of data collected could be very large, it’s essential to be able to contextualize the information that’s being collected quickly and only push relevant data to the cloud. The multiple deployments of our AI Sonobuoy underlined the importance of this capability.
IQT Labs Perspective
Our learning-by-doing philosophy has highlighted the foundational lessons for our framework. We found that data fidelity is directly correlated with system robustness and we emphasized building a reusable framework that keeps the software stack simple, centralized, and compatible. This has enabled us to pursue Edge AI in disparate sensor domains relatively rapidly.
The EdgeTech Core system has significantly improved system robustness across all of our projects in the EdgeTech theme area. It has also reduced development time and improved our ability to diagnose and address issues.
Each EdgeTech Core module lives in its own GitHub repository and instantiates a Docker container with a single Python class that encapsulates all of the functionality.
Furthermore, this framework is built so that after filling in the relevant secret keys, running the AI Sonobuoy Collector on the PinePhone compute platform (which we discussed previously) takes just one command!
We were particularly impressed by CouchDB, which enables edge devices to:
- Operate autonomously;
- Handle offline scenarios;
- Synchronize data efficiently;
- Accommodate diverse data formats;
- Simplify data retrieval and analysis; and
- Ensure data privacy and integrity in edge deployments.
The simplicity and robustness of the overall AI Sonobuoy Collector system was significantly improved by utilizing the EdgeTech Core framework. We will continue to build on this standard and invite you to join us by contributing on GitHub.
- EdgeTech Core GitHub Repository
- EdgeTech Template GitHub Repository
- AI Sonobuoy Collector PinePhone GitHub Repository
- EdgeTech Filesaver GitHub Repository
- EdgeTech dAISy GitHub Repository
- EdgeTech S3 Uploader GitHub Repository
- EdgeTech Audio Recorder GitHub Repository
- EdgeTech C2 GitHub Repository
- EdgeTech CouchDB Saver GitHub Repository
- EdgeTech CouchDB Startup GitHub Repository
- EdgeTech HTTP Uploader GitHub Repository
- EdgeTech Telemetry PinePhone GitHub Repository