mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-23 00:56:34 +00:00
- addedd NCNN model support to rtsp_ai_player
- added printing of inference FPS - simple AI test bench which can be used to compare models
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <opencv2/core.hpp>
|
||||
#include <ncnn/net.h>
|
||||
#include "aiengineinference.h"
|
||||
|
||||
|
||||
struct Object
|
||||
{
|
||||
cv::Rect_<float> rect;
|
||||
int label;
|
||||
float prob;
|
||||
};
|
||||
|
||||
|
||||
class AiEngineInferencevNcnn : public AiEngineInference
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AiEngineInferencevNcnn(QString modelPath, QObject *parent = nullptr);
|
||||
void initialize(int number);
|
||||
|
||||
public slots:
|
||||
void performInferenceSlot(cv::Mat frame) override;
|
||||
|
||||
private:
|
||||
int detect_yolov8(const cv::Mat& bgr, std::vector<Object>& objects);
|
||||
ncnn::Net yolov8;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user