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

Fix patchcore image-level score computation #580

Merged
merged 4 commits into from
Sep 26, 2022

Conversation

djdameln
Copy link
Contributor

@djdameln djdameln commented Sep 23, 2022

Description

Changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which refactors the code base)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the pre-commit style and check guidelines of this project.
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

Copy link
Contributor

@samet-akcay samet-akcay left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix! It's been waiting for too long

anomalib/models/patchcore/torch_model.py Outdated Show resolved Hide resolved
anomalib/models/patchcore/torch_model.py Outdated Show resolved Hide resolved
Copy link
Contributor

@samet-akcay samet-akcay left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Collaborator

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

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

Thanks. Much cleaner as well!

@samet-akcay samet-akcay merged commit 6c59e1b into main Sep 26, 2022
@samet-akcay samet-akcay deleted the da/patchcore-image-score branch September 26, 2022 12:42
samet-akcay pushed a commit that referenced this pull request Sep 26, 2022
* 🛠 Fix PatchCore image-level score computation (#580)

* fix patchcore image-level score computation

* docstring and comment

* remove default value for n_neighbors

* torch.Tensor -> Tensor

* Minor refactor

Co-authored-by: Dick Ameln <dick.ameln@intel.com>
Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com>
samet-akcay added a commit that referenced this pull request Sep 27, 2022
* Add benchmark to tutorial

* Move export to tutorials

* Move hpo to tutorials

* Move inference to tutorials

* Move logging to tutorials

* Create installation in tutorials

* Create training to tutorials

* Create tutorials index

* Update conf.py file

* Add anomalib logos to logos directory

* Add data docs

* Add algos

* Add model docs

* Add reference api

* Remove blank line in metrics

* Add reference guide

* Add how to guides

* Add developer guide

* Add blog to how-to-guide

* Remove guides directory

* Add train custom data to how-to-guides

* Fix typos

* Add notebooks to how-to-guides

* Add anomalib favicon

* Add missing algo descriptions

* Rename Reference to Reference Guide

* Add how to add a new model

* fix typos

* Merge PR 544

* Minor refactor (#587)

* 🛠 Fix PatchCore image-level score computation (#580)

* fix patchcore image-level score computation

* docstring and comment

* remove default value for n_neighbors

* torch.Tensor -> Tensor

* Minor refactor

Co-authored-by: Dick Ameln <dick.ameln@intel.com>
Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com>

* Address Dicks comments

Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Co-authored-by: Dick Ameln <dick.ameln@intel.com>
Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com>
@cyj95
Copy link

cyj95 commented Oct 11, 2022

图片
pixel level score is still lower than official version.
for example.
“wood” category,your version:92.8,official version:95.1

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.

Is the PatchCore image-level anomaly score correctly calculated?
4 participants