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

Why plus 1 when calculating the box_area ? #17

Open
wujiyang opened this issue May 15, 2018 · 1 comment
Open

Why plus 1 when calculating the box_area ? #17

wujiyang opened this issue May 15, 2018 · 1 comment

Comments

@wujiyang
Copy link

wujiyang commented May 15, 2018

In the file : dface/core/utils.py.IoU
box_area = (box[2] - box[0] + 1) * (box[3] - box[1] + 1)
area = (boxes[:, 2] - boxes[:, 0] + 1) * (boxes[:, 3] - boxes[:, 1] + 1)

Is there any tircks has been used when calculating the box_area ? why plus 1 ?

for example,the box[1, 1, 2, 2], the area should be 1, not (2-1+1) * (2-1+1) = 4 ?

@kuaikuaikim
Copy link
Owner

The count of pixel

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

2 participants