nx_pose_benchmark_audit.nx source
↩ module page · 78 lines · 6396 B
1// nx_pose_benchmark_audit.nx -- CRITIC + ADVERSARY audit (operator 2026-07-14: "make sure we aren't self validating
2// but getting INDUSTRY benchmarking and grading... use the researcher, census, critic, adversary"). Grades every
3// pose/build-2 CLAIM against the GROUNDED industry standard (MS COCO Keypoint AP, OKS-based; ViTPose 75.8-81.1 AP,
4// researcher-fetched to knowledge/library/vitpose_modelcard_coco_ap.md), tagging each MECHANICAL (gate-verified
5// computation = legit) vs SELF-VALIDATED (circular/eyeball = the violation) vs INDUSTRY-MEASURED (external = what we
6// OWE). Each row carries the ADVERSARY's refutation. Liar-killed: cited evidence must open. VERDICT is deliberately
7// harsh -- ZERO industry benchmarks is the honest truth. license_tier: ORIGINAL expect_exit: 0
8import "nx_gate.nx"
9
10func ab_open(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
11
12// grade: 2=MECHANICAL (gate-verified, legit) 1=SELF-VALIDATED (circular/eyeball) 0=INDUSTRY-MEASURED-or-GAP.
13// c=[mechanical, selfval, industry, gap, ungrounded].
14func ab_claim(claim: *u8, grade: i64, evidence: *u8, adversary: *u8, c: *i64) -> i64 {
15 let opens: i64 = ab_open(evidence)
16 if grade == 2 {
17 if opens == 1 { c[0] = c[0] + 1; gw("[MECHANICAL \xE2\x9C\x93] " as *u8) }
18 if opens == 0 { c[4] = c[4] + 1; gw("[UNGROUNDED ] " as *u8) }
19 }
20 if grade == 1 { c[1] = c[1] + 1; gw("[SELF-VALID!] " as *u8) }
21 if grade == 0 {
22 if opens == 1 { c[2] = c[2] + 1; gw("[INDUSTRY ] " as *u8) }
23 if opens == 0 { c[3] = c[3] + 1; gw("[GAP - OWED ] " as *u8) }
24 }
25 gw(claim); gw("\n ADVERSARY: " as *u8); gw(adversary); gw("\n\n" as *u8)
26 return 0
27}
28
29func main() -> i64 {
30 let c: *i64 = sys_mmap(64) as *i64
31 c[0]=0; c[1]=0; c[2]=0; c[3]=0; c[4]=0
32 gw("=== nx_pose_benchmark_audit: are we SELF-VALIDATING or INDUSTRY-BENCHMARKED? (critic + adversary) ===\n\n" as *u8)
33
34 gw("-- THE INDUSTRY STANDARD (researcher-grounded, NOT memory) --\n" as *u8)
35 if ab_open("knowledge/library/vitpose_modelcard_coco_ap.md" as *u8) == 1 {
36 gw(" [GROUNDED] MS COCO Keypoint AP (OKS-based, AP@[.5:.95]); ViTPose 75.8 AP base -> 81.1 AP plus on COCO test-dev.\n" as *u8)
37 gw(" source: knowledge/library/vitpose_modelcard_coco_ap.md (fetched HF model card) + arXiv:2204.12484.\n" as *u8)
38 gw(" => our pose work must be graded by COCO OKS-AP vs GROUND-TRUTH annotations, NOT PCK vs our own port.\n\n" as *u8)
39 } else { gw(" [UNGROUNDED] industry-standard source missing -- re-fetch the model card first\n\n" as *u8) }
40
41 gw("-- OUR CLAIMS, GRADED + ADVERSARY-REFUTED --\n" as *u8)
42 ab_claim("f32 op tower (conv/grouped/transposed/matmul/gelu/layernorm/fast-conv) is CORRECT" as *u8, 2,
43 "runtime/nx_f32_conv2d_fast_gate.nx" as *u8,
44 "none valid -- bit-exact + gradient-checked vs math/known-values. But this verifies COMPUTATION, NOT accuracy vs the field. Op-correct != benchmark-accurate." as *u8, c)
45 ab_claim("reality-check REFUSES the pose SOTA claim (T1-only authorized)" as *u8, 2,
46 "runtime/nx_vidclass_reality_check.nx" as *u8,
47 "none -- this is the DEFENSE working correctly; it already forbids the unearned claim. Keep it." as *u8, c)
48 ab_claim("ViTPose PORT produces a CORRECT human pose" as *u8, 1,
49 "runtime/nx_vitpose_forward.nx" as *u8,
50 "anatomical EYEBALL on ONE image (monotonic y). NEVER measured on COCO AP. NEVER compared to the REAL HF/PyTorch ViTPose output -> a subtly-wrong port (wrong pos_embed slice, off-by-one, attention scale) can STILL look skeleton-correct. UNBENCHMARKED." as *u8, c)
51 ab_claim("build-2 student REPRODUCES the teacher (PCK@5=1000)" as *u8, 1,
52 "runtime/nx_pose_student_distill.nx" as *u8,
53 "CIRCULAR = self-validation: graded vs OUR OWN port (the teacher), NOT ground truth. If the port is wrong, PCK=1000 faithfully reproduces the ERROR. ONE overfit image, NO held-out set, and PCK != COCO OKS-AP. Proves fidelity-to-our-port, says NOTHING about real accuracy." as *u8, c)
54 ab_claim("vidclass census = 642 permille coverage" as *u8, 1,
55 "runtime/nx_vidclass_census.nx" as *u8,
56 "PRESENCE census -- liar-kill only checks that cited organs OPEN, i.e. that code EXISTS. It does NOT measure accuracy/quality vs any external suite. Coverage != correctness." as *u8, c)
57 ab_claim("COCO Keypoint OKS-AP measured on our port/student" as *u8, 0,
58 "" as *u8,
59 "THE CORE GAP: we have ZERO industry-benchmark numbers. Requires COCO val2017 person images + GROUND-TRUTH keypoint annotations -> run our port -> OKS-AP@[.5:.95] -> compare to ViTPose 75.8. Until then, every 'good pose' claim is self-referential." as *u8, c)
60
61 let total: i64 = c[0]+c[1]+c[2]+c[3]
62 gw("--- TALLY ---\n MECHANICAL(legit)=" as *u8); gn(c[0]); gw(" SELF-VALIDATED(violation)=" as *u8); gn(c[1])
63 gw(" INDUSTRY-MEASURED=" as *u8); gn(c[2]); gw(" GAP-OWED=" as *u8); gn(c[3]); gw(" of " as *u8); gn(total); gw(" claims\n\n" as *u8)
64
65 gw("--- VERDICT (honest, harsh) ---\n" as *u8)
66 gw(" Our sovereign pose STACK is mechanically VERIFIED (ops bit-exact/gradient-checked) -- that part is real and legit.\n" as *u8)
67 gw(" But INDUSTRY-MEASURED accuracy = 0. The port's 'correct pose' is an eyeball on one image; the student's PCK@5=1000\n" as *u8)
68 gw(" is CIRCULAR (vs our own teacher, one overfit image). We have NOT been benchmarked by the field. The operator is right.\n\n" as *u8)
69 gw("--- THE REAL BENCHMARK PATH (what industry grading requires) ---\n" as *u8)
70 gw(" 1. RESEARCHER: fetch COCO val2017 person-keypoint ANNOTATIONS (person_keypoints_val2017.json) + the OKS formula.\n" as *u8)
71 gw(" 2. HARNESS: run nx_vitpose_forward on the annotated person crops -> compute OKS -> AP@[.5:.95] (the COCO metric).\n" as *u8)
72 gw(" 3. GRADE: our AP vs ViTPose's reported 75.8 = the MEASURED standing (measured-beat-the-tool, not self-validation).\n" as *u8)
73 gw(" 4. ALSO: run the REAL HF/PyTorch ViTPose on the same crop -> verify our PORT is faithful (not just plausible).\n" as *u8)
74 gw(" Until (1)-(4), NO accuracy/SOTA claim is authorized for the pose stack.\n" as *u8)
75 if c[4] == 0 { sys_exit(0) }
76 sys_exit(1)
77 return 0
78}