Compare commits

...

4 Commits

Author SHA1 Message Date
9cd8457762 pin anomalib version to v2.0.0 2025-11-20 14:46:55 +01:00
322506bfd0 tests 2025-11-20 08:11:57 +01:00
54babec627 add new models 2025-11-20 07:32:36 +01:00
d7feb53b90 pin anomalib version to v2.1.0 2025-11-20 07:31:28 +01:00
10 changed files with 744 additions and 1803 deletions

1136
pdm.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ description = "anomaly detection for sensor images for quality assurance process
authors = [ authors = [
{name = "d-opt GmbH (resp.: Florian Foerster)", email = "f.foerster@d-opt.com"}, {name = "d-opt GmbH (resp.: Florian Foerster)", email = "f.foerster@d-opt.com"},
] ]
dependencies = ["imutils>=0.5.4", "dopt-basics>=0.2.4", "numpy>=2.2.6", "anomalib[vlm_clip]>=2.1.0", "open-clip-torch>=3.2.0"] dependencies = ["imutils>=0.5.4", "dopt-basics>=0.2.4", "numpy>=2.2.6", "open-clip-torch>=3.2.0", "anomalib==2.0.0"]
requires-python = "<3.14,>=3.11" requires-python = "<3.14,>=3.11"
readme = "README.md" readme = "README.md"
license = {text = "LicenseRef-Proprietary"} license = {text = "LicenseRef-Proprietary"}

File diff suppressed because one or more lines are too long

View File

@ -176,6 +176,7 @@ def infer_image(
output = model(input_tensor) output = model(input_tensor)
anomaly_score = output.pred_score.item() anomaly_score = output.pred_score.item()
print(f">>> Anomaly score: {anomaly_score}")
anomaly_label = bool(1 if anomaly_score >= 0.2 else 0) anomaly_label = bool(1 if anomaly_score >= 0.2 else 0)
anomaly_map = output.anomaly_map.squeeze().cpu().numpy() anomaly_map = output.anomaly_map.squeeze().cpu().numpy()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.