duan8/yolov7/include/postprocess.h
Wang Xinyu 816eef5194 Refactor yolov7 (#1155)
* separate model and block

* move thresh to config

* use trt8 api

* move batchsize to config

* update readme

* refactor batch infer logic

* move max input image size to config
2022-11-27 23:33:34 +08:00

14 lines
465 B
C++

#pragma once
#include "types.h"
#include <opencv2/opencv.hpp>
cv::Rect get_rect(cv::Mat& img, float bbox[4]);
void nms(std::vector<Detection>& res, float *output, float conf_thresh, float nms_thresh = 0.5);
void batch_nms(std::vector<std::vector<Detection>>& batch_res, float *output, int batch_size, int output_size, float conf_thresh, float nms_thresh = 0.5);
void draw_bbox(std::vector<cv::Mat>& img_batch, std::vector<std::vector<Detection>>& res_batch);