-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不画Bounding Box (出现负数) #5
Comments
请问您具体注释了哪些代码?我也出现了box坐标为负数的情况,期待您的回复 |
用 官方的方式导出python export.py --weights yolov5s.pt --include torchscript onnx |
请问deocde在哪呢,yolo.py里面没找到decode |
请教一下,opencv c++版本的具体怎么修改呢 |
#5 (comment) |
是的,yolo层在onnx文件里,那C++代码的后处理就可以这么写
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年4月25日(周二) 下午5:07
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [hpc203/yolov5-v6.1-opencv-onnxrun] 不画Bounding Box (出现负数) (Issue #5)
#5 (comment)
你只用把,大概170多行
{
//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
}
这段代码替换成
{
float cx = pdata[0];
float cy = pdata[1];
float w = pdata[2];
float h = pdata[3];
}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
请问最后解决了吗? |
请问您最后解决了吗?我也出现了box坐标为负数的情况,期待您的回复 |
今天在测试代码的时候发现,结果没有框。通过print log发现bbox的坐标很大。e.g. [45355, 43453, -43453, -34343]
应该是一个bug出现在postprocess之前,参与anchor那里。我后来把anchor那一部分全部comment掉,运行没有问题。
但我想请教一下anchor,grid在这里起到什么作用?
The text was updated successfully, but these errors were encountered: