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

Segmentation Metrics #5

Merged
merged 19 commits into from
May 14, 2021
Merged

Segmentation Metrics #5

merged 19 commits into from
May 14, 2021

Conversation

jhabr
Copy link
Owner

@jhabr jhabr commented May 13, 2021

This PR adds the calculation of several segmentation metrics. It's based on this repo.

Note that there seems to be a bug in the calculation that needs to be addressed.

TODO: Write test for tp, tn, fp, fn.

This is the API to use (model independent):

from utils.metrics import Metrics

metrics = Metrics().calculate_batch(
    masks=test_masks,
    predicted_masks=predicted_masks
)

print(metrics)

return self._matches['in_ref_only']

@property
#TODO: fix
Copy link
Owner Author

Choose a reason for hiding this comment

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

Disitinguish between false negatives and false positives.


def test_true_positives(self):
"""TP: pixels correctly segmented as foreground"""
pass
Copy link
Owner Author

Choose a reason for hiding this comment

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

Implement here...

@jhabr jhabr merged commit dfa4b75 into main May 14, 2021
@jhabr jhabr deleted the feature/metrics branch May 14, 2021 17:35
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.

1 participant