You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
|
11 months ago
|
#pragma once
|
||
|
|
#include <vector>
|
||
|
|
#include "opencv2/opencv.hpp"
|
||
|
|
#include "detection_type_api.h"
|
||
|
|
#include "objTracker.h"
|
||
|
|
|
||
|
|
|
||
|
|
class CudaYOLODetect {
|
||
|
|
private:
|
||
|
|
void* det_demo = NULL;
|
||
|
|
|
||
|
|
public:
|
||
|
|
|
||
|
|
CudaYOLODetect(std::string& model_path, const int& det_width, const int& det_height, const int& cls_num, const float& obj_conf, const float& cls_conf, const float& nms_conf);
|
||
|
|
|
||
|
|
//void run(cv::Mat& inData, std::vector<objinfo>& res);
|
||
|
|
std::vector<std::shared_ptr < OBJTRACK>> run(ImgMat Indata, std::vector<objinfo>& res_det);
|
||
|
|
|
||
|
|
void setParam(int idx, const float& cls_conf, const float& nms_conf);
|
||
|
|
void setMatchRatio(float matchratio);
|
||
|
|
~CudaYOLODetect();
|
||
|
|
};
|
||
|
|
|
||
|
|
struct obj_res_class {
|
||
|
|
int cls_id_class;
|
||
|
|
//int id_type;
|
||
|
|
//std::string name;
|
||
|
|
};
|
||
|
|
|
||
|
|
class Detect_class {
|
||
|
|
private:
|
||
|
|
void* det_demo_class = NULL;
|
||
|
|
|
||
|
|
public:
|
||
|
|
Detect_class(std::string& model_path_class, const int& det_width_class, const int& det_height_class, int clsNum);
|
||
|
|
|
||
|
|
void run_class(unsigned char* array_class, obj_res_class& res_class);
|
||
|
|
void setParam(int idx, const float& cls_conf);
|
||
|
|
|
||
|
|
~Detect_class();
|
||
|
|
};
|
||
|
|
|
||
|
|
|