多张图片预测:
https://github.com/noahmr/yolov5-tensorrt
https://github.com/noahmr/yolov5-tensorrt/blob/main/src/yolov5_detector.cpp
Result Detector::detectBatch(const std::vector<cv::cuda::GpuMat>& images,
std::vector<std::vector<Detection>>* out,
int flags) noexcept
下载后:
yolov5-tensorrt-main.zip
本地项目:yolov5-5.0_voc
很感谢这个作者:
cv::Mat trtInput = blobFromDsImages(vec_ds_images, _p_net->getInputH(),_p_net->getInputW());
yolov5-v6:
- inequal net width and height
- batch inference
- support FP32,FP16,INT8
下载后:yolo-tensorrt-TRT8.zip
入口:
完整调试博客:
yolov5转tensorrt c++_jacke121的专栏-CSDN博客
https://github.com/OpenJetson/tensorrt-yolov5/blob/main/yolov5.cpp
for循环添加数据
static float data[BATCH_SIZE * 3 * INPUT_H * INPUT_W];
cudaMemcpy 效率不高:
https://github.com/Wulingtian/yolov5_tensorrt_int8/blob/master/yolov5s_infer.cc
版权声明:本文为CSDN博主「AI视觉网奇」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/jacke121/article/details/121851414
暂无评论