Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ADAM3D

```{eval-rst}
.. automodule:: anomalib.data.datamodules.depth.adam_3d
:members:
:undoc-members:
:show-inheritance:
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Anomalib provides datamodules for handling depth-based anomaly detection dataset
```{grid} 2
:gutter: 2

:::{grid-item-card} ADAM 3D
:link: adam_3d
:link-type: doc

3D-ADAM (3D Anomaly Detection in Additive Manufacturing) Dataset for surface defects
:::

:::{grid-item-card} MVTec 3D
:link: mvtec_3d
:link-type: doc
Expand All @@ -26,6 +33,7 @@ Custom folder-based 3D datamodule for organizing your own depth-based anomaly de
:hidden:
:maxdepth: 1

adam_3d
mvtec_3d
folder_3d
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ Custom folder-based dataset organization.
Surface defect detection in electrical commutators.
:::

:::{grid-item-card} MPDD
:link: anomalib.data.datamodules.image.MPDD
:link-type: doc

Metal parts defect detection dataset for visual defect detection in manufacturing
:::

:::{grid-item-card} MVTecAD
:link: anomalib.data.datamodules.image.MVTecAD
:link-type: doc
Expand Down Expand Up @@ -96,7 +103,7 @@ Visual Anomaly dataset.

```{eval-rst}
.. automodule:: anomalib.data
:members: BMAD, BTech, Datumaro, Folder, Kolektor, MVTecAD, MVTecAD2, MVTecLOCO, RealIAD, Tabular, VAD, Visa
:members: BMAD, BTech, Datumaro, Folder, Kolektor, MPDD, MVTecAD, MVTecAD2, MVTecLOCO, RealIAD, Tabular, VAD, Visa
:undoc-members:
:show-inheritance:
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# MPDD

```{eval-rst}
.. automodule:: anomalib.data.datamodules.image.mpdd
:members:
:undoc-members:
:show-inheritance:
```
163 changes: 162 additions & 1 deletion docs/source/markdown/guides/reference/metrics/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,168 @@
# Metrics

Anomalib provides a comprehensive set of metrics for evaluating anomaly detection model performance. All metrics extend TorchMetrics' functionality with Anomalib-specific features.

## Available Metrics

### Area Under Curve Metrics

::::{grid} 2
:gutter: 2

:::{grid-item-card} AUROC
:link: anomalib.metrics.AUROC
:link-type: doc

Area Under the Receiver Operating Characteristic curve. Measures the model's ability to distinguish between normal and anomalous samples.
:::

:::{grid-item-card} AUPR
:link: anomalib.metrics.AUPR
:link-type: doc

Area Under the Precision-Recall curve. Particularly useful for imbalanced datasets.
:::

:::{grid-item-card} AUPRO
:link: anomalib.metrics.AUPRO
:link-type: doc

Area Under the Per-Region Overlap curve. Evaluates pixel-level anomaly localization performance.
:::

:::{grid-item-card} AUPIMO
:link: anomalib.metrics.AUPIMO
:link-type: doc

Area Under the Per-Image Missed Overlap curve. Advanced metric for evaluating localization quality.
:::

::::

### F1 Score Metrics

::::{grid} 2
:gutter: 2

:::{grid-item-card} F1Score
:link: anomalib.metrics.F1Score
:link-type: doc

Standard F1 score for binary classification. Harmonic mean of precision and recall.
:::

:::{grid-item-card} F1Max
:link: anomalib.metrics.F1Max
:link-type: doc

Maximum F1 score across all possible thresholds. Useful for finding optimal operating points.
:::

::::

### Threshold Metrics

::::{grid} 2
:gutter: 2

:::{grid-item-card} F1AdaptiveThreshold
:link: anomalib.metrics.F1AdaptiveThreshold
:link-type: doc

Automatically determines the optimal threshold by maximizing F1 score.
:::

:::{grid-item-card} ManualThreshold
:link: anomalib.metrics.ManualThreshold
:link-type: doc

Uses a manually specified threshold for classification.
:::

::::

### Other Metrics

::::{grid} 2
:gutter: 2

:::{grid-item-card} PRO
:link: anomalib.metrics.PRO
:link-type: doc

Per-Region Overlap score for evaluating pixel-level localization.
:::

:::{grid-item-card} PIMO
:link: anomalib.metrics.PIMO
:link-type: doc

Per-Image Missed Overlap for assessing localization errors.
:::

:::{grid-item-card} PGn
:link: anomalib.metrics.PGn
:link-type: doc

Presorted Good with n% bad samples missed. Measures false negative rate at specific operating points.
:::

:::{grid-item-card} PBn
:link: anomalib.metrics.PBn
:link-type: doc

Presorted Bad with n% good samples misclassified. Measures false positive rate at specific operating points.
:::

:::{grid-item-card} MinMax
:link: anomalib.metrics.MinMax
:link-type: doc

Normalizes anomaly scores to [0, 1] range using min-max scaling.
:::

:::{grid-item-card} AnomalyScoreDistribution
:link: anomalib.metrics.AnomalyScoreDistribution
:link-type: doc

Analyzes and tracks the distribution of anomaly scores for model diagnostics.
:::

::::

### Utility Classes

::::{grid} 2
:gutter: 2

:::{grid-item-card} AnomalibMetric
:link: anomalib.metrics.AnomalibMetric
:link-type: doc

Base class for all Anomalib metrics. Extends TorchMetrics with field-based updates.
:::

:::{grid-item-card} Evaluator
:link: anomalib.metrics.Evaluator
:link-type: doc

Orchestrates multiple metrics for comprehensive model evaluation.
:::

:::{grid-item-card} BinaryPrecisionRecallCurve
:link: anomalib.metrics.BinaryPrecisionRecallCurve
:link-type: doc

Computes precision-recall curves for binary classification tasks.
:::

::::

## API Reference

```{eval-rst}
.. automodule:: anomalib.metrics
:members:
:members: AUROC, AUPR, AUPRO, AUPIMO, F1Score, F1Max, F1AdaptiveThreshold, ManualThreshold, PRO, PIMO, PGn, PBn, MinMax, AnomalyScoreDistribution, AnomalibMetric, Evaluator, BinaryPrecisionRecallCurve, create_anomalib_metric
:undoc-members:
:show-inheritance:
```
19 changes: 19 additions & 0 deletions docs/source/markdown/guides/reference/models/image/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ Deep Feature Kernel Density Estimation
Probabilistic Modeling of Deep Features for Out-of-Distribution and Adversarial Detection
:::

:::{grid-item-card} {material-regular}`model_training;1.5em` Dinomaly
:link: ./dinomaly
:link-type: doc

Dinomaly: The Less Is More Philosophy in Unsupervised Anomaly Detection

:::

:::{grid-item-card} {material-regular}`model_training;1.5em` DRAEM
:link: ./draem
:link-type: doc
Expand Down Expand Up @@ -123,6 +131,13 @@ SuperSimpleNet: A Unified Surface Defect Detection Model for all Supervision Reg
U-Flow: A U-shaped Normalizing Flow for Anomaly Detection with Unsupervised Threshold
:::

:::{grid-item-card} {material-regular}`model_training;1.5em` UniNet
:link: ./uninet
:link-type: doc

UniNet: A Contrastive Learning-guided Unified Framework with Feature Selection for Anomaly Detection
:::

:::{grid-item-card} {material-regular}`model_training;1.5em` VLM-AD
:link: ./vlm_ad
:link-type: doc
Expand All @@ -147,6 +162,7 @@ WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
./csflow
./dfkde
./dfm
./dinomaly
./draem
./dsr
./efficient_ad
Expand All @@ -157,6 +173,9 @@ WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
./patchcore
./reverse_distillation
./stfpm
./supersimplenet
./uflow
./uninet
./vlm_ad
./winclip
```
8 changes: 8 additions & 0 deletions docs/source/markdown/guides/reference/models/video/fuvas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# FUVAS

```{eval-rst}
.. automodule:: anomalib.models.video.fuvas
:members:
:undoc-members:
:show-inheritance:
```
14 changes: 13 additions & 1 deletion docs/source/markdown/guides/reference/models/video/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# Video Models

::::{grid}
::::{grid} 2
:margin: 1 1 0 0
:gutter: 1

:::{grid-item-card} {material-regular}`model_training;1.5em` AI VAD
:link: ./ai_vad
:link-type: doc

Attribute-based Representations for Accurate and Interpretable Video Anomaly Detection
:::

:::{grid-item-card} {material-regular}`model_training;1.5em` FUVAS
:link: ./fuvas
:link-type: doc

Few-shot Unsupervised Video Anomaly Segmentation via Low-Rank Factorization of Spatio-Temporal Features
:::

::::
Expand All @@ -14,4 +25,5 @@
:hidden:

./ai_vad
./fuvas
```
3 changes: 3 additions & 0 deletions src/anomalib/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- CSFlow (:class:`anomalib.models.image.Csflow`)
- DFKDE (:class:`anomalib.models.image.Dfkde`)
- DFM (:class:`anomalib.models.image.Dfm`)
- Dinomaly (:class:`anomalib.models.image.Dinomaly`)
- DRAEM (:class:`anomalib.models.image.Draem`)
- DSR (:class:`anomalib.models.image.Dsr`)
- EfficientAd (:class:`anomalib.models.image.EfficientAd`)
Expand All @@ -38,11 +39,13 @@
- STFPM (:class:`anomalib.models.image.Stfpm`)
- SuperSimpleNet (:class:`anomalib.models.image.Supersimplenet`)
- UFlow (:class:`anomalib.models.image.Uflow`)
- UniNet (:class:`anomalib.models.image.UniNet`)
- VLM-AD (:class:`anomalib.models.image.VlmAd`)
- WinCLIP (:class:`anomalib.models.image.WinClip`)

Video Models:
- AI-VAD (:class:`anomalib.models.video.AiVad`)
- FUVAS (:class:`anomalib.models.video.Fuvas`)
"""

import logging
Expand Down
2 changes: 2 additions & 0 deletions src/anomalib/models/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- :class:`Csflow`: Conditional Split Flow
- :class:`Dfkde`: Deep Feature Kernel Density Estimation
- :class:`Dfm`: Deep Feature Modeling
- :class:`Dinomaly`: DinoV2-based Reconstruction Error Model
- :class:`Draem`: Dual Reconstruction by Adversarial Masking
- :class:`Dsr`: Deep Spatial Reconstruction
- :class:`EfficientAd`: Efficient Anomaly Detection
Expand All @@ -40,6 +41,7 @@
- :class:`Stfpm`: Student-Teacher Feature Pyramid Matching
- :class:`SuperSimpleNet`: SuperSimpleNet
- :class:`Uflow`: Unsupervised Flow
- :class:`UniNet`: Student-Teacher Contrastive Learning Model
- :class:`VlmAd`: Vision Language Model Anomaly Detection
- :class:`WinClip`: Zero-/Few-Shot CLIP-based Detection
"""
Expand Down
1 change: 1 addition & 0 deletions src/anomalib/models/video/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

Available Models:
- :class:`AiVad`: AI-based Video Anomaly Detection
- :class:`Fuvas`: Few-shot Unsupervised Video Anomaly Segmentation
"""

from .ai_vad import AiVad
Expand Down
Loading