Skip to content

Add dice jaccard callbacks #450

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

Merged
merged 15 commits into from
Nov 4, 2019

Conversation

ternaus
Copy link
Contributor

@ternaus ternaus commented Oct 13, 2019

No description provided.

@jchen42703 jchen42703 mentioned this pull request Oct 14, 2019
10 tasks
@ternaus
Copy link
Contributor Author

ternaus commented Oct 28, 2019

PTAL @Scitator

@@ -41,4 +49,89 @@ def __init__(

JaccardCallback = IouCallback

__all__ = ["IouCallback", "JaccardCallback"]

def calculate_jaccard(tp_fp_fn_dict: dict) -> np.array:
Copy link
Member

Choose a reason for hiding this comment

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

looks like we can remove the code duplication here also


tp_fp_fn_dict = calculate_tp_fp_fn(self.confusion_matrix)

batch_metrics: Dict = calculate_jaccard(tp_fp_fn_dict)
Copy link
Member

Choose a reason for hiding this comment

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

here you can use just calculate_jaccard(**tp_fp_fn_dict)

@Scitator Scitator merged commit 005eab9 into catalyst-team:master Nov 4, 2019
@ternaus ternaus deleted the add_dice_jaccard_callbacks branch November 4, 2019 15:49
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.

3 participants