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

Compute iou locally #638

Merged
merged 5 commits into from
May 31, 2023
Merged

Compute iou locally #638

merged 5 commits into from
May 31, 2023

Conversation

dcaustin33
Copy link
Contributor

Compute iou locally instead of hitting hf hub - reduces dependency on hf hub and speeds up by about 4 seconds for 20 examples (55 down to 51) think this can be optimized further

@dcaustin33 dcaustin33 requested a review from a team as a code owner May 31, 2023 18:33
# fill the nans with 0s
union_pixels_per_class = np.nan_to_num(union_pixels_per_class)

return iou_per_class, union_pixels_per_class
Copy link
Contributor

Choose a reason for hiding this comment

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

so iou per class can have nans but not area per class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah IoU of 0 has a meaning (ie no intersection) so we keep it as nan vs 0 area is the correct terminology when we have nan in area

@dcaustin33 dcaustin33 merged commit 8ef5c60 into main May 31, 2023
@dcaustin33 dcaustin33 deleted the feature/compute_iou_locally branch May 31, 2023 19:53
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