code wiki / (root) / nx_video_pose_coder.nx

nx_video_pose_coder.nx

buildroot/runtime/nx_video_pose_coder.nx

15624 B308 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind orphan librarytopic video
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_perceptual_profile.nx nx_perceptual_dataset.nx nx_provenance_curve_store.nx nx_video_pose_coder.nx

imports: nx_syscalls.nxnx_perceptual_profile.nxnx_perceptual_dataset.nxnx_provenance_curve_store.nx

imported by: nobody (leaf or entry point)

structs

186struct NxPoseFrame
208struct NxPoseSessionMetrics

consts

76const NX_POSE_SUBJECT_DOG: i64 = 1
77const NX_POSE_SUBJECT_CAT: i64 = 2
78const NX_POSE_SUBJECT_CATTLE: i64 = 3
79const NX_POSE_SUBJECT_SHEEP: i64 = 4
80const NX_POSE_SUBJECT_GOAT: i64 = 5
81const NX_POSE_SUBJECT_PIG: i64 = 6
82const NX_POSE_SUBJECT_HORSE: i64 = 7
83const NX_POSE_SUBJECT_POULTRY: i64 = 8
84const NX_POSE_SUBJECT_SONGBIRD: i64 = 9
85const NX_POSE_SUBJECT_RAPTOR: i64 = 10
86const NX_POSE_SUBJECT_WATERFOWL: i64 = 11
87const NX_POSE_SUBJECT_WILDLIFE_MAMMAL: i64 = 12
88const NX_POSE_SUBJECT_FISH: i64 = 13
89const NX_POSE_SUBJECT_BEE: i64 = 14
90const NX_POSE_SUBJECT_HUMAN: i64 = 15
91const NX_POSE_SUBJECT_MULTIPLE_DOGS: i64 = 16 // multi-subject tracking
118const NX_POSE_CLASS_UNKNOWN: i64 = 0
119const NX_POSE_CLASS_NEUTRAL_STANDING: i64 = 1
120const NX_POSE_CLASS_NEUTRAL_LYING: i64 = 2
121const NX_POSE_CLASS_ORIENTING_TO_TARGET: i64 = 3 // head-turned, body still
122const NX_POSE_CLASS_APPROACHING_TARGET: i64 = 4 // body moving toward
123const NX_POSE_CLASS_AT_TARGET: i64 = 5 // within proximity threshold
124const NX_POSE_CLASS_RETREATING: i64 = 6 // moving away
125const NX_POSE_CLASS_FREEZING: i64 = 7 // sudden stillness (alert)
126const NX_POSE_CLASS_PLAY_BOW: i64 = 8 // dog-specific signal
127const NX_POSE_CLASS_PREY_POINT: i64 = 9 // upland bird breed pointing
128const NX_POSE_CLASS_HEAD_COCK: i64 = 10 // characteristic tilt
129const NX_POSE_CLASS_VOCALIZING: i64 = 11 // mouth-open + audio correlate
130const NX_POSE_CLASS_TAIL_HIGH_WAG: i64 = 12 // arousal positive
131const NX_POSE_CLASS_TAIL_TUCKED: i64 = 13 // fear / submission
132const NX_POSE_CLASS_EAR_FORWARD_ALERT: i64 = 14
133const NX_POSE_CLASS_EAR_PINNED: i64 = 15 // fear / aggression
134const NX_POSE_CLASS_GAZE_AT_TARGET: i64 = 16
159const NX_POSE_OK: i64 = 0
160const NX_POSE_FAIL_NO_SUBJECT_DETECTED: i64 = 1
161const NX_POSE_FAIL_SUBJECT_OBSCURED: i64 = 2
162const NX_POSE_FAIL_MULTIPLE_SUBJECTS_AMBIGUOUS: i64 = 3
163const NX_POSE_FAIL_LOW_CONFIDENCE: i64 = 4 // below ratification threshold
164const NX_POSE_FAIL_BAD_VIDEO: i64 = 5 // decode error
165const NX_POSE_FAIL_WRONG_SUBJECT_KIND: i64 = 6 // model mismatch
166const NX_POSE_FAIL_DEPENDENCY_MISSING: i64 = 7 // PARTIAL_WIRED default

functions

93func nx_pose_subject_name(s: i64) -> *u8
136func nx_pose_class_name(c: i64) -> *u8
168func nx_pose_verdict_name(v: i64) -> *u8
227func nx_pose_coder_extract_frame(frame_buf_ptr: *u8, frame_buf_len: i64,
245func nx_pose_coder_aggregate_session(frames_ptr: *NxPoseFrame, frames_len: i64,
259func nx_pose_coder_classify_behavior(window_ptr: *NxPoseFrame, window_len: i64,
273func nx_pose_coder_user_ratify_frame(frame_index: i64,
288func nx_pose_coder_register_subject_template(subject_id: i64,
300func nx_pose_coder_get_confidence_threshold() -> i64
306func nx_pose_coder_get_last_verdict() -> i64