nx_visdesc_gate.nx
buildroot/runtime/nx_visdesc_gate.nx
about
nx_visdesc_gate.nx -- referee for the Google-lite visual-similarity descriptor (nx_visdesc).
PROVES, in-process (no external elf, no shell), the capability dHash STRUCTURALLY lacks -- finding
images that LOOK ALIKE rather than only exact copies. Corpus = 4 visual classes (horizontal stripes /
vertical stripes / diagonal stripes / checker), 4 instances each, instances varying period + phase +
brightness + deterministic noise (so they are genuinely DIFFERENT images, not copies).
row1 DISCRIMINATION: every image's visdesc nearest-neighbour is its OWN class (16/16).
row2 BEYOND-dHash (headline exceed): same-class instances have a LARGE average dHash Hamming
(>10 -> dHash classes them as different images / non-copies) -- the gap visdesc fills.
row3 BRIGHTNESS INVARIANCE: +brightness leaves the descriptor ~unchanged (small L1).
row4 DETERMINISM: extracting the same image twice -> identical descriptor (L1 == 0).
row5 SEPARATION: average cross-class L1 >> average same-class L1 (no descriptor collapse).
GREEN iff 5/5. Durable verdict -> knowledge/status/visdesc_gate.log. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_visdesc.nxnx_phash.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 16 | func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 17 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } called by 1: main |
| 18 | func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } called by 1: main |
| 19 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } called by 1: main |
| 23 | func g_synth(buf: *u8, w: i64, h: i64, cls: i64, p: i64, phase: i64, bright: i64) -> i64 called by 1: main |
| 47 | func main() -> i64 |