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

about DetEval.py evaluation speed boosting. #16

Closed
princewang1994 opened this issue Mar 30, 2019 · 4 comments
Closed

about DetEval.py evaluation speed boosting. #16

princewang1994 opened this issue Mar 30, 2019 · 4 comments

Comments

@princewang1994
Copy link
Contributor

Hi, I found that the evaluation in this code run extremely slowly and most time-consuming operation in your code is area/area_of_intersection/iou. These functions are based on mask counting, which depends highly on the size of images(some big-size images can be bottleck of computing).
I have replaced mask counting operation with polygon coordinate computing(which uses shapely, a geometry lib written in python) so that it highly boosts the evaluatoin process.
Can I make a PR? Hope for your replying, thx.

@ckchng
Copy link
Collaborator

ckchng commented Mar 31, 2019

Oh yes you are most welcome, thanks for wanting to contribute! And I assume that you have already tested out your code? In particular, does the library provides an exact solution instead of approximation when it comes to calculating the area of intersection?

@princewang1994
Copy link
Contributor Author

I have compared the result of mask counting method and polygon based method, their result have a bit difference(1 to 3 pixels in computing iou between 2 polygons with area about 10000 pixels) because mask counting based implement discretize the coordinates to pixels. In fact, I think the polygon based method produce more precise result.

@ckchng
Copy link
Collaborator

ckchng commented Mar 31, 2019

Yup that makes sense. Also, less than 1 percent of differences is probably negligible in practice.

@princewang1994
Copy link
Contributor Author

Thx for your replying, I will make a pull request soon! 😆

@ckchng ckchng closed this as completed Apr 1, 2019
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