Views
No views yet

| Subfolder | Selector node | Wavelengths (nm) | Image threshold | Quantile | Weight (.pt) |
|---|---|---|---|---|---|
dinomaly_rgb_full_pipeline/ | FixedWavelengthSelector | (650, 550, 450) | 0.140 | 0.995 | dinomaly_multifile_rgb_two_stage.pt |
dinomaly_cir_full_pipeline/ | CIRSelector | NIR=860, R=670, G=560 | 0.140 | 0.995 | dinomaly_multifile_cir.pt |
dinomaly_custom_selector_full_pipeline/ | FixedWavelengthSelector | (542, 902, 886) | 0.151 | 0.995 | dinomaly_multifile_custom_two_stage.pt |
image_threshold is the gate on the mean of the top-0.1 % per-pixel anomaly scores; only frames above it are pixel-thresholded against the per-frame quantile (0.995). Both knobs are persisted in each pipeline YAML and loaded automatically by restore-pipeline.
.cu3s cube, casts to float32, and maps the multi-class GT mask to a binary anomaly mask (used at training/eval; inference reads the cube directly from the dataloader's batch).1import torch
2from huggingface_hub import hf_hub_download
3from cuvis_ai_core.utils.node_registry import NodeRegistry
4from cuvis_ai_core.pipeline.pipeline import CuvisPipeline
5
6REPO = "cubert-gmbh/XMR_Demo_Industrial_Foreign_Object_Detection_Lentils"
7
8yaml_path = hf_hub_download(
9 repo_id=REPO,
10 subfolder="dinomaly_custom_selector_full_pipeline",
11 filename="dinomaly_multifile_custom_two_stage.yaml",
12)
13pt_path = hf_hub_download(
14 repo_id=REPO,
15 subfolder="dinomaly_custom_selector_full_pipeline",
16 filename="dinomaly_multifile_custom_two_stage.pt",
17)
18
19# The dinomaly plugin (cuvis-ai-dinomaly v0.1.3) auto-fetches its dependencies
20# and the DINOv2 backbone on first use.
21registry = NodeRegistry()
22registry.load_plugins("configs/plugins/dinomaly.yaml") # ships with cuvis-ai
23
24device = "cuda" if torch.cuda.is_available() else "cpu"
25pipeline = CuvisPipeline.load_pipeline(
26 yaml_path,
27 weights_path=str(pt_path),
28 device=device,
29 strict_weight_loading=False,
30 node_registry=registry,
31)
32pipeline.torch_layers.eval()
33# ... feed a CU3S batch into pipeline.forward(...)notebooks/use_cases/lentils_dinomaly.ipynb in the cuvis-ai repo.dinov2reg_vit_base_14), frozen.decider.hparams for the exact threshold values.