hpc203 / yolov5-v6.1-opencv-onnxrun

分别使用OpenCV、ONNXRuntime部署yolov5-v6.1目标检测,包含C++和Python两个版本的程序。支持yolov5s,yolov5m,yolov5l,yolov5n,yolov5x,yolov5s6,yolov5m6,yolov5l6,yolov5n6,yolov5x6的十种结构的yolov5-v6.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yolov5v5推理结果解析问题请教

xinsuinizhuan opened this issue · comments

我看结果都是取到数据后,直接取前四个就是cx cy w h:
图片
但是我看您的代码里面确是:
float cx = (pdata[0] * 2.f - 0.5f + j) * stride; ///cx
float cy = (pdata[1] * 2.f - 0.5f + i) * stride; ///cy
float w = powf(pdata[2] * 2.f, 2.f) * anchor_w; ///w
float h = powf(pdata[3] * 2.f, 2.f) * anchor_h; ///h

不知道怎么理解?

Check the box position decoding code in the forward method, the detector predicts boxes on neighbouring grid as well