duan8/yolov8/include/preprocess.h
lindsayshuo ae3bd5e6b2
Move GPU post-processing separately to cuda_postprocess.cu (#1331)
* Move GPU post-processing separately to cuda_postprocess.cu

* Update postprocess.cpp

* Update postprocess.cu

---------

Co-authored-by: wang-xinyu <wangxinyu_es@163.com>
Co-authored-by: Wang Xinyu <shaywxy@gmail.com>
2023-07-18 13:23:56 +08:00

17 lines
440 B
C++

#pragma once
#include <opencv2/opencv.hpp>
#include "NvInfer.h"
#include "types.h"
#include <map>
void cuda_preprocess_init(int max_image_size);
void cuda_preprocess_destroy();
void cuda_preprocess(uint8_t *src, int src_width, int src_height, float *dst, int dst_width, int dst_height, cudaStream_t stream);
void cuda_batch_preprocess(std::vector<cv::Mat> &img_batch, float *dst, int dst_width, int dst_height, cudaStream_t stream);