On this page

Qt Edge AI C++ Classes

Provides C++ classes for building on-device inference flows. More...

This module is in Technical Preview state.

Classes

QInferenceBackendDataPort

The abstract base class for backend-specific port implementations

QInferenceBackendFactory

Creates QInferenceBackendStep and QInferenceBackendFlow instances from loaded plugins

QInferenceBackendFlow

The abstract base class for backend-specific pipeline flows

QInferenceBackendStep

The abstract base class for backend-specific pipeline steps

QInferenceBackendStepProvider

The plugin interface that creates the backend implementations of inference steps

QInferenceDataPort

Represents an input or output of a QInferenceStep through which data flows

QInferenceFlow

Manages a pipeline of data-processing steps and their connections

QInferenceFlowBackendProvider

The plugin interface that creates the backend implementation of an inference flow

QInferenceResultParser

Parses JSON data from the pipeline

QInferenceStep

The base class for pipeline steps that produce or consume data

QInferenceVideoSource

Video frames to the pipeline

QVisionInference

Runs AI inference on video frames

Detailed Description

The Qt Edge AI C++ classes describe an inference pipeline as a flow of steps that exchange data through typed ports, and provide the interfaces that backend plugins implement to run the pipeline.

To use these classes in your application, add the following include statement:

#include <QtEdgeAi/QtEdgeAi>

Example

The following builds a minimal flow: a camera feeds a vision inference step, whose output is parsed into JSON.

QCamera camera;
QMediaCaptureSession session;
session.setCamera(&camera);
camera.start();

auto *videoSource = new QInferenceVideoSource(&session);
auto *detection = new QVisionInference(QUrl("configs/edgeimpulse/inference.json"), "edgeimpulse");
auto *parser = new QInferenceResultParser;

QInferenceFlow *flow = QInferenceFlow::fromSteps({ videoSource, detection, parser });
QObject::connect(parser, &QInferenceStep::dataAvailable,
                  [](const QVariant &data, const QString &) { qDebug() << data; });
flow->start();

The vision step reads its configuration from configs/edgeimpulse/inference.json, relative to the directory of the application's executable. The file names the model to run, by the file name that Edge Impulse gives the library. A renamed library fails to load:

{
    "pluginPath": "libgstedgeimpulse-898869-face-detection-fomo.so"
}

The model is not shipped with the module. Two sources are common: a model already optimized for the target hardware, such as a .tflite model from the Qualcomm Intelligent Multimedia SDK's model zoo, or a model trained on your own data through Edge Impulse Studio, which exports it as a compiled GStreamer plugin like the one above. Either way, the step's configFile gives the path to the resulting file, and the step's provider selects the step provider that loads it: edgeimpulse for an Edge Impulse plugin, imsdk for a Qualcomm IM SDK model. See Qt Edge AI Configuration Files for what each step provider reads.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.