#pragma once #include #include #include using namespace std; using namespace cv; struct Detection { int class_id; float confidence; cv::Rect box; }; struct Resize { cv::Mat resized_image; int dw; int dh; }; class Yolov9 { public: Yolov9(const string& model_path); ~Yolov9() {}; Resize resize_and_pad(cv::Mat& img); void predict(cv::Mat& img, std::vector& output); void draw(Mat& img, vector& output, float dw, float dh); void setConf(float conf); void setNMS(float nms); private: ov::CompiledModel compiled_model; float NMS_THRESHOLD = 0.4; float CONFIDENCE_THRESHOLD = 0.4; vector colors; };