QVisionInference Class
The QVisionInference class runs AI inference on video frames. More...
| Header: | #include <QVisionInference> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS EdgeAi)target_link_libraries(mytarget PRIVATE Qt6::EdgeAi) |
| qmake: | QT += edgeai |
| Inherits: | QInferenceStep |
| Status: | Technical Preview |
Properties
- configFile : const QUrl
- name : const QString
Public Functions
| QVisionInference(const QUrl &configFile, const QString &name = QString(), QObject *parent = nullptr) | |
| QVisionInference(const QString &model, const QString &labels = QString(), const QString &name = QString(), const QVariantMap &options = QVariantMap(), QObject *parent = nullptr) | |
| QUrl | configFile() const |
| QString | labels() const |
| QString | mode() const |
| QString | model() const |
| QString | module() const |
| QString | name() const |
Detailed Description
QVisionInference takes video input and produces structured output, such as classifications or detections, according to the configured model(), labels(), module(), and mode(). Backend implementations, for example Edge Impulse, are created through QInferenceBackendFactory.
See also QInferenceStep, QInferenceVideoSource, QInferenceResultParser, name, and configFile.
Property Documentation
[read-only] configFile : const QUrl
This property holds the backend configuration file of the step.
What the file contains, and in which format, depends entirely on the backend. Backends that have a configuration file format of their own, such as NVIDIA DeepStream, read the file with their own parser. The other backends read a JSON object, use the keys they know, and ignore the rest.
A relative path is resolved against the application's directory, and only local files are supported. The file is given to the constructor, because the backend step reads it during construction.
The default value is an empty URL.
Access functions:
| QUrl | configFile() const |
[read-only] name : const QString
This property holds the name of the step.
When a step provider is registered under this name, QInferenceBackendFactory prefers it over the provider registered for vision steps. The name is given to the constructor, because the backend step is created during construction.
The default value is an empty string.
Access functions:
| QString | name() const |
Member Function Documentation
[explicit] QVisionInference::QVisionInference(const QUrl &configFile, const QString &name = QString(), QObject *parent = nullptr)
Constructs a QVisionInference that reads its backend configuration from configFile. The optional name selects a step provider registered under that name. Pass parent to QInferenceStep.
The backend step is created, and reads configFile, during construction.
See also configFile and name.
QVisionInference::QVisionInference(const QString &model, const QString &labels = QString(), const QString &name = QString(), const QVariantMap &options = QVariantMap(), QObject *parent = nullptr)
Constructs a QVisionInference with the given model, labels, optional name, and extra options such as "module" and "mode". Passes parent to QInferenceStep.
QString QVisionInference::labels() const
Returns the labels path or content.
See also model() and options().
QString QVisionInference::mode() const
Returns the inference mode.
See also module() and options().
QString QVisionInference::model() const
Returns the model path or identifier.
See also labels() and options().
QString QVisionInference::module() const
Returns the module identifier.
© 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.