import React from 'react';
import {FlaskConical,BookOpen,ShieldCheck,ArrowUpRight} from 'lucide-react';
import {markSymbol,mvtecCards,mvtecRows} from './mvtec.mjs';
const value=n=>typeof n==='number'?n.toFixed(3):'—';
const percent=n=>typeof n==='number'?(n*100).toFixed(2)+'%':'—';
export default function BenchmarkReport({report,labels}){
const candidate=report?.candidate;
const selected=candidate||report;
const categories=Object.entries(selected?.categories||{});
const complete=categories.length===12;
const mvtec=report?.mvtec,cards=mvtecCards(mvtec),rows=mvtecRows(mvtec);
const metrics=selected?.macro_mean;
const columns=['auroc','au_pr','pixel_auroc','pixel_au_pr'];
return <> This page shows the official-split benchmark of the first DINOv2 profile (frozen encoder, random-sample memory), averaged over three fixed seeds. The deployed detector, with a fine-tuned encoder and a coreset memory, is described on Model performance together with the app’s operating settings.{mvtec&&' A one-run check on a second dataset, MVTec AD, follows the VisA results.'} These tests compare inspection results on example product photos. They help explain strengths and limits, but do not approve a product or guarantee a correct result. Image results measure whether unusual photos were found. Highlighted-area results measure where differences were located. The measured results and test settings are shown below. Official VisA training normals and test assignments. Three fixed seeds; every category reported. These are retrospective development results: earlier test data was already seen.Official benchmark: DINOv2 on VisA
Measure improvement across every product.
Mean ± sample standard deviation over seeds 42, 43 and 44. {categories.length}/12 categories completed.
| Product | Train normals | Test images | Image AUROC | Image AU-PR | Pixel AUROC | Pixel AU-PR |
|---|---|---|---|---|---|---|
| {labels[key]||key} | {c.official_train_normals} | {c.official_test_images} | {columns.map(metric=>{value(c.benchmark_mean[metric])}± {value(c.benchmark_std[metric])} | )}
Supplementary: mean image AP {percent(metrics?.average_precision)} · mean pixel AP {percent(metrics?.pixel_average_precision)}. These are not bounding-box mAP@IoU.
Custom AnomalyDINO-inspired adaptation: frozen DINOv2 ViT-S/14, 448px short edge, rectangular patches, PCA foreground heuristic and a larger normal memory. It does not reproduce Dinomaly. Pixel evaluation uses 224×224 maps. The Model performance page describes the active deployment profile and its separate calibrated threshold.
{mvtec.scope}
| Product | Test images | {cards.map(c=>{c.label} | )}Pixel AUROC |
|---|---|---|---|
| {r.label} | {r.tests} | {r.values.map((v,i)=>{value(v)}{i===1&&r.coreset&&{markSymbol(r.coreset)}}{i===2&&r.tuned&&{markSymbol(r.tuned)}} | )}{value(r.pixel)} |
▲ ▼ mark a difference whose 95% bootstrap interval excludes zero: the coreset column against the random-sample memory, the last variant against the coreset alone. Pixel AUROC is for the last variant (224×224 maps) and is weak on texture products because of the foreground heuristic.
The coreset memory transfers: it is clearly better on {mvtec.comparisons?.['B-A']?.better} products and clearly worse on {mvtec.comparisons?.['B-A']?.worse}. The encoder fine-tuned on VisA adds nothing measurable here ({mvtec.comparisons?.['C-B']?.better} clearly better, {mvtec.comparisons?.['C-B']?.worse} clearly worse), so its small VisA gain is not confirmed elsewhere. MVTec AD is licensed CC BY-NC-SA 4.0, used here only for this evaluation and not redistributed; the copy came from a third-party mirror and was checked against the published counts. Protocol and results
The official VisA protocol reports AUROC and AU-PR, averaged across products. Image metrics evaluate detection; pixel metrics evaluate localization.
{d}
Exact settings, differences from the paper and resume commands are in docs/TRAINING_AND_EVALUATION.md.