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

Replace cdist in Patchcore #1267

Merged
merged 1 commit into from Aug 14, 2023
Merged

Conversation

blaz-r
Copy link
Contributor

@blaz-r blaz-r commented Aug 14, 2023

Description

This PR replaces torch cdist that causes errors when it's exported to Onnx and OpenVINO. Performance stays the same, as new functions matches cdist in precision up to 10e-7, with small difference occurring due to numerical instability.

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
  • I have added a summary of my changes to the CHANGELOG (not for minor changes, docs and tests).

@blaz-r blaz-r requested a review from djdameln as a code owner August 14, 2023 15:42
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 for addressing this @blaz-r

@samet-akcay samet-akcay merged commit 4f51177 into openvinotoolkit:main Aug 14, 2023
6 checks passed
@samet-akcay samet-akcay linked an issue Aug 15, 2023 that may be closed by this pull request
@samet-akcay samet-akcay linked an issue Aug 15, 2023 that may be closed by this pull request
samet-akcay added a commit that referenced this pull request Aug 15, 2023
* Configure readthedocs via `.readthedocs.yaml` file (#1229)

* 🚚 Refactor Benchmarking Script (#1216)

* New printing stuff

* Remove dead code + address codacy issues

* Refactor try/except + log to comet/wandb during runs

* pre-commit error

* third-party configuration

---------

Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com>

* Update CODEOWNERS

* Enable training with only normal images for MVTec (#1241)

* ignore mask check when dataset has only normal samples

* update changelog

* Revert "🚚 Refactor Benchmarking Script" (#1239)

Revert "🚚 Refactor Benchmarking Script (#1216)"

This reverts commit 784767f.

* Update benchmarking notebook (#1242)

* Fix metadata path

* Update benchmarking notebook

* Fix links to model architecture images (#1245)

* Fix links to architecture images

* Change links to raw files

* Wandb unwatch method belongs to experiment, not logger (#1246)

unwatch method belongs to experiment, not logger

* (Minor change) Added the tracer_kwargs to the TorchFXFeatureExtractor class (#1214)

* Added tracer_kwargs to torchfx

* Added tracer_kwargs on docstring

* Replace cdist in Patchcore (#1267)

* Ignore hidden directories when creating `Folder` dataset (#1268)

* Remove `config` from argparse in OpenVINO inference script. (#1257)

* Fix metadata path

* Remove leftover argument

* Update openvino entrypoint script

* Fix EfficientAD number of steps for optimizer lr change? (#1266)

* Fix metadata path

* Fix number of steps

---------

Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com>
Co-authored-by: Dick Ameln <dick.ameln@intel.com>
Co-authored-by: Blaž Rolih <61357777+blaz-r@users.noreply.github.com>
Co-authored-by: Sean Aubin <seanaubin@gmail.com>
Co-authored-by: JoaoGuibs <32060480+JoaoGuibs@users.noreply.github.com>
@ashwinvaidya17 ashwinvaidya17 mentioned this pull request Aug 28, 2023
@blaz-r blaz-r deleted the patchcore_fix branch September 4, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants