🚀 feat(metric): added PGn, PBn metrics#2889
Merged
rajeshgangireddy merged 9 commits intoopen-edge-platform:mainfrom Sep 5, 2025
Merged
🚀 feat(metric): added PGn, PBn metrics#2889rajeshgangireddy merged 9 commits intoopen-edge-platform:mainfrom
rajeshgangireddy merged 9 commits intoopen-edge-platform:mainfrom
Conversation
samet-akcay
requested changes
Sep 1, 2025
Contributor
samet-akcay
left a comment
There was a problem hiding this comment.
Thanks @abc-125. Just a single minor comment. The rest looks great!
rajeshgangireddy
previously approved these changes
Sep 2, 2025
Contributor
rajeshgangireddy
left a comment
There was a problem hiding this comment.
Thank you for the contribution.
Could you please add the URL to the paper in src/anomalib/metrics/pg_pb.py
Contributor
Author
Yes, I have added the reference information. |
rajeshgangireddy
previously approved these changes
Sep 3, 2025
Contributor
rajeshgangireddy
left a comment
There was a problem hiding this comment.
Thanks for the contribution. LGTM.
samet-akcay
previously approved these changes
Sep 3, 2025
auto-merge was automatically disabled
September 3, 2025 18:13
Head branch was pushed to by a user without write access
92865b9
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
15 tasks
alexriedel1
pushed a commit
to alexriedel1/anomalib
that referenced
this pull request
Oct 6, 2025
* added pg and pb metrics * fixed typos * Update __init__.py * Update __init__.py - removed duplicate * Update pg_pb.py * Fixed pre-commit checks --------- Co-authored-by: Samet Akcay <samet.akcay@intel.com> Co-authored-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>
This file contains hidden or 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
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
Added PGn and PBn metrics for binary image-level classification tasks.
This module provides two metrics for evaluating binary image-level classification performance
on assumption that bad (anomalous) samples are considered to be positive class:
PGn: Presorted good with n% bad samples missed, can be interpreted as true negative rateat a fixed false negative rate (TNR@nFNR).
PBn: Presorted bad with n% good samples misclassified, can be interpreted as true positive rateat a fixed false positive rate (TPR@nFPR).
These metrics emphasize the practical applications of anomaly detection models by showing their potential
to reduce human operator workload while maintaining an acceptable level of misclassification.
More details can be found in this paper.
✨ Changes
src/anomalib/metrics/pg_pb.pysrc/anomalib/metrics/__init__.pytests/unit/metrics/test_pg_pb.pySelect what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.