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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 Fix inference for draem #470

Merged
merged 2 commits into from
Aug 2, 2022
Merged

馃悶 Fix inference for draem #470

merged 2 commits into from
Aug 2, 2022

Conversation

djdameln
Copy link
Contributor

@djdameln djdameln commented Aug 1, 2022

Description

This PR fixes inference for DRAEM and possibly other models.

  • The transform config files were not loaded correctly in each of the three inferencers, so the default transform config was always used. This is solved now by retrieving the transform config from the config file using the correct key.
  • The torch model from the DRAEM implementation now returns an anomaly map when in inference mode, instead of the confidence scores for both classes. This makes the model compatible with the torch and openvino inferencers.

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

@ashwinvaidya17
Copy link
Collaborator

If OpenVINO inference works for DRAEM can you add it to this test https://github.com/openvinotoolkit/anomalib/blob/main/tests/pre_merge/deploy/test_inferencer.py#L88

@samet-akcay
Copy link
Contributor

If OpenVINO inference works for DRAEM can you add it to this test https://github.com/openvinotoolkit/anomalib/blob/main/tests/pre_merge/deploy/test_inferencer.py#L88

I agree, it might be an idea to add DRAEM to the 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 for the fix!

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 for identifying the issue!

@samet-akcay samet-akcay changed the title fix inference for draem 馃悶 Fix inference for draem Aug 2, 2022
@samet-akcay samet-akcay merged commit 92a4b95 into main Aug 2, 2022
@samet-akcay samet-akcay deleted the da/draem-inference branch August 2, 2022 10:53
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.

None yet

3 participants