ADAM3D

ADAM3D#

3D-ADAM Datamodule.

This module provides a PyTorch Lightning DataModule for the 3D-ADAM dataset. The dataset contains RGB and depth image pairs for anomaly detection tasks.

Example

Create a ADAM3D datamodule:

>>> from anomalib.data import ADAM3D
>>> datamodule = ADAM3D(
...     root="./datasets/ADAM3D",
...     category="1m1"
... )
License:

3D-ADAM dataset is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). https://creativecommons.org/licenses/by-nc-sa/4.0/

Reference: https://arxiv.org/abs/2507.07838

class anomalib.data.datamodules.depth.adam_3d.ADAM3D(root='./datasets/ADAM3D', category='1m1', train_batch_size=32, eval_batch_size=32, num_workers=8, train_augmentations=None, val_augmentations=None, test_augmentations=None, augmentations=None, test_split_mode=TestSplitMode.FROM_DIR, test_split_ratio=0.2, val_split_mode=ValSplitMode.SAME_AS_TEST, val_split_ratio=0.5, seed=None)#

Bases: AnomalibDataModule

3D-ADAM Datamodule.

Parameters:
  • root (Path | str | None) – Path to the root of the dataset. Defaults to "./datasets/ADAM3D".

  • category (str) – Category of the 3D-ADAM dataset (e.g. "1m1" or "spiral_gear"). Defaults to "1m1".

  • train_batch_size (int) – Training batch size. Defaults to 32.

  • eval_batch_size (int) – Test batch size. Defaults to 32.

  • num_workers (int) – Number of workers for data loading. Defaults to 8.

  • train_augmentations (Transform | None) – Augmentations to apply to the training images Defaults to None.

  • val_augmentations (Transform | None) – Augmentations to apply to the validation images. Defaults to None.

  • test_augmentations (Transform | None) – Augmentations to apply to the test images. Defaults to None.

  • augmentations (Transform | None) – General augmentations to apply if stage-specific augmentations are not provided.

  • test_split_mode (TestSplitMode | str) – Method to create test set. Defaults to TestSplitMode.FROM_DIR.

  • test_split_ratio (float) – Fraction of data to use for testing. Defaults to 0.2.

  • val_split_mode (ValSplitMode | str) – Method to create validation set. Defaults to ValSplitMode.SAME_AS_TEST.

  • val_split_ratio (float) – Fraction of data to use for validation. Defaults to 0.5.

  • seed (int | None) – Random seed for reproducibility. Defaults to None.

prepare_data()#

Download the dataset if not available.

Return type:

None