未验证 提交 4c2dff88 编写于 作者: D Dmitry Budnikov 提交者: GitHub

Merge pull request #20245 from dbudniko:dbudniko/mtcnn_roi_size_hotfix

Hot fix negative MTCNN PNet ROI coordinates

* fix negative roi start

* some more experiments

* clean up
上级 76e9da3f
......@@ -364,7 +364,8 @@ GAPI_OCV_KERNEL(OCVR_O_NetPreProcGetROIs, R_O_NetPreProcGetROIs) {
for (const auto& face : in_faces) {
cv::Rect tmp_rect = face.bbox.getRect();
//Compare to transposed sizes width<->height
tmp_rect &= cv::Rect(tmp_rect.x, tmp_rect.y, in_image_size.height - tmp_rect.x - 4, in_image_size.width - tmp_rect.y - 4);
tmp_rect &= cv::Rect(tmp_rect.x, tmp_rect.y, in_image_size.height - tmp_rect.x, in_image_size.width - tmp_rect.y) &
cv::Rect(0, 0, in_image_size.height, in_image_size.width);
outs.push_back(tmp_rect);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册