-
Notifications
You must be signed in to change notification settings - Fork 836
feat(postprocess): add MEBin post-processing method #2928
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
feat(postprocess): add MEBin post-processing method #2928
Conversation
acc97fb to
d1d0080
Compare
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…chCore, Padim, Dfkde (open-edge-platform#2913) * refactor patchcore, use list instead of cat * typo in patchcore Signed-off-by: Alfie Roddan <51797647+alfieroddan@users.noreply.github.com> * padim model to now use cat instead of list Signed-off-by: Alfie Roddan <51797647+alfieroddan@users.noreply.github.com> * dfm and padim update cat to list Signed-off-by: Alfie Roddan <51797647+alfieroddan@users.noreply.github.com> * add dfkde cat to list changes Signed-off-by: Alfie Roddan <51797647+alfieroddan@users.noreply.github.com> * change assert from memory bank to list size, fix pre-commit issues Signed-off-by: Alfie Roddan <51797647+alfieroddan@users.noreply.github.com> --------- Signed-off-by: Alfie Roddan <51797647+alfieroddan@users.noreply.github.com> Signed-off-by: StarPlatinum7 <2732981250@qq.com>
Signed-off-by: StarPlatinum7 <2732981250@qq.com>
Signed-off-by: StarPlatinum7 <2732981250@qq.com>
Signed-off-by: StarPlatinum7 <2732981250@qq.com>
…#2920) * added histogram of anomaly scores * Update src/anomalib/metrics/anomaly_score_distribution.py Co-authored-by: Samet Akcay <samet.akcay@intel.com> Signed-off-by: Aimira Baitieva <63813435+abc-125@users.noreply.github.com> * Update anomaly_score_distribution.py * Update anomaly_score_distribution.py * Fixed pre-commit checks --------- Signed-off-by: Aimira Baitieva <63813435+abc-125@users.noreply.github.com> Co-authored-by: Samet Akcay <samet.akcay@intel.com> Signed-off-by: StarPlatinum7 <2732981250@qq.com>
* 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> Signed-off-by: StarPlatinum7 <2732981250@qq.com>
6717b2b to
575632f
Compare
rajeshgangireddy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Thanks for the addition of this post processor.
Apologies for somehow missing to review it.
I have now left. some comments.
| 2. Counting connected components at each threshold level | ||
| 3. Finding stable intervals where component count remains constant | ||
| 4. Selecting threshold from the longest stable interval | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a link to the AnomalyNCD paper as reference.
|
|
||
|
|
||
|
|
||
| def get_threshold(self, anomaly_num_sequence, min_interval_len): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the type annotation for function arguments and returns.
| from anomalib.post_processing import MEBinPostProcessor | ||
|
|
||
|
|
||
| class TestMEBinPostProcessor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a circular import error when running this test.
E ImportError: cannot import name 'PostProcessor' from partially initialized module 'anomalib.post_processing' (most likely due to a circular import) (/anomalib/src/anomalib/post_processing/__init__.py)
| import sys | ||
| sys.path.append(os.getcwd()) | ||
|
|
||
| from anomalib.post_processing import PostProcessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid circular import, I think this should work:
| from anomalib.post_processing import PostProcessor | |
| from .post_processor import PostProcessor |
|
I have opened a new PR with your commits + my suggestions here : #3030 (that way your contributions are counted). I will close this PR now, if you don't mind. |
📝 Description
This pull request introduces support for the MEBIN post-processing method within the Anomalib framework. The implementation includes a new post-processing algorithm that mitigates false positives and false negatives in the binarization results by identifying the threshold interval where connected components remains stable. This strategy is proposed in AnomalyNCD (CVPR2025).
✨ Changes
src/anomalib/post_processing/mebin_post_processor.pysrc/anomalib/metrics/threshold/mebin.py__init__.pyfiles to expose new modulesExample Usage
Here's how to use the mebin_post_porocessor in your projects:
Select 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.