'));
+ const guard=createOperationGuard();let resolve,reject,notices=0,opened=0,changed=0;const errors=[],busy=[];
+ const pending=new Promise((a,b)=>{resolve=a;reject=b});
+ const save=new Function('operations','api','enabled','record','messages','url','shareInspection','workspaceChanged','onNotice','onChanged','setBusy','setError','include','permission',declaration+';return save')(
+ {current:guard},()=>pending,true,{id:'old-record'},[],value=>value,()=>assert.fail('Legacy transport should not run'),
+ ()=>changed++,()=>notices++,()=>opened++,value=>busy.push(value),value=>errors.push(value),false,{allowed:true});
+ const work=save();guard.invalidate();
+ if(fails)reject(new Error('Old account request failed'));else resolve({alreadyShared:false});
+ await work;
+ assert.equal(notices,0);assert.equal(opened,0);assert.deepEqual(errors,['']);assert.deepEqual(busy,[true]);
+ assert.equal(changed,fails?0:1);
+});
diff --git a/frontend/tests/workspaceRefresh.test.mjs b/frontend/tests/workspaceRefresh.test.mjs
new file mode 100644
index 0000000000000000000000000000000000000000..90c5728d57bf5d618304f7ab4827e8ef7b02a514
--- /dev/null
+++ b/frontend/tests/workspaceRefresh.test.mjs
@@ -0,0 +1,168 @@
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import {readFile} from 'node:fs/promises';
+import {build} from 'esbuild';
+import {createRequire} from 'node:module';
+import {fileURLToPath} from 'node:url';
+import {workspaceRefreshGate,readRefreshSections} from '../src/workspaceRefresh.mjs';
+import {createRequestScope} from '../src/workflow.mjs';
+import {startPolling} from '../src/workspace.mjs';
+import {readEnvelope} from '../src/http.mjs';
+
+const health={mode:'cloud_session_workspace',personal_workspace_enabled:true,auth_workflow_enabled:true};
+const source=(await readFile(new URL('../src/main.jsx',import.meta.url),'utf8')).replaceAll('\r\n','\n');
+const declaration=source.slice(source.indexOf(' async function refresh('),source.indexOf(' function retryRefresh('));
+const tick=()=>new Promise(resolve=>setImmediate(resolve));
+
+// Execute the actual React refresh handler with injected network/SDK/state edges.
+// No model calls, real sessions, Supabase writes or notification delivery.
+function harness(options={}){
+ const state={records:['existing-private'],alerts:['existing-alert'],stats:{total:1},errors:[],calls:[],block:null,resets:0};
+ const scope=createRequestScope();let configured=options.configured??true;
+ const setters={setStats:'stats',setRecords:'records',setAlerts:'alerts',setArchived:'archived',setWorkspaceStatus:'workspace',setHealth:'health',setSamples:'samples',setEvaluation:'evaluation',setOfficial:'official',setInspectionAccess:'access',setWorkspaceBlock:'block'};
+ const env={
+ refreshContext:{current:scope},health:options.health===undefined?health:options.health,
+ SHOWCASE:options.showcase??false,metadataLoaded:{current:!options.full},
+ readRefreshSections,workspaceRefreshGate,configureLocalSync(){},setLocalSyncStatus(){},personalEnabled:()=>configured,configureWorkspace:v=>{configured=v},
+ activeWorkspace:()=>configured?(options.workspace||'personal'):'team',setWorkspaceState(){},
+ setSectionErrors:value=>{state.errors=typeof value==='function'?value(state.errors):value},
+ clearWorkspace(){scope.invalidate();state.records=[];state.alerts=[];state.stats={total:0};state.workspace=null;state.errors=state.errors.filter(n=>['Connection','Samples','Performance','Benchmark'].includes(n))},
+ resetInspection(){state.resets++},cloudClient:async()=>({}),
+ loadInspectionAccess:async()=>{state.calls.push('native-account-check');if(options.accessError)throw Error('SDK failed');if(options.accessLoader)return options.accessLoader();return {state:options.access||'authorized'}},
+ api:async path=>{state.calls.push(path);return options.api?options.api(path):path==='/api/health'?health:[{id:'fresh'}]},
+ page:'batch',result:null,busy:false,ragBusy:false,artifactRefresh:{current:0},setMessages(){},setReview(){},setResult(){}
+ };
+ for(const [setter,key]of Object.entries(setters))env[setter]=value=>{state[key]=value};
+ const refresh=new Function(...Object.keys(env),declaration+';return refresh')(...Object.values(env));
+ return {state,refresh,scope,env};
+}
+
+test('cold startup resolves public routing before sending any private request',async()=>{
+ const h=harness({health:null,configured:false,full:true});
+ assert.equal(await h.refresh(true),false,'routing change restarts the polling generation');
+ assert.deepEqual(h.state.calls,['/api/health','/api/samples','/api/evaluation','/api/benchmark/official']);
+ assert.deepEqual(h.state.errors,[]);assert.equal(h.state.health.personal_workspace_enabled,true);
+});
+
+for(const access of ['pending','rejected','revoked','mfa','denied','checking','unavailable'])test(`${access} cannot fetch or retain private workspace data`,async()=>{
+ const h=harness({access});const result=await h.refresh();
+ assert.equal(result.state,'blocked');assert.deepEqual(h.state.calls,['native-account-check']);
+ assert.deepEqual(h.state.records,[]);assert.deepEqual(h.state.alerts,[]);assert.equal(h.state.workspace,null);
+ assert.equal(h.state.resets,1);assert.deepEqual(h.state.errors,[]);assert.ok(h.state.block.reason);
+});
+
+test('failed account verification never falls back to guest Demo requests',async()=>{
+ const h=harness({accessError:true});await h.refresh();
+ assert.equal(h.state.access.state,'unavailable');assert.equal(h.state.block.failed,true);
+ assert.deepEqual(h.state.calls,['native-account-check']);
+});
+
+test('native approved access loads private data; guest Demo remains isolated and available',async()=>{
+ for(const access of ['authorized','guest']){
+ const h=harness({access});await h.refresh();
+ assert.equal(h.state.block,null);assert.deepEqual(h.state.records,[{id:'fresh'}]);
+ assert.equal(h.state.calls[0],'native-account-check');assert.equal(h.state.calls.length,6);
+ }
+ const team=harness({access:'guest',workspace:'team'});await team.refresh();
+ assert.equal(team.state.block.action,'personal');assert.deepEqual(team.state.calls,['native-account-check']);
+});
+
+test('local and saved-showcase refreshes retain their existing API paths without Supabase checks',async()=>{
+ for(const options of [{health:{mode:'local_single_user'}},{showcase:true,health:{mode:'saved_examples'}}]){
+ const h=harness(options);await h.refresh();
+ assert.equal(h.state.calls.length,4);assert.ok(!h.state.calls.includes('native-account-check'));
+ assert.deepEqual(h.state.records,[{id:'fresh'}]);
+ }
+});
+
+test('server permission denial after a successful SDK check clears all private data',async()=>{
+ const h=harness({api:async path=>{if(path==='/api/alerts')throw Object.assign(Error('Revoked'),{status:403});return [{id:'must-not-apply'}]}});
+ assert.equal((await h.refresh()).state,'blocked');assert.deepEqual(h.state.records,[]);
+ assert.equal(h.state.access.state,'denied');assert.equal(h.state.block.action,'account');
+});
+
+test('genuine service failure remains visible; next successful retry replaces data and clears failure',async()=>{
+ let fail=true;
+ const h=harness({api:async path=>{if(fail&&path.startsWith('/api/inspections'))throw Object.assign(Error('Unavailable'),{status:503});return [{id:'fresh'}]}});
+ await assert.rejects(h.refresh(),/could not synchronize/);
+ assert.deepEqual(h.state.errors,['History']);assert.deepEqual(h.state.records,['existing-private']);
+ fail=false;await h.refresh();assert.deepEqual(h.state.errors,[]);assert.deepEqual(h.state.records,[{id:'fresh'}]);
+});
+
+test('unreachable public health stops private requests and cannot be mislabeled as MFA',async()=>{
+ const h=harness({full:true,api:async path=>{if(path==='/api/health')throw Error('Offline');return []}});
+ await assert.rejects(h.refresh(true),/could not be reached/);
+ assert.ok(h.state.errors.includes('Connection'));assert.equal(h.state.calls.length,4);
+ assert.ok(!h.state.calls.includes('native-account-check'));
+});
+
+test('account/workspace changes discard late data and late SDK authorization',async()=>{
+ let release;
+ const h=harness({api:path=>path.startsWith('/api/inspections')?new Promise(resolve=>{release=resolve}):[]});
+ const work=h.refresh();await tick();h.scope.invalidate();release([{id:'old-account'}]);
+ assert.equal(await work,false);assert.deepEqual(h.state.records,['existing-private']);
+ const scope=createRequestScope(),current=scope.capture();let finish;
+ const read=readRefreshSections([['History','/private',()=>assert.fail('Stale apply')]],()=>new Promise(resolve=>{finish=resolve}),current);
+ scope.invalidate();finish([]);assert.equal(await read,null);
+ let authorize;
+ const late=harness({accessLoader:()=>new Promise(resolve=>{authorize=resolve})});
+ const authWork=late.refresh();await tick();late.scope.invalidate();authorize({state:'authorized'});
+ assert.equal(await authWork,false);assert.deepEqual(late.state.calls,['native-account-check']);
+ assert.equal(late.state.access,undefined);
+});
+
+test('real API boundary preserves 401/403 HTTP status for permission-specific guidance',async()=>{
+ const apiSource=source.slice(source.indexOf('async function api('),source.indexOf(' function Badge('));
+ for(const status of [401,403,503]){
+ const api=new Function('SHOWCASE','request','showcaseApi','practiceActive','practiceApi','readEnvelope','recordIssue',apiSource+';return api')(false,async()=>Response.json({error:{message:'Denied'}},{status}),()=>{},()=>false,()=>assert.fail('normal work never uses the lesson store'),readEnvelope,()=>{});
+ await assert.rejects(api('/private'),error=>error.status===status&&error.message==='Denied');
+ }
+});
+
+test('a cold start or proxy page never shows a raw JSON parser error',async()=>{
+ const apiSource=source.slice(source.indexOf('async function api('),source.indexOf(' function Badge('));
+ const html=new Response('Starting',{status:503,headers:{'content-type':'text/html'}});
+ const api=new Function('SHOWCASE','request','showcaseApi','practiceActive','practiceApi','readEnvelope','recordIssue',apiSource+';return api')(false,async()=>html,()=>{},()=>false,()=>{},readEnvelope,()=>{});
+ await assert.rejects(api('/api/stats'),error=>error.status===503&&/starting or restarting/.test(error.message)&&!/Unexpected token|JSON/.test(error.message));
+ const lost=new Function('SHOWCASE','request','showcaseApi','practiceActive','practiceApi','readEnvelope','recordIssue',apiSource+';return api')(false,async()=>{throw new TypeError('Failed to fetch')},()=>{},()=>false,()=>{},readEnvelope,()=>{});
+ await assert.rejects(lost('/api/stats'),/Failed to fetch/);
+});
+
+test('manual Retry uses the current coalesced poll and forces fresh metadata',()=>{
+ const retrySource=source.slice(source.indexOf(' function retryRefresh('),source.indexOf(' async function loadBatch('));
+ const metadataLoaded={current:true};let calls=0;
+ new Function('metadataLoaded','refreshPoll',retrySource+';return retryRefresh')(
+ metadataLoaded,{current:{refresh(){calls++}}})();
+ assert.equal(metadataLoaded.current,false);assert.equal(calls,1);
+ assert.ok(source.includes('refreshPoll.current?.refresh();'),'Auth listener uses the live poll, not a mount-time stale refresh closure');
+});
+
+test('poll reports a blocked account distinctly, then refreshes successfully after verification',async()=>{
+ const target=new EventTarget(),doc=new EventTarget();target.navigator={onLine:true};doc.hidden=false;
+ let block=true,release;const states=[];
+ const poll=startPolling(async()=>{if(block)return {state:'blocked',reason:'MFA required'};await new Promise(resolve=>{release=resolve})},{target,documentTarget:doc,interval:100000,onState:s=>states.push(s.state)});
+ try{
+ await tick();assert.equal(states.at(-1),'blocked');block=false;
+ const pending=poll.refresh();assert.equal(states.at(-1),'refreshing');
+ poll.refresh();release();await pending;await tick();release();await tick();
+ assert.equal(states.at(-1),'synced');
+ }finally{poll.stop()}
+});
+
+const root=fileURLToPath(new URL('..',import.meta.url));
+const built=await build({stdin:{contents:"export {default} from './src/RefreshNotice.jsx';",resolveDir:root,loader:'jsx'},bundle:true,write:false,platform:'node',format:'cjs',external:['react']});
+const require=createRequire(new URL('../package.json',import.meta.url));
+const module={exports:{}};new Function('require','module','exports',built.outputFiles[0].text)(require,module,module.exports);
+const React=require('react'),{renderToStaticMarkup}=require('react-dom/server');
+const render=props=>renderToStaticMarkup(React.createElement(module.exports.default,props));
+
+test('real refresh notice is absent when healthy, actionable for MFA, and announces busy Retry',()=>{
+ assert.equal(render({}), '');
+ const mfa=render({block:workspaceRefreshGate(health,{state:'mfa'},'personal')});
+ assert.ok(mfa.includes('role="status"'));assert.ok(mfa.includes('Open Staff workspace'));assert.ok(!mfa.includes('Could not refresh'));
+ assert.equal(render({block:workspaceRefreshGate(health,{state:'mfa'},'personal'),showAccess:false}),'');
+ const retry=render({errors:['History'],refreshing:true});
+ assert.ok(retry.includes('Refreshing…'));assert.ok(retry.includes('disabled=""'));assert.ok(retry.includes('aria-busy="true"'));
+ const failed=render({errors:['History'],refreshing:false});assert.ok(failed.includes('Retry refresh'));assert.ok(!failed.includes('disabled=""'));
+ assert.ok(render({block:workspaceRefreshGate(health,{state:'unavailable'},'personal')}).includes('role="alert"'));
+});
diff --git a/frontend/vite.config.js b/frontend/vite.config.js
new file mode 100644
index 0000000000000000000000000000000000000000..f34dc642808fae49cb44bb099488af08f9d3b3ae
--- /dev/null
+++ b/frontend/vite.config.js
@@ -0,0 +1,15 @@
+import { defineConfig } from 'vite';
+import {execSync} from 'node:child_process';
+import {readFileSync} from 'node:fs';
+import {localBuildReceipt} from './localBuild.mjs';
+
+// Shown in Help & references and in "Copy details", so a problem report says
+// exactly which build someone was using.
+function buildInfo(){
+ const version=JSON.parse(readFileSync(new URL('./package.json',import.meta.url),'utf8')).version;
+ let commit='local';
+ try{commit=execSync('git rev-parse --short HEAD',{stdio:['ignore','pipe','ignore']}).toString().trim()||'local'}catch{}
+ return {version,commit,built:new Date().toISOString().slice(0,10)};
+}
+
+export default defineConfig({base:'./',define:{__APP_BUILD__:JSON.stringify(buildInfo())},plugins:[localBuildReceipt()],server:{proxy:{'/api':'http://127.0.0.1:8765'}}});
diff --git a/knowledge/dinomaly.md b/knowledge/dinomaly.md
new file mode 100644
index 0000000000000000000000000000000000000000..817e9deeac05e84e32c24fce98249c0800786781
--- /dev/null
+++ b/knowledge/dinomaly.md
@@ -0,0 +1,5 @@
+# Reconstruction anomaly detection
+Anomalib Dinomaly uses frozen DINOv2 encoder representations and trains a bottleneck and decoder on normal images. Reconstruction differences support anomaly scoring and spatial localization. Its documented backbone interface uses DINOv2 variants. This does not establish an interchangeable DINOv3 adapter.
+
+# Interpretation
+A feature reconstruction discrepancy indicates departure from learned normal appearance. Evaluation on labelled images is required to measure its usefulness. A spatial anomaly map alone does not establish a named physical defect or a manufacturing root cause. DefectRAG's compact nearest-normal fallback uses cosine patch distances rather than Dinomaly's reconstruction decoder, so published Dinomaly benchmark numbers do not describe this application.
diff --git a/knowledge/highres-profile.md b/knowledge/highres-profile.md
new file mode 100644
index 0000000000000000000000000000000000000000..4e543ddad84fe75f46d87d3d49c22920bc03772f
--- /dev/null
+++ b/knowledge/highres-profile.md
@@ -0,0 +1,8 @@
+# DINOv2 high-resolution profile
+A saved model ID beginning dinov2-highres identifies the AnomalyDINO-inspired profile with frozen DINOv2 and a random-sample memory bank. A saved model ID beginning dinov2-tuned identifies the same method with a DINOv2 whose last four transformer blocks were fine-tuned on synthetic defects made from normal training images, and a 32,768-patch coreset memory bank chosen by farthest-point selection; its thresholds still come only from held-out normal images. Both profiles use DINOv2 ViT-S/14, a 448-pixel short edge, retained aspect ratio and a rectangular grid of 14-pixel patches. A PCA-based foreground heuristic filters background patches; it is not an annotated segmentation model and can fail. The anomaly score averages the largest one percent of retained patch distances. This custom implementation is an adaptation rather than an exact reproduction of AnomalyDINO.
+
+# Normal-only operational calibration
+The operational normal memory excludes a content-grouped ten-percent holdout of official training normals. Its threshold is the maximum heldout normal score; no anomalous images or test masks choose that threshold. Evaluation uses all original official test images. A separate benchmark uses all official training normals and reports three fixed random-bank seeds. Benchmark and operational profiles are reported separately. Earlier official test exposure makes this retrospective development evaluation, not an untouched external test.
+
+# Overall metrics
+Image mAP is the arithmetic mean of image average precision over the twelve product categories. Mean image AUROC is the equal-weight mean of the twelve category AUROCs. Pixel mAP averages category-level pixel average precision and measures localization, including normal images. These are not bounding-box mAP at an intersection-over-union threshold: DefectRAG does not predict bounding boxes or named defect classes. Average precision and trapezoidal area under the precision-recall curve are reported separately.
diff --git a/knowledge/legacy-profile.md b/knowledge/legacy-profile.md
new file mode 100644
index 0000000000000000000000000000000000000000..8be46c10fc7e65fd86f9babffeaae35562ad153d
--- /dev/null
+++ b/knowledge/legacy-profile.md
@@ -0,0 +1,2 @@
+# Original DINOv3 profile
+A saved model ID beginning dinov3-normal-bank identifies the original compact detector. It uses frozen DINOv3 ViT-S/16, a 224 by 224 input and a 14 by 14 patch grid. It fits 64 normal images per product. Calibration uses 32 distinct normal images and 20 anomalies reassigned from the official test pool. The threshold maximizes validation F1. This modified split is not the full official benchmark. Original pixel metrics use 64 by 64 maps. Earlier scores, thresholds and heatmaps remain preserved when a new profile is installed.
diff --git a/knowledge/screening.md b/knowledge/screening.md
new file mode 100644
index 0000000000000000000000000000000000000000..91340d1d518f497612f5b96a935ceddde327ca51
--- /dev/null
+++ b/knowledge/screening.md
@@ -0,0 +1,11 @@
+# Reading an inspection
+DefectRAG compares an uploaded image with normal VisA reference features for the selected product. A larger anomaly score indicates a larger feature distance; the score is not a defect probability. Good means the score lies below the decision threshold and outside the review band. Anomalous means it lies above the threshold and outside the review band. Uncertain means it lies within a fixed five-percent band around the threshold. This review band is an operational heuristic, not calibrated statistical confidence. A Good result is screening evidence, not proof of factory acceptance or product safety.
+
+# Saved model and measurements
+Every inspection saves its model ID, score, threshold, calibration policy and localization description. Historical inspections retain the model that originally produced them. A newer active model does not change a historical verdict or heatmap. Consult that saved record to identify its profile and dimensions. Binary precision, recall and F1 use a frozen threshold; the dashboard may defer some decisions within its review band.
+
+# Reading the heatmap
+The heatmap shows cosine distance between each image patch feature and its closest stored normal reference feature. Larger distances indicate a greater departure from normal reference appearance. The patch grid depends on the saved model profile and image shape; interpolation does not add measured detail. This is coarse localization, not a supervised defect segmentation or named defect diagnosis. These memory-bank detectors do not reconstruct image features with a trained decoder. General Dinomaly reconstruction documentation describes a different method.
+
+# Evidence limits and response
+The system does not predict specific defect types, component counts, root causes, process parameters, acceptance tolerances or repair instructions. Those require additional validated supervision or approved process records. Model failures create an error event, never a successful inspection. Anomaly and uncertain events create local review alerts. Review source images and heatmaps before acting. The operator selects the product category; arbitrary or wrong-product uploads are outside validated scope. Documentation is general context and must remain separate from saved image measurements.
diff --git a/knowledge/sources.json b/knowledge/sources.json
new file mode 100644
index 0000000000000000000000000000000000000000..781d220154d1e30562f50e64cddec0c46e9696f5
--- /dev/null
+++ b/knowledge/sources.json
@@ -0,0 +1,44 @@
+[
+ {
+ "id": "visa",
+ "file": "visa.md",
+ "title": "VisA dataset and benchmark protocol",
+ "url": "https://github.com/amazon-science/spot-diff",
+ "license": "CC BY 4.0 (dataset); attributed summary",
+ "scope": "published benchmark"
+ },
+ {
+ "id": "dinomaly",
+ "file": "dinomaly.md",
+ "title": "Anomalib Dinomaly: reconstruction evidence",
+ "url": "https://anomalib.readthedocs.io/en/lib-v2.6.2/markdown/guides/reference/models/image/dinomaly.html",
+ "license": "Attributed technical summary; no copied passages",
+ "scope": "general model documentation"
+ },
+ {
+ "id": "screening",
+ "file": "screening.md",
+ "title": "DefectRAG screening and evidence policy",
+ "url": "project://docs/inspection-policy",
+ "license": "Project-authored, MIT",
+ "scope": "application policy; not a factory SOP"
+ },
+ {
+ "id": "legacy-profile",
+ "file": "legacy-profile.md",
+ "title": "Original compact DINOv3 model profile",
+ "url": "project://docs/legacy-model",
+ "license": "Project-authored, MIT",
+ "scope": "original profile only",
+ "model_family": "dinov3"
+ },
+ {
+ "id": "highres-profile",
+ "file": "highres-profile.md",
+ "title": "DINOv2 high-resolution profile and metrics",
+ "url": "https://github.com/dammsi/AnomalyDINO",
+ "license": "Project-authored summary, MIT; attributed method",
+ "scope": "custom high-resolution profile, not paper reproduction",
+ "model_family": "dinov2"
+ }
+]
\ No newline at end of file
diff --git a/knowledge/visa.md b/knowledge/visa.md
new file mode 100644
index 0000000000000000000000000000000000000000..288f7e781a5e18d3c9bd17c0088f77147833bb8e
--- /dev/null
+++ b/knowledge/visa.md
@@ -0,0 +1,5 @@
+# VisA benchmark
+VisA provides normal and anomalous product images with anomaly segmentation masks. PCB1, capsules and cashew are included. The official one-class split fits on normal images; labelled normal and anomalous images are used for evaluation. Multiclass masks can be reduced to binary anomaly masks. Normal images have no stored anomaly mask. Image-level labels establish benchmark anomaly status, not a validated diagnosis for a newly uploaded photograph.
+
+# Scope and attribution
+The VisA dataset is released by Amazon Science under CC BY 4.0. Attribute Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang and Onkar Dabeer, SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentation, ECCV 2022. DefectRAG sample previews are resized JPEG derivatives. Dataset annotations are benchmark evidence, not factory acceptance tolerances.
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000000000000000000000000000000000000..48e07f1984f766aa8ab5baa68df5c53e7065e97a
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,51 @@
+# Quality gate for the Python code. Run it locally with: python -m ruff check
+# The same command runs in CI (.github/workflows/ci.yml), so a mistake the linter
+# can see fails the build instead of reaching a reviewer.
+
+[tool.ruff]
+target-version = "py311"
+# 120 rather than the default 88: the existing code has long lines, and a wider limit
+# keeps the one-time formatting change smaller and easier to review.
+line-length = 120
+# Only code we maintain in this repo. deployment/ is excluded for now: those files are
+# published to Hugging Face and have a release checksum, so lint fixes there are done
+# separately and deliberately.
+include = ["backend/**/*.py", "scripts/**/*.py", "tests/**/*.py"]
+
+[tool.ruff.lint]
+# E9: syntax errors F: unused/undefined names and redefinitions
+# B: likely bugs (bugbear) BLE: blind `except Exception` must be justified
+select = ["E9", "F", "B", "BLE"]
+# B905: zip(strict=) adds noise on code where the lengths are equal by construction.
+ignore = ["B905"]
+
+[tool.ruff.lint.flake8-bugbear]
+# FastAPI's documented way to declare parameters is a call in the default value.
+extend-immutable-calls = ["fastapi.File", "fastapi.Form", "fastapi.Query"]
+
+[tool.ruff.lint.per-file-ignores]
+# Tests may assert on a broad exception to prove that *something* is refused.
+"tests/**" = ["B017"]
+
+[tool.mypy]
+# Run with: python -m mypy
+# Scope: the backend package. Most functions here are not annotated yet, and mypy skips
+# the body of an unannotated function unless check_untyped_defs is on, so this is on.
+# Add type hints to the files below one at a time, then tighten (disallow_untyped_defs).
+files = ["backend"]
+python_version = "3.11"
+check_untyped_defs = true
+ignore_missing_imports = true # LangChain, torch, etc. ship without complete type information
+warn_unused_ignores = true
+warn_redundant_casts = true
+# deployment/ is checked only as far as backend imports it (it has its own release process).
+follow_imports = "silent"
+
+[[tool.mypy.overrides]]
+# Fully annotated: new code in these modules must keep its type hints.
+module = ["backend.storage", "backend.config"]
+disallow_untyped_defs = true
+disallow_incomplete_defs = true
+
+[tool.pytest.ini_options]
+testpaths = ["tests", "deployment/tests"]
diff --git a/render.yaml b/render.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..7d688496e0cdf381a44646881f200f7aeee302fa
--- /dev/null
+++ b/render.yaml
@@ -0,0 +1,7 @@
+services:
+ - type: web
+ name: defectrag-showcase
+ runtime: static
+ rootDir: frontend
+ buildCommand: npm ci && npm run build:showcase
+ staticPublishPath: dist-static
diff --git a/requirements-anomalib.txt b/requirements-anomalib.txt
new file mode 100644
index 0000000000000000000000000000000000000000..55954219bc35b48bea89f4da2b68ebe7fd03a8f1
--- /dev/null
+++ b/requirements-anomalib.txt
@@ -0,0 +1,2 @@
+# OPTIONAL; install in a separate environment. Not the shipped inference method.
+anomalib==2.6.1
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..14aef4f5f92c11954f068342f20ef19c49a7f582
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,20 @@
+# Python 3.11 or 3.12. Install CUDA PyTorch separately for NVIDIA acceleration.
+torch==2.8.0
+torchvision==0.23.0
+transformers==4.57.6
+sentence-transformers>=5.1,<6
+numpy>=1.26,<3
+scikit-learn>=1.5,<2
+scipy>=1.11,<2
+threadpoolctl>=3.7.0,<4
+Pillow>=11.0,<13
+fastapi>=0.115,<1
+uvicorn[standard]>=0.34,<1
+python-multipart>=0.0.20,<1
+python-dotenv>=1.2.4,<2
+httpx>=0.28,<1
+langchain-core>=1.2,<2
+langchain-community==0.4.2
+langchain-text-splitters==1.1.3
+langgraph>=1.0,<2
+pytest>=9.2.0,<10
diff --git a/results/encoder_banks.json b/results/encoder_banks.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb6a1542b84e1cbf2616784fcf23a61e90b2609a
--- /dev/null
+++ b/results/encoder_banks.json
@@ -0,0 +1,1953 @@
+{
+ "candle": {
+ "base": {
+ "auroc": 0.941,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8036363636363636
+ },
+ "cap128": {
+ "auroc": 0.9582,
+ "vs_base": [
+ 0.005200000000000091,
+ 0.031299999999999994
+ ],
+ "vs_full": [
+ -0.011400000000000077,
+ 0.006000000000000005
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8054545454545454
+ },
+ "cap256": {
+ "auroc": 0.9608,
+ "vs_base": [
+ 0.008499999999999952,
+ 0.0342025
+ ],
+ "vs_full": [
+ -0.006900000000000017,
+ 0.00770000000000004
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8118181818181818
+ },
+ "cap512": {
+ "auroc": 0.9614,
+ "vs_base": [
+ 0.007199999999999984,
+ 0.035602499999999954
+ ],
+ "vs_full": [
+ -0.004299999999999973,
+ 0.006900000000000017
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8109090909090909
+ },
+ "core32k": {
+ "auroc": 0.9599,
+ "vs_base": [
+ 0.007295000000000083,
+ 0.03310250000000001
+ ],
+ "vs_full": [
+ -0.005002500000000004,
+ 0.0038025000000000116
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.8263636363636364
+ },
+ "core64k": {
+ "auroc": 0.9621,
+ "vs_base": [
+ 0.008797500000000031,
+ 0.03600000000000003
+ ],
+ "vs_full": [
+ -0.0011999999999999789,
+ 0.005599999999999938
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8381818181818181
+ },
+ "core96k": {
+ "auroc": 0.9619,
+ "vs_base": [
+ 0.008900000000000016,
+ 0.03589999999999993
+ ],
+ "vs_full": [
+ -0.0011999999999999789,
+ 0.0050000000000000044
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8381818181818181
+ },
+ "full": {
+ "auroc": 0.9604,
+ "vs_base": [
+ 0.0077000000000000375,
+ 0.03360750000000003
+ ],
+ "vs_full": null,
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8209090909090909
+ },
+ "rot": {
+ "auroc": 0.9528,
+ "vs_base": [
+ 0.001400000000000065,
+ 0.024900000000000033
+ ],
+ "vs_full": [
+ -0.015602499999999946,
+ -0.0005975000000000588
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8
+ },
+ "dinov3full": {
+ "auroc": 0.987,
+ "vs_base": [
+ 0.022697499999999943,
+ 0.07269999999999999
+ ],
+ "vs_full": [
+ 0.008297499999999975,
+ 0.048602499999999965
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.04,
+ "auroc_hard_type": 0.9654545454545455
+ },
+ "full+dinov3full": {
+ "auroc": 0.9839,
+ "vs_base": [
+ 0.022399999999999975,
+ 0.06769999999999998
+ ],
+ "vs_full": [
+ 0.010000000000000009,
+ 0.04030499999999997
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.9409090909090909
+ }
+ },
+ "capsules": {
+ "base": {
+ "auroc": 0.9683333333333334,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "cap128": {
+ "auroc": 0.9721666666666666,
+ "vs_base": [
+ -0.0044999999999999485,
+ 0.013004166666666546
+ ],
+ "vs_full": [
+ -0.01316666666666666,
+ 0.005170833333333296
+ ],
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "cap256": {
+ "auroc": 0.9738333333333333,
+ "vs_base": [
+ -0.004666666666666708,
+ 0.01683333333333326
+ ],
+ "vs_full": [
+ -0.008000000000000007,
+ 0.003666666666666707
+ ],
+ "recall_q95": 0.8,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.05
+ },
+ "cap512": {
+ "auroc": 0.974,
+ "vs_base": [
+ -0.007333333333333303,
+ 0.02000416666666666
+ ],
+ "vs_full": [
+ -0.006333333333333302,
+ 0.002666666666666706
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "core32k": {
+ "auroc": 0.9773333333333334,
+ "vs_base": [
+ -0.005837500000000023,
+ 0.025004166666666664
+ ],
+ "vs_full": [
+ -0.003833333333333247,
+ 0.008166666666666655
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "core64k": {
+ "auroc": 0.977,
+ "vs_base": [
+ -0.006666666666666599,
+ 0.02516666666666667
+ ],
+ "vs_full": [
+ -0.0035000000000000586,
+ 0.006833333333333358
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.05
+ },
+ "core96k": {
+ "auroc": 0.976,
+ "vs_base": [
+ -0.005166666666666653,
+ 0.02133333333333332
+ ],
+ "vs_full": [
+ -0.0020000000000000018,
+ 0.003166666666666651
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.05
+ },
+ "full": {
+ "auroc": 0.9756666666666667,
+ "vs_base": [
+ -0.003666666666666707,
+ 0.020337500000000067
+ ],
+ "vs_full": null,
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "rot": {
+ "auroc": 0.9751666666666666,
+ "vs_base": [
+ -0.009666666666666605,
+ 0.024499999999999966
+ ],
+ "vs_full": [
+ -0.011670833333333377,
+ 0.012833333333333252
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.1
+ },
+ "dinov3full": {
+ "auroc": 0.9433333333333334,
+ "vs_base": [
+ -0.05800416666666672,
+ 0.00800416666666665
+ ],
+ "vs_full": [
+ -0.06583749999999997,
+ 0.0004999999999999449
+ ],
+ "recall_q95": 0.59,
+ "false_alarm_q95": 0.03333333333333333,
+ "recall_deployed": 0.59,
+ "false_alarm_deployed": 0.03333333333333333
+ },
+ "full+dinov3full": {
+ "auroc": 0.9783333333333334,
+ "vs_base": [
+ -0.0020000000000000018,
+ 0.025000000000000022
+ ],
+ "vs_full": [
+ -0.0050000000000000044,
+ 0.011170833333333302
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.05
+ }
+ },
+ "cashew": {
+ "base": {
+ "auroc": 0.9608,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "cap128": {
+ "auroc": 0.9664,
+ "vs_base": [
+ -0.011805000000000032,
+ 0.02340499999999995
+ ],
+ "vs_full": [
+ -0.022199999999999998,
+ 0.0006000000000000449
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.06
+ },
+ "cap256": {
+ "auroc": 0.9704,
+ "vs_base": [
+ -0.005199999999999982,
+ 0.027000000000000024
+ ],
+ "vs_full": [
+ -0.015399999999999973,
+ 0.0010000000000000009
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.08
+ },
+ "cap512": {
+ "auroc": 0.976,
+ "vs_base": [
+ 0.0011999999999999789,
+ 0.03300000000000003
+ ],
+ "vs_full": [
+ -0.0016000000000000458,
+ 0.0
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "core32k": {
+ "auroc": 0.978,
+ "vs_base": [
+ 0.0023949999999999584,
+ 0.034399999999999986
+ ],
+ "vs_full": [
+ -0.002405000000000065,
+ 0.006399999999999964
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.04
+ },
+ "core64k": {
+ "auroc": 0.9764,
+ "vs_base": [
+ 0.0004000000000000642,
+ 0.03340499999999996
+ ],
+ "vs_full": [
+ -0.0036000000000000476,
+ 0.0030000000000000027
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "core96k": {
+ "auroc": 0.9774,
+ "vs_base": [
+ 0.0011999999999999789,
+ 0.035605000000000046
+ ],
+ "vs_full": [
+ -0.0011999999999999789,
+ 0.0041999999999999815
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "full": {
+ "auroc": 0.9764,
+ "vs_base": [
+ 0.0011999999999999789,
+ 0.033399999999999985
+ ],
+ "vs_full": null,
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "rot": {
+ "auroc": 0.969,
+ "vs_base": [
+ -0.006199999999999983,
+ 0.02400000000000002
+ ],
+ "vs_full": [
+ -0.01640500000000008,
+ -0.0005949999999999645
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.16
+ },
+ "dinov3full": {
+ "auroc": 0.9846,
+ "vs_base": [
+ -0.004799999999999918,
+ 0.05560499999999995
+ ],
+ "vs_full": [
+ -0.011804999999999923,
+ 0.02959999999999996
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.06
+ },
+ "full+dinov3full": {
+ "auroc": 0.993,
+ "vs_base": [
+ 0.011800000000000033,
+ 0.060205
+ ],
+ "vs_full": [
+ 0.0043999999999999595,
+ 0.032200000000000006
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.08
+ }
+ },
+ "chewinggum": {
+ "base": {
+ "auroc": 0.9886,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "cap128": {
+ "auroc": 0.9924,
+ "vs_base": [
+ -0.0046000000000000485,
+ 0.01420500000000007
+ ],
+ "vs_full": [
+ 0.0,
+ 0.004804999999999996
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "cap256": {
+ "auroc": 0.9918,
+ "vs_base": [
+ -0.005600000000000049,
+ 0.013000000000000012
+ ],
+ "vs_full": [
+ -0.0008000000000000229,
+ 0.003999999999999895
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "cap512": {
+ "auroc": 0.9912,
+ "vs_base": [
+ -0.006199999999999983,
+ 0.012199999999999992
+ ],
+ "vs_full": [
+ -0.00040000000000006697,
+ 0.0023999999999999577
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.02
+ },
+ "core32k": {
+ "auroc": 0.9926,
+ "vs_base": [
+ -0.0021999999999999797,
+ 0.012599999999999948
+ ],
+ "vs_full": [
+ -0.0011999999999999789,
+ 0.007800000000000029
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "core64k": {
+ "auroc": 0.9912,
+ "vs_base": [
+ -0.005799999999999916,
+ 0.01220499999999996
+ ],
+ "vs_full": [
+ -0.0014000000000000679,
+ 0.0030000000000000027
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "core96k": {
+ "auroc": 0.991,
+ "vs_base": [
+ -0.006005000000000004,
+ 0.012399999999999967
+ ],
+ "vs_full": [
+ -0.0015999999999999348,
+ 0.0024000000000000687
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "full": {
+ "auroc": 0.9908,
+ "vs_base": [
+ -0.006999999999999898,
+ 0.012004999999999983
+ ],
+ "vs_full": null,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "rot": {
+ "auroc": 0.9946,
+ "vs_base": [
+ -0.00039999999999995595,
+ 0.015600000000000058
+ ],
+ "vs_full": [
+ -0.00019999999999997797,
+ 0.011199999999999988
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "dinov3full": {
+ "auroc": 0.9788,
+ "vs_base": [
+ -0.03639999999999999,
+ 0.009800000000000031
+ ],
+ "vs_full": [
+ -0.03520000000000001,
+ 0.005800000000000027
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.02
+ },
+ "full+dinov3full": {
+ "auroc": 0.9914,
+ "vs_base": [
+ -0.0047999999999999154,
+ 0.01319999999999999
+ ],
+ "vs_full": [
+ -0.0040000000000000036,
+ 0.006405000000000042
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.08
+ }
+ },
+ "fryum": {
+ "base": {
+ "auroc": 0.9924,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.02
+ },
+ "cap128": {
+ "auroc": 0.991,
+ "vs_base": [
+ -0.008199999999999985,
+ 0.004204999999999954
+ ],
+ "vs_full": [
+ -0.007799999999999921,
+ 0.0030000000000000027
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.08
+ },
+ "cap256": {
+ "auroc": 0.9896,
+ "vs_base": [
+ -0.01419999999999999,
+ 0.005600000000000049
+ ],
+ "vs_full": [
+ -0.010405000000000072,
+ 0.0005999999999999339
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.02
+ },
+ "cap512": {
+ "auroc": 0.9928,
+ "vs_base": [
+ -0.005199999999999982,
+ 0.006205000000000064
+ ],
+ "vs_full": [
+ -0.0023999999999999577,
+ 0.0016000000000000458
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "core32k": {
+ "auroc": 0.9958,
+ "vs_base": [
+ -0.00040000000000006697,
+ 0.009399999999999967
+ ],
+ "vs_full": [
+ -0.0006050000000000414,
+ 0.008599999999999941
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "core64k": {
+ "auroc": 0.9924,
+ "vs_base": [
+ -0.006599999999999939,
+ 0.006000000000000005
+ ],
+ "vs_full": [
+ -0.0024000000000000687,
+ 0.00040500000000003635
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.04
+ },
+ "core96k": {
+ "auroc": 0.9926,
+ "vs_base": [
+ -0.005605000000000048,
+ 0.006800000000000028
+ ],
+ "vs_full": [
+ -0.0020000000000000018,
+ 0.0008000000000000229
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.04
+ },
+ "full": {
+ "auroc": 0.993,
+ "vs_base": [
+ -0.00539999999999996,
+ 0.00660000000000005
+ ],
+ "vs_full": null,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "rot": {
+ "auroc": 0.993,
+ "vs_base": [
+ -0.006800000000000028,
+ 0.007205000000000065
+ ],
+ "vs_full": [
+ -0.006610000000000049,
+ 0.007205000000000065
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.04
+ },
+ "dinov3full": {
+ "auroc": 0.9486,
+ "vs_base": [
+ -0.0776,
+ -0.015790000000000092
+ ],
+ "vs_full": [
+ -0.07940500000000003,
+ -0.017000000000000015
+ ],
+ "recall_q95": 0.83,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.83,
+ "false_alarm_deployed": 0.06
+ },
+ "full+dinov3full": {
+ "auroc": 0.9882,
+ "vs_base": [
+ -0.015005000000000013,
+ 0.004399999999999962
+ ],
+ "vs_full": [
+ -0.013799999999999923,
+ 0.0010049999999999731
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.06
+ }
+ },
+ "macaroni1": {
+ "base": {
+ "auroc": 0.909,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7244
+ },
+ "cap128": {
+ "auroc": 0.9189,
+ "vs_base": [
+ -0.010404999999999965,
+ 0.029304999999999966
+ ],
+ "vs_full": [
+ -0.028999999999999918,
+ -0.0020000000000000018
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.73
+ },
+ "cap256": {
+ "auroc": 0.9276,
+ "vs_base": [
+ 0.001400000000000065,
+ 0.03710499999999999
+ ],
+ "vs_full": [
+ -0.017800000000000038,
+ 0.005099999999999993
+ ],
+ "recall_q95": 0.72,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.764
+ },
+ "cap512": {
+ "auroc": 0.9266,
+ "vs_base": [
+ -0.0020000000000000018,
+ 0.03840249999999998
+ ],
+ "vs_full": [
+ -0.015902500000000024,
+ 0.00019999999999997797
+ ],
+ "recall_q95": 0.66,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.762
+ },
+ "core32k": {
+ "auroc": 0.9352,
+ "vs_base": [
+ 0.00339750000000007,
+ 0.050907499999999904
+ ],
+ "vs_full": [
+ -0.008299999999999974,
+ 0.01139999999999997
+ ],
+ "recall_q95": 0.72,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.7768
+ },
+ "core64k": {
+ "auroc": 0.9411,
+ "vs_base": [
+ 0.009199999999999986,
+ 0.05699999999999994
+ ],
+ "vs_full": [
+ -0.0002999999999999697,
+ 0.016100000000000003
+ ],
+ "recall_q95": 0.71,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.22,
+ "auroc_hard_type": 0.8056
+ },
+ "core96k": {
+ "auroc": 0.9409,
+ "vs_base": [
+ 0.010000000000000009,
+ 0.05630499999999999
+ ],
+ "vs_full": [
+ 0.0007999999999999119,
+ 0.015000000000000013
+ ],
+ "recall_q95": 0.7,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.19,
+ "auroc_hard_type": 0.8064
+ },
+ "full": {
+ "auroc": 0.9338,
+ "vs_base": [
+ 0.003800000000000023,
+ 0.04580500000000003
+ ],
+ "vs_full": null,
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7824
+ },
+ "rot": {
+ "auroc": 0.9255,
+ "vs_base": [
+ -0.0011024999999999896,
+ 0.034402499999999975
+ ],
+ "vs_full": [
+ -0.01950249999999996,
+ 0.0023999999999999577
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7692
+ },
+ "dinov3full": {
+ "auroc": 0.8339,
+ "vs_base": [
+ -0.1310025,
+ -0.020600000000000063
+ ],
+ "vs_full": [
+ -0.15330249999999998,
+ -0.05007750000000016
+ ],
+ "recall_q95": 0.2,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.66,
+ "false_alarm_deployed": 0.14,
+ "auroc_hard_type": 0.7152
+ },
+ "full+dinov3full": {
+ "auroc": 0.9307,
+ "vs_base": [
+ -0.0028025000000000216,
+ 0.046302499999999996
+ ],
+ "vs_full": [
+ -0.02190250000000003,
+ 0.01529999999999998
+ ],
+ "recall_q95": 0.54,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.21,
+ "auroc_hard_type": 0.7772
+ }
+ },
+ "macaroni2": {
+ "base": {
+ "auroc": 0.845,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.48,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7083333333333334
+ },
+ "cap128": {
+ "auroc": 0.8664,
+ "vs_base": [
+ -0.003514999999999948,
+ 0.047402499999999986
+ ],
+ "vs_full": [
+ -0.043105000000000025,
+ 0.004409999999999906
+ ],
+ "recall_q95": 0.56,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.744
+ },
+ "cap256": {
+ "auroc": 0.858,
+ "vs_base": [
+ -0.01459999999999995,
+ 0.04060249999999996
+ ],
+ "vs_full": [
+ -0.049405,
+ -0.004297499999999987
+ ],
+ "recall_q95": 0.51,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.7373333333333333
+ },
+ "cap512": {
+ "auroc": 0.8779,
+ "vs_base": [
+ 0.005995000000000006,
+ 0.06260249999999998
+ ],
+ "vs_full": [
+ -0.022102500000000008,
+ 0.006502500000000045
+ ],
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.7696666666666667
+ },
+ "core32k": {
+ "auroc": 0.8797,
+ "vs_base": [
+ 0.004797500000000027,
+ 0.0661075
+ ],
+ "vs_full": [
+ -0.023700000000000054,
+ 0.011499999999999958
+ ],
+ "recall_q95": 0.63,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.29,
+ "auroc_hard_type": 0.748
+ },
+ "core64k": {
+ "auroc": 0.8849,
+ "vs_base": [
+ 0.012899999999999912,
+ 0.06700250000000005
+ ],
+ "vs_full": [
+ -0.01419999999999999,
+ 0.013800000000000034
+ ],
+ "recall_q95": 0.71,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.7716666666666666
+ },
+ "core96k": {
+ "auroc": 0.8834,
+ "vs_base": [
+ 0.00889750000000002,
+ 0.0654025
+ ],
+ "vs_full": [
+ -0.015602499999999946,
+ 0.01150250000000005
+ ],
+ "recall_q95": 0.63,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.36,
+ "auroc_hard_type": 0.769
+ },
+ "full": {
+ "auroc": 0.8852,
+ "vs_base": [
+ 0.011197499999999989,
+ 0.06999999999999995
+ ],
+ "vs_full": null,
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.33,
+ "auroc_hard_type": 0.7706666666666667
+ },
+ "rot": {
+ "auroc": 0.8539,
+ "vs_base": [
+ -0.018504999999999962,
+ 0.036602499999999955
+ ],
+ "vs_full": [
+ -0.05410250000000003,
+ -0.011400000000000073
+ ],
+ "recall_q95": 0.5,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.34,
+ "auroc_hard_type": 0.722
+ },
+ "dinov3full": {
+ "auroc": 0.5992,
+ "vs_base": [
+ -0.329305,
+ -0.1635975000000001
+ ],
+ "vs_full": [
+ -0.36110500000000006,
+ -0.21099749999999998
+ ],
+ "recall_q95": 0.02,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.18,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.5
+ },
+ "full+dinov3full": {
+ "auroc": 0.852,
+ "vs_base": [
+ -0.027502499999999968,
+ 0.04170499999999994
+ ],
+ "vs_full": [
+ -0.054602499999999984,
+ -0.01429999999999998
+ ],
+ "recall_q95": 0.34,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.33,
+ "auroc_hard_type": 0.7193333333333334
+ }
+ },
+ "pcb1": {
+ "base": {
+ "auroc": 0.9597,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.08
+ },
+ "cap128": {
+ "auroc": 0.96,
+ "vs_base": [
+ -0.008900000000000019,
+ 0.00990000000000002
+ ],
+ "vs_full": [
+ -0.025399999999999978,
+ -0.0040999999999999925
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.11
+ },
+ "cap256": {
+ "auroc": 0.9687,
+ "vs_base": [
+ -0.0012024999999999785,
+ 0.020299999999999985
+ ],
+ "vs_full": [
+ -0.01080250000000003,
+ 0.0003025000000000613
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.1
+ },
+ "cap512": {
+ "auroc": 0.9675,
+ "vs_base": [
+ -0.0026025000000000436,
+ 0.019199999999999995
+ ],
+ "vs_full": [
+ -0.01200000000000001,
+ -0.0013999999999999568
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.1
+ },
+ "core32k": {
+ "auroc": 0.9724,
+ "vs_base": [
+ 0.0010000000000000009,
+ 0.025702500000000038
+ ],
+ "vs_full": [
+ -0.005602500000000049,
+ 0.0030000000000000027
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.12
+ },
+ "core64k": {
+ "auroc": 0.9739,
+ "vs_base": [
+ 0.0033000000000000806,
+ 0.027602499999999943
+ ],
+ "vs_full": [
+ -0.0031025000000000995,
+ 0.0040000000000000036
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "core96k": {
+ "auroc": 0.9746,
+ "vs_base": [
+ 0.0040000000000000036,
+ 0.027802500000000032
+ ],
+ "vs_full": [
+ -0.0012999999999999678,
+ 0.0040999999999999925
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "full": {
+ "auroc": 0.9735,
+ "vs_base": [
+ 0.0035974999999999397,
+ 0.02680250000000003
+ ],
+ "vs_full": null,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "rot": {
+ "auroc": 0.9593,
+ "vs_base": [
+ -0.016299999999999985,
+ 0.014204999999999962
+ ],
+ "vs_full": [
+ -0.02889999999999993,
+ -0.0008975000000000258
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.07
+ },
+ "dinov3full": {
+ "auroc": 0.972,
+ "vs_base": [
+ -0.010899999999999913,
+ 0.03530249999999999
+ ],
+ "vs_full": [
+ -0.02380249999999993,
+ 0.01870500000000002
+ ],
+ "recall_q95": 0.83,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.83,
+ "false_alarm_deployed": 0.05
+ },
+ "full+dinov3full": {
+ "auroc": 0.9807,
+ "vs_base": [
+ 0.007800000000000029,
+ 0.03740500000000007
+ ],
+ "vs_full": [
+ -0.0012025000000000896,
+ 0.0170025
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.11
+ }
+ },
+ "pcb2": {
+ "base": {
+ "auroc": 0.9062,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.7805263157894737
+ },
+ "cap128": {
+ "auroc": 0.9303,
+ "vs_base": [
+ 0.007400000000000071,
+ 0.04369999999999996
+ ],
+ "vs_full": [
+ -0.0475025000000001,
+ -0.010500000000000065
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.08,
+ "auroc_hard_type": 0.8221052631578948
+ },
+ "cap256": {
+ "auroc": 0.9436,
+ "vs_base": [
+ 0.01969499999999994,
+ 0.05799999999999994
+ ],
+ "vs_full": [
+ -0.0262025,
+ -0.0031974999999999946
+ ],
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8294736842105264
+ },
+ "cap512": {
+ "auroc": 0.9471,
+ "vs_base": [
+ 0.02189749999999992,
+ 0.06310250000000003
+ ],
+ "vs_full": [
+ -0.019699999999999943,
+ -0.0030999999999999917
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.08,
+ "auroc_hard_type": 0.8415789473684211
+ },
+ "core32k": {
+ "auroc": 0.9592,
+ "vs_base": [
+ 0.02739999999999998,
+ 0.083405
+ ],
+ "vs_full": [
+ -0.0035999999999999366,
+ 0.006700000000000039
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.86
+ },
+ "core64k": {
+ "auroc": 0.9587,
+ "vs_base": [
+ 0.028100000000000014,
+ 0.08100249999999995
+ ],
+ "vs_full": [
+ -0.002902500000000013,
+ 0.005199999999999982
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8663157894736843
+ },
+ "core96k": {
+ "auroc": 0.9585,
+ "vs_base": [
+ 0.028497499999999974,
+ 0.07960249999999999
+ ],
+ "vs_full": [
+ -0.0032999999999999696,
+ 0.005099999999999993
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8642105263157894
+ },
+ "full": {
+ "auroc": 0.9577,
+ "vs_base": [
+ 0.02658749999999996,
+ 0.08010499999999993
+ ],
+ "vs_full": null,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8663157894736843
+ },
+ "rot": {
+ "auroc": 0.939,
+ "vs_base": [
+ 0.0048000000000000265,
+ 0.0609099999999999
+ ],
+ "vs_full": [
+ -0.04050500000000009,
+ -0.0046975000000000515
+ ],
+ "recall_q95": 0.81,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.08,
+ "auroc_hard_type": 0.7836842105263158
+ },
+ "dinov3full": {
+ "auroc": 0.9537,
+ "vs_base": [
+ 0.01329749999999998,
+ 0.08409999999999995
+ ],
+ "vs_full": [
+ -0.029499999999999974,
+ 0.020002500000000003
+ ],
+ "recall_q95": 0.76,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.76,
+ "false_alarm_deployed": 0.03,
+ "auroc_hard_type": 0.9110526315789473
+ },
+ "full+dinov3full": {
+ "auroc": 0.9642,
+ "vs_base": [
+ 0.03249749999999998,
+ 0.08620250000000004
+ ],
+ "vs_full": [
+ -0.0037000000000000366,
+ 0.017902500000000012
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8905263157894737
+ }
+ },
+ "pcb3": {
+ "base": {
+ "auroc": 0.9547524752475247,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.8900990099009901
+ },
+ "cap128": {
+ "auroc": 0.9639603960396039,
+ "vs_base": [
+ -0.003069306930693072,
+ 0.022376237623762396
+ ],
+ "vs_full": [
+ -0.02841584158415833,
+ -0.006631188118811901
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.900990099009901
+ },
+ "cap256": {
+ "auroc": 0.9745544554455445,
+ "vs_base": [
+ 0.006831683168316838,
+ 0.036636138613861294
+ ],
+ "vs_full": [
+ -0.013665841584158428,
+ 0.002079207920792081
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.10891089108910891,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.10891089108910891,
+ "auroc_hard_type": 0.9272277227722773
+ },
+ "cap512": {
+ "auroc": 0.980990099009901,
+ "vs_base": [
+ 0.010792079207920802,
+ 0.044455445544554384
+ ],
+ "vs_full": [
+ -0.004158415841584162,
+ 0.0065346534653465405
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.944059405940594
+ },
+ "core32k": {
+ "auroc": 0.9869306930693069,
+ "vs_base": [
+ 0.013858910891089121,
+ 0.0538613861386138
+ ],
+ "vs_full": [
+ -0.0001980198019801982,
+ 0.016039603960396054
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.12871287128712872,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.12871287128712872,
+ "auroc_hard_type": 0.9559405940594059
+ },
+ "core64k": {
+ "auroc": 0.9875247524752475,
+ "vs_base": [
+ 0.014551980198019815,
+ 0.0537623762376237
+ ],
+ "vs_full": [
+ 0.0012871287128712883,
+ 0.015547029702970297
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9603960396039604
+ },
+ "core96k": {
+ "auroc": 0.9873267326732673,
+ "vs_base": [
+ 0.014851485148514865,
+ 0.052970297029702906
+ ],
+ "vs_full": [
+ 0.0012871287128712883,
+ 0.015943069306930693
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9559405940594059
+ },
+ "full": {
+ "auroc": 0.9800990099009901,
+ "vs_base": [
+ 0.01207920792079209,
+ 0.043168316831683096
+ ],
+ "vs_full": null,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9346534653465347
+ },
+ "rot": {
+ "auroc": 0.9749504950495049,
+ "vs_base": [
+ 0.006930693069306937,
+ 0.03623762376237616
+ ],
+ "vs_full": [
+ -0.01207920792079209,
+ 0.0002970297029702973
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.07920792079207921,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.07920792079207921,
+ "auroc_hard_type": 0.9128712871287129
+ },
+ "dinov3full": {
+ "auroc": 0.9555445544554455,
+ "vs_base": [
+ -0.030903465346534573,
+ 0.0362400990099009
+ ],
+ "vs_full": [
+ -0.05287623762376231,
+ 0.0033688118811881084
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.0594059405940594,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.0594059405940594,
+ "auroc_hard_type": 0.9064356435643565
+ },
+ "full+dinov3full": {
+ "auroc": 0.9874257425742574,
+ "vs_base": [
+ 0.012277227722772288,
+ 0.05980693069306922
+ ],
+ "vs_full": [
+ -0.004752475247524757,
+ 0.023277227722772242
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.09900990099009901,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.09900990099009901,
+ "auroc_hard_type": 0.950990099009901
+ }
+ },
+ "pcb4": {
+ "base": {
+ "auroc": 0.9865346534653465,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "cap128": {
+ "auroc": 0.9935643564356436,
+ "vs_base": [
+ -0.003861386138613865,
+ 0.023861386138613883
+ ],
+ "vs_full": [
+ -0.00544554455445545,
+ 0.0001980198019801982
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "cap256": {
+ "auroc": 0.9953465346534653,
+ "vs_base": [
+ -0.0018811881188118829,
+ 0.025349009900990108
+ ],
+ "vs_full": [
+ -0.0025742574257425765,
+ 0.0017821782178217838
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "cap512": {
+ "auroc": 0.9964356435643564,
+ "vs_base": [
+ -0.0011881188118811892,
+ 0.027227722772277252
+ ],
+ "vs_full": [
+ -0.0004950495049504955,
+ 0.00317079207920791
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "core32k": {
+ "auroc": 0.997029702970297,
+ "vs_base": [
+ -2.475247524752337e-06,
+ 0.02762376237623765
+ ],
+ "vs_full": [
+ -0.000596534653465347,
+ 0.004257425742574261
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "core64k": {
+ "auroc": 0.9969306930693069,
+ "vs_base": [
+ -0.0001980198019801982,
+ 0.02822029702970298
+ ],
+ "vs_full": [
+ -0.0004975247524752479,
+ 0.003861386138613865
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "core96k": {
+ "auroc": 0.9968316831683168,
+ "vs_base": [
+ -0.0004950495049504955,
+ 0.027227722772277252
+ ],
+ "vs_full": [
+ -0.0003960396039603964,
+ 0.0036633663366336666
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "full": {
+ "auroc": 0.9956435643564356,
+ "vs_base": [
+ -0.0017821782178217838,
+ 0.025940594059405964
+ ],
+ "vs_full": null,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "rot": {
+ "auroc": 0.9944554455445545,
+ "vs_base": [
+ -0.0027722772277227747,
+ 0.024358910891089117
+ ],
+ "vs_full": [
+ -0.004455445544554459,
+ 0.0011881188118811892
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "dinov3full": {
+ "auroc": 0.9902970297029703,
+ "vs_base": [
+ -0.009405940594059414,
+ 0.02089108910891091
+ ],
+ "vs_full": [
+ -0.015153465346534667,
+ 0.0024777227722772165
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.10891089108910891,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.10891089108910891
+ },
+ "full+dinov3full": {
+ "auroc": 0.9963366336633663,
+ "vs_base": [
+ -0.0012871287128712883,
+ 0.026240099009901
+ ],
+ "vs_full": [
+ -0.002970297029702973,
+ 0.005148514851485153
+ ],
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0594059405940594,
+ "recall_deployed": 1.0,
+ "false_alarm_deployed": 0.0594059405940594
+ }
+ },
+ "pipe_fryum": {
+ "base": {
+ "auroc": 0.9892,
+ "vs_base": null,
+ "vs_full": null,
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "cap128": {
+ "auroc": 0.9974,
+ "vs_base": [
+ 0.0,
+ 0.022600000000000064
+ ],
+ "vs_full": [
+ 0.0,
+ 0.016799999999999926
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ },
+ "cap256": {
+ "auroc": 0.993,
+ "vs_base": [
+ 0.0,
+ 0.01100000000000001
+ ],
+ "vs_full": [
+ -0.0011999999999999789,
+ 0.0050000000000000044
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "cap512": {
+ "auroc": 0.9918,
+ "vs_base": [
+ 0.0,
+ 0.007604999999999912
+ ],
+ "vs_full": [
+ -0.0008000000000000229,
+ 0.0008000000000000229
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "core32k": {
+ "auroc": 0.9894,
+ "vs_base": [
+ -0.0032000000000000917,
+ 0.0035999999999999366
+ ],
+ "vs_full": [
+ -0.007199999999999984,
+ 0.0
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "core64k": {
+ "auroc": 0.989,
+ "vs_base": [
+ -0.0041999999999999815,
+ 0.003405000000000039
+ ],
+ "vs_full": [
+ -0.009000000000000008,
+ 0.0
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "core96k": {
+ "auroc": 0.9906,
+ "vs_base": [
+ -0.00040500000000006335,
+ 0.0050000000000000044
+ ],
+ "vs_full": [
+ -0.0040000000000000036,
+ 0.0
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.08
+ },
+ "full": {
+ "auroc": 0.9918,
+ "vs_base": [
+ 0.0,
+ 0.00759999999999994
+ ],
+ "vs_full": null,
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "rot": {
+ "auroc": 0.9932,
+ "vs_base": [
+ 0.0,
+ 0.01200000000000001
+ ],
+ "vs_full": [
+ -0.001605000000000045,
+ 0.006599999999999939
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "dinov3full": {
+ "auroc": 0.9918,
+ "vs_base": [
+ -0.013800000000000034,
+ 0.021399999999999975
+ ],
+ "vs_full": [
+ -0.014399999999999968,
+ 0.01639999999999997
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.02
+ },
+ "full+dinov3full": {
+ "auroc": 0.998,
+ "vs_base": [
+ 0.0,
+ 0.022799999999999935
+ ],
+ "vs_full": [
+ 0.0,
+ 0.017000000000000015
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/encoder_candidates.json b/results/encoder_candidates.json
new file mode 100644
index 0000000000000000000000000000000000000000..2d98e82e1a116e25cc25c03c0b1065a7891fcdca
--- /dev/null
+++ b/results/encoder_candidates.json
@@ -0,0 +1,2355 @@
+{
+ "candle": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.941,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8036363636363636
+ },
+ "full": {
+ "auroc": 0.9604,
+ "difference_vs_base_95": [
+ 0.008199999999999985,
+ 0.03300000000000003
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8209090909090909
+ },
+ "fullfg": {
+ "auroc": 0.9601,
+ "difference_vs_base_95": [
+ 0.007699999999999929,
+ 0.033402499999999974
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8227272727272728
+ },
+ "pos": {
+ "auroc": 0.9668,
+ "difference_vs_base_95": [
+ 0.010097499999999999,
+ 0.04350249999999997
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.84
+ },
+ "cls": {
+ "auroc": 0.8986,
+ "difference_vs_base_95": [
+ -0.08850250000000003,
+ -0.0007974999999999286
+ ],
+ "recall_q95": 0.67,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.67,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8945454545454545
+ },
+ "meanpool": {
+ "auroc": 0.8983,
+ "difference_vs_base_95": [
+ -0.08861000000000001,
+ 0.00150250000000004
+ ],
+ "recall_q95": 0.67,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.67,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.9190909090909091
+ },
+ "coarse": {
+ "auroc": 0.9587,
+ "difference_vs_base_95": [
+ -0.007499999999999954,
+ 0.04340249999999998
+ ],
+ "recall_q95": 0.75,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.75,
+ "false_alarm_deployed": 0.04,
+ "auroc_hard_type": 0.8409090909090909
+ },
+ "base+cls": {
+ "auroc": 0.9537,
+ "difference_vs_base_95": [
+ -0.005907500000000015,
+ 0.03110499999999999
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.13,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.13,
+ "auroc_hard_type": 0.8936363636363637
+ },
+ "base+coarse": {
+ "auroc": 0.96,
+ "difference_vs_base_95": [
+ 0.003897500000000015,
+ 0.035802500000000036
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.02,
+ "auroc_hard_type": 0.8309090909090909
+ },
+ "base+pos": {
+ "auroc": 0.9599,
+ "difference_vs_base_95": [
+ 0.008199999999999985,
+ 0.03189999999999993
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8281818181818181
+ },
+ "full+cls": {
+ "auroc": 0.9615,
+ "difference_vs_base_95": [
+ 0.0004950000000000568,
+ 0.044107499999999876
+ ],
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.13,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.13,
+ "auroc_hard_type": 0.9027272727272727
+ },
+ "full+meanpool": {
+ "auroc": 0.9629,
+ "difference_vs_base_95": [
+ 0.0012999999999999678,
+ 0.04360249999999996
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.13,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.13,
+ "auroc_hard_type": 0.9127272727272727
+ },
+ "full+coarse": {
+ "auroc": 0.9704,
+ "difference_vs_base_95": [
+ 0.013399999999999967,
+ 0.049000000000000044
+ ],
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.02,
+ "auroc_hard_type": 0.8481818181818181
+ },
+ "full+pos": {
+ "auroc": 0.9659,
+ "difference_vs_base_95": [
+ 0.01090000000000002,
+ 0.042202500000000004
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8354545454545454
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9693,
+ "difference_vs_base_95": [
+ 0.0120975,
+ 0.047204999999999886
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.02,
+ "auroc_hard_type": 0.8445454545454546
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9766,
+ "difference_vs_base_95": [
+ 0.014997500000000014,
+ 0.05840000000000001
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.06,
+ "auroc_hard_type": 0.9172727272727272
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9712,
+ "difference_vs_base_95": [
+ 0.014500000000000065,
+ 0.04920499999999999
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.06,
+ "auroc_hard_type": 0.8445454545454546
+ }
+ }
+ },
+ "capsules": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9683333333333334,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "full": {
+ "auroc": 0.9756666666666667,
+ "difference_vs_base_95": [
+ -0.004504166666666723,
+ 0.02099999999999991
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "fullfg": {
+ "auroc": 0.9706666666666667,
+ "difference_vs_base_95": [
+ -0.013850000000000027,
+ 0.018166666666666664
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.05
+ },
+ "pos": {
+ "auroc": 0.9735833333333334,
+ "difference_vs_base_95": [
+ -0.007499999999999951,
+ 0.01933749999999996
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "cls": {
+ "auroc": 0.8896666666666667,
+ "difference_vs_base_95": [
+ -0.1355083333333334,
+ -0.028495833333333328
+ ],
+ "recall_q95": 0.67,
+ "false_alarm_q95": 0.11666666666666667,
+ "recall_deployed": 0.67,
+ "false_alarm_deployed": 0.11666666666666667
+ },
+ "meanpool": {
+ "auroc": 0.8573333333333333,
+ "difference_vs_base_95": [
+ -0.17150416666666676,
+ -0.05916666666666659
+ ],
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.55,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "coarse": {
+ "auroc": 0.917,
+ "difference_vs_base_95": [
+ -0.09202499999999997,
+ -0.01849999999999996
+ ],
+ "recall_q95": 0.66,
+ "false_alarm_q95": 0.03333333333333333,
+ "recall_deployed": 0.66,
+ "false_alarm_deployed": 0.03333333333333333
+ },
+ "base+cls": {
+ "auroc": 0.9683333333333334,
+ "difference_vs_base_95": [
+ -0.025666666666666615,
+ 0.02449999999999997
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "base+coarse": {
+ "auroc": 0.9701666666666666,
+ "difference_vs_base_95": [
+ -0.009666666666666601,
+ 0.013833333333333253
+ ],
+ "recall_q95": 0.79,
+ "false_alarm_q95": 0.03333333333333333,
+ "recall_deployed": 0.79,
+ "false_alarm_deployed": 0.03333333333333333
+ },
+ "base+pos": {
+ "auroc": 0.9745,
+ "difference_vs_base_95": [
+ -0.0011708333333333152,
+ 0.015166666666666662
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "full+cls": {
+ "auroc": 0.9723333333333334,
+ "difference_vs_base_95": [
+ -0.015341666666666644,
+ 0.02400000000000002
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "full+meanpool": {
+ "auroc": 0.9686666666666667,
+ "difference_vs_base_95": [
+ -0.013499999999999956,
+ 0.01583333333333326
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.13333333333333333,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.13333333333333333
+ },
+ "full+coarse": {
+ "auroc": 0.9716666666666667,
+ "difference_vs_base_95": [
+ -0.009333333333333305,
+ 0.01767083333333336
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "full+pos": {
+ "auroc": 0.9755,
+ "difference_vs_base_95": [
+ -0.0030000000000000027,
+ 0.020000000000000018
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "fullfg+coarse": {
+ "auroc": 0.968,
+ "difference_vs_base_95": [
+ -0.015504166666666735,
+ 0.015170833333333305
+ ],
+ "recall_q95": 0.81,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.05
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9765,
+ "difference_vs_base_95": [
+ -0.008333333333333304,
+ 0.028166666666666673
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9761666666666666,
+ "difference_vs_base_95": [
+ -0.0018333333333333535,
+ 0.02000416666666666
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.06666666666666667
+ }
+ }
+ },
+ "cashew": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9608,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "full": {
+ "auroc": 0.9764,
+ "difference_vs_base_95": [
+ 0.0011999999999999789,
+ 0.03420000000000001
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "fullfg": {
+ "auroc": 0.976,
+ "difference_vs_base_95": [
+ 0.0011999999999999789,
+ 0.03260000000000007
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "pos": {
+ "auroc": 0.9699,
+ "difference_vs_base_95": [
+ -0.005800000000000027,
+ 0.026102499999999997
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.16
+ },
+ "cls": {
+ "auroc": 0.92,
+ "difference_vs_base_95": [
+ -0.09199999999999997,
+ 0.005804999999999999
+ ],
+ "recall_q95": 0.65,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.65,
+ "false_alarm_deployed": 0.1
+ },
+ "meanpool": {
+ "auroc": 0.9498,
+ "difference_vs_base_95": [
+ -0.05860999999999998,
+ 0.029404999999999955
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.08
+ },
+ "coarse": {
+ "auroc": 0.9464,
+ "difference_vs_base_95": [
+ -0.05059999999999998,
+ 0.019804999999999903
+ ],
+ "recall_q95": 0.78,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.78,
+ "false_alarm_deployed": 0.06
+ },
+ "base+cls": {
+ "auroc": 0.9716,
+ "difference_vs_base_95": [
+ -0.005805000000000026,
+ 0.029399999999999985
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "base+coarse": {
+ "auroc": 0.9738,
+ "difference_vs_base_95": [
+ 0.0011999999999999789,
+ 0.027599999999999958
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.08
+ },
+ "base+pos": {
+ "auroc": 0.969,
+ "difference_vs_base_95": [
+ -0.0008000000000000229,
+ 0.019799999999999932
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.12
+ },
+ "full+cls": {
+ "auroc": 0.9798,
+ "difference_vs_base_95": [
+ -0.001805000000000023,
+ 0.04480000000000006
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.1
+ },
+ "full+meanpool": {
+ "auroc": 0.9888,
+ "difference_vs_base_95": [
+ 0.008399999999999963,
+ 0.05359999999999998
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.16
+ },
+ "full+coarse": {
+ "auroc": 0.9826,
+ "difference_vs_base_95": [
+ 0.0043999999999999595,
+ 0.043404999999999964
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.06
+ },
+ "full+pos": {
+ "auroc": 0.9754,
+ "difference_vs_base_95": [
+ 0.0015950000000000467,
+ 0.029805000000000022
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.1
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9838,
+ "difference_vs_base_95": [
+ 0.005599999999999938,
+ 0.04400000000000004
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.06
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9806,
+ "difference_vs_base_95": [
+ -0.0018000000000000238,
+ 0.04679999999999995
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.1
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9818,
+ "difference_vs_base_95": [
+ 0.005994999999999898,
+ 0.039999999999999925
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.06
+ }
+ }
+ },
+ "chewinggum": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9886,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "full": {
+ "auroc": 0.9908,
+ "difference_vs_base_95": [
+ -0.0076050000000000475,
+ 0.01200000000000001
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "fullfg": {
+ "auroc": 0.9892,
+ "difference_vs_base_95": [
+ -0.009204999999999986,
+ 0.010800000000000032
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.02
+ },
+ "pos": {
+ "auroc": 0.9896,
+ "difference_vs_base_95": [
+ -0.009404999999999965,
+ 0.011399999999999966
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ },
+ "cls": {
+ "auroc": 0.9798,
+ "difference_vs_base_95": [
+ -0.023800000000000043,
+ 0.005399999999999963
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.04
+ },
+ "meanpool": {
+ "auroc": 0.9716,
+ "difference_vs_base_95": [
+ -0.03920000000000001,
+ 0.00019999999999997797
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.02
+ },
+ "coarse": {
+ "auroc": 0.9786,
+ "difference_vs_base_95": [
+ -0.02759999999999996,
+ 0.004199999999999984
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.04
+ },
+ "base+cls": {
+ "auroc": 0.9884,
+ "difference_vs_base_95": [
+ -0.006399999999999961,
+ 0.00660500000000002
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.1
+ },
+ "base+coarse": {
+ "auroc": 0.9886,
+ "difference_vs_base_95": [
+ -0.008399999999999963,
+ 0.00800499999999998
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.08
+ },
+ "base+pos": {
+ "auroc": 0.9906,
+ "difference_vs_base_95": [
+ -0.0041999999999999815,
+ 0.009404999999999936
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "full+cls": {
+ "auroc": 0.9896,
+ "difference_vs_base_95": [
+ -0.007800000000000029,
+ 0.010605000000000022
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.08
+ },
+ "full+meanpool": {
+ "auroc": 0.9894,
+ "difference_vs_base_95": [
+ -0.01100500000000001,
+ 0.011799999999999922
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "full+coarse": {
+ "auroc": 0.9882,
+ "difference_vs_base_95": [
+ -0.011800000000000033,
+ 0.010599999999999943
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "full+pos": {
+ "auroc": 0.9904,
+ "difference_vs_base_95": [
+ -0.007600000000000051,
+ 0.011600000000000055
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.08
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9862,
+ "difference_vs_base_95": [
+ -0.015204999999999991,
+ 0.008399999999999963
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9894,
+ "difference_vs_base_95": [
+ -0.009005000000000008,
+ 0.011400000000000077
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.12
+ },
+ "full+coarse+pos": {
+ "auroc": 0.989,
+ "difference_vs_base_95": [
+ -0.01100000000000001,
+ 0.010800000000000032
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ }
+ }
+ },
+ "fryum": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9924,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.02
+ },
+ "full": {
+ "auroc": 0.993,
+ "difference_vs_base_95": [
+ -0.00539999999999996,
+ 0.006399999999999961
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "fullfg": {
+ "auroc": 0.9942,
+ "difference_vs_base_95": [
+ -0.0035999999999999366,
+ 0.008000000000000007
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.0
+ },
+ "pos": {
+ "auroc": 0.9965,
+ "difference_vs_base_95": [
+ -0.0011999999999999789,
+ 0.012202499999999976
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.02
+ },
+ "cls": {
+ "auroc": 0.9162,
+ "difference_vs_base_95": [
+ -0.12139999999999995,
+ -0.03720000000000001
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.69,
+ "false_alarm_deployed": 0.08
+ },
+ "meanpool": {
+ "auroc": 0.9328,
+ "difference_vs_base_95": [
+ -0.10120000000000007,
+ -0.025190000000000056
+ ],
+ "recall_q95": 0.74,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.74,
+ "false_alarm_deployed": 0.08
+ },
+ "coarse": {
+ "auroc": 0.9534,
+ "difference_vs_base_95": [
+ -0.07279999999999998,
+ -0.01100000000000001
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "base+cls": {
+ "auroc": 0.9836,
+ "difference_vs_base_95": [
+ -0.022599999999999953,
+ 0.0010000000000000009
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.02
+ },
+ "base+coarse": {
+ "auroc": 0.9842,
+ "difference_vs_base_95": [
+ -0.02400000000000002,
+ 0.004004999999999976
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.12
+ },
+ "base+pos": {
+ "auroc": 0.9966,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.011199999999999988
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.02
+ },
+ "full+cls": {
+ "auroc": 0.9878,
+ "difference_vs_base_95": [
+ -0.015800000000000036,
+ 0.004204999999999954
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.04
+ },
+ "full+meanpool": {
+ "auroc": 0.99,
+ "difference_vs_base_95": [
+ -0.012204999999999988,
+ 0.005600000000000049
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.06
+ },
+ "full+coarse": {
+ "auroc": 0.9886,
+ "difference_vs_base_95": [
+ -0.01640500000000008,
+ 0.007000000000000006
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.16
+ },
+ "full+pos": {
+ "auroc": 0.9964,
+ "difference_vs_base_95": [
+ -0.0008000000000000229,
+ 0.011399999999999966
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.02
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9842,
+ "difference_vs_base_95": [
+ -0.02400000000000002,
+ 0.00440500000000004
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.12
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9882,
+ "difference_vs_base_95": [
+ -0.017000000000000015,
+ 0.007600000000000051
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.14,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.14
+ },
+ "full+coarse+pos": {
+ "auroc": 0.994,
+ "difference_vs_base_95": [
+ -0.006399999999999961,
+ 0.010605000000000022
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.14,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.14
+ }
+ }
+ },
+ "macaroni1": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.909,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7244
+ },
+ "full": {
+ "auroc": 0.9338,
+ "difference_vs_base_95": [
+ 0.004800000000000024,
+ 0.04530000000000001
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7824
+ },
+ "fullfg": {
+ "auroc": 0.9303,
+ "difference_vs_base_95": [
+ -0.0020000000000000018,
+ 0.044105
+ ],
+ "recall_q95": 0.7,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.774
+ },
+ "pos": {
+ "auroc": 0.91835,
+ "difference_vs_base_95": [
+ -0.012153749999999993,
+ 0.03190250000000002
+ ],
+ "recall_q95": 0.64,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.21,
+ "auroc_hard_type": 0.7358
+ },
+ "cls": {
+ "auroc": 0.7778,
+ "difference_vs_base_95": [
+ -0.20751000000000003,
+ -0.06059250000000003
+ ],
+ "recall_q95": 0.18,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.61,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.7728
+ },
+ "meanpool": {
+ "auroc": 0.7875,
+ "difference_vs_base_95": [
+ -0.18450249999999999,
+ -0.05889499999999998
+ ],
+ "recall_q95": 0.36,
+ "false_alarm_q95": 0.13,
+ "recall_deployed": 0.68,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7188
+ },
+ "coarse": {
+ "auroc": 0.8663,
+ "difference_vs_base_95": [
+ -0.08810499999999996,
+ 0.0033024999999999587
+ ],
+ "recall_q95": 0.7,
+ "false_alarm_q95": 0.13,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.6868
+ },
+ "base+cls": {
+ "auroc": 0.9198,
+ "difference_vs_base_95": [
+ -0.01760749999999995,
+ 0.038999999999999924
+ ],
+ "recall_q95": 0.59,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.23,
+ "auroc_hard_type": 0.7996
+ },
+ "base+coarse": {
+ "auroc": 0.9127,
+ "difference_vs_base_95": [
+ -0.021505000000000073,
+ 0.030100000000000016
+ ],
+ "recall_q95": 0.68,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.29,
+ "auroc_hard_type": 0.7328
+ },
+ "base+pos": {
+ "auroc": 0.9196,
+ "difference_vs_base_95": [
+ -0.0025025000000000546,
+ 0.023002500000000006
+ ],
+ "recall_q95": 0.68,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.734
+ },
+ "full+cls": {
+ "auroc": 0.9364,
+ "difference_vs_base_95": [
+ -0.0009050000000000139,
+ 0.058602499999999974
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.23,
+ "auroc_hard_type": 0.826
+ },
+ "full+meanpool": {
+ "auroc": 0.9233,
+ "difference_vs_base_95": [
+ -0.012407500000000076,
+ 0.04560249999999996
+ ],
+ "recall_q95": 0.74,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.786
+ },
+ "full+coarse": {
+ "auroc": 0.9232,
+ "difference_vs_base_95": [
+ -0.014402499999999967,
+ 0.0413
+ ],
+ "recall_q95": 0.74,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7584
+ },
+ "full+pos": {
+ "auroc": 0.9278,
+ "difference_vs_base_95": [
+ -0.0015050000000000532,
+ 0.04049999999999998
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.21,
+ "auroc_hard_type": 0.7596
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9154,
+ "difference_vs_base_95": [
+ -0.02291000000000003,
+ 0.03810250000000001
+ ],
+ "recall_q95": 0.75,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.29,
+ "auroc_hard_type": 0.7444
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9304,
+ "difference_vs_base_95": [
+ -0.00679999999999992,
+ 0.052202500000000006
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.7992
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9277,
+ "difference_vs_base_95": [
+ -0.004905000000000014,
+ 0.04390249999999993
+ ],
+ "recall_q95": 0.74,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7572
+ }
+ }
+ },
+ "macaroni2": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.845,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.48,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7083333333333334
+ },
+ "full": {
+ "auroc": 0.8852,
+ "difference_vs_base_95": [
+ 0.011494999999999955,
+ 0.06910249999999993
+ ],
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.33,
+ "auroc_hard_type": 0.7706666666666667
+ },
+ "fullfg": {
+ "auroc": 0.879,
+ "difference_vs_base_95": [
+ 0.0048975000000000156,
+ 0.06450749999999995
+ ],
+ "recall_q95": 0.58,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.34,
+ "auroc_hard_type": 0.7603333333333333
+ },
+ "pos": {
+ "auroc": 0.86105,
+ "difference_vs_base_95": [
+ -0.016402499999999973,
+ 0.04870250000000006
+ ],
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.7453333333333333
+ },
+ "cls": {
+ "auroc": 0.593,
+ "difference_vs_base_95": [
+ -0.34001,
+ -0.16489250000000008
+ ],
+ "recall_q95": 0.11,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.41,
+ "false_alarm_deployed": 0.32,
+ "auroc_hard_type": 0.6723333333333333
+ },
+ "meanpool": {
+ "auroc": 0.5687,
+ "difference_vs_base_95": [
+ -0.36151000000000005,
+ -0.19349250000000004
+ ],
+ "recall_q95": 0.08,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.33,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.5506666666666666
+ },
+ "coarse": {
+ "auroc": 0.7779,
+ "difference_vs_base_95": [
+ -0.13260000000000005,
+ -0.006960000000000226
+ ],
+ "recall_q95": 0.4,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.52,
+ "false_alarm_deployed": 0.16,
+ "auroc_hard_type": 0.6126666666666667
+ },
+ "base+cls": {
+ "auroc": 0.8206,
+ "difference_vs_base_95": [
+ -0.060002499999999945,
+ 0.010599999999999946
+ ],
+ "recall_q95": 0.47,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.73,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.7613333333333333
+ },
+ "base+coarse": {
+ "auroc": 0.8542,
+ "difference_vs_base_95": [
+ -0.017905000000000025,
+ 0.03640249999999998
+ ],
+ "recall_q95": 0.61,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.79,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.6893333333333334
+ },
+ "base+pos": {
+ "auroc": 0.8622,
+ "difference_vs_base_95": [
+ 0.001400000000000065,
+ 0.03360249999999995
+ ],
+ "recall_q95": 0.61,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.737
+ },
+ "full+cls": {
+ "auroc": 0.8498,
+ "difference_vs_base_95": [
+ -0.03359999999999996,
+ 0.04480250000000005
+ ],
+ "recall_q95": 0.5,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7896666666666666
+ },
+ "full+meanpool": {
+ "auroc": 0.8321,
+ "difference_vs_base_95": [
+ -0.04990250000000006,
+ 0.025902500000000016
+ ],
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.13,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.29,
+ "auroc_hard_type": 0.7256666666666667
+ },
+ "full+coarse": {
+ "auroc": 0.8799,
+ "difference_vs_base_95": [
+ 0.0027949999999999173,
+ 0.06900250000000005
+ ],
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.26,
+ "auroc_hard_type": 0.736
+ },
+ "full+pos": {
+ "auroc": 0.8831,
+ "difference_vs_base_95": [
+ 0.010200000000000094,
+ 0.0683024999999999
+ ],
+ "recall_q95": 0.6,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.26,
+ "auroc_hard_type": 0.7716666666666666
+ },
+ "fullfg+coarse": {
+ "auroc": 0.8771,
+ "difference_vs_base_95": [
+ -0.002902500000000013,
+ 0.06770749999999993
+ ],
+ "recall_q95": 0.54,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.736
+ },
+ "full+coarse+cls": {
+ "auroc": 0.8623,
+ "difference_vs_base_95": [
+ -0.02150499999999996,
+ 0.05790499999999993
+ ],
+ "recall_q95": 0.5,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.7656666666666667
+ },
+ "full+coarse+pos": {
+ "auroc": 0.8834,
+ "difference_vs_base_95": [
+ 0.010300000000000083,
+ 0.06830250000000002
+ ],
+ "recall_q95": 0.63,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.83,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7463333333333333
+ }
+ }
+ },
+ "pcb1": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9597,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.08
+ },
+ "full": {
+ "auroc": 0.9735,
+ "difference_vs_base_95": [
+ 0.0030999999999999917,
+ 0.026299999999999994
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "fullfg": {
+ "auroc": 0.9685,
+ "difference_vs_base_95": [
+ -0.0012999999999999707,
+ 0.020499999999999963
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.11
+ },
+ "pos": {
+ "auroc": 0.9621,
+ "difference_vs_base_95": [
+ -0.010407499999999964,
+ 0.016100000000000003
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.12
+ },
+ "cls": {
+ "auroc": 0.9482,
+ "difference_vs_base_95": [
+ -0.045499999999999985,
+ 0.020299999999999985
+ ],
+ "recall_q95": 0.75,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.75,
+ "false_alarm_deployed": 0.03
+ },
+ "meanpool": {
+ "auroc": 0.8871,
+ "difference_vs_base_95": [
+ -0.11770999999999991,
+ -0.027700000000000058
+ ],
+ "recall_q95": 0.67,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.67,
+ "false_alarm_deployed": 0.08
+ },
+ "coarse": {
+ "auroc": 0.924,
+ "difference_vs_base_95": [
+ -0.07120250000000004,
+ -0.006097500000000008
+ ],
+ "recall_q95": 0.79,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.79,
+ "false_alarm_deployed": 0.12
+ },
+ "base+cls": {
+ "auroc": 0.98,
+ "difference_vs_base_95": [
+ 0.008399999999999963,
+ 0.03580249999999993
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.09
+ },
+ "base+coarse": {
+ "auroc": 0.9684,
+ "difference_vs_base_95": [
+ -0.0015999999999999376,
+ 0.020102499999999992
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.11
+ },
+ "base+pos": {
+ "auroc": 0.9643,
+ "difference_vs_base_95": [
+ -0.0044999999999999485,
+ 0.013502500000000051
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.1
+ },
+ "full+cls": {
+ "auroc": 0.9835,
+ "difference_vs_base_95": [
+ 0.01099750000000001,
+ 0.03979999999999995
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.11
+ },
+ "full+meanpool": {
+ "auroc": 0.9782,
+ "difference_vs_base_95": [
+ 0.005397499999999964,
+ 0.0329075
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.16
+ },
+ "full+coarse": {
+ "auroc": 0.9741,
+ "difference_vs_base_95": [
+ 0.0019000000000000128,
+ 0.028000000000000025
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.17,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.17
+ },
+ "full+pos": {
+ "auroc": 0.9689,
+ "difference_vs_base_95": [
+ -0.0010999999999999899,
+ 0.02180000000000004
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.12
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9704,
+ "difference_vs_base_95": [
+ -0.0007024999999999253,
+ 0.024002500000000006
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.17,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.17
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9829,
+ "difference_vs_base_95": [
+ 0.010097499999999999,
+ 0.03970500000000004
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.14,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.14
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9719,
+ "difference_vs_base_95": [
+ 0.00139749999999996,
+ 0.02590250000000002
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.14,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.14
+ }
+ }
+ },
+ "pcb2": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9062,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.7805263157894737
+ },
+ "full": {
+ "auroc": 0.9577,
+ "difference_vs_base_95": [
+ 0.027597499999999962,
+ 0.07790249999999996
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8663157894736843
+ },
+ "fullfg": {
+ "auroc": 0.9503,
+ "difference_vs_base_95": [
+ 0.02279999999999993,
+ 0.06790249999999995
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8542105263157894
+ },
+ "pos": {
+ "auroc": 0.9471,
+ "difference_vs_base_95": [
+ 0.01989499999999992,
+ 0.06620500000000001
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8331578947368421
+ },
+ "cls": {
+ "auroc": 0.84065,
+ "difference_vs_base_95": [
+ -0.1281,
+ -0.0025974999999999523
+ ],
+ "recall_q95": 0.59,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.59,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.8552631578947368
+ },
+ "meanpool": {
+ "auroc": 0.8108,
+ "difference_vs_base_95": [
+ -0.16150249999999997,
+ -0.026899999999999924
+ ],
+ "recall_q95": 0.47,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.47,
+ "false_alarm_deployed": 0.04,
+ "auroc_hard_type": 0.8742105263157894
+ },
+ "coarse": {
+ "auroc": 0.8829,
+ "difference_vs_base_95": [
+ -0.06540250000000002,
+ 0.01899999999999991
+ ],
+ "recall_q95": 0.67,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.67,
+ "false_alarm_deployed": 0.08,
+ "auroc_hard_type": 0.8521052631578947
+ },
+ "base+cls": {
+ "auroc": 0.9239,
+ "difference_vs_base_95": [
+ -0.015499999999999962,
+ 0.04880499999999993
+ ],
+ "recall_q95": 0.78,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.78,
+ "false_alarm_deployed": 0.06,
+ "auroc_hard_type": 0.8473684210526315
+ },
+ "base+coarse": {
+ "auroc": 0.9146,
+ "difference_vs_base_95": [
+ -0.017302499999999985,
+ 0.033302499999999985
+ ],
+ "recall_q95": 0.79,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.79,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.85
+ },
+ "base+pos": {
+ "auroc": 0.9331,
+ "difference_vs_base_95": [
+ 0.01349749999999996,
+ 0.042107499999999985
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8105263157894737
+ },
+ "full+cls": {
+ "auroc": 0.9573,
+ "difference_vs_base_95": [
+ 0.02090000000000003,
+ 0.0876025
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8636842105263158
+ },
+ "full+meanpool": {
+ "auroc": 0.961,
+ "difference_vs_base_95": [
+ 0.027597499999999962,
+ 0.08780250000000009
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.08,
+ "auroc_hard_type": 0.878421052631579
+ },
+ "full+coarse": {
+ "auroc": 0.9461,
+ "difference_vs_base_95": [
+ 0.016199999999999992,
+ 0.06620000000000004
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8694736842105263
+ },
+ "full+pos": {
+ "auroc": 0.9542,
+ "difference_vs_base_95": [
+ 0.02559249999999996,
+ 0.07260249999999999
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8557894736842105
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9421,
+ "difference_vs_base_95": [
+ 0.01180000000000003,
+ 0.06500000000000006
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8652631578947368
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9535,
+ "difference_vs_base_95": [
+ 0.017297500000000094,
+ 0.07970749999999995
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.07,
+ "auroc_hard_type": 0.8831578947368421
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9486,
+ "difference_vs_base_95": [
+ 0.018299999999999983,
+ 0.06700750000000001
+ ],
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.06,
+ "auroc_hard_type": 0.8668421052631579
+ }
+ }
+ },
+ "pcb3": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9547524752475247,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.8900990099009901
+ },
+ "full": {
+ "auroc": 0.9800990099009901,
+ "difference_vs_base_95": [
+ 0.011584158415841594,
+ 0.04188366336633666
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9346534653465347
+ },
+ "fullfg": {
+ "auroc": 0.9782178217821782,
+ "difference_vs_base_95": [
+ 0.009997524752475256,
+ 0.04039603960396032
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.09900990099009901,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.09900990099009901,
+ "auroc_hard_type": 0.9287128712871288
+ },
+ "pos": {
+ "auroc": 0.9849504950495049,
+ "difference_vs_base_95": [
+ 0.01187871287128714,
+ 0.052972772277227645
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.039603960396039604,
+ "auroc_hard_type": 0.9514851485148514
+ },
+ "cls": {
+ "auroc": 0.7913861386138614,
+ "difference_vs_base_95": [
+ -0.22774009900990097,
+ -0.10187871287128723
+ ],
+ "recall_q95": 0.43,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.43,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.8207920792079207
+ },
+ "meanpool": {
+ "auroc": 0.8048514851485149,
+ "difference_vs_base_95": [
+ -0.21317821782178215,
+ -0.09106435643564367
+ ],
+ "recall_q95": 0.42,
+ "false_alarm_q95": 0.06930693069306931,
+ "recall_deployed": 0.42,
+ "false_alarm_deployed": 0.06930693069306931,
+ "auroc_hard_type": 0.7960396039603961
+ },
+ "coarse": {
+ "auroc": 0.9267326732673268,
+ "difference_vs_base_95": [
+ -0.06693069306930688,
+ 0.009710396039603929
+ ],
+ "recall_q95": 0.72,
+ "false_alarm_q95": 0.04950495049504951,
+ "recall_deployed": 0.72,
+ "false_alarm_deployed": 0.04950495049504951,
+ "auroc_hard_type": 0.8574257425742574
+ },
+ "base+cls": {
+ "auroc": 0.9634653465346534,
+ "difference_vs_base_95": [
+ -0.006636138613861392,
+ 0.02703217821782179
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.902970297029703
+ },
+ "base+coarse": {
+ "auroc": 0.9669306930693069,
+ "difference_vs_base_95": [
+ -0.0055495049504950544,
+ 0.03406188118811883
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.06930693069306931,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.06930693069306931,
+ "auroc_hard_type": 0.904950495049505
+ },
+ "base+pos": {
+ "auroc": 0.9775247524752475,
+ "difference_vs_base_95": [
+ 0.009700495049504959,
+ 0.03891584158415842
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.04950495049504951,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.04950495049504951,
+ "auroc_hard_type": 0.9316831683168317
+ },
+ "full+cls": {
+ "auroc": 0.9835643564356435,
+ "difference_vs_base_95": [
+ 0.011683168316831694,
+ 0.05168316831683162
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.10891089108910891,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.10891089108910891,
+ "auroc_hard_type": 0.9396039603960396
+ },
+ "full+meanpool": {
+ "auroc": 0.9771287128712871,
+ "difference_vs_base_95": [
+ 0.005146039603960401,
+ 0.0428712871287128
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.10891089108910891,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.10891089108910891,
+ "auroc_hard_type": 0.9148514851485149
+ },
+ "full+coarse": {
+ "auroc": 0.9833663366336634,
+ "difference_vs_base_95": [
+ 0.008910891089108919,
+ 0.05119059405940597
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.07920792079207921,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.07920792079207921,
+ "auroc_hard_type": 0.9386138613861386
+ },
+ "full+pos": {
+ "auroc": 0.9834653465346535,
+ "difference_vs_base_95": [
+ 0.012074257425742585,
+ 0.048712871287128645
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.07920792079207921,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.07920792079207921,
+ "auroc_hard_type": 0.9465346534653465
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9810891089108911,
+ "difference_vs_base_95": [
+ 0.005839108910891094,
+ 0.05039603960396033
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.09900990099009901,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.09900990099009901,
+ "auroc_hard_type": 0.9311881188118812
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9841584158415841,
+ "difference_vs_base_95": [
+ 0.009405940594059414,
+ 0.05287871287128702
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.07920792079207921,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.07920792079207921,
+ "auroc_hard_type": 0.9415841584158415
+ },
+ "full+coarse+pos": {
+ "auroc": 0.987029702970297,
+ "difference_vs_base_95": [
+ 0.012272277227722783,
+ 0.05475247524752469
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.0594059405940594,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.0594059405940594,
+ "auroc_hard_type": 0.949009900990099
+ }
+ }
+ },
+ "pcb4": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9865346534653465,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "full": {
+ "auroc": 0.9956435643564356,
+ "difference_vs_base_95": [
+ -0.0019826732673267344,
+ 0.02495297029702971
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "fullfg": {
+ "auroc": 0.9953465346534653,
+ "difference_vs_base_95": [
+ -0.0027772277227722793,
+ 0.025349009900990108
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "pos": {
+ "auroc": 0.9985148514851485,
+ "difference_vs_base_95": [
+ 0.00108910891089109,
+ 0.029108910891089135
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.0297029702970297
+ },
+ "cls": {
+ "auroc": 0.9683168316831683,
+ "difference_vs_base_95": [
+ -0.045643564356435684,
+ 0.008913366336633657
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.07920792079207921,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.07920792079207921
+ },
+ "meanpool": {
+ "auroc": 0.9769306930693069,
+ "difference_vs_base_95": [
+ -0.031985148514851514,
+ 0.01307178217821782
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.07920792079207921,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.07920792079207921
+ },
+ "coarse": {
+ "auroc": 0.9472277227722772,
+ "difference_vs_base_95": [
+ -0.06970297029702965,
+ -0.01019306930693073
+ ],
+ "recall_q95": 0.79,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.79,
+ "false_alarm_deployed": 0.0891089108910891
+ },
+ "base+cls": {
+ "auroc": 0.9961386138613861,
+ "difference_vs_base_95": [
+ -0.0007920792079207928,
+ 0.024259900990099018
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.0594059405940594,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.0594059405940594
+ },
+ "base+coarse": {
+ "auroc": 0.9924752475247525,
+ "difference_vs_base_95": [
+ -0.0025742574257425765,
+ 0.016542079207920765
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "base+pos": {
+ "auroc": 0.9973267326732673,
+ "difference_vs_base_95": [
+ 0.0014826732673267342,
+ 0.024655940594059414
+ ],
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 1.0,
+ "false_alarm_deployed": 0.0297029702970297
+ },
+ "full+cls": {
+ "auroc": 0.9975247524752475,
+ "difference_vs_base_95": [
+ -0.0007945544554455452,
+ 0.028024752475247522
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04950495049504951,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04950495049504951
+ },
+ "full+meanpool": {
+ "auroc": 0.998019801980198,
+ "difference_vs_base_95": [
+ 0.0002970297029702973,
+ 0.02713613861386137
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04950495049504951,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04950495049504951
+ },
+ "full+coarse": {
+ "auroc": 0.9972277227722772,
+ "difference_vs_base_95": [
+ -0.000990099009900991,
+ 0.02713118811881189
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.0297029702970297
+ },
+ "full+pos": {
+ "auroc": 0.9983168316831683,
+ "difference_vs_base_95": [
+ 0.0008886138613861395,
+ 0.027722772277227747
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "fullfg+coarse": {
+ "auroc": 0.997029702970297,
+ "difference_vs_base_95": [
+ -0.0010915841584158423,
+ 0.027920792079207946
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.0297029702970297
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9985148514851485,
+ "difference_vs_base_95": [
+ 0.000294554455445545,
+ 0.03079207920792082
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9991089108910891,
+ "difference_vs_base_95": [
+ 0.0015841584158415856,
+ 0.029009900990099036
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.009900990099009901,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.009900990099009901
+ }
+ }
+ },
+ "pipe_fryum": {
+ "reproduction_max_abs_difference": 0.0,
+ "methods": {
+ "base": {
+ "auroc": 0.9892,
+ "difference_vs_base_95": null,
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "full": {
+ "auroc": 0.9918,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.007599999999999943
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "fullfg": {
+ "auroc": 0.9918,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.007399999999999965
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "pos": {
+ "auroc": 0.9962,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.01979999999999993
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ },
+ "cls": {
+ "auroc": 0.8902,
+ "difference_vs_base_95": [
+ -0.15459999999999996,
+ -0.05219499999999994
+ ],
+ "recall_q95": 0.68,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.68,
+ "false_alarm_deployed": 0.08
+ },
+ "meanpool": {
+ "auroc": 0.6776,
+ "difference_vs_base_95": [
+ -0.40081500000000003,
+ -0.23019
+ ],
+ "recall_q95": 0.25,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.25,
+ "false_alarm_deployed": 0.02
+ },
+ "coarse": {
+ "auroc": 0.994,
+ "difference_vs_base_95": [
+ -0.00040000000000006697,
+ 0.015209999999999935
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "base+cls": {
+ "auroc": 0.9886,
+ "difference_vs_base_95": [
+ -0.008599999999999944,
+ 0.00660500000000002
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.08
+ },
+ "base+coarse": {
+ "auroc": 0.9932,
+ "difference_vs_base_95": [
+ -0.0006000000000000449,
+ 0.012800000000000034
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "base+pos": {
+ "auroc": 0.9942,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.014004999999999984
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "full+cls": {
+ "auroc": 0.9902,
+ "difference_vs_base_95": [
+ -0.006999999999999898,
+ 0.010000000000000009
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.08
+ },
+ "full+meanpool": {
+ "auroc": 0.9868,
+ "difference_vs_base_95": [
+ -0.007800000000000029,
+ 0.0008000000000000229
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "full+coarse": {
+ "auroc": 0.9942,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.014399999999999968
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "full+pos": {
+ "auroc": 0.9948,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.016399999999999974
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ },
+ "fullfg+coarse": {
+ "auroc": 0.9944,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.015199999999999991
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "full+coarse+cls": {
+ "auroc": 0.9946,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.015199999999999991
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "full+coarse+pos": {
+ "auroc": 0.9958,
+ "difference_vs_base_95": [
+ 0.0,
+ 0.017405000000000052
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/encoder_diagnostic.json b/results/encoder_diagnostic.json
new file mode 100644
index 0000000000000000000000000000000000000000..d2d3dd15b5585e0ad42e1c242e008ac7e59ff5e2
--- /dev/null
+++ b/results/encoder_diagnostic.json
@@ -0,0 +1,888 @@
+{
+ "candle": {
+ "deployed_policy": "q95",
+ "threshold": 0.15027016177773475,
+ "threshold_q95": 0.15027016177773475,
+ "recall_at_q95": 0.87,
+ "normal_false_alarm_rate_at_q95": 0.12,
+ "n_normal": 100,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.941,
+ "auroc_all_banks": [
+ 0.9558,
+ 0.9536,
+ 0.9443,
+ 0.941
+ ],
+ "recall_at_threshold": 0.87,
+ "normal_false_alarm_rate": 0.12,
+ "normal_score_median": 0.1176736019551754,
+ "normal_score_p95": 0.169543657451868,
+ "anomaly_score_median": 0.2126290127635002,
+ "by_defect_type": {
+ "chunk of wax missing": {
+ "n": 15,
+ "detected_at_threshold": 0.9333333333333333,
+ "auroc_vs_normals": 0.954
+ },
+ "damaged corner of packaging": {
+ "n": 25,
+ "detected_at_threshold": 0.88,
+ "auroc_vs_normals": 0.9452
+ },
+ "different colour spot": {
+ "n": 22,
+ "detected_at_threshold": 0.7727272727272727,
+ "auroc_vs_normals": 0.8936363636363637
+ },
+ "extra wax in candle": {
+ "n": 10,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.992
+ },
+ "foreign particals on candle": {
+ "n": 17,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9970588235294118
+ },
+ "other": {
+ "n": 1,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.95
+ },
+ "wax melded out of the candle": {
+ "n": 14,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9942857142857143
+ },
+ "weird candle wick": {
+ "n": 11,
+ "detected_at_threshold": 0.45454545454545453,
+ "auroc_vs_normals": 0.8036363636363636
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.02,
+ "detected_at_threshold": 0.8823529411764706,
+ "auroc_vs_normals": 0.941764705882353
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.158,
+ "detected_at_threshold": 0.7575757575757576,
+ "auroc_vs_normals": 0.899090909090909
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.45,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.9821212121212122
+ }
+ }
+ },
+ "capsules": {
+ "deployed_policy": "q95",
+ "threshold": 0.1439922600984573,
+ "threshold_q95": 0.1439922600984573,
+ "recall_at_q95": 0.82,
+ "normal_false_alarm_rate_at_q95": 0.08333333333333333,
+ "n_normal": 60,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9683333333333334,
+ "auroc_all_banks": [
+ 0.968,
+ 0.9687,
+ 0.9713,
+ 0.9683
+ ],
+ "recall_at_threshold": 0.82,
+ "normal_false_alarm_rate": 0.08333333333333333,
+ "normal_score_median": 0.11277124285697937,
+ "normal_score_p95": 0.15005910843610762,
+ "anomaly_score_median": 0.19388512521982193,
+ "by_defect_type": {
+ "bubble": {
+ "n": 100,
+ "detected_at_threshold": 0.82,
+ "auroc_vs_normals": 0.9683333333333334
+ },
+ "discolor": {
+ "n": 70,
+ "detected_at_threshold": 0.7714285714285715,
+ "auroc_vs_normals": 0.9621428571428572
+ },
+ "leak": {
+ "n": 40,
+ "detected_at_threshold": 0.95,
+ "auroc_vs_normals": 0.9954166666666666
+ },
+ "misshape": {
+ "n": 28,
+ "detected_at_threshold": 0.9285714285714286,
+ "auroc_vs_normals": 0.993452380952381
+ },
+ "scratch": {
+ "n": 55,
+ "detected_at_threshold": 0.8909090909090909,
+ "auroc_vs_normals": 0.9848484848484849
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.032,
+ "detected_at_threshold": 0.5588235294117647,
+ "auroc_vs_normals": 0.921078431372549
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.149,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.990909090909091
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 1.586,
+ "detected_at_threshold": 0.9393939393939394,
+ "auroc_vs_normals": 0.9944444444444445
+ }
+ }
+ },
+ "cashew": {
+ "deployed_policy": "q95",
+ "threshold": 0.1289861112833023,
+ "threshold_q95": 0.1289861112833023,
+ "recall_at_q95": 0.9,
+ "normal_false_alarm_rate_at_q95": 0.18,
+ "n_normal": 50,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9608,
+ "auroc_all_banks": [
+ 0.9556,
+ 0.9578,
+ 0.9688,
+ 0.9608
+ ],
+ "recall_at_threshold": 0.9,
+ "normal_false_alarm_rate": 0.18,
+ "normal_score_median": 0.10242883116006851,
+ "normal_score_p95": 0.1403797425329685,
+ "anomaly_score_median": 0.2092498540878296,
+ "by_defect_type": {
+ "burnt": {
+ "n": 14,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9857142857142858
+ },
+ "corner or edge breakage": {
+ "n": 17,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9976470588235294
+ },
+ "different colour spot": {
+ "n": 13,
+ "detected_at_threshold": 0.9230769230769231,
+ "auroc_vs_normals": 0.9661538461538461
+ },
+ "middle breakage": {
+ "n": 8,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "same colour spot": {
+ "n": 14,
+ "detected_at_threshold": 0.8571428571428571,
+ "auroc_vs_normals": 0.96
+ },
+ "small holes": {
+ "n": 22,
+ "detected_at_threshold": 0.6363636363636364,
+ "auroc_vs_normals": 0.8709090909090909
+ },
+ "small scratches": {
+ "n": 16,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.99375
+ },
+ "stuck together": {
+ "n": 6,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.03,
+ "detected_at_threshold": 0.7352941176470589,
+ "auroc_vs_normals": 0.8994117647058824
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.148,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.9854545454545455
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.403,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9993939393939394
+ }
+ }
+ },
+ "chewinggum": {
+ "deployed_policy": "q95",
+ "threshold": 0.15658171474933624,
+ "threshold_q95": 0.15658171474933624,
+ "recall_at_q95": 0.96,
+ "normal_false_alarm_rate_at_q95": 0.04,
+ "n_normal": 50,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9886,
+ "auroc_all_banks": [
+ 0.9932,
+ 0.9892,
+ 0.9916,
+ 0.9886
+ ],
+ "recall_at_threshold": 0.96,
+ "normal_false_alarm_rate": 0.04,
+ "normal_score_median": 0.10335936769843102,
+ "normal_score_p95": 0.1388110876083374,
+ "anomaly_score_median": 0.38872937858104706,
+ "by_defect_type": {
+ "chunk of gum missing": {
+ "n": 47,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "corner missing": {
+ "n": 36,
+ "detected_at_threshold": 0.8888888888888888,
+ "auroc_vs_normals": 0.9738888888888889
+ },
+ "scratches": {
+ "n": 16,
+ "detected_at_threshold": 0.9375,
+ "auroc_vs_normals": 0.985
+ },
+ "similar colour spot": {
+ "n": 25,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9968
+ },
+ "small cracks": {
+ "n": 29,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.191,
+ "detected_at_threshold": 0.9117647058823529,
+ "auroc_vs_normals": 0.9705882352941176
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.551,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.9957575757575757
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 1.55,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ }
+ }
+ },
+ "fryum": {
+ "deployed_policy": "q95",
+ "threshold": 0.13227128088474271,
+ "threshold_q95": 0.13227128088474271,
+ "recall_at_q95": 0.94,
+ "normal_false_alarm_rate_at_q95": 0.02,
+ "n_normal": 50,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9924,
+ "auroc_all_banks": [
+ 0.9892,
+ 0.9958,
+ 0.9892,
+ 0.9924
+ ],
+ "recall_at_threshold": 0.94,
+ "normal_false_alarm_rate": 0.02,
+ "normal_score_median": 0.10169889032840729,
+ "normal_score_p95": 0.1213790975511074,
+ "anomaly_score_median": 0.26332615315914154,
+ "by_defect_type": {
+ "burnt": {
+ "n": 9,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "corner or edge breakage": {
+ "n": 9,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "different colour spot": {
+ "n": 18,
+ "detected_at_threshold": 0.9444444444444444,
+ "auroc_vs_normals": 0.9844444444444445
+ },
+ "fryum stuck together": {
+ "n": 20,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "middle breakage": {
+ "n": 21,
+ "detected_at_threshold": 0.9523809523809523,
+ "auroc_vs_normals": 0.9914285714285714
+ },
+ "other": {
+ "n": 1,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "similar colour spot": {
+ "n": 22,
+ "detected_at_threshold": 0.9090909090909091,
+ "auroc_vs_normals": 0.9918181818181818
+ },
+ "small scratches": {
+ "n": 13,
+ "detected_at_threshold": 0.7692307692307693,
+ "auroc_vs_normals": 0.98
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.024,
+ "detected_at_threshold": 0.8529411764705882,
+ "auroc_vs_normals": 0.9841176470588235
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.217,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.9933333333333333
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 13.889,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ }
+ }
+ },
+ "macaroni1": {
+ "deployed_policy": "q80",
+ "threshold": 0.11047504395246506,
+ "threshold_q95": 0.14440965577960013,
+ "recall_at_q95": 0.57,
+ "normal_false_alarm_rate_at_q95": 0.01,
+ "n_normal": 100,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.909,
+ "auroc_all_banks": [
+ 0.918,
+ 0.9107,
+ 0.907,
+ 0.909
+ ],
+ "recall_at_threshold": 0.85,
+ "normal_false_alarm_rate": 0.24,
+ "normal_score_median": 0.09861122071743011,
+ "normal_score_p95": 0.13050181567668914,
+ "anomaly_score_median": 0.14945026487112045,
+ "by_defect_type": {
+ "chip around edge and corner": {
+ "n": 25,
+ "detected_at_threshold": 0.44,
+ "auroc_vs_normals": 0.7244
+ },
+ "different colour spot": {
+ "n": 16,
+ "detected_at_threshold": 0.9375,
+ "auroc_vs_normals": 0.9475
+ },
+ "middle breakage": {
+ "n": 10,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "similar colour spot": {
+ "n": 22,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9840909090909091
+ },
+ "small cracks": {
+ "n": 14,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9985714285714286
+ },
+ "small scratches": {
+ "n": 33,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.936969696969697
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.026,
+ "detected_at_threshold": 0.9411764705882353,
+ "auroc_vs_normals": 0.9511764705882353
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.053,
+ "detected_at_threshold": 0.8484848484848485,
+ "auroc_vs_normals": 0.8884848484848484
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.114,
+ "detected_at_threshold": 0.7575757575757576,
+ "auroc_vs_normals": 0.8860606060606061
+ }
+ }
+ },
+ "macaroni2": {
+ "deployed_policy": "q80",
+ "threshold": 0.12732562720775603,
+ "threshold_q95": 0.144144269824028,
+ "recall_at_q95": 0.48,
+ "normal_false_alarm_rate_at_q95": 0.07,
+ "n_normal": 100,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.845,
+ "auroc_all_banks": [
+ 0.8447,
+ 0.8244,
+ 0.8268,
+ 0.845
+ ],
+ "recall_at_threshold": 0.8,
+ "normal_false_alarm_rate": 0.28,
+ "normal_score_median": 0.11859115958213806,
+ "normal_score_p95": 0.14696984514594078,
+ "anomaly_score_median": 0.14316167682409286,
+ "by_defect_type": {
+ "breakage down the middle": {
+ "n": 15,
+ "detected_at_threshold": 0.9333333333333333,
+ "auroc_vs_normals": 0.9633333333333334
+ },
+ "color spot similar to the object": {
+ "n": 28,
+ "detected_at_threshold": 0.8571428571428571,
+ "auroc_vs_normals": 0.8942857142857142
+ },
+ "different color spot": {
+ "n": 17,
+ "detected_at_threshold": 0.9411764705882353,
+ "auroc_vs_normals": 0.8729411764705882
+ },
+ "other": {
+ "n": 1,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "small chip around edge": {
+ "n": 30,
+ "detected_at_threshold": 0.5666666666666667,
+ "auroc_vs_normals": 0.7083333333333334
+ },
+ "small cracks": {
+ "n": 13,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9661538461538461
+ },
+ "small scratches": {
+ "n": 36,
+ "detected_at_threshold": 0.8888888888888888,
+ "auroc_vs_normals": 0.9097222222222222
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.022,
+ "detected_at_threshold": 0.8235294117647058,
+ "auroc_vs_normals": 0.8355882352941176
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.047,
+ "detected_at_threshold": 0.8787878787878788,
+ "auroc_vs_normals": 0.8966666666666666
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.099,
+ "detected_at_threshold": 0.696969696969697,
+ "auroc_vs_normals": 0.803030303030303
+ }
+ }
+ },
+ "pcb1": {
+ "deployed_policy": "q95",
+ "threshold": 0.1414354294538498,
+ "threshold_q95": 0.1414354294538498,
+ "recall_at_q95": 0.86,
+ "normal_false_alarm_rate_at_q95": 0.08,
+ "n_normal": 100,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9597,
+ "auroc_all_banks": [
+ 0.9525,
+ 0.9479,
+ 0.9503,
+ 0.9597
+ ],
+ "recall_at_threshold": 0.86,
+ "normal_false_alarm_rate": 0.08,
+ "normal_score_median": 0.10396964475512505,
+ "normal_score_p95": 0.1497390143573284,
+ "anomaly_score_median": 0.2245054543018341,
+ "by_defect_type": {
+ "bent": {
+ "n": 15,
+ "detected_at_threshold": 0.6666666666666666,
+ "auroc_vs_normals": 0.932
+ },
+ "melt": {
+ "n": 54,
+ "detected_at_threshold": 0.8888888888888888,
+ "auroc_vs_normals": 0.9598148148148148
+ },
+ "missing": {
+ "n": 20,
+ "detected_at_threshold": 0.85,
+ "auroc_vs_normals": 0.958
+ },
+ "scratch": {
+ "n": 21,
+ "detected_at_threshold": 0.9523809523809523,
+ "auroc_vs_normals": 0.9871428571428571
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.127,
+ "detected_at_threshold": 0.8235294117647058,
+ "auroc_vs_normals": 0.9414705882352942
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.198,
+ "detected_at_threshold": 0.8787878787878788,
+ "auroc_vs_normals": 0.9633333333333334
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.469,
+ "detected_at_threshold": 0.8787878787878788,
+ "auroc_vs_normals": 0.9748484848484849
+ }
+ }
+ },
+ "pcb2": {
+ "deployed_policy": "q95",
+ "threshold": 0.1252228133380413,
+ "threshold_q95": 0.1252228133380413,
+ "recall_at_q95": 0.84,
+ "normal_false_alarm_rate_at_q95": 0.12,
+ "n_normal": 100,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9062,
+ "auroc_all_banks": [
+ 0.9202,
+ 0.9289,
+ 0.9283,
+ 0.9062
+ ],
+ "recall_at_threshold": 0.84,
+ "normal_false_alarm_rate": 0.12,
+ "normal_score_median": 0.09869059920310974,
+ "normal_score_p95": 0.14521096423268318,
+ "anomaly_score_median": 0.1799488514661789,
+ "by_defect_type": {
+ "bent": {
+ "n": 15,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9653333333333334
+ },
+ "melt": {
+ "n": 55,
+ "detected_at_threshold": 0.8727272727272727,
+ "auroc_vs_normals": 0.9134545454545454
+ },
+ "missing": {
+ "n": 19,
+ "detected_at_threshold": 0.5263157894736842,
+ "auroc_vs_normals": 0.7805263157894737
+ },
+ "scratch": {
+ "n": 20,
+ "detected_at_threshold": 0.95,
+ "auroc_vs_normals": 0.9545
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.159,
+ "detected_at_threshold": 0.6470588235294118,
+ "auroc_vs_normals": 0.8002941176470588
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.266,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.9557575757575758
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.446,
+ "detected_at_threshold": 0.9090909090909091,
+ "auroc_vs_normals": 0.9657575757575757
+ }
+ }
+ },
+ "pcb3": {
+ "deployed_policy": "q95",
+ "threshold": 0.1346755474805832,
+ "threshold_q95": 0.1346755474805832,
+ "recall_at_q95": 0.87,
+ "normal_false_alarm_rate_at_q95": 0.0891089108910891,
+ "n_normal": 101,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9547524752475247,
+ "auroc_all_banks": [
+ 0.9434,
+ 0.9477,
+ 0.9466,
+ 0.9548
+ ],
+ "recall_at_threshold": 0.87,
+ "normal_false_alarm_rate": 0.0891089108910891,
+ "normal_score_median": 0.10837243497371674,
+ "normal_score_p95": 0.1407194584608078,
+ "anomaly_score_median": 0.18746265023946762,
+ "by_defect_type": {
+ "bent": {
+ "n": 20,
+ "detected_at_threshold": 0.85,
+ "auroc_vs_normals": 0.9168316831683169
+ },
+ "melt": {
+ "n": 43,
+ "detected_at_threshold": 0.9069767441860465,
+ "auroc_vs_normals": 0.9822703200552614
+ },
+ "missing": {
+ "n": 20,
+ "detected_at_threshold": 0.65,
+ "auroc_vs_normals": 0.8900990099009901
+ },
+ "scratch": {
+ "n": 25,
+ "detected_at_threshold": 0.92,
+ "auroc_vs_normals": 0.9897029702970297
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.162,
+ "detected_at_threshold": 0.7647058823529411,
+ "auroc_vs_normals": 0.9062317996505533
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.239,
+ "detected_at_threshold": 0.8787878787878788,
+ "auroc_vs_normals": 0.9660966096609661
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.578,
+ "detected_at_threshold": 0.9696969696969697,
+ "auroc_vs_normals": 0.9933993399339934
+ }
+ }
+ },
+ "pcb4": {
+ "deployed_policy": "q95",
+ "threshold": 0.1401524841785431,
+ "threshold_q95": 0.1401524841785431,
+ "recall_at_q95": 0.96,
+ "normal_false_alarm_rate_at_q95": 0.039603960396039604,
+ "n_normal": 101,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9865346534653465,
+ "auroc_all_banks": [
+ 0.9888,
+ 0.9906,
+ 0.9903,
+ 0.9865
+ ],
+ "recall_at_threshold": 0.96,
+ "normal_false_alarm_rate": 0.039603960396039604,
+ "normal_score_median": 0.0978608950972557,
+ "normal_score_p95": 0.13882103562355042,
+ "anomaly_score_median": 0.19103556126356125,
+ "by_defect_type": {
+ "burnt": {
+ "n": 8,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9975247524752475
+ },
+ "damage": {
+ "n": 21,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9886845827439887
+ },
+ "dirt": {
+ "n": 42,
+ "detected_at_threshold": 0.9761904761904762,
+ "auroc_vs_normals": 0.9896275341819897
+ },
+ "extra": {
+ "n": 30,
+ "detected_at_threshold": 0.9666666666666667,
+ "auroc_vs_normals": 0.9900990099009901
+ },
+ "missing": {
+ "n": 33,
+ "detected_at_threshold": 0.9090909090909091,
+ "auroc_vs_normals": 0.9765976597659766
+ },
+ "scratch": {
+ "n": 17,
+ "detected_at_threshold": 0.9411764705882353,
+ "auroc_vs_normals": 0.9906814210832848
+ },
+ "wrong place": {
+ "n": 13,
+ "detected_at_threshold": 0.9230769230769231,
+ "auroc_vs_normals": 0.9832444782939832
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.359,
+ "detected_at_threshold": 0.9411764705882353,
+ "auroc_vs_normals": 0.9822364589400117
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.992,
+ "detected_at_threshold": 0.9393939393939394,
+ "auroc_vs_normals": 0.9867986798679867
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 2.664,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9906990699069907
+ }
+ }
+ },
+ "pipe_fryum": {
+ "deployed_policy": "q95",
+ "threshold": 0.17671903371810913,
+ "threshold_q95": 0.17671903371810913,
+ "recall_at_q95": 0.99,
+ "normal_false_alarm_rate_at_q95": 0.04,
+ "n_normal": 50,
+ "n_anomaly": 100,
+ "auroc_deployed": 0.9892,
+ "auroc_all_banks": [
+ 0.995,
+ 0.9964,
+ 0.9962,
+ 0.9892
+ ],
+ "recall_at_threshold": 0.99,
+ "normal_false_alarm_rate": 0.04,
+ "normal_score_median": 0.1256011538207531,
+ "normal_score_p95": 0.15904454216361044,
+ "anomaly_score_median": 0.3052270710468292,
+ "by_defect_type": {
+ "burnt": {
+ "n": 16,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.99625
+ },
+ "corner and edge breakage": {
+ "n": 15,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9973333333333333
+ },
+ "different colour spot": {
+ "n": 10,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "middle breakage": {
+ "n": 10,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "similar colour spot": {
+ "n": 21,
+ "detected_at_threshold": 0.9523809523809523,
+ "auroc_vs_normals": 0.9580952380952381
+ },
+ "small cracks": {
+ "n": 10,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ },
+ "small scratches": {
+ "n": 24,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.995
+ },
+ "stuck together": {
+ "n": 10,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 1.0
+ }
+ },
+ "by_defect_size": {
+ "small": {
+ "n": 34,
+ "median_mask_area_percent": 0.045,
+ "detected_at_threshold": 0.9705882352941176,
+ "auroc_vs_normals": 0.9735294117647059
+ },
+ "medium": {
+ "n": 33,
+ "median_mask_area_percent": 0.17,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9957575757575757
+ },
+ "large": {
+ "n": 33,
+ "median_mask_area_percent": 0.456,
+ "detected_at_threshold": 1.0,
+ "auroc_vs_normals": 0.9987878787878788
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/encoder_finetune.json b/results/encoder_finetune.json
new file mode 100644
index 0000000000000000000000000000000000000000..f585a7514d60306af5e60fe4eb6f4998f76bc5cf
--- /dev/null
+++ b/results/encoder_finetune.json
@@ -0,0 +1,800 @@
+{
+ "candle": {
+ "frozen base": {
+ "auroc": 0.941,
+ "vs_frozen_full": [
+ -0.034102500000000015,
+ -0.007897500000000031
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8036363636363636
+ },
+ "frozen full": {
+ "auroc": 0.9604,
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8209090909090909
+ },
+ "tuned full": {
+ "auroc": 0.964,
+ "vs_frozen_full": [
+ -0.0002999999999999697,
+ 0.008599999999999941
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.8336363636363636
+ },
+ "tuned fullfg": {
+ "auroc": 0.9634,
+ "vs_frozen_full": [
+ -0.0010000000000000009,
+ 0.007900000000000018
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.8327272727272728
+ },
+ "tuned pos": {
+ "auroc": 0.96995,
+ "vs_frozen_full": [
+ 0.0009487500000000066,
+ 0.020299999999999985
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.8495454545454545
+ },
+ "frozen pos": {
+ "auroc": 0.9668,
+ "vs_frozen_full": [
+ -0.0019025000000000125,
+ 0.015300000000000091
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.84
+ }
+ },
+ "capsules": {
+ "frozen base": {
+ "auroc": 0.9683333333333334,
+ "vs_frozen_full": [
+ -0.020670833333333388,
+ 0.0038333333333333552
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "frozen full": {
+ "auroc": 0.9756666666666667,
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "tuned full": {
+ "auroc": 0.9736666666666667,
+ "vs_frozen_full": [
+ -0.0060041666666666715,
+ 0.0006666666666667043
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "tuned fullfg": {
+ "auroc": 0.9703333333333334,
+ "vs_frozen_full": [
+ -0.014499999999999957,
+ 0.000500000000000056
+ ],
+ "recall_q95": 0.8,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.05
+ },
+ "tuned pos": {
+ "auroc": 0.9695,
+ "vs_frozen_full": [
+ -0.023670833333333387,
+ 0.005833333333333357
+ ],
+ "recall_q95": 0.77,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.77,
+ "false_alarm_deployed": 0.05
+ },
+ "frozen pos": {
+ "auroc": 0.9735833333333334,
+ "vs_frozen_full": [
+ -0.020585416666666728,
+ 0.011835416666666682
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.06666666666666667
+ }
+ },
+ "cashew": {
+ "frozen base": {
+ "auroc": 0.9608,
+ "vs_frozen_full": [
+ -0.03260500000000007,
+ -0.0008000000000000229
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "frozen full": {
+ "auroc": 0.9764,
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned full": {
+ "auroc": 0.9736,
+ "vs_frozen_full": [
+ -0.006599999999999939,
+ 0.000200000000000089
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned fullfg": {
+ "auroc": 0.9742,
+ "vs_frozen_full": [
+ -0.006005000000000004,
+ 0.0008000000000000229
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned pos": {
+ "auroc": 0.9704,
+ "vs_frozen_full": [
+ -0.01689999999999992,
+ 0.0030000000000000027
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "frozen pos": {
+ "auroc": 0.9699,
+ "vs_frozen_full": [
+ -0.01840250000000008,
+ 0.0039025000000000006
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.16
+ }
+ },
+ "chewinggum": {
+ "frozen base": {
+ "auroc": 0.9886,
+ "vs_frozen_full": [
+ -0.012599999999999948,
+ 0.007400000000000073
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen full": {
+ "auroc": 0.9908,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9922,
+ "vs_frozen_full": [
+ 0.0,
+ 0.004605000000000018
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned fullfg": {
+ "auroc": 0.9898,
+ "vs_frozen_full": [
+ -0.004199999999999984,
+ 0.0014050000000000373
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.02
+ },
+ "tuned pos": {
+ "auroc": 0.9902,
+ "vs_frozen_full": [
+ -0.0033999999999999586,
+ 0.001804999999999996
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ },
+ "frozen pos": {
+ "auroc": 0.9896,
+ "vs_frozen_full": [
+ -0.0046000000000000485,
+ 0.0011999999999999789
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ }
+ },
+ "fryum": {
+ "frozen base": {
+ "auroc": 0.9924,
+ "vs_frozen_full": [
+ -0.007000000000000006,
+ 0.005199999999999982
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.02
+ },
+ "frozen full": {
+ "auroc": 0.993,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9908,
+ "vs_frozen_full": [
+ -0.006000000000000005,
+ 0.000200000000000089
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "tuned fullfg": {
+ "auroc": 0.9936,
+ "vs_frozen_full": [
+ -0.0020000000000000018,
+ 0.0041999999999999815
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.02
+ },
+ "tuned pos": {
+ "auroc": 0.9968,
+ "vs_frozen_full": [
+ -0.0020000000000000018,
+ 0.011199999999999988
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen pos": {
+ "auroc": 0.9965,
+ "vs_frozen_full": [
+ -0.0025999999999999383,
+ 0.011805000000000005
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.02
+ }
+ },
+ "macaroni1": {
+ "frozen base": {
+ "auroc": 0.909,
+ "vs_frozen_full": [
+ -0.04600000000000004,
+ -0.004797500000000038
+ ],
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7244
+ },
+ "frozen full": {
+ "auroc": 0.9338,
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7824
+ },
+ "tuned full": {
+ "auroc": 0.9373,
+ "vs_frozen_full": [
+ -0.000500000000000056,
+ 0.008002499999999994
+ ],
+ "recall_q95": 0.7,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.26,
+ "auroc_hard_type": 0.7968
+ },
+ "tuned fullfg": {
+ "auroc": 0.9347,
+ "vs_frozen_full": [
+ -0.00679999999999992,
+ 0.00940249999999995
+ ],
+ "recall_q95": 0.72,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.22,
+ "auroc_hard_type": 0.7892
+ },
+ "tuned pos": {
+ "auroc": 0.9249,
+ "vs_frozen_full": [
+ -0.022249999999999992,
+ 0.0031999999999999832
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.7548
+ },
+ "frozen pos": {
+ "auroc": 0.91835,
+ "vs_frozen_full": [
+ -0.029799999999999938,
+ -0.0034000000000000696
+ ],
+ "recall_q95": 0.64,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.21,
+ "auroc_hard_type": 0.7358
+ }
+ },
+ "macaroni2": {
+ "frozen base": {
+ "auroc": 0.845,
+ "vs_frozen_full": [
+ -0.06970999999999998,
+ -0.010397499999999978
+ ],
+ "recall_q95": 0.48,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7083333333333334
+ },
+ "frozen full": {
+ "auroc": 0.8852,
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.33,
+ "auroc_hard_type": 0.7706666666666667
+ },
+ "tuned full": {
+ "auroc": 0.8923,
+ "vs_frozen_full": [
+ -0.0008000000000000229,
+ 0.01590250000000001
+ ],
+ "recall_q95": 0.66,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.31,
+ "auroc_hard_type": 0.7883333333333333
+ },
+ "tuned fullfg": {
+ "auroc": 0.8876,
+ "vs_frozen_full": [
+ -0.011202500000000096,
+ 0.015199999999999991
+ ],
+ "recall_q95": 0.65,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.34,
+ "auroc_hard_type": 0.7813333333333333
+ },
+ "tuned pos": {
+ "auroc": 0.8686,
+ "vs_frozen_full": [
+ -0.041503749999999985,
+ 0.006951250000000005
+ ],
+ "recall_q95": 0.6,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7615
+ },
+ "frozen pos": {
+ "auroc": 0.86105,
+ "vs_frozen_full": [
+ -0.05020000000000002,
+ 0.0004100000000000113
+ ],
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.7453333333333333
+ }
+ },
+ "pcb1": {
+ "frozen base": {
+ "auroc": 0.9597,
+ "vs_frozen_full": [
+ -0.027000000000000024,
+ -0.003497499999999964
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.08
+ },
+ "frozen full": {
+ "auroc": 0.9735,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "tuned full": {
+ "auroc": 0.9745,
+ "vs_frozen_full": [
+ -0.0012025000000000867,
+ 0.0037000000000000366
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.12
+ },
+ "tuned fullfg": {
+ "auroc": 0.9697,
+ "vs_frozen_full": [
+ -0.010800000000000032,
+ 0.0013999999999999568
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.12
+ },
+ "tuned pos": {
+ "auroc": 0.96535,
+ "vs_frozen_full": [
+ -0.021002500000000018,
+ 0.0015525000000000345
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.1
+ },
+ "frozen pos": {
+ "auroc": 0.9621,
+ "vs_frozen_full": [
+ -0.024399999999999977,
+ -0.0011999999999999789
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.12
+ }
+ },
+ "pcb2": {
+ "frozen base": {
+ "auroc": 0.9062,
+ "vs_frozen_full": [
+ -0.08000250000000007,
+ -0.028797499999999955
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.7805263157894737
+ },
+ "frozen full": {
+ "auroc": 0.9577,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8663157894736843
+ },
+ "tuned full": {
+ "auroc": 0.9616,
+ "vs_frozen_full": [
+ -0.0027999999999999137,
+ 0.011099999999999999
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8605263157894737
+ },
+ "tuned fullfg": {
+ "auroc": 0.9555,
+ "vs_frozen_full": [
+ -0.011199999999999988,
+ 0.006599999999999942
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.08,
+ "auroc_hard_type": 0.848421052631579
+ },
+ "tuned pos": {
+ "auroc": 0.95065,
+ "vs_frozen_full": [
+ -0.01899999999999991,
+ 0.0033024999999999587
+ ],
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8328947368421052
+ },
+ "frozen pos": {
+ "auroc": 0.9471,
+ "vs_frozen_full": [
+ -0.02200250000000002,
+ -0.0006974999999999396
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8331578947368421
+ }
+ },
+ "pcb3": {
+ "frozen base": {
+ "auroc": 0.9547524752475247,
+ "vs_frozen_full": [
+ -0.04208168316831676,
+ -0.012277227722772288
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.8900990099009901
+ },
+ "frozen full": {
+ "auroc": 0.9800990099009901,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9346534653465347
+ },
+ "tuned full": {
+ "auroc": 0.9869306930693069,
+ "vs_frozen_full": [
+ 0.001980198019801982,
+ 0.013069306930693081
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.12871287128712872,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.12871287128712872,
+ "auroc_hard_type": 0.9529702970297029
+ },
+ "tuned fullfg": {
+ "auroc": 0.9856435643564356,
+ "vs_frozen_full": [
+ 0.0011881188118811892,
+ 0.011586633663366333
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.09900990099009901,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.09900990099009901,
+ "auroc_hard_type": 0.9495049504950495
+ },
+ "tuned pos": {
+ "auroc": 0.9903960396039604,
+ "vs_frozen_full": [
+ 0.0016831683168316847,
+ 0.02405940594059408
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.06930693069306931,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.06930693069306931,
+ "auroc_hard_type": 0.9678217821782178
+ },
+ "frozen pos": {
+ "auroc": 0.9849504950495049,
+ "vs_frozen_full": [
+ -0.0026732673267326756,
+ 0.015844059405940594
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.039603960396039604,
+ "auroc_hard_type": 0.9514851485148514
+ }
+ },
+ "pcb4": {
+ "frozen base": {
+ "auroc": 0.9865346534653465,
+ "vs_frozen_full": [
+ -0.026141089108910914,
+ 0.0017821782178217838
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "frozen full": {
+ "auroc": 0.9956435643564356,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "tuned full": {
+ "auroc": 0.9956435643564356,
+ "vs_frozen_full": [
+ -0.001980198019801982,
+ 0.001982673267326721
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "tuned fullfg": {
+ "auroc": 0.9935643564356436,
+ "vs_frozen_full": [
+ -0.008019801980198027,
+ 0.0015841584158415856
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.0297029702970297
+ },
+ "tuned pos": {
+ "auroc": 0.997029702970297,
+ "vs_frozen_full": [
+ -0.0033663366336633693,
+ 0.006834158415841576
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "frozen pos": {
+ "auroc": 0.9985148514851485,
+ "vs_frozen_full": [
+ -0.0002970297029702973,
+ 0.008118811881188126
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.0297029702970297
+ }
+ },
+ "pipe_fryum": {
+ "frozen base": {
+ "auroc": 0.9892,
+ "vs_frozen_full": [
+ -0.007600000000000051,
+ 0.0
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen full": {
+ "auroc": 0.9918,
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9916,
+ "vs_frozen_full": [
+ -0.0011999999999999789,
+ 0.0
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "tuned fullfg": {
+ "auroc": 0.9918,
+ "vs_frozen_full": [
+ -0.0011999999999999789,
+ 0.0011999999999999789
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ },
+ "tuned pos": {
+ "auroc": 0.9962,
+ "vs_frozen_full": [
+ 0.0,
+ 0.014399999999999972
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ },
+ "frozen pos": {
+ "auroc": 0.9962,
+ "vs_frozen_full": [
+ -0.00019999999999997797,
+ 0.015399999999999973
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/encoder_finetune_realistic.json b/results/encoder_finetune_realistic.json
new file mode 100644
index 0000000000000000000000000000000000000000..f3a0832d8d7d2f71879352a302c4fb4fb5e8f7ab
--- /dev/null
+++ b/results/encoder_finetune_realistic.json
@@ -0,0 +1,800 @@
+{
+ "candle": {
+ "frozen base": {
+ "auroc": 0.941,
+ "vs_frozen_full": [
+ -0.034102500000000015,
+ -0.007897500000000031
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8036363636363636
+ },
+ "frozen full": {
+ "auroc": 0.9604,
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8209090909090909
+ },
+ "tuned full": {
+ "auroc": 0.9618,
+ "vs_frozen_full": [
+ -0.0014999999999999458,
+ 0.0048000000000000265
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8254545454545454
+ },
+ "tuned fullfg": {
+ "auroc": 0.961,
+ "vs_frozen_full": [
+ -0.0027000000000000357,
+ 0.00370250000000002
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8263636363636364
+ },
+ "tuned pos": {
+ "auroc": 0.9682,
+ "vs_frozen_full": [
+ -0.0004025000000000638,
+ 0.017800000000000038
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8463636363636363
+ },
+ "frozen pos": {
+ "auroc": 0.9668,
+ "vs_frozen_full": [
+ -0.0019025000000000125,
+ 0.015300000000000091
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.84
+ }
+ },
+ "capsules": {
+ "frozen base": {
+ "auroc": 0.9683333333333334,
+ "vs_frozen_full": [
+ -0.020670833333333388,
+ 0.0038333333333333552
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "frozen full": {
+ "auroc": 0.9756666666666667,
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "tuned full": {
+ "auroc": 0.9765,
+ "vs_frozen_full": [
+ -0.0016666666666667052,
+ 0.0033333333333332993
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "tuned fullfg": {
+ "auroc": 0.9726666666666667,
+ "vs_frozen_full": [
+ -0.009999999999999901,
+ 0.0015041666666667003
+ ],
+ "recall_q95": 0.83,
+ "false_alarm_q95": 0.05,
+ "recall_deployed": 0.83,
+ "false_alarm_deployed": 0.05
+ },
+ "tuned pos": {
+ "auroc": 0.9725,
+ "vs_frozen_full": [
+ -0.019499999999999965,
+ 0.008166666666666655
+ ],
+ "recall_q95": 0.81,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "frozen pos": {
+ "auroc": 0.9735833333333334,
+ "vs_frozen_full": [
+ -0.020585416666666728,
+ 0.011835416666666682
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.06666666666666667
+ }
+ },
+ "cashew": {
+ "frozen base": {
+ "auroc": 0.9608,
+ "vs_frozen_full": [
+ -0.03260500000000007,
+ -0.0008000000000000229
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "frozen full": {
+ "auroc": 0.9764,
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned full": {
+ "auroc": 0.9724,
+ "vs_frozen_full": [
+ -0.008000000000000007,
+ -0.0010000000000000009
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.12
+ },
+ "tuned fullfg": {
+ "auroc": 0.973,
+ "vs_frozen_full": [
+ -0.008000000000000007,
+ -0.00039499999999998656
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.12
+ },
+ "tuned pos": {
+ "auroc": 0.9704,
+ "vs_frozen_full": [
+ -0.016805000000000035,
+ 0.0030049999999999747
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.08
+ },
+ "frozen pos": {
+ "auroc": 0.9699,
+ "vs_frozen_full": [
+ -0.01840250000000008,
+ 0.0039025000000000006
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.16,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.16
+ }
+ },
+ "chewinggum": {
+ "frozen base": {
+ "auroc": 0.9886,
+ "vs_frozen_full": [
+ -0.012599999999999948,
+ 0.007400000000000073
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen full": {
+ "auroc": 0.9908,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9922,
+ "vs_frozen_full": [
+ -0.0007999999999999119,
+ 0.005600000000000049
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned fullfg": {
+ "auroc": 0.9904,
+ "vs_frozen_full": [
+ -0.003805000000000025,
+ 0.0031999999999999806
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.02
+ },
+ "tuned pos": {
+ "auroc": 0.9909,
+ "vs_frozen_full": [
+ -0.002802500000000024,
+ 0.0034999999999999476
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ },
+ "frozen pos": {
+ "auroc": 0.9896,
+ "vs_frozen_full": [
+ -0.0046000000000000485,
+ 0.0011999999999999789
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ }
+ },
+ "fryum": {
+ "frozen base": {
+ "auroc": 0.9924,
+ "vs_frozen_full": [
+ -0.007000000000000006,
+ 0.005199999999999982
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.02
+ },
+ "frozen full": {
+ "auroc": 0.993,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9906,
+ "vs_frozen_full": [
+ -0.007399999999999962,
+ 0.0006000000000000449
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "tuned fullfg": {
+ "auroc": 0.9926,
+ "vs_frozen_full": [
+ -0.005199999999999982,
+ 0.0040000000000000036
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.02
+ },
+ "tuned pos": {
+ "auroc": 0.996,
+ "vs_frozen_full": [
+ -0.0036000000000000476,
+ 0.010599999999999946
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.02
+ },
+ "frozen pos": {
+ "auroc": 0.9965,
+ "vs_frozen_full": [
+ -0.0025999999999999383,
+ 0.011805000000000005
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.02
+ }
+ },
+ "macaroni1": {
+ "frozen base": {
+ "auroc": 0.909,
+ "vs_frozen_full": [
+ -0.04600000000000004,
+ -0.004797500000000038
+ ],
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7244
+ },
+ "frozen full": {
+ "auroc": 0.9338,
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7824
+ },
+ "tuned full": {
+ "auroc": 0.941,
+ "vs_frozen_full": [
+ 0.0017000000000000348,
+ 0.01429999999999998
+ ],
+ "recall_q95": 0.7,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.808
+ },
+ "tuned fullfg": {
+ "auroc": 0.9369,
+ "vs_frozen_full": [
+ -0.005299999999999971,
+ 0.01200000000000001
+ ],
+ "recall_q95": 0.72,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.21,
+ "auroc_hard_type": 0.7976
+ },
+ "tuned pos": {
+ "auroc": 0.92955,
+ "vs_frozen_full": [
+ -0.016552500000000064,
+ 0.006952499999999998
+ ],
+ "recall_q95": 0.71,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.19,
+ "auroc_hard_type": 0.77
+ },
+ "frozen pos": {
+ "auroc": 0.91835,
+ "vs_frozen_full": [
+ -0.029799999999999938,
+ -0.0034000000000000696
+ ],
+ "recall_q95": 0.64,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.21,
+ "auroc_hard_type": 0.7358
+ }
+ },
+ "macaroni2": {
+ "frozen base": {
+ "auroc": 0.845,
+ "vs_frozen_full": [
+ -0.06970999999999998,
+ -0.010397499999999978
+ ],
+ "recall_q95": 0.48,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7083333333333334
+ },
+ "frozen full": {
+ "auroc": 0.8852,
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.33,
+ "auroc_hard_type": 0.7706666666666667
+ },
+ "tuned full": {
+ "auroc": 0.9001,
+ "vs_frozen_full": [
+ 0.007200000000000093,
+ 0.0242
+ ],
+ "recall_q95": 0.63,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.7986666666666666
+ },
+ "tuned fullfg": {
+ "auroc": 0.8977,
+ "vs_frozen_full": [
+ 0.0024999999999999467,
+ 0.023702500000000036
+ ],
+ "recall_q95": 0.64,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.31,
+ "auroc_hard_type": 0.7943333333333333
+ },
+ "tuned pos": {
+ "auroc": 0.87775,
+ "vs_frozen_full": [
+ -0.031005000000000026,
+ 0.014553750000000039
+ ],
+ "recall_q95": 0.62,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7706666666666667
+ },
+ "frozen pos": {
+ "auroc": 0.86105,
+ "vs_frozen_full": [
+ -0.05020000000000002,
+ 0.0004100000000000113
+ ],
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.81,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.7453333333333333
+ }
+ },
+ "pcb1": {
+ "frozen base": {
+ "auroc": 0.9597,
+ "vs_frozen_full": [
+ -0.027000000000000024,
+ -0.003497499999999964
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.08
+ },
+ "frozen full": {
+ "auroc": 0.9735,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "tuned full": {
+ "auroc": 0.9796,
+ "vs_frozen_full": [
+ 0.0012999999999999678,
+ 0.012202500000000083
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.09
+ },
+ "tuned fullfg": {
+ "auroc": 0.9752,
+ "vs_frozen_full": [
+ -0.005099999999999993,
+ 0.007600000000000051
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.1
+ },
+ "tuned pos": {
+ "auroc": 0.9679,
+ "vs_frozen_full": [
+ -0.01639999999999997,
+ 0.0025024999999999327
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.11
+ },
+ "frozen pos": {
+ "auroc": 0.9621,
+ "vs_frozen_full": [
+ -0.024399999999999977,
+ -0.0011999999999999789
+ ],
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.12
+ }
+ },
+ "pcb2": {
+ "frozen base": {
+ "auroc": 0.9062,
+ "vs_frozen_full": [
+ -0.08000250000000007,
+ -0.028797499999999955
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.7805263157894737
+ },
+ "frozen full": {
+ "auroc": 0.9577,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8663157894736843
+ },
+ "tuned full": {
+ "auroc": 0.9617,
+ "vs_frozen_full": [
+ -0.0024999999999999493,
+ 0.01090000000000002
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8605263157894737
+ },
+ "tuned fullfg": {
+ "auroc": 0.9569,
+ "vs_frozen_full": [
+ -0.008799999999999919,
+ 0.007600000000000051
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8510526315789474
+ },
+ "tuned pos": {
+ "auroc": 0.9513,
+ "vs_frozen_full": [
+ -0.017299999999999986,
+ 0.0033037499999999487
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8323684210526315
+ },
+ "frozen pos": {
+ "auroc": 0.9471,
+ "vs_frozen_full": [
+ -0.02200250000000002,
+ -0.0006974999999999396
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8331578947368421
+ }
+ },
+ "pcb3": {
+ "frozen base": {
+ "auroc": 0.9547524752475247,
+ "vs_frozen_full": [
+ -0.04208168316831676,
+ -0.012277227722772288
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.8900990099009901
+ },
+ "frozen full": {
+ "auroc": 0.9800990099009901,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9346534653465347
+ },
+ "tuned full": {
+ "auroc": 0.9856435643564356,
+ "vs_frozen_full": [
+ -0.0004950495049504955,
+ 0.013467821782178216
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.1485148514851485,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.1485148514851485,
+ "auroc_hard_type": 0.946039603960396
+ },
+ "tuned fullfg": {
+ "auroc": 0.9849504950495049,
+ "vs_frozen_full": [
+ -0.0004950495049504955,
+ 0.01198267326732673
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.13861386138613863,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.13861386138613863,
+ "auroc_hard_type": 0.9445544554455445
+ },
+ "tuned pos": {
+ "auroc": 0.9897029702970297,
+ "vs_frozen_full": [
+ -0.0002970297029702973,
+ 0.024356435643564378
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.04950495049504951,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.04950495049504951,
+ "auroc_hard_type": 0.9608910891089109
+ },
+ "frozen pos": {
+ "auroc": 0.9849504950495049,
+ "vs_frozen_full": [
+ -0.0026732673267326756,
+ 0.015844059405940594
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.039603960396039604,
+ "auroc_hard_type": 0.9514851485148514
+ }
+ },
+ "pcb4": {
+ "frozen base": {
+ "auroc": 0.9865346534653465,
+ "vs_frozen_full": [
+ -0.026141089108910914,
+ 0.0017821782178217838
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "frozen full": {
+ "auroc": 0.9956435643564356,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "tuned full": {
+ "auroc": 0.9957425742574257,
+ "vs_frozen_full": [
+ -0.0014851485148514865,
+ 0.0018811881188118829
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "tuned fullfg": {
+ "auroc": 0.9948514851485148,
+ "vs_frozen_full": [
+ -0.0040618811881188155,
+ 0.0015841584158415856
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.0297029702970297
+ },
+ "tuned pos": {
+ "auroc": 0.997029702970297,
+ "vs_frozen_full": [
+ -0.0023762376237623783,
+ 0.006039603960396045
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "frozen pos": {
+ "auroc": 0.9985148514851485,
+ "vs_frozen_full": [
+ -0.0002970297029702973,
+ 0.008118811881188126
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.0297029702970297,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.0297029702970297
+ }
+ },
+ "pipe_fryum": {
+ "frozen base": {
+ "auroc": 0.9892,
+ "vs_frozen_full": [
+ -0.007600000000000051,
+ 0.0
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen full": {
+ "auroc": 0.9918,
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.992,
+ "vs_frozen_full": [
+ -0.0011999999999999789,
+ 0.0020000000000000018
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned fullfg": {
+ "auroc": 0.992,
+ "vs_frozen_full": [
+ -0.0011999999999999789,
+ 0.0021999999999999797
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned pos": {
+ "auroc": 0.9966,
+ "vs_frozen_full": [
+ 0.0,
+ 0.015004999999999985
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ },
+ "frozen pos": {
+ "auroc": 0.9962,
+ "vs_frozen_full": [
+ -0.00019999999999997797,
+ 0.015399999999999973
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.02
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/encoder_tuned_coreset.json b/results/encoder_tuned_coreset.json
new file mode 100644
index 0000000000000000000000000000000000000000..50b624b9e24fa817e99c5812d34b9d0ba2b4ebfa
--- /dev/null
+++ b/results/encoder_tuned_coreset.json
@@ -0,0 +1,663 @@
+{
+ "candle": {
+ "frozen base": {
+ "auroc": 0.941,
+ "vs_frozen_core32k": [
+ -0.03420000000000001,
+ -0.006700000000000037
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.8036363636363636
+ },
+ "frozen core32k": {
+ "auroc": 0.9599,
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.11,
+ "auroc_hard_type": 0.8263636363636364
+ },
+ "frozen full": {
+ "auroc": 0.9604,
+ "vs_frozen_core32k": [
+ -0.0038025000000000224,
+ 0.0048025000000000125
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8209090909090909
+ },
+ "tuned full": {
+ "auroc": 0.9618,
+ "vs_frozen_core32k": [
+ -0.0034000000000000696,
+ 0.007102499999999981
+ ],
+ "recall_q95": 0.89,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8254545454545454
+ },
+ "tuned core32k": {
+ "auroc": 0.96,
+ "vs_frozen_core32k": [
+ -0.0038000000000000256,
+ 0.0040999999999999925
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8272727272727273
+ }
+ },
+ "capsules": {
+ "frozen base": {
+ "auroc": 0.9683333333333334,
+ "vs_frozen_core32k": [
+ -0.02533333333333332,
+ 0.0056666666666666
+ ],
+ "recall_q95": 0.82,
+ "false_alarm_q95": 0.08333333333333333,
+ "recall_deployed": 0.82,
+ "false_alarm_deployed": 0.08333333333333333
+ },
+ "frozen core32k": {
+ "auroc": 0.9773333333333334,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "frozen full": {
+ "auroc": 0.9756666666666667,
+ "vs_frozen_core32k": [
+ -0.007837500000000025,
+ 0.0038333333333333552
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "tuned full": {
+ "auroc": 0.9765,
+ "vs_frozen_core32k": [
+ -0.007004166666666672,
+ 0.0040000000000000036
+ ],
+ "recall_q95": 0.88,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.88,
+ "false_alarm_deployed": 0.06666666666666667
+ },
+ "tuned core32k": {
+ "auroc": 0.9778333333333333,
+ "vs_frozen_core32k": [
+ -0.0035000000000000586,
+ 0.0044999999999999485
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06666666666666667,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06666666666666667
+ }
+ },
+ "cashew": {
+ "frozen base": {
+ "auroc": 0.9608,
+ "vs_frozen_core32k": [
+ -0.03360500000000007,
+ -0.0028000000000000247
+ ],
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.18,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.18
+ },
+ "frozen core32k": {
+ "auroc": 0.978,
+ "recall_q95": 0.92,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.92,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen full": {
+ "auroc": 0.9764,
+ "vs_frozen_core32k": [
+ -0.006199999999999983,
+ 0.0023999999999999603
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned full": {
+ "auroc": 0.9724,
+ "vs_frozen_core32k": [
+ -0.012399999999999967,
+ -0.0006000000000000449
+ ],
+ "recall_q95": 0.91,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.12
+ },
+ "tuned core32k": {
+ "auroc": 0.974,
+ "vs_frozen_core32k": [
+ -0.010000000000000009,
+ 0.0013999999999999568
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.08
+ }
+ },
+ "chewinggum": {
+ "frozen base": {
+ "auroc": 0.9886,
+ "vs_frozen_core32k": [
+ -0.013600000000000056,
+ 0.0022000000000000908
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen core32k": {
+ "auroc": 0.9926,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "frozen full": {
+ "auroc": 0.9908,
+ "vs_frozen_core32k": [
+ -0.008005000000000007,
+ 0.0011999999999999789
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9922,
+ "vs_frozen_core32k": [
+ -0.0031999999999999806,
+ 0.0018000000000000238
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned core32k": {
+ "auroc": 0.9916,
+ "vs_frozen_core32k": [
+ -0.006399999999999961,
+ 0.0026000000000000467
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.06
+ }
+ },
+ "fryum": {
+ "frozen base": {
+ "auroc": 0.9924,
+ "vs_frozen_core32k": [
+ -0.00960500000000005,
+ 0.00039999999999995595
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.02,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.02
+ },
+ "frozen core32k": {
+ "auroc": 0.9958,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen full": {
+ "auroc": 0.993,
+ "vs_frozen_core32k": [
+ -0.008599999999999941,
+ 0.0007999999999999119
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.9906,
+ "vs_frozen_core32k": [
+ -0.013000000000000012,
+ 0.0
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.04
+ },
+ "tuned core32k": {
+ "auroc": 0.9902,
+ "vs_frozen_core32k": [
+ -0.01380500000000003,
+ 0.0
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.04
+ }
+ },
+ "macaroni1": {
+ "frozen base": {
+ "auroc": 0.909,
+ "vs_frozen_core32k": [
+ -0.049699999999999966,
+ -0.0029000000000000137
+ ],
+ "recall_q95": 0.57,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.85,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.7244
+ },
+ "frozen core32k": {
+ "auroc": 0.9352,
+ "recall_q95": 0.72,
+ "false_alarm_q95": 0.01,
+ "recall_deployed": 0.89,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.7768
+ },
+ "frozen full": {
+ "auroc": 0.9338,
+ "vs_frozen_core32k": [
+ -0.011400000000000077,
+ 0.009099999999999997
+ ],
+ "recall_q95": 0.69,
+ "false_alarm_q95": 0.0,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.25,
+ "auroc_hard_type": 0.7824
+ },
+ "tuned full": {
+ "auroc": 0.941,
+ "vs_frozen_core32k": [
+ -0.0048000000000000265,
+ 0.0160025
+ ],
+ "recall_q95": 0.7,
+ "false_alarm_q95": 0.03,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.24,
+ "auroc_hard_type": 0.808
+ },
+ "tuned core32k": {
+ "auroc": 0.9473,
+ "vs_frozen_core32k": [
+ 0.0020000000000000018,
+ 0.023899999999999925
+ ],
+ "recall_q95": 0.75,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.2,
+ "auroc_hard_type": 0.822
+ }
+ },
+ "macaroni2": {
+ "frozen base": {
+ "auroc": 0.845,
+ "vs_frozen_core32k": [
+ -0.06530750000000002,
+ -0.005394999999999988
+ ],
+ "recall_q95": 0.48,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.8,
+ "false_alarm_deployed": 0.28,
+ "auroc_hard_type": 0.7083333333333334
+ },
+ "frozen core32k": {
+ "auroc": 0.8797,
+ "recall_q95": 0.63,
+ "false_alarm_q95": 0.07,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.29,
+ "auroc_hard_type": 0.748
+ },
+ "frozen full": {
+ "auroc": 0.8852,
+ "vs_frozen_core32k": [
+ -0.012800000000000034,
+ 0.0242
+ ],
+ "recall_q95": 0.55,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.33,
+ "auroc_hard_type": 0.7706666666666667
+ },
+ "tuned full": {
+ "auroc": 0.9001,
+ "vs_frozen_core32k": [
+ 0.003097499999999992,
+ 0.03939999999999999
+ ],
+ "recall_q95": 0.63,
+ "false_alarm_q95": 0.11,
+ "recall_deployed": 0.91,
+ "false_alarm_deployed": 0.3,
+ "auroc_hard_type": 0.7986666666666666
+ },
+ "tuned core32k": {
+ "auroc": 0.8972,
+ "vs_frozen_core32k": [
+ 0.003797500000000026,
+ 0.033299999999999996
+ ],
+ "recall_q95": 0.73,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.27,
+ "auroc_hard_type": 0.785
+ }
+ },
+ "pcb1": {
+ "frozen base": {
+ "auroc": 0.9597,
+ "vs_frozen_core32k": [
+ -0.026902500000000034,
+ -0.0013974999999999736
+ ],
+ "recall_q95": 0.86,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.86,
+ "false_alarm_deployed": 0.08
+ },
+ "frozen core32k": {
+ "auroc": 0.9724,
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.12
+ },
+ "frozen full": {
+ "auroc": 0.9735,
+ "vs_frozen_core32k": [
+ -0.0031999999999999806,
+ 0.005600000000000049
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.1
+ },
+ "tuned full": {
+ "auroc": 0.9796,
+ "vs_frozen_core32k": [
+ 0.001500000000000054,
+ 0.014600000000000057
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.09
+ },
+ "tuned core32k": {
+ "auroc": 0.9788,
+ "vs_frozen_core32k": [
+ 0.0016000000000000458,
+ 0.012599999999999945
+ ],
+ "recall_q95": 0.94,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.94,
+ "false_alarm_deployed": 0.09
+ }
+ },
+ "pcb2": {
+ "frozen base": {
+ "auroc": 0.9062,
+ "vs_frozen_core32k": [
+ -0.0817050000000001,
+ -0.02849250000000001
+ ],
+ "recall_q95": 0.84,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.84,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.7805263157894737
+ },
+ "frozen core32k": {
+ "auroc": 0.9592,
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.12,
+ "recall_deployed": 0.9,
+ "false_alarm_deployed": 0.12,
+ "auroc_hard_type": 0.86
+ },
+ "frozen full": {
+ "auroc": 0.9577,
+ "vs_frozen_core32k": [
+ -0.006800000000000028,
+ 0.003699999999999928
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8663157894736843
+ },
+ "tuned full": {
+ "auroc": 0.9617,
+ "vs_frozen_core32k": [
+ -0.0038999999999999035,
+ 0.009599999999999945
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.09,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.09,
+ "auroc_hard_type": 0.8605263157894737
+ },
+ "tuned core32k": {
+ "auroc": 0.9575,
+ "vs_frozen_core32k": [
+ -0.008499999999999952,
+ 0.0041999999999999815
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.1,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.1,
+ "auroc_hard_type": 0.8442105263157895
+ }
+ },
+ "pcb3": {
+ "frozen base": {
+ "auroc": 0.9547524752475247,
+ "vs_frozen_core32k": [
+ -0.055747524752475186,
+ -0.013066831683168342
+ ],
+ "recall_q95": 0.87,
+ "false_alarm_q95": 0.0891089108910891,
+ "recall_deployed": 0.87,
+ "false_alarm_deployed": 0.0891089108910891,
+ "auroc_hard_type": 0.8900990099009901
+ },
+ "frozen core32k": {
+ "auroc": 0.9869306930693069,
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.12871287128712872,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.12871287128712872,
+ "auroc_hard_type": 0.9559405940594059
+ },
+ "frozen full": {
+ "auroc": 0.9800990099009901,
+ "vs_frozen_core32k": [
+ -0.015844059405940608,
+ 0.0001980198019801982
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.1188118811881188,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.1188118811881188,
+ "auroc_hard_type": 0.9346534653465347
+ },
+ "tuned full": {
+ "auroc": 0.9856435643564356,
+ "vs_frozen_core32k": [
+ -0.007326732673267333,
+ 0.004455445544554459
+ ],
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.1485148514851485,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.1485148514851485,
+ "auroc_hard_type": 0.946039603960396
+ },
+ "tuned core32k": {
+ "auroc": 0.9928712871287129,
+ "vs_frozen_core32k": [
+ -0.0004950495049504955,
+ 0.014259900990099009
+ ],
+ "recall_q95": 0.98,
+ "false_alarm_q95": 0.12871287128712872,
+ "recall_deployed": 0.98,
+ "false_alarm_deployed": 0.12871287128712872,
+ "auroc_hard_type": 0.9757425742574257
+ }
+ },
+ "pcb4": {
+ "frozen base": {
+ "auroc": 0.9865346534653465,
+ "vs_frozen_core32k": [
+ -0.02742574257425745,
+ 0.0005965346534653335
+ ],
+ "recall_q95": 0.96,
+ "false_alarm_q95": 0.039603960396039604,
+ "recall_deployed": 0.96,
+ "false_alarm_deployed": 0.039603960396039604
+ },
+ "frozen core32k": {
+ "auroc": 0.997029702970297,
+ "recall_q95": 0.97,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.97,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "frozen full": {
+ "auroc": 0.9956435643564356,
+ "vs_frozen_core32k": [
+ -0.0040618811881188155,
+ 0.0005965346534653335
+ ],
+ "recall_q95": 0.93,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.93,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "tuned full": {
+ "auroc": 0.9957425742574257,
+ "vs_frozen_core32k": [
+ -0.00435643564356436,
+ 0.0004950495049504955
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.019801980198019802
+ },
+ "tuned core32k": {
+ "auroc": 0.9953465346534653,
+ "vs_frozen_core32k": [
+ -0.004952970297029707,
+ 0.0002970297029702973
+ ],
+ "recall_q95": 0.95,
+ "false_alarm_q95": 0.019801980198019802,
+ "recall_deployed": 0.95,
+ "false_alarm_deployed": 0.019801980198019802
+ }
+ },
+ "pipe_fryum": {
+ "frozen base": {
+ "auroc": 0.9892,
+ "vs_frozen_core32k": [
+ -0.0036000000000000476,
+ 0.0030000000000000027
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ },
+ "frozen core32k": {
+ "auroc": 0.9894,
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "frozen full": {
+ "auroc": 0.9918,
+ "vs_frozen_core32k": [
+ 0.0,
+ 0.007199999999999984
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.06,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.06
+ },
+ "tuned full": {
+ "auroc": 0.992,
+ "vs_frozen_core32k": [
+ 0.0,
+ 0.008400000000000074
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.08,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.08
+ },
+ "tuned core32k": {
+ "auroc": 0.9906,
+ "vs_frozen_core32k": [
+ -0.0031999999999999806,
+ 0.007600000000000051
+ ],
+ "recall_q95": 0.99,
+ "false_alarm_q95": 0.04,
+ "recall_deployed": 0.99,
+ "false_alarm_deployed": 0.04
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/evaluation.json b/results/evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..2e9c532ed151a7e0b4777ef237f7c5ee94907863
--- /dev/null
+++ b/results/evaluation.json
@@ -0,0 +1,587 @@
+{
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "protocol": "64 normal fit images; 32 distinct training normals + 20 official test anomalies for calibration; remaining official test images for final evaluation. Seed 42. Not the full official VisA test protocol.",
+ "platform": "Windows-11-10.0.26300-SP0",
+ "python": "3.12.4",
+ "torch": "2.8.0+cu126",
+ "device": "cuda",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "categories": {
+ "pcb1": {
+ "category": "pcb1",
+ "available": true,
+ "model_id": "dinov3-normal-bank-pcb1-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "32786eb59ad977de43f1eac542defa92a62c856c3e6013762373c5d8428ff41f",
+ "threshold": 0.047802507877349854,
+ "uncertainty_margin": 0.0023901253938674928,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.05350043252110481,
+ "bank_size_bytes": 5826022,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.8966250000000001,
+ "average_precision": 0.8663194463972607,
+ "precision": 0.7790697674418605,
+ "recall": 0.8375,
+ "f1": 0.8072289156626506,
+ "confusion_matrix": [
+ [
+ 81,
+ 19
+ ],
+ [
+ 13,
+ 67
+ ]
+ ],
+ "n_images": 180,
+ "pixel_auroc_64": 0.9898054522947226,
+ "pixel_average_precision_64": 0.7869819025878954,
+ "pixel_f1_64": 0.7252747252747253,
+ "pixel_threshold": 0.09545719623565674,
+ "latency_median_ms": 107.9613499896368,
+ "latency_p95_ms": 200.43043499463238,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.10555555555555556
+ },
+ "fit_and_evaluation_seconds": 46.72307930000534
+ },
+ "capsules": {
+ "category": "capsules",
+ "available": true,
+ "model_id": "dinov3-normal-bank-capsules-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "04c06d14d8a95cdcc25f2db57d5156c5f3ad3ccc5997b1a94762f4e6953f3230",
+ "threshold": 0.04728597402572632,
+ "uncertainty_margin": 0.0023642987012863163,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.051162537187337875,
+ "bank_size_bytes": 5829829,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.825,
+ "average_precision": 0.888730323581443,
+ "precision": 0.8382352941176471,
+ "recall": 0.7125,
+ "f1": 0.7702702702702703,
+ "confusion_matrix": [
+ [
+ 49,
+ 11
+ ],
+ [
+ 23,
+ 57
+ ]
+ ],
+ "n_images": 140,
+ "pixel_auroc_64": 0.9262537759349578,
+ "pixel_average_precision_64": 0.045138180218283995,
+ "pixel_f1_64": 0.11524251238110211,
+ "pixel_threshold": 0.05173458158969879,
+ "latency_median_ms": 63.487500010523945,
+ "latency_p95_ms": 154.34065499284767,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.2642857142857143
+ },
+ "fit_and_evaluation_seconds": 22.833901800011517
+ },
+ "cashew": {
+ "category": "cashew",
+ "available": true,
+ "model_id": "dinov3-normal-bank-cashew-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "2da63dd9fec7bba903090659fad56c7d3dbb39cf7cc8525a68ebbb5cf13031c5",
+ "threshold": 0.051523059606552124,
+ "uncertainty_margin": 0.0025761529803276064,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.05220940336585045,
+ "bank_size_bytes": 5818641,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.9705,
+ "average_precision": 0.9830165610895263,
+ "precision": 1.0,
+ "recall": 0.7,
+ "f1": 0.8235294117647058,
+ "confusion_matrix": [
+ [
+ 50,
+ 0
+ ],
+ [
+ 24,
+ 56
+ ]
+ ],
+ "n_images": 130,
+ "pixel_auroc_64": 0.996374825929817,
+ "pixel_average_precision_64": 0.9143062834240087,
+ "pixel_f1_64": 0.7389403146118462,
+ "pixel_threshold": 0.060025766491889954,
+ "latency_median_ms": 46.69994999130722,
+ "latency_p95_ms": 87.63518499908969,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.06153846153846154
+ },
+ "fit_and_evaluation_seconds": 15.456038499978604
+ },
+ "candle": {
+ "category": "candle",
+ "available": true,
+ "model_id": "dinov3-normal-bank-candle-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "f7465d73990b2e0ada0b4ffd493341af104debf37ba5add778767ba955406eaa",
+ "threshold": 0.04235455393791199,
+ "uncertainty_margin": 0.0021177276968955996,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.049472544342279434,
+ "bank_size_bytes": 5833565,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.9247500000000001,
+ "average_precision": 0.9157839305972371,
+ "precision": 0.8095238095238095,
+ "recall": 0.85,
+ "f1": 0.8292682926829268,
+ "confusion_matrix": [
+ [
+ 84,
+ 16
+ ],
+ [
+ 12,
+ 68
+ ]
+ ],
+ "n_images": 180,
+ "pixel_auroc_64": 0.9843575395340302,
+ "pixel_average_precision_64": 0.21910140819834925,
+ "pixel_f1_64": 0.21270521056388295,
+ "pixel_threshold": 0.0849744901061058,
+ "latency_median_ms": 35.39944998919964,
+ "latency_p95_ms": 42.45204498292878,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.07777777777777778
+ },
+ "fit_and_evaluation_seconds": 16.015594900003634
+ },
+ "chewinggum": {
+ "category": "chewinggum",
+ "available": true,
+ "model_id": "dinov3-normal-bank-chewinggum-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "457aa7d24353f019c0cd279b927e686d85fb9642d61f35fa7837eac9180971d1",
+ "threshold": 0.06446045637130737,
+ "uncertainty_margin": 0.003223022818565369,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.12498166412115097,
+ "bank_size_bytes": 5818815,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.9615,
+ "average_precision": 0.9817544815300773,
+ "precision": 1.0,
+ "recall": 0.8375,
+ "f1": 0.9115646258503401,
+ "confusion_matrix": [
+ [
+ 50,
+ 0
+ ],
+ [
+ 13,
+ 67
+ ]
+ ],
+ "n_images": 130,
+ "pixel_auroc_64": 0.9764362172320896,
+ "pixel_average_precision_64": 0.6115074532633727,
+ "pixel_f1_64": 0.535268768428215,
+ "pixel_threshold": 0.15793992578983307,
+ "latency_median_ms": 35.14035000989679,
+ "latency_p95_ms": 38.95726999035105,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.05384615384615385
+ },
+ "fit_and_evaluation_seconds": 12.904443200008245
+ },
+ "fryum": {
+ "category": "fryum",
+ "available": true,
+ "model_id": "dinov3-normal-bank-fryum-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "8ace2cfe248a0fcc2cf4de52a724e5eb0bb40b8982cc1940a0ebc1d328b14bf5",
+ "threshold": 0.031331419944763184,
+ "uncertainty_margin": 0.0015665709972381592,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.03678131476044655,
+ "bank_size_bytes": 5837639,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.9045000000000001,
+ "average_precision": 0.9462912998505075,
+ "precision": 0.8518518518518519,
+ "recall": 0.8625,
+ "f1": 0.8571428571428571,
+ "confusion_matrix": [
+ [
+ 38,
+ 12
+ ],
+ [
+ 11,
+ 69
+ ]
+ ],
+ "n_images": 130,
+ "pixel_auroc_64": 0.9719083051766001,
+ "pixel_average_precision_64": 0.3980462068371827,
+ "pixel_f1_64": 0.4379701239538087,
+ "pixel_threshold": 0.032756902277469635,
+ "latency_median_ms": 42.533050014753826,
+ "latency_p95_ms": 46.57477499276865,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.1076923076923077
+ },
+ "fit_and_evaluation_seconds": 14.423628800024744
+ },
+ "macaroni1": {
+ "category": "macaroni1",
+ "available": true,
+ "model_id": "dinov3-normal-bank-macaroni1-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "80671fc63c363971235dfcfed56f4b7bc26a6cc729f8742b9cc245e3c32a6740",
+ "threshold": 0.04998299479484558,
+ "uncertainty_margin": 0.002499149739742279,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.04887811839580536,
+ "bank_size_bytes": 5838076,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.8305,
+ "average_precision": 0.7713832272795041,
+ "precision": 0.8103448275862069,
+ "recall": 0.5875,
+ "f1": 0.6811594202898551,
+ "confusion_matrix": [
+ [
+ 89,
+ 11
+ ],
+ [
+ 33,
+ 47
+ ]
+ ],
+ "n_images": 180,
+ "pixel_auroc_64": 0.694555712193444,
+ "pixel_average_precision_64": 0.001018167117284116,
+ "pixel_f1_64": 0.004832509610104338,
+ "pixel_threshold": 0.04819351062178612,
+ "latency_median_ms": 38.921750005101785,
+ "latency_p95_ms": 43.64804000215372,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.13333333333333333
+ },
+ "fit_and_evaluation_seconds": 16.23608139998396
+ },
+ "macaroni2": {
+ "category": "macaroni2",
+ "available": true,
+ "model_id": "dinov3-normal-bank-macaroni2-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "0645e4c3bfe1b829bc2b10c59f1ecf7e4b64bf85490182c9aeb188d2a31b1a68",
+ "threshold": 0.056429386138916016,
+ "uncertainty_margin": 0.002821469306945801,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.057037897408008575,
+ "bank_size_bytes": 5828662,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.46825,
+ "average_precision": 0.4027863501702508,
+ "precision": 0.41414141414141414,
+ "recall": 0.5125,
+ "f1": 0.4581005586592179,
+ "confusion_matrix": [
+ [
+ 42,
+ 58
+ ],
+ [
+ 39,
+ 41
+ ]
+ ],
+ "n_images": 180,
+ "pixel_auroc_64": 0.806682222416908,
+ "pixel_average_precision_64": 0.0014684442001449403,
+ "pixel_f1_64": 0.006172839506172839,
+ "pixel_threshold": 0.06772572547197342,
+ "latency_median_ms": 36.53770001255907,
+ "latency_p95_ms": 41.75992001546546,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.35
+ },
+ "fit_and_evaluation_seconds": 15.40095150002162
+ },
+ "pcb2": {
+ "category": "pcb2",
+ "available": true,
+ "model_id": "dinov3-normal-bank-pcb2-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "896d2526dbbe432a77d1085ec7c229848dfc99076d5544a76ad323d3e30ede30",
+ "threshold": 0.03412127494812012,
+ "uncertainty_margin": 0.0017060637474060059,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.05106712877750397,
+ "bank_size_bytes": 5830678,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.7842500000000001,
+ "average_precision": 0.7352563715081358,
+ "precision": 0.5929203539823009,
+ "recall": 0.8375,
+ "f1": 0.694300518134715,
+ "confusion_matrix": [
+ [
+ 54,
+ 46
+ ],
+ [
+ 13,
+ 67
+ ]
+ ],
+ "n_images": 180,
+ "pixel_auroc_64": 0.914610843350704,
+ "pixel_average_precision_64": 0.036729612921036846,
+ "pixel_f1_64": 0.08551020408163265,
+ "pixel_threshold": 0.04263307899236679,
+ "latency_median_ms": 38.40279999712948,
+ "latency_p95_ms": 42.41142502578441,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.15555555555555556
+ },
+ "fit_and_evaluation_seconds": 15.296049700002186
+ },
+ "pcb3": {
+ "category": "pcb3",
+ "available": true,
+ "model_id": "dinov3-normal-bank-pcb3-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "f291efa19669dbc601086ec5f5b7a8f5e8ae107d0476c65563e911958ed089e6",
+ "threshold": 0.04104718565940857,
+ "uncertainty_margin": 0.0020523592829704285,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.05669708549976349,
+ "bank_size_bytes": 5822961,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.8034653465346534,
+ "average_precision": 0.7836195407829445,
+ "precision": 0.6931818181818182,
+ "recall": 0.7625,
+ "f1": 0.7261904761904762,
+ "confusion_matrix": [
+ [
+ 74,
+ 27
+ ],
+ [
+ 19,
+ 61
+ ]
+ ],
+ "n_images": 181,
+ "pixel_auroc_64": 0.9392880496970388,
+ "pixel_average_precision_64": 0.14389241178306048,
+ "pixel_f1_64": 0.1905079470934756,
+ "pixel_threshold": 0.054352011531591415,
+ "latency_median_ms": 41.84810002334416,
+ "latency_p95_ms": 45.29579999507405,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.11602209944751381
+ },
+ "fit_and_evaluation_seconds": 16.930150200001663
+ },
+ "pcb4": {
+ "category": "pcb4",
+ "available": true,
+ "model_id": "dinov3-normal-bank-pcb4-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "b92668a5dd7740e5f966feaf6ee360655ecbeb0103943a2a9ba9c898a7ec439a",
+ "threshold": 0.043793290853500366,
+ "uncertainty_margin": 0.0021896645426750182,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.045600999146699905,
+ "bank_size_bytes": 5825074,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.9326732673267326,
+ "average_precision": 0.907221287906644,
+ "precision": 0.8461538461538461,
+ "recall": 0.825,
+ "f1": 0.8354430379746836,
+ "confusion_matrix": [
+ [
+ 89,
+ 12
+ ],
+ [
+ 14,
+ 66
+ ]
+ ],
+ "n_images": 181,
+ "pixel_auroc_64": 0.9642022029108047,
+ "pixel_average_precision_64": 0.2560012959647235,
+ "pixel_f1_64": 0.3499251497005988,
+ "pixel_threshold": 0.042218707501888275,
+ "latency_median_ms": 42.51339999609627,
+ "latency_p95_ms": 46.933599980548024,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.09392265193370165
+ },
+ "fit_and_evaluation_seconds": 17.002736900001764
+ },
+ "pipe_fryum": {
+ "category": "pipe_fryum",
+ "available": true,
+ "model_id": "dinov3-normal-bank-pipe_fryum-v1",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch bank",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "bank_sha256": "eed6f4f89764e14ca8811cc7d4aef3cf9266c9ae2d432595afc94bdfeca8156a",
+ "threshold": 0.05846443772315979,
+ "uncertainty_margin": 0.0029232218861579896,
+ "uncertainty_policy": "Fixed \u00b15% of validated threshold. Operational review band, not calibrated confidence.",
+ "heatmap_scale": 0.12200922518968582,
+ "bank_size_bytes": 5829726,
+ "encoder_size_bytes": 86406384,
+ "calibration": {
+ "method": "Max F1 on separate validation identities",
+ "normal": 32,
+ "anomalous": 20,
+ "seed": 42
+ },
+ "train_normal_count": 64,
+ "metrics": {
+ "image_auroc": 0.95425,
+ "average_precision": 0.9740168127563904,
+ "precision": 0.9577464788732394,
+ "recall": 0.85,
+ "f1": 0.9006622516556292,
+ "confusion_matrix": [
+ [
+ 47,
+ 3
+ ],
+ [
+ 12,
+ 68
+ ]
+ ],
+ "n_images": 130,
+ "pixel_auroc_64": 0.9918675784453588,
+ "pixel_average_precision_64": 0.575045773003843,
+ "pixel_f1_64": 0.5497345487328459,
+ "pixel_threshold": 0.10162080824375153,
+ "latency_median_ms": 39.761749998433515,
+ "latency_p95_ms": 43.10778999642935,
+ "peak_gpu_mb": 75.25634765625,
+ "uncertain_fraction": 0.06153846153846154
+ },
+ "fit_and_evaluation_seconds": 12.410172900010366
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/highres_comparison.csv b/results/highres_comparison.csv
new file mode 100644
index 0000000000000000000000000000000000000000..8c68696a7fdb26eef5ec8f3cfcfa6d5825e1eac0
--- /dev/null
+++ b/results/highres_comparison.csv
@@ -0,0 +1,13 @@
+category,old_image_auroc,new_image_auroc,auroc_change_pp,old_image_ap,new_image_ap,old_pixel_ap,new_pixel_ap
+pcb1,0.8795000000000001,0.9502333333333333,7.07333333333332,0.8549151631883652,0.948655961686033,0.7583862097257025,0.8491111001307164
+capsules,0.8163888888888889,0.9693333333333333,15.294444444444434,0.8957998725471622,0.97732661480396,0.06181241509569846,0.4010579259676235
+cashew,0.9691333333333333,0.9607333333333333,-0.8399999999999963,0.985662433507433,0.982279413610287,0.9049601544630095,0.6948247304533451
+candle,0.9165666666666666,0.9512333333333333,3.4666666666666623,0.9138528565787077,0.9554014178319198,0.1921277625144918,0.3331732955140976
+chewinggum,0.961,0.9913333333333334,3.0333333333333434,0.9850250587158236,0.996134962249878,0.6278468585656265,0.679155242456844
+fryum,0.8994,0.9914,9.199999999999998,0.9509899251906617,0.9959270031958876,0.37631552952863623,0.4384523914437251
+macaroni1,0.8207333333333334,0.9119,9.116666666666662,0.7977119004087658,0.9259090797274542,0.0015462985385290267,0.2206642900372537
+macaroni2,0.4827333333333333,0.8319666666666667,34.923333333333346,0.48363015395566816,0.8328392735621254,0.0022423845651259977,0.15426707901549405
+pcb2,0.7951333333333332,0.9258000000000001,13.066666666666682,0.7906713476028439,0.9314983779220555,0.041348433544105265,0.27294552494820906
+pcb3,0.7983498349834983,0.9459075907590759,14.755775577557761,0.812432005283877,0.9584040738379184,0.1366654433393344,0.3359990895034973
+pcb4,0.9367986798679868,0.9899009900990099,5.3102310231023075,0.9332718480899257,0.9898056419361693,0.2913028924219848,0.3048492361600459
+pipe_fryum,0.9703333333333332,0.9958666666666667,2.553333333333352,0.9861872005862442,0.9980742455507885,0.6010130573962768,0.48152551871729193
diff --git a/results/highres_comparison.json b/results/highres_comparison.json
new file mode 100644
index 0000000000000000000000000000000000000000..099a48fbcf8cc02d8a4b83a4ed030e9ad6ec520d
--- /dev/null
+++ b/results/highres_comparison.json
@@ -0,0 +1,159 @@
+{
+ "status": "passed",
+ "same_official_test_identities_and_content_hashes": true,
+ "baseline_macro": {
+ "auroc": 0.8538392280894755,
+ "au_pr": 0.8646743814043232,
+ "average_precision": 0.8658458138046231,
+ "pixel_auroc": 0.9296270879250635,
+ "pixel_au_pr": 0.33294457605927946,
+ "pixel_average_precision": 0.33296395330821005
+ },
+ "candidate_macro": {
+ "auroc": 0.9513007150715072,
+ "au_pr": 0.9574430219630145,
+ "average_precision": 0.9576880054928729,
+ "pixel_auroc": 0.98601533539939,
+ "pixel_au_pr": 0.430425562577637,
+ "pixel_average_precision": 0.4305021186956786
+ },
+ "candidate_macro_std": {
+ "auroc": 0.0006340525331026325,
+ "au_pr": 0.001187407008430423,
+ "average_precision": 0.0011738824455153193,
+ "pixel_auroc": 9.486068335903378e-05,
+ "pixel_au_pr": 0.0018632748640743098,
+ "pixel_average_precision": 0.0018624885601874065
+ },
+ "all_categories": [
+ {
+ "category": "pcb1",
+ "old_image_auroc": 0.8795000000000001,
+ "new_image_auroc": 0.9502333333333333,
+ "auroc_change_pp": 7.07333333333332,
+ "old_image_ap": 0.8549151631883652,
+ "new_image_ap": 0.948655961686033,
+ "old_pixel_ap": 0.7583862097257025,
+ "new_pixel_ap": 0.8491111001307164
+ },
+ {
+ "category": "capsules",
+ "old_image_auroc": 0.8163888888888889,
+ "new_image_auroc": 0.9693333333333333,
+ "auroc_change_pp": 15.294444444444434,
+ "old_image_ap": 0.8957998725471622,
+ "new_image_ap": 0.97732661480396,
+ "old_pixel_ap": 0.06181241509569846,
+ "new_pixel_ap": 0.4010579259676235
+ },
+ {
+ "category": "cashew",
+ "old_image_auroc": 0.9691333333333333,
+ "new_image_auroc": 0.9607333333333333,
+ "auroc_change_pp": -0.8399999999999963,
+ "old_image_ap": 0.985662433507433,
+ "new_image_ap": 0.982279413610287,
+ "old_pixel_ap": 0.9049601544630095,
+ "new_pixel_ap": 0.6948247304533451
+ },
+ {
+ "category": "candle",
+ "old_image_auroc": 0.9165666666666666,
+ "new_image_auroc": 0.9512333333333333,
+ "auroc_change_pp": 3.4666666666666623,
+ "old_image_ap": 0.9138528565787077,
+ "new_image_ap": 0.9554014178319198,
+ "old_pixel_ap": 0.1921277625144918,
+ "new_pixel_ap": 0.3331732955140976
+ },
+ {
+ "category": "chewinggum",
+ "old_image_auroc": 0.961,
+ "new_image_auroc": 0.9913333333333334,
+ "auroc_change_pp": 3.0333333333333434,
+ "old_image_ap": 0.9850250587158236,
+ "new_image_ap": 0.996134962249878,
+ "old_pixel_ap": 0.6278468585656265,
+ "new_pixel_ap": 0.679155242456844
+ },
+ {
+ "category": "fryum",
+ "old_image_auroc": 0.8994,
+ "new_image_auroc": 0.9914,
+ "auroc_change_pp": 9.199999999999998,
+ "old_image_ap": 0.9509899251906617,
+ "new_image_ap": 0.9959270031958876,
+ "old_pixel_ap": 0.37631552952863623,
+ "new_pixel_ap": 0.4384523914437251
+ },
+ {
+ "category": "macaroni1",
+ "old_image_auroc": 0.8207333333333334,
+ "new_image_auroc": 0.9119,
+ "auroc_change_pp": 9.116666666666662,
+ "old_image_ap": 0.7977119004087658,
+ "new_image_ap": 0.9259090797274542,
+ "old_pixel_ap": 0.0015462985385290267,
+ "new_pixel_ap": 0.2206642900372537
+ },
+ {
+ "category": "macaroni2",
+ "old_image_auroc": 0.4827333333333333,
+ "new_image_auroc": 0.8319666666666667,
+ "auroc_change_pp": 34.923333333333346,
+ "old_image_ap": 0.48363015395566816,
+ "new_image_ap": 0.8328392735621254,
+ "old_pixel_ap": 0.0022423845651259977,
+ "new_pixel_ap": 0.15426707901549405
+ },
+ {
+ "category": "pcb2",
+ "old_image_auroc": 0.7951333333333332,
+ "new_image_auroc": 0.9258000000000001,
+ "auroc_change_pp": 13.066666666666682,
+ "old_image_ap": 0.7906713476028439,
+ "new_image_ap": 0.9314983779220555,
+ "old_pixel_ap": 0.041348433544105265,
+ "new_pixel_ap": 0.27294552494820906
+ },
+ {
+ "category": "pcb3",
+ "old_image_auroc": 0.7983498349834983,
+ "new_image_auroc": 0.9459075907590759,
+ "auroc_change_pp": 14.755775577557761,
+ "old_image_ap": 0.812432005283877,
+ "new_image_ap": 0.9584040738379184,
+ "old_pixel_ap": 0.1366654433393344,
+ "new_pixel_ap": 0.3359990895034973
+ },
+ {
+ "category": "pcb4",
+ "old_image_auroc": 0.9367986798679868,
+ "new_image_auroc": 0.9899009900990099,
+ "auroc_change_pp": 5.3102310231023075,
+ "old_image_ap": 0.9332718480899257,
+ "new_image_ap": 0.9898056419361693,
+ "old_pixel_ap": 0.2913028924219848,
+ "new_pixel_ap": 0.3048492361600459
+ },
+ {
+ "category": "pipe_fryum",
+ "old_image_auroc": 0.9703333333333332,
+ "new_image_auroc": 0.9958666666666667,
+ "auroc_change_pp": 2.553333333333352,
+ "old_image_ap": 0.9861872005862442,
+ "new_image_ap": 0.9980742455507885,
+ "old_pixel_ap": 0.6010130573962768,
+ "new_pixel_ap": 0.48152551871729193
+ }
+ ],
+ "image_auroc_regressions": [
+ "cashew"
+ ],
+ "pixel_ap_regressions": [
+ "cashew",
+ "pipe_fryum"
+ ],
+ "metric_definitions": "Image mAP=unweighted mean of12 category image APs, averaged over3 seeds. Pixel mAP analogous. AU-PR trapezoidal, AP non-interpolated. Seed SD is bank variability, not a generalization confidence interval.",
+ "exposure": "Retrospective model development comparison; not an untouched external test."
+}
\ No newline at end of file
diff --git a/results/highres_deployment_evaluation.json b/results/highres_deployment_evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..e1aaa7224287a873e09cc540a70bc3736f12b518
--- /dev/null
+++ b/results/highres_deployment_evaluation.json
@@ -0,0 +1,594 @@
+{
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "protocol": "Official VisA test assignments; operational bank fitted on official training normals excluding a content-grouped 10% normal calibration holdout. Threshold=max heldout normal score. Retrospective development evaluation; not an untouched external test.",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "device": "cuda",
+ "categories": {
+ "pcb1": {
+ "category": "pcb1",
+ "available": true,
+ "model_id": "dinov2-highres-pcb1-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "14e71cb6285f22e3d12d2b0d6357c552a26685a8f03a9b626a3e8999e8a89c65",
+ "threshold": 0.16181933879852295,
+ "uncertainty_margin": 0.008090966939926147,
+ "heatmap_scale": 0.10316987216472613,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23237446,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9597,
+ "average_precision": 0.9564653221826244,
+ "precision": 0.9512195121951219,
+ "recall": 0.78,
+ "f1": 0.8571428571428571,
+ "confusion_matrix": [
+ [
+ 96,
+ 4
+ ],
+ [
+ 22,
+ 78
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9946015614062951,
+ "pixel_average_precision_224": 0.8562862818777615,
+ "uncertain_fraction": 0.075,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "capsules": {
+ "category": "capsules",
+ "available": true,
+ "model_id": "dinov2-highres-capsules-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "fa34f8c1a203e609450e57156d5f75ca157140d88d07d0bf46947c3029675c55",
+ "threshold": 0.19718621671199799,
+ "uncertainty_margin": 0.0098593108355999,
+ "heatmap_scale": 0.1274158811569204,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 22108790,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 55,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 487,
+ "metrics": {
+ "image_auroc": 0.9683333333333333,
+ "average_precision": 0.9798232872953215,
+ "precision": 1.0,
+ "recall": 0.48,
+ "f1": 0.6486486486486487,
+ "confusion_matrix": [
+ [
+ 60,
+ 0
+ ],
+ [
+ 52,
+ 48
+ ]
+ ],
+ "n_images": 160,
+ "pixel_auroc_224": 0.9704973188279925,
+ "pixel_average_precision_224": 0.403655563796705,
+ "uncertain_fraction": 0.10625,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "cashew": {
+ "category": "cashew",
+ "available": true,
+ "model_id": "dinov2-highres-cashew-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "4b908b22f79158fb46c0e591610d5c9470d588d4f0d017dd0bb493a58e64c693",
+ "threshold": 0.13224798440933228,
+ "uncertainty_margin": 0.006612399220466614,
+ "heatmap_scale": 0.10505769878625872,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18366576,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9608000000000001,
+ "average_precision": 0.9817707260519815,
+ "precision": 0.9263157894736842,
+ "recall": 0.88,
+ "f1": 0.9025641025641026,
+ "confusion_matrix": [
+ [
+ 43,
+ 7
+ ],
+ [
+ 12,
+ 88
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9960830910862268,
+ "pixel_average_precision_224": 0.7034966403298871,
+ "uncertain_fraction": 0.08,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "candle": {
+ "category": "candle",
+ "available": true,
+ "model_id": "dinov2-highres-candle-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "bb6767014719520899e8d2336ea2811ae8dadabb210a8855f7497f2ac48ab7ad",
+ "threshold": 0.22504067420959473,
+ "uncertainty_margin": 0.011252033710479737,
+ "heatmap_scale": 0.1193666505813595,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23244689,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9410000000000001,
+ "average_precision": 0.9459465742669609,
+ "precision": 1.0,
+ "recall": 0.48,
+ "f1": 0.6486486486486487,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 52,
+ 48
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9911336061961822,
+ "pixel_average_precision_224": 0.33767271945011856,
+ "uncertain_fraction": 0.035,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "chewinggum": {
+ "category": "chewinggum",
+ "available": true,
+ "model_id": "dinov2-highres-chewinggum-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "37165883dcc6304f60346c2052c7fa4151d4048b44fdb80a4f60ffc48477ed7d",
+ "threshold": 0.1614319533109665,
+ "uncertainty_margin": 0.008071597665548325,
+ "heatmap_scale": 0.11275605440139722,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18458527,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 46,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 407,
+ "metrics": {
+ "image_auroc": 0.9885999999999999,
+ "average_precision": 0.9944721280040146,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9952665200400623,
+ "pixel_average_precision_224": 0.6597053568827396,
+ "uncertain_fraction": 0.0,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "fryum": {
+ "category": "fryum",
+ "available": true,
+ "model_id": "dinov2-highres-fryum-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "ca73c0cd2b2e75d80874f7dd6270f09b13c55292fa93b1da1eeef361d8375ba4",
+ "threshold": 0.15253151953220367,
+ "uncertainty_margin": 0.007626575976610184,
+ "heatmap_scale": 0.10057919770479187,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18381371,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9924,
+ "average_precision": 0.9963591766254614,
+ "precision": 1.0,
+ "recall": 0.88,
+ "f1": 0.9361702127659575,
+ "confusion_matrix": [
+ [
+ 50,
+ 0
+ ],
+ [
+ 12,
+ 88
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9735429349543053,
+ "pixel_average_precision_224": 0.4360142987071739,
+ "uncertain_fraction": 0.02666666666666667,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "macaroni1": {
+ "category": "macaroni1",
+ "available": true,
+ "model_id": "dinov2-highres-macaroni1-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "28ebf491e124df62266c5c3b72ea5bfebb50ef93c189d5615d3ae866e8675432",
+ "threshold": 0.21722275018692017,
+ "uncertainty_margin": 0.01086113750934601,
+ "heatmap_scale": 0.09929629743099211,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23251984,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.909,
+ "average_precision": 0.9254645749095916,
+ "precision": 1.0,
+ "recall": 0.15,
+ "f1": 0.2608695652173913,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 85,
+ 15
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9932559185087934,
+ "pixel_average_precision_224": 0.22125282869927704,
+ "uncertain_fraction": 0.005,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "macaroni2": {
+ "category": "macaroni2",
+ "available": true,
+ "model_id": "dinov2-highres-macaroni2-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "8dfe4f82ece83668ea4a97c18ef134ab16bea8ab6d2913959eb810942537737a",
+ "threshold": 0.15817631781101227,
+ "uncertainty_margin": 0.007908815890550614,
+ "heatmap_scale": 0.11770220518112187,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23243554,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.845,
+ "average_precision": 0.8446602099722114,
+ "precision": 0.8928571428571429,
+ "recall": 0.25,
+ "f1": 0.390625,
+ "confusion_matrix": [
+ [
+ 97,
+ 3
+ ],
+ [
+ 75,
+ 25
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9942242061289198,
+ "pixel_average_precision_224": 0.15769057747120718,
+ "uncertain_fraction": 0.12,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "pcb2": {
+ "category": "pcb2",
+ "available": true,
+ "model_id": "dinov2-highres-pcb2-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "694689b6703e399ea4076343a40ddff6a920f67c0c344048f0b2ef6402f3abb8",
+ "threshold": 0.341839998960495,
+ "uncertainty_margin": 0.01709199994802475,
+ "heatmap_scale": 0.09851976394653338,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23253151,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9062,
+ "average_precision": 0.9098166487308751,
+ "precision": 1.0,
+ "recall": 0.01,
+ "f1": 0.019801980198019802,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 99,
+ 1
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9714470671684394,
+ "pixel_average_precision_224": 0.26303790724220233,
+ "uncertain_fraction": 0.005,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "pcb3": {
+ "category": "pcb3",
+ "available": true,
+ "model_id": "dinov2-highres-pcb3-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "704ee7d0827ede2b0a795a0efae8eb524751d2d1cb054cf7278c22888550a44c",
+ "threshold": 0.16282716393470764,
+ "uncertainty_margin": 0.008141358196735383,
+ "heatmap_scale": 0.1029075479507446,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23242572,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 814,
+ "metrics": {
+ "image_auroc": 0.9547524752475247,
+ "average_precision": 0.9645187368797429,
+ "precision": 0.9857142857142858,
+ "recall": 0.69,
+ "f1": 0.8117647058823529,
+ "confusion_matrix": [
+ [
+ 100,
+ 1
+ ],
+ [
+ 31,
+ 69
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9805302802001331,
+ "pixel_average_precision_224": 0.33774957148695994,
+ "uncertain_fraction": 0.05472636815920398,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "pcb4": {
+ "category": "pcb4",
+ "available": true,
+ "model_id": "dinov2-highres-pcb4-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "8847deec2a0b8daab9139e7680d502352161e994bb5d2fe4bc313df6af4cc5d5",
+ "threshold": 0.17516569793224335,
+ "uncertainty_margin": 0.008758284896612168,
+ "heatmap_scale": 0.10422959923744202,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23248613,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9865346534653465,
+ "average_precision": 0.9822685098306626,
+ "precision": 0.9855072463768116,
+ "recall": 0.68,
+ "f1": 0.8047337278106509,
+ "confusion_matrix": [
+ [
+ 100,
+ 1
+ ],
+ [
+ 32,
+ 68
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9806894408642699,
+ "pixel_average_precision_224": 0.3216614985757051,
+ "uncertain_fraction": 0.11442786069651742,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ },
+ "pipe_fryum": {
+ "category": "pipe_fryum",
+ "available": true,
+ "model_id": "dinov2-highres-pipe_fryum-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "e28bf35ca2e553dd21821230f34682b94b11a5d203459f61049a774663c0d819",
+ "threshold": 0.18373285233974457,
+ "uncertainty_margin": 0.009186642616987229,
+ "heatmap_scale": 0.1333938717842105,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18401041,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Maximum heldout normal score; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9891999999999999,
+ "average_precision": 0.9951337553868363,
+ "precision": 0.98989898989899,
+ "recall": 0.98,
+ "f1": 0.9849246231155779,
+ "confusion_matrix": [
+ [
+ 49,
+ 1
+ ],
+ [
+ 2,
+ 98
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9927315263511816,
+ "pixel_average_precision_224": 0.47984772131593945,
+ "uncertain_fraction": 0.013333333333333334,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail"
+ }
+ },
+ "macro_mean": {
+ "image_auroc": 0.950126705170517,
+ "average_precision": 0.956391637511357,
+ "precision": 0.9759254002708942,
+ "recall": 0.6016666666666666,
+ "f1": 0.6862992534742647,
+ "pixel_auroc_224": 0.9861669559777334,
+ "pixel_average_precision_224": 0.4315059138196397
+ }
+}
\ No newline at end of file
diff --git a/results/highres_evaluation.json b/results/highres_evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..51da1e1012647ffcb92691f733edceb99194a741
--- /dev/null
+++ b/results/highres_evaluation.json
@@ -0,0 +1,798 @@
+{
+ "protocol": {
+ "schema": 1,
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "resolution": "short edge448; bicubic; retain aspect; crop trailing pixels to patch multiple14",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "split_csv_sha256": "a48557e6033318cb90556f706196bc9d247a776a23ea51aecee5a80dd0332995",
+ "seeds": [
+ 42,
+ 43,
+ 44
+ ],
+ "bank_patches": 32768,
+ "memory_sampling": "per train normal: up to48 PCA foreground +16 other patches, seeded uniform cap",
+ "foreground": "PCA first component threshold10; center-sign rule; 2D3x3 dilation/closing; <1% mask falls back to all patches",
+ "score": "mean of top1% foreground cosine distances",
+ "fit": "all official training normals for benchmark",
+ "calibration": "separate deployment bank excludes every tenth content-hash-sorted training normal; maximum heldout normal score",
+ "evaluation": "full official test; masks only for pixel metrics at224x224; image AP and trapezoidal AU-PR separately",
+ "selection": "one fixed candidate; no test-based hyperparameter changes; seeds42/43/44 all reported; deployment seed42 fixed",
+ "exposure": "retrospective development comparison; official test identities and earlier results already seen; not an untouched external test",
+ "references": [
+ "https://arxiv.org/html/2405.14529v2",
+ "https://github.com/dammsi/AnomalyDINO"
+ ],
+ "differences_from_paper": "HF encoder; image-balanced limited full-data memory; masking train and test; 2D morphology; no rotation augmentation"
+ },
+ "python": "3.12.4",
+ "torch": "2.8.0+cu126",
+ "device": "cuda",
+ "categories": {
+ "macaroni2": {
+ "official_train_normals": 900,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.8447,
+ "au_pr": 0.837609437596522,
+ "average_precision": 0.8387483523714999,
+ "pixel_auroc": 0.9939494150699683,
+ "pixel_au_pr": 0.15619858519387228,
+ "pixel_average_precision": 0.15653869576515458
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8244,
+ "au_pr": 0.8342875038001054,
+ "average_precision": 0.835288930423173,
+ "pixel_auroc": 0.9941328078917665,
+ "pixel_au_pr": 0.15365590865968637,
+ "pixel_average_precision": 0.15385826448902645
+ },
+ {
+ "seed": 44,
+ "auroc": 0.8268000000000001,
+ "au_pr": 0.82322819785278,
+ "average_precision": 0.8244805378917035,
+ "pixel_auroc": 0.9932291868085448,
+ "pixel_au_pr": 0.1521970939306702,
+ "pixel_average_precision": 0.15240427679230106
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.8319666666666667,
+ "au_pr": 0.8317083797498025,
+ "average_precision": 0.8328392735621254,
+ "pixel_auroc": 0.9937704699234265,
+ "pixel_au_pr": 0.1540171959280763,
+ "pixel_average_precision": 0.15426707901549405
+ },
+ "benchmark_std": {
+ "auroc": 0.01109248995191489,
+ "au_pr": 0.007529536824525402,
+ "average_precision": 0.0074426639424422444,
+ "pixel_auroc": 0.0004776492328203173,
+ "pixel_au_pr": 0.002025062826209623,
+ "pixel_average_precision": 0.002097308286485555
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.15817631781101227,
+ "heatmap_scale": 0.11770220518112187,
+ "auroc": 0.845,
+ "au_pr": 0.8435705368551327,
+ "average_precision": 0.8446602099722114,
+ "pixel_auroc": 0.9942242061289198,
+ "pixel_au_pr": 0.15741764917137446,
+ "pixel_average_precision": 0.15769057747120718
+ },
+ "seconds": 135.40084509999724
+ },
+ "macaroni1": {
+ "official_train_normals": 900,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.918,
+ "au_pr": 0.932786840237027,
+ "average_precision": 0.933081657808966,
+ "pixel_auroc": 0.9931323622243489,
+ "pixel_au_pr": 0.22549630696338402,
+ "pixel_average_precision": 0.22579868648536688
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9107,
+ "au_pr": 0.9239509925163285,
+ "average_precision": 0.9243019415241156,
+ "pixel_auroc": 0.992904762589421,
+ "pixel_au_pr": 0.21863043402124735,
+ "pixel_average_precision": 0.2188116322733481
+ },
+ {
+ "seed": 44,
+ "auroc": 0.907,
+ "au_pr": 0.9199703014532423,
+ "average_precision": 0.920343639849281,
+ "pixel_auroc": 0.9928691842690383,
+ "pixel_au_pr": 0.21706041388603783,
+ "pixel_average_precision": 0.21738255135304616
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9119,
+ "au_pr": 0.925569378068866,
+ "average_precision": 0.9259090797274542,
+ "pixel_auroc": 0.9929687696942694,
+ "pixel_au_pr": 0.22039571829022306,
+ "pixel_average_precision": 0.2206642900372537
+ },
+ "benchmark_std": {
+ "auroc": 0.005597320787662625,
+ "au_pr": 0.006559748123713314,
+ "average_precision": 0.006519313252850117,
+ "pixel_auroc": 0.00014278774857695058,
+ "pixel_au_pr": 0.00448645120510902,
+ "pixel_average_precision": 0.004503563948029452
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.21722275018692017,
+ "heatmap_scale": 0.09929629743099211,
+ "auroc": 0.909,
+ "au_pr": 0.9251309284382584,
+ "average_precision": 0.9254645749095916,
+ "pixel_auroc": 0.9932559185087934,
+ "pixel_au_pr": 0.22101242411741848,
+ "pixel_average_precision": 0.22125282869927704
+ },
+ "seconds": 138.32114929999807
+ },
+ "pcb1": {
+ "official_train_normals": 904,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9525,
+ "au_pr": 0.946087107136921,
+ "average_precision": 0.9464671661037876,
+ "pixel_auroc": 0.9944586387417026,
+ "pixel_au_pr": 0.8464118976709029,
+ "pixel_average_precision": 0.846427424617724
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9479,
+ "au_pr": 0.9476376952747854,
+ "average_precision": 0.9479555666854507,
+ "pixel_auroc": 0.9944482838147902,
+ "pixel_au_pr": 0.8531528892315858,
+ "pixel_average_precision": 0.8531825227347262
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9503,
+ "au_pr": 0.9512781827394374,
+ "average_precision": 0.9515451522688605,
+ "pixel_auroc": 0.994454625316606,
+ "pixel_au_pr": 0.8477368705549233,
+ "pixel_average_precision": 0.8477233530396995
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9502333333333333,
+ "au_pr": 0.9483343283837146,
+ "average_precision": 0.948655961686033,
+ "pixel_auroc": 0.994453849291033,
+ "pixel_au_pr": 0.8491005524858041,
+ "pixel_average_precision": 0.8491111001307164
+ },
+ "benchmark_std": {
+ "auroc": 0.0023007245235650113,
+ "au_pr": 0.002664730707614299,
+ "average_precision": 0.0026104407177330187,
+ "pixel_auroc": 5.220899310240183e-06,
+ "pixel_au_pr": 0.0035714091213073927,
+ "pixel_average_precision": 0.003584999181875953
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.16181933879852295,
+ "heatmap_scale": 0.10316987216472613,
+ "auroc": 0.9597,
+ "au_pr": 0.9561930064621866,
+ "average_precision": 0.9564653221826244,
+ "pixel_auroc": 0.9946015614062951,
+ "pixel_au_pr": 0.856268349620392,
+ "pixel_average_precision": 0.8562862818777615
+ },
+ "seconds": 130.61381800001254
+ },
+ "capsules": {
+ "official_train_normals": 542,
+ "official_test_images": 160,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.968,
+ "au_pr": 0.9763334548720008,
+ "average_precision": 0.976495652745956,
+ "pixel_auroc": 0.9694939889285102,
+ "pixel_au_pr": 0.40129786284523034,
+ "pixel_average_precision": 0.4012847974451588
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9686666666666668,
+ "au_pr": 0.9764671035244079,
+ "average_precision": 0.9766334139497022,
+ "pixel_auroc": 0.97044846089275,
+ "pixel_au_pr": 0.397617206547916,
+ "pixel_average_precision": 0.3976678565607239
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9713333333333333,
+ "au_pr": 0.9787056543871668,
+ "average_precision": 0.9788507777162221,
+ "pixel_auroc": 0.9701251715230256,
+ "pixel_au_pr": 0.4041945944570431,
+ "pixel_average_precision": 0.40422112389698794
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9693333333333333,
+ "au_pr": 0.9771687375945252,
+ "average_precision": 0.97732661480396,
+ "pixel_auroc": 0.9700225404480953,
+ "pixel_au_pr": 0.4010365546167298,
+ "pixel_average_precision": 0.4010579259676235
+ },
+ "benchmark_std": {
+ "auroc": 0.0017638342073763465,
+ "au_pr": 0.0013326854134417649,
+ "average_precision": 0.0013217598021768872,
+ "pixel_auroc": 0.00048544210343352004,
+ "pixel_au_pr": 0.003296470752106622,
+ "pixel_average_precision": 0.003282519032027932
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.19718621671199799,
+ "heatmap_scale": 0.1274158811569204,
+ "auroc": 0.9683333333333333,
+ "au_pr": 0.9797118272127361,
+ "average_precision": 0.9798232872953215,
+ "pixel_auroc": 0.9704973188279925,
+ "pixel_au_pr": 0.40366595976940756,
+ "pixel_average_precision": 0.403655563796705
+ },
+ "seconds": 94.91161680000369
+ },
+ "cashew": {
+ "official_train_normals": 450,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9555999999999999,
+ "au_pr": 0.9798344986141854,
+ "average_precision": 0.9799284257916656,
+ "pixel_auroc": 0.9960590367672582,
+ "pixel_au_pr": 0.6940909426916273,
+ "pixel_average_precision": 0.694126095923703
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9578000000000001,
+ "au_pr": 0.9809117646282322,
+ "average_precision": 0.9809999318079211,
+ "pixel_auroc": 0.9961226559982549,
+ "pixel_au_pr": 0.697751529343841,
+ "pixel_average_precision": 0.6978133678203721
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9688,
+ "au_pr": 0.9858445920160998,
+ "average_precision": 0.9859098832312743,
+ "pixel_auroc": 0.9961110128509749,
+ "pixel_au_pr": 0.6924916996495216,
+ "pixel_average_precision": 0.6925347276159604
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9607333333333333,
+ "au_pr": 0.9821969517528392,
+ "average_precision": 0.982279413610287,
+ "pixel_auroc": 0.9960975685388292,
+ "pixel_au_pr": 0.69477805722833,
+ "pixel_average_precision": 0.6948247304533451
+ },
+ "benchmark_std": {
+ "auroc": 0.0070720105580615155,
+ "au_pr": 0.0032045413297187,
+ "average_precision": 0.0031893986168871256,
+ "pixel_auroc": 3.387349679255494e-05,
+ "pixel_au_pr": 0.0026963951663697317,
+ "pixel_average_precision": 0.0027077810576954238
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.13224798440933228,
+ "heatmap_scale": 0.10505769878625872,
+ "auroc": 0.9608000000000001,
+ "au_pr": 0.9816829641673432,
+ "average_precision": 0.9817707260519815,
+ "pixel_auroc": 0.9960830910862268,
+ "pixel_au_pr": 0.703436397078779,
+ "pixel_average_precision": 0.7034966403298871
+ },
+ "seconds": 72.7265475000022
+ },
+ "candle": {
+ "official_train_normals": 900,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9558,
+ "au_pr": 0.9621606881772008,
+ "average_precision": 0.9623367827893016,
+ "pixel_auroc": 0.9903982538707946,
+ "pixel_au_pr": 0.33895358283555577,
+ "pixel_average_precision": 0.3389159342327367
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9536,
+ "au_pr": 0.9544234987148842,
+ "average_precision": 0.9546667684680096,
+ "pixel_auroc": 0.9908451687141144,
+ "pixel_au_pr": 0.3378197922542562,
+ "pixel_average_precision": 0.33783760689070347
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9443,
+ "au_pr": 0.9489440077401582,
+ "average_precision": 0.9492007022384481,
+ "pixel_auroc": 0.990951012382223,
+ "pixel_au_pr": 0.32271350806250704,
+ "pixel_average_precision": 0.32276634541885246
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9512333333333333,
+ "au_pr": 0.9551760648774144,
+ "average_precision": 0.9554014178319198,
+ "pixel_auroc": 0.9907314783223774,
+ "pixel_au_pr": 0.33316229438410633,
+ "pixel_average_precision": 0.3331732955140976
+ },
+ "benchmark_std": {
+ "auroc": 0.006104370019365886,
+ "au_pr": 0.00664040114115595,
+ "average_precision": 0.006598782866979933,
+ "pixel_auroc": 0.0002933932887254627,
+ "pixel_au_pr": 0.009066654397648078,
+ "pixel_average_precision": 0.009028795887483296
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.22504067420959473,
+ "heatmap_scale": 0.1193666505813595,
+ "auroc": 0.9410000000000001,
+ "au_pr": 0.9456741403322482,
+ "average_precision": 0.9459465742669609,
+ "pixel_auroc": 0.9911336061961822,
+ "pixel_au_pr": 0.3375717699673859,
+ "pixel_average_precision": 0.33767271945011856
+ },
+ "seconds": 129.0740725999931
+ },
+ "chewinggum": {
+ "official_train_normals": 453,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9932,
+ "au_pr": 0.9969466609199811,
+ "average_precision": 0.9969604682469676,
+ "pixel_auroc": 0.9954117320863656,
+ "pixel_au_pr": 0.6850700777255413,
+ "pixel_average_precision": 0.6850388759883876
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9892000000000001,
+ "au_pr": 0.9952337041797067,
+ "average_precision": 0.9952549042275805,
+ "pixel_auroc": 0.9953773487370392,
+ "pixel_au_pr": 0.6846896840964964,
+ "pixel_average_precision": 0.684733727423744
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9916,
+ "au_pr": 0.996171900969947,
+ "average_precision": 0.9961895142750861,
+ "pixel_auroc": 0.9952795650960506,
+ "pixel_au_pr": 0.6676922561430878,
+ "pixel_average_precision": 0.6676931239584004
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9913333333333334,
+ "au_pr": 0.9961174220232115,
+ "average_precision": 0.996134962249878,
+ "pixel_auroc": 0.9953562153064851,
+ "pixel_au_pr": 0.6791506726550418,
+ "pixel_average_precision": 0.679155242456844
+ },
+ "benchmark_std": {
+ "auroc": 0.002013289182738814,
+ "au_pr": 0.0008577768738086334,
+ "average_precision": 0.0008540896315069846,
+ "pixel_auroc": 6.85710926518182e-05,
+ "pixel_au_pr": 0.00992510234452624,
+ "pixel_average_precision": 0.009927658297196707
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.1614319533109665,
+ "heatmap_scale": 0.11275605440139722,
+ "auroc": 0.9885999999999999,
+ "au_pr": 0.994444649292763,
+ "average_precision": 0.9944721280040146,
+ "pixel_auroc": 0.9952665200400623,
+ "pixel_au_pr": 0.6596933281197321,
+ "pixel_average_precision": 0.6597053568827396
+ },
+ "seconds": 77.3525510999898
+ },
+ "fryum": {
+ "official_train_normals": 450,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9891999999999999,
+ "au_pr": 0.9949168165129106,
+ "average_precision": 0.9949409420549524,
+ "pixel_auroc": 0.9738082020921681,
+ "pixel_au_pr": 0.4379800592981127,
+ "pixel_average_precision": 0.43799433572118596
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9958,
+ "au_pr": 0.9978909116915007,
+ "average_precision": 0.997901515122974,
+ "pixel_auroc": 0.973882263507042,
+ "pixel_au_pr": 0.43803860398905753,
+ "pixel_average_precision": 0.4380513505278392
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9892,
+ "au_pr": 0.9949145081810289,
+ "average_precision": 0.9949385524097363,
+ "pixel_auroc": 0.9739487459423446,
+ "pixel_au_pr": 0.43927674150289875,
+ "pixel_average_precision": 0.43931148808215037
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9914,
+ "au_pr": 0.9959074121284801,
+ "average_precision": 0.9959270031958876,
+ "pixel_auroc": 0.9738797371805182,
+ "pixel_au_pr": 0.43843180159668965,
+ "pixel_average_precision": 0.4384523914437251
+ },
+ "benchmark_std": {
+ "auroc": 0.0038105117766515915,
+ "au_pr": 0.0017177613977139654,
+ "average_precision": 0.001709977906364863,
+ "pixel_auroc": 7.03059755631449e-05,
+ "pixel_au_pr": 0.0007323246916757177,
+ "pixel_average_precision": 0.000744545463796214
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.15253151953220367,
+ "heatmap_scale": 0.10057919770479187,
+ "auroc": 0.9924,
+ "au_pr": 0.9963414765677349,
+ "average_precision": 0.9963591766254614,
+ "pixel_auroc": 0.9735429349543053,
+ "pixel_au_pr": 0.4359936878538498,
+ "pixel_average_precision": 0.4360142987071739
+ },
+ "seconds": 75.21686919999775
+ },
+ "pcb2": {
+ "official_train_normals": 901,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9202,
+ "au_pr": 0.9322088542538738,
+ "average_precision": 0.932545698262865,
+ "pixel_auroc": 0.9712767185430914,
+ "pixel_au_pr": 0.26902216961670095,
+ "pixel_average_precision": 0.269116591248745
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9289000000000001,
+ "au_pr": 0.9329793541058563,
+ "average_precision": 0.9333614467676451,
+ "pixel_auroc": 0.9717626924423868,
+ "pixel_au_pr": 0.2798493987176048,
+ "pixel_average_precision": 0.27991198670004014
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9283,
+ "au_pr": 0.9280660798216491,
+ "average_precision": 0.9285879887356563,
+ "pixel_auroc": 0.9716170427305009,
+ "pixel_au_pr": 0.2697964905619438,
+ "pixel_average_precision": 0.2698079968958421
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9258000000000001,
+ "au_pr": 0.9310847627271265,
+ "average_precision": 0.9314983779220555,
+ "pixel_auroc": 0.9715521512386598,
+ "pixel_au_pr": 0.27288935296541655,
+ "pixel_average_precision": 0.27294552494820906
+ },
+ "benchmark_std": {
+ "auroc": 0.004859012245302549,
+ "au_pr": 0.0026424898047753827,
+ "average_precision": 0.0025532597435425006,
+ "pixel_auroc": 0.0002494009562614438,
+ "pixel_au_pr": 0.006039997589898184,
+ "pixel_average_precision": 0.006043029244261792
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.341839998960495,
+ "heatmap_scale": 0.09851976394653338,
+ "auroc": 0.9062,
+ "au_pr": 0.9091607663548358,
+ "average_precision": 0.9098166487308751,
+ "pixel_auroc": 0.9714470671684394,
+ "pixel_au_pr": 0.2629794270140921,
+ "pixel_average_precision": 0.26303790724220233
+ },
+ "seconds": 134.38419250000152
+ },
+ "pcb3": {
+ "official_train_normals": 905,
+ "official_test_images": 201,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9433663366336634,
+ "au_pr": 0.9573257944956892,
+ "average_precision": 0.9574934355764043,
+ "pixel_auroc": 0.9804594500562178,
+ "pixel_au_pr": 0.33440243549415977,
+ "pixel_average_precision": 0.33442549268444677
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9477227722772278,
+ "au_pr": 0.959595644345721,
+ "average_precision": 0.9597596806082674,
+ "pixel_auroc": 0.9805071690010876,
+ "pixel_au_pr": 0.33373335990639547,
+ "pixel_average_precision": 0.333819556432083
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9466336633663367,
+ "au_pr": 0.9577819308568531,
+ "average_precision": 0.9579591053290832,
+ "pixel_auroc": 0.9798799216744494,
+ "pixel_au_pr": 0.33973787538078626,
+ "pixel_average_precision": 0.3397522193939622
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9459075907590759,
+ "au_pr": 0.9582344565660877,
+ "average_precision": 0.9584040738379184,
+ "pixel_auroc": 0.9802821802439183,
+ "pixel_au_pr": 0.3359578902604472,
+ "pixel_average_precision": 0.3359990895034973
+ },
+ "benchmark_std": {
+ "auroc": 0.0022671609895175723,
+ "au_pr": 0.0012006828155516466,
+ "average_precision": 0.0011968560341587735,
+ "pixel_auroc": 0.00034918224748437215,
+ "pixel_au_pr": 0.0032906125824873787,
+ "pixel_average_precision": 0.003264395451918764
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.16282716393470764,
+ "heatmap_scale": 0.1029075479507446,
+ "auroc": 0.9547524752475247,
+ "au_pr": 0.9643689895252089,
+ "average_precision": 0.9645187368797429,
+ "pixel_auroc": 0.9805302802001331,
+ "pixel_au_pr": 0.3377368540626885,
+ "pixel_average_precision": 0.33774957148695994
+ },
+ "seconds": 135.53616119999788
+ },
+ "pcb4": {
+ "official_train_normals": 904,
+ "official_test_images": 201,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9888118811881188,
+ "au_pr": 0.9880168371253286,
+ "average_precision": 0.9880817605339174,
+ "pixel_auroc": 0.9797851572798281,
+ "pixel_au_pr": 0.2918409934178783,
+ "pixel_average_precision": 0.2918620534311465
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9905940594059406,
+ "au_pr": 0.9904921945653063,
+ "average_precision": 0.9905403726682713,
+ "pixel_auroc": 0.9800535279608199,
+ "pixel_au_pr": 0.3113890405329925,
+ "pixel_average_precision": 0.3114066877489506
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9902970297029704,
+ "au_pr": 0.9907507181331998,
+ "average_precision": 0.9907947926063193,
+ "pixel_auroc": 0.9811058153456667,
+ "pixel_au_pr": 0.3112462297344757,
+ "pixel_average_precision": 0.31127896730004057
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9899009900990099,
+ "au_pr": 0.9897532499412782,
+ "average_precision": 0.9898056419361693,
+ "pixel_auroc": 0.9803148335287716,
+ "pixel_au_pr": 0.3048254212284488,
+ "pixel_average_precision": 0.3048492361600459
+ },
+ "benchmark_std": {
+ "auroc": 0.0009548169070290293,
+ "au_pr": 0.0015093229307655532,
+ "average_precision": 0.001498334973559554,
+ "pixel_auroc": 0.0006980292841980381,
+ "pixel_au_pr": 0.011245071049441238,
+ "pixel_average_precision": 0.011247411460137574
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.17516569793224335,
+ "heatmap_scale": 0.10422959923744202,
+ "auroc": 0.9865346534653465,
+ "au_pr": 0.9821331587999459,
+ "average_precision": 0.9822685098306626,
+ "pixel_auroc": 0.9806894408642699,
+ "pixel_au_pr": 0.3216559666615416,
+ "pixel_average_precision": 0.3216614985757051
+ },
+ "seconds": 133.8244237000181
+ },
+ "pipe_fryum": {
+ "official_train_normals": 450,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.995,
+ "au_pr": 0.9977423374213756,
+ "average_precision": 0.9977526197670599,
+ "pixel_auroc": 0.9927515748074147,
+ "pixel_au_pr": 0.47981081512851037,
+ "pixel_average_precision": 0.4800110544187529
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9964000000000001,
+ "au_pr": 0.9982273652036702,
+ "average_precision": 0.9982361328885846,
+ "pixel_auroc": 0.992764142075617,
+ "pixel_au_pr": 0.4830566976570724,
+ "pixel_average_precision": 0.48318326819265506
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9962,
+ "au_pr": 0.9982256566034399,
+ "average_precision": 0.9982339839967207,
+ "pixel_auroc": 0.9927469763458546,
+ "pixel_au_pr": 0.481216205091409,
+ "pixel_average_precision": 0.48138223354046783
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9958666666666667,
+ "au_pr": 0.9980651197428285,
+ "average_precision": 0.9980742455507885,
+ "pixel_auroc": 0.9927542310762955,
+ "pixel_au_pr": 0.4813612392923306,
+ "pixel_average_precision": 0.48152551871729193
+ },
+ "benchmark_std": {
+ "auroc": 0.0007571877794400558,
+ "au_pr": 0.0002795389956885984,
+ "average_precision": 0.0002785381715372213,
+ "pixel_auroc": 8.885797254273498e-06,
+ "pixel_au_pr": 0.0016277943779494204,
+ "pixel_average_precision": 0.0015909534997154244
+ },
+ "deployment_holdout_profile": {
+ "threshold": 0.18373285233974457,
+ "heatmap_scale": 0.1333938717842105,
+ "auroc": 0.9891999999999999,
+ "au_pr": 0.9951107263654106,
+ "average_precision": 0.9951337553868363,
+ "pixel_auroc": 0.9927315263511816,
+ "pixel_au_pr": 0.47978917789024056,
+ "pixel_average_precision": 0.47984772131593945
+ },
+ "seconds": 71.54133030000958
+ }
+ },
+ "macro_mean": {
+ "auroc": 0.9513007150715072,
+ "au_pr": 0.9574430219630145,
+ "average_precision": 0.9576880054928729,
+ "pixel_auroc": 0.98601533539939,
+ "pixel_au_pr": 0.430425562577637,
+ "pixel_average_precision": 0.4305021186956786
+ },
+ "macro_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9520315181518151,
+ "au_pr": 0.9584974439469179,
+ "average_precision": 0.958736080171112,
+ "pixel_auroc": 0.9859153775389724,
+ "pixel_au_pr": 0.43004797740678957,
+ "pixel_average_precision": 0.4301283364968757
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9509736248624864,
+ "au_pr": 0.9576748110458753,
+ "average_precision": 0.9579083837618078,
+ "pixel_auroc": 0.9861041069687575,
+ "pixel_au_pr": 0.432448712079846,
+ "pixel_average_precision": 0.4325231523161844
+ },
+ {
+ "seed": 44,
+ "auroc": 0.95089700220022,
+ "au_pr": 0.9561568108962502,
+ "average_precision": 0.9564195525456993,
+ "pixel_auroc": 0.9860265216904399,
+ "pixel_au_pr": 0.4287799982462753,
+ "pixel_average_precision": 0.428854867273976
+ }
+ ],
+ "macro_std": {
+ "auroc": 0.0006340525331026325,
+ "au_pr": 0.001187407008430423,
+ "average_precision": 0.0011738824455153193,
+ "pixel_auroc": 9.486068335903378e-05,
+ "pixel_au_pr": 0.0018632748640743098,
+ "pixel_average_precision": 0.0018624885601874065
+ }
+}
\ No newline at end of file
diff --git a/results/macaroni_recall_deployment_evaluation.json b/results/macaroni_recall_deployment_evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..b48f07ac01dbbd1359484b8bbd76dd410bd49e76
--- /dev/null
+++ b/results/macaroni_recall_deployment_evaluation.json
@@ -0,0 +1,715 @@
+{
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "protocol": "Same frozen DINOv2 banks and official VisA assignments. Macaroni1/2 use the fixed linear 80th percentile of held-out training-normal scores; the other ten products retain their q95 policy. Higher recall with substantially more false alarms. Retrospective development evaluation, not independent validation.",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "device": "cuda",
+ "categories": {
+ "pcb1": {
+ "category": "pcb1",
+ "available": true,
+ "model_id": "dinov2-highres-pcb1-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "14e71cb6285f22e3d12d2b0d6357c552a26685a8f03a9b626a3e8999e8a89c65",
+ "threshold": 0.1414354294538498,
+ "uncertainty_margin": 0.00707177147269249,
+ "heatmap_scale": 0.10316987216472613,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23237446,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9597,
+ "average_precision": 0.9564653221826244,
+ "precision": 0.9148936170212766,
+ "recall": 0.86,
+ "f1": 0.8865979381443299,
+ "confusion_matrix": [
+ [
+ 92,
+ 8
+ ],
+ [
+ 14,
+ 86
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9946015614062951,
+ "pixel_average_precision_224": 0.8562862818777615,
+ "uncertain_fraction": 0.07,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.08
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.16181933879852295,
+ "decision_policy": "normal-q95-v1"
+ },
+ "capsules": {
+ "category": "capsules",
+ "available": true,
+ "model_id": "dinov2-highres-capsules-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "fa34f8c1a203e609450e57156d5f75ca157140d88d07d0bf46947c3029675c55",
+ "threshold": 0.1439922600984573,
+ "uncertainty_margin": 0.007199613004922866,
+ "heatmap_scale": 0.1274158811569204,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 22108790,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 55,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 487,
+ "metrics": {
+ "image_auroc": 0.9683333333333333,
+ "average_precision": 0.9798232872953215,
+ "precision": 0.9425287356321839,
+ "recall": 0.82,
+ "f1": 0.877005347593583,
+ "confusion_matrix": [
+ [
+ 55,
+ 5
+ ],
+ [
+ 18,
+ 82
+ ]
+ ],
+ "n_images": 160,
+ "pixel_auroc_224": 0.9704973188279925,
+ "pixel_average_precision_224": 0.403655563796705,
+ "uncertain_fraction": 0.0875,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.08333333333333333
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.19718621671199799,
+ "decision_policy": "normal-q95-v1"
+ },
+ "cashew": {
+ "category": "cashew",
+ "available": true,
+ "model_id": "dinov2-highres-cashew-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "4b908b22f79158fb46c0e591610d5c9470d588d4f0d017dd0bb493a58e64c693",
+ "threshold": 0.1289861112833023,
+ "uncertainty_margin": 0.006449305564165116,
+ "heatmap_scale": 0.10505769878625872,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18366576,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9608000000000001,
+ "average_precision": 0.9817707260519815,
+ "precision": 0.9090909090909091,
+ "recall": 0.9,
+ "f1": 0.9045226130653266,
+ "confusion_matrix": [
+ [
+ 41,
+ 9
+ ],
+ [
+ 10,
+ 90
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9960830910862268,
+ "pixel_average_precision_224": 0.7034966403298871,
+ "uncertain_fraction": 0.06,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.18
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.13224798440933228,
+ "decision_policy": "normal-q95-v1"
+ },
+ "candle": {
+ "category": "candle",
+ "available": true,
+ "model_id": "dinov2-highres-candle-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "bb6767014719520899e8d2336ea2811ae8dadabb210a8855f7497f2ac48ab7ad",
+ "threshold": 0.15027016177773475,
+ "uncertainty_margin": 0.007513508088886738,
+ "heatmap_scale": 0.1193666505813595,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23244689,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9410000000000001,
+ "average_precision": 0.9459465742669609,
+ "precision": 0.8787878787878788,
+ "recall": 0.87,
+ "f1": 0.8743718592964824,
+ "confusion_matrix": [
+ [
+ 88,
+ 12
+ ],
+ [
+ 13,
+ 87
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9911336061961822,
+ "pixel_average_precision_224": 0.33767271945011856,
+ "uncertain_fraction": 0.055,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.12
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.22504067420959473,
+ "decision_policy": "normal-q95-v1"
+ },
+ "chewinggum": {
+ "category": "chewinggum",
+ "available": true,
+ "model_id": "dinov2-highres-chewinggum-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "37165883dcc6304f60346c2052c7fa4151d4048b44fdb80a4f60ffc48477ed7d",
+ "threshold": 0.15658171474933624,
+ "uncertainty_margin": 0.007829085737466813,
+ "heatmap_scale": 0.11275605440139722,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18458527,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 46,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 407,
+ "metrics": {
+ "image_auroc": 0.9885999999999999,
+ "average_precision": 0.9944721280040146,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9952665200400623,
+ "pixel_average_precision_224": 0.6597053568827396,
+ "uncertain_fraction": 0.0,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.04
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.1614319533109665,
+ "decision_policy": "normal-q95-v1"
+ },
+ "fryum": {
+ "category": "fryum",
+ "available": true,
+ "model_id": "dinov2-highres-fryum-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "ca73c0cd2b2e75d80874f7dd6270f09b13c55292fa93b1da1eeef361d8375ba4",
+ "threshold": 0.13227128088474271,
+ "uncertainty_margin": 0.006613564044237136,
+ "heatmap_scale": 0.10057919770479187,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18381371,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9924,
+ "average_precision": 0.9963591766254614,
+ "precision": 0.9894736842105263,
+ "recall": 0.94,
+ "f1": 0.964102564102564,
+ "confusion_matrix": [
+ [
+ 49,
+ 1
+ ],
+ [
+ 6,
+ 94
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9735429349543053,
+ "pixel_average_precision_224": 0.4360142987071739,
+ "uncertain_fraction": 0.03333333333333333,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.02
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.15253151953220367,
+ "decision_policy": "normal-q95-v1"
+ },
+ "macaroni1": {
+ "category": "macaroni1",
+ "available": true,
+ "model_id": "dinov2-highres-macaroni1-v1-q80-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "28ebf491e124df62266c5c3b72ea5bfebb50ef93c189d5615d3ae866e8675432",
+ "threshold": 0.11047504395246506,
+ "uncertainty_margin": 0.0055237521976232535,
+ "heatmap_scale": 0.09929629743099211,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23251984,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 80th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q80-v1",
+ "quantile": 0.8,
+ "calibration_above_threshold": 18,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.909,
+ "average_precision": 0.9254645749095916,
+ "precision": 0.7798165137614679,
+ "recall": 0.85,
+ "f1": 0.8133971291866028,
+ "confusion_matrix": [
+ [
+ 76,
+ 24
+ ],
+ [
+ 15,
+ 85
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9932559185087934,
+ "pixel_average_precision_224": 0.22125282869927704,
+ "uncertain_fraction": 0.155,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.24
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.21722275018692017,
+ "decision_policy": "normal-q80-v1",
+ "previous_threshold": 0.14440965577960013,
+ "previous_model_id": "dinov2-highres-macaroni1-v1-q95-v1"
+ },
+ "macaroni2": {
+ "category": "macaroni2",
+ "available": true,
+ "model_id": "dinov2-highres-macaroni2-v1-q80-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "8dfe4f82ece83668ea4a97c18ef134ab16bea8ab6d2913959eb810942537737a",
+ "threshold": 0.12732562720775603,
+ "uncertainty_margin": 0.006366281360387802,
+ "heatmap_scale": 0.11770220518112187,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23243554,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 80th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q80-v1",
+ "quantile": 0.8,
+ "calibration_above_threshold": 18,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.845,
+ "average_precision": 0.8446602099722114,
+ "precision": 0.7407407407407407,
+ "recall": 0.8,
+ "f1": 0.7692307692307692,
+ "confusion_matrix": [
+ [
+ 72,
+ 28
+ ],
+ [
+ 20,
+ 80
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9942242061289198,
+ "pixel_average_precision_224": 0.15769057747120718,
+ "uncertain_fraction": 0.23,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.28
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.15817631781101227,
+ "decision_policy": "normal-q80-v1",
+ "previous_threshold": 0.144144269824028,
+ "previous_model_id": "dinov2-highres-macaroni2-v1-q95-v1"
+ },
+ "pcb2": {
+ "category": "pcb2",
+ "available": true,
+ "model_id": "dinov2-highres-pcb2-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "694689b6703e399ea4076343a40ddff6a920f67c0c344048f0b2ef6402f3abb8",
+ "threshold": 0.1252228133380413,
+ "uncertainty_margin": 0.006261140666902066,
+ "heatmap_scale": 0.09851976394653338,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23253151,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9062,
+ "average_precision": 0.9098166487308751,
+ "precision": 0.875,
+ "recall": 0.84,
+ "f1": 0.8571428571428572,
+ "confusion_matrix": [
+ [
+ 88,
+ 12
+ ],
+ [
+ 16,
+ 84
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9714470671684394,
+ "pixel_average_precision_224": 0.26303790724220233,
+ "uncertain_fraction": 0.09,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.12
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.341839998960495,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pcb3": {
+ "category": "pcb3",
+ "available": true,
+ "model_id": "dinov2-highres-pcb3-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "704ee7d0827ede2b0a795a0efae8eb524751d2d1cb054cf7278c22888550a44c",
+ "threshold": 0.1346755474805832,
+ "uncertainty_margin": 0.00673377737402916,
+ "heatmap_scale": 0.1029075479507446,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23242572,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 814,
+ "metrics": {
+ "image_auroc": 0.9547524752475247,
+ "average_precision": 0.9645187368797429,
+ "precision": 0.90625,
+ "recall": 0.87,
+ "f1": 0.8877551020408163,
+ "confusion_matrix": [
+ [
+ 92,
+ 9
+ ],
+ [
+ 13,
+ 87
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9805302802001331,
+ "pixel_average_precision_224": 0.33774957148695994,
+ "uncertain_fraction": 0.08955223880597014,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.0891089108910891
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.16282716393470764,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pcb4": {
+ "category": "pcb4",
+ "available": true,
+ "model_id": "dinov2-highres-pcb4-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "8847deec2a0b8daab9139e7680d502352161e994bb5d2fe4bc313df6af4cc5d5",
+ "threshold": 0.1401524841785431,
+ "uncertainty_margin": 0.007007624208927155,
+ "heatmap_scale": 0.10422959923744202,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23248613,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9865346534653465,
+ "average_precision": 0.9822685098306626,
+ "precision": 0.96,
+ "recall": 0.96,
+ "f1": 0.96,
+ "confusion_matrix": [
+ [
+ 97,
+ 4
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9806894408642699,
+ "pixel_average_precision_224": 0.3216614985757051,
+ "uncertain_fraction": 0.04477611940298507,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.039603960396039604
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.17516569793224335,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pipe_fryum": {
+ "category": "pipe_fryum",
+ "available": true,
+ "model_id": "dinov2-highres-pipe_fryum-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "e28bf35ca2e553dd21821230f34682b94b11a5d203459f61049a774663c0d819",
+ "threshold": 0.17671903371810913,
+ "uncertainty_margin": 0.008835951685905457,
+ "heatmap_scale": 0.1333938717842105,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18401041,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9891999999999999,
+ "average_precision": 0.9951337553868363,
+ "precision": 0.9801980198019802,
+ "recall": 0.99,
+ "f1": 0.9850746268656716,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 1,
+ 99
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9927315263511816,
+ "pixel_average_precision_224": 0.47984772131593945,
+ "uncertain_fraction": 0.013333333333333334,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.04
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.18373285233974457,
+ "decision_policy": "normal-q95-v1"
+ }
+ },
+ "macro_mean": {
+ "image_auroc": 0.950126705170517,
+ "average_precision": 0.956391637511357,
+ "precision": 0.9046976613151382,
+ "recall": 0.8883333333333333,
+ "f1": 0.895741481363831,
+ "pixel_auroc_224": 0.9861669559777334,
+ "pixel_average_precision_224": 0.4315059138196397,
+ "false_positive_rate": 0.1110038503850385
+ },
+ "decision_policy": "macaroni-recall-v1",
+ "baseline_evaluation_sha256": "4265f2fe45c49d3e71dacba9883e935b190829511fa42ecbc45c26e495984ec0",
+ "validation_scope": "Normal-only calibration and cached-score/software consistency checks; future recall and false-alarm rates are not guaranteed.",
+ "decision_policy_reason": "User authorized focusing only on Macaroni1/2 recall, prioritizing anomaly detection with more false alarms and minimal compute.",
+ "policy_selection_context": "Operating policy adopted after examining development-exposed test-score diagnostics. Numeric thresholds use normal calibration only; no test-optimal threshold search or independent-validation claim.",
+ "source_sha256": {
+ "experiments\\dinov2_highres_v1\\pcb1\\normal_calibration.json": "8224a5c38e21ae2b65497c109f45ce586e231525d43946779e0309225faf7010",
+ "experiments\\dinov2_highres_v1\\pcb1\\test_progress.json": "ba9bdde38b06df345c8f5a72ff1358a40d04287f609cac4bbac629cd652e6640",
+ "experiments\\dinov2_highres_v1\\capsules\\normal_calibration.json": "05a2f76ac29bb3d3e794155587f90e2ad3099b2df1bc14b0c8b6447aaab6f4f6",
+ "experiments\\dinov2_highres_v1\\capsules\\test_progress.json": "a214382658449bec9468a1d1103775cfa989b9f4d96c728ea756b1539c7a05e6",
+ "experiments\\dinov2_highres_v1\\cashew\\normal_calibration.json": "20b872ab18468386c96cee420ecddff58d4d9bb40ceb16edbb77a7965413dac2",
+ "experiments\\dinov2_highres_v1\\cashew\\test_progress.json": "dc236ba067baeac20b431da6b323abdcccadbfdd4fb58148f26dd0b2fd4733c1",
+ "experiments\\dinov2_highres_v1\\candle\\normal_calibration.json": "097689c7796940d5bcb30117fa22f454b906c519d7a4472bdd87e6434a3eb500",
+ "experiments\\dinov2_highres_v1\\candle\\test_progress.json": "2ec3a02bcc0c95d94242d4d31469b53126ddeae9ce5d777f0706dec984c362b2",
+ "experiments\\dinov2_highres_v1\\chewinggum\\normal_calibration.json": "012178e1e91e311e511a7f8b2ebabbff4fe1146a7d6a2227e374c264c763b995",
+ "experiments\\dinov2_highres_v1\\chewinggum\\test_progress.json": "ea5102f1d9e668ad8ff256dfcba10813b3f3723e0b09606b87745f71347b1a0f",
+ "experiments\\dinov2_highres_v1\\fryum\\normal_calibration.json": "6cd8984692afd2c20825b45a2c18d07550367510e376ce6c70d5bb2e44990432",
+ "experiments\\dinov2_highres_v1\\fryum\\test_progress.json": "52e7dababf991acdeda16907ae38cc9a2599a0164becbfcd7b3bbd96658c944f",
+ "experiments\\dinov2_highres_v1\\macaroni1\\normal_calibration.json": "6c83ed692639479b8b18914c7bea0c884eea7a1c0583106ea9bcd3d30c01dfde",
+ "experiments\\dinov2_highres_v1\\macaroni1\\test_progress.json": "d67ebfb2159c5dbe1cee314c300deb04123751caefd99288e99961dcfac1bb04",
+ "experiments\\dinov2_highres_v1\\macaroni2\\normal_calibration.json": "8c80102797cc6d81fd1862ec5c27465b3293e206ccb0b2af40973526a93a96a6",
+ "experiments\\dinov2_highres_v1\\macaroni2\\test_progress.json": "12bfe59625f5039623c341451c9e4ce0721271d98d7a8a815b2dc443465a88d8",
+ "experiments\\dinov2_highres_v1\\pcb2\\normal_calibration.json": "3b0713db8eebc9f7ea81ac1e758c42799e325aa0050a3c0c2ac1454e7457cd3a",
+ "experiments\\dinov2_highres_v1\\pcb2\\test_progress.json": "3b08920766efc75a65d1f7f4518adb086241b0ba71e2659a20edcf57a783afdb",
+ "experiments\\dinov2_highres_v1\\pcb3\\normal_calibration.json": "2c0e355bca9f8554fad3715d3a31acf733b30788c7b7e97a931cd24fb4d6ebd3",
+ "experiments\\dinov2_highres_v1\\pcb3\\test_progress.json": "e5e8d8d7adb1198b6cdca2f5bda7da0e71b4e30a672ae93714eb6efe7aefff0b",
+ "experiments\\dinov2_highres_v1\\pcb4\\normal_calibration.json": "2b364ef709f3ead9196871d7f0351ae38f477fbf98d6f94ca8607128a853b28a",
+ "experiments\\dinov2_highres_v1\\pcb4\\test_progress.json": "dd844a6415590d7effee5ba32eb7f2fbd737d7967efafebd845af506fd7685ae",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\normal_calibration.json": "21b3357ff4836e8b4d7fb7fee7e48fc7579a62d9c11dbf888f2de05397a88d56",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\test_progress.json": "0af8805dd69be9f39b2bedb13f8bd15e853f326e1ed9940b540d26ff01cf6dbf"
+ },
+ "previous_evaluation_sha256": "8cb2bb91ed4a108e48dcbaa8744984e68b07d101d4d4262aa66592fd66927e22"
+}
diff --git a/results/mvtec_eval.json b/results/mvtec_eval.json
new file mode 100644
index 0000000000000000000000000000000000000000..3670b82f01692125d676be3a5d752dde1a846a36
--- /dev/null
+++ b/results/mvtec_eval.json
@@ -0,0 +1,632 @@
+{
+ "bottle": {
+ "n_test": 83,
+ "n_fit": 188,
+ "n_heldout": 21,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9051788535306131,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.15
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9053642827126964,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.2
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9017674078478235,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.2
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "cable": {
+ "n_test": 150,
+ "n_fit": 201,
+ "n_heldout": 23,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.960832083958021,
+ "pixel_auroc": 0.9597412765199669,
+ "average_precision": 0.9798081270101584,
+ "recall_q95": 0.8695652173913043,
+ "false_alarm_q95": 0.034482758620689655
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9835082458770614,
+ "pixel_auroc": 0.9643614107722097,
+ "average_precision": 0.9905275635304355,
+ "recall_q95": 0.9565217391304348,
+ "false_alarm_q95": 0.06896551724137931
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9928785607196402,
+ "pixel_auroc": 0.9749763220362742,
+ "average_precision": 0.9958029562404663,
+ "recall_q95": 0.9565217391304348,
+ "false_alarm_q95": 0.034482758620689655
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.008245877061469287,
+ 0.04160419790104941
+ ],
+ "C-B": [
+ 0.002436281859070519,
+ 0.0191201274362819
+ ],
+ "C-A": [
+ 0.012743628185907019,
+ 0.05640929535232375
+ ]
+ }
+ },
+ "capsule": {
+ "n_test": 132,
+ "n_fit": 197,
+ "n_heldout": 22,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9581172716394096,
+ "pixel_auroc": 0.9894358804925572,
+ "average_precision": 0.9871851844531938,
+ "recall_q95": 0.944954128440367,
+ "false_alarm_q95": 0.08695652173913043
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9664938173115277,
+ "pixel_auroc": 0.991324612478818,
+ "average_precision": 0.9903008820676737,
+ "recall_q95": 0.926605504587156,
+ "false_alarm_q95": 0.08695652173913043
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9672915835660152,
+ "pixel_auroc": 0.9915329694561819,
+ "average_precision": 0.9909214716542951,
+ "recall_q95": 0.9541284403669725,
+ "false_alarm_q95": 0.08695652173913043
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.0003988831272436766,
+ 0.022736338252891897
+ ],
+ "C-B": [
+ -0.0035899481451934223,
+ 0.0063821300358994915
+ ],
+ "C-A": [
+ -0.0011966493817311408,
+ 0.025528520143597966
+ ]
+ }
+ },
+ "carpet": {
+ "n_test": 117,
+ "n_fit": 252,
+ "n_heldout": 28,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.8782802953235477,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.25
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.8753909427535372,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.25
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9022536733307487,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.17857142857142858
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "grid": {
+ "n_test": 78,
+ "n_fit": 237,
+ "n_heldout": 27,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9600237262649793,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.09523809523809523
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.95931946730094,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.14285714285714285
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9550026041753917,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.14285714285714285
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "hazelnut": {
+ "n_test": 110,
+ "n_fit": 351,
+ "n_heldout": 40,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9996428571428572,
+ "pixel_auroc": 0.9959695447661856,
+ "average_precision": 0.999798792756539,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.125
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9992857142857143,
+ "pixel_auroc": 0.9962781627397679,
+ "average_precision": 0.9996031746031744,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.05
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9992857142857143,
+ "pixel_auroc": 0.9963594732333338,
+ "average_precision": 0.9996031746031744,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.05
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.002142857142857224,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ -0.002142857142857113,
+ 0.0
+ ]
+ }
+ },
+ "leather": {
+ "n_test": 124,
+ "n_fit": 220,
+ "n_heldout": 25,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6293198404724963,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.28125
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6276518875017026,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.3125
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.5622606077477578,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.375
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "metal_nut": {
+ "n_test": 115,
+ "n_fit": 198,
+ "n_heldout": 22,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9757335718112187,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.09090909090909091
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9801457112892008,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.36363636363636365
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9758987716644242,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.36363636363636365
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "pill": {
+ "n_test": 167,
+ "n_fit": 240,
+ "n_heldout": 27,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9768139661756683,
+ "pixel_auroc": 0.9764136485436904,
+ "average_precision": 0.9955071573751723,
+ "recall_q95": 0.9148936170212766,
+ "false_alarm_q95": 0.07692307692307693
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9923622476813966,
+ "pixel_auroc": 0.9846221922152466,
+ "average_precision": 0.9985493019444828,
+ "recall_q95": 0.9361702127659575,
+ "false_alarm_q95": 0.07692307692307693
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9956355701036552,
+ "pixel_auroc": 0.9843003715151856,
+ "average_precision": 0.9991863383134195,
+ "recall_q95": 0.9432624113475178,
+ "false_alarm_q95": 0.07692307692307693
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0016366612111292644,
+ 0.03327877795962908
+ ],
+ "C-B": [
+ 0.0,
+ 0.010092744135297264
+ ],
+ "C-A": [
+ 0.0021822149481723896,
+ 0.04065057283142393
+ ]
+ }
+ },
+ "screw": {
+ "n_test": 160,
+ "n_fit": 288,
+ "n_heldout": 32,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9227300676368109,
+ "pixel_auroc": 0.9881335248366288,
+ "average_precision": 0.9743848466583075,
+ "recall_q95": 0.7310924369747899,
+ "false_alarm_q95": 0.07317073170731707
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9629022340643575,
+ "pixel_auroc": 0.9916337298019416,
+ "average_precision": 0.9872623994802119,
+ "recall_q95": 0.907563025210084,
+ "false_alarm_q95": 0.04878048780487805
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9606476737036278,
+ "pixel_auroc": 0.9932704550910754,
+ "average_precision": 0.9867831778790364,
+ "recall_q95": 0.8907563025210085,
+ "false_alarm_q95": 0.04878048780487805
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0176265628202501,
+ 0.0676470588235294
+ ],
+ "C-B": [
+ -0.008408485345357732,
+ 0.0028694404591105283
+ ],
+ "C-A": [
+ 0.01598688255790115,
+ 0.0653873744619799
+ ]
+ }
+ },
+ "tile": {
+ "n_test": 117,
+ "n_fit": 207,
+ "n_heldout": 23,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.660602466324687,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.06060606060606061
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6583452031414211,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.06060606060606061
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6045030317268419,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.06060606060606061
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "toothbrush": {
+ "n_test": 42,
+ "n_fit": 54,
+ "n_heldout": 6,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9928471256158475,
+ "average_precision": 0.9999999999999999,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9934613716601125,
+ "average_precision": 0.9999999999999999,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9939192684582632,
+ "average_precision": 0.9999999999999999,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "transistor": {
+ "n_test": 100,
+ "n_fit": 191,
+ "n_heldout": 22,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9970833333333333,
+ "pixel_auroc": 0.8617579436776412,
+ "average_precision": 0.9957863017583666,
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.0
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9995833333333334,
+ "pixel_auroc": 0.8665474098596695,
+ "average_precision": 0.9993902439024391,
+ "recall_q95": 0.875,
+ "false_alarm_q95": 0.0
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9995833333333334,
+ "pixel_auroc": 0.8637275221370349,
+ "average_precision": 0.9993902439024391,
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.0
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.0008333333333332444,
+ 0.009166666666666656
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ -0.0004166666666667318,
+ 0.009583333333333388
+ ]
+ }
+ },
+ "wood": {
+ "n_test": 79,
+ "n_fit": 222,
+ "n_heldout": 25,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9798245614035088,
+ "pixel_auroc": 0.7372840736412815,
+ "average_precision": 0.994189310801887,
+ "recall_q95": 0.9833333333333333,
+ "false_alarm_q95": 0.42105263157894735
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9859649122807017,
+ "pixel_auroc": 0.7391479058833798,
+ "average_precision": 0.9959057458108692,
+ "recall_q95": 0.9833333333333333,
+ "false_alarm_q95": 0.42105263157894735
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9736842105263158,
+ "pixel_auroc": 0.7155723356563095,
+ "average_precision": 0.992339434475335,
+ "recall_q95": 0.9833333333333333,
+ "false_alarm_q95": 0.42105263157894735
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.018421052631579005
+ ],
+ "C-B": [
+ -0.033333333333333326,
+ -0.0008771929824561431
+ ],
+ "C-A": [
+ -0.02543859649122815,
+ 0.007894736842105177
+ ]
+ }
+ },
+ "zipper": {
+ "n_test": 151,
+ "n_fit": 216,
+ "n_heldout": 24,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9934348739495799,
+ "pixel_auroc": 0.7722863737418493,
+ "average_precision": 0.9985410830999064,
+ "recall_q95": 0.9915966386554622,
+ "false_alarm_q95": 0.1875
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9936974789915967,
+ "pixel_auroc": 0.7877123375934348,
+ "average_precision": 0.9985311479963884,
+ "recall_q95": 0.9915966386554622,
+ "false_alarm_q95": 0.5
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9955357142857143,
+ "pixel_auroc": 0.7952347548341744,
+ "average_precision": 0.9989334295809825,
+ "recall_q95": 0.9915966386554622,
+ "false_alarm_q95": 0.34375
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.0031512605042016695,
+ 0.003939075630252087
+ ],
+ "C-B": [
+ 0.0,
+ 0.005777310924369727
+ ],
+ "C-A": [
+ -0.0007878151260504174,
+ 0.008403361344537896
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/mvtec_summary.json b/results/mvtec_summary.json
new file mode 100644
index 0000000000000000000000000000000000000000..b00a022b3a004c94d86f0f617c5e477e2ef7d795
--- /dev/null
+++ b/results/mvtec_summary.json
@@ -0,0 +1,660 @@
+{
+ "dataset": "MVTec AD",
+ "scope": "One offline run on 15 products the detector was never built for. Each product's memory comes from its own normal training photos; thresholds are the 95th percentile of held-out normal scores. These products are not available for inspection in this app.",
+ "protocol_url": "https://github.com/WAYTECHG/DefectRAG/blob/main/docs/MVTEC_EVALUATION.md",
+ "arms": [
+ {
+ "key": "A_random_frozen",
+ "label": "Random-sample memory"
+ },
+ {
+ "key": "B_coreset_frozen",
+ "label": "Coreset memory"
+ },
+ {
+ "key": "C_coreset_tuned",
+ "label": "Coreset + fine-tuned encoder"
+ }
+ ],
+ "products": 15,
+ "test_images": 1725,
+ "macro_mean": {
+ "A_random_frozen": {
+ "auroc": 0.985898601015946,
+ "average_precision": 0.9950133869275688,
+ "pixel_auroc": 0.8855338763708794,
+ "recall_q95": 0.952362358121102,
+ "false_alarm_q95": 0.12887259782149388
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9922531989217127,
+ "average_precision": 0.9973380306223784,
+ "pixel_auroc": 0.8880871085136053,
+ "recall_q95": 0.9717860302454951,
+ "false_alarm_q95": 0.17215185349246528
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9923028240349344,
+ "average_precision": 0.99753068177661,
+ "pixel_auroc": 0.8807053045940548,
+ "recall_q95": 0.974639924356982,
+ "false_alarm_q95": 0.15884109815584785
+ }
+ },
+ "comparisons": {
+ "B-A": {
+ "better": 3,
+ "worse": 0
+ },
+ "C-B": {
+ "better": 1,
+ "worse": 1
+ },
+ "C-A": {
+ "better": 3,
+ "worse": 0
+ }
+ },
+ "categories": {
+ "bottle": {
+ "n_test": 83,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9051788535306131,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.15
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9053642827126964,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.2
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9017674078478235,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.2
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "cable": {
+ "n_test": 150,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.960832083958021,
+ "pixel_auroc": 0.9597412765199669,
+ "average_precision": 0.9798081270101584,
+ "recall_q95": 0.8695652173913043,
+ "false_alarm_q95": 0.034482758620689655
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9835082458770614,
+ "pixel_auroc": 0.9643614107722097,
+ "average_precision": 0.9905275635304355,
+ "recall_q95": 0.9565217391304348,
+ "false_alarm_q95": 0.06896551724137931
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9928785607196402,
+ "pixel_auroc": 0.9749763220362742,
+ "average_precision": 0.9958029562404663,
+ "recall_q95": 0.9565217391304348,
+ "false_alarm_q95": 0.034482758620689655
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.008245877061469287,
+ 0.04160419790104941
+ ],
+ "C-B": [
+ 0.002436281859070519,
+ 0.0191201274362819
+ ],
+ "C-A": [
+ 0.012743628185907019,
+ 0.05640929535232375
+ ]
+ }
+ },
+ "capsule": {
+ "n_test": 132,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9581172716394096,
+ "pixel_auroc": 0.9894358804925572,
+ "average_precision": 0.9871851844531938,
+ "recall_q95": 0.944954128440367,
+ "false_alarm_q95": 0.08695652173913043
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9664938173115277,
+ "pixel_auroc": 0.991324612478818,
+ "average_precision": 0.9903008820676737,
+ "recall_q95": 0.926605504587156,
+ "false_alarm_q95": 0.08695652173913043
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9672915835660152,
+ "pixel_auroc": 0.9915329694561819,
+ "average_precision": 0.9909214716542951,
+ "recall_q95": 0.9541284403669725,
+ "false_alarm_q95": 0.08695652173913043
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.0003988831272436766,
+ 0.022736338252891897
+ ],
+ "C-B": [
+ -0.0035899481451934223,
+ 0.0063821300358994915
+ ],
+ "C-A": [
+ -0.0011966493817311408,
+ 0.025528520143597966
+ ]
+ }
+ },
+ "carpet": {
+ "n_test": 117,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.8782802953235477,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.25
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.8753909427535372,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.25
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9022536733307487,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.17857142857142858
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "grid": {
+ "n_test": 78,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9600237262649793,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.09523809523809523
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.95931946730094,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.14285714285714285
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9550026041753917,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.14285714285714285
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "hazelnut": {
+ "n_test": 110,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9996428571428572,
+ "pixel_auroc": 0.9959695447661856,
+ "average_precision": 0.999798792756539,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.125
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9992857142857143,
+ "pixel_auroc": 0.9962781627397679,
+ "average_precision": 0.9996031746031744,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.05
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9992857142857143,
+ "pixel_auroc": 0.9963594732333338,
+ "average_precision": 0.9996031746031744,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.05
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.002142857142857224,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ -0.002142857142857113,
+ 0.0
+ ]
+ }
+ },
+ "leather": {
+ "n_test": 124,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6293198404724963,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.28125
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6276518875017026,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.3125
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.5622606077477578,
+ "average_precision": 1.0000000000000002,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.375
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "metal_nut": {
+ "n_test": 115,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9757335718112187,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.09090909090909091
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9801457112892008,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.36363636363636365
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9758987716644242,
+ "average_precision": 1.0,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.36363636363636365
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "pill": {
+ "n_test": 167,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9768139661756683,
+ "pixel_auroc": 0.9764136485436904,
+ "average_precision": 0.9955071573751723,
+ "recall_q95": 0.9148936170212766,
+ "false_alarm_q95": 0.07692307692307693
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9923622476813966,
+ "pixel_auroc": 0.9846221922152466,
+ "average_precision": 0.9985493019444828,
+ "recall_q95": 0.9361702127659575,
+ "false_alarm_q95": 0.07692307692307693
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9956355701036552,
+ "pixel_auroc": 0.9843003715151856,
+ "average_precision": 0.9991863383134195,
+ "recall_q95": 0.9432624113475178,
+ "false_alarm_q95": 0.07692307692307693
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0016366612111292644,
+ 0.03327877795962908
+ ],
+ "C-B": [
+ 0.0,
+ 0.010092744135297264
+ ],
+ "C-A": [
+ 0.0021822149481723896,
+ 0.04065057283142393
+ ]
+ }
+ },
+ "screw": {
+ "n_test": 160,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9227300676368109,
+ "pixel_auroc": 0.9881335248366288,
+ "average_precision": 0.9743848466583075,
+ "recall_q95": 0.7310924369747899,
+ "false_alarm_q95": 0.07317073170731707
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9629022340643575,
+ "pixel_auroc": 0.9916337298019416,
+ "average_precision": 0.9872623994802119,
+ "recall_q95": 0.907563025210084,
+ "false_alarm_q95": 0.04878048780487805
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9606476737036278,
+ "pixel_auroc": 0.9932704550910754,
+ "average_precision": 0.9867831778790364,
+ "recall_q95": 0.8907563025210085,
+ "false_alarm_q95": 0.04878048780487805
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0176265628202501,
+ 0.0676470588235294
+ ],
+ "C-B": [
+ -0.008408485345357732,
+ 0.0028694404591105283
+ ],
+ "C-A": [
+ 0.01598688255790115,
+ 0.0653873744619799
+ ]
+ }
+ },
+ "tile": {
+ "n_test": 117,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.660602466324687,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.06060606060606061
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6583452031414211,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.06060606060606061
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.6045030317268419,
+ "average_precision": 0.9999999999999998,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.06060606060606061
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "toothbrush": {
+ "n_test": 42,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9928471256158475,
+ "average_precision": 0.9999999999999999,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0
+ },
+ "B_coreset_frozen": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9934613716601125,
+ "average_precision": 0.9999999999999999,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0
+ },
+ "C_coreset_tuned": {
+ "auroc": 1.0,
+ "pixel_auroc": 0.9939192684582632,
+ "average_precision": 0.9999999999999999,
+ "recall_q95": 1.0,
+ "false_alarm_q95": 0.0
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.0
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "transistor": {
+ "n_test": 100,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9970833333333333,
+ "pixel_auroc": 0.8617579436776412,
+ "average_precision": 0.9957863017583666,
+ "recall_q95": 0.85,
+ "false_alarm_q95": 0.0
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9995833333333334,
+ "pixel_auroc": 0.8665474098596695,
+ "average_precision": 0.9993902439024391,
+ "recall_q95": 0.875,
+ "false_alarm_q95": 0.0
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9995833333333334,
+ "pixel_auroc": 0.8637275221370349,
+ "average_precision": 0.9993902439024391,
+ "recall_q95": 0.9,
+ "false_alarm_q95": 0.0
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.0008333333333332444,
+ 0.009166666666666656
+ ],
+ "C-B": [
+ 0.0,
+ 0.0
+ ],
+ "C-A": [
+ -0.0004166666666667318,
+ 0.009583333333333388
+ ]
+ }
+ },
+ "wood": {
+ "n_test": 79,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9798245614035088,
+ "pixel_auroc": 0.7372840736412815,
+ "average_precision": 0.994189310801887,
+ "recall_q95": 0.9833333333333333,
+ "false_alarm_q95": 0.42105263157894735
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9859649122807017,
+ "pixel_auroc": 0.7391479058833798,
+ "average_precision": 0.9959057458108692,
+ "recall_q95": 0.9833333333333333,
+ "false_alarm_q95": 0.42105263157894735
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9736842105263158,
+ "pixel_auroc": 0.7155723356563095,
+ "average_precision": 0.992339434475335,
+ "recall_q95": 0.9833333333333333,
+ "false_alarm_q95": 0.42105263157894735
+ }
+ },
+ "differences": {
+ "B-A": [
+ 0.0,
+ 0.018421052631579005
+ ],
+ "C-B": [
+ -0.033333333333333326,
+ -0.0008771929824561431
+ ],
+ "C-A": [
+ -0.02543859649122815,
+ 0.007894736842105177
+ ]
+ }
+ },
+ "zipper": {
+ "n_test": 151,
+ "arms": {
+ "A_random_frozen": {
+ "auroc": 0.9934348739495799,
+ "pixel_auroc": 0.7722863737418493,
+ "average_precision": 0.9985410830999064,
+ "recall_q95": 0.9915966386554622,
+ "false_alarm_q95": 0.1875
+ },
+ "B_coreset_frozen": {
+ "auroc": 0.9936974789915967,
+ "pixel_auroc": 0.7877123375934348,
+ "average_precision": 0.9985311479963884,
+ "recall_q95": 0.9915966386554622,
+ "false_alarm_q95": 0.5
+ },
+ "C_coreset_tuned": {
+ "auroc": 0.9955357142857143,
+ "pixel_auroc": 0.7952347548341744,
+ "average_precision": 0.9989334295809825,
+ "recall_q95": 0.9915966386554622,
+ "false_alarm_q95": 0.34375
+ }
+ },
+ "differences": {
+ "B-A": [
+ -0.0031512605042016695,
+ 0.003939075630252087
+ ],
+ "C-B": [
+ 0.0,
+ 0.005777310924369727
+ ],
+ "C-A": [
+ -0.0007878151260504174,
+ 0.008403361344537896
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/results/official_evaluation.json b/results/official_evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..5ba08afb0aa6038b206258bb1bfbe3eeafecf802
--- /dev/null
+++ b/results/official_evaluation.json
@@ -0,0 +1,822 @@
+{
+ "protocol": {
+ "schema": 1,
+ "dataset": "VisA official split_csv/1cls.csv",
+ "split_csv_sha256": "a48557e6033318cb90556f706196bc9d247a776a23ea51aecee5a80dd0332995",
+ "method": "Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch memory; custom baseline, not Dinomaly",
+ "encoder_sha256": "4610ad75edef83e75afdebf162d148dc628045ea6cbb83d67d4708c709c4f91d",
+ "benchmark_seeds": [
+ 42,
+ 43,
+ 44
+ ],
+ "bank_patch_limit": 8192,
+ "image_score": "mean of highest 1% patch distances",
+ "pixel_evaluation_resolution": 224,
+ "pixel_metrics": "VisA reference 200-threshold AUROC/AU-PR; normal images included; AP separately",
+ "preprocessing": "bundled DINOv3 image processor, default 224 input; no augmentation or GT masks in features",
+ "benchmark": "all official training normals; all official test images; threshold-free ranking metrics",
+ "deployment": "seed42; 10% official training normals held out; threshold=max held-out normal score; no test anomalies used",
+ "prior_test_exposure": "retrospective benchmark: test images/results were seen in earlier modified-split experiments; no new test-driven tuning",
+ "selection_policy": "fixed before execution; all three seeds reported; no best-seed selection",
+ "sources": [
+ "https://github.com/amazon-science/spot-diff",
+ "https://arxiv.org/html/2207.14315",
+ "https://raw.githubusercontent.com/amazon-science/spot-diff/main/utils/metrics.py"
+ ]
+ },
+ "python": "3.12.4",
+ "torch": "2.8.0+cu126",
+ "device": "cuda",
+ "categories": {
+ "pcb1": {
+ "official_train_normals": 904,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.8823,
+ "au_pr": 0.8652156099418584,
+ "average_precision": 0.8662377386046971,
+ "pixel_auroc": 0.9843661984454277,
+ "pixel_au_pr": 0.7588138431092281,
+ "pixel_average_precision": 0.7588445707254726
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8833,
+ "au_pr": 0.8478267819433369,
+ "average_precision": 0.8493502402186066,
+ "pixel_auroc": 0.9842690568703282,
+ "pixel_au_pr": 0.7560718748028801,
+ "pixel_average_precision": 0.7560583979602433
+ },
+ {
+ "seed": 44,
+ "auroc": 0.8729,
+ "au_pr": 0.8477510900503791,
+ "average_precision": 0.849157510741792,
+ "pixel_auroc": 0.9828381548165445,
+ "pixel_au_pr": 0.7602114521729626,
+ "pixel_average_precision": 0.7602556604913916
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.8795000000000001,
+ "au_pr": 0.8535978273118582,
+ "average_precision": 0.8549151631883652,
+ "pixel_auroc": 0.9838244700441002,
+ "pixel_au_pr": 0.7583657233616902,
+ "pixel_average_precision": 0.7583862097257025
+ },
+ "benchmark_std": {
+ "auroc": 0.0057375953151123996,
+ "au_pr": 0.01006136607246337,
+ "average_precision": 0.009806111446781554,
+ "pixel_auroc": 0.0008555538659163021,
+ "pixel_au_pr": 0.002105856994628281,
+ "pixel_average_precision": 0.002135842759527955
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.08778351545333862,
+ "fit_normals": 813,
+ "validation_normals": 91,
+ "auroc": 0.8823,
+ "au_pr": 0.8689523679102507,
+ "average_precision": 0.8701001531382211,
+ "pixel_auroc": 0.9829881707996662,
+ "pixel_au_pr": 0.761096603150961,
+ "pixel_average_precision": 0.7610949764155934
+ },
+ "seconds": 112.7122111999779
+ },
+ "capsules": {
+ "official_train_normals": 542,
+ "official_test_images": 160,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.8064999999999999,
+ "au_pr": 0.8883355238246444,
+ "average_precision": 0.8889946957168198,
+ "pixel_auroc": 0.9314791692599804,
+ "pixel_au_pr": 0.06111133849830806,
+ "pixel_average_precision": 0.06111931303510193
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8116666666666668,
+ "au_pr": 0.892768815037886,
+ "average_precision": 0.8933734183457129,
+ "pixel_auroc": 0.9271496681356036,
+ "pixel_au_pr": 0.06392553683680963,
+ "pixel_average_precision": 0.06394387473959999
+ },
+ {
+ "seed": 44,
+ "auroc": 0.831,
+ "au_pr": 0.9045055504943371,
+ "average_precision": 0.905031503578954,
+ "pixel_auroc": 0.920030704594082,
+ "pixel_au_pr": 0.06036921760334449,
+ "pixel_average_precision": 0.060374057512393456
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.8163888888888889,
+ "au_pr": 0.8952032964522892,
+ "average_precision": 0.8957998725471622,
+ "pixel_auroc": 0.9262198473298886,
+ "pixel_au_pr": 0.061802030979487395,
+ "pixel_average_precision": 0.06181241509569846
+ },
+ "benchmark_std": {
+ "auroc": 0.012914605570323747,
+ "au_pr": 0.008355385415553805,
+ "average_precision": 0.008289183409453001,
+ "pixel_auroc": 0.0057805934686359466,
+ "pixel_au_pr": 0.0018760713473231134,
+ "pixel_average_precision": 0.001883133454834655
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.06207504868507385,
+ "fit_normals": 487,
+ "validation_normals": 55,
+ "auroc": 0.8285000000000001,
+ "au_pr": 0.9036303626323163,
+ "average_precision": 0.9041775948115949,
+ "pixel_auroc": 0.925380309579376,
+ "pixel_au_pr": 0.06219526908416476,
+ "pixel_average_precision": 0.06220455484733658
+ },
+ "seconds": 73.66336999999476
+ },
+ "cashew": {
+ "official_train_normals": 450,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9686,
+ "au_pr": 0.9855796182651859,
+ "average_precision": 0.9856470397867623,
+ "pixel_auroc": 0.9959214053889084,
+ "pixel_au_pr": 0.9063467359578445,
+ "pixel_average_precision": 0.906363611998445
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9714,
+ "au_pr": 0.9864154003433409,
+ "average_precision": 0.9864809726384766,
+ "pixel_auroc": 0.9956851230701886,
+ "pixel_au_pr": 0.905553212306003,
+ "pixel_average_precision": 0.9055719630533584
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9674,
+ "au_pr": 0.9847871536501108,
+ "average_precision": 0.9848592880970601,
+ "pixel_auroc": 0.9954262934889538,
+ "pixel_au_pr": 0.9028857900152283,
+ "pixel_average_precision": 0.9029448883372253
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9691333333333333,
+ "au_pr": 0.9855940574195459,
+ "average_precision": 0.985662433507433,
+ "pixel_auroc": 0.9956776073160168,
+ "pixel_au_pr": 0.9049285794263587,
+ "pixel_average_precision": 0.9049601544630095
+ },
+ "benchmark_std": {
+ "auroc": 0.0020526405757787585,
+ "au_pr": 0.0008142193748539785,
+ "average_precision": 0.0008109518561199027,
+ "pixel_auroc": 0.0002476415015495735,
+ "pixel_au_pr": 0.0018130530549814719,
+ "pixel_average_precision": 0.0017895949769051811
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.07112658023834229,
+ "fit_normals": 405,
+ "validation_normals": 45,
+ "auroc": 0.9718,
+ "au_pr": 0.9869784872730237,
+ "average_precision": 0.9870395707487909,
+ "pixel_auroc": 0.995439448532811,
+ "pixel_au_pr": 0.9041546127455985,
+ "pixel_average_precision": 0.9041673447497144
+ },
+ "seconds": 67.18520740000531
+ },
+ "candle": {
+ "official_train_normals": 900,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9124,
+ "au_pr": 0.9067093867265235,
+ "average_precision": 0.907317577547275,
+ "pixel_auroc": 0.9791673272800795,
+ "pixel_au_pr": 0.19343705864597519,
+ "pixel_average_precision": 0.19350496168249026
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9188,
+ "au_pr": 0.9183048196974375,
+ "average_precision": 0.9187591434503573,
+ "pixel_auroc": 0.979483321196079,
+ "pixel_au_pr": 0.18619068410380335,
+ "pixel_average_precision": 0.18625584865892192
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9185,
+ "au_pr": 0.9149165895092746,
+ "average_precision": 0.9154818487384909,
+ "pixel_auroc": 0.9796341027948368,
+ "pixel_au_pr": 0.19655647956405858,
+ "pixel_average_precision": 0.1966224772020632
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9165666666666666,
+ "au_pr": 0.9133102653110785,
+ "average_precision": 0.9138528565787077,
+ "pixel_auroc": 0.979428250423665,
+ "pixel_au_pr": 0.19206140743794572,
+ "pixel_average_precision": 0.1921277625144918
+ },
+ "benchmark_std": {
+ "auroc": 0.0036115555282084802,
+ "au_pr": 0.005962275112574286,
+ "average_precision": 0.005892161672181073,
+ "pixel_auroc": 0.00023821091027684724,
+ "pixel_au_pr": 0.005318058016379355,
+ "pixel_average_precision": 0.005318764424104492
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.06003263592720032,
+ "fit_normals": 810,
+ "validation_normals": 90,
+ "auroc": 0.9321,
+ "au_pr": 0.9351585676489977,
+ "average_precision": 0.9355012345374768,
+ "pixel_auroc": 0.9798686015733775,
+ "pixel_au_pr": 0.19301852070736908,
+ "pixel_average_precision": 0.1931484756578974
+ },
+ "seconds": 113.62054019997595
+ },
+ "chewinggum": {
+ "official_train_normals": 453,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9573999999999999,
+ "au_pr": 0.9830502868470744,
+ "average_precision": 0.9831192510451747,
+ "pixel_auroc": 0.9766855303849944,
+ "pixel_au_pr": 0.6299510587206012,
+ "pixel_average_precision": 0.629929382711634
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9588,
+ "au_pr": 0.9845659784908927,
+ "average_precision": 0.9846248486924407,
+ "pixel_auroc": 0.9762049874185391,
+ "pixel_au_pr": 0.6251718689797755,
+ "pixel_average_precision": 0.6251574763557178
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9668,
+ "au_pr": 0.9872811603159687,
+ "average_precision": 0.9873310764098553,
+ "pixel_auroc": 0.9754393718474601,
+ "pixel_au_pr": 0.628449413046543,
+ "pixel_average_precision": 0.6284537166295275
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.961,
+ "au_pr": 0.984965808551312,
+ "average_precision": 0.9850250587158236,
+ "pixel_auroc": 0.9761099632169978,
+ "pixel_au_pr": 0.6278574469156398,
+ "pixel_average_precision": 0.6278468585656265
+ },
+ "benchmark_std": {
+ "auroc": 0.005071488933242415,
+ "au_pr": 0.0021435882616210435,
+ "average_precision": 0.0021342432552906732,
+ "pixel_auroc": 0.0006284902340739392,
+ "pixel_au_pr": 0.002443968406057183,
+ "pixel_average_precision": 0.0024431496269568974
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.05347451567649841,
+ "fit_normals": 407,
+ "validation_normals": 46,
+ "auroc": 0.9625999999999999,
+ "au_pr": 0.9854792314128331,
+ "average_precision": 0.9855370573897992,
+ "pixel_auroc": 0.9759074141352108,
+ "pixel_au_pr": 0.6277173455397616,
+ "pixel_average_precision": 0.6277079537238726
+ },
+ "seconds": 66.73736349999672
+ },
+ "fryum": {
+ "official_train_normals": 450,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9116000000000001,
+ "au_pr": 0.9574765963875643,
+ "average_precision": 0.9576928507137918,
+ "pixel_auroc": 0.9604315182344441,
+ "pixel_au_pr": 0.3775780213581445,
+ "pixel_average_precision": 0.3776046761599081
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8862000000000001,
+ "au_pr": 0.9432783477724793,
+ "average_precision": 0.9435869919550414,
+ "pixel_auroc": 0.9583562963953284,
+ "pixel_au_pr": 0.3747542024223356,
+ "pixel_average_precision": 0.3747849030743497
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9004,
+ "au_pr": 0.9514351723489248,
+ "average_precision": 0.9516899329031522,
+ "pixel_auroc": 0.9586872744593278,
+ "pixel_au_pr": 0.37651978163909156,
+ "pixel_average_precision": 0.3765570093516509
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.8994,
+ "au_pr": 0.9507300388363228,
+ "average_precision": 0.9509899251906617,
+ "pixel_auroc": 0.9591583630297,
+ "pixel_au_pr": 0.3762840018065239,
+ "pixel_average_precision": 0.37631552952863623
+ },
+ "benchmark_std": {
+ "auroc": 0.012729493312775637,
+ "au_pr": 0.007125340404983236,
+ "average_precision": 0.007078935013730096,
+ "pixel_auroc": 0.0011149348641231144,
+ "pixel_au_pr": 0.0014265982064486373,
+ "pixel_average_precision": 0.0014253120508163468
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.053059279918670654,
+ "fit_normals": 405,
+ "validation_normals": 45,
+ "auroc": 0.8989999999999999,
+ "au_pr": 0.9499623450465442,
+ "average_precision": 0.9502271580371828,
+ "pixel_auroc": 0.95870290751976,
+ "pixel_au_pr": 0.3758081431639321,
+ "pixel_average_precision": 0.3758205269856516
+ },
+ "seconds": 45.03114439998171
+ },
+ "macaroni1": {
+ "official_train_normals": 900,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.8164,
+ "au_pr": 0.7900379634618211,
+ "average_precision": 0.7926331212277926,
+ "pixel_auroc": 0.7283181171780677,
+ "pixel_au_pr": 0.0015780890385677598,
+ "pixel_average_precision": 0.0015822262566728654
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8359,
+ "au_pr": 0.7956190395568308,
+ "average_precision": 0.7979488439753669,
+ "pixel_auroc": 0.7306853981697815,
+ "pixel_au_pr": 0.0014010765391638876,
+ "pixel_average_precision": 0.0014043048463368265
+ },
+ {
+ "seed": 44,
+ "auroc": 0.8099000000000001,
+ "au_pr": 0.8008593903199746,
+ "average_precision": 0.8025537360231381,
+ "pixel_auroc": 0.7277374329290651,
+ "pixel_au_pr": 0.0016472824117211124,
+ "pixel_average_precision": 0.0016523645125773884
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.8207333333333334,
+ "au_pr": 0.7955054644462088,
+ "average_precision": 0.7977119004087658,
+ "pixel_auroc": 0.7289136494256381,
+ "pixel_au_pr": 0.0015421493298175867,
+ "pixel_average_precision": 0.0015462985385290267
+ },
+ "benchmark_std": {
+ "auroc": 0.013530828996529822,
+ "au_pr": 0.005411607366661578,
+ "average_precision": 0.004964549946341761,
+ "pixel_auroc": 0.0015616077479764874,
+ "pixel_au_pr": 0.00012697669045616823,
+ "pixel_average_precision": 0.00012787298464535848
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.07591500878334045,
+ "fit_normals": 810,
+ "validation_normals": 90,
+ "auroc": 0.8335,
+ "au_pr": 0.8032695520542,
+ "average_precision": 0.8058774002646991,
+ "pixel_auroc": 0.7319699198048704,
+ "pixel_au_pr": 0.001820719918554894,
+ "pixel_average_precision": 0.0018246547691389576
+ },
+ "seconds": 113.06721189999371
+ },
+ "macaroni2": {
+ "official_train_normals": 900,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.4955,
+ "au_pr": 0.4859157566747824,
+ "average_precision": 0.4902353735956684,
+ "pixel_auroc": 0.7944229143717352,
+ "pixel_au_pr": 0.0022004507218000534,
+ "pixel_average_precision": 0.002215863502953361
+ },
+ {
+ "seed": 43,
+ "auroc": 0.4796000000000001,
+ "au_pr": 0.4677863570673503,
+ "average_precision": 0.4739730801749749,
+ "pixel_auroc": 0.8020432743793243,
+ "pixel_au_pr": 0.0021332172565870665,
+ "pixel_average_precision": 0.0021419399589341134
+ },
+ {
+ "seed": 44,
+ "auroc": 0.47309999999999997,
+ "au_pr": 0.481108422817926,
+ "average_precision": 0.4866820080963612,
+ "pixel_auroc": 0.7959122719175098,
+ "pixel_au_pr": 0.002358628955417945,
+ "pixel_average_precision": 0.0023693502334905183
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.4827333333333333,
+ "au_pr": 0.47827017885335293,
+ "average_precision": 0.48363015395566816,
+ "pixel_auroc": 0.7974594868895232,
+ "pixel_au_pr": 0.0022307656446016884,
+ "pixel_average_precision": 0.0022423845651259977
+ },
+ "benchmark_std": {
+ "auroc": 0.011524032858914164,
+ "au_pr": 0.009392044725900559,
+ "average_precision": 0.008549906847283857,
+ "pixel_auroc": 0.0040389203122285795,
+ "pixel_au_pr": 0.00011572318004966633,
+ "pixel_average_precision": 0.00011600165213275413
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.0805380642414093,
+ "fit_normals": 810,
+ "validation_normals": 90,
+ "auroc": 0.5002,
+ "au_pr": 0.47564475009156426,
+ "average_precision": 0.48172379567632917,
+ "pixel_auroc": 0.7947031866442082,
+ "pixel_au_pr": 0.002174639270063553,
+ "pixel_average_precision": 0.0021925647141094167
+ },
+ "seconds": 67.62013350002235
+ },
+ "pcb2": {
+ "official_train_normals": 901,
+ "official_test_images": 200,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.7893,
+ "au_pr": 0.7838787634081932,
+ "average_precision": 0.7855971798280925,
+ "pixel_auroc": 0.91671033819846,
+ "pixel_au_pr": 0.041767499746959265,
+ "pixel_average_precision": 0.041784021345270844
+ },
+ {
+ "seed": 43,
+ "auroc": 0.7906,
+ "au_pr": 0.7724737077727798,
+ "average_precision": 0.7755020531727549,
+ "pixel_auroc": 0.9179732879227119,
+ "pixel_au_pr": 0.041524995711936755,
+ "pixel_average_precision": 0.04154041374898589
+ },
+ {
+ "seed": 44,
+ "auroc": 0.8055,
+ "au_pr": 0.8096355999130022,
+ "average_precision": 0.810914809807684,
+ "pixel_auroc": 0.9175574803045266,
+ "pixel_au_pr": 0.04068717301416601,
+ "pixel_average_precision": 0.04072086553805905
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.7951333333333332,
+ "au_pr": 0.7886626903646583,
+ "average_precision": 0.7906713476028439,
+ "pixel_auroc": 0.9174137021418994,
+ "pixel_au_pr": 0.04132655615768734,
+ "pixel_average_precision": 0.041348433544105265
+ },
+ "benchmark_std": {
+ "auroc": 0.009001296202955072,
+ "au_pr": 0.019037227337613424,
+ "average_precision": 0.018243525346706518,
+ "pixel_auroc": 0.0006436339188803603,
+ "pixel_au_pr": 0.0005668422663448508,
+ "pixel_average_precision": 0.0005569716033170332
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.0849224328994751,
+ "fit_normals": 810,
+ "validation_normals": 91,
+ "auroc": 0.7905000000000001,
+ "au_pr": 0.7880878748919639,
+ "average_precision": 0.7897732654897014,
+ "pixel_auroc": 0.9102355183098504,
+ "pixel_au_pr": 0.039144681417868435,
+ "pixel_average_precision": 0.039151291696416506
+ },
+ "seconds": 62.73766280000564
+ },
+ "pcb3": {
+ "official_train_normals": 905,
+ "official_test_images": 201,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.7870297029702971,
+ "au_pr": 0.8104200255489605,
+ "average_precision": 0.8114909738137448,
+ "pixel_auroc": 0.9329148327640948,
+ "pixel_au_pr": 0.1287764827542035,
+ "pixel_average_precision": 0.12875248706618522
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8099999999999999,
+ "au_pr": 0.8178552814078315,
+ "average_precision": 0.8189577706195854,
+ "pixel_auroc": 0.9352837561495217,
+ "pixel_au_pr": 0.143581430436699,
+ "pixel_average_precision": 0.14364100585551115
+ },
+ {
+ "seed": 44,
+ "auroc": 0.798019801980198,
+ "au_pr": 0.805514000894815,
+ "average_precision": 0.806847271418301,
+ "pixel_auroc": 0.9337017802212624,
+ "pixel_au_pr": 0.13761258942453908,
+ "pixel_average_precision": 0.1376028370963068
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.7983498349834983,
+ "au_pr": 0.8112631026172022,
+ "average_precision": 0.812432005283877,
+ "pixel_auroc": 0.9339667897116263,
+ "pixel_au_pr": 0.1366568342051472,
+ "pixel_average_precision": 0.1366654433393344
+ },
+ "benchmark_std": {
+ "auroc": 0.011488704354523396,
+ "au_pr": 0.0062136853301794056,
+ "average_precision": 0.006109844752275779,
+ "pixel_auroc": 0.0012064916178709522,
+ "pixel_au_pr": 0.007448605238559986,
+ "pixel_average_precision": 0.007488392900131238
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.08122119307518005,
+ "fit_normals": 814,
+ "validation_normals": 91,
+ "auroc": 0.7747524752475247,
+ "au_pr": 0.8045196628588029,
+ "average_precision": 0.8056175108533596,
+ "pixel_auroc": 0.9294099327005999,
+ "pixel_au_pr": 0.13226256510452605,
+ "pixel_average_precision": 0.1322610245459947
+ },
+ "seconds": 86.13384480000241
+ },
+ "pcb4": {
+ "official_train_normals": 904,
+ "official_test_images": 201,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9296039603960395,
+ "au_pr": 0.9264685581956622,
+ "average_precision": 0.9268962317340124,
+ "pixel_auroc": 0.9649612355233904,
+ "pixel_au_pr": 0.2848150662221529,
+ "pixel_average_precision": 0.28485386160082676
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9455445544554456,
+ "au_pr": 0.9444126592665123,
+ "average_precision": 0.9447216067906145,
+ "pixel_auroc": 0.9659001073100977,
+ "pixel_au_pr": 0.2972460671551258,
+ "pixel_average_precision": 0.2972609273755548
+ },
+ {
+ "seed": 44,
+ "auroc": 0.9352475247524753,
+ "au_pr": 0.9277253482488393,
+ "average_precision": 0.9281977057451503,
+ "pixel_auroc": 0.9683930607520573,
+ "pixel_au_pr": 0.2917764048064103,
+ "pixel_average_precision": 0.29179388828957287
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9367986798679868,
+ "au_pr": 0.9328688552370047,
+ "average_precision": 0.9332718480899257,
+ "pixel_auroc": 0.9664181345285151,
+ "pixel_au_pr": 0.291279179394563,
+ "pixel_average_precision": 0.2913028924219848
+ },
+ "benchmark_std": {
+ "auroc": 0.008082709718032446,
+ "au_pr": 0.010016957567704859,
+ "average_precision": 0.009937111722146195,
+ "pixel_auroc": 0.001773589650763301,
+ "pixel_au_pr": 0.006230398934380788,
+ "pixel_average_precision": 0.006218088773176086
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.05957549810409546,
+ "fit_normals": 813,
+ "validation_normals": 91,
+ "auroc": 0.936930693069307,
+ "au_pr": 0.935289428742797,
+ "average_precision": 0.9356652909858226,
+ "pixel_auroc": 0.9686479110465991,
+ "pixel_au_pr": 0.29322576468181716,
+ "pixel_average_precision": 0.29326625902921355
+ },
+ "seconds": 79.89875999998185
+ },
+ "pipe_fryum": {
+ "official_train_normals": 450,
+ "official_test_images": 150,
+ "benchmark_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.9705999999999999,
+ "au_pr": 0.986018793690163,
+ "average_precision": 0.9860860317049225,
+ "pixel_auroc": 0.9909730291737511,
+ "pixel_au_pr": 0.6018618957896934,
+ "pixel_average_precision": 0.6018712895066785
+ },
+ {
+ "seed": 43,
+ "auroc": 0.9704,
+ "au_pr": 0.9865430967562028,
+ "average_precision": 0.9866053109369469,
+ "pixel_auroc": 0.9909667466666388,
+ "pixel_au_pr": 0.6029888315587789,
+ "pixel_average_precision": 0.6030140367863087
+ },
+ {
+ "seed": 44,
+ "auroc": 0.97,
+ "au_pr": 0.9858010839067707,
+ "average_precision": 0.9858702591168634,
+ "pixel_auroc": 0.9908645972891833,
+ "pixel_au_pr": 0.598149986807201,
+ "pixel_average_precision": 0.5981538458958431
+ }
+ ],
+ "benchmark_mean": {
+ "auroc": 0.9703333333333332,
+ "au_pr": 0.9861209914510455,
+ "average_precision": 0.9861872005862442,
+ "pixel_auroc": 0.990934791043191,
+ "pixel_au_pr": 0.6010002380518911,
+ "pixel_average_precision": 0.6010130573962768
+ },
+ "benchmark_std": {
+ "auroc": 0.0003055050463303678,
+ "au_pr": 0.00038141716522415526,
+ "average_precision": 0.0003778248952397656,
+ "pixel_auroc": 6.087068095707952e-05,
+ "pixel_au_pr": 0.00253188569554477,
+ "pixel_average_precision": 0.0025412173538354992
+ },
+ "deployment_holdout_profile": {
+ "seed": 42,
+ "threshold": 0.08634456992149353,
+ "fit_normals": 405,
+ "validation_normals": 45,
+ "auroc": 0.9686,
+ "au_pr": 0.9859739502798138,
+ "average_precision": 0.9860378036811346,
+ "pixel_auroc": 0.9907989950706518,
+ "pixel_au_pr": 0.603420526628673,
+ "pixel_average_precision": 0.6034129205109321
+ },
+ "seconds": 66.45045070000924
+ }
+ },
+ "macro_mean": {
+ "auroc": 0.8538392280894755,
+ "au_pr": 0.8646743814043232,
+ "average_precision": 0.8658458138046231,
+ "pixel_auroc": 0.9296270879250635,
+ "pixel_au_pr": 0.33294457605927946,
+ "pixel_average_precision": 0.33296395330821005
+ },
+ "macro_runs": [
+ {
+ "seed": 42,
+ "auroc": 0.8522694719471947,
+ "au_pr": 0.8640922402477029,
+ "average_precision": 0.865162338776563,
+ "pixel_auroc": 0.9296959680169444,
+ "pixel_au_pr": 0.3323531283802899,
+ "pixel_average_precision": 0.3323688554659699
+ },
+ {
+ "seed": 43,
+ "auroc": 0.8551842684268426,
+ "au_pr": 0.8631541904260733,
+ "average_precision": 0.8644903567475731,
+ "pixel_auroc": 0.9303334186403451,
+ "pixel_au_pr": 0.33337858317582486,
+ "pixel_average_precision": 0.3333979243678186
+ },
+ {
+ "seed": 44,
+ "auroc": 0.8540639438943894,
+ "au_pr": 0.8667767135391936,
+ "average_precision": 0.8678847458897335,
+ "pixel_auroc": 0.9288518771179008,
+ "pixel_au_pr": 0.3331020166217237,
+ "pixel_average_precision": 0.3331250800908418
+ }
+ ],
+ "macro_std": {
+ "auroc": 0.0014703341539172223,
+ "au_pr": 0.001880115600420924,
+ "average_precision": 0.0017974490250325652,
+ "pixel_auroc": 0.0007431686692634315,
+ "pixel_au_pr": 0.0005305469182348207,
+ "pixel_average_precision": 0.0005331201377259799
+ }
+}
\ No newline at end of file
diff --git a/results/recall_threshold_audit.json b/results/recall_threshold_audit.json
new file mode 100644
index 0000000000000000000000000000000000000000..fa272d270d7621ed0c1b35f02598efb352d29748
--- /dev/null
+++ b/results/recall_threshold_audit.json
@@ -0,0 +1,744 @@
+{
+ "scope": "Cached-score retrospective threshold sensitivity audit; no inference, training or activation",
+ "limitations": [
+ "Official test results were previously seen; candidate figures are descriptive, not independent validation.",
+ "Quantiles use only saved held-out normal scores; no anomalous labels choose thresholds.",
+ "A 95th-percentile calibration threshold does not guarantee a 5% future false-positive rate.",
+ "Binary metrics use score >= threshold; the dashboard review band is separate.",
+ "Changing a threshold does not improve AUROC or feature separation."
+ ],
+ "source_sha256": {
+ "results\\highres_deployment_evaluation.json": "4265f2fe45c49d3e71dacba9883e935b190829511fa42ecbc45c26e495984ec0",
+ "experiments\\dinov2_highres_v1\\pcb1\\normal_calibration.json": "8224a5c38e21ae2b65497c109f45ce586e231525d43946779e0309225faf7010",
+ "experiments\\dinov2_highres_v1\\pcb1\\test_progress.json": "ba9bdde38b06df345c8f5a72ff1358a40d04287f609cac4bbac629cd652e6640",
+ "experiments\\dinov2_highres_v1\\pcb1\\split.json": "670c905634b682aa22a43e16921c70dc3381f060a641a42c5900e45d42826951",
+ "experiments\\dinov2_highres_v1\\capsules\\normal_calibration.json": "05a2f76ac29bb3d3e794155587f90e2ad3099b2df1bc14b0c8b6447aaab6f4f6",
+ "experiments\\dinov2_highres_v1\\capsules\\test_progress.json": "a214382658449bec9468a1d1103775cfa989b9f4d96c728ea756b1539c7a05e6",
+ "experiments\\dinov2_highres_v1\\capsules\\split.json": "b04f86d9725fa3f4e928f0990c9c46a2998a455a87fda9af3c880fe1f9455026",
+ "experiments\\dinov2_highres_v1\\cashew\\normal_calibration.json": "20b872ab18468386c96cee420ecddff58d4d9bb40ceb16edbb77a7965413dac2",
+ "experiments\\dinov2_highres_v1\\cashew\\test_progress.json": "dc236ba067baeac20b431da6b323abdcccadbfdd4fb58148f26dd0b2fd4733c1",
+ "experiments\\dinov2_highres_v1\\cashew\\split.json": "1230b8934b17721d73c7bb42fbf0133215ab298cecc128db128a4a1f5882dbd9",
+ "experiments\\dinov2_highres_v1\\candle\\normal_calibration.json": "097689c7796940d5bcb30117fa22f454b906c519d7a4472bdd87e6434a3eb500",
+ "experiments\\dinov2_highres_v1\\candle\\test_progress.json": "2ec3a02bcc0c95d94242d4d31469b53126ddeae9ce5d777f0706dec984c362b2",
+ "experiments\\dinov2_highres_v1\\candle\\split.json": "3ca3e0ec7c4bcdd1c3f1dbf514f9738c54b64c43969c7eb63f2010fb11bef97c",
+ "experiments\\dinov2_highres_v1\\chewinggum\\normal_calibration.json": "012178e1e91e311e511a7f8b2ebabbff4fe1146a7d6a2227e374c264c763b995",
+ "experiments\\dinov2_highres_v1\\chewinggum\\test_progress.json": "ea5102f1d9e668ad8ff256dfcba10813b3f3723e0b09606b87745f71347b1a0f",
+ "experiments\\dinov2_highres_v1\\chewinggum\\split.json": "74140280cc04a1ff9e8601eebb3993e93660a2e08f502f20a77fa537ec5c9c5f",
+ "experiments\\dinov2_highres_v1\\fryum\\normal_calibration.json": "6cd8984692afd2c20825b45a2c18d07550367510e376ce6c70d5bb2e44990432",
+ "experiments\\dinov2_highres_v1\\fryum\\test_progress.json": "52e7dababf991acdeda16907ae38cc9a2599a0164becbfcd7b3bbd96658c944f",
+ "experiments\\dinov2_highres_v1\\fryum\\split.json": "d8299af1bde3b8ab33203b70a7bef23065d77e7ad79584c624cea0cdb798e64a",
+ "experiments\\dinov2_highres_v1\\macaroni1\\normal_calibration.json": "6c83ed692639479b8b18914c7bea0c884eea7a1c0583106ea9bcd3d30c01dfde",
+ "experiments\\dinov2_highres_v1\\macaroni1\\test_progress.json": "d67ebfb2159c5dbe1cee314c300deb04123751caefd99288e99961dcfac1bb04",
+ "experiments\\dinov2_highres_v1\\macaroni1\\split.json": "a3a574b24b07d280a885831cd9fec1f80f82de44253a379c2bc07bd5c9e907af",
+ "experiments\\dinov2_highres_v1\\macaroni2\\normal_calibration.json": "8c80102797cc6d81fd1862ec5c27465b3293e206ccb0b2af40973526a93a96a6",
+ "experiments\\dinov2_highres_v1\\macaroni2\\test_progress.json": "12bfe59625f5039623c341451c9e4ce0721271d98d7a8a815b2dc443465a88d8",
+ "experiments\\dinov2_highres_v1\\macaroni2\\split.json": "b41ba3494fde3fe899070535f714d93f32a6e5e203d3e8fc75fea750a09b0c7d",
+ "experiments\\dinov2_highres_v1\\pcb2\\normal_calibration.json": "3b0713db8eebc9f7ea81ac1e758c42799e325aa0050a3c0c2ac1454e7457cd3a",
+ "experiments\\dinov2_highres_v1\\pcb2\\test_progress.json": "3b08920766efc75a65d1f7f4518adb086241b0ba71e2659a20edcf57a783afdb",
+ "experiments\\dinov2_highres_v1\\pcb2\\split.json": "626c087bef490ffa06313a7bc34ad576fa542132a22d851bda1c94b491ded910",
+ "experiments\\dinov2_highres_v1\\pcb3\\normal_calibration.json": "2c0e355bca9f8554fad3715d3a31acf733b30788c7b7e97a931cd24fb4d6ebd3",
+ "experiments\\dinov2_highres_v1\\pcb3\\test_progress.json": "e5e8d8d7adb1198b6cdca2f5bda7da0e71b4e30a672ae93714eb6efe7aefff0b",
+ "experiments\\dinov2_highres_v1\\pcb3\\split.json": "7a3e10136f3b3fc8a685d7a0d4ea68cea75a2209c8830c5dda68fca49815d40e",
+ "experiments\\dinov2_highres_v1\\pcb4\\normal_calibration.json": "2b364ef709f3ead9196871d7f0351ae38f477fbf98d6f94ca8607128a853b28a",
+ "experiments\\dinov2_highres_v1\\pcb4\\test_progress.json": "dd844a6415590d7effee5ba32eb7f2fbd737d7967efafebd845af506fd7685ae",
+ "experiments\\dinov2_highres_v1\\pcb4\\split.json": "daf4d2ea383d1bef700437ba319af2951e422d7502ba99a95c3c7687a4a663f3",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\normal_calibration.json": "21b3357ff4836e8b4d7fb7fee7e48fc7579a62d9c11dbf888f2de05397a88d56",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\test_progress.json": "0af8805dd69be9f39b2bedb13f8bd15e853f326e1ed9940b540d26ff01cf6dbf",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\split.json": "977399dcd45b85490bafa95dc1a3244d604f26833509f69244f18a1bf035a855"
+ },
+ "categories": {
+ "pcb1": {
+ "calibration_normals": 91,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.16181933879852295,
+ "precision": 0.9512195121951219,
+ "recall": 0.78,
+ "f1": 0.8571428571428571,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 96,
+ 4
+ ],
+ [
+ 22,
+ 78
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.1558048605918884,
+ "precision": 0.9425287356321839,
+ "recall": 0.82,
+ "f1": 0.877005347593583,
+ "false_positive_rate": 0.05,
+ "confusion_matrix": [
+ [
+ 95,
+ 5
+ ],
+ [
+ 18,
+ 82
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.1414354294538498,
+ "precision": 0.9148936170212766,
+ "recall": 0.86,
+ "f1": 0.8865979381443299,
+ "false_positive_rate": 0.08,
+ "confusion_matrix": [
+ [
+ 92,
+ 8
+ ],
+ [
+ 14,
+ 86
+ ]
+ ]
+ }
+ }
+ },
+ "capsules": {
+ "calibration_normals": 55,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.19718621671199799,
+ "precision": 1.0,
+ "recall": 0.48,
+ "f1": 0.6486486486486487,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 60,
+ 0
+ ],
+ [
+ 52,
+ 48
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.1879240581393242,
+ "precision": 1.0,
+ "recall": 0.56,
+ "f1": 0.717948717948718,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 60,
+ 0
+ ],
+ [
+ 44,
+ 56
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.1439922600984573,
+ "precision": 0.9425287356321839,
+ "recall": 0.82,
+ "f1": 0.877005347593583,
+ "false_positive_rate": 0.08333333333333333,
+ "confusion_matrix": [
+ [
+ 55,
+ 5
+ ],
+ [
+ 18,
+ 82
+ ]
+ ]
+ }
+ }
+ },
+ "cashew": {
+ "calibration_normals": 45,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.13224798440933228,
+ "precision": 0.9263157894736842,
+ "recall": 0.88,
+ "f1": 0.9025641025641025,
+ "false_positive_rate": 0.14,
+ "confusion_matrix": [
+ [
+ 43,
+ 7
+ ],
+ [
+ 12,
+ 88
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.13198935627937317,
+ "precision": 0.9081632653061225,
+ "recall": 0.89,
+ "f1": 0.8989898989898989,
+ "false_positive_rate": 0.18,
+ "confusion_matrix": [
+ [
+ 41,
+ 9
+ ],
+ [
+ 11,
+ 89
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.1289861112833023,
+ "precision": 0.9090909090909091,
+ "recall": 0.9,
+ "f1": 0.9045226130653266,
+ "false_positive_rate": 0.18,
+ "confusion_matrix": [
+ [
+ 41,
+ 9
+ ],
+ [
+ 10,
+ 90
+ ]
+ ]
+ }
+ }
+ },
+ "candle": {
+ "calibration_normals": 90,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.22504067420959473,
+ "precision": 1.0,
+ "recall": 0.48,
+ "f1": 0.6486486486486487,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 52,
+ 48
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.19200063869357106,
+ "precision": 0.9565217391304348,
+ "recall": 0.66,
+ "f1": 0.7810650887573966,
+ "false_positive_rate": 0.03,
+ "confusion_matrix": [
+ [
+ 97,
+ 3
+ ],
+ [
+ 34,
+ 66
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.15027016177773475,
+ "precision": 0.8787878787878788,
+ "recall": 0.87,
+ "f1": 0.8743718592964824,
+ "false_positive_rate": 0.12,
+ "confusion_matrix": [
+ [
+ 88,
+ 12
+ ],
+ [
+ 13,
+ 87
+ ]
+ ]
+ }
+ }
+ },
+ "chewinggum": {
+ "calibration_normals": 46,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.1614319533109665,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.160120440274477,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.15658171474933624,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ]
+ }
+ }
+ },
+ "fryum": {
+ "calibration_normals": 45,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.15253151953220367,
+ "precision": 1.0,
+ "recall": 0.88,
+ "f1": 0.9361702127659575,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 50,
+ 0
+ ],
+ [
+ 12,
+ 88
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.15148975551128388,
+ "precision": 0.9887640449438202,
+ "recall": 0.88,
+ "f1": 0.9312169312169312,
+ "false_positive_rate": 0.02,
+ "confusion_matrix": [
+ [
+ 49,
+ 1
+ ],
+ [
+ 12,
+ 88
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.13227128088474271,
+ "precision": 0.9894736842105263,
+ "recall": 0.94,
+ "f1": 0.964102564102564,
+ "false_positive_rate": 0.02,
+ "confusion_matrix": [
+ [
+ 49,
+ 1
+ ],
+ [
+ 6,
+ 94
+ ]
+ ]
+ }
+ }
+ },
+ "macaroni1": {
+ "calibration_normals": 90,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.21722275018692017,
+ "precision": 1.0,
+ "recall": 0.15,
+ "f1": 0.2608695652173913,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 85,
+ 15
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.17386433541774746,
+ "precision": 1.0,
+ "recall": 0.32,
+ "f1": 0.48484848484848486,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 68,
+ 32
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.14440965577960013,
+ "precision": 0.9827586206896551,
+ "recall": 0.57,
+ "f1": 0.721518987341772,
+ "false_positive_rate": 0.01,
+ "confusion_matrix": [
+ [
+ 99,
+ 1
+ ],
+ [
+ 43,
+ 57
+ ]
+ ]
+ }
+ }
+ },
+ "macaroni2": {
+ "calibration_normals": 90,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.15817631781101227,
+ "precision": 0.8928571428571429,
+ "recall": 0.25,
+ "f1": 0.39062500000000006,
+ "false_positive_rate": 0.03,
+ "confusion_matrix": [
+ [
+ 97,
+ 3
+ ],
+ [
+ 75,
+ 25
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.15010178178548814,
+ "precision": 0.8863636363636364,
+ "recall": 0.39,
+ "f1": 0.5416666666666667,
+ "false_positive_rate": 0.05,
+ "confusion_matrix": [
+ [
+ 95,
+ 5
+ ],
+ [
+ 61,
+ 39
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.144144269824028,
+ "precision": 0.8727272727272727,
+ "recall": 0.48,
+ "f1": 0.6193548387096774,
+ "false_positive_rate": 0.07,
+ "confusion_matrix": [
+ [
+ 93,
+ 7
+ ],
+ [
+ 52,
+ 48
+ ]
+ ]
+ }
+ }
+ },
+ "pcb2": {
+ "calibration_normals": 91,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.341839998960495,
+ "precision": 1.0,
+ "recall": 0.01,
+ "f1": 0.019801980198019802,
+ "false_positive_rate": 0.0,
+ "confusion_matrix": [
+ [
+ 100,
+ 0
+ ],
+ [
+ 99,
+ 1
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.19173807054757977,
+ "precision": 0.9574468085106383,
+ "recall": 0.45,
+ "f1": 0.6122448979591837,
+ "false_positive_rate": 0.02,
+ "confusion_matrix": [
+ [
+ 98,
+ 2
+ ],
+ [
+ 55,
+ 45
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.1252228133380413,
+ "precision": 0.875,
+ "recall": 0.84,
+ "f1": 0.8571428571428572,
+ "false_positive_rate": 0.12,
+ "confusion_matrix": [
+ [
+ 88,
+ 12
+ ],
+ [
+ 16,
+ 84
+ ]
+ ]
+ }
+ }
+ },
+ "pcb3": {
+ "calibration_normals": 91,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.16282716393470764,
+ "precision": 0.9857142857142858,
+ "recall": 0.69,
+ "f1": 0.8117647058823529,
+ "false_positive_rate": 0.009900990099009901,
+ "confusion_matrix": [
+ [
+ 100,
+ 1
+ ],
+ [
+ 31,
+ 69
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.15042599737644188,
+ "precision": 0.9736842105263158,
+ "recall": 0.74,
+ "f1": 0.8409090909090909,
+ "false_positive_rate": 0.019801980198019802,
+ "confusion_matrix": [
+ [
+ 99,
+ 2
+ ],
+ [
+ 26,
+ 74
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.1346755474805832,
+ "precision": 0.90625,
+ "recall": 0.87,
+ "f1": 0.8877551020408163,
+ "false_positive_rate": 0.0891089108910891,
+ "confusion_matrix": [
+ [
+ 92,
+ 9
+ ],
+ [
+ 13,
+ 87
+ ]
+ ]
+ }
+ }
+ },
+ "pcb4": {
+ "calibration_normals": 91,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.17516569793224335,
+ "precision": 0.9855072463768116,
+ "recall": 0.68,
+ "f1": 0.804733727810651,
+ "false_positive_rate": 0.009900990099009901,
+ "confusion_matrix": [
+ [
+ 100,
+ 1
+ ],
+ [
+ 32,
+ 68
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.17460284978151322,
+ "precision": 0.9857142857142858,
+ "recall": 0.69,
+ "f1": 0.8117647058823529,
+ "false_positive_rate": 0.009900990099009901,
+ "confusion_matrix": [
+ [
+ 100,
+ 1
+ ],
+ [
+ 31,
+ 69
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.1401524841785431,
+ "precision": 0.96,
+ "recall": 0.96,
+ "f1": 0.96,
+ "false_positive_rate": 0.039603960396039604,
+ "confusion_matrix": [
+ [
+ 97,
+ 4
+ ],
+ [
+ 4,
+ 96
+ ]
+ ]
+ }
+ }
+ },
+ "pipe_fryum": {
+ "calibration_normals": 45,
+ "policies": {
+ "current_maximum": {
+ "threshold": 0.18373285233974457,
+ "precision": 0.98989898989899,
+ "recall": 0.98,
+ "f1": 0.9849246231155778,
+ "false_positive_rate": 0.02,
+ "confusion_matrix": [
+ [
+ 49,
+ 1
+ ],
+ [
+ 2,
+ 98
+ ]
+ ]
+ },
+ "diagnostic_normal_q99": {
+ "threshold": 0.18263802647590638,
+ "precision": 0.98,
+ "recall": 0.98,
+ "f1": 0.98,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 2,
+ 98
+ ]
+ ]
+ },
+ "diagnostic_normal_q95": {
+ "threshold": 0.17671903371810913,
+ "precision": 0.9801980198019802,
+ "recall": 0.99,
+ "f1": 0.9850746268656716,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 1,
+ 99
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "checks": "All 12 saved confusion matrices and precision/recall/F1 reproduced; labels, counts and content splits checked.",
+ "macro_mean": {
+ "current_maximum": {
+ "precision": 0.9759254002708942,
+ "recall": 0.6016666666666667,
+ "f1": 0.6862992534742647,
+ "false_positive_rate": 0.024150165016501652
+ },
+ "diagnostic_normal_q99": {
+ "precision": 0.9632315469051776,
+ "recall": 0.695,
+ "f1": 0.7872797333724396,
+ "false_positive_rate": 0.03830858085808581
+ },
+ "diagnostic_normal_q95": {
+ "precision": 0.932608381224698,
+ "recall": 0.8383333333333334,
+ "f1": 0.8755953086666709,
+ "false_positive_rate": 0.07433718371837184
+ }
+ }
+}
diff --git a/results/sensitive_deployment_evaluation.json b/results/sensitive_deployment_evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..7fc8c184c1d065269633369536fc63b291858777
--- /dev/null
+++ b/results/sensitive_deployment_evaluation.json
@@ -0,0 +1,710 @@
+{
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "protocol": "Official VisA test assignments; same frozen DINOv2 operational banks. Threshold is the fixed linear 95th percentile of the existing content-grouped held-out training-normal scores. All categories use the same quantile; no test-label optimization. Retrospective development evaluation, not independent validation.",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "device": "cuda",
+ "categories": {
+ "pcb1": {
+ "category": "pcb1",
+ "available": true,
+ "model_id": "dinov2-highres-pcb1-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "14e71cb6285f22e3d12d2b0d6357c552a26685a8f03a9b626a3e8999e8a89c65",
+ "threshold": 0.1414354294538498,
+ "uncertainty_margin": 0.00707177147269249,
+ "heatmap_scale": 0.10316987216472613,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23237446,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9597,
+ "average_precision": 0.9564653221826244,
+ "precision": 0.9148936170212766,
+ "recall": 0.86,
+ "f1": 0.8865979381443299,
+ "confusion_matrix": [
+ [
+ 92,
+ 8
+ ],
+ [
+ 14,
+ 86
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9946015614062951,
+ "pixel_average_precision_224": 0.8562862818777615,
+ "uncertain_fraction": 0.07,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.08
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.16181933879852295,
+ "decision_policy": "normal-q95-v1"
+ },
+ "capsules": {
+ "category": "capsules",
+ "available": true,
+ "model_id": "dinov2-highres-capsules-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "fa34f8c1a203e609450e57156d5f75ca157140d88d07d0bf46947c3029675c55",
+ "threshold": 0.1439922600984573,
+ "uncertainty_margin": 0.007199613004922866,
+ "heatmap_scale": 0.1274158811569204,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 22108790,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 55,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 487,
+ "metrics": {
+ "image_auroc": 0.9683333333333333,
+ "average_precision": 0.9798232872953215,
+ "precision": 0.9425287356321839,
+ "recall": 0.82,
+ "f1": 0.877005347593583,
+ "confusion_matrix": [
+ [
+ 55,
+ 5
+ ],
+ [
+ 18,
+ 82
+ ]
+ ],
+ "n_images": 160,
+ "pixel_auroc_224": 0.9704973188279925,
+ "pixel_average_precision_224": 0.403655563796705,
+ "uncertain_fraction": 0.0875,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.08333333333333333
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.19718621671199799,
+ "decision_policy": "normal-q95-v1"
+ },
+ "cashew": {
+ "category": "cashew",
+ "available": true,
+ "model_id": "dinov2-highres-cashew-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "4b908b22f79158fb46c0e591610d5c9470d588d4f0d017dd0bb493a58e64c693",
+ "threshold": 0.1289861112833023,
+ "uncertainty_margin": 0.006449305564165116,
+ "heatmap_scale": 0.10505769878625872,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18366576,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9608000000000001,
+ "average_precision": 0.9817707260519815,
+ "precision": 0.9090909090909091,
+ "recall": 0.9,
+ "f1": 0.9045226130653266,
+ "confusion_matrix": [
+ [
+ 41,
+ 9
+ ],
+ [
+ 10,
+ 90
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9960830910862268,
+ "pixel_average_precision_224": 0.7034966403298871,
+ "uncertain_fraction": 0.06,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.18
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.13224798440933228,
+ "decision_policy": "normal-q95-v1"
+ },
+ "candle": {
+ "category": "candle",
+ "available": true,
+ "model_id": "dinov2-highres-candle-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "bb6767014719520899e8d2336ea2811ae8dadabb210a8855f7497f2ac48ab7ad",
+ "threshold": 0.15027016177773475,
+ "uncertainty_margin": 0.007513508088886738,
+ "heatmap_scale": 0.1193666505813595,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23244689,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9410000000000001,
+ "average_precision": 0.9459465742669609,
+ "precision": 0.8787878787878788,
+ "recall": 0.87,
+ "f1": 0.8743718592964824,
+ "confusion_matrix": [
+ [
+ 88,
+ 12
+ ],
+ [
+ 13,
+ 87
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9911336061961822,
+ "pixel_average_precision_224": 0.33767271945011856,
+ "uncertain_fraction": 0.055,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.12
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.22504067420959473,
+ "decision_policy": "normal-q95-v1"
+ },
+ "chewinggum": {
+ "category": "chewinggum",
+ "available": true,
+ "model_id": "dinov2-highres-chewinggum-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "37165883dcc6304f60346c2052c7fa4151d4048b44fdb80a4f60ffc48477ed7d",
+ "threshold": 0.15658171474933624,
+ "uncertainty_margin": 0.007829085737466813,
+ "heatmap_scale": 0.11275605440139722,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18458527,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 46,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 407,
+ "metrics": {
+ "image_auroc": 0.9885999999999999,
+ "average_precision": 0.9944721280040146,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9952665200400623,
+ "pixel_average_precision_224": 0.6597053568827396,
+ "uncertain_fraction": 0.0,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.04
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.1614319533109665,
+ "decision_policy": "normal-q95-v1"
+ },
+ "fryum": {
+ "category": "fryum",
+ "available": true,
+ "model_id": "dinov2-highres-fryum-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "ca73c0cd2b2e75d80874f7dd6270f09b13c55292fa93b1da1eeef361d8375ba4",
+ "threshold": 0.13227128088474271,
+ "uncertainty_margin": 0.006613564044237136,
+ "heatmap_scale": 0.10057919770479187,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18381371,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9924,
+ "average_precision": 0.9963591766254614,
+ "precision": 0.9894736842105263,
+ "recall": 0.94,
+ "f1": 0.964102564102564,
+ "confusion_matrix": [
+ [
+ 49,
+ 1
+ ],
+ [
+ 6,
+ 94
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9735429349543053,
+ "pixel_average_precision_224": 0.4360142987071739,
+ "uncertain_fraction": 0.03333333333333333,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.02
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.15253151953220367,
+ "decision_policy": "normal-q95-v1"
+ },
+ "macaroni1": {
+ "category": "macaroni1",
+ "available": true,
+ "model_id": "dinov2-highres-macaroni1-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "28ebf491e124df62266c5c3b72ea5bfebb50ef93c189d5615d3ae866e8675432",
+ "threshold": 0.14440965577960013,
+ "uncertainty_margin": 0.007220482788980007,
+ "heatmap_scale": 0.09929629743099211,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23251984,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.909,
+ "average_precision": 0.9254645749095916,
+ "precision": 0.9827586206896551,
+ "recall": 0.57,
+ "f1": 0.721518987341772,
+ "confusion_matrix": [
+ [
+ 99,
+ 1
+ ],
+ [
+ 43,
+ 57
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9932559185087934,
+ "pixel_average_precision_224": 0.22125282869927704,
+ "uncertain_fraction": 0.1,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.01
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.21722275018692017,
+ "decision_policy": "normal-q95-v1"
+ },
+ "macaroni2": {
+ "category": "macaroni2",
+ "available": true,
+ "model_id": "dinov2-highres-macaroni2-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "8dfe4f82ece83668ea4a97c18ef134ab16bea8ab6d2913959eb810942537737a",
+ "threshold": 0.144144269824028,
+ "uncertainty_margin": 0.0072072134912014,
+ "heatmap_scale": 0.11770220518112187,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23243554,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.845,
+ "average_precision": 0.8446602099722114,
+ "precision": 0.8727272727272727,
+ "recall": 0.48,
+ "f1": 0.6193548387096774,
+ "confusion_matrix": [
+ [
+ 93,
+ 7
+ ],
+ [
+ 52,
+ 48
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9942242061289198,
+ "pixel_average_precision_224": 0.15769057747120718,
+ "uncertain_fraction": 0.19,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.07
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.15817631781101227,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pcb2": {
+ "category": "pcb2",
+ "available": true,
+ "model_id": "dinov2-highres-pcb2-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "694689b6703e399ea4076343a40ddff6a920f67c0c344048f0b2ef6402f3abb8",
+ "threshold": 0.1252228133380413,
+ "uncertainty_margin": 0.006261140666902066,
+ "heatmap_scale": 0.09851976394653338,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23253151,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9062,
+ "average_precision": 0.9098166487308751,
+ "precision": 0.875,
+ "recall": 0.84,
+ "f1": 0.8571428571428572,
+ "confusion_matrix": [
+ [
+ 88,
+ 12
+ ],
+ [
+ 16,
+ 84
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9714470671684394,
+ "pixel_average_precision_224": 0.26303790724220233,
+ "uncertain_fraction": 0.09,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.12
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.341839998960495,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pcb3": {
+ "category": "pcb3",
+ "available": true,
+ "model_id": "dinov2-highres-pcb3-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "704ee7d0827ede2b0a795a0efae8eb524751d2d1cb054cf7278c22888550a44c",
+ "threshold": 0.1346755474805832,
+ "uncertainty_margin": 0.00673377737402916,
+ "heatmap_scale": 0.1029075479507446,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23242572,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 814,
+ "metrics": {
+ "image_auroc": 0.9547524752475247,
+ "average_precision": 0.9645187368797429,
+ "precision": 0.90625,
+ "recall": 0.87,
+ "f1": 0.8877551020408163,
+ "confusion_matrix": [
+ [
+ 92,
+ 9
+ ],
+ [
+ 13,
+ 87
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9805302802001331,
+ "pixel_average_precision_224": 0.33774957148695994,
+ "uncertain_fraction": 0.08955223880597014,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.0891089108910891
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.16282716393470764,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pcb4": {
+ "category": "pcb4",
+ "available": true,
+ "model_id": "dinov2-highres-pcb4-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "8847deec2a0b8daab9139e7680d502352161e994bb5d2fe4bc313df6af4cc5d5",
+ "threshold": 0.1401524841785431,
+ "uncertainty_margin": 0.007007624208927155,
+ "heatmap_scale": 0.10422959923744202,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23248613,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9865346534653465,
+ "average_precision": 0.9822685098306626,
+ "precision": 0.96,
+ "recall": 0.96,
+ "f1": 0.96,
+ "confusion_matrix": [
+ [
+ 97,
+ 4
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9806894408642699,
+ "pixel_average_precision_224": 0.3216614985757051,
+ "uncertain_fraction": 0.04477611940298507,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.039603960396039604
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.17516569793224335,
+ "decision_policy": "normal-q95-v1"
+ },
+ "pipe_fryum": {
+ "category": "pipe_fryum",
+ "available": true,
+ "model_id": "dinov2-highres-pipe_fryum-v1-q95-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation",
+ "profile": "dinov2_highres_v1",
+ "encoder_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
+ "bank_sha256": "e28bf35ca2e553dd21821230f34682b94b11a5d203459f61049a774663c0d819",
+ "threshold": 0.17671903371810913,
+ "uncertainty_margin": 0.008835951685905457,
+ "heatmap_scale": 0.1333938717842105,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 18401041,
+ "encoder_size_bytes": 88249960,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "normal-q95-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9891999999999999,
+ "average_precision": 0.9951337553868363,
+ "precision": 0.9801980198019802,
+ "recall": 0.99,
+ "f1": 0.9850746268656716,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 1,
+ 99
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9927315263511816,
+ "pixel_average_precision_224": 0.47984772131593945,
+ "uncertain_fraction": 0.013333333333333334,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null,
+ "false_positive_rate": 0.04
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "baseline_threshold": 0.18373285233974457,
+ "decision_policy": "normal-q95-v1"
+ }
+ },
+ "macro_mean": {
+ "image_auroc": 0.950126705170517,
+ "average_precision": 0.956391637511357,
+ "precision": 0.932608381224698,
+ "recall": 0.8383333333333334,
+ "f1": 0.8755953086666709,
+ "pixel_auroc_224": 0.9861669559777334,
+ "pixel_average_precision_224": 0.4315059138196397,
+ "false_positive_rate": 0.07433718371837184
+ },
+ "decision_policy": "normal-q95-v1",
+ "baseline_evaluation_sha256": "4265f2fe45c49d3e71dacba9883e935b190829511fa42ecbc45c26e495984ec0",
+ "validation_scope": "Normal-only calibration and cached-score/software consistency checks; future recall and false-alarm rates are not guaranteed.",
+ "decision_policy_reason": "User requested prioritizing anomaly recall and accepts more false alarms.",
+ "policy_selection_context": "Policy adopted after viewing retrospective threshold-sensitivity results; not an independent or test-blind validation.",
+ "source_sha256": {
+ "experiments\\dinov2_highres_v1\\pcb1\\normal_calibration.json": "8224a5c38e21ae2b65497c109f45ce586e231525d43946779e0309225faf7010",
+ "experiments\\dinov2_highres_v1\\pcb1\\test_progress.json": "ba9bdde38b06df345c8f5a72ff1358a40d04287f609cac4bbac629cd652e6640",
+ "experiments\\dinov2_highres_v1\\capsules\\normal_calibration.json": "05a2f76ac29bb3d3e794155587f90e2ad3099b2df1bc14b0c8b6447aaab6f4f6",
+ "experiments\\dinov2_highres_v1\\capsules\\test_progress.json": "a214382658449bec9468a1d1103775cfa989b9f4d96c728ea756b1539c7a05e6",
+ "experiments\\dinov2_highres_v1\\cashew\\normal_calibration.json": "20b872ab18468386c96cee420ecddff58d4d9bb40ceb16edbb77a7965413dac2",
+ "experiments\\dinov2_highres_v1\\cashew\\test_progress.json": "dc236ba067baeac20b431da6b323abdcccadbfdd4fb58148f26dd0b2fd4733c1",
+ "experiments\\dinov2_highres_v1\\candle\\normal_calibration.json": "097689c7796940d5bcb30117fa22f454b906c519d7a4472bdd87e6434a3eb500",
+ "experiments\\dinov2_highres_v1\\candle\\test_progress.json": "2ec3a02bcc0c95d94242d4d31469b53126ddeae9ce5d777f0706dec984c362b2",
+ "experiments\\dinov2_highres_v1\\chewinggum\\normal_calibration.json": "012178e1e91e311e511a7f8b2ebabbff4fe1146a7d6a2227e374c264c763b995",
+ "experiments\\dinov2_highres_v1\\chewinggum\\test_progress.json": "ea5102f1d9e668ad8ff256dfcba10813b3f3723e0b09606b87745f71347b1a0f",
+ "experiments\\dinov2_highres_v1\\fryum\\normal_calibration.json": "6cd8984692afd2c20825b45a2c18d07550367510e376ce6c70d5bb2e44990432",
+ "experiments\\dinov2_highres_v1\\fryum\\test_progress.json": "52e7dababf991acdeda16907ae38cc9a2599a0164becbfcd7b3bbd96658c944f",
+ "experiments\\dinov2_highres_v1\\macaroni1\\normal_calibration.json": "6c83ed692639479b8b18914c7bea0c884eea7a1c0583106ea9bcd3d30c01dfde",
+ "experiments\\dinov2_highres_v1\\macaroni1\\test_progress.json": "d67ebfb2159c5dbe1cee314c300deb04123751caefd99288e99961dcfac1bb04",
+ "experiments\\dinov2_highres_v1\\macaroni2\\normal_calibration.json": "8c80102797cc6d81fd1862ec5c27465b3293e206ccb0b2af40973526a93a96a6",
+ "experiments\\dinov2_highres_v1\\macaroni2\\test_progress.json": "12bfe59625f5039623c341451c9e4ce0721271d98d7a8a815b2dc443465a88d8",
+ "experiments\\dinov2_highres_v1\\pcb2\\normal_calibration.json": "3b0713db8eebc9f7ea81ac1e758c42799e325aa0050a3c0c2ac1454e7457cd3a",
+ "experiments\\dinov2_highres_v1\\pcb2\\test_progress.json": "3b08920766efc75a65d1f7f4518adb086241b0ba71e2659a20edcf57a783afdb",
+ "experiments\\dinov2_highres_v1\\pcb3\\normal_calibration.json": "2c0e355bca9f8554fad3715d3a31acf733b30788c7b7e97a931cd24fb4d6ebd3",
+ "experiments\\dinov2_highres_v1\\pcb3\\test_progress.json": "e5e8d8d7adb1198b6cdca2f5bda7da0e71b4e30a672ae93714eb6efe7aefff0b",
+ "experiments\\dinov2_highres_v1\\pcb4\\normal_calibration.json": "2b364ef709f3ead9196871d7f0351ae38f477fbf98d6f94ca8607128a853b28a",
+ "experiments\\dinov2_highres_v1\\pcb4\\test_progress.json": "dd844a6415590d7effee5ba32eb7f2fbd737d7967efafebd845af506fd7685ae",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\normal_calibration.json": "21b3357ff4836e8b4d7fb7fee7e48fc7579a62d9c11dbf888f2de05397a88d56",
+ "experiments\\dinov2_highres_v1\\pipe_fryum\\test_progress.json": "0af8805dd69be9f39b2bedb13f8bd15e853f326e1ed9940b540d26ff01cf6dbf"
+ }
+}
diff --git a/results/tuned_deployment_evaluation.json b/results/tuned_deployment_evaluation.json
new file mode 100644
index 0000000000000000000000000000000000000000..6216a3debd0558cf10ea832546a3691ed9095373
--- /dev/null
+++ b/results/tuned_deployment_evaluation.json
@@ -0,0 +1,722 @@
+{
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "protocol": "Official VisA test assignments. The DINOv2 encoder was fine-tuned on synthetic defects made from normal training images (last 4 blocks only). The memory bank is a 32,768-patch coreset of normal-image patches per product. Thresholds are the 95th percentile of held-out normal scores, the same rule for every product; held-out normals are never used to build the memory. Retrospective development evaluation on test images that were seen during development; not an untouched external test.",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "device": "cuda",
+ "categories": {
+ "pcb1": {
+ "category": "pcb1",
+ "available": true,
+ "model_id": "dinov2-tuned-pcb1-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "282ebe91a413a4c66a1f997552867a14a86c8c284100038c5445295184a4f5fd",
+ "threshold": 0.09390439838171005,
+ "uncertainty_margin": 0.004695219919085503,
+ "heatmap_scale": 0.07119274705648429,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23249131,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9788,
+ "average_precision": 0.976301821637879,
+ "precision": 0.912621359223301,
+ "recall": 0.94,
+ "f1": 0.9261083743842364,
+ "false_positive_rate": 0.09,
+ "confusion_matrix": [
+ [
+ 91,
+ 9
+ ],
+ [
+ 6,
+ 94
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9948781306534351,
+ "pixel_average_precision_224": 0.8829297562485579,
+ "uncertain_fraction": 0.055,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "capsules": {
+ "category": "capsules",
+ "available": true,
+ "model_id": "dinov2-tuned-capsules-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "f3d63549328eb250a5dda32a78e03e9f16b9537d38a5fa58c83e2defc97defde",
+ "threshold": 0.10395566150546073,
+ "uncertainty_margin": 0.005197783075273037,
+ "heatmap_scale": 0.09393790721893303,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23255377,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 55,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 487,
+ "metrics": {
+ "image_auroc": 0.9778333333333333,
+ "average_precision": 0.9833586325787514,
+ "precision": 0.96,
+ "recall": 0.96,
+ "f1": 0.96,
+ "false_positive_rate": 0.06666666666666667,
+ "confusion_matrix": [
+ [
+ 56,
+ 4
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 160,
+ "pixel_auroc_224": 0.9778261035822543,
+ "pixel_average_precision_224": 0.5149128125633966,
+ "uncertain_fraction": 0.0875,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "cashew": {
+ "category": "cashew",
+ "available": true,
+ "model_id": "dinov2-tuned-cashew-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "848a79463a73d9682bffbf7d397faea9bb74495146ea48a037bf2ebf4f4ed3f2",
+ "threshold": 0.10727595388889313,
+ "uncertainty_margin": 0.005363797694444657,
+ "heatmap_scale": 0.08695902496576309,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23238560,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.974,
+ "average_precision": 0.9879244189184127,
+ "precision": 0.9591836734693877,
+ "recall": 0.94,
+ "f1": 0.9494949494949495,
+ "false_positive_rate": 0.08,
+ "confusion_matrix": [
+ [
+ 46,
+ 4
+ ],
+ [
+ 6,
+ 94
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9968688031074235,
+ "pixel_average_precision_224": 0.7388969040994572,
+ "uncertain_fraction": 0.10666666666666667,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "candle": {
+ "category": "candle",
+ "available": true,
+ "model_id": "dinov2-tuned-candle-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "12775563ee1c641a96e03c92aafaa52594b8a5adf7d5b58934b64ece6cf7f824",
+ "threshold": 0.10769653692841528,
+ "uncertainty_margin": 0.005384826846420765,
+ "heatmap_scale": 0.08101917594671243,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23248556,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9599,
+ "average_precision": 0.9635102573657932,
+ "precision": 0.9052631578947369,
+ "recall": 0.86,
+ "f1": 0.8820512820512821,
+ "false_positive_rate": 0.09,
+ "confusion_matrix": [
+ [
+ 91,
+ 9
+ ],
+ [
+ 14,
+ 86
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9915738142390015,
+ "pixel_average_precision_224": 0.40608475735949057,
+ "uncertain_fraction": 0.035,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "chewinggum": {
+ "category": "chewinggum",
+ "available": true,
+ "model_id": "dinov2-tuned-chewinggum-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "c40c42e84c4cca85cf1a9e3e0316e41c7b7a6c29c7d959754a8fb9d709d232b8",
+ "threshold": 0.11576281487941742,
+ "uncertainty_margin": 0.005788140743970872,
+ "heatmap_scale": 0.09326122194528576,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23230985,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 46,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 407,
+ "metrics": {
+ "image_auroc": 0.9916,
+ "average_precision": 0.9964316707632301,
+ "precision": 0.9696969696969697,
+ "recall": 0.96,
+ "f1": 0.964824120603015,
+ "false_positive_rate": 0.06,
+ "confusion_matrix": [
+ [
+ 47,
+ 3
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9956113261527341,
+ "pixel_average_precision_224": 0.7341234993437673,
+ "uncertain_fraction": 0.02,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "fryum": {
+ "category": "fryum",
+ "available": true,
+ "model_id": "dinov2-tuned-fryum-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "a23e9ec257fc5b77bdf55cfa4c86ab11df8e6daee3b48223f8b094ed2106f64d",
+ "threshold": 0.10525055527687072,
+ "uncertainty_margin": 0.0052625277638435365,
+ "heatmap_scale": 0.07980967342853555,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23254817,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9902,
+ "average_precision": 0.9951603881086932,
+ "precision": 0.9795918367346939,
+ "recall": 0.96,
+ "f1": 0.9696969696969697,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 4,
+ 96
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9809775229522469,
+ "pixel_average_precision_224": 0.4965360876901288,
+ "uncertain_fraction": 0.02,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "macaroni1": {
+ "category": "macaroni1",
+ "available": true,
+ "model_id": "dinov2-tuned-macaroni1-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "bb91183ddb84d8b0168988546c4186cf6de6512e4d72196a0a4b13fd9699d148",
+ "threshold": 0.09831828400492666,
+ "uncertainty_margin": 0.004915914200246334,
+ "heatmap_scale": 0.07764787554740862,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23276388,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9471999999999999,
+ "average_precision": 0.9581494503739729,
+ "precision": 0.9493670886075949,
+ "recall": 0.75,
+ "f1": 0.8379888268156425,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 96,
+ 4
+ ],
+ [
+ 25,
+ 75
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9962604306654536,
+ "pixel_average_precision_224": 0.1985339563300542,
+ "uncertain_fraction": 0.08,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "macaroni2": {
+ "category": "macaroni2",
+ "available": true,
+ "model_id": "dinov2-tuned-macaroni2-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "565bf9acc0869b52f4ffd1f6a9d8d3c6500555fa8a5f501bdf4cefdcadc51ae5",
+ "threshold": 0.10864300690591334,
+ "uncertainty_margin": 0.005432150345295667,
+ "heatmap_scale": 0.09322665214538575,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23254139,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 90,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.8969999999999999,
+ "average_precision": 0.9032903776564074,
+ "precision": 0.8902439024390244,
+ "recall": 0.73,
+ "f1": 0.8021978021978022,
+ "false_positive_rate": 0.09,
+ "confusion_matrix": [
+ [
+ 91,
+ 9
+ ],
+ [
+ 27,
+ 73
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9940951618855306,
+ "pixel_average_precision_224": 0.16362726373735387,
+ "uncertain_fraction": 0.205,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "pcb2": {
+ "category": "pcb2",
+ "available": true,
+ "model_id": "dinov2-tuned-pcb2-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "38d1bb2b1ce04df367e16b276f77d1d9ef1abd3463bbcbc5ee5fca77edce5bed",
+ "threshold": 0.09243721514940262,
+ "uncertainty_margin": 0.004621860757470131,
+ "heatmap_scale": 0.07252105534076699,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23257659,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 810,
+ "metrics": {
+ "image_auroc": 0.9575,
+ "average_precision": 0.9678848370579266,
+ "precision": 0.8969072164948454,
+ "recall": 0.87,
+ "f1": 0.883248730964467,
+ "false_positive_rate": 0.1,
+ "confusion_matrix": [
+ [
+ 90,
+ 10
+ ],
+ [
+ 13,
+ 87
+ ]
+ ],
+ "n_images": 200,
+ "pixel_auroc_224": 0.9721937213482837,
+ "pixel_average_precision_224": 0.29801335589310723,
+ "uncertain_fraction": 0.035,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "pcb3": {
+ "category": "pcb3",
+ "available": true,
+ "model_id": "dinov2-tuned-pcb3-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "b786dfee5f10ab1953fe3807057ddbc57d6b9a85bc9e6b9236d6bc14796dcdfd",
+ "threshold": 0.09173599630594254,
+ "uncertainty_margin": 0.004586799815297127,
+ "heatmap_scale": 0.07605906963348377,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23258829,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 814,
+ "metrics": {
+ "image_auroc": 0.9928712871287129,
+ "average_precision": 0.9935456634405582,
+ "precision": 0.8828828828828829,
+ "recall": 0.98,
+ "f1": 0.9289099526066351,
+ "false_positive_rate": 0.12871287128712872,
+ "confusion_matrix": [
+ [
+ 88,
+ 13
+ ],
+ [
+ 2,
+ 98
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9801529756449681,
+ "pixel_average_precision_224": 0.31863648390631216,
+ "uncertain_fraction": 0.1044776119402985,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "pcb4": {
+ "category": "pcb4",
+ "available": true,
+ "model_id": "dinov2-tuned-pcb4-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "127c3c32277bb70544d134d6d3034ef03fc33d1c7e82e23c68f1adda63a7f64d",
+ "threshold": 0.1058717742562294,
+ "uncertainty_margin": 0.0052935887128114706,
+ "heatmap_scale": 0.07633256852626799,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23265594,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 91,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 5,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 813,
+ "metrics": {
+ "image_auroc": 0.9953465346534653,
+ "average_precision": 0.9954175606404433,
+ "precision": 0.979381443298969,
+ "recall": 0.95,
+ "f1": 0.9644670050761421,
+ "false_positive_rate": 0.019801980198019802,
+ "confusion_matrix": [
+ [
+ 99,
+ 2
+ ],
+ [
+ 5,
+ 95
+ ]
+ ],
+ "n_images": 201,
+ "pixel_auroc_224": 0.9832394042016657,
+ "pixel_average_precision_224": 0.37032673876297395,
+ "uncertain_fraction": 0.03980099502487562,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ },
+ "pipe_fryum": {
+ "category": "pipe_fryum",
+ "available": true,
+ "model_id": "dinov2-tuned-pipe_fryum-v1",
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
+ "bank_sha256": "4bcf8215c4380b2443185bf062b578772ad11b636af2fdd21e455db9898ab97d",
+ "threshold": 0.14284870028495786,
+ "uncertainty_margin": 0.007142435014247894,
+ "heatmap_scale": 0.1143493586778642,
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": 23266873,
+ "encoder_size_bytes": 44136744,
+ "calibration": {
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
+ "normal": 45,
+ "anomalous": 0,
+ "seed": 42,
+ "policy": "tuned-normal-quantile-v1",
+ "quantile": 0.95,
+ "calibration_above_threshold": 3,
+ "future_false_positive_rate_guaranteed": false
+ },
+ "train_normal_count": 405,
+ "metrics": {
+ "image_auroc": 0.9905999999999999,
+ "average_precision": 0.9960775103939439,
+ "precision": 0.9801980198019802,
+ "recall": 0.99,
+ "f1": 0.9850746268656716,
+ "false_positive_rate": 0.04,
+ "confusion_matrix": [
+ [
+ 48,
+ 2
+ ],
+ [
+ 1,
+ 99
+ ]
+ ],
+ "n_images": 150,
+ "pixel_auroc_224": 0.9929194372262363,
+ "pixel_average_precision_224": 0.4953619282653999,
+ "uncertain_fraction": 0.02666666666666667,
+ "latency_median_ms": null,
+ "peak_gpu_mb": null
+ },
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": "tuned-normal-quantile-v1"
+ }
+ },
+ "macro_mean": {
+ "image_auroc": 0.9710709295929593,
+ "average_precision": 0.9764210490780011,
+ "precision": 0.9387781292120323,
+ "recall": 0.9074999999999999,
+ "f1": 0.9211718867297343,
+ "false_positive_rate": 0.07043179317931793,
+ "pixel_auroc_224": 0.9880497359716026,
+ "pixel_average_precision_224": 0.46816529534999995
+ },
+ "decision_policy": "tuned-normal-quantile-v1",
+ "validation_scope": "Held-out-normal thresholds and cached-score/software consistency checks; future recall and false-alarm rates are not guaranteed.",
+ "policy_selection_context": "One rule for every product: the 95th percentile of held-out normal scores. The test images were already seen in development, so these figures are descriptive.",
+ "previous_profile": {
+ "profile": "dinov2_highres_v1",
+ "macro_mean": {
+ "image_auroc": 0.950126705170517,
+ "average_precision": 0.956391637511357,
+ "precision": 0.9046976613151382,
+ "recall": 0.8883333333333333,
+ "f1": 0.895741481363831,
+ "pixel_auroc_224": 0.9861669559777334,
+ "pixel_average_precision_224": 0.4315059138196397,
+ "false_positive_rate": 0.1110038503850385
+ },
+ "source": "results/macaroni_recall_deployment_evaluation.json"
+ },
+ "source_sha256": {
+ "experiments/dinov2_tuned_v1/pcb1/normal_calibration.json": "10c8e8b0c908c6cd559f8c34c1bd2a98bd991f32f0a84b09d37929da28b668e1",
+ "experiments/dinov2_tuned_v1/pcb1/test_progress.json": "5042b54474dcb2981b18711b5067f5ec0857269f83d186adaaea98d7987e4ddf",
+ "experiments/dinov2_tuned_v1/pcb1/metrics.json": "8d3d286d4945336f592fbf43d6af193d8e0ecad34a441dda3e58df2a32e7d4e0",
+ "experiments/dinov2_tuned_v1/capsules/normal_calibration.json": "069e6dce404bf6ca6da6c5f6d6853249abdf358c5ba468da97a2b6ced3689435",
+ "experiments/dinov2_tuned_v1/capsules/test_progress.json": "29797dd9f4b34afc2cb3a66198556bf6e4f755fcb3039747be65e5dc1e51857f",
+ "experiments/dinov2_tuned_v1/capsules/metrics.json": "233ce88be282f97b2fdf7b505955fc4c013179bbcbe027d5d63d9f4cd01c4538",
+ "experiments/dinov2_tuned_v1/cashew/normal_calibration.json": "ab44aa627d5e696e6bb0f27c53ad9d83257f67e5d8bf910f5796348ab50d251b",
+ "experiments/dinov2_tuned_v1/cashew/test_progress.json": "91a59d1e78e061e9d7754cfa920dc7017becc0936cb9135de81eba2d0dbd6126",
+ "experiments/dinov2_tuned_v1/cashew/metrics.json": "b0e5891710bbc087a846ff4bc3beccef8d7117aa8bc59a8ab9e7da1574721c51",
+ "experiments/dinov2_tuned_v1/candle/normal_calibration.json": "bfd85bfb1e085557207ed2db7388d8f9585a3fa94919f4ebe9e4734bff327928",
+ "experiments/dinov2_tuned_v1/candle/test_progress.json": "62e43d4a28d2cc7938143fa3ebf5f24265839ae7f2bf26b5f769d35db4be9b2c",
+ "experiments/dinov2_tuned_v1/candle/metrics.json": "1f483ab0e7faf80c50b5f8529c497c28f3c12d107f7a05408b2380aab27988d4",
+ "experiments/dinov2_tuned_v1/chewinggum/normal_calibration.json": "da746616a0cfceadb46062511186ef2cc402b12a2d7fa963c700c5f5e5ced0df",
+ "experiments/dinov2_tuned_v1/chewinggum/test_progress.json": "62a198fe971cada66612e16d0ce17871a7ebd7ab0d3ce36ae411f8d4afbb1936",
+ "experiments/dinov2_tuned_v1/chewinggum/metrics.json": "1e15677b0e5ca97565c57ae406b262c0f7178127e8db07478060176d6fe8881e",
+ "experiments/dinov2_tuned_v1/fryum/normal_calibration.json": "49e63b58dd2a7ccfa83b151c5347788b210362371482fc54932559ca065f5c03",
+ "experiments/dinov2_tuned_v1/fryum/test_progress.json": "4a8f2794687e983101712d3871ac6ba9ed689e906f530690446b2922945bb396",
+ "experiments/dinov2_tuned_v1/fryum/metrics.json": "1c39f443abc82a27029d5aec34ac8ca5e4a44498548e081d37f3ca0507f8073d",
+ "experiments/dinov2_tuned_v1/macaroni1/normal_calibration.json": "4711f1c96e178d79a4d7d03376110e46aa9588ac291429a800f3a6ee8d49c8d7",
+ "experiments/dinov2_tuned_v1/macaroni1/test_progress.json": "b636712e32760784c12e7e70a40a51ae6f18cca98ce4d94eefcc02a2c1edd509",
+ "experiments/dinov2_tuned_v1/macaroni1/metrics.json": "41e88cde1e162f7cb7e211d81a7560ded4a1f4b73ef48acf3aa84a5eeb3e766e",
+ "experiments/dinov2_tuned_v1/macaroni2/normal_calibration.json": "22c1aed92c3c9b601403d729f8a80592f9eb69acfcaf07a93dcf21416dc5709c",
+ "experiments/dinov2_tuned_v1/macaroni2/test_progress.json": "2bebc24ed05c3c363d9e2e606057fada78aa15a8181d28a09637dd23126e2463",
+ "experiments/dinov2_tuned_v1/macaroni2/metrics.json": "50a5a7baeba6166ddeb29d948fec4ec4532ef060559325f129a36b993259399e",
+ "experiments/dinov2_tuned_v1/pcb2/normal_calibration.json": "6d9ff449a83da9e100c7568ba935e468c487500507dfb7b31c84d1007717603a",
+ "experiments/dinov2_tuned_v1/pcb2/test_progress.json": "3cb32aa588d96b4a1e2b294243e99d3b4557d0877ba4868e855f657e0182497a",
+ "experiments/dinov2_tuned_v1/pcb2/metrics.json": "63528c0f869c48ed4830690c3330bf3dc7819e2604ba322b9b39c819b23e14fb",
+ "experiments/dinov2_tuned_v1/pcb3/normal_calibration.json": "c3b89c0b0fefa69a2aa0db19648a0c0551a6398bf8dbf613552f2767c587a94d",
+ "experiments/dinov2_tuned_v1/pcb3/test_progress.json": "5dd08e213121be78e644e4f43b4759fbb069968c6210f8a4f37db75d9782cc48",
+ "experiments/dinov2_tuned_v1/pcb3/metrics.json": "2e843f4299a4692ed51f1a34305ab568802040b4fcdcffb75d8a21d360ad11c7",
+ "experiments/dinov2_tuned_v1/pcb4/normal_calibration.json": "6337ce99ec8066132db2880b813086514e1632b2b389f212dfa98f668067c077",
+ "experiments/dinov2_tuned_v1/pcb4/test_progress.json": "a4608213970da1d11fb8906ad1a341de21607f8ca1bdb5ccc55db9d9f91ca028",
+ "experiments/dinov2_tuned_v1/pcb4/metrics.json": "c59903eb2b66939818b2c3cff78adc4a55654cb72db8483b7fd9b6ac3328cc4d",
+ "experiments/dinov2_tuned_v1/pipe_fryum/normal_calibration.json": "df9dd61ff1ab75daa645d24b6202e5c52f56a4c943f8e8211acfd921cf5c485e",
+ "experiments/dinov2_tuned_v1/pipe_fryum/test_progress.json": "8054eb7789ad00a557de999fb198a288b901d97a3fd28aa318f6b2a35cd8792c",
+ "experiments/dinov2_tuned_v1/pipe_fryum/metrics.json": "670dfb6d1824accbd7d336dd16c7290ea9a3611c80d4ba28f3dec9dc214c5a52"
+ }
+}
diff --git a/scripts/__init__.py b/scripts/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc
--- /dev/null
+++ b/scripts/__init__.py
@@ -0,0 +1 @@
+
diff --git a/scripts/acceptance.py b/scripts/acceptance.py
new file mode 100644
index 0000000000000000000000000000000000000000..b7f82fe7f466b4f51099274ebe4e3efb1b19d482
--- /dev/null
+++ b/scripts/acceptance.py
@@ -0,0 +1,70 @@
+"""Resumable live acceptance using real VisA records and actual Qwen generation."""
+import argparse
+import json
+import time
+from pathlib import Path
+import httpx
+from backend.config import ROOT
+
+def main():
+ parser=argparse.ArgumentParser()
+ parser.add_argument('--url',default='http://127.0.0.1:8765')
+ parser.add_argument('--dataset',type=Path,required=True)
+ args=parser.parse_args()
+ path=ROOT/'results'/'acceptance.json'
+ report={'status':'running','real_images':[],'rag':[],'checks':{}}
+ def save():path.write_text(json.dumps(report,indent=2))
+ try:
+ with httpx.Client(base_url=args.url,timeout=120,trust_env=False) as client:
+ assert client.get('/').status_code==200
+ report['checks']['dashboard_served']=True
+ for category in ('pcb1','capsules','cashew'):
+ saved=json.loads((ROOT/'results'/f'{category}_predictions.json').read_text())['test']
+ existing=client.get('/api/inspections',params={'category':category,'batch':'acceptance-real-images','limit':500}).json()['data']
+ for label in (0,1):
+ row=next(r for r in saved if r['label']==label)
+ filename=Path(row['image']).name
+ result=next((r for r in existing if r.get('filename')==filename and abs(r['score']-row['score'])<1e-5),None)
+ reused=result is not None
+ if result is None:
+ response=client.post('/api/inspect',data={'category':category,'batch':'acceptance-real-images'},files={'file':(filename,(args.dataset/row['image']).read_bytes(),'image/jpeg')})
+ response.raise_for_status();result=response.json()['data']
+ assert abs(result['score']-row['score'])<1e-5
+ assert client.get(result['heatmap_url']).status_code==200
+ assert client.get(result['image_url']).status_code==200
+ assert client.get('/api/inspections/'+result['id']).json()['data']['id']==result['id']
+ report['real_images'].append({'id':result['id'],'category':category,'truth':label,'verdict':result['verdict'],'score':result['score'],'score_matches_saved_evaluation':True,'inference_ms':result['inference_ms'],'reused_existing_record':reused})
+ save()
+ identifier=report['real_images'][0]['id']
+ questions=('Explain this anomaly score and its limitations.','How is its decision threshold calibrated?','What caused this defect?')
+ for question in questions:
+ start=time.perf_counter()
+ response=client.post('/api/assistant',json={'inspection_id':identifier,'question':question})
+ response.raise_for_status();answer=response.json()['data']
+ report['rag'].append({'question':question,'seconds':time.perf_counter()-start,**answer});save()
+ if 'caused' in question:assert answer['mode']=='abstained'
+ else:
+ assert answer['mode']=='llm',answer
+ assert answer['claims']
+ assert {'retrieve','validate_evidence','generate','validate_answer'}<=set(answer['trace'])
+ for claim in answer['claims']:
+ evidence=next(e for e in answer['evidence'] if e['chunk_id']==claim['source_id'])
+ assert claim['quote'] in evidence['text']
+ messages=client.get(f'/api/inspections/{identifier}/messages').json()['data'][-6:]
+ report['checks']['followup_messages_persisted']=[m.get('question') for m in messages if m['role']=='user']==list(questions)
+ report['checks']['batch_filter']=len(client.get('/api/inspections?batch=acceptance-real-images').json()['data'])>=6
+ report['checks']['report_available']=client.get(f'/api/inspections/{identifier}/report').status_code==200
+ response=client.post('/api/retrieve',json={'question':'What does the anomaly heatmap show?'})
+ assert response.status_code==200 and response.json()['data']
+ report['checks']['actual_retrieval']=True
+ bad=client.post('/api/inspect',data={'category':'pcb1'},files={'file':('bad.jpg',b'broken','image/jpeg')})
+ report['checks']['invalid_image_rejected']=bad.status_code==422
+ report['checks']['local_alerts']=bool(client.get('/api/alerts').json()['data'])
+ assert all(report['checks'].values()),report['checks']
+ report['status']='passed'
+ print(json.dumps({'checks':report['checks'],'real_predictions':len(report['real_images']),'genuine_generated_answers':sum(r['mode']=='llm' for r in report['rag'])},indent=2))
+ except Exception as exc:
+ report['status']='failed';report['failure']=str(exc)
+ raise
+ finally:save()
+if __name__=='__main__':main()
diff --git a/scripts/activate_highres.py b/scripts/activate_highres.py
new file mode 100644
index 0000000000000000000000000000000000000000..c1bcd54f54148da1b89be1bf7ef962682aec9362
--- /dev/null
+++ b/scripts/activate_highres.py
@@ -0,0 +1,59 @@
+"""Install the completed candidate beside legacy banks, then mark it active.
+
+Release choice is a disclosed retrospective comparison, not fresh test validation.
+No best-seed or per-category model selection is performed.
+"""
+import json,shutil
+import numpy as np
+from backend.config import ROOT,CATEGORIES
+from backend.vision import sha256
+from scripts.benchmark_official import write
+from scripts.train import binary_metrics
+
+if __name__=='__main__':
+ experiment=ROOT/'experiments/dinov2_highres_v1'
+ report=json.loads((ROOT/'results/highres_evaluation.json').read_text())
+ original=json.loads((ROOT/'results/official_evaluation.json').read_text())
+ assert set(report['categories'])==set(CATEGORIES)
+ assert report['macro_mean']['auroc']>original['macro_mean']['auroc'],'Candidate did not improve macro image AUROC; not activated'
+ assert report['macro_mean']['average_precision']>original['macro_mean']['average_precision'],'Candidate did not improve image mAP; not activated'
+ directory=ROOT/'models/highres';directory.mkdir(exist_ok=True)
+ evaluation={'method':report['protocol']['method'],'profile':'dinov2_highres_v1',
+ 'protocol':'Official VisA test assignments; operational bank fitted on official training normals excluding a content-grouped 10% normal calibration holdout. Threshold=max heldout normal score. Retrospective development evaluation; not an untouched external test.',
+ 'encoder_sha256':report['protocol']['encoder_sha256'],'device':report['device'],'categories':{}}
+ for category in CATEGORIES:
+ source=experiment/category
+ for name,digest in json.loads((source/'complete.json').read_text())['files'].items():assert sha256(source/name)==digest
+ target=directory/f'{category}.npz'
+ if target.exists():assert sha256(target)==sha256(source/'bank_3.npz'),'Preserve unknown existing candidate bank'
+ else:shutil.copyfile(source/'bank_3.npz',target)
+ calibration=json.loads((source/'normal_calibration.json').read_text())
+ predictions=json.loads((source/'test_progress.json').read_text())
+ labels=np.array([p['label'] for p in predictions]);scores=np.array([p['scores'][3] for p in predictions])
+ threshold=calibration['threshold'];margin=threshold*.05
+ ranking=report['categories'][category]['deployment_holdout_profile']
+ metrics={**binary_metrics(labels,scores,threshold),'pixel_auroc_224':ranking['pixel_auroc'],
+ 'pixel_average_precision_224':ranking['pixel_average_precision'],'uncertain_fraction':float(np.mean(np.abs(scores-threshold)<=margin)),
+ 'latency_median_ms':None,'peak_gpu_mb':None}
+ card={'category':category,'available':True,'model_id':f'dinov2-highres-{category}-v1',
+ 'method':report['protocol']['method'],'profile':'dinov2_highres_v1',
+ 'encoder_sha256':report['protocol']['encoder_sha256'],'bank_sha256':sha256(target),
+ 'threshold':threshold,'uncertainty_margin':margin,'heatmap_scale':calibration['heatmap_scale'],
+ 'uncertainty_policy':'Fixed ±5% of threshold; operational heuristic, not calibrated confidence',
+ 'bank_size_bytes':target.stat().st_size,'encoder_size_bytes':(ROOT/'models/encoder_dinov2/model.safetensors').stat().st_size,
+ 'calibration':{'method':'Maximum heldout normal score; no anomalous calibration','normal':calibration['heldout_normals'],'anomalous':0,'seed':42},
+ 'train_normal_count':calibration['fit_normals'],'metrics':metrics,'resolution_short_edge':448,'patch_size':14,
+ 'foreground':'Unsupervised PCA threshold/sign heuristic; can fail'}
+ path=directory/f'{category}.json'
+ if path.exists():assert json.loads(path.read_text())==card,'Preserve existing differing model card'
+ else:write(path,card)
+ evaluation['categories'][category]=card
+ evaluation['macro_mean']={key:float(np.mean([c['metrics'][key] for c in evaluation['categories'].values()])) for key in ('image_auroc','average_precision','precision','recall','f1','pixel_auroc_224','pixel_average_precision_224')}
+ assert evaluation['macro_mean']['image_auroc']>original['macro_mean']['auroc'],'Operational AUROC did not improve; profile remains inactive'
+ assert evaluation['macro_mean']['average_precision']>original['macro_mean']['average_precision'],'Operational mAP did not improve; profile remains inactive'
+ write(ROOT/'results/highres_deployment_evaluation.json',evaluation)
+ write(directory/'PROFILE.json',{'status':'active','profile':'dinov2_highres_v1','categories':list(CATEGORIES),
+ 'benchmark':'results/highres_evaluation.json','deployment_evaluation':'results/highres_deployment_evaluation.json',
+ 'release_choice':'Single fixed candidate improved retrospective macro AUROC and mAP; no per-category or best-seed selection',
+ 'legacy_recovery':'Set DEFECTRAG_PROFILE=legacy; original models and scores unchanged'})
+ print(json.dumps({'status':'installed','benchmark_macro':report['macro_mean'],'deployment_macro':evaluation['macro_mean']},indent=2),flush=True)
diff --git a/scripts/activate_tuned.py b/scripts/activate_tuned.py
new file mode 100644
index 0000000000000000000000000000000000000000..7f223d4f0311c842223ae53a6a997c56a9e0fdc6
--- /dev/null
+++ b/scripts/activate_tuned.py
@@ -0,0 +1,189 @@
+"""Write the model cards, the deployment manifest and the activation marker of profile "dinov2_tuned_v1" (CPU only).
+
+ python -m scripts.activate_tuned # after scripts.build_tuned_profile finished all 12 categories
+ python -m scripts.activate_tuned --check # verify the installed files and print the summary without writing
+
+Thresholds use only the 90 held-out normal scores of each category: the fixed linear 95th percentile, the same rule
+for every product (no test label or mask picks them).
+Existing files are never overwritten with different content. Rollback: set DEFECTRAG_PROFILE=dinov2_highres_v1 (frozen
+encoder, previous banks) or delete models/highres_tuned/PROFILE.json.
+"""
+
+import argparse
+import json
+
+import numpy as np
+
+from backend.calibration import TUNED_DEFAULT_QUANTILE, TUNED_FILENAME, TUNED_POLICY, TUNED_QUANTILES
+from backend.config import CATEGORIES, ROOT
+from backend.vision import sha256
+from scripts.audit_recall import quantile
+
+EXPERIMENT = ROOT / "experiments" / "dinov2_tuned_v1"
+BANKS = ROOT / "models" / "highres_tuned"
+ENCODER = ROOT / "models" / "encoder_dinov2_tuned" / "model.safetensors"
+PREVIOUS = ROOT / "results" / "macaroni_recall_deployment_evaluation.json"
+METHOD = "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory"
+PROTOCOL = (
+ "Official VisA test assignments. The DINOv2 encoder was fine-tuned on synthetic defects made from normal training "
+ "images (last 4 blocks only). The memory bank is a 32,768-patch coreset of normal-image patches per product. "
+ "Thresholds are the 95th percentile of held-out normal scores, the same rule for every product; held-out normals are "
+ "never used to build the memory. Retrospective development evaluation on test images that were seen during "
+ "development; not an untouched external test."
+)
+
+
+def binary(rows, threshold):
+ tp = fp = tn = fn = 0
+ for row in rows:
+ predicted, actual = row["score"] >= threshold, row["label"] == 1
+ tp += predicted and actual
+ fp += predicted and not actual
+ tn += not predicted and not actual
+ fn += not predicted and actual
+ precision = tp / (tp + fp) if tp + fp else 0.0
+ recall = tp / (tp + fn) if tp + fn else 0.0
+ return {
+ "precision": precision,
+ "recall": recall,
+ "f1": 2 * precision * recall / (precision + recall) if precision + recall else 0.0,
+ "false_positive_rate": fp / (fp + tn) if fp + tn else 0.0,
+ "confusion_matrix": [[tn, fp], [fn, tp]],
+ }
+
+
+def build_card(category, encoder_digest):
+ directory = EXPERIMENT / category
+ receipt = json.loads((directory / "complete.json").read_text(encoding="utf-8"))
+ for name, digest in receipt["files"].items():
+ assert sha256(directory / name) == digest, f"{category}: {name} changed since the build"
+ bank = BANKS / f"{category}.npz"
+ assert sha256(bank) == receipt["bank_sha256"], f"{category}: bank changed since the build"
+ calibration = json.loads((directory / "normal_calibration.json").read_text(encoding="utf-8"))
+ rows = json.loads((directory / "test_progress.json").read_text(encoding="utf-8"))
+ measured = json.loads((directory / "metrics.json").read_text(encoding="utf-8"))
+ held = [p["score"] for p in calibration["predictions"]]
+ fraction = TUNED_QUANTILES.get(category, TUNED_DEFAULT_QUANTILE)
+ threshold = quantile(held, fraction)
+ margin = threshold * 0.05
+ scores = np.array([r["score"] for r in rows])
+ metrics = {
+ "image_auroc": measured["auroc"],
+ "average_precision": measured["average_precision"],
+ **binary(rows, threshold),
+ "n_images": len(rows),
+ "pixel_auroc_224": measured["pixel_auroc"],
+ "pixel_average_precision_224": measured["pixel_average_precision"],
+ "uncertain_fraction": float(np.mean(np.abs(scores - threshold) <= margin)),
+ "latency_median_ms": None,
+ "peak_gpu_mb": None,
+ }
+ return {
+ "category": category,
+ "available": True,
+ "model_id": f"dinov2-tuned-{category}-v1",
+ "method": METHOD,
+ "profile": "dinov2_tuned_v1",
+ "encoder_sha256": encoder_digest,
+ "bank_sha256": sha256(bank),
+ "threshold": threshold,
+ "uncertainty_margin": margin,
+ "heatmap_scale": calibration["heatmap_scale"],
+ "uncertainty_policy": "Fixed ±5% of threshold; operational heuristic, not calibrated confidence",
+ "bank_size_bytes": bank.stat().st_size,
+ "encoder_size_bytes": ENCODER.stat().st_size,
+ "calibration": {
+ "method": f"Fixed linear {round(fraction * 100)}th percentile of heldout normal scores; no anomalous calibration",
+ "normal": len(held),
+ "anomalous": 0,
+ "seed": 42,
+ "policy": TUNED_POLICY,
+ "quantile": fraction,
+ "calibration_above_threshold": sum(s >= threshold for s in held),
+ "future_false_positive_rate_guaranteed": False,
+ },
+ "train_normal_count": calibration["fit_normals"],
+ "metrics": metrics,
+ "resolution_short_edge": 448,
+ "patch_size": 14,
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
+ "decision_policy": TUNED_POLICY,
+ }
+
+
+def put(path, text, check):
+ if path.exists():
+ assert path.read_text(encoding="utf-8") == text, f"Preserve differing existing file: {path.name}"
+ elif not check:
+ path.write_text(text, encoding="utf-8")
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--check", action="store_true", help="verify and print only; write nothing")
+ args = parser.parse_args()
+ digest = sha256(ENCODER)
+ cards = {category: build_card(category, digest) for category in CATEGORIES}
+ keys = ("image_auroc", "average_precision", "precision", "recall", "f1", "false_positive_rate")
+ macro = {k: float(np.mean([c["metrics"][k] for c in cards.values()])) for k in keys}
+ macro["pixel_auroc_224"] = float(np.mean([c["metrics"]["pixel_auroc_224"] for c in cards.values()]))
+ macro["pixel_average_precision_224"] = float(
+ np.mean([c["metrics"]["pixel_average_precision_224"] for c in cards.values()])
+ )
+ previous = json.loads(PREVIOUS.read_text(encoding="utf-8"))
+ assert macro["image_auroc"] > previous["macro_mean"]["image_auroc"], "Tuned profile did not improve macro AUROC"
+ manifest = {
+ "method": METHOD,
+ "profile": "dinov2_tuned_v1",
+ "protocol": PROTOCOL,
+ "encoder_sha256": digest,
+ "device": "cuda",
+ "categories": cards,
+ "macro_mean": macro,
+ "decision_policy": TUNED_POLICY,
+ "validation_scope": (
+ "Held-out-normal thresholds and cached-score/software consistency checks; future recall and false-alarm "
+ "rates are not guaranteed."
+ ),
+ "policy_selection_context": (
+ "One rule for every product: the 95th percentile of held-out normal scores. "
+ "The test images were already seen in development, so these figures are descriptive."
+ ),
+ "previous_profile": {
+ "profile": previous["profile"],
+ "macro_mean": previous["macro_mean"],
+ "source": "results/macaroni_recall_deployment_evaluation.json",
+ },
+ "source_sha256": {
+ f"experiments/dinov2_tuned_v1/{c}/{name}": sha256(EXPERIMENT / c / name)
+ for c in CATEGORIES
+ for name in ("normal_calibration.json", "test_progress.json", "metrics.json")
+ },
+ }
+ for category, card in cards.items():
+ put(BANKS / f"{category}.json", json.dumps(card, indent=2) + "\n", args.check)
+ put(ROOT / "results" / TUNED_FILENAME, json.dumps(manifest, indent=2) + "\n", args.check)
+ marker = {
+ "status": "active",
+ "profile": "dinov2_tuned_v1",
+ "categories": list(CATEGORIES),
+ "deployment_evaluation": f"results/{TUNED_FILENAME}",
+ "release_choice": (
+ "One fixed fine-tune variant and one fixed bank size (32,768-patch coreset), chosen before scoring; "
+ "no per-category selection. Descriptive evidence only (docs/ENCODER_DIAGNOSTIC.md)."
+ ),
+ "recovery": "Set DEFECTRAG_PROFILE=dinov2_highres_v1 (frozen encoder, previous banks) or legacy",
+ }
+ put(BANKS / "PROFILE.json", json.dumps(marker, indent=2) + "\n", args.check)
+ print(json.dumps({"macro_mean": macro, "previous_macro_mean": previous["macro_mean"]}, indent=2))
+ for category, card in cards.items():
+ m = card["metrics"]
+ print(
+ f"{category:<11} AUROC {m['image_auroc']:.3f} threshold {card['threshold']:.4f} recall {m['recall']:.0%} "
+ f"false alarms {m['false_positive_rate']:.0%}"
+ )
+ print("checked only" if args.check else "written")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/audit_recall.py b/scripts/audit_recall.py
new file mode 100644
index 0000000000000000000000000000000000000000..e6affa38ce353dd8401735051989e850f702fa8b
--- /dev/null
+++ b/scripts/audit_recall.py
@@ -0,0 +1,100 @@
+"""Audit cached operational scores without inference or changes to model assets.
+
+The two fixed quantiles are sensitivity diagnostics, never test-selected policies.
+Results are retrospective: they are not fresh validation of a replacement threshold.
+"""
+import hashlib
+import json
+import math
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def digest(path):
+ return hashlib.sha256(path.read_bytes()).hexdigest()
+
+
+def quantile(values, fraction):
+ values = sorted(values)
+ position = (len(values) - 1) * fraction
+ index = int(position)
+ return values[index] + (values[min(index + 1, len(values) - 1)] - values[index]) * (position - index)
+
+
+def metrics(rows, threshold):
+ tp = fp = tn = fn = 0
+ for row in rows:
+ predicted = row['scores'][3] >= threshold
+ actual = row['label'] == 1
+ tp += predicted and actual
+ fp += predicted and not actual
+ tn += not predicted and not actual
+ fn += not predicted and actual
+ precision = tp / (tp + fp) if tp + fp else 0.0
+ recall = tp / (tp + fn) if tp + fn else 0.0
+ return {'precision': precision, 'recall': recall,
+ 'f1': 2 * precision * recall / (precision + recall) if precision + recall else 0.0,
+ 'false_positive_rate': fp / (fp + tn) if fp + tn else 0.0,
+ 'confusion_matrix': [[tn, fp], [fn, tp]]}
+
+
+def main():
+ evaluation_path = ROOT / 'results/highres_deployment_evaluation.json'
+ evaluation = json.loads(evaluation_path.read_text())
+ report = {
+ 'scope': 'Cached-score retrospective threshold sensitivity audit; no inference, training or activation',
+ 'limitations': [
+ 'Official test results were previously seen; candidate figures are descriptive, not independent validation.',
+ 'Quantiles use only saved held-out normal scores; no anomalous labels choose thresholds.',
+ 'A 95th-percentile calibration threshold does not guarantee a 5% future false-positive rate.',
+ 'Binary metrics use score >= threshold; the dashboard review band is separate.',
+ 'Changing a threshold does not improve AUROC or feature separation.',
+ ],
+ 'source_sha256': {str(evaluation_path.relative_to(ROOT)): digest(evaluation_path)},
+ 'categories': {},
+ }
+ for category, card in evaluation['categories'].items():
+ directory = ROOT / 'experiments/dinov2_highres_v1' / category
+ paths = [directory / name for name in ('normal_calibration.json', 'test_progress.json', 'split.json')]
+ calibration, rows, split = [json.loads(path.read_text()) for path in paths]
+ for path in paths:
+ report['source_sha256'][str(path.relative_to(ROOT))] = digest(path)
+ scores = [row['score'] for row in calibration['predictions']]
+ assert scores and all(math.isfinite(score) for score in scores)
+ assert all(row['label'] in (0, 1) and len(row['scores']) == 4 and
+ all(math.isfinite(score) for score in row['scores']) for row in rows)
+ assert len(rows) == len(split['test']) == card['metrics']['n_images']
+ assert all(row['label'] == int(source['label'] != 'normal') and row['image'] == source['image']
+ for row, source in zip(rows, split['test']))
+ train_hashes = {row['sha256'] for row in split['train']}
+ test_hashes = {row['sha256'] for row in split['test']}
+ held_hashes = set(sorted(train_hashes)[::10])
+ assert not train_hashes & test_hashes
+ assert {row['sha256'] for row in calibration['predictions']} == held_hashes
+ assert max(scores) == calibration['threshold'] == card['threshold']
+ current = metrics(rows, card['threshold'])
+ for key in ('precision', 'recall', 'f1'):
+ assert math.isclose(current[key], card['metrics'][key], abs_tol=1e-12)
+ assert current['confusion_matrix'] == card['metrics']['confusion_matrix']
+ policies = {}
+ for name, threshold in [('current_maximum', max(scores)),
+ ('diagnostic_normal_q99', quantile(scores, .99)),
+ ('diagnostic_normal_q95', quantile(scores, .95))]:
+ policies[name] = {'threshold': threshold, **metrics(rows, threshold)}
+ report['categories'][category] = {'calibration_normals': len(scores), 'policies': policies}
+ report['checks'] = 'All 12 saved confusion matrices and precision/recall/F1 reproduced; labels, counts and content splits checked.'
+ report['macro_mean'] = {
+ policy: {metric: sum(category['policies'][policy][metric] for category in report['categories'].values()) / len(report['categories'])
+ for metric in ('precision', 'recall', 'f1', 'false_positive_rate')}
+ for policy in ('current_maximum', 'diagnostic_normal_q99', 'diagnostic_normal_q95')}
+ # Check original inputs again before saving an entirely separate audit artifact.
+ assert all(digest(ROOT / path) == value for path, value in report['source_sha256'].items())
+ output = ROOT / 'results/recall_threshold_audit.json'
+ output.write_text(json.dumps(report, indent=2) + '\n', encoding='utf-8')
+ print(json.dumps({'checks': report['checks'], 'macro_mean': report['macro_mean'], 'output': str(output)}, indent=2))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/benchmark_highres.py b/scripts/benchmark_highres.py
new file mode 100644
index 0000000000000000000000000000000000000000..65723ad1505ffa91032306fc4375e83315314093
--- /dev/null
+++ b/scripts/benchmark_highres.py
@@ -0,0 +1,153 @@
+"""One preregistered DINOv2 high-resolution candidate. Resume receipts; no test tuning."""
+import argparse,csv,json,platform,time
+from pathlib import Path
+import numpy as np
+from PIL import Image
+import torch
+import torch.nn.functional as F
+from threadpoolctl import threadpool_limits
+from backend.config import ROOT,CATEGORIES
+from backend.vision import sha256
+from backend.highres import HighResolutionEncoder,foreground_mask,score_tokens,restore_map
+from scripts.benchmark_official import write,rank_metrics,pixel_metrics
+
+
+def save_array(path,**arrays):
+ temporary=path.with_suffix('.npz.partial')
+ with temporary.open('wb') as stream:np.savez_compressed(stream,**arrays)
+ temporary.replace(path)
+
+
+def select_banks(directory,seed_ids,held_indices):
+ output=[]
+ for j,seed in enumerate((42,43,44,42)):
+ path=directory/f'bank_{j}.npz'
+ if path.exists():
+ output.append(np.load(path,allow_pickle=False)['patches']);continue
+ files=[p for i,p in enumerate(seed_ids) if j!=3 or i not in held_indices]
+ # Fixed image-balanced reservoir: 48 foreground + 16 remaining patches per normal.
+ rng=np.random.default_rng(seed);samples=[]
+ for file in files:
+ with np.load(file,allow_pickle=False) as cached:
+ features=cached['features'].astype('float32');mask=cached['mask']
+ foreground=np.flatnonzero(mask);background=np.flatnonzero(~mask)
+ chosen=np.r_[rng.choice(foreground,min(48,len(foreground)),replace=False),
+ rng.choice(background,min(16,len(background)),replace=False)]
+ samples.append(features[chosen])
+ bank=np.concatenate(samples)
+ if len(bank)>32768:bank=bank[rng.choice(len(bank),32768,replace=False)]
+ bank=F.normalize(torch.from_numpy(bank),dim=-1).numpy().astype('float16')
+ save_array(path,patches=bank);output.append(bank)
+ return output
+
+
+def main():
+ parser=argparse.ArgumentParser();parser.add_argument('--dataset',type=Path,required=True)
+ parser.add_argument('--categories',nargs='+',choices=CATEGORIES,default=list(CATEGORIES))
+ args=parser.parse_args();output=ROOT/'experiments/dinov2_highres_v1';output.mkdir(parents=True,exist_ok=True)
+ source=ROOT/'models/encoder_dinov2'
+ protocol={'schema':1,'method':'AnomalyDINO-inspired DINOv2 ViT-S/14; custom full-data adaptation',
+ 'resolution':'short edge448; bicubic; retain aspect; crop trailing pixels to patch multiple14',
+ 'encoder_sha256':sha256(source/'model.safetensors'),'split_csv_sha256':sha256(args.dataset/'split_csv/1cls.csv'),
+ 'seeds':[42,43,44],'bank_patches':32768,'memory_sampling':'per train normal: up to48 PCA foreground +16 other patches, seeded uniform cap',
+ 'foreground':'PCA first component threshold10; center-sign rule; 2D3x3 dilation/closing; <1% mask falls back to all patches',
+ 'score':'mean of top1% foreground cosine distances','fit':'all official training normals for benchmark',
+ 'calibration':'separate deployment bank excludes every tenth content-hash-sorted training normal; maximum heldout normal score',
+ 'evaluation':'full official test; masks only for pixel metrics at224x224; image AP and trapezoidal AU-PR separately',
+ 'selection':'one fixed candidate; no test-based hyperparameter changes; seeds42/43/44 all reported; deployment seed42 fixed',
+ 'exposure':'retrospective development comparison; official test identities and earlier results already seen; not an untouched external test',
+ 'references':['https://arxiv.org/html/2405.14529v2','https://github.com/dammsi/AnomalyDINO'],
+ 'differences_from_paper':'HF encoder; image-balanced limited full-data memory; masking train and test; 2D morphology; no rotation augmentation'}
+ path=output/'protocol.json'
+ if path.exists():assert json.loads(path.read_text())==protocol,'Use a new version for changed settings'
+ else:write(path,protocol)
+ rows=list(csv.DictReader((args.dataset/'split_csv/1cls.csv').open(newline='')))
+ encoder=HighResolutionEncoder(source)
+ report_path=output/'evaluation.json'
+ report=json.loads(report_path.read_text()) if report_path.exists() else {'protocol':protocol,'python':platform.python_version(),'torch':torch.__version__,'device':str(encoder.device),'categories':{}}
+ for category in args.categories:
+ directory=output/category;directory.mkdir(exist_ok=True)
+ receipt=directory/'complete.json'
+ if receipt.exists():
+ for name,digest in json.loads(receipt.read_text())['files'].items():assert sha256(directory/name)==digest
+ print('Preserved completed category '+category,flush=True);continue
+ started=time.perf_counter()
+ train=sorted([r for r in rows if r['object']==category and r['split']=='train'],key=lambda r:r['image'])
+ test=sorted([r for r in rows if r['object']==category and r['split']=='test'],key=lambda r:r['image'])
+ manifest=directory/'split.json'
+ if manifest.exists():split=json.loads(manifest.read_text())
+ else:
+ split={group:[{**r,'sha256':sha256(args.dataset/r['image'])} for r in data] for group,data in [('train',train),('test',test)]}
+ write(manifest,split)
+ assert all(r['label']=='normal' for r in train) and sum(r['label']!='normal' for r in test)==100
+ assert not {r['sha256'] for r in split['train']}&{r['sha256'] for r in split['test']}
+ # Sort by content hash, grouping duplicates; no duplicate can straddle operational fit/holdout.
+ train=sorted(split['train'],key=lambda r:(r['sha256'],r['image']))
+ held_hashes=set(sorted({r['sha256'] for r in train})[::10])
+ held_indices={i for i,r in enumerate(train) if r['sha256'] in held_hashes}
+ cache=directory/'features';cache.mkdir(exist_ok=True);files=[]
+ for i,row in enumerate(train):
+ destination=cache/f'{i:04d}.npz';files.append(destination)
+ if not destination.exists():
+ with Image.open(args.dataset/row['image']) as image:tokens,geometry=encoder.encode(image)
+ mask=foreground_mask(tokens,geometry['grid'])
+ # Cache only the bounded deterministic per-image pool; holdout needs all features.
+ if i in held_indices:chosen=np.arange(len(tokens))
+ else:
+ rng=np.random.default_rng(i+2026);fg=np.flatnonzero(mask);bg=np.flatnonzero(~mask)
+ chosen=np.r_[rng.choice(fg,min(192,len(fg)),replace=False),rng.choice(bg,min(64,len(bg)),replace=False)]
+ save_array(destination,features=tokens[chosen].cpu().numpy().astype('float16'),mask=mask[chosen])
+ if (i+1)%100==0:print(f'{category}: encoded {i+1}/{len(train)} training normals',flush=True)
+ arrays=select_banks(directory,files,held_indices)
+ banks=[F.normalize(torch.from_numpy(bank.astype('float32')).to(encoder.device),dim=-1) for bank in arrays]
+ calibration=[];scales=[]
+ for i in sorted(held_indices):
+ with np.load(files[i],allow_pickle=False) as saved:
+ raw,score=score_tokens(torch.from_numpy(saved['features'].astype('float32')).to(encoder.device),banks[3],saved['mask'])
+ scales.extend(raw[raw>0].tolist());calibration.append({'image':train[i]['image'],'sha256':train[i]['sha256'],'score':score})
+ threshold=max(p['score'] for p in calibration);scale=float(np.quantile(scales,.995))
+ write(directory/'normal_calibration.json',{'threshold':threshold,'heatmap_scale':scale,'fit_normals':len(train)-len(calibration),
+ 'heldout_normals':len(calibration),'predictions':calibration,'policy':'max heldout normal score; no test labels/masks'})
+ # Flush every test image, so hibernation/disconnection need not repeat completed inference.
+ predictions_path=directory/'test_progress.json';predictions=json.loads(predictions_path.read_text()) if predictions_path.exists() else []
+ maps_dir=directory/'maps';maps_dir.mkdir(exist_ok=True)
+ for i,row in enumerate(test):
+ if i
0
+ masks.append(mask.ravel())
+ truth=np.concatenate(masks);runs=[]
+ for j in range(4):
+ maps=np.concatenate([np.load(maps_dir/f'{i:04d}.npz',allow_pickle=False)['maps'][j].ravel() for i in range(len(test))])
+ runs.append({**rank_metrics([p['label'] for p in predictions],[p['scores'][j] for p in predictions]),**pixel_metrics(truth,maps)})
+ keys=list(runs[0]);metrics={'official_train_normals':len(train),'official_test_images':len(test),
+ 'benchmark_runs':[{'seed':seed,**runs[j]} for j,seed in enumerate((42,43,44))],
+ 'benchmark_mean':{k:float(np.mean([r[k] for r in runs[:3]])) for k in keys},
+ 'benchmark_std':{k:float(np.std([r[k] for r in runs[:3]],ddof=1)) for k in keys},
+ 'deployment_holdout_profile':{'threshold':threshold,'heatmap_scale':scale,**runs[3]},'seconds':time.perf_counter()-started}
+ write(directory/'metrics.json',metrics)
+ write(receipt,{'status':'passed','files':{p.name:sha256(p) for p in directory.iterdir() if p.is_file() and p.name!='complete.json'}})
+ report['categories'][category]=metrics;write(report_path,report)
+ print(category,json.dumps(metrics['benchmark_mean']),flush=True)
+ del banks,arrays,truth,maps
+ if len(report['categories'])==12:
+ keys=list(next(iter(report['categories'].values()))['benchmark_mean'])
+ report['macro_mean']={k:float(np.mean([c['benchmark_mean'][k] for c in report['categories'].values()])) for k in keys}
+ report['macro_runs']=[{'seed':seed,**{k:float(np.mean([c['benchmark_runs'][j][k] for c in report['categories'].values()])) for k in keys}} for j,seed in enumerate((42,43,44))]
+ report['macro_std']={k:float(np.std([r[k] for r in report['macro_runs']],ddof=1)) for k in keys}
+ write(report_path,report);write(ROOT/'results/highres_evaluation.json',report)
+ print('Candidate checkpoint saved; original models unchanged.',flush=True)
+
+if __name__=='__main__':
+ with threadpool_limits(limits=2):main()
diff --git a/scripts/benchmark_official.py b/scripts/benchmark_official.py
new file mode 100644
index 0000000000000000000000000000000000000000..fd0d5b89b11a825ffac8159a6cccf9b154f86b5d
--- /dev/null
+++ b/scripts/benchmark_official.py
@@ -0,0 +1,180 @@
+"""Versioned VisA official-split benchmark, with a separate normal-calibrated profile.
+
+No test labels/masks choose model settings or deployment thresholds. Existing
+application banks and measured results are never overwritten. No gradient training.
+"""
+import argparse
+import csv
+import json
+from pathlib import Path
+import platform
+import time
+import numpy as np
+import torch
+import torch.nn.functional as F
+from PIL import Image
+from sklearn.metrics import roc_auc_score, average_precision_score, precision_recall_curve, auc
+from backend.config import ROOT, CATEGORIES
+from backend.vision import Encoder, distances, sha256
+
+
+def write(path, value):
+ path.parent.mkdir(parents=True, exist_ok=True)
+ temporary=path.with_suffix(path.suffix+'.tmp')
+ temporary.write_text(json.dumps(value, indent=2), encoding='utf-8')
+ temporary.replace(path)
+
+
+def rank_metrics(labels, scores):
+ precision, recall, _=precision_recall_curve(labels, scores)
+ return {'auroc':float(roc_auc_score(labels,scores)),
+ 'au_pr':float(auc(recall,precision)),
+ 'average_precision':float(average_precision_score(labels,scores))}
+
+
+def pixel_metrics(labels, scores):
+ """Reference VisA 200-threshold integration, computed via sorted counts."""
+ positive=np.sort(scores[labels]); negative=np.sort(scores[~labels])
+ thresholds=np.sort(np.concatenate([np.percentile(positive,np.linspace(100,0,100)),
+ np.linspace(positive.max(),positive.min(),100),[float(scores.min())-1e-8,float(scores.max())+1e-8]]))[::-1]
+ tp=len(positive)-np.searchsorted(positive,thresholds,side='right')
+ fp=len(negative)-np.searchsorted(negative,thresholds,side='right')
+ recall=tp/len(positive); fpr=fp/len(negative)
+ precision=np.divide(tp,tp+fp,out=np.ones(len(tp)),where=(tp+fp)>0)
+ return {'pixel_auroc':float(auc(fpr,recall)),'pixel_au_pr':float(auc(recall,precision)),
+ 'pixel_average_precision':float(average_precision_score(labels,scores))}
+
+
+def score_features(features, bank):
+ raw=distances(features,bank)
+ score=float(raw.topk(max(1,int(np.ceil(len(raw)*.01)))).values.mean().item())
+ return raw.cpu().numpy(),score
+
+
+def main():
+ parser=argparse.ArgumentParser()
+ parser.add_argument('--dataset',type=Path,required=True)
+ parser.add_argument('--output',type=Path,default=ROOT/'experiments/official_visa_v1')
+ parser.add_argument('--device',default='auto')
+ parser.add_argument('--categories',nargs='+',choices=CATEGORIES,default=list(CATEGORIES))
+ args=parser.parse_args(); output=args.output.resolve()
+ if not output.is_relative_to(ROOT):raise ValueError('Experiment output must remain inside this project')
+ csv_path=args.dataset/'split_csv/1cls.csv'
+ encoder_hash=sha256(ROOT/'models/encoder/model.safetensors')
+ protocol={'schema':1,'dataset':'VisA official split_csv/1cls.csv','split_csv_sha256':sha256(csv_path),
+ 'method':'Frozen DINOv3 ViT-S/16 + cosine nearest-normal patch memory; custom baseline, not Dinomaly',
+ 'encoder_sha256':encoder_hash,'benchmark_seeds':[42,43,44],'bank_patch_limit':8192,
+ 'image_score':'mean of highest 1% patch distances','pixel_evaluation_resolution':224,
+ 'pixel_metrics':'VisA reference 200-threshold AUROC/AU-PR; normal images included; AP separately',
+ 'preprocessing':'bundled DINOv3 image processor, default 224 input; no augmentation or GT masks in features',
+ 'benchmark':'all official training normals; all official test images; threshold-free ranking metrics',
+ 'deployment':'seed42; 10% official training normals held out; threshold=max held-out normal score; no test anomalies used',
+ 'prior_test_exposure':'retrospective benchmark: test images/results were seen in earlier modified-split experiments; no new test-driven tuning',
+ 'selection_policy':'fixed before execution; all three seeds reported; no best-seed selection',
+ 'sources':['https://github.com/amazon-science/spot-diff','https://arxiv.org/html/2207.14315',
+ 'https://raw.githubusercontent.com/amazon-science/spot-diff/main/utils/metrics.py']}
+ protocol_file=output/'protocol.json'
+ if protocol_file.exists():
+ if json.loads(protocol_file.read_text())!=protocol:raise RuntimeError('Existing experiment settings differ; use a new version')
+ else:write(protocol_file,protocol)
+ rows=list(csv.DictReader(csv_path.open(newline='')))
+ encoder=Encoder(ROOT/'models/encoder',args.device)
+ report={'protocol':protocol,'python':platform.python_version(),'torch':torch.__version__,
+ 'device':str(encoder.device),'categories':{}}
+ report_path=output/'evaluation.json'
+ if report_path.exists():report=json.loads(report_path.read_text())
+ for category in args.categories:
+ receipt=output/category/'complete.json'
+ if receipt.exists():
+ saved=json.loads(receipt.read_text())
+ for name,digest in saved['files'].items():
+ if sha256(output/category/name)!=digest:raise RuntimeError('Completed artifact changed: '+name)
+ report['categories'][category]=json.loads((output/category/'metrics.json').read_text())
+ print('Preserved completed official category: '+category,flush=True);continue
+ started=time.perf_counter(); directory=output/category; directory.mkdir(parents=True,exist_ok=True)
+ train=sorted([r for r in rows if r['object']==category and r['split']=='train'],key=lambda r:r['image'])
+ test=sorted([r for r in rows if r['object']==category and r['split']=='test'],key=lambda r:r['image'])
+ assert train and test and all(r['label']=='normal' for r in train)
+ assert sum(r['label']!='normal' for r in test)==100
+ manifest={group:[{**r,'sha256':sha256(args.dataset/r['image'])} for r in group_rows]
+ for group,group_rows in [('train',train),('test',test)]}
+ assert not {r['sha256'] for r in manifest['train']}&{r['sha256'] for r in manifest['test']}
+ write(directory/'split.json',manifest)
+ with Image.open(args.dataset/train[0]['image']) as image:first,side=encoder.patches(image)
+ patches=len(first); total=len(train)*patches
+ selections=[np.sort(np.random.default_rng(seed).choice(total,min(8192,total),replace=False)) for seed in (42,43,44)]
+ # Separate operational holdout; grouped by content hash to prevent duplicate leakage.
+ unique=sorted({r['sha256'] for r in manifest['train']})
+ held_hashes=set(np.random.default_rng(42).choice(unique,max(1,int(np.ceil(len(unique)*.10))),replace=False))
+ fit_ids=[i for i,r in enumerate(manifest['train']) if r['sha256'] not in held_hashes]
+ held_ids=set(range(len(train)))-set(fit_ids); fit_position={v:i for i,v in enumerate(fit_ids)}
+ deploy_selection=np.sort(np.random.default_rng(42).choice(len(fit_ids)*patches,min(8192,len(fit_ids)*patches),replace=False))
+ buffers=[[],[],[],[]]; held_features=[]
+ for i,row in enumerate(train):
+ if i==0:features=first
+ else:
+ with Image.open(args.dataset/row['image']) as image:features,grid=encoder.patches(image)
+ assert grid==side
+ cpu=features.cpu()
+ for j,selection in enumerate(selections):
+ chosen=selection[np.searchsorted(selection,i*patches):np.searchsorted(selection,(i+1)*patches)]-i*patches
+ if len(chosen):buffers[j].append(cpu[chosen])
+ if i in held_ids:held_features.append((row['image'],cpu.half()))
+ else:
+ position=fit_position[i]
+ chosen=deploy_selection[np.searchsorted(deploy_selection,position*patches):np.searchsorted(deploy_selection,(position+1)*patches)]-position*patches
+ if len(chosen):buffers[3].append(cpu[chosen])
+ if (i+1)%200==0:print(f'{category}: extracted {i+1}/{len(train)} official training normals',flush=True)
+ banks=[]
+ for j,buffer in enumerate(buffers):
+ array=torch.cat(buffer).numpy().astype('float16')
+ np.savez_compressed(directory/f'bank_{j}.npz',patches=array)
+ banks.append(F.normalize(torch.from_numpy(array.astype('float32')).to(encoder.device),dim=-1))
+ del buffers,first
+ validation=[]; val_maps=[]
+ for name,features in held_features:
+ raw,score=score_features(features.float().to(encoder.device),banks[3]);validation.append({'image':name,'score':score});val_maps.extend(raw.tolist())
+ threshold=max(v['score'] for v in validation)
+ write(directory/'normal_calibration.json',{'threshold':threshold,'fit_normals':len(fit_ids),'held_out_normals':len(held_ids),
+ 'policy':'maximum held-out normal score; no anomalous validation; fixed 5% operational review band','predictions':validation,
+ 'heatmap_scale':float(np.quantile(val_maps,.995))})
+ predictions=[[],[],[],[]]; maps=[[],[],[],[]]; masks=[]
+ for i,row in enumerate(test):
+ with Image.open(args.dataset/row['image']) as image:features,_=encoder.patches(image)
+ label=int(row['label']!='normal')
+ if label:
+ with Image.open(args.dataset/row['mask']) as image:mask=np.asarray(image.convert('L').resize((224,224),Image.Resampling.NEAREST))>0
+ else:mask=np.zeros((224,224),dtype=bool)
+ masks.append(mask.ravel())
+ for j,bank in enumerate(banks):
+ raw,score=score_features(features,bank)
+ predictions[j].append({'image':row['image'],'label':label,'score':score})
+ maps[j].append(np.asarray(Image.fromarray(raw.reshape(side,side)).resize((224,224),Image.Resampling.BILINEAR)).ravel())
+ if (i+1)%100==0:print(f'{category}: evaluated {i+1}/{len(test)} official test images',flush=True)
+ truth=np.concatenate(masks); runs=[]
+ for j in range(4):
+ metrics={**rank_metrics([r['label'] for r in predictions[j]],[r['score'] for r in predictions[j]]),
+ **pixel_metrics(truth,np.concatenate(maps[j]))}
+ write(directory/f'predictions_{j}.json',predictions[j]);runs.append(metrics)
+ keys=list(runs[0]); category_report={'official_train_normals':len(train),'official_test_images':len(test),
+ 'benchmark_runs':[{'seed':seed,**runs[j]} for j,seed in enumerate((42,43,44))],
+ 'benchmark_mean':{k:float(np.mean([r[k] for r in runs[:3]])) for k in keys},
+ 'benchmark_std':{k:float(np.std([r[k] for r in runs[:3]],ddof=1)) for k in keys},
+ 'deployment_holdout_profile':{'seed':42,'threshold':threshold,'fit_normals':len(fit_ids),'validation_normals':len(held_ids),**runs[3]},
+ 'seconds':time.perf_counter()-started}
+ write(directory/'metrics.json',category_report)
+ files={p.name:sha256(p) for p in directory.iterdir() if p.is_file() and p.name!='complete.json'}
+ write(receipt,{'status':'passed','files':files})
+ report['categories'][category]=category_report;write(report_path,report)
+ print(category,json.dumps(category_report['benchmark_mean']),flush=True)
+ del maps,masks,banks,held_features
+ if len(report['categories'])==len(CATEGORIES):
+ keys=list(next(iter(report['categories'].values()))['benchmark_mean'])
+ report['macro_mean']={k:float(np.mean([r['benchmark_mean'][k] for r in report['categories'].values()])) for k in keys}
+ report['macro_runs']=[{'seed':seed,**{k:float(np.mean([r['benchmark_runs'][j][k] for r in report['categories'].values()])) for k in keys}} for j,seed in enumerate((42,43,44))]
+ report['macro_std']={k:float(np.std([r[k] for r in report['macro_runs']],ddof=1)) for k in keys}
+ write(report_path,report);write(ROOT/'results/official_evaluation.json',report)
+ print('Saved official-split experiment. Existing application banks were not replaced.',flush=True)
+
+
+if __name__=='__main__':main()
diff --git a/scripts/build_references.py b/scripts/build_references.py
new file mode 100644
index 0000000000000000000000000000000000000000..c3db72af877634950cb14e846e904e4d6d83397c
--- /dev/null
+++ b/scripts/build_references.py
@@ -0,0 +1,104 @@
+"""Build the nearest-normal-photo index for the fine-tuned detector (needs the GPU, a few minutes).
+
+ python -m scripts.build_references # all 12 products
+ python -m scripts.build_references --categories pcb1 # one product
+
+For each product: 400 randomly sampled normal training photos (never the held-out ones) are encoded with the same
+encoder as the detector; 48 diverse ones are kept by greedy farthest-point selection on their descriptors. Written:
+* models/highres_tuned/references/.npz ids and half-precision descriptors (read by backend.references)
+* frontend/public/assets/references/.json the same ids with small JPEG thumbnails for the result page
+The photos are VisA training images (CC BY 4.0). Nothing about the detector's score or threshold changes.
+"""
+
+import argparse
+import base64
+import io
+import json
+
+import numpy as np
+import torch
+import torch.nn.functional as F
+from PIL import Image
+
+from backend.config import CATEGORIES, ROOT
+from backend.highres import HighResolutionEncoder, foreground_mask
+from backend.references import descriptor
+
+RUNS = ROOT / "experiments" / "dinov2_highres_v1"
+VISA = ROOT / "VisA_20220922"
+ENCODER = ROOT / "models" / "encoder_dinov2_tuned"
+NPZ = ROOT / "models" / "highres_tuned" / "references"
+JSON_OUT = ROOT / "frontend" / "public" / "assets" / "references"
+POOL, KEEP, THUMB, SEED = 400, 48, 240, 42
+
+
+def fit_names(category):
+ run = RUNS / category
+ split = json.loads((run / "split.json").read_text(encoding="utf-8"))
+ held = {
+ p["image"] for p in json.loads((run / "normal_calibration.json").read_text(encoding="utf-8"))["predictions"]
+ }
+ return [r["image"] for r in split["train"] if r["image"] not in held]
+
+
+def diverse(vectors, count):
+ """Start at the photo closest to the average, then repeatedly add the one farthest from those chosen."""
+ centre = F.normalize(vectors.mean(0), dim=0)
+ chosen = [int((vectors @ centre).argmax())]
+ nearest = vectors @ vectors[chosen[0]]
+ while len(chosen) < min(count, len(vectors)):
+ index = int(nearest.argmin())
+ chosen.append(index)
+ nearest = torch.maximum(nearest, vectors @ vectors[index])
+ return chosen
+
+
+def thumbnail(path):
+ with Image.open(VISA / path) as image:
+ image = image.convert("RGB")
+ image.thumbnail((THUMB, THUMB), Image.Resampling.LANCZOS)
+ buffer = io.BytesIO()
+ image.save(buffer, "JPEG", quality=78, optimize=True)
+ return "data:image/jpeg;base64," + base64.b64encode(buffer.getvalue()).decode()
+
+
+def build(category, encoder):
+ names = fit_names(category)
+ rng = np.random.default_rng(SEED)
+ sample = [names[i] for i in sorted(rng.choice(len(names), min(POOL, len(names)), replace=False))]
+ vectors = []
+ for name in sample:
+ with Image.open(VISA / name) as image:
+ tokens, geometry = encoder.encode(image)
+ vectors.append(descriptor(tokens, foreground_mask(tokens, geometry["grid"])))
+ vectors = torch.stack(vectors)
+ chosen = diverse(vectors, KEEP)
+ ids = [f"{category}/{n:02d}" for n in range(len(chosen))]
+ NPZ.mkdir(parents=True, exist_ok=True)
+ np.savez_compressed(
+ NPZ / f"{category}.npz", ids=np.array(ids), descriptors=vectors[chosen].cpu().numpy().astype("float16")
+ )
+ JSON_OUT.mkdir(parents=True, exist_ok=True)
+ items = [{"id": i, "thumb": thumbnail(sample[c])} for i, c in zip(ids, chosen)]
+ payload = {
+ "category": category,
+ "attribution": "VisA training photos, Zou et al., ECCV 2022, CC BY 4.0, resized",
+ "items": items,
+ }
+ (JSON_OUT / f"{category}.json").write_text(json.dumps(payload, separators=(",", ":")), encoding="utf-8")
+ return len(items), (JSON_OUT / f"{category}.json").stat().st_size
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--categories", nargs="+", choices=CATEGORIES, default=list(CATEGORIES))
+ args = parser.parse_args()
+ encoder = HighResolutionEncoder(ENCODER)
+ for category in args.categories:
+ count, size = build(category, encoder)
+ torch.cuda.empty_cache()
+ print(f"{category}: {count} references, {size / 1e3:.0f} kB of thumbnails", flush=True)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/build_tuned_profile.py b/scripts/build_tuned_profile.py
new file mode 100644
index 0000000000000000000000000000000000000000..e0e88a38ac7691335cedd4c228869d657b4fc63a
--- /dev/null
+++ b/scripts/build_tuned_profile.py
@@ -0,0 +1,204 @@
+"""Build the fine-tuned-encoder profile "dinov2_tuned_v1" next to the current one (needs the GPU, about 30 minutes).
+
+ python -m scripts.build_tuned_profile # all 12 categories (resumes finished ones)
+ python -m scripts.build_tuned_profile --categories pcb1 # one category
+
+What it writes (nothing existing is changed or overwritten):
+* models/encoder_dinov2_tuned/ the round-4b fine-tuned DINOv2 as a normal Hugging Face folder (same keys as the
+ original; fp16 weights), licence copied, receipt with the hashes of the base and tuned weights.
+* models/highres_tuned/.npz the deployed memory bank: a 32,768-patch greedy farthest-point coreset of all
+ patches of the fit normals (the held-out normals are never used), exactly the round-5 recipe.
+* experiments/dinov2_tuned_v1// held-out normal scores, test scores and image/pixel metrics, all computed
+ with the same code path the application uses (backend.highres), from the saved bank files.
+
+Thresholds, cards and the activation marker are written by scripts.activate_tuned (CPU). The test images
+(150-201 per category) were already seen during development, so every number here is descriptive.
+"""
+
+import argparse
+import json
+import shutil
+import time
+
+import numpy as np
+import torch
+import torch.nn.functional as F
+from PIL import Image
+from safetensors.torch import save_file
+
+from backend.config import CATEGORIES, ROOT
+from backend.highres import HighResolutionEncoder, foreground_mask, restore_map, score_tokens
+from backend.vision import sha256
+from scripts.benchmark_official import pixel_metrics, rank_metrics, write
+from scripts.encoder_banks import greedy_coreset
+
+VISA = ROOT / "VisA_20220922"
+BASE = ROOT / "models" / "encoder_dinov2"
+TUNED = ROOT / "models" / "encoder_dinov2_tuned"
+BANKS = ROOT / "models" / "highres_tuned"
+EXPERIMENT = ROOT / "experiments" / "dinov2_tuned_v1"
+RUNS = ROOT / "experiments" / "dinov2_highres_v1"
+WEIGHTS = ROOT / "experiments" / "dinov2_finetune_realistic" / "encoder_ft.pt"
+BANK_SIZE = 32768
+
+
+def export_encoder():
+ """Write the tuned weights as a Hugging Face folder; verify it loads and differs from the base."""
+ TUNED.mkdir(parents=True, exist_ok=True)
+ target = TUNED / "model.safetensors"
+ if not target.exists():
+ state = {k: v.contiguous() for k, v in torch.load(WEIGHTS, map_location="cpu").items()}
+ save_file(state, target, metadata={"format": "pt"})
+ for name in ("config.json", "preprocessor_config.json", "LICENSE"):
+ shutil.copyfile(BASE / name, TUNED / name)
+ base = json.loads((BASE / "ASSET_RECEIPT.json").read_text(encoding="utf-8"))
+ receipt = {
+ "derived_from": base["repo"],
+ "base_revision": base["revision"],
+ "base_model_sha256": base["model_sha256"],
+ "tuned_model_sha256": sha256(target),
+ "license": "Apache-2.0 (derivative of facebook/dinov2-small; modified)",
+ "modification": (
+ "Last 4 transformer blocks and the final layer norm fine-tuned for 2,500 steps on synthetic "
+ "structural defects made from the official VisA fit-normal images (405-814 per category), with a "
+ "consistency loss to the original features (scripts.encoder_finetune --train --realistic). "
+ "Weights stored in fp16."
+ ),
+ "training_weights_file": str(WEIGHTS.relative_to(ROOT)),
+ "training_weights_sha256": sha256(WEIGHTS),
+ "remote_code": False,
+ }
+ (TUNED / "ASSET_RECEIPT.json").write_text(json.dumps(receipt, indent=2), encoding="utf-8")
+ (TUNED / "README.md").write_text(
+ "# DINOv2 ViT-S/14 fine-tuned for DefectRAG\n\nModified copy of facebook/dinov2-small (Apache-2.0). See "
+ "ASSET_RECEIPT.json for the base revision, hashes and the exact modification. Not an official Meta "
+ "release.\n",
+ encoding="utf-8",
+ )
+ return target
+
+
+def normal_names(category):
+ run = RUNS / category
+ split = json.loads((run / "split.json").read_text(encoding="utf-8"))
+ calibration = json.loads((run / "normal_calibration.json").read_text(encoding="utf-8"))
+ held = [p["image"] for p in calibration["predictions"]]
+ fit = [r["image"] for r in split["train"] if r["image"] not in set(held)]
+ return fit, calibration["predictions"], split["test"]
+
+
+def build_bank(category, encoder, fit):
+ parts = []
+ for name in fit:
+ with Image.open(VISA / name) as image:
+ tokens, _ = encoder.encode(image)
+ parts.append(F.normalize(tokens, dim=-1).half())
+ everything = torch.cat(parts)
+ del parts
+ chosen = greedy_coreset(everything, BANK_SIZE, seed=42)
+ bank = everything[chosen].cpu().numpy().astype("float16")
+ del everything
+ torch.cuda.empty_cache()
+ BANKS.mkdir(parents=True, exist_ok=True)
+ temporary = BANKS / f"{category}.npz.partial"
+ with temporary.open("wb") as stream:
+ np.savez_compressed(stream, patches=bank)
+ temporary.replace(BANKS / f"{category}.npz")
+
+
+def run_category(category, encoder):
+ fit, held_saved, test_rows = normal_names(category)
+ directory = EXPERIMENT / category
+ directory.mkdir(parents=True, exist_ok=True)
+ started = time.perf_counter()
+ build_bank(category, encoder, fit)
+ with np.load(BANKS / f"{category}.npz", allow_pickle=False) as saved: # exactly what the application loads
+ bank = F.normalize(torch.from_numpy(saved["patches"].astype("float32")).to(encoder.device), dim=-1)
+ fit_seconds = time.perf_counter() - started
+
+ held, scales = [], []
+ for entry in held_saved:
+ with Image.open(VISA / entry["image"]) as image:
+ tokens, geometry = encoder.encode(image)
+ mask = foreground_mask(tokens, geometry["grid"])
+ raw, score = score_tokens(tokens, bank, mask)
+ scales.extend(raw[raw > 0].tolist())
+ held.append({"image": entry["image"], "sha256": entry["sha256"], "score": score})
+ heatmap_scale = float(np.quantile(scales, 0.995))
+
+ rows, maps = [], []
+ for row in test_rows:
+ with Image.open(VISA / row["image"]) as image:
+ tokens, geometry = encoder.encode(image)
+ mask = foreground_mask(tokens, geometry["grid"])
+ raw, score = score_tokens(tokens, bank, mask)
+ maps.append(restore_map(raw, geometry, (224, 224)).ravel().astype("float32"))
+ rows.append(
+ {
+ "image": row["image"],
+ "label": int(row["label"] != "normal"),
+ "score": score,
+ "foreground_fraction": float(mask.mean()),
+ }
+ )
+ truth = []
+ for row in test_rows:
+ if row["label"] == "normal":
+ truth.append(np.zeros(224 * 224, dtype=bool))
+ else:
+ with Image.open(VISA / row["mask"]) as image:
+ truth.append((np.asarray(image.convert("L").resize((224, 224), Image.Resampling.NEAREST)) > 0).ravel())
+ labels, scores = [r["label"] for r in rows], [r["score"] for r in rows]
+ metrics = {
+ **rank_metrics(labels, scores),
+ **pixel_metrics(np.concatenate(truth), np.concatenate(maps)),
+ "official_test_images": len(rows),
+ "seconds": round(time.perf_counter() - started, 1),
+ }
+ write(
+ directory / "normal_calibration.json",
+ {
+ "heatmap_scale": heatmap_scale,
+ "fit_normals": len(fit),
+ "heldout_normals": len(held),
+ "predictions": held,
+ "bank_patches": BANK_SIZE,
+ },
+ )
+ write(directory / "test_progress.json", rows)
+ write(directory / "metrics.json", metrics)
+ return metrics, fit_seconds
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--categories", nargs="+", choices=CATEGORIES, default=list(CATEGORIES))
+ args = parser.parse_args()
+ weights = export_encoder()
+ print(f"tuned encoder folder ready: {weights} sha256 {sha256(weights)[:16]}...", flush=True)
+ encoder = HighResolutionEncoder(TUNED)
+ for category in args.categories:
+ receipt = EXPERIMENT / category / "complete.json"
+ if receipt.exists():
+ print(f"{category}: already done", flush=True)
+ continue
+ metrics, fit_seconds = run_category(category, encoder)
+ torch.cuda.empty_cache()
+ directory = EXPERIMENT / category
+ write(
+ receipt,
+ {
+ "status": "passed",
+ "files": {p.name: sha256(p) for p in directory.iterdir() if p.is_file() and p.name != "complete.json"},
+ "bank_sha256": sha256(BANKS / f"{category}.npz"),
+ },
+ )
+ print(
+ f"{category}: {metrics['seconds']} s (fit {fit_seconds:.0f} s) | image AUROC {metrics['auroc']:.3f} "
+ f"AP {metrics['average_precision']:.3f} | pixel AUROC {metrics['pixel_auroc']:.3f}",
+ flush=True,
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/check_environment.py b/scripts/check_environment.py
new file mode 100644
index 0000000000000000000000000000000000000000..6ecd56db2cbe07dce6716f1197098a76e119efae
--- /dev/null
+++ b/scripts/check_environment.py
@@ -0,0 +1,10 @@
+"""Read-only dependency visibility report for editor/runtime troubleshooting."""
+import importlib.util
+import json
+import sys
+
+if __name__=='__main__':
+ names=['fastapi','uvicorn','torch','transformers','langchain_core','langchain_community','langchain_text_splitters','langgraph']
+ modules={name:((spec.origin or list(spec.submodule_search_locations or [])) if (spec:=importlib.util.find_spec(name)) else None) for name in names}
+ print(json.dumps({'python':sys.executable,'modules':modules,'all_visible':all(v is not None for v in modules.values())},indent=2))
+ raise SystemExit(0 if all(v is not None for v in modules.values()) else 1)
diff --git a/scripts/check_rag.py b/scripts/check_rag.py
new file mode 100644
index 0000000000000000000000000000000000000000..0984c68e9ba85f05c228b906c1cbc63faf1abdec
--- /dev/null
+++ b/scripts/check_rag.py
@@ -0,0 +1,28 @@
+"""Check real generation on an existing inspection without creating new images."""
+import json
+import time
+import httpx
+from backend.config import ROOT
+
+if __name__=='__main__':
+ report={'answers':[],'status':'running'}
+ path=ROOT/'results'/'rag_live.json'
+ try:
+ with httpx.Client(base_url='http://127.0.0.1:8766',timeout=120,trust_env=False) as client:
+ assert client.get('/api/health').json()['data']['version']=='2.0.1'
+ record=client.get('/api/inspections?category=pcb1').json()['data'][-1]
+ report['inspection_id']=record['id']
+ for question in ['Explain this anomaly score and its limitations.','How is its decision threshold calibrated?','What caused this defect?']:
+ start=time.perf_counter()
+ response=client.post('/api/assistant',json={'inspection_id':record['id'],'question':question})
+ response.raise_for_status();answer=response.json()['data']
+ report['answers'].append({'question':question,'seconds':time.perf_counter()-start,**answer})
+ path.write_text(json.dumps(report,indent=2))
+ expected='abstained' if 'caused' in question else 'llm'
+ assert answer['mode']==expected,answer
+ print(question,answer['mode'],answer['answer'],flush=True)
+ report['status']='passed'
+ except Exception as exc:
+ report['status']='failed';report['failure']=str(exc)
+ raise
+ finally:path.write_text(json.dumps(report,indent=2))