forked from openvinotoolkit/anomalib
-
Notifications
You must be signed in to change notification settings - Fork 1
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
metrics[4 and 5 refactored] save results and compare models [GSoC23 cont'd] #12
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 837fa7a.
This was referenced Sep 5, 2023
jpcbertoldo
changed the title
metrics[4 and 5 refactored] save results and compare models
metrics[4 and 5 refactored] save results and compare models [GSoC23 cont'd]
Sep 6, 2023
Replaced by openvinotoolkit#1557 to catch up with v1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a continuation of Anomaly Segmentation Metrics for Anomalib — GSoC 2023 @ OpenVINO.
Updated PRs at https://gist.github.com/jpcbertoldo/12553b7eaa97cfbf3e55bfd7d1cafe88?permalink_comment_id=4681988#gistcomment-4681988
Replaces #9 and #10 after a refactor on the
PImOResult
, which became a dataclass incorporating the save and load methods.Refactors
Return types
PImOResult
becomes a dataclass holding all the information for pimo curves, and the aucs from AUPImO becomes an analogousAUPImOResult
.Others
Adress this and move the logic of the plots from
AULogPImO
to a functional interface (classes practically just pass the arguments).Save & Load
Make it possible to save and load pimo curves and their aucs.
PImOResult
will save the curves' metadat (shared fpr type and bounds) all the returns (fprs, tprs, shared fpr, etc) in a dict of tensors in a.pt
so the curves are fully recoverable.AUPImOResult
will save the auc's metadata (shared fpr type, bounds, thresholds of the bounds) in a JSON file so it can be human readable.Compare models
Add utilities to compare two or more models on the same dataset with a per-image metric.
Two types of comparison are proposed: parametric (the metric values) and non-parametric (ranks, i.e. sorting of models). For each method, there is a statistical test (respec., paired t-test and wilcoxon signed rank test) and a plot that visually explains the test.
Plots can eventually show multiple (>2) methods, but the statistical tests are performed pairwise.
Results are read in a table with rows and columns are model names (
model1
andmodel2
) sorted by their average score or rank.Statistical tests:
method1
(row) >method2
(column).1 - pvalue
).Example of parametric comparison (
AULogPImO
):Example of non-parametric comparison from the parametric above:
List of refactors before merging feature branch:
https://github.com/jpcbertoldo/anomalib/blob/metrics/refactors/src/anomalib/utils/metrics/perimg/.refactors
Adds from this PR
Changes
Checklist