Skip to content

Mocap as a pluggable Step: model / strategy / preprocessing #2

Description

@mikub97

What

For a non-coding researcher the pipeline starts at raw video, not at a
time-series CSV. Karnatak already runs mocap -> time series in production, but
those scripts are the ecosystem's two worst contract violators:
opt/step_motion_to_timeseries.py has no argparse at all and hardcodes
INPUT_DIR, OUTPUT_DIR and ./config.json.

Mocap should be a Step like any other, with three axes left open for extension:

  • model — MediaPipe today (pinned 0.10.20; newer macOS-arm64 wheels are
    Tasks-only and drop mp.solutions). YOLO / OpenPose / others later.
  • strategy — how many people and how they are found. Karnatak splits one
    video into two half-frames; that is one strategy, not the law. Also needed:
    one person per video, multi-person detect-and-track, per-person crops.
  • preprocessing — smoothing, gap filling, coordinate normalisation, velocity
    derivation. Currently inlined; should be a declared chain.

Where

  • DIMS_Dashboard_Karnatak/opt/step_motiontracking_twoperson.py (765 lines)
  • DIMS_Dashboard_Karnatak/opt/step_motion_to_timeseries.py (229 lines)
  • DIMS_Dashboard_Karnatak/opt/requirements.mocap.txt
  • Contract: docs/contracts/step.md

Scope note

Ship current behaviour as the default mediapipe model + split-frame
strategy, so Karnatak works unchanged. The point of this issue is the seam,
not a second model.

Acceptance

  • Karnatak's pipeline produces byte-identical time series through the new Step.
  • Adding a second model or strategy requires no edit to existing step code.
  • Preprocessing is declared in config, not inlined.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:analysisPython analysis steps and pipelinereadySelf-contained: names files, links contract, states acceptancetype:featNew capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions