nx_video_pose_coder.nx
buildroot/runtime/nx_video_pose_coder.nx
about
nx_video_pose_coder.nx -- CV-based behavioral pose extraction from video.
module: nishi-core.perception.video_pose_coder
depends: nishi-core.perception.profile + nishi-core.perception.perceptual_dataset +
nishi-core.perception.provenance_curve_store + nishi-core.io.syscalls
disk_kb: 7
capability: PERCEPTION
wired_status: PARTIAL_WIRED
MISSING_CAPABILITIES:
- VIDEO_DECODE (decode .mp4/.mov/.webm frames into RGB tensors;
queued, composes with nx_video_codec_pmesh arc in
NISHI_BITS_UP_EXCEED_INDUSTRY)
- NEURAL_NET_INFERENCE (run pose-estimation network on frame tensor;
queued, depends on nx_tensor + nx_conv2d + nx_transformer_stack
primitives from AI-port arc)
- POSE_KEYPOINT_DETECTION (per-frame keypoint extraction; DeepLabCut /
SLEAP / OpenPose architecture family, re-derived bits-up per
[[feedback-bits-up-exceed-never-match]] — never adopt closed weights)
- TEMPORAL_TRACKING (associate keypoints across frames into per-subject
trajectories; Hungarian-algorithm-style assignment)
- BEHAVIORAL_METRIC_AGGREGATION (compute orientation_latency_ms /
approach_distance_cm / etc. from keypoint trajectories)
- PER_SUBJECT_FINE_TUNING (learn individual subject's body
proportions for higher accuracy; user-ratified Stage 1 SUPERVISED)
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: feedback-substrate-does-heavy-lifting-user-is-partner-not-gate_2026 +
feedback-substrate-primitives-meta-not-one-off_2026 +
feedback-multi-species-perceptual-substrate-not-anthropocentric_2026 +
feedback-self-surfacing-intelligence-staged-autonomy +
mathis_2018_deeplabcut +
pereira_2022_sleap +
cao_2017_openpose +
feedback-bits-up-exceed-never-match
Per cardinal [[feedback-substrate-does-heavy-lifting-user-is-partner-not-gate]]:
User mounts camera on tripod + records. THIS primitive extracts every
behavioral metric from the resulting video automatically. User only
ratifies ambiguous frames where confidence is low; substrate doesn't
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_perceptual_profile.nxnx_perceptual_dataset.nxnx_provenance_curve_store.nx
imported by: nobody (leaf or entry point)
structs
| 186 | struct NxPoseFrame |
| 208 | struct NxPoseSessionMetrics |
consts
| 76 | const NX_POSE_SUBJECT_DOG: i64 = 1 |
| 77 | const NX_POSE_SUBJECT_CAT: i64 = 2 |
| 78 | const NX_POSE_SUBJECT_CATTLE: i64 = 3 |
| 79 | const NX_POSE_SUBJECT_SHEEP: i64 = 4 |
| 80 | const NX_POSE_SUBJECT_GOAT: i64 = 5 |
| 81 | const NX_POSE_SUBJECT_PIG: i64 = 6 |
| 82 | const NX_POSE_SUBJECT_HORSE: i64 = 7 |
| 83 | const NX_POSE_SUBJECT_POULTRY: i64 = 8 |
| 84 | const NX_POSE_SUBJECT_SONGBIRD: i64 = 9 |
| 85 | const NX_POSE_SUBJECT_RAPTOR: i64 = 10 |
| 86 | const NX_POSE_SUBJECT_WATERFOWL: i64 = 11 |
| 87 | const NX_POSE_SUBJECT_WILDLIFE_MAMMAL: i64 = 12 |
| 88 | const NX_POSE_SUBJECT_FISH: i64 = 13 |
| 89 | const NX_POSE_SUBJECT_BEE: i64 = 14 |
| 90 | const NX_POSE_SUBJECT_HUMAN: i64 = 15 |
| 91 | const NX_POSE_SUBJECT_MULTIPLE_DOGS: i64 = 16 // multi-subject tracking |
| 118 | const NX_POSE_CLASS_UNKNOWN: i64 = 0 |
| 119 | const NX_POSE_CLASS_NEUTRAL_STANDING: i64 = 1 |
| 120 | const NX_POSE_CLASS_NEUTRAL_LYING: i64 = 2 |
| 121 | const NX_POSE_CLASS_ORIENTING_TO_TARGET: i64 = 3 // head-turned, body still |
| 122 | const NX_POSE_CLASS_APPROACHING_TARGET: i64 = 4 // body moving toward |
| 123 | const NX_POSE_CLASS_AT_TARGET: i64 = 5 // within proximity threshold |
| 124 | const NX_POSE_CLASS_RETREATING: i64 = 6 // moving away |
| 125 | const NX_POSE_CLASS_FREEZING: i64 = 7 // sudden stillness (alert) |
| 126 | const NX_POSE_CLASS_PLAY_BOW: i64 = 8 // dog-specific signal |
| 127 | const NX_POSE_CLASS_PREY_POINT: i64 = 9 // upland bird breed pointing |
| 128 | const NX_POSE_CLASS_HEAD_COCK: i64 = 10 // characteristic tilt |
| 129 | const NX_POSE_CLASS_VOCALIZING: i64 = 11 // mouth-open + audio correlate |
| 130 | const NX_POSE_CLASS_TAIL_HIGH_WAG: i64 = 12 // arousal positive |
| 131 | const NX_POSE_CLASS_TAIL_TUCKED: i64 = 13 // fear / submission |
| 132 | const NX_POSE_CLASS_EAR_FORWARD_ALERT: i64 = 14 |
| 133 | const NX_POSE_CLASS_EAR_PINNED: i64 = 15 // fear / aggression |
| 134 | const NX_POSE_CLASS_GAZE_AT_TARGET: i64 = 16 |
| 159 | const NX_POSE_OK: i64 = 0 |
| 160 | const NX_POSE_FAIL_NO_SUBJECT_DETECTED: i64 = 1 |
| 161 | const NX_POSE_FAIL_SUBJECT_OBSCURED: i64 = 2 |
| 162 | const NX_POSE_FAIL_MULTIPLE_SUBJECTS_AMBIGUOUS: i64 = 3 |
| 163 | const NX_POSE_FAIL_LOW_CONFIDENCE: i64 = 4 // below ratification threshold |
| 164 | const NX_POSE_FAIL_BAD_VIDEO: i64 = 5 // decode error |
| 165 | const NX_POSE_FAIL_WRONG_SUBJECT_KIND: i64 = 6 // model mismatch |
| 166 | const NX_POSE_FAIL_DEPENDENCY_MISSING: i64 = 7 // PARTIAL_WIRED default |
functions
| 93 | func nx_pose_subject_name(s: i64) -> *u8 |
| 136 | func nx_pose_class_name(c: i64) -> *u8 |
| 168 | func nx_pose_verdict_name(v: i64) -> *u8 |
| 227 | func nx_pose_coder_extract_frame(frame_buf_ptr: *u8, frame_buf_len: i64, |
| 245 | func nx_pose_coder_aggregate_session(frames_ptr: *NxPoseFrame, frames_len: i64, |
| 259 | func nx_pose_coder_classify_behavior(window_ptr: *NxPoseFrame, window_len: i64, |
| 273 | func nx_pose_coder_user_ratify_frame(frame_index: i64, |
| 288 | func nx_pose_coder_register_subject_template(subject_id: i64, |
| 300 | func nx_pose_coder_get_confidence_threshold() -> i64 |
| 306 | func nx_pose_coder_get_last_verdict() -> i64 |