yolov5-lite-onnxruntime
yolov5-lite-onnxruntime copied to clipboard
c++demo 标定框是负数
我的c++标定框是负数,降了onnx版本也不行。
已解决:除了issue #8 中提到了降低onnx版本,我参照了.py的代码,发现cpp demo中标定框计算有误,应将代码Line 233-241改为如下: float cx = (preds[0] - padw) * ratiow; ///cx float cy = (preds[1] - padh) * ratioh; ///cy float w = preds[2] * ratiow; ///w float h = preds[3] * ratioh; ///h
float xmin = (cx - 0.5 * w); float ymin = (cy - 0.5 * h); float xmax = (cx + 0.5 * w); float ymax = (cy + 0.5 * h);
更新:这个代码也是有问题的,但是不知怎么解决了。。。
@defzhangaa 不然你加我联系方式?讨论一下?V:pcycccccc
@defzhangaa 不然你加我联系方式?讨论一下?V:pcycccccc
我更新了一下昨天的Code,发现改成上面这个就可以跑通了