We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
void UltraFace::generateBBox(std::vector &bbox_collection, MNN::Tensor *scores, MNN::Tensor *boxes) { for (int i = 0; i < num_anchors; i++) { if (scores->host()[i * 2 + 1] > score_threshold) { FaceInfo rects; float x_center = boxes->host()[i * 4] * center_variance * priors[i][2] + priors[i][0]; float y_center = boxes->host()[i * 4 + 1] * center_variance * priors[i][3] + priors[i][1]; float w = exp(boxes->host()[i * 4 + 2] * size_variance) * priors[i][2]; float h = exp(boxes->host()[i * 4 + 3] * size_variance) * priors[i][3];
rects.x1 = clip(x_center - w / 2.0, 1) * image_w; rects.y1 = clip(y_center - h / 2.0, 1) * image_h; rects.x2 = clip(x_center + w / 2.0, 1) * image_w; rects.y2 = clip(y_center + h / 2.0, 1) * image_h; rects.score = clip(scores->host<float>()[i * 2 + 1], 1); bbox_collection.push_back(rects); } }
} 就是这段代码中 ,x_center y_center w h这几个参数为什么以这样的方式生成,推理过程中为什么先有先验框的信息,这是rfb这个网络独有的吗
The text was updated successfully, but these errors were encountered:
经查看python代码 大致理解。
Sorry, something went wrong.
No branches or pull requests
void UltraFace::generateBBox(std::vector &bbox_collection, MNN::Tensor *scores, MNN::Tensor *boxes) {
for (int i = 0; i < num_anchors; i++) {
if (scores->host()[i * 2 + 1] > score_threshold) {
FaceInfo rects;
float x_center = boxes->host()[i * 4] * center_variance * priors[i][2] + priors[i][0];
float y_center = boxes->host()[i * 4 + 1] * center_variance * priors[i][3] + priors[i][1];
float w = exp(boxes->host()[i * 4 + 2] * size_variance) * priors[i][2];
float h = exp(boxes->host()[i * 4 + 3] * size_variance) * priors[i][3];
}
就是这段代码中 ,x_center y_center w h这几个参数为什么以这样的方式生成,推理过程中为什么先有先验框的信息,这是rfb这个网络独有的吗
The text was updated successfully, but these errors were encountered: