Skip to main content

mobi_motion_tracking

A python package for 3D motion tracking data processing.

Build codecov Ruff stability-experimental LGPL--2.1 License pages

Welcome to mobi_motion_tracking, a Python library designed for processing and analyzing captured motion tracking data. This library provides a set of tools to analyze 3D skeletal data against a gold standard and calculate a similarity metric between them. We provide a labelled output file containing all specified, calculated metrics and metadata for post-processing analysis.

Supported formats & devices

The package currently supports the following formats:

Format Manufacturer Device Implementation status
XLSX Microsoft KINECT ✅
XLSX StereoLabs ZED 2i ✅

Special Note This package works off the assumption that all input participant files are named according to their participant ID containing only digits in the correct format i.e. (0000.xlsx). It is also assummed that each participant file contains 1 or more sheets of data per sequence. The sheets are expected to be named based off the string 'seq' and an integer representing the sequence i.e. ('seq1'). The file names can be any length of digits and there can be an unlimited number of sequences. Sequences will only be processed if indicated in the input list.

It is assumed that any gold file contains the string 'gold' or 'Gold' in its basename.

It is also expected that there are no missing data points prior to running the package.

Processing pipeline implementation

The main processing pipeline of the mobi_motion_tracking module can be described as follows:

  • Data loading: Data is loaded per participant, per sequence as a dataframe. If a file is named incorrectly, is not in the right format, or the sequence does not exist for that participant, it is skipped.
  • Data preprocessing: The raw subject and gold standard joint data are centered to the hip for every frame. The average lengths of all skeletal segments of the gold standard data are calculated, and the centered subject joint data is normalized to the average gold lengths.
  • Metrics Calculation: Calculates specified similarity metrics on the preprocessed data, namely DTW (dynamic Time Warping). DTW is the only possible option at this current developmental stage.

Installation

Install this package via :

pip install mobi_motion_tracking

Or get the newest development version via:

pip install git+https://github.com/childmindresearch/mobi-motion-tracking

Quick start

Using mobi_motion_tracking through the command-line:

Run single files:

mobi_motion_tracking -d /subject/file/path/000.xlsx -g /gold/file/path/gold.xlsx -s "1,2,3" -a "dtw"

Run entire directories:

mobi_motion_tracking -d /subject/file/dir -g /gold/file/path/gold.xlsx -s "1,2,3" -a "dtw"

Using mobi_motion_tracking through a python script or notebook:

Running single files:

from mobi_motion_tracking.core import orchestrator
import pathlib

# Define data file path, gold file path, sequence list, and algorithm
# Support for saving as .ndjson
data_path = pathlib.Path("100.xlsx")
gold_path = pathlib.Path("Gold.xlsx")
sequence = [1, 2, 3]
algorithm = "dtw"

# Run the orchestrator
results = orchestrator.run(
    experimental_path=data_path,
    gold_path=gold_path,
    sequence=sequence,
    algorithm=algorithm,
)


# Data available in list of results.
subject1_seq1 = results[0][0]

participant_ID = subject1_seq1["participant_ID"]
sheetname = subject1_seq1["sheetname"]
method = subject1_seq1["method"]
distance = subject1_seq1["distance"]

Running entire directories:

from mobi_motion_tracking.core import orchestrator
import pathlib

# Define data file path, gold file path, sequence list, and algorithm
# Support for saving as .ndjson
data_path = pathlib.Path("")
gold_path = pathlib.Path("Gold.xlsx")
sequence = [1, 2, 3]
algorithm = "dtw"

# Run the orchestrator
results = orchestrator.run(
    experimental_path=data_path,
    gold_path=gold_path,
    sequence=sequence,
    algorithm=algorithm,
)


# Data available in list of results.
subject1_seq1 = results[0][0]

participant_ID = subject1_seq1["participant_ID"]
sheetname = subject1_seq1["sheetname"]
method = subject1_seq1["method"]
distance = subject1_seq1["distance"]

Metadata

Release files for mobi-motion-tracking 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobi-motion-tracking 0.1.5
File Size Uploaded Provenance Actions
mobi_motion_tracking-0.1.5.tar.gz 21.5 kB Without provenance Details for mobi_motion_tracking-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mobi-motion-tracking 0.1.5
File Interpreter ABI Platform Actions
mobi_motion_tracking-0.1.5-py3-none-any.whl Python 3 none any Details for mobi_motion_tracking-0.1.5-py3-none-any.whl

Total release size: 47.0 kB

Release files / mobi_motion_tracking-0.1.5.tar.gz

Download URL mobi_motion_tracking-0.1.5.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9e47f13873f05d28948dc64736e4a1b336fc95f6b8e13102be73d96fa93f48f5
BLAKE2b-256 checksum
How to use checksums
f6a3a5dfac594b1a9adf66989b5a2baf25544bedb4c4f4091836a709910c6e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / mobi_motion_tracking-0.1.5-py3-none-any.whl

Download URL mobi_motion_tracking-0.1.5-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75c3314c383f8456423f2e6ba6325b8037c70e014cd10797d4af0a386c58b283
BLAKE2b-256 checksum
How to use checksums
d34c0a44cef52cf53aba28a2c0e4372a1fab620cf0d7492a04e3569e86e55aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for mobi-motion-tracking 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page