biconcavelens/bas-har

BAS on-board human activity recognition: working HAR assistant (har.triixd.tech) and research on state-first 3D downlink (bas.triixd.tech)

Python

0

2 commits

updated Oct 2, 2026

See the code

README

BAS on-board human activity recognition

Our entry for the ISRO BAS problem statement AI Human Activity Recognition for On-board BAS Experiments. Two parts, each with its own site:

WhatSite
HAR assistantThe working system for the expected solution: tracks a protocol from two fixed payload cameras, suggests the next step, raises voice alerts for skipped or out-of-order steps, writes a timestamped step log, records and streams the video, and shows it all in a monitoring console. Runs offline.har.triixd.tech
ResearchExperiments behind it on real NASA ISS footage: downlinking crew state instead of video, orientation-agnostic 3D body tracking, step validation, and what did not work.bas.triixd.tech

Headline results

HAR assistant, 100 held-out rendered runs it never saw (34 with an injected mistake):

  • 34 of 34 mistakes raised a voice alert, each named correctly; 3 of 66 correct runs raised a false alarm; 97% correct verdicts
  • alert a median 2.8 s after the wrong step starts
  • crew joints tracked to 29 mm in 3D relative to the rack, at any body orientation
  • downlink of 687 B/s (3D state + step events) instead of 108 KB/s of video, 158× less
  • 5.8 frames/s on a laptop CPU alone (the cameras give 5), 19 frames/s with its RTX 4060

Research, held-out NASA ISS footage:

  • full frames 162 KB/s → body-model parameters + 320 px scene image 16.8 KB/s (E1) → scene sent only when it changes 2.2 KB/s (E7), with the same crew meshes on the ground
  • the reference body model moves ~120 mm when the crew is rolled 90°; four-rotation canonicalisation brings it to 13 mm (E10)

All results on the HAR side are on synthetic runs from our Blender generator (a mannequin crew member); real-person trials are the next step.

Layout

PathContents
har/run.pyThe HAR assistant: cameras in → detector → triangulation in the rack frame → step recogniser → checker → voice, log, console, MP4 + UDP stream, downlink packets
har/console.htmlMonitoring console (live from run.py --gui, or replaying recorded sessions)
har/steps.py, har/downlink.pyStep recogniser + protocol checker; downlink packet format (137 B per frame, 5 B per event)
har/yolo_data.py, har/train_perception.py, har/train_steps.pyTraining: renders → YOLO pose dataset → perception model; step recogniser
har/evaluate.py, har/demo_sessions.py, har/site.pyEvaluation on held-out runs, demo sessions, har.triixd.tech build
har/models/Trained weights: perception.pt (YOLO11s-pose, 10M params), steps.pt (84k params), plus measured speed and accuracy
generate.py, protocol.json, render_seeds_*.txtBlender generator for the synthetic protocol runs, and the seeds used for each split
teacher.py, body.py, ground_*.py, splat.py, kfsize.py, orient.py, stepval.py, …Research experiments E1–E11 (see bas.triixd.tech)
viewer.py, viewer_template.htmlbas.triixd.tech build
demo_process.py, demo_live_server.py, demo_player.htmlSide-by-side demo: camera + MediaPipe pose, E1, E7 and E8 panels, from a recorded video or live from a webcam
runs/**/summary.json, har/eval*/summary.jsonResult summaries behind every number on the sites

Not in the repository (large, all regenerable): NASA footage (public domain, images.nasa.gov), Blender renders, datasets, experiment outputs and built sites.

Running

Environments. The HAR assistant runs on Windows or Linux with Python 3.11, torch, ultralytics and opencv-python; voice uses the Windows speech synthesiser, recording and streaming use ffmpeg. The research experiments and the E1/E7/E8 demo need MoGe-2 and SAM 3D Body (we run them in WSL with CUDA; SAM 3D Body cloned at ~/sam3d/sam-3d-body). The generator needs Blender 4.2.

HAR assistant on two camera feeds (indices, video files, stream URLs or folders of frames) and a rack calibration:

python har/run.py --cam0 0 --cam1 1 --calib rack_calibration.json --out sessions/today --voice --gui 8080 --stream udp://192.168.1.20:5000

Add --device cpu to run without a GPU. The console opens at http://127.0.0.1:8080.

Rebuild the HAR models and evaluation

blender -b -P generate.py -- --seeds $(cat render_seeds_train.txt) --fps 2 --no-depth --out render_train
blender -b -P generate.py -- --seeds $(cat render_seeds_test.txt) --fps 5 --no-depth --out render_test
python har/yolo_data.py --renders render_train --out har/data
python har/train_perception.py --data har/data/data.yaml --epochs 24
python har/train_steps.py --data dataset_e11          # needs the 400 generator label runs (generate.py --dry)
python har/evaluate.py --renders render_test --out har/eval

E1/E7/E8 demo: python demo_process.py video.mp4 demo_live/name then serve the folder, or python demo_live_server.py and open http://localhost:8770/ for the live webcam version.

Sites: python viewer.py runs site --standalone and python har/site.py, deployed as static Cloudflare Workers with wrangler deploy (wrangler.jsonc, wrangler.har.jsonc).

biconcavelens/bas-har

BAS on-board human activity recognition: working HAR assistant (har.triixd.tech) and research on state-first 3D downlink (bas.triixd.tech)

Python

0

2 commits

updated Oct 2, 2026

See the code

README

BAS on-board human activity recognition

Our entry for the ISRO BAS problem statement AI Human Activity Recognition for On-board BAS Experiments. Two parts, each with its own site:

WhatSite
HAR assistantThe working system for the expected solution: tracks a protocol from two fixed payload cameras, suggests the next step, raises voice alerts for skipped or out-of-order steps, writes a timestamped step log, records and streams the video, and shows it all in a monitoring console. Runs offline.har.triixd.tech
ResearchExperiments behind it on real NASA ISS footage: downlinking crew state instead of video, orientation-agnostic 3D body tracking, step validation, and what did not work.bas.triixd.tech

Headline results

HAR assistant, 100 held-out rendered runs it never saw (34 with an injected mistake):

  • 34 of 34 mistakes raised a voice alert, each named correctly; 3 of 66 correct runs raised a false alarm; 97% correct verdicts
  • alert a median 2.8 s after the wrong step starts
  • crew joints tracked to 29 mm in 3D relative to the rack, at any body orientation
  • downlink of 687 B/s (3D state + step events) instead of 108 KB/s of video, 158× less
  • 5.8 frames/s on a laptop CPU alone (the cameras give 5), 19 frames/s with its RTX 4060

Research, held-out NASA ISS footage:

  • full frames 162 KB/s → body-model parameters + 320 px scene image 16.8 KB/s (E1) → scene sent only when it changes 2.2 KB/s (E7), with the same crew meshes on the ground
  • the reference body model moves ~120 mm when the crew is rolled 90°; four-rotation canonicalisation brings it to 13 mm (E10)

All results on the HAR side are on synthetic runs from our Blender generator (a mannequin crew member); real-person trials are the next step.

Layout

PathContents
har/run.pyThe HAR assistant: cameras in → detector → triangulation in the rack frame → step recogniser → checker → voice, log, console, MP4 + UDP stream, downlink packets
har/console.htmlMonitoring console (live from run.py --gui, or replaying recorded sessions)
har/steps.py, har/downlink.pyStep recogniser + protocol checker; downlink packet format (137 B per frame, 5 B per event)
har/yolo_data.py, har/train_perception.py, har/train_steps.pyTraining: renders → YOLO pose dataset → perception model; step recogniser
har/evaluate.py, har/demo_sessions.py, har/site.pyEvaluation on held-out runs, demo sessions, har.triixd.tech build
har/models/Trained weights: perception.pt (YOLO11s-pose, 10M params), steps.pt (84k params), plus measured speed and accuracy
generate.py, protocol.json, render_seeds_*.txtBlender generator for the synthetic protocol runs, and the seeds used for each split
teacher.py, body.py, ground_*.py, splat.py, kfsize.py, orient.py, stepval.py, …Research experiments E1–E11 (see bas.triixd.tech)
viewer.py, viewer_template.htmlbas.triixd.tech build
demo_process.py, demo_live_server.py, demo_player.htmlSide-by-side demo: camera + MediaPipe pose, E1, E7 and E8 panels, from a recorded video or live from a webcam
runs/**/summary.json, har/eval*/summary.jsonResult summaries behind every number on the sites

Not in the repository (large, all regenerable): NASA footage (public domain, images.nasa.gov), Blender renders, datasets, experiment outputs and built sites.

Running

Environments. The HAR assistant runs on Windows or Linux with Python 3.11, torch, ultralytics and opencv-python; voice uses the Windows speech synthesiser, recording and streaming use ffmpeg. The research experiments and the E1/E7/E8 demo need MoGe-2 and SAM 3D Body (we run them in WSL with CUDA; SAM 3D Body cloned at ~/sam3d/sam-3d-body). The generator needs Blender 4.2.

HAR assistant on two camera feeds (indices, video files, stream URLs or folders of frames) and a rack calibration:

python har/run.py --cam0 0 --cam1 1 --calib rack_calibration.json --out sessions/today --voice --gui 8080 --stream udp://192.168.1.20:5000

Add --device cpu to run without a GPU. The console opens at http://127.0.0.1:8080.

Rebuild the HAR models and evaluation

blender -b -P generate.py -- --seeds $(cat render_seeds_train.txt) --fps 2 --no-depth --out render_train
blender -b -P generate.py -- --seeds $(cat render_seeds_test.txt) --fps 5 --no-depth --out render_test
python har/yolo_data.py --renders render_train --out har/data
python har/train_perception.py --data har/data/data.yaml --epochs 24
python har/train_steps.py --data dataset_e11          # needs the 400 generator label runs (generate.py --dry)
python har/evaluate.py --renders render_test --out har/eval

E1/E7/E8 demo: python demo_process.py video.mp4 demo_live/name then serve the folder, or python demo_live_server.py and open http://localhost:8770/ for the live webcam version.

Sites: python viewer.py runs site --standalone and python har/site.py, deployed as static Cloudflare Workers with wrangler deploy (wrangler.jsonc, wrangler.har.jsonc).