code wiki / _hdl_build / nx_digitalhuman_census_gate.nx

nx_digitalhuman_census_gate.nx source

↩ module page · 200 lines · 17653 B

1// nx_digitalhuman_census_gate.nx -- ★ADVERSARIAL CENSUS vs the DIGITAL-HUMAN FIELD (operator 2026-07-10: bank 2// github.com/weihaox/awesome-digital-human "to tie into how infinigen does their stuff and expand on it FROM THE 3// HARDWARE RUNG UP each rung like infinigen"). Same census doctrine as the Infinigen gate: 4// GROUNDING each axis carries a THEIR-evidence needle that must be FOUND in the banked field bytes 5// (knowledge/digitalhuman_field_banked.txt, fetched 2026-07-10 from their repo) -- not memory. 6// LIAR-KILL each OUR-claim names an artifact FILE the gate opens; missing/empty -> forced GAP + LIAR flag. 7// ADVERSARIAL every candidate HAVE must survive a measured DEPTH bar (the critic's refutation). 8// Score: HAVE=1000 PARTIAL=400 GAP=0, mean over grounded axes. Emits knowledge/digitalhuman_census.txt (report + 9// the HARDWARE-UP LADDER R0..R14). The being itself (nx_bodyatlas) is executed so the census is EXECUTION-grounded, 10// not just file-grounded. license_tier: ORIGINAL expect_exit: 0 11import "nx_syscalls.nx" 12import "nx_bodyatlas.nx" 13 14func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 15func pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 } 16func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } 17func contains(buf: *u8, n: i64, needle: *u8) -> i64 { 18 let m: i64 = slen(needle) 19 if m == 0 { return 1 } 20 var i: i64 = 0 21 while i + m <= n { 22 var k: i64 = 0 23 while k < m { if buf[i+k] != needle[k] { k = m + 9 } else { k = k + 1 } } 24 if k == m { return 1 } 25 i = i + 1 26 } 27 return 0 28} 29func fexists(path: *u8) -> i64 { 30 let szp: *i64 = sys_mmap(16) as *i64 31 let b: *u8 = sys_read_file(path, szp) 32 if (b as i64) == 0 { return 0 } 33 if szp[0] < 64 { return 0 } 34 return 1 35} 36func ocat(o: *u8, at: i64, s: *u8) -> i64 { var i: i64=0; var a: i64=at; while s[i]!=(0 as u8){o[a]=s[i]; a=a+1; i=i+1} return a } 37func ocatn(o: *u8, at: i64, v: i64) -> i64 { 38 let b: *u8 = sys_mmap(32) as *u8 39 var x: i64 = v 40 var i: i64 = 31 41 if x == 0 { b[i]=48 as u8; i=i-1 } 42 while x > 0 { b[i]=(48+x%10) as u8; x=x/10; i=i-1 } 43 var a: i64 = at 44 var j: i64 = i+1 45 while j < 32 { o[a]=b[j]; a=a+1; j=j+1 } 46 return a 47} 48 49// one census axis. verdict 2=HAVE 1=PARTIAL 0=GAP. them_needle must be in the banked field; our_artifact must exist. 50func axis(rep: *u8, ro: *i64, bank: *u8, bankn: i64, name: *u8, them_needle: *u8, our_artifact: *u8, has_credit: i64, depth_ok: i64, critic: *u8, ladder: *u8, sums: *i64) -> i64 { 51 var grounded: i64 = 0 52 if contains(bank, bankn, them_needle) == 1 { grounded = 1 } 53 var o: i64 = ro[0] 54 o = ocat(rep, o, "AXIS " as *u8) 55 o = ocat(rep, o, name) 56 if grounded == 0 { 57 o = ocat(rep, o, " THEIRS-UNGROUNDED (needle '" as *u8) 58 o = ocat(rep, o, them_needle) 59 o = ocat(rep, o, "' not in bank) -- EXCLUDED\n" as *u8) 60 ro[0] = o 61 return 0 62 } 63 var art: i64 = 0 64 if slen(our_artifact) > 0 { art = fexists(our_artifact) } 65 var verdict: i64 = 0 66 if art == 1 { if has_credit == 1 { verdict = 1 } } 67 if verdict == 1 { if depth_ok == 1 { verdict = 2 } } 68 if has_credit == 1 { if art == 0 { 69 o = ocat(rep, o, " ★LIAR-KILL: claimed artifact '" as *u8) 70 o = ocat(rep, o, our_artifact) 71 o = ocat(rep, o, "' MISSING -> GAP\n" as *u8) 72 } } 73 if verdict == 2 { o = ocat(rep, o, " HAVE " as *u8) } 74 if verdict == 1 { o = ocat(rep, o, " PARTIAL " as *u8) } 75 if verdict == 0 { o = ocat(rep, o, " GAP " as *u8) } 76 o = ocat(rep, o, "critic: " as *u8) 77 o = ocat(rep, o, critic) 78 o = ocat(rep, o, "\n" as *u8) 79 ro[0] = o 80 if verdict < 2 { 81 var lo: i64 = slen(ladder) 82 lo = ocat(ladder, lo, " - " as *u8) 83 lo = ocat(ladder, lo, name) 84 lo = ocat(ladder, lo, " :: " as *u8) 85 lo = ocat(ladder, lo, critic) 86 lo = ocat(ladder, lo, "\n" as *u8) 87 ladder[lo] = 0 as u8 88 } 89 sums[0] = sums[0] + 1 90 if verdict == 2 { sums[1] = sums[1] + 1 } 91 if verdict == 1 { sums[2] = sums[2] + 1 } 92 return verdict 93} 94 95func main() -> i64 { 96 hw("=== nx_digitalhuman_census_gate -- adversarial census vs the BANKED digital-human field ===\n" as *u8) 97 var fails: i64 = 0 98 99 // ---- EXECUTION-ground: the being is real (run nx_bodyatlas, not just check files) ---- 100 let np: i64 = atlas_build(0) 101 let sysN: i64 = ba_systems_present() 102 let named: i64 = ba_named_count() 103 hw(" being: parts="); pn(np); hw(" systems="); pn(sysN); hw("/8 named="); pn(named); hw("\n" as *u8) 104 var t0: i64 = 0 105 if sysN == 8 { if named >= 40 { t0 = 1 } } 106 if t0 == 1 { hw("T0 PASS the being is EXECUTION-real (8 systems, >=40 named parts)\n" as *u8) } else { fails=fails+1; hw("T0 FAIL being not real\n" as *u8) } 107 108 // ---- load THEIR banked field ---- 109 let szp: *i64 = sys_mmap(16) as *i64 110 let bank: *u8 = sys_read_file("knowledge/digitalhuman_field_banked.txt" as *u8, szp) 111 let bankn: i64 = szp[0] 112 hw(" banked field: "); pn(bankn); hw(" bytes (awesome-digital-human, fetched 2026-07-10)\n" as *u8) 113 var t1: i64 = 0 114 if (bank as i64) != 0 { if bankn > 400 { t1 = 1 } } 115 if t1 == 1 { hw("T1 PASS ground truth banked (census is field-grounded, not memory)\n" as *u8) } else { fails=fails+1; hw("T1 FAIL field bank missing\n" as *u8) } 116 117 let rep: *u8 = sys_mmap(262144) 118 let ro: *i64 = sys_mmap(16) as *i64 119 let ladder: *u8 = sys_mmap(65536) 120 ladder[0] = 0 as u8 121 let sums: *i64 = sys_mmap(32) as *i64 // [grounded, have, partial] 122 var o: i64 = 0 123 o = ocat(rep, o, "DIGITAL-HUMAN ADVERSARIAL CENSUS -- 2026-07-10 (them = banked awesome-digital-human field index; us = artifact-checked + execution-run organs)\n\n" as *u8) 124 ro[0] = o 125 126 // ================= AXES (needle grounded in banked field; our artifact liar-killed; depth = critic bar) ========= 127 axis(rep, ro, bank, bankn, "body-model (whole) " as *u8, "SMPL-X" as *u8, "knowledge/nx_bodyatlas.png" as *u8, 1, 0, "ours: a PARAMETRIC whole-body being (height/girth/frame/sex presets, gate-measured heavy>lean) with face+hands+internal systems; residual vs SMPL-X: LEARNED shape+pose blendshapes fit from thousands of scans + linear-blend skinning -> PARTIAL" as *u8, ladder, sums) 128 axis(rep, ro, bank, bankn, "body reshaping " as *u8, "Reshaping" as *u8, "knowledge/nx_bodyatlas.png" as *u8, 1, 0, "ours: parametric reshaping that MEASURABLY changes the silhouette (heavy 28318 > lean 20418 filled px, gate T3) across height/girth/frame/sex; DEMOTED HAVE->PARTIAL (operator reality audit 2026-07-12): the reshape is mechanical, NOT anthropometrically validated (no measured proportion reference); residual vs SMPL scan-fit: statistically-correct shape space -> PARTIAL" as *u8, ladder, sums) 129 axis(rep, ro, bank, bankn, "avatar generation " as *u8, "avatar" as *u8, "knowledge/nx_persongen.png" as *u8, 1, 0, "ours: procedural full 3D human generated on a seed + ★CREATURE GENOME (2026-07-12, the Infinigen tree-genome lesson banked): ONE tree-walking generator produces the canon human, a quadruped rabbit (ears>head measured), and a four-armed horned monster from DATA; genes causally live (ear gene 512->652); creatures SURFACE-ONLY per the research default, human 8-system medical view opt-in (nx_genome_gate); residual vs their 5 genome classes: NURBS-class curved parts, genome interpolation/crossover, per-plan rigs, fur -> PARTIAL" as *u8, ladder, sums) 130 axis(rep, ro, bank, bankn, "head/face avatar " as *u8, "FLAME" as *u8, "knowledge/nx_face_expr.png" as *u8, 1, 0, "ours: INSIDE-OUT anatomical face (skull->muscle->fat->skin peel, nx_anatstack) + trained-neural skin + ★MUSCLE-DRIVEN EXPRESSIONS (2026-07-11): smile/surprise/frown by CONTRACTING the modelled facial muscles (zygomaticus lifts malar fat, frontalis raises brow, jaw drops) -- each causally isolated per-part (smile cheek +11->-30, surprise jaw +35->-84, brow +2->-42; render imdiff 31k/55k/49k), nx_face_expr_gate; residual vs FLAME/DECA: FACS action-unit basis + learned blendshapes + displacement recovered from image capture -> PARTIAL" as *u8, ladder, sums) 131 axis(rep, ro, bank, bankn, "hands (articulated) " as *u8, "hands" as *u8, "knowledge/nx_hands.png" as *u8, 1, 0, "PARTIAL (R4 2026-07-11, deepened): 4 fingers + thumb per hand (2 segments, 20 parts, 2 named structures), per-hand CURL open<->fist CAUSALLY SDF-proven (open-tip -3->+11, fist-tip +19->-5) + fingers BOUND to the forearm FK chain (wave takes its fingers, nx_hands_gate); residual vs SMPL-X: 15-joint independent per-finger runtime FK + thumb opposition -> PARTIAL" as *u8, ladder, sums) 132 axis(rep, ro, bank, bankn, "skin material " as *u8, "reconstruction" as *u8, "knowledge/nx_skinneural.png" as *u8, 1, 0, "ours: trained-neural skin texture + family variation (nx_skin*); residual: measured subsurface scattering + pore-level micro-detail -> PARTIAL" as *u8, ladder, sums) 133 axis(rep, ro, bank, bankn, "motion generation " as *u8, "MotionDiffuse" as *u8, "knowledge/nx_articulate.png" as *u8, 1, 0, "ours: FK skeletal rig + a periodic, hierarchy-correct WALK CYCLE (nx_articulate, gate-proven); residual vs MotionDiffuse/MDM: text-conditioned DIVERSE motion synthesis from a learned motion prior -> PARTIAL" as *u8, ladder, sums) 134 axis(rep, ro, bank, bankn, "gesture synthesis " as *u8, "gesture" as *u8, "knowledge/nx_articulate.png" as *u8, 1, 0, "ours: FK pose control can drive arms; residual: co-speech GESTURE generation conditioned on audio/text -> PARTIAL" as *u8, ladder, sums) 135 axis(rep, ro, bank, bankn, "neural avatar render" as *u8, "Gaussian Avatar" as *u8, "knowledge/nx_gsplat_face.png" as *u8, 1, 0, "ours: sovereign gaussian-splat renderer + anisotropic face splats + photo-fit (nx_gsplat); residual vs Gaussian Avatars: ANIMATABLE splats rigged to a body/expression model -> PARTIAL" as *u8, ladder, sums) 136 axis(rep, ro, bank, bankn, "capture/recon " as *u8, "ICON" as *u8, "knowledge/nx_gsplat_photofit.png" as *u8, 1, 0, "ours: gaussian photo-fit + 2-view SfM (cadtwin); residual vs ICON/PIFuHD: single-image IMPLICIT clothed-human recon with normal integration -> PARTIAL" as *u8, ladder, sums) 137 axis(rep, ro, bank, bankn, "human image gen " as *u8, "diffusion" as *u8, "knowledge/nx_persongen.png" as *u8, 1, 0, "ours: procedural person render + local GPU img2img finish; residual: a trained human-image DIFFUSION model -> PARTIAL" as *u8, ladder, sums) 138 axis(rep, ro, bank, bankn, "clothed digitize " as *u8, "PIFuHD" as *u8, "" as *u8, 0, 0, "ours: NONE -- we GENERATE nude anatomical beings, we do not reconstruct a CLOTHED person from a photo; theirs: PIFuHD pixel-aligned implicit hi-res -> GAP" as *u8, ladder, sums) 139 axis(rep, ro, bank, bankn, "cloth simulation " as *u8, "TailorNet" as *u8, "" as *u8, 0, 0, "ours: NONE for garments (we have a WATER wave sim, not cloth dynamics); theirs: TailorNet/HOOD pose+shape-conditioned cloth drape -> GAP" as *u8, ladder, sums) 140 axis(rep, ro, bank, bankn, "garment / clothing " as *u8, "Garment" as *u8, "" as *u8, 0, 0, "ours: the atlas being is unclothed; theirs: garment design + draping + dressing -> GAP" as *u8, ladder, sums) 141 axis(rep, ro, bank, bankn, "speech / lip-sync " as *u8, "SpatialReal" as *u8, "" as *u8, 0, 0, "ours: sovereign voice synthesis exists (voice-realism) but NO audio->viseme->face lip-sync driving a talking head; theirs: SpatialReal real-time lip-synced avatar -> GAP" as *u8, ladder, sums) 142 axis(rep, ro, bank, bankn, "virtual try-on " as *u8, "try-on" as *u8, "" as *u8, 0, 0, "ours: NONE; theirs: warp/implicit garment transfer onto a body image -> GAP" as *u8, ladder, sums) 143 axis(rep, ro, bank, bankn, "capture dataset " as *u8, "THuman2.0" as *u8, "" as *u8, 0, 0, "ours: we GENERATE (could emit a labeled synthetic corpus) but publish no HUMAN capture dataset; theirs: THuman2.0/HuMMan real 4D scans -> GAP" as *u8, ladder, sums) 144 145 hw("\n" as *u8) 146 let grounded: i64 = sums[0] 147 let have: i64 = sums[1] 148 let part: i64 = sums[2] 149 let gap: i64 = grounded-have-part 150 let score: i64 = (have*1000 + part*400) / grounded 151 hw(" grounded axes="); pn(grounded); hw(" HAVE="); pn(have); hw(" PARTIAL="); pn(part); hw(" GAP="); pn(gap); hw(" SCORE="); pn(score); hw("/1000\n" as *u8) 152 var t2: i64 = 0 153 if grounded >= 15 { t2 = 1 } 154 if t2 == 1 { hw("T2 PASS census grounded (>=15 axes verified against banked field bytes)\n" as *u8) } else { fails=fails+1; hw("T2 FAIL too few grounded axes\n" as *u8) } 155 var t3: i64 = 0 156 if have < grounded*3/4 { if part+gap >= 8 { t3 = 1 } } 157 if t3 == 1 { hw("T3 PASS the critic BITES (HAVE not a majority; GAPs + refuted PARTIALs named) -- adversarial\n" as *u8) } else { fails=fails+1; hw("T3 FAIL suspicious verdict distribution\n" as *u8) } 158 159 // ---- emit report + hardware-up ladder ---- 160 o = ro[0] 161 o = ocat(rep, o, "\nSCORE " as *u8) 162 o = ocatn(rep, o, score) 163 o = ocat(rep, o, "/1000 (HAVE " as *u8) 164 o = ocatn(rep, o, have) 165 o = ocat(rep, o, " / PARTIAL " as *u8) 166 o = ocatn(rep, o, part) 167 o = ocat(rep, o, " / GAP " as *u8) 168 o = ocatn(rep, o, gap) 169 o = ocat(rep, o, " of " as *u8) 170 o = ocatn(rep, o, grounded) 171 o = ocat(rep, o, ")\n\nOUR NAMED EXCEEDS (verified ABSENT from the banked field -- PRESENCE-exceeds; the reality audit 2026-07-12 marks correctness GAP -- clay approximations, no atlas-derived geometry):\n - ★HOLISTIC INTERNAL ANATOMY (presence, NOT IRL correctness): 8 anatomical SYSTEMS (skin/muscle/skeleton/digestive/circulatory/respiratory/urinary/nervous), 63 NAMED structures head-to-toe, INDEPENDENTLY PEELABLE (ZygoteBody-class) -- the awesome-digital-human field is SURFACE-only (clothing/motion/recon); no repo there generates a being with peelable internal organs (nx_bodyatlas, gate-proven)\n - SOVEREIGNTY: 100% integer, zero-dependency (no PyTorch/Blender/CUDA); theirs is a stack of trained nets on Python/CUDA\n - HARDWARE-UP: the being germinates on real silicon from CMOS/POST up (nishios spore), never-brick BY CONSTRUCTION -- an embodiment rung the field does not address\n - PARAMETRIC + PEELABLE IN ONE: Sloyd-style parametric proportions AND ZygoteBody-style layer peel unified in a single generated being\n\nTHE LADDER TO SOTA -- FROM THE HARDWARE RUNG UP (operator's framing; each rung builds on the one below, gap-ordered within):\n" as *u8) 172 o = ocat(rep, o, " R0 HARDWARE / EMBODIMENT -- being runs sovereign from CMOS/POST up, never-brick (nishios spore) .......... FOUNDATION (have)\n" as *u8) 173 o = ocat(rep, o, " R1 BODY MODEL -- parametric whole-body (HAVE parametric; add learned shape+pose blendshapes + skinning)\n" as *u8) 174 o = ocat(rep, o, " R2 ANATOMY SYSTEMS -- 8 peelable systems PRESENT (exceed); correctness vs atlas reference = OPEN (reality audit)\n" as *u8) 175 o = ocat(rep, o, " R3 HEAD / FACE -- inside-out face HAVE; add FLAME-class learned expression blendshapes\n" as *u8) 176 o = ocat(rep, o, " R4 HANDS -- articulate 15-joint fingers on the existing arm rig\n" as *u8) 177 o = ocat(rep, o, " R5 SKIN / MATERIAL -- neural skin HAVE; add measured subsurface + pore micro-detail\n" as *u8) 178 o = ocat(rep, o, " R6 RIG / MOTION -- FK walk cycle HAVE; add text-conditioned motion (MotionDiffuse-class)\n" as *u8) 179 o = ocat(rep, o, " R7 CLOTHING -- garments on the being (dressing the atlas)\n" as *u8) 180 o = ocat(rep, o, " R8 CLOTH SIM -- pose-conditioned drape (TailorNet/HOOD-class)\n" as *u8) 181 o = ocat(rep, o, " R9 HAIR -- strand-based hair/fur (fuzz displacement exists in anatstack)\n" as *u8) 182 o = ocat(rep, o, " R10 SPEECH / LIP-SYNC -- audio->viseme->face on the head (voice-realism exists)\n" as *u8) 183 o = ocat(rep, o, " R11 GESTURE / BEHAVIOR -- co-speech gesture + LLM-driven behaviour (our nofloat LLM)\n" as *u8) 184 o = ocat(rep, o, " R12 NEURAL AVATAR RENDER -- animatable gaussian avatar rigged to the body model (gsplat exists)\n" as *u8) 185 o = ocat(rep, o, " R13 CAPTURE / RECON -- single-image human recon (ICON/PIFuHD-class; SfM exists)\n" as *u8) 186 o = ocat(rep, o, " R14 TRY-ON + GARMENT DESIGN-- virtual try-on + generative garment design\n" as *u8) 187 o = ocat(rep, o, "\nNEXT (leverage-ordered, builds on what we have): R6 text-to-motion (rig exists) | R4 hands (skeleton exists) | R3 face expressions (anatstack exists) | R7 clothing (visible) | R10 lip-sync (voice exists)\n" as *u8) 188 o = ocat(rep, o, "\nGAP/PARTIAL residuals feeding the ladder:\n" as *u8) 189 o = ocat(rep, o, ladder) 190 rep[o] = 0 as u8 191 let fd: i64 = sys_openat_wr("knowledge/digitalhuman_census.txt\x00" as *u8, 0x1a4) 192 sys_write(fd, rep, o) 193 sys_close(fd) 194 hw("T4 report + hardware-up ladder -> knowledge/digitalhuman_census.txt (" as *u8); pn(o); hw(" bytes)\n" as *u8) 195 196 if fails == 0 { hw("DIGITALHUMAN-CENSUS-GATE GREEN -- field-grounded, liar-killed, critic-bitten: score " as *u8); pn(score); hw("/1000 vs the digital-human field; hardware-up ladder emitted\n" as *u8); sys_exit(0); return 0 } 197 hw("DIGITALHUMAN-CENSUS-GATE RED fails="); pn(fails); hw("\n" as *u8) 198 sys_exit(1) 199 return 1 200}