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

Clipping bbox in the mAP evaluator calculation. #8872

Merged
merged 1 commit into from
Mar 8, 2018

Conversation

qingqing01
Copy link
Contributor

Fix #8871

inline void ClipBBox(const Box& bbox, Box* clip_bbox) const {
T one = static_cast<T>(1.0);
T zero = static_cast<T>(0.0);
clip_bbox->xmin = std::max(std::min(bbox.xmin, one), zero);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clip_bbox --> clipped_bbox

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

@@ -144,6 +144,15 @@ class DetectionMAPOpKernel : public framework::OpKernel<T> {
}
}

inline void ClipBBox(const Box& bbox, Box* clip_bbox) const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you can pass Box& clipped_bbox

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not change it. Thanks!

Copy link
Contributor

@pkuyym pkuyym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qingqing01 qingqing01 merged commit ffda2c4 into PaddlePaddle:develop Mar 8, 2018
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

Successfully merging this pull request may close these issues.

2 participants