duan8/yolov8/include/postprocess.h
lindsayshuo 70d0adc9ec
Yolov8 adds cuda post-processing function (#1326)
* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Update postprocess.cpp

* fix user id

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Yolov8 adds cuda post-processing function

* Delete images

* Update postprocess.h

* Update postprocess.cpp

---------

Co-authored-by: Wang Xinyu <shaywxy@gmail.com>
2023-07-13 13:13:56 +08:00

15 lines
636 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);
void batch_process(std::vector<std::vector<Detection>>& res_batch, const float* decode_ptr_host, int batch_size, int bbox_element, const std::vector<cv::Mat>& img_batch);