Skip to content
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

使用opencv加载caffe模型,预测关键点特别不准 #42

Open
BenJaminKen opened this issue Jun 5, 2019 · 5 comments
Open

使用opencv加载caffe模型,预测关键点特别不准 #42

BenJaminKen opened this issue Jun 5, 2019 · 5 comments

Comments

@BenJaminKen
Copy link

BenJaminKen commented Jun 5, 2019

cv::Mat inputBlob = cv::dnn::blobFromImage(roi, std_val, cv::Size(60, 60), cv::Scalar(127.5));
net.setInput(inputBlob, "data");
cv::Mat prob = net.forward("Dense3");
for (int i = 0; i < 136; i += 2) {
int x = int(prob.at(0, i)*roi.cols);
int y = int(prob.at(0, i + 1)*roi.rows);
cv::Point curr_pt = cv::Point(x,y);
cv::circle(roi, curr_pt, 2, cv::Scalar(0, 255, 0));
}

@panda-lab
Copy link
Owner

有可能dnn的精度跟caffe有些差别

@lynx-liu
Copy link

@BenJaminKen 大神, 有完整的源码吗,我想测试一下opencv加载的caffe模型效果怎么样

@lynx-liu
Copy link

@BenJaminKen @lsy17096535 opencv试了, 效果和caffe差不多, 看不出什么差别, @lsy17096535 的代码是错的, 效果肯定不对

@ctxqlxs
Copy link

ctxqlxs commented Feb 14, 2020

@llxxhm 我试了下确实不太对啊,请教下代码的错误位置。。

@xuguozhi
Copy link

xuguozhi commented Aug 3, 2020

用opencv dnn 读取 predict出来的点一塌糊涂。。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants