YOLOv8-TensorRT
YOLOv8-TensorRT copied to clipboard
cv::dnn::blobFromImage(image, nchw, 1 / 255.f, size, cv::Scalar(0, 0, 0), true, false, CV_32F);函数耗时
使用后推理时间大幅提升,但是这行代码耗时最久,cv::dnn::blobFromImage(image, nchw, 1 / 255.f, size, cv::Scalar(0, 0, 0), true, false, CV_32F)。
我看到 有别的做法 是写cuda 代码 ,全部用显卡运算。
我看到 有别的做法 是写cuda 代码 ,全部用显卡运算。
是的,可以尝试warpaffinekernel.
Hello , do u have any update about this code line ? the inference is running really fast around 1ms to 2 ms but blob functions add 10 to 18 ms which affects a lot.
Hello , do u have any update about this code line ? the inference is running really fast around 1ms to 2 ms but blob functions add 10 to 18 ms which affects a lot.
I will update a more quick cpu version the last few days.
This pr improve preprocess hwc->nchw by opencv cv::split. Welcome to try it and give valuable feedback!
@triple-Mu
我如果还想添加这个处理 ,大佬可以写一下吗
image -= np.array([123.675, 116.28, 103.53], np.float32)
image /= np.array([58.395, 57.12, 57.375], np.float32)
@triple-Mu
我如果还想添加这个处理 ,大佬可以写一下吗
image -= np.array([123.675, 116.28, 103.53], np.float32) image /= np.array([58.395, 57.12, 57.375], np.float32)
这个原版yolov8没有的吧? 你可以尝试在 convertTo中修改alpha和beta试试