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

Minor fixes #1182

Merged
merged 12 commits into from
Jul 20, 2023
Merged

Conversation

alexriedel1
Copy link
Contributor

Description

It can happen for some models, that the output anomaly map can have an extra dimension [8,1,256,256] whereas the ground truth mask has not. This causes an error. To fix this, the squeeze function is added before calculating pixel metrix.

This PR uses an ImportWarning instead of an ImportError for missing OpenVINO install. Otherwise without OpenVINO installed anomalib will crash.

Also this PR makes a change on how to read augmentation config from the config file to make image size HPO sweeps more accesible.

Also the PR adresses #1177 and some other issues with the tensor shape for torch.quantile being too large in the efficientad torch model during training

  • Fixes # (issue)

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).

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 @alexriedel1, some minor comments only

src/anomalib/data/utils/transform.py Outdated Show resolved Hide resolved
src/anomalib/models/efficient_ad/torch_model.py Outdated Show resolved Hide resolved
src/anomalib/models/efficient_ad/torch_model.py Outdated Show resolved Hide resolved
src/anomalib/models/efficient_ad/torch_model.py Outdated Show resolved Hide resolved
@blaz-r
Copy link
Contributor

blaz-r commented Jul 14, 2023

I have just one question. Does that extra dimension really cause issues for pixel metrics? I believe that I haven't encountered that, but it is possible that this is due to nature of ROC where entire tensor gets flattened anyway.

@alexriedel1
Copy link
Contributor Author

I have just one question. Does that extra dimension really cause issues for pixel metrics? I believe that I haven't encountered that, but it is possible that this is due to nature of ROC where entire tensor gets flattened anyway.

I had some cases where the additional dimension in the heat maps caused an error.

@alexriedel1
Copy link
Contributor Author

Thanks @alexriedel1, some minor comments only

done!

@alexriedel1
Copy link
Contributor Author

ok now its done i guess :)

@samet-akcay samet-akcay merged commit 2083c51 into openvinotoolkit:main Jul 20, 2023
4 checks passed
@ashwinvaidya17 ashwinvaidya17 mentioned this pull request Aug 28, 2023
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.

3 participants