code wiki / (root) / nx_pose_elm.nx

nx_pose_elm.nx

buildroot/runtime/nx_pose_elm.nx

3194 B69 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic pose
docsdependenciesstructsconstsfunctions

about

nx_pose_elm.nx -- the NONLINEAR learner for pose-from-silhouette (roadmap R2 v1). The linear perceptron on raw occupancy provably can't separate the hand regions (tried 9-region, delta, 3-band = all at chance). An EXTREME LEARNING MACHINE fixes that WITHOUT fragile fixed-point backprop: a FIXED RANDOM projection h = relu(R*x + b) lifts the occupancy into a high-dim nonlinear feature space where the classes ARE linearly separable, and only the LINEAR OUTPUT is trained -- by the PROVEN perceptron rule (same one text2motion used). Random-features / ELM is a real ML method (Rahimi-Recht random kitchen sinks; Huang ELM). Seeded LCG => deterministic. The honest ceiling stays: coarse, our-render-silhouette domain; SOTA pose = a trained CNN. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_pose_elm.nx nx_poseelm_gate.nx

imports: nx_syscalls.nx

imported by: nx_poseelm_gate.nx

structs

none

consts

9const ELM_MAGIC_1103515245: i64 = 1103515245
10const ELM_MAGIC_12345: i64 = 12345
12const ELM_HSCALE: i64 = 256 // divides R*x before the bias, keeps h bounded

functions

14func elm_lcg(st: *i64) -> i64 { st[0] = (st[0] * ELM_MAGIC_1103515245 + ELM_MAGIC_12345) & 0x7fffffff; return st[0] }
called by 1: elm_init
16func elm_init(R: *i64, b: *i64, nh: i64, nf: i64, seed: i64) -> i64
called by 1: main calls 2: sys_mmapelm_lcg
25func elm_project(R: *i64, b: *i64, x: *i64, nf: i64, nh: i64, h: *i64) -> i64
called by 1: main
38func elm_score(W: *i64, r: i64, h: *i64, nh: i64) -> i64 { var s: i64=0; var j: i64=0; while j<nh { s=s+W[r*nh+j]*h[j]; j=j+1 } return s }
called by 1: elm_predict
39func elm_predict(W: *i64, h: *i64, nh: i64, nc: i64) -> i64
called by 2: elm_trainmain calls 1: elm_score
46func elm_train(W: *i64, hs: *i64, labels: *i64, ns: i64, nh: i64, nc: i64, epochs: i64) -> i64
called by 1: main calls 1: elm_predict