#ifndef __DETECTOR_H__ #define __DETECTOR_H__ #include #define MAX_DETECTIONS 200 typedef struct { float x1, y1, x2, y2; float score; int label; } DetResult; typedef struct Detector Detector; Detector *detector_create(const char *model_path, float conf_thresh, float nms_thresh); void detector_destroy(Detector *det); int detector_get_input_width(Detector *det); int detector_get_input_height(Detector *det); int detector_detect(Detector *det, int src_nv12_fd, int src_w, int src_h, DetResult *results, int *num_results); void detector_draw_one_result(DetResult *r, void *y_plane, int out_w, int out_h, int tile_x, int tile_y, int tile_w, int tile_h, int src_w, int src_h); #endif