Fully working YOLOv8 detection with ONNX runtime.

This commit is contained in:
Tuomas Järvinen
2024-07-14 18:08:05 +02:00
parent 78cfe484b1
commit 813251b170
13 changed files with 678 additions and 49 deletions
@@ -0,0 +1,20 @@
#pragma once
#include <QObject>
#include "aiengineinference.h"
#include "yolov8Predictor.h"
class AiEngineInferencevOnnxRuntime : public AiEngineInference
{
Q_OBJECT
public:
explicit AiEngineInferencevOnnxRuntime(QString modelPath, QObject *parent = nullptr);
public slots:
void performInferenceSlot(cv::Mat frame) override;
private:
cv::Mat drawLabels(const cv::Mat &image, const std::vector<Yolov8Result> &detections);
YOLOPredictor mPredictor;
std::vector<std::string> mClassNames;
};