Skip to content

Conversation

ashwinvaidya17
Copy link
Contributor

📝 Description

✨ Changes

Select what type of change your PR is:

  • 🚀 New feature (non-breaking change which adds functionality)
  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔄 Refactor (non-breaking change which refactors the code base)
  • ⚡ Performance improvements
  • 🎨 Style changes (code style/formatting)
  • 🧪 Tests (adding/modifying tests)
  • 📚 Documentation update
  • 📦 Build system changes
  • 🚧 CI/CD configuration
  • 🔧 Chore (general maintenance)
  • 🔒 Security update
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).
  • 🏷️ My PR title follows conventional commit format.

For more information about code review checklists, see the Code Review Checklist.

PaulMcHard and others added 6 commits October 7, 2025 12:04
* 🐞 fix(utils): revert `OptionalImport` class to handle missing optional dependencies (#2956)

* fix(data): enable pin_memory for DataLoader instances across the codebase

This commit updates various DataLoader instances in the project to enable the  option, enhancing performance for data loading on GPU. Changes were made in the following files:

- : Updated train and test DataLoader configurations.
- : Modified datamodule DataLoader to include .
- : Added  to evaluation DataLoader.
- : Updated DataLoader for datasets to utilize .
- : Enabled  for reference dataset DataLoader.
- : Adjusted inference DataLoader to include .

These changes aim to optimize memory usage and improve data transfer speeds during model training and inference.

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* refactor(models): streamline decoder retrieval in  function

This commit refactors the  function in  to utilize a dictionary mapping for decoder architectures, improving readability and maintainability. The previous conditional checks have been replaced with a more efficient approach, enhancing the overall structure of the code.

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* fix(model): update logit_scale initialization to use torch.log for consistency

This commit modifies the initialization of the logit_scale parameter in the CLIP model to utilize torch.log instead of np.log. This change ensures consistency in tensor operations and improves compatibility with PyTorch's computation graph.

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* fix(model): update anomaly map generation to use torch tensors for calculations

This commit modifies the anomaly map generation logic to utilize PyTorch tensors instead of NumPy arrays for various calculations. This change enhances compatibility with the PyTorch computation graph and improves performance by leveraging GPU acceleration. Key updates include the conversion of statistical calculations and tensor operations to use PyTorch functions, ensuring consistency in tensor handling throughout the code.

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* refactor(model): enhance anomaly map generation with PyTorch for statistical calculations

This commit refactors the anomaly map generation logic to replace NumPy-based statistical calculations with PyTorch equivalents, specifically using the  distribution for computing tau. Additionally, it improves precision handling by allowing the use of float64 in high precision mode. The changes streamline the computation process and maintain compatibility with the PyTorch computation graph.

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* chore(license): update license year

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* fix(download): enhance URL validation and update download logic

This commit improves the URL validation in the download function to ensure only http and https schemes are allowed. Additionally, it adds comments to clarify the safety of using  under these conditions, enhancing code readability and security awareness.

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* 🗑️ chore(imports): remove OptionalImport class for optional dependency handling

Signed-off-by: samet-akcay <samet.akcay@intel.com>

* 🐛 fix(imports): Replace OptionalImport with dummy classes for missing dependencies

This commit removes the OptionalImport class and introduces dummy classes for various loggers and video utilities when their respective dependencies are not installed. The changes enhance error messaging by providing clear instructions for installation, improving user experience when encountering missing packages.

Affected files:
- video.py
- comet.py
- mlflow.py
- tensorboard.py
- wandb.py
- ollama.py

Signed-off-by: samet-akcay <samet.akcay@intel.com>

---------

Signed-off-by: samet-akcay <samet.akcay@intel.com>
Signed-off-by: Paul McHard <paulmchard@gmail.com>

* Added 3D-ADAM Dataset

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* Added tests and example config

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* 🔨 fix(semgrep): ignore uv.lock in semgrep (#2972)

ignore uv.lock in semgrep

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
Signed-off-by: Paul McHard <paulmchard@gmail.com>

* 🐞 fix(utils): Run CS Flow model in eval() so the weights of the model itself will not be modified (#2966)

fix in dryrun_find_featuremap_dims: run the model in eval() so the weights of the model itself will not be modified

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* 🐛 fix(ovinferencer): Fix openvino cache directory  (#2979)

🐛 fix(ovinferencer): update cache folder name to 'openvino_cache' and ensure string path for set_property

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* changes per PR and pre-commit checks

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* resolve circular import issue

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* Resolve DownloadInfo URL issue.

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* Resolve DownloadInfo URL

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* restore doc images ignored in error

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* Removed prettier cache included in error, re-run pre-commit hooks

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* explictly resolve EOF error on docs/source/examples

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* resolve filename issue in adam3d test.

Signed-off-by: Paul McHard <paulmchard@gmail.com>

* Restore uv.lock

Signed-off-by: Paul McHard <32065439+PaulMcHard@users.noreply.github.com>

---------

Signed-off-by: samet-akcay <samet.akcay@intel.com>
Signed-off-by: Paul McHard <paulmchard@gmail.com>
Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
Signed-off-by: Paul McHard <32065439+PaulMcHard@users.noreply.github.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Co-authored-by: Rune <60315601+monzelr@users.noreply.github.com>
Co-authored-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
* Add changelog + fix dataset location

Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>

* revert changes to example

Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>

* revert file permissions

Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>

* Fix tests

Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>

---------

Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 85.00000% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/anomalib/data/datasets/depth/adam_3d.py 84.78% 7 Missing ⚠️
src/anomalib/data/datamodules/depth/adam_3d.py 80.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

samet-akcay
samet-akcay previously approved these changes Oct 8, 2025
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.

lgtm, thanks. Only two minor issue

Co-authored-by: Samet Akcay <samet.akcay@intel.com>
Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
Copy link
Contributor

@rajeshgangireddy rajeshgangireddy 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 cleanup.
I tested this - trained all categories on Patchcore without any error and numbers closely matching the ones from paper.

@ashwinvaidya17 ashwinvaidya17 merged commit e2b41c0 into main Oct 8, 2025
14 checks passed
@ashwinvaidya17 ashwinvaidya17 deleted the feature/dataset/3dadam branch October 8, 2025 09:54
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.

📖 [STORY] Integrating the 3D-ADAM Dataset into Anomalib

5 participants