mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 22:06:34 +00:00
45c19baa45
- autopilot -> drone_controller - rtsp_ai_player -> ai_controller - added top level qmake project file - updated documentation - moved small demo applications from tmp/ to misc/
32 lines
569 B
C++
32 lines
569 B
C++
#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;
|
|
};
|
|
|