Wizzas commited on
Commit
0db4e63
·
verified ·
1 Parent(s): be0ebbf

Fine-tuned DINOv2 detector profile (dinov2_tuned_v1): coreset banks, thresholds from held-out normals

Browse files
README.md CHANGED
@@ -14,10 +14,10 @@ short_description: Live React dashboard and DINOv2 inspection on ZeroGPU
14
 
15
  # DefectRAG — migration phase 5
16
 
17
- Existing React UI, real frozen DINOv2 inspection across all 12 VisA categories,
18
- original normal-reference banks and heatmaps, with versioned normal-only decision
19
- calibration. No training rerun. The q95 sensitivity policy trades more false
20
- alarms for higher recall; Macaroni1/2 use the more sensitive q80 decision policy.
21
  Historical inspection decisions are preserved.
22
  Anonymous browser history is isolated and temporary. Sign in to the configured
23
  staff workspace for durable shared records when available. Do not treat anomaly
 
14
 
15
  # DefectRAG — migration phase 5
16
 
17
+ Existing React UI, real DINOv2 inspection across all 12 VisA categories with an
18
+ encoder fine-tuned on synthetic defects, 32,768-patch coreset normal-reference banks
19
+ and heatmaps, and normal-only decision thresholds. The q95 sensitivity policy trades
20
+ more false alarms for higher recall; Macaroni1/2 use the more sensitive q80 policy.
21
  Historical inspection decisions are preserved.
22
  Anonymous browser history is isolated and temporary. Sign in to the configured
23
  staff workspace for durable shared records when available. Do not treat anomaly
backend/calibration.py CHANGED
@@ -76,3 +76,39 @@ def calibrated_card(root, original):
76
  if baseline['categories'][original['category']][key] != original[key]:
77
  raise ValueError('Original model card and evaluation disagree')
78
  return active_evaluation(root, baseline)['categories'][original['category']]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  if baseline['categories'][original['category']][key] != original[key]:
77
  raise ValueError('Original model card and evaluation disagree')
78
  return active_evaluation(root, baseline)['categories'][original['category']]
79
+
80
+
81
+ TUNED_POLICY = "tuned-normal-quantile-v1"
82
+ TUNED_FILENAME = "tuned_deployment_evaluation.json"
83
+ TUNED_QUANTILES = {"macaroni1": 0.8, "macaroni2": 0.8}
84
+ TUNED_DEFAULT_QUANTILE = 0.95
85
+
86
+
87
+ def tuned_card(root, original):
88
+ """The decision card of the fine-tuned profile, checked against its model card and the whole manifest.
89
+
90
+ The card in models/highres_tuned already holds the final threshold (a fixed linear quantile of held-out normal
91
+ scores, no anomalous image involved). This confirms that the manifest the dashboard shows says the same.
92
+ """
93
+ path = root / "results" / TUNED_FILENAME
94
+ if not path.exists():
95
+ raise ValueError("Missing tuned deployment manifest")
96
+ manifest = json.loads(path.read_text())
97
+ if manifest.get("decision_policy") != TUNED_POLICY:
98
+ raise ValueError("Invalid tuned calibration manifest")
99
+ category = original["category"]
100
+ card = manifest["categories"][category]
101
+ for key in ("model_id", "profile", "encoder_sha256", "bank_sha256", "threshold", "heatmap_scale", "calibration"):
102
+ if card[key] != original[key]:
103
+ raise ValueError("Tuned model card and manifest disagree: " + category)
104
+ quantile = TUNED_QUANTILES.get(category, TUNED_DEFAULT_QUANTILE)
105
+ if (
106
+ card["calibration"].get("policy") != TUNED_POLICY
107
+ or card["calibration"].get("quantile") != quantile
108
+ or card["calibration"]["anomalous"] != 0
109
+ or not math.isfinite(card["threshold"])
110
+ or card["threshold"] <= 0
111
+ or not math.isclose(card["uncertainty_margin"], card["threshold"] * 0.05, abs_tol=1e-12)
112
+ ):
113
+ raise ValueError("Invalid tuned threshold: " + category)
114
+ return card
backend/highres.py CHANGED
@@ -17,7 +17,7 @@ import torch.nn.functional as F
17
  from transformers import AutoModel
18
  from .vision import distances,ModelUnavailable,sha256,display_map
19
  from .config import CATEGORIES
20
- from .calibration import calibrated_card
21
 
22
 
23
  class HighResolutionEncoder:
@@ -126,3 +126,14 @@ class HighResolutionDetector:
126
  'scope':'VisA appearance anomaly screening; operator-selected category is not verified; foreground heuristic can fail.',
127
  'calibration':card['calibration'],'foreground_fraction':float(mask.mean()),'profile':self.profile_name}
128
  return result,display_map(full,preview,card['heatmap_scale'])
 
 
 
 
 
 
 
 
 
 
 
 
17
  from transformers import AutoModel
18
  from .vision import distances,ModelUnavailable,sha256,display_map
19
  from .config import CATEGORIES
20
+ from .calibration import calibrated_card, tuned_card
21
 
22
 
23
  class HighResolutionEncoder:
 
126
  'scope':'VisA appearance anomaly screening; operator-selected category is not verified; foreground heuristic can fail.',
127
  'calibration':card['calibration'],'foreground_fraction':float(mask.mean()),'profile':self.profile_name}
128
  return result,display_map(full,preview,card['heatmap_scale'])
129
+
130
+
131
+ PROFILES = {
132
+ "dinov2_highres_v1": {"directory": "models/highres", "encoder": "models/encoder_dinov2"},
133
+ "dinov2_tuned_v1": {"directory": "models/highres_tuned", "encoder": "models/encoder_dinov2_tuned"},
134
+ }
135
+
136
+
137
+ def profile_card(root, profile, original):
138
+ """The decision card for a profile: the frozen profile goes through its versioned policy chain."""
139
+ return tuned_card(root, original) if profile == "dinov2_tuned_v1" else calibrated_card(root, original)
backend/main.py CHANGED
@@ -134,14 +134,16 @@ def create_app(settings=None, detector=None, workflow=None, repository=None, gal
134
  def models(): return {'data':detector.cards()}
135
  @app.get('/api/evaluation')
136
  def evaluation():
137
- active=getattr(detector,'profile_name','legacy')=='dinov2_highres_v1'
138
- path=settings.root/'results'/('highres_deployment_evaluation.json' if active else 'evaluation.json')
 
 
139
  result=json.loads(path.read_text()) if path.exists() else {'status':'unverified'}
140
  if active and 'categories' in result:
141
  from .calibration import active_evaluation
142
  result=active_evaluation(settings.root,result)
143
  profile=settings.root/'results'/'serving_profile.json'
144
- if profile.exists() and not active:result['serving_profile']=json.loads(profile.read_text())
145
  return {'data':result}
146
  @app.get('/api/stats')
147
  def stats(): return {'data':repo.stats()}
 
134
  def models(): return {'data':detector.cards()}
135
  @app.get('/api/evaluation')
136
  def evaluation():
137
+ name=getattr(detector,'profile_name','legacy')
138
+ active=name=='dinov2_highres_v1'
139
+ tuned=name=='dinov2_tuned_v1'
140
+ path=settings.root/'results'/('tuned_deployment_evaluation.json' if tuned else 'highres_deployment_evaluation.json' if active else 'evaluation.json')
141
  result=json.loads(path.read_text()) if path.exists() else {'status':'unverified'}
142
  if active and 'categories' in result:
143
  from .calibration import active_evaluation
144
  result=active_evaluation(settings.root,result)
145
  profile=settings.root/'results'/'serving_profile.json'
146
+ if profile.exists() and not (active or tuned):result['serving_profile']=json.loads(profile.read_text())
147
  return {'data':result}
148
  @app.get('/api/stats')
149
  def stats(): return {'data':repo.stats()}
deployment/space/app.py CHANGED
@@ -25,8 +25,7 @@ from fastapi import HTTPException
25
  from fastapi.responses import FileResponse, JSONResponse, RedirectResponse, Response
26
  from fastapi.staticfiles import StaticFiles
27
  from backend.config import CATEGORIES, Settings
28
- from backend.calibration import calibrated_card
29
- from backend.highres import HighResolutionEncoder, foreground_mask, score_tokens, restore_map
30
  from backend.vision import sha256, display_map
31
  from backend.storage import now
32
  from backend.inspection_routes import mount_inspection_experience, INSPECTION_UX_PATHS
@@ -34,9 +33,15 @@ from deployment.space.sessions import SessionRepository, identity, namespace, NA
34
 
35
  ZERO = os.getenv('SPACES_ZERO_GPU') == '1'
36
  DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
37
- CARDS = {category: calibrated_card(ROOT,json.loads((ROOT/f'models/highres/{category}.json').read_text())) for category in CATEGORIES}
38
- ENCODER = HighResolutionEncoder(ROOT/'models/encoder_dinov2', device='cpu')
39
- encoder_digest = sha256(ROOT/'models/encoder_dinov2/model.safetensors')
 
 
 
 
 
 
40
  assert all(card['encoder_sha256'] == encoder_digest for card in CARDS.values())
41
  if DEVICE == 'cuda':
42
  ENCODER.model.half().to('cuda')
@@ -46,7 +51,7 @@ if DEVICE == 'cuda':
46
  ENCODER.std = ENCODER.std.half().to('cuda')
47
  BANKS = {}
48
  for category, card in CARDS.items():
49
- file = ROOT/f'models/highres/{category}.npz'
50
  assert sha256(file) == card['bank_sha256'], f'Invalid bank checksum: {category}'
51
  with np.load(file, allow_pickle=False) as saved:
52
  BANKS[category] = F.normalize(torch.from_numpy(saved['patches'].astype('float32')), dim=-1).to(DEVICE)
@@ -71,7 +76,7 @@ def compute(rgb: np.ndarray, category: str) -> dict:
71
 
72
 
73
  class MetadataDetector:
74
- profile_name = 'dinov2_highres_v1'
75
  def cards(self):
76
  return list(CARDS.values())
77
 
@@ -196,7 +201,7 @@ def inspect_one(image_b64, filename, category, batch, request_id=''):
196
  record.update(id=identifier,created_at=now(),category=category,batch=batch.strip(),filename=Path(filename).name[:160],
197
  verdict=verdict,score=score,threshold=threshold,uncertainty_margin=margin,defect_category=None,
198
  request_fingerprint=fingerprint(content,category,batch),
199
- model_id=card['model_id'],model_sha256=card['bank_sha256'],profile='dinov2_highres_v1',calibration=card['calibration'],
200
  total_model_ms=round((time.perf_counter()-start)*1000,2),
201
  localization=f"{output['geometry']['grid'][0]} x {output['geometry']['grid'][1]} DINOv2 patch distances with PCA foreground heuristic; interpolated, not supervised segmentation",
202
  scope='VisA appearance anomaly screening; operator-selected category is not verified; foreground heuristic can fail.',
 
25
  from fastapi.responses import FileResponse, JSONResponse, RedirectResponse, Response
26
  from fastapi.staticfiles import StaticFiles
27
  from backend.config import CATEGORIES, Settings
28
+ from backend.highres import HighResolutionEncoder, PROFILES, foreground_mask, profile_card, score_tokens, restore_map
 
29
  from backend.vision import sha256, display_map
30
  from backend.storage import now
31
  from backend.inspection_routes import mount_inspection_experience, INSPECTION_UX_PATHS
 
33
 
34
  ZERO = os.getenv('SPACES_ZERO_GPU') == '1'
35
  DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
36
+ # The fine-tuned encoder with coreset banks is the default; DEFECTRAG_SPACE_PROFILE=dinov2_highres_v1 restores the
37
+ # previous frozen-encoder profile (its files stay in the Space).
38
+ PROFILE = os.getenv('DEFECTRAG_SPACE_PROFILE', 'dinov2_tuned_v1')
39
+ assert PROFILE in PROFILES, 'Unknown detector profile'
40
+ BANK_DIRECTORY = ROOT/PROFILES[PROFILE]['directory']
41
+ ENCODER_DIRECTORY = ROOT/PROFILES[PROFILE]['encoder']
42
+ CARDS = {category: profile_card(ROOT,PROFILE,json.loads((BANK_DIRECTORY/f'{category}.json').read_text())) for category in CATEGORIES}
43
+ ENCODER = HighResolutionEncoder(ENCODER_DIRECTORY, device='cpu')
44
+ encoder_digest = sha256(ENCODER_DIRECTORY/'model.safetensors')
45
  assert all(card['encoder_sha256'] == encoder_digest for card in CARDS.values())
46
  if DEVICE == 'cuda':
47
  ENCODER.model.half().to('cuda')
 
51
  ENCODER.std = ENCODER.std.half().to('cuda')
52
  BANKS = {}
53
  for category, card in CARDS.items():
54
+ file = BANK_DIRECTORY/f'{category}.npz'
55
  assert sha256(file) == card['bank_sha256'], f'Invalid bank checksum: {category}'
56
  with np.load(file, allow_pickle=False) as saved:
57
  BANKS[category] = F.normalize(torch.from_numpy(saved['patches'].astype('float32')), dim=-1).to(DEVICE)
 
76
 
77
 
78
  class MetadataDetector:
79
+ profile_name = PROFILE
80
  def cards(self):
81
  return list(CARDS.values())
82
 
 
201
  record.update(id=identifier,created_at=now(),category=category,batch=batch.strip(),filename=Path(filename).name[:160],
202
  verdict=verdict,score=score,threshold=threshold,uncertainty_margin=margin,defect_category=None,
203
  request_fingerprint=fingerprint(content,category,batch),
204
+ model_id=card['model_id'],model_sha256=card['bank_sha256'],profile=PROFILE,calibration=card['calibration'],
205
  total_model_ms=round((time.perf_counter()-start)*1000,2),
206
  localization=f"{output['geometry']['grid'][0]} x {output['geometry']['grid'][1]} DINOv2 patch distances with PCA foreground heuristic; interpolated, not supervised segmentation",
207
  scope='VisA appearance anomaly screening; operator-selected category is not verified; foreground heuristic can fail.',
models/encoder_dinov2_tuned/ASSET_RECEIPT.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "derived_from": "facebook/dinov2-small",
3
+ "base_revision": "ed25f3a31f01632728cabb09d1542f84ab7b0056",
4
+ "base_model_sha256": "ae1e99fcefd534ed978cdeb8326f08030c96e28b7a81ffcbc98a857c84d14be1",
5
+ "tuned_model_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
6
+ "license": "Apache-2.0 (derivative of facebook/dinov2-small; modified)",
7
+ "modification": "Last 4 transformer blocks and the final layer norm fine-tuned for 2,500 steps on synthetic structural defects made from the 810 official VisA fit-normal images per category, with a consistency loss to the original features (scripts.encoder_finetune --train --realistic). Weights stored in fp16.",
8
+ "training_weights_file": "experiments\\dinov2_finetune_realistic\\encoder_ft.pt",
9
+ "training_weights_sha256": "7fec81777e07dcd0b588949fbb36641b04527650baacb6461804dcb8bccd707a",
10
+ "remote_code": false
11
+ }
models/encoder_dinov2_tuned/LICENSE ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
models/encoder_dinov2_tuned/README.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # DINOv2 ViT-S/14 fine-tuned for DefectRAG
2
+
3
+ Modified 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.
models/encoder_dinov2_tuned/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Dinov2Model"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.0,
6
+ "drop_path_rate": 0.0,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.0,
9
+ "hidden_size": 384,
10
+ "image_size": 518,
11
+ "initializer_range": 0.02,
12
+ "layer_norm_eps": 1e-06,
13
+ "layerscale_value": 1.0,
14
+ "mlp_ratio": 4,
15
+ "model_type": "dinov2",
16
+ "num_attention_heads": 6,
17
+ "num_channels": 3,
18
+ "num_hidden_layers": 12,
19
+ "patch_size": 14,
20
+ "qkv_bias": true,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.32.0.dev0",
23
+ "use_swiglu_ffn": false
24
+ }
models/encoder_dinov2_tuned/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb
3
+ size 44136744
models/encoder_dinov2_tuned/preprocessor_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": 224,
4
+ "width": 224
5
+ },
6
+ "do_center_crop": true,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "image_mean": [
12
+ 0.485,
13
+ 0.456,
14
+ 0.406
15
+ ],
16
+ "image_processor_type": "BitImageProcessor",
17
+ "image_std": [
18
+ 0.229,
19
+ 0.224,
20
+ 0.225
21
+ ],
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "shortest_edge": 256
26
+ }
27
+ }
models/highres_tuned/PROFILE.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "status": "active",
3
+ "profile": "dinov2_tuned_v1",
4
+ "categories": [
5
+ "pcb1",
6
+ "capsules",
7
+ "cashew",
8
+ "candle",
9
+ "chewinggum",
10
+ "fryum",
11
+ "macaroni1",
12
+ "macaroni2",
13
+ "pcb2",
14
+ "pcb3",
15
+ "pcb4",
16
+ "pipe_fryum"
17
+ ],
18
+ "deployment_evaluation": "results/tuned_deployment_evaluation.json",
19
+ "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).",
20
+ "recovery": "Set DEFECTRAG_PROFILE=dinov2_highres_v1 (frozen encoder, previous banks) or legacy"
21
+ }
models/highres_tuned/candle.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "candle",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-candle-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "12775563ee1c641a96e03c92aafaa52594b8a5adf7d5b58934b64ece6cf7f824",
9
+ "threshold": 0.10769653692841528,
10
+ "uncertainty_margin": 0.005384826846420765,
11
+ "heatmap_scale": 0.08101917594671243,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23248556,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 90,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 5,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 810,
26
+ "metrics": {
27
+ "image_auroc": 0.9599,
28
+ "average_precision": 0.9635102573657932,
29
+ "precision": 0.9052631578947369,
30
+ "recall": 0.86,
31
+ "f1": 0.8820512820512821,
32
+ "false_positive_rate": 0.09,
33
+ "confusion_matrix": [
34
+ [
35
+ 91,
36
+ 9
37
+ ],
38
+ [
39
+ 14,
40
+ 86
41
+ ]
42
+ ],
43
+ "n_images": 200,
44
+ "pixel_auroc_224": 0.9915738142390015,
45
+ "pixel_average_precision_224": 0.40608475735949057,
46
+ "uncertain_fraction": 0.035,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/candle.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12775563ee1c641a96e03c92aafaa52594b8a5adf7d5b58934b64ece6cf7f824
3
+ size 23248556
models/highres_tuned/capsules.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "capsules",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-capsules-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "f3d63549328eb250a5dda32a78e03e9f16b9537d38a5fa58c83e2defc97defde",
9
+ "threshold": 0.10395566150546073,
10
+ "uncertainty_margin": 0.005197783075273037,
11
+ "heatmap_scale": 0.09393790721893303,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23255377,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 55,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 3,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 487,
26
+ "metrics": {
27
+ "image_auroc": 0.9778333333333333,
28
+ "average_precision": 0.9833586325787514,
29
+ "precision": 0.96,
30
+ "recall": 0.96,
31
+ "f1": 0.96,
32
+ "false_positive_rate": 0.06666666666666667,
33
+ "confusion_matrix": [
34
+ [
35
+ 56,
36
+ 4
37
+ ],
38
+ [
39
+ 4,
40
+ 96
41
+ ]
42
+ ],
43
+ "n_images": 160,
44
+ "pixel_auroc_224": 0.9778261035822543,
45
+ "pixel_average_precision_224": 0.5149128125633966,
46
+ "uncertain_fraction": 0.0875,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/capsules.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3d63549328eb250a5dda32a78e03e9f16b9537d38a5fa58c83e2defc97defde
3
+ size 23255377
models/highres_tuned/cashew.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "cashew",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-cashew-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "848a79463a73d9682bffbf7d397faea9bb74495146ea48a037bf2ebf4f4ed3f2",
9
+ "threshold": 0.10727595388889313,
10
+ "uncertainty_margin": 0.005363797694444657,
11
+ "heatmap_scale": 0.08695902496576309,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23238560,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 45,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 3,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 405,
26
+ "metrics": {
27
+ "image_auroc": 0.974,
28
+ "average_precision": 0.9879244189184127,
29
+ "precision": 0.9591836734693877,
30
+ "recall": 0.94,
31
+ "f1": 0.9494949494949495,
32
+ "false_positive_rate": 0.08,
33
+ "confusion_matrix": [
34
+ [
35
+ 46,
36
+ 4
37
+ ],
38
+ [
39
+ 6,
40
+ 94
41
+ ]
42
+ ],
43
+ "n_images": 150,
44
+ "pixel_auroc_224": 0.9968688031074235,
45
+ "pixel_average_precision_224": 0.7388969040994572,
46
+ "uncertain_fraction": 0.10666666666666667,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/cashew.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:848a79463a73d9682bffbf7d397faea9bb74495146ea48a037bf2ebf4f4ed3f2
3
+ size 23238560
models/highres_tuned/chewinggum.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "chewinggum",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-chewinggum-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "c40c42e84c4cca85cf1a9e3e0316e41c7b7a6c29c7d959754a8fb9d709d232b8",
9
+ "threshold": 0.11576281487941742,
10
+ "uncertainty_margin": 0.005788140743970872,
11
+ "heatmap_scale": 0.09326122194528576,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23230985,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 46,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 3,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 407,
26
+ "metrics": {
27
+ "image_auroc": 0.9916,
28
+ "average_precision": 0.9964316707632301,
29
+ "precision": 0.9696969696969697,
30
+ "recall": 0.96,
31
+ "f1": 0.964824120603015,
32
+ "false_positive_rate": 0.06,
33
+ "confusion_matrix": [
34
+ [
35
+ 47,
36
+ 3
37
+ ],
38
+ [
39
+ 4,
40
+ 96
41
+ ]
42
+ ],
43
+ "n_images": 150,
44
+ "pixel_auroc_224": 0.9956113261527341,
45
+ "pixel_average_precision_224": 0.7341234993437673,
46
+ "uncertain_fraction": 0.02,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/chewinggum.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c40c42e84c4cca85cf1a9e3e0316e41c7b7a6c29c7d959754a8fb9d709d232b8
3
+ size 23230985
models/highres_tuned/fryum.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "fryum",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-fryum-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "a23e9ec257fc5b77bdf55cfa4c86ab11df8e6daee3b48223f8b094ed2106f64d",
9
+ "threshold": 0.10525055527687072,
10
+ "uncertainty_margin": 0.0052625277638435365,
11
+ "heatmap_scale": 0.07980967342853555,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23254817,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 45,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 3,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 405,
26
+ "metrics": {
27
+ "image_auroc": 0.9902,
28
+ "average_precision": 0.9951603881086932,
29
+ "precision": 0.9795918367346939,
30
+ "recall": 0.96,
31
+ "f1": 0.9696969696969697,
32
+ "false_positive_rate": 0.04,
33
+ "confusion_matrix": [
34
+ [
35
+ 48,
36
+ 2
37
+ ],
38
+ [
39
+ 4,
40
+ 96
41
+ ]
42
+ ],
43
+ "n_images": 150,
44
+ "pixel_auroc_224": 0.9809775229522469,
45
+ "pixel_average_precision_224": 0.4965360876901288,
46
+ "uncertain_fraction": 0.02,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/fryum.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a23e9ec257fc5b77bdf55cfa4c86ab11df8e6daee3b48223f8b094ed2106f64d
3
+ size 23254817
models/highres_tuned/macaroni1.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "macaroni1",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-macaroni1-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "bb91183ddb84d8b0168988546c4186cf6de6512e4d72196a0a4b13fd9699d148",
9
+ "threshold": 0.0831331416964531,
10
+ "uncertainty_margin": 0.004156657084822655,
11
+ "heatmap_scale": 0.07764787554740862,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23276388,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 80th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 90,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.8,
22
+ "calibration_above_threshold": 18,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 810,
26
+ "metrics": {
27
+ "image_auroc": 0.9471999999999999,
28
+ "average_precision": 0.9581494503739729,
29
+ "precision": 0.8198198198198198,
30
+ "recall": 0.91,
31
+ "f1": 0.862559241706161,
32
+ "false_positive_rate": 0.2,
33
+ "confusion_matrix": [
34
+ [
35
+ 80,
36
+ 20
37
+ ],
38
+ [
39
+ 9,
40
+ 91
41
+ ]
42
+ ],
43
+ "n_images": 200,
44
+ "pixel_auroc_224": 0.9962604306654536,
45
+ "pixel_average_precision_224": 0.1985339563300542,
46
+ "uncertain_fraction": 0.095,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/macaroni1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb91183ddb84d8b0168988546c4186cf6de6512e4d72196a0a4b13fd9699d148
3
+ size 23276388
models/highres_tuned/macaroni2.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "macaroni2",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-macaroni2-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "565bf9acc0869b52f4ffd1f6a9d8d3c6500555fa8a5f501bdf4cefdcadc51ae5",
9
+ "threshold": 0.09993447512388229,
10
+ "uncertainty_margin": 0.004996723756194115,
11
+ "heatmap_scale": 0.09322665214538575,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23254139,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 80th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 90,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.8,
22
+ "calibration_above_threshold": 18,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 810,
26
+ "metrics": {
27
+ "image_auroc": 0.8969999999999999,
28
+ "average_precision": 0.9032903776564074,
29
+ "precision": 0.7692307692307693,
30
+ "recall": 0.9,
31
+ "f1": 0.8294930875576038,
32
+ "false_positive_rate": 0.27,
33
+ "confusion_matrix": [
34
+ [
35
+ 73,
36
+ 27
37
+ ],
38
+ [
39
+ 10,
40
+ 90
41
+ ]
42
+ ],
43
+ "n_images": 200,
44
+ "pixel_auroc_224": 0.9940951618855306,
45
+ "pixel_average_precision_224": 0.16362726373735387,
46
+ "uncertain_fraction": 0.275,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/macaroni2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:565bf9acc0869b52f4ffd1f6a9d8d3c6500555fa8a5f501bdf4cefdcadc51ae5
3
+ size 23254139
models/highres_tuned/pcb1.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "pcb1",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-pcb1-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "282ebe91a413a4c66a1f997552867a14a86c8c284100038c5445295184a4f5fd",
9
+ "threshold": 0.09390439838171005,
10
+ "uncertainty_margin": 0.004695219919085503,
11
+ "heatmap_scale": 0.07119274705648429,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23249131,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 91,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 5,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 813,
26
+ "metrics": {
27
+ "image_auroc": 0.9788,
28
+ "average_precision": 0.976301821637879,
29
+ "precision": 0.912621359223301,
30
+ "recall": 0.94,
31
+ "f1": 0.9261083743842364,
32
+ "false_positive_rate": 0.09,
33
+ "confusion_matrix": [
34
+ [
35
+ 91,
36
+ 9
37
+ ],
38
+ [
39
+ 6,
40
+ 94
41
+ ]
42
+ ],
43
+ "n_images": 200,
44
+ "pixel_auroc_224": 0.9948781306534351,
45
+ "pixel_average_precision_224": 0.8829297562485579,
46
+ "uncertain_fraction": 0.055,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/pcb1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:282ebe91a413a4c66a1f997552867a14a86c8c284100038c5445295184a4f5fd
3
+ size 23249131
models/highres_tuned/pcb2.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "pcb2",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-pcb2-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "38d1bb2b1ce04df367e16b276f77d1d9ef1abd3463bbcbc5ee5fca77edce5bed",
9
+ "threshold": 0.09243721514940262,
10
+ "uncertainty_margin": 0.004621860757470131,
11
+ "heatmap_scale": 0.07252105534076699,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23257659,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 91,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 5,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 810,
26
+ "metrics": {
27
+ "image_auroc": 0.9575,
28
+ "average_precision": 0.9678848370579266,
29
+ "precision": 0.8969072164948454,
30
+ "recall": 0.87,
31
+ "f1": 0.883248730964467,
32
+ "false_positive_rate": 0.1,
33
+ "confusion_matrix": [
34
+ [
35
+ 90,
36
+ 10
37
+ ],
38
+ [
39
+ 13,
40
+ 87
41
+ ]
42
+ ],
43
+ "n_images": 200,
44
+ "pixel_auroc_224": 0.9721937213482837,
45
+ "pixel_average_precision_224": 0.29801335589310723,
46
+ "uncertain_fraction": 0.035,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/pcb2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38d1bb2b1ce04df367e16b276f77d1d9ef1abd3463bbcbc5ee5fca77edce5bed
3
+ size 23257659
models/highres_tuned/pcb3.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "pcb3",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-pcb3-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "b786dfee5f10ab1953fe3807057ddbc57d6b9a85bc9e6b9236d6bc14796dcdfd",
9
+ "threshold": 0.09173599630594254,
10
+ "uncertainty_margin": 0.004586799815297127,
11
+ "heatmap_scale": 0.07605906963348377,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23258829,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 91,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 5,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 814,
26
+ "metrics": {
27
+ "image_auroc": 0.9928712871287129,
28
+ "average_precision": 0.9935456634405582,
29
+ "precision": 0.8828828828828829,
30
+ "recall": 0.98,
31
+ "f1": 0.9289099526066351,
32
+ "false_positive_rate": 0.12871287128712872,
33
+ "confusion_matrix": [
34
+ [
35
+ 88,
36
+ 13
37
+ ],
38
+ [
39
+ 2,
40
+ 98
41
+ ]
42
+ ],
43
+ "n_images": 201,
44
+ "pixel_auroc_224": 0.9801529756449681,
45
+ "pixel_average_precision_224": 0.31863648390631216,
46
+ "uncertain_fraction": 0.1044776119402985,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/pcb3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b786dfee5f10ab1953fe3807057ddbc57d6b9a85bc9e6b9236d6bc14796dcdfd
3
+ size 23258829
models/highres_tuned/pcb4.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "pcb4",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-pcb4-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "127c3c32277bb70544d134d6d3034ef03fc33d1c7e82e23c68f1adda63a7f64d",
9
+ "threshold": 0.1058717742562294,
10
+ "uncertainty_margin": 0.0052935887128114706,
11
+ "heatmap_scale": 0.07633256852626799,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23265594,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 91,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 5,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 813,
26
+ "metrics": {
27
+ "image_auroc": 0.9953465346534653,
28
+ "average_precision": 0.9954175606404433,
29
+ "precision": 0.979381443298969,
30
+ "recall": 0.95,
31
+ "f1": 0.9644670050761421,
32
+ "false_positive_rate": 0.019801980198019802,
33
+ "confusion_matrix": [
34
+ [
35
+ 99,
36
+ 2
37
+ ],
38
+ [
39
+ 5,
40
+ 95
41
+ ]
42
+ ],
43
+ "n_images": 201,
44
+ "pixel_auroc_224": 0.9832394042016657,
45
+ "pixel_average_precision_224": 0.37032673876297395,
46
+ "uncertain_fraction": 0.03980099502487562,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/pcb4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:127c3c32277bb70544d134d6d3034ef03fc33d1c7e82e23c68f1adda63a7f64d
3
+ size 23265594
models/highres_tuned/pipe_fryum.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "category": "pipe_fryum",
3
+ "available": true,
4
+ "model_id": "dinov2-tuned-pipe_fryum-v1",
5
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
6
+ "profile": "dinov2_tuned_v1",
7
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
8
+ "bank_sha256": "4bcf8215c4380b2443185bf062b578772ad11b636af2fdd21e455db9898ab97d",
9
+ "threshold": 0.14284870028495786,
10
+ "uncertainty_margin": 0.007142435014247894,
11
+ "heatmap_scale": 0.1143493586778642,
12
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
13
+ "bank_size_bytes": 23266873,
14
+ "encoder_size_bytes": 44136744,
15
+ "calibration": {
16
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
17
+ "normal": 45,
18
+ "anomalous": 0,
19
+ "seed": 42,
20
+ "policy": "tuned-normal-quantile-v1",
21
+ "quantile": 0.95,
22
+ "calibration_above_threshold": 3,
23
+ "future_false_positive_rate_guaranteed": false
24
+ },
25
+ "train_normal_count": 405,
26
+ "metrics": {
27
+ "image_auroc": 0.9905999999999999,
28
+ "average_precision": 0.9960775103939439,
29
+ "precision": 0.9801980198019802,
30
+ "recall": 0.99,
31
+ "f1": 0.9850746268656716,
32
+ "false_positive_rate": 0.04,
33
+ "confusion_matrix": [
34
+ [
35
+ 48,
36
+ 2
37
+ ],
38
+ [
39
+ 1,
40
+ 99
41
+ ]
42
+ ],
43
+ "n_images": 150,
44
+ "pixel_auroc_224": 0.9929194372262363,
45
+ "pixel_average_precision_224": 0.4953619282653999,
46
+ "uncertain_fraction": 0.02666666666666667,
47
+ "latency_median_ms": null,
48
+ "peak_gpu_mb": null
49
+ },
50
+ "resolution_short_edge": 448,
51
+ "patch_size": 14,
52
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
53
+ "decision_policy": "tuned-normal-quantile-v1"
54
+ }
models/highres_tuned/pipe_fryum.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bcf8215c4380b2443185bf062b578772ad11b636af2fdd21e455db9898ab97d
3
+ size 23266873
results/tuned_deployment_evaluation.json ADDED
@@ -0,0 +1,722 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
3
+ "profile": "dinov2_tuned_v1",
4
+ "protocol": "Official VisA test assignments. Encoder: facebook/dinov2-small with the last 4 blocks fine-tuned on synthetic defects made from the 810 fit normals per category (scripts.encoder_finetune --train --realistic). Memory: a greedy farthest-point coreset of 32,768 patches of all fit-normal patches (the 90 held-out normals are never used). Thresholds: fixed linear quantiles of held-out normal scores (q95; q80 for macaroni1/2). Retrospective development evaluation on test images that were seen during development; not an untouched external test.",
5
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
6
+ "device": "cuda",
7
+ "categories": {
8
+ "pcb1": {
9
+ "category": "pcb1",
10
+ "available": true,
11
+ "model_id": "dinov2-tuned-pcb1-v1",
12
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
13
+ "profile": "dinov2_tuned_v1",
14
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
15
+ "bank_sha256": "282ebe91a413a4c66a1f997552867a14a86c8c284100038c5445295184a4f5fd",
16
+ "threshold": 0.09390439838171005,
17
+ "uncertainty_margin": 0.004695219919085503,
18
+ "heatmap_scale": 0.07119274705648429,
19
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
20
+ "bank_size_bytes": 23249131,
21
+ "encoder_size_bytes": 44136744,
22
+ "calibration": {
23
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
24
+ "normal": 91,
25
+ "anomalous": 0,
26
+ "seed": 42,
27
+ "policy": "tuned-normal-quantile-v1",
28
+ "quantile": 0.95,
29
+ "calibration_above_threshold": 5,
30
+ "future_false_positive_rate_guaranteed": false
31
+ },
32
+ "train_normal_count": 813,
33
+ "metrics": {
34
+ "image_auroc": 0.9788,
35
+ "average_precision": 0.976301821637879,
36
+ "precision": 0.912621359223301,
37
+ "recall": 0.94,
38
+ "f1": 0.9261083743842364,
39
+ "false_positive_rate": 0.09,
40
+ "confusion_matrix": [
41
+ [
42
+ 91,
43
+ 9
44
+ ],
45
+ [
46
+ 6,
47
+ 94
48
+ ]
49
+ ],
50
+ "n_images": 200,
51
+ "pixel_auroc_224": 0.9948781306534351,
52
+ "pixel_average_precision_224": 0.8829297562485579,
53
+ "uncertain_fraction": 0.055,
54
+ "latency_median_ms": null,
55
+ "peak_gpu_mb": null
56
+ },
57
+ "resolution_short_edge": 448,
58
+ "patch_size": 14,
59
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
60
+ "decision_policy": "tuned-normal-quantile-v1"
61
+ },
62
+ "capsules": {
63
+ "category": "capsules",
64
+ "available": true,
65
+ "model_id": "dinov2-tuned-capsules-v1",
66
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
67
+ "profile": "dinov2_tuned_v1",
68
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
69
+ "bank_sha256": "f3d63549328eb250a5dda32a78e03e9f16b9537d38a5fa58c83e2defc97defde",
70
+ "threshold": 0.10395566150546073,
71
+ "uncertainty_margin": 0.005197783075273037,
72
+ "heatmap_scale": 0.09393790721893303,
73
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
74
+ "bank_size_bytes": 23255377,
75
+ "encoder_size_bytes": 44136744,
76
+ "calibration": {
77
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
78
+ "normal": 55,
79
+ "anomalous": 0,
80
+ "seed": 42,
81
+ "policy": "tuned-normal-quantile-v1",
82
+ "quantile": 0.95,
83
+ "calibration_above_threshold": 3,
84
+ "future_false_positive_rate_guaranteed": false
85
+ },
86
+ "train_normal_count": 487,
87
+ "metrics": {
88
+ "image_auroc": 0.9778333333333333,
89
+ "average_precision": 0.9833586325787514,
90
+ "precision": 0.96,
91
+ "recall": 0.96,
92
+ "f1": 0.96,
93
+ "false_positive_rate": 0.06666666666666667,
94
+ "confusion_matrix": [
95
+ [
96
+ 56,
97
+ 4
98
+ ],
99
+ [
100
+ 4,
101
+ 96
102
+ ]
103
+ ],
104
+ "n_images": 160,
105
+ "pixel_auroc_224": 0.9778261035822543,
106
+ "pixel_average_precision_224": 0.5149128125633966,
107
+ "uncertain_fraction": 0.0875,
108
+ "latency_median_ms": null,
109
+ "peak_gpu_mb": null
110
+ },
111
+ "resolution_short_edge": 448,
112
+ "patch_size": 14,
113
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
114
+ "decision_policy": "tuned-normal-quantile-v1"
115
+ },
116
+ "cashew": {
117
+ "category": "cashew",
118
+ "available": true,
119
+ "model_id": "dinov2-tuned-cashew-v1",
120
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
121
+ "profile": "dinov2_tuned_v1",
122
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
123
+ "bank_sha256": "848a79463a73d9682bffbf7d397faea9bb74495146ea48a037bf2ebf4f4ed3f2",
124
+ "threshold": 0.10727595388889313,
125
+ "uncertainty_margin": 0.005363797694444657,
126
+ "heatmap_scale": 0.08695902496576309,
127
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
128
+ "bank_size_bytes": 23238560,
129
+ "encoder_size_bytes": 44136744,
130
+ "calibration": {
131
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
132
+ "normal": 45,
133
+ "anomalous": 0,
134
+ "seed": 42,
135
+ "policy": "tuned-normal-quantile-v1",
136
+ "quantile": 0.95,
137
+ "calibration_above_threshold": 3,
138
+ "future_false_positive_rate_guaranteed": false
139
+ },
140
+ "train_normal_count": 405,
141
+ "metrics": {
142
+ "image_auroc": 0.974,
143
+ "average_precision": 0.9879244189184127,
144
+ "precision": 0.9591836734693877,
145
+ "recall": 0.94,
146
+ "f1": 0.9494949494949495,
147
+ "false_positive_rate": 0.08,
148
+ "confusion_matrix": [
149
+ [
150
+ 46,
151
+ 4
152
+ ],
153
+ [
154
+ 6,
155
+ 94
156
+ ]
157
+ ],
158
+ "n_images": 150,
159
+ "pixel_auroc_224": 0.9968688031074235,
160
+ "pixel_average_precision_224": 0.7388969040994572,
161
+ "uncertain_fraction": 0.10666666666666667,
162
+ "latency_median_ms": null,
163
+ "peak_gpu_mb": null
164
+ },
165
+ "resolution_short_edge": 448,
166
+ "patch_size": 14,
167
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
168
+ "decision_policy": "tuned-normal-quantile-v1"
169
+ },
170
+ "candle": {
171
+ "category": "candle",
172
+ "available": true,
173
+ "model_id": "dinov2-tuned-candle-v1",
174
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
175
+ "profile": "dinov2_tuned_v1",
176
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
177
+ "bank_sha256": "12775563ee1c641a96e03c92aafaa52594b8a5adf7d5b58934b64ece6cf7f824",
178
+ "threshold": 0.10769653692841528,
179
+ "uncertainty_margin": 0.005384826846420765,
180
+ "heatmap_scale": 0.08101917594671243,
181
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
182
+ "bank_size_bytes": 23248556,
183
+ "encoder_size_bytes": 44136744,
184
+ "calibration": {
185
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
186
+ "normal": 90,
187
+ "anomalous": 0,
188
+ "seed": 42,
189
+ "policy": "tuned-normal-quantile-v1",
190
+ "quantile": 0.95,
191
+ "calibration_above_threshold": 5,
192
+ "future_false_positive_rate_guaranteed": false
193
+ },
194
+ "train_normal_count": 810,
195
+ "metrics": {
196
+ "image_auroc": 0.9599,
197
+ "average_precision": 0.9635102573657932,
198
+ "precision": 0.9052631578947369,
199
+ "recall": 0.86,
200
+ "f1": 0.8820512820512821,
201
+ "false_positive_rate": 0.09,
202
+ "confusion_matrix": [
203
+ [
204
+ 91,
205
+ 9
206
+ ],
207
+ [
208
+ 14,
209
+ 86
210
+ ]
211
+ ],
212
+ "n_images": 200,
213
+ "pixel_auroc_224": 0.9915738142390015,
214
+ "pixel_average_precision_224": 0.40608475735949057,
215
+ "uncertain_fraction": 0.035,
216
+ "latency_median_ms": null,
217
+ "peak_gpu_mb": null
218
+ },
219
+ "resolution_short_edge": 448,
220
+ "patch_size": 14,
221
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
222
+ "decision_policy": "tuned-normal-quantile-v1"
223
+ },
224
+ "chewinggum": {
225
+ "category": "chewinggum",
226
+ "available": true,
227
+ "model_id": "dinov2-tuned-chewinggum-v1",
228
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
229
+ "profile": "dinov2_tuned_v1",
230
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
231
+ "bank_sha256": "c40c42e84c4cca85cf1a9e3e0316e41c7b7a6c29c7d959754a8fb9d709d232b8",
232
+ "threshold": 0.11576281487941742,
233
+ "uncertainty_margin": 0.005788140743970872,
234
+ "heatmap_scale": 0.09326122194528576,
235
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
236
+ "bank_size_bytes": 23230985,
237
+ "encoder_size_bytes": 44136744,
238
+ "calibration": {
239
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
240
+ "normal": 46,
241
+ "anomalous": 0,
242
+ "seed": 42,
243
+ "policy": "tuned-normal-quantile-v1",
244
+ "quantile": 0.95,
245
+ "calibration_above_threshold": 3,
246
+ "future_false_positive_rate_guaranteed": false
247
+ },
248
+ "train_normal_count": 407,
249
+ "metrics": {
250
+ "image_auroc": 0.9916,
251
+ "average_precision": 0.9964316707632301,
252
+ "precision": 0.9696969696969697,
253
+ "recall": 0.96,
254
+ "f1": 0.964824120603015,
255
+ "false_positive_rate": 0.06,
256
+ "confusion_matrix": [
257
+ [
258
+ 47,
259
+ 3
260
+ ],
261
+ [
262
+ 4,
263
+ 96
264
+ ]
265
+ ],
266
+ "n_images": 150,
267
+ "pixel_auroc_224": 0.9956113261527341,
268
+ "pixel_average_precision_224": 0.7341234993437673,
269
+ "uncertain_fraction": 0.02,
270
+ "latency_median_ms": null,
271
+ "peak_gpu_mb": null
272
+ },
273
+ "resolution_short_edge": 448,
274
+ "patch_size": 14,
275
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
276
+ "decision_policy": "tuned-normal-quantile-v1"
277
+ },
278
+ "fryum": {
279
+ "category": "fryum",
280
+ "available": true,
281
+ "model_id": "dinov2-tuned-fryum-v1",
282
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
283
+ "profile": "dinov2_tuned_v1",
284
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
285
+ "bank_sha256": "a23e9ec257fc5b77bdf55cfa4c86ab11df8e6daee3b48223f8b094ed2106f64d",
286
+ "threshold": 0.10525055527687072,
287
+ "uncertainty_margin": 0.0052625277638435365,
288
+ "heatmap_scale": 0.07980967342853555,
289
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
290
+ "bank_size_bytes": 23254817,
291
+ "encoder_size_bytes": 44136744,
292
+ "calibration": {
293
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
294
+ "normal": 45,
295
+ "anomalous": 0,
296
+ "seed": 42,
297
+ "policy": "tuned-normal-quantile-v1",
298
+ "quantile": 0.95,
299
+ "calibration_above_threshold": 3,
300
+ "future_false_positive_rate_guaranteed": false
301
+ },
302
+ "train_normal_count": 405,
303
+ "metrics": {
304
+ "image_auroc": 0.9902,
305
+ "average_precision": 0.9951603881086932,
306
+ "precision": 0.9795918367346939,
307
+ "recall": 0.96,
308
+ "f1": 0.9696969696969697,
309
+ "false_positive_rate": 0.04,
310
+ "confusion_matrix": [
311
+ [
312
+ 48,
313
+ 2
314
+ ],
315
+ [
316
+ 4,
317
+ 96
318
+ ]
319
+ ],
320
+ "n_images": 150,
321
+ "pixel_auroc_224": 0.9809775229522469,
322
+ "pixel_average_precision_224": 0.4965360876901288,
323
+ "uncertain_fraction": 0.02,
324
+ "latency_median_ms": null,
325
+ "peak_gpu_mb": null
326
+ },
327
+ "resolution_short_edge": 448,
328
+ "patch_size": 14,
329
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
330
+ "decision_policy": "tuned-normal-quantile-v1"
331
+ },
332
+ "macaroni1": {
333
+ "category": "macaroni1",
334
+ "available": true,
335
+ "model_id": "dinov2-tuned-macaroni1-v1",
336
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
337
+ "profile": "dinov2_tuned_v1",
338
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
339
+ "bank_sha256": "bb91183ddb84d8b0168988546c4186cf6de6512e4d72196a0a4b13fd9699d148",
340
+ "threshold": 0.0831331416964531,
341
+ "uncertainty_margin": 0.004156657084822655,
342
+ "heatmap_scale": 0.07764787554740862,
343
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
344
+ "bank_size_bytes": 23276388,
345
+ "encoder_size_bytes": 44136744,
346
+ "calibration": {
347
+ "method": "Fixed linear 80th percentile of heldout normal scores; no anomalous calibration",
348
+ "normal": 90,
349
+ "anomalous": 0,
350
+ "seed": 42,
351
+ "policy": "tuned-normal-quantile-v1",
352
+ "quantile": 0.8,
353
+ "calibration_above_threshold": 18,
354
+ "future_false_positive_rate_guaranteed": false
355
+ },
356
+ "train_normal_count": 810,
357
+ "metrics": {
358
+ "image_auroc": 0.9471999999999999,
359
+ "average_precision": 0.9581494503739729,
360
+ "precision": 0.8198198198198198,
361
+ "recall": 0.91,
362
+ "f1": 0.862559241706161,
363
+ "false_positive_rate": 0.2,
364
+ "confusion_matrix": [
365
+ [
366
+ 80,
367
+ 20
368
+ ],
369
+ [
370
+ 9,
371
+ 91
372
+ ]
373
+ ],
374
+ "n_images": 200,
375
+ "pixel_auroc_224": 0.9962604306654536,
376
+ "pixel_average_precision_224": 0.1985339563300542,
377
+ "uncertain_fraction": 0.095,
378
+ "latency_median_ms": null,
379
+ "peak_gpu_mb": null
380
+ },
381
+ "resolution_short_edge": 448,
382
+ "patch_size": 14,
383
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
384
+ "decision_policy": "tuned-normal-quantile-v1"
385
+ },
386
+ "macaroni2": {
387
+ "category": "macaroni2",
388
+ "available": true,
389
+ "model_id": "dinov2-tuned-macaroni2-v1",
390
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
391
+ "profile": "dinov2_tuned_v1",
392
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
393
+ "bank_sha256": "565bf9acc0869b52f4ffd1f6a9d8d3c6500555fa8a5f501bdf4cefdcadc51ae5",
394
+ "threshold": 0.09993447512388229,
395
+ "uncertainty_margin": 0.004996723756194115,
396
+ "heatmap_scale": 0.09322665214538575,
397
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
398
+ "bank_size_bytes": 23254139,
399
+ "encoder_size_bytes": 44136744,
400
+ "calibration": {
401
+ "method": "Fixed linear 80th percentile of heldout normal scores; no anomalous calibration",
402
+ "normal": 90,
403
+ "anomalous": 0,
404
+ "seed": 42,
405
+ "policy": "tuned-normal-quantile-v1",
406
+ "quantile": 0.8,
407
+ "calibration_above_threshold": 18,
408
+ "future_false_positive_rate_guaranteed": false
409
+ },
410
+ "train_normal_count": 810,
411
+ "metrics": {
412
+ "image_auroc": 0.8969999999999999,
413
+ "average_precision": 0.9032903776564074,
414
+ "precision": 0.7692307692307693,
415
+ "recall": 0.9,
416
+ "f1": 0.8294930875576038,
417
+ "false_positive_rate": 0.27,
418
+ "confusion_matrix": [
419
+ [
420
+ 73,
421
+ 27
422
+ ],
423
+ [
424
+ 10,
425
+ 90
426
+ ]
427
+ ],
428
+ "n_images": 200,
429
+ "pixel_auroc_224": 0.9940951618855306,
430
+ "pixel_average_precision_224": 0.16362726373735387,
431
+ "uncertain_fraction": 0.275,
432
+ "latency_median_ms": null,
433
+ "peak_gpu_mb": null
434
+ },
435
+ "resolution_short_edge": 448,
436
+ "patch_size": 14,
437
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
438
+ "decision_policy": "tuned-normal-quantile-v1"
439
+ },
440
+ "pcb2": {
441
+ "category": "pcb2",
442
+ "available": true,
443
+ "model_id": "dinov2-tuned-pcb2-v1",
444
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
445
+ "profile": "dinov2_tuned_v1",
446
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
447
+ "bank_sha256": "38d1bb2b1ce04df367e16b276f77d1d9ef1abd3463bbcbc5ee5fca77edce5bed",
448
+ "threshold": 0.09243721514940262,
449
+ "uncertainty_margin": 0.004621860757470131,
450
+ "heatmap_scale": 0.07252105534076699,
451
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
452
+ "bank_size_bytes": 23257659,
453
+ "encoder_size_bytes": 44136744,
454
+ "calibration": {
455
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
456
+ "normal": 91,
457
+ "anomalous": 0,
458
+ "seed": 42,
459
+ "policy": "tuned-normal-quantile-v1",
460
+ "quantile": 0.95,
461
+ "calibration_above_threshold": 5,
462
+ "future_false_positive_rate_guaranteed": false
463
+ },
464
+ "train_normal_count": 810,
465
+ "metrics": {
466
+ "image_auroc": 0.9575,
467
+ "average_precision": 0.9678848370579266,
468
+ "precision": 0.8969072164948454,
469
+ "recall": 0.87,
470
+ "f1": 0.883248730964467,
471
+ "false_positive_rate": 0.1,
472
+ "confusion_matrix": [
473
+ [
474
+ 90,
475
+ 10
476
+ ],
477
+ [
478
+ 13,
479
+ 87
480
+ ]
481
+ ],
482
+ "n_images": 200,
483
+ "pixel_auroc_224": 0.9721937213482837,
484
+ "pixel_average_precision_224": 0.29801335589310723,
485
+ "uncertain_fraction": 0.035,
486
+ "latency_median_ms": null,
487
+ "peak_gpu_mb": null
488
+ },
489
+ "resolution_short_edge": 448,
490
+ "patch_size": 14,
491
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
492
+ "decision_policy": "tuned-normal-quantile-v1"
493
+ },
494
+ "pcb3": {
495
+ "category": "pcb3",
496
+ "available": true,
497
+ "model_id": "dinov2-tuned-pcb3-v1",
498
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
499
+ "profile": "dinov2_tuned_v1",
500
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
501
+ "bank_sha256": "b786dfee5f10ab1953fe3807057ddbc57d6b9a85bc9e6b9236d6bc14796dcdfd",
502
+ "threshold": 0.09173599630594254,
503
+ "uncertainty_margin": 0.004586799815297127,
504
+ "heatmap_scale": 0.07605906963348377,
505
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
506
+ "bank_size_bytes": 23258829,
507
+ "encoder_size_bytes": 44136744,
508
+ "calibration": {
509
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
510
+ "normal": 91,
511
+ "anomalous": 0,
512
+ "seed": 42,
513
+ "policy": "tuned-normal-quantile-v1",
514
+ "quantile": 0.95,
515
+ "calibration_above_threshold": 5,
516
+ "future_false_positive_rate_guaranteed": false
517
+ },
518
+ "train_normal_count": 814,
519
+ "metrics": {
520
+ "image_auroc": 0.9928712871287129,
521
+ "average_precision": 0.9935456634405582,
522
+ "precision": 0.8828828828828829,
523
+ "recall": 0.98,
524
+ "f1": 0.9289099526066351,
525
+ "false_positive_rate": 0.12871287128712872,
526
+ "confusion_matrix": [
527
+ [
528
+ 88,
529
+ 13
530
+ ],
531
+ [
532
+ 2,
533
+ 98
534
+ ]
535
+ ],
536
+ "n_images": 201,
537
+ "pixel_auroc_224": 0.9801529756449681,
538
+ "pixel_average_precision_224": 0.31863648390631216,
539
+ "uncertain_fraction": 0.1044776119402985,
540
+ "latency_median_ms": null,
541
+ "peak_gpu_mb": null
542
+ },
543
+ "resolution_short_edge": 448,
544
+ "patch_size": 14,
545
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
546
+ "decision_policy": "tuned-normal-quantile-v1"
547
+ },
548
+ "pcb4": {
549
+ "category": "pcb4",
550
+ "available": true,
551
+ "model_id": "dinov2-tuned-pcb4-v1",
552
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
553
+ "profile": "dinov2_tuned_v1",
554
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
555
+ "bank_sha256": "127c3c32277bb70544d134d6d3034ef03fc33d1c7e82e23c68f1adda63a7f64d",
556
+ "threshold": 0.1058717742562294,
557
+ "uncertainty_margin": 0.0052935887128114706,
558
+ "heatmap_scale": 0.07633256852626799,
559
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
560
+ "bank_size_bytes": 23265594,
561
+ "encoder_size_bytes": 44136744,
562
+ "calibration": {
563
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
564
+ "normal": 91,
565
+ "anomalous": 0,
566
+ "seed": 42,
567
+ "policy": "tuned-normal-quantile-v1",
568
+ "quantile": 0.95,
569
+ "calibration_above_threshold": 5,
570
+ "future_false_positive_rate_guaranteed": false
571
+ },
572
+ "train_normal_count": 813,
573
+ "metrics": {
574
+ "image_auroc": 0.9953465346534653,
575
+ "average_precision": 0.9954175606404433,
576
+ "precision": 0.979381443298969,
577
+ "recall": 0.95,
578
+ "f1": 0.9644670050761421,
579
+ "false_positive_rate": 0.019801980198019802,
580
+ "confusion_matrix": [
581
+ [
582
+ 99,
583
+ 2
584
+ ],
585
+ [
586
+ 5,
587
+ 95
588
+ ]
589
+ ],
590
+ "n_images": 201,
591
+ "pixel_auroc_224": 0.9832394042016657,
592
+ "pixel_average_precision_224": 0.37032673876297395,
593
+ "uncertain_fraction": 0.03980099502487562,
594
+ "latency_median_ms": null,
595
+ "peak_gpu_mb": null
596
+ },
597
+ "resolution_short_edge": 448,
598
+ "patch_size": 14,
599
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
600
+ "decision_policy": "tuned-normal-quantile-v1"
601
+ },
602
+ "pipe_fryum": {
603
+ "category": "pipe_fryum",
604
+ "available": true,
605
+ "model_id": "dinov2-tuned-pipe_fryum-v1",
606
+ "method": "AnomalyDINO-inspired DINOv2 ViT-S/14 fine-tuned on synthetic defects; 32,768-patch coreset memory",
607
+ "profile": "dinov2_tuned_v1",
608
+ "encoder_sha256": "95ac11984ecae1bb14e9a0d98e85650e73365fc3d57ed49c6bfa526e0498adcb",
609
+ "bank_sha256": "4bcf8215c4380b2443185bf062b578772ad11b636af2fdd21e455db9898ab97d",
610
+ "threshold": 0.14284870028495786,
611
+ "uncertainty_margin": 0.007142435014247894,
612
+ "heatmap_scale": 0.1143493586778642,
613
+ "uncertainty_policy": "Fixed \u00b15% of threshold; operational heuristic, not calibrated confidence",
614
+ "bank_size_bytes": 23266873,
615
+ "encoder_size_bytes": 44136744,
616
+ "calibration": {
617
+ "method": "Fixed linear 95th percentile of heldout normal scores; no anomalous calibration",
618
+ "normal": 45,
619
+ "anomalous": 0,
620
+ "seed": 42,
621
+ "policy": "tuned-normal-quantile-v1",
622
+ "quantile": 0.95,
623
+ "calibration_above_threshold": 3,
624
+ "future_false_positive_rate_guaranteed": false
625
+ },
626
+ "train_normal_count": 405,
627
+ "metrics": {
628
+ "image_auroc": 0.9905999999999999,
629
+ "average_precision": 0.9960775103939439,
630
+ "precision": 0.9801980198019802,
631
+ "recall": 0.99,
632
+ "f1": 0.9850746268656716,
633
+ "false_positive_rate": 0.04,
634
+ "confusion_matrix": [
635
+ [
636
+ 48,
637
+ 2
638
+ ],
639
+ [
640
+ 1,
641
+ 99
642
+ ]
643
+ ],
644
+ "n_images": 150,
645
+ "pixel_auroc_224": 0.9929194372262363,
646
+ "pixel_average_precision_224": 0.4953619282653999,
647
+ "uncertain_fraction": 0.02666666666666667,
648
+ "latency_median_ms": null,
649
+ "peak_gpu_mb": null
650
+ },
651
+ "resolution_short_edge": 448,
652
+ "patch_size": 14,
653
+ "foreground": "Unsupervised PCA threshold/sign heuristic; can fail",
654
+ "decision_policy": "tuned-normal-quantile-v1"
655
+ }
656
+ },
657
+ "macro_mean": {
658
+ "image_auroc": 0.9710709295929593,
659
+ "average_precision": 0.9764210490780011,
660
+ "precision": 0.917898095712363,
661
+ "recall": 0.9349999999999999,
662
+ "f1": 0.925494028417261,
663
+ "false_positive_rate": 0.09876512651265128,
664
+ "pixel_auroc_224": 0.9880497359716026,
665
+ "pixel_average_precision_224": 0.46816529534999995
666
+ },
667
+ "decision_policy": "tuned-normal-quantile-v1",
668
+ "validation_scope": "Held-out-normal thresholds and cached-score/software consistency checks; future recall and false-alarm rates are not guaranteed.",
669
+ "policy_selection_context": "Same operating policy as the previous profile (q95 for every category, q80 for macaroni1/2). The test images were already seen in development, so these figures are descriptive.",
670
+ "previous_profile": {
671
+ "profile": "dinov2_highres_v1",
672
+ "macro_mean": {
673
+ "image_auroc": 0.950126705170517,
674
+ "average_precision": 0.956391637511357,
675
+ "precision": 0.9046976613151382,
676
+ "recall": 0.8883333333333333,
677
+ "f1": 0.895741481363831,
678
+ "pixel_auroc_224": 0.9861669559777334,
679
+ "pixel_average_precision_224": 0.4315059138196397,
680
+ "false_positive_rate": 0.1110038503850385
681
+ },
682
+ "source": "results/macaroni_recall_deployment_evaluation.json"
683
+ },
684
+ "source_sha256": {
685
+ "experiments/dinov2_tuned_v1/pcb1/normal_calibration.json": "10c8e8b0c908c6cd559f8c34c1bd2a98bd991f32f0a84b09d37929da28b668e1",
686
+ "experiments/dinov2_tuned_v1/pcb1/test_progress.json": "5042b54474dcb2981b18711b5067f5ec0857269f83d186adaaea98d7987e4ddf",
687
+ "experiments/dinov2_tuned_v1/pcb1/metrics.json": "8d3d286d4945336f592fbf43d6af193d8e0ecad34a441dda3e58df2a32e7d4e0",
688
+ "experiments/dinov2_tuned_v1/capsules/normal_calibration.json": "069e6dce404bf6ca6da6c5f6d6853249abdf358c5ba468da97a2b6ced3689435",
689
+ "experiments/dinov2_tuned_v1/capsules/test_progress.json": "29797dd9f4b34afc2cb3a66198556bf6e4f755fcb3039747be65e5dc1e51857f",
690
+ "experiments/dinov2_tuned_v1/capsules/metrics.json": "233ce88be282f97b2fdf7b505955fc4c013179bbcbe027d5d63d9f4cd01c4538",
691
+ "experiments/dinov2_tuned_v1/cashew/normal_calibration.json": "ab44aa627d5e696e6bb0f27c53ad9d83257f67e5d8bf910f5796348ab50d251b",
692
+ "experiments/dinov2_tuned_v1/cashew/test_progress.json": "91a59d1e78e061e9d7754cfa920dc7017becc0936cb9135de81eba2d0dbd6126",
693
+ "experiments/dinov2_tuned_v1/cashew/metrics.json": "b0e5891710bbc087a846ff4bc3beccef8d7117aa8bc59a8ab9e7da1574721c51",
694
+ "experiments/dinov2_tuned_v1/candle/normal_calibration.json": "bfd85bfb1e085557207ed2db7388d8f9585a3fa94919f4ebe9e4734bff327928",
695
+ "experiments/dinov2_tuned_v1/candle/test_progress.json": "62e43d4a28d2cc7938143fa3ebf5f24265839ae7f2bf26b5f769d35db4be9b2c",
696
+ "experiments/dinov2_tuned_v1/candle/metrics.json": "1f483ab0e7faf80c50b5f8529c497c28f3c12d107f7a05408b2380aab27988d4",
697
+ "experiments/dinov2_tuned_v1/chewinggum/normal_calibration.json": "da746616a0cfceadb46062511186ef2cc402b12a2d7fa963c700c5f5e5ced0df",
698
+ "experiments/dinov2_tuned_v1/chewinggum/test_progress.json": "62a198fe971cada66612e16d0ce17871a7ebd7ab0d3ce36ae411f8d4afbb1936",
699
+ "experiments/dinov2_tuned_v1/chewinggum/metrics.json": "1e15677b0e5ca97565c57ae406b262c0f7178127e8db07478060176d6fe8881e",
700
+ "experiments/dinov2_tuned_v1/fryum/normal_calibration.json": "49e63b58dd2a7ccfa83b151c5347788b210362371482fc54932559ca065f5c03",
701
+ "experiments/dinov2_tuned_v1/fryum/test_progress.json": "4a8f2794687e983101712d3871ac6ba9ed689e906f530690446b2922945bb396",
702
+ "experiments/dinov2_tuned_v1/fryum/metrics.json": "1c39f443abc82a27029d5aec34ac8ca5e4a44498548e081d37f3ca0507f8073d",
703
+ "experiments/dinov2_tuned_v1/macaroni1/normal_calibration.json": "4711f1c96e178d79a4d7d03376110e46aa9588ac291429a800f3a6ee8d49c8d7",
704
+ "experiments/dinov2_tuned_v1/macaroni1/test_progress.json": "b636712e32760784c12e7e70a40a51ae6f18cca98ce4d94eefcc02a2c1edd509",
705
+ "experiments/dinov2_tuned_v1/macaroni1/metrics.json": "41e88cde1e162f7cb7e211d81a7560ded4a1f4b73ef48acf3aa84a5eeb3e766e",
706
+ "experiments/dinov2_tuned_v1/macaroni2/normal_calibration.json": "22c1aed92c3c9b601403d729f8a80592f9eb69acfcaf07a93dcf21416dc5709c",
707
+ "experiments/dinov2_tuned_v1/macaroni2/test_progress.json": "2bebc24ed05c3c363d9e2e606057fada78aa15a8181d28a09637dd23126e2463",
708
+ "experiments/dinov2_tuned_v1/macaroni2/metrics.json": "50a5a7baeba6166ddeb29d948fec4ec4532ef060559325f129a36b993259399e",
709
+ "experiments/dinov2_tuned_v1/pcb2/normal_calibration.json": "6d9ff449a83da9e100c7568ba935e468c487500507dfb7b31c84d1007717603a",
710
+ "experiments/dinov2_tuned_v1/pcb2/test_progress.json": "3cb32aa588d96b4a1e2b294243e99d3b4557d0877ba4868e855f657e0182497a",
711
+ "experiments/dinov2_tuned_v1/pcb2/metrics.json": "63528c0f869c48ed4830690c3330bf3dc7819e2604ba322b9b39c819b23e14fb",
712
+ "experiments/dinov2_tuned_v1/pcb3/normal_calibration.json": "c3b89c0b0fefa69a2aa0db19648a0c0551a6398bf8dbf613552f2767c587a94d",
713
+ "experiments/dinov2_tuned_v1/pcb3/test_progress.json": "5dd08e213121be78e644e4f43b4759fbb069968c6210f8a4f37db75d9782cc48",
714
+ "experiments/dinov2_tuned_v1/pcb3/metrics.json": "2e843f4299a4692ed51f1a34305ab568802040b4fcdcffb75d8a21d360ad11c7",
715
+ "experiments/dinov2_tuned_v1/pcb4/normal_calibration.json": "6337ce99ec8066132db2880b813086514e1632b2b389f212dfa98f668067c077",
716
+ "experiments/dinov2_tuned_v1/pcb4/test_progress.json": "a4608213970da1d11fb8906ad1a341de21607f8ca1bdb5ccc55db9d9f91ca028",
717
+ "experiments/dinov2_tuned_v1/pcb4/metrics.json": "c59903eb2b66939818b2c3cff78adc4a55654cb72db8483b7fd9b6ac3328cc4d",
718
+ "experiments/dinov2_tuned_v1/pipe_fryum/normal_calibration.json": "df9dd61ff1ab75daa645d24b6202e5c52f56a4c943f8e8211acfd921cf5c485e",
719
+ "experiments/dinov2_tuned_v1/pipe_fryum/test_progress.json": "8054eb7789ad00a557de999fb198a288b901d97a3fd28aa318f6b2a35cd8792c",
720
+ "experiments/dinov2_tuned_v1/pipe_fryum/metrics.json": "670dfb6d1824accbd7d336dd16c7290ea9a3611c80d4ba28f3dec9dc214c5a52"
721
+ }
722
+ }