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

Add DRAEM Model #344

Merged
merged 22 commits into from
Jun 8, 2022
Merged

Add DRAEM Model #344

merged 22 commits into from
Jun 8, 2022

Conversation

djdameln
Copy link
Contributor

@djdameln djdameln commented Jun 2, 2022

Description

Known issues:

  • Benchmarking results are not yet available. This algorithm is pretty slow (a few hours per training run), so it will take some time before I manage to collect the numbers for all categories.
  • I'm using borrowed code for the Perlin noise generation. This module is a bit messy and will need to be refactored in the future.

Questions/Discussion:

  • I feel that the augmenter class in anomalib/models/draem/augmenter.py could be useful for other models as well. We could consider moving it to components
  • I ran into some problems with the pre-processor, because it assumes that we always want to normalize the input images to the ImageNet stats. For DRAEM this was not the case. It would be good to revisit this.

Changes

  • Bug fix (non-breaking change which fixes an issue)
  • 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

@djdameln djdameln changed the title Da/draem algo implementation Add DRAEM Model Jun 2, 2022
anomalib/models/draem/__init__.py Outdated Show resolved Hide resolved
anomalib/models/draem/augmenter.py Outdated Show resolved Hide resolved
anomalib/models/draem/augmenter.py Outdated Show resolved Hide resolved
anomalib/models/draem/config.yaml Show resolved Hide resolved
anomalib/models/draem/lightning_model.py Outdated Show resolved Hide resolved
anomalib/models/draem/lightning_model.py Outdated Show resolved Hide resolved
anomalib/models/draem/loss.py Outdated Show resolved Hide resolved
anomalib/models/draem/loss.py Outdated Show resolved Hide resolved
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! I have gone through my first round of review.

anomalib/models/draem/__init__.py Outdated Show resolved Hide resolved
anomalib/models/draem/augmenter.py Outdated Show resolved Hide resolved
anomalib/models/draem/augmenter.py Outdated Show resolved Hide resolved
anomalib/models/draem/lightning_model.py Outdated Show resolved Hide resolved
anomalib/models/draem/lightning_model.py Show resolved Hide resolved
anomalib/models/draem/augmenter.py Outdated Show resolved Hide resolved
anomalib/models/draem/loss.py Outdated Show resolved Hide resolved
anomalib/models/draem/loss.py Outdated Show resolved Hide resolved
anomalib/models/draem/__init__.py Outdated Show resolved Hide resolved
anomalib/models/draem/LICENSE Show resolved Hide resolved
anomalib/models/draem/loss.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.

I have a few minor comments

anomalib/models/draem/perlin.py Outdated Show resolved Hide resolved
anomalib/models/draem/torch_model.py Outdated Show resolved Hide resolved
anomalib/models/draem/torch_model.py Outdated Show resolved Hide resolved
@samet-akcay samet-akcay self-requested a review June 7, 2022 13:09
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 the changes!

@samet-akcay samet-akcay self-requested a review June 8, 2022 06:46
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.

@samet-akcay samet-akcay merged commit 1dcbe1a into development Jun 8, 2022
@samet-akcay samet-akcay deleted the da/draem-algo-implementation branch June 8, 2022 11:05
@hihunjin
Copy link

@samet-akcay Hi. Thanks for your implementation. Did you experiment this model on the whole MVTec AD datasets? If so, please share them.

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.

Add DRAEM Model
4 participants