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

Enable simplex 2d noise for Synthetic dataset #1056

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

WenjingKangIntel
Copy link
Contributor

@WenjingKangIntel WenjingKangIntel commented Apr 27, 2023

Description

Need to discuss whether the init function of AnomalibDataModule is proper. if proper, needs to enable other dataset other than mvtec.

Some other thoughts:
We may need add some APIs to determine mixing ratios of two different types of noises, i.e. perlin2d and simplex2d, instead of using only one type of noise.

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

yzheng124 and others added 4 commits April 27, 2023 23:12
Signed-off-by: yzheng124 <yi.zheng@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
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.

This will be very useful. I am fine with the design but maybe @djdameln might have some thoughts about this. There is one issue with circular import though when I try to run the code.

src/anomalib/data/utils/generators/opensimplex.py Outdated Show resolved Hide resolved
from torch import Tensor

try:
from numba import njit, prange
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can add numba to optional requirements. Thoughts @samet-akcay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

numba should be added into requirements, otherwise it would be very slow ...

Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
@github-actions github-actions bot added the Dependencies Pull requests that update a dependency file label Apr 28, 2023
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 updating this. I am almost fine with the changes.

src/anomalib/data/noise.py Outdated Show resolved Hide resolved
WenjingKangIntel and others added 8 commits May 4, 2023 09:05
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: yzheng124 <yi.zheng@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
Copy link
Contributor

@djdameln djdameln left a comment

Choose a reason for hiding this comment

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

Thanks, this is a simple yet useful extension of the random noise augmentation mechanism. We might need to make some changes to the configuration part in the config.yaml to ensure compatibility with other hackathon submissions, but we will sort this out on our side.

@samet-akcay samet-akcay removed the T3 label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Enabling Unsupervised Workflow: Propose a new thresholding approach
5 participants