nx_coco_eval.nx
buildroot/runtime/nx_coco_eval.nx
about
nx_coco_eval.nx -- REAL industry COCO keypoint scorer (GT-bbox variant).
Reads the sovereign-fetched COCO GT JSONL (whyen-wang/coco_keypoints ->
keypoints_validation.jsonl, format per line:
{"image":"..jpg","bboxes":[[x,y,w,h],..],"keypoints":[[[x,y,v]x17],..]})
and a predictions JSONL in the SAME shape, and computes per-person OKS
(official COCO sigmas, s^2 = bbox area) + COCO AP@[.5:.95] via the gated
nx_coco_oks / nx_coco_ap. This is the EXTERNAL grader that ends the self-
validation: GT is COCO's real annotations, not our own model's output.
GT-bbox eval: predictions are produced by running the pose net on each GT
bbox, so pred person i <-> GT person i (no detector, no FPs) => AP@t =
fraction of persons with OKS>=t (what nx_coco_ap computes). This is the
standard, DISCLOSED "pose accuracy with GT bbox" number (not detector AP).
Area = bbox w*h (this dataset carries bbox, not mask area -- documented
approximation; official COCO uses segmentation area).
Modes (build/run launcher forwards no argv -> config files, cwd=nxc2):
data/mp_eval_gt.txt -- GT JSONL path (required)
data/mp_eval_pred.txt -- predictions JSONL path (optional). Present+nonempty
=> REAL eval (pair by image name). Absent/empty =>
SELF-TEST on real GT line 1 (identity=1000 + shift).
nx_safety_envelope:
intended_use: offline scoring of pose predictions vs real COCO GT
sil_target: SIL1
verdict: NOT_YET_EVALUATED
genealogy_id: cocodataset/cocoeval(OKS) lineage_id: nx_coco_eval_v1
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnx_coco_oks.nxnx_coco_ap.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
| 32 | const K_MAGIC_4096: i64 = 4096 |
| 33 | const K_MAGIC_1024: i64 = 1024 |
| 34 | const K_MAGIC_8192: i64 = 8192 |
functions
| 36 | func ce_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return n } |
| 41 | func ce_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 43 | func ce_read_all(path: *u8, buf: *u8, cap: i64) -> i64 |
| 56 | func ce_cfg(path: *u8, out: *u8, cap: i64) -> i64 |
| 77 | func ce_find_key(buf: *u8, n: i64, from: i64, key: *u8, klen: i64) -> i64 called by 1: ce_parse |
| 91 | func ce_pull(buf: *u8, n: i64, p0: i64, out: *i64, cap: i64, endbox: *i64) -> i64 called by 1: ce_parse |
| 131 | func ce_parse(buf: *u8, lstart: i64, lend: i64, bbox: *i64, bbcap: i64, kp: *i64, kpcap: i64, kpn_box: *i64) -> i64 |
| 145 | func ce_person_oks(bbox: *i64, gkp: *i64, pkp: *i64, j: i64) -> i64 |
| 169 | func main() -> i64 |