modelhealth
Model Health Python SDK.
Biomechanical analysis from smartphone videos.
Example:
from modelhealth import ModelHealthService, SubjectParameters service = ModelHealthService("your_api_key") sessions = service.session_list() subjects = service.subject_list()
Client for the Model Health biomechanical analysis platform.
Enables you to measure and analyze human movement from smartphone videos. Provides a complete workflow for:
- Initialization: Create a service with your API key
- Session Creation: Create a session
- Camera Calibration: Calibrate cameras using a checkerboard pattern
- Subject Creation: Create a subject profile with anthropometric measurements
- Subject Calibration: Calibrate subject using videos of a neutral pose
- Movement Recording: Record movement activities (squats, jumps, etc.)
- Movement Analysis: Trigger advanced analysis and fetch processed biomechanical data
All methods are synchronous and block until the underlying operation completes. Each instance owns a dedicated single-threaded async runtime so instances may be used across threads, but a single instance should not be called concurrently from multiple threads.
Example:
from modelhealth import ( ModelHealthService, SubjectParameters, CheckerboardDetails, CheckerboardPlacement, ActivityType, ) service = ModelHealthService("your_api_key") # Create session and calibrate cameras session = service.create_session() details = CheckerboardDetails(rows=4, columns=5, square_size=35, placement=CheckerboardPlacement.perpendicular) service.calibrate_camera(session, details, lambda s: print(s)) # Create subject and calibrate params = SubjectParameters(name="Jane Doe", weight=65.0, height=170.0, birth_year=1990) subject = service.create_subject(params) service.calibrate_subject(subject, session, lambda s: print(s)) # Record a movement activity activity = service.start_recording("cmj", session) # Subject performs movement... service.stop_recording(session)
Initialises the service and validates the API key format.
Arguments:
- api_key: Your Model Health API key, available in the dashboard at modelhealth.io.
Raises:
- AuthenticationError: If the API key is empty or invalid.
Example:
from modelhealth import ModelHealthService service = ModelHealthService("your_api_key") # List sessions and subjects sessions = service.session_list() subjects = service.subject_list()
Retrieves all sessions for the account associated with the API key.
Use this to list existing sessions before creating a new one, or to resume a previous capture workflow.
To connect a device to a specific session, use the session qrcode
URL to download the QR code image data, then display it in your app
to be captured by the ModelHealth mobile app.
Returns:
A list of
Sessionobjects, or an empty list if none exist.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
import urllib.request sessions = service.session_list() print(f"Found {len(sessions)} sessions") if sessions: first = sessions[0] with urllib.request.urlopen(first.qrcode) as resp: qr_image_data = resp.read() # Display qr_image_data in your app so the mobile app can scan it
Retrieve a specific session by ID with all activities populated.
Arguments:
- session_id: The
idof the session to retrieve.
Returns:
A
Sessionwithactivitiespopulated.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NotFoundError: If the session does not exist.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
session = service.get_session("abc123") for activity in session.activities: print(f"{activity.name or activity.id}")
Creates a session.
A session is the parent container for a movement capture workflow. It links related entities such as activities and subjects and provides the context used by subsequent operations.
Default session settings are applied automatically. Call
configure_session() afterwards to override specific settings.
Returns:
A new
Sessionwith a unique identifier.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
session = service.create_session()
Applies settings to an existing session.
Call this after create_session() and before calibration to
override any default settings. If not called, the session retains the
defaults applied during creation.
All parameters are optional — omit any to keep its default.
Arguments:
- session: The session to configure.
- framerate: Camera frame rate. Default:
SessionFramerate.fps_120. - opensim_model: OpenSim model. Default:
SessionOpenSimModel.lai_uhlrich_2022_shoulder. - scaling_setup: Scaling pose. Default:
SessionScalingSetup.upright_standing_pose. - core_engine: Core engine version. Default:
SessionCoreEngine.v1_0. - filter_frequency: Low-pass filter frequency. Default:
FilterFrequencyDefault(). - data_sharing: Data-sharing preference. Default:
SessionDataSharing.share_processed_data_and_identified_videos.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
session = service.create_session() service.configure_session( session, framerate=SessionFramerate.fps_60, data_sharing=SessionDataSharing.share_no_data, )
Retrieves all subjects associated with the API key.
Subjects represent individuals being monitored or assessed. Each subject may contain demographic information, physical measurements, and categorization tags.
Returns:
A list of
Subjectobjects, or an empty list if none exist.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
subjects = service.subject_list() for subject in subjects: print(f"{subject.name}: {subject.height}cm, {subject.weight}kg")
Creates a subject profile.
Height and weight are required for biomechanical analysis. Once
created, the subject can be calibrated using
calibrate_subject().
Arguments:
- parameters: The subject's profile details including name and anthropometrics.
Returns:
The newly created
Subjectwith its assigned ID.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On validation failure, server error or unexpected response.
Example:
from modelhealth import SubjectParameters params = SubjectParameters( name="John Smith", weight=75.0, height=180.0, birth_year=1990, ) subject = service.create_subject(params) print(f"Created subject with ID: {subject.id}") # Use the subject for calibration service.calibrate_subject(subject, session, lambda s: print(s))
Retrieves activities for a specific subject with pagination and sorting.
Use this to display a subject's activity history or implement paginated list interfaces.
Arguments:
- subject: The subject whose activities to retrieve.
- start_index: Zero-based index to start from. Use
0for the first page. - count: Number of activities to retrieve per request.
- sort: Sort order — currently only
"updated_at"(most recently updated first).
Returns:
A list of
Activityobjects, or an empty list if none exist.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
# First page page1 = service.activities_for_subject( subject, start_index=0, count=20 ) # Next page page2 = service.activities_for_subject( subject, start_index=20, count=20 )
Retrieves an activity by its ID.
Use this to fetch the latest state of an activity, including its videos, results and current processing status.
Arguments:
- activity_id: The unique identifier of the activity.
Returns:
The
Activitywith its current details.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NotFoundError: If the activity does not exist.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
activity = service.fetch_activity("abc123") print(f"Activity: {activity.name or 'Unnamed'}") print(f"Status: {activity.status}")
Updates an activity.
Only mutable fields (such as name) are applied on the server.
Use the returned object rather than the input going forward.
Arguments:
- activity: The
Activityto update, with modified properties.
Returns:
The updated
Activityas stored on the server.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NotFoundError: If the activity does not exist.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Deletes an activity.
Permanently removes the activity and all associated videos, results, and metadata.
Arguments:
- activity: The
Activityto delete.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NotFoundError: If the activity does not exist.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
service.delete_activity(activity)
Warning:
This operation is irreversible.
Retrieves all movement activities associated with a session.
Activities represent individual recording trials and contain references to captured videos and results. Use this to review past data or fetch results for completed activities.
Arguments:
- session: The session whose activities to retrieve.
Returns:
A list of
Activityobjects, or an empty list if none exist.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
activities = service.activity_list(session) for activity in activities: print(f"{activity.name or activity.id}") print(f" Videos: {len(activity.videos)}") print(f" Results: {len(activity.results)}")
Downloads video data for a specific activity.
Fetches all videos associated with the activity that match the specified version. Videos with invalid URLs or failed downloads are silently excluded from the result.
Arguments:
- activity: The
Activitywhose videos to download. - version:
VideoVersion.rawfor original per-camera recordings, orVideoVersion.syncedfor temporally-synchronised output.
Returns:
A list of raw video bytes (one per camera). Write each element to a
.mp4file for playback. May be empty if no videos are available or all downloads fail.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
videos = service.videos_for_activity(activity, VideoVersion.synced) for i, video in enumerate(videos): with open(f"video_{i}.mp4", "wb") as f: f.write(video)
Downloads motion data from a processed activity.
Use this after an activity reaches ActivityStatus.ready to
retrieve biomechanical result files such as kinematics, marker
data, or an OpenSim model. Failed downloads are silently excluded
from results.
Arguments:
- activity: The
Activitywhose results to download. Must have completed processing. - data_types: Motion data types to fetch. Valid values:
"animation","kinematics_mot","kinematics_csv","markers_trc","markers_csv","model".
Returns:
A list of
MotionDataobjects, one per successfully downloaded type. May be empty if no results are available or all downloads fail.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
results = service.motion_data_for_activity( activity, [MotionDataType.kinematics_mot, MotionDataType.animation] ) for r in results: if r.type == "kinematics_mot": with open("kinematics.mot", "wb") as f: f.write(r.data) # MOT format elif r.type == "animation": import json transforms = json.loads(r.data) # JSON format elif r.type == "markers_trc": with open("markers.trc", "wb") as f: f.write(r.data) # TRC format elif r.type == "model": with open("model.osim", "wb") as f: f.write(r.data) # OSim format
Downloads result data for an activity with a completed analysis.
Call this after analysis_status() returns
AnalysisStatus.completed to retrieve metrics, a report, or raw
data. Failed downloads are silently excluded from results.
Arguments:
- activity: The
Activitywhose analysis results to download. Must have a completed analysis. - data_types: Analysis result types to fetch. Valid values:
"metrics"(JSON),"report"(PDF),"data"(ZIP).
Returns:
A list of
AnalysisDataobjects, one per successfully downloaded type. May be empty if no results are available or all downloads fail.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
import json results = service.analysis_data_for_activity( activity, [AnalysisDataType.metrics, AnalysisDataType.report, AnalysisDataType.data] ) for r in results: if r.type == "metrics": metrics = json.loads(r.data) elif r.type == "report": with open("report.pdf", "wb") as f: f.write(r.data) elif r.type == "data": with open("data.zip", "wb") as f: f.write(r.data)
Retrieves the current processing status of an activity.
Poll this method after recording stops to track upload and processing progress.
Returns ActivityStatusUploading when videos are uploading,
ActivityStatusAnalyzing (with the analysis task) when automatic
analysis is running, or an ActivityStatus enum value otherwise.
Arguments:
- activity: The
Activityto check status for.
Returns:
The current status as
ActivityStatusUploading,ActivityStatusAnalyzing, orActivityStatus.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
status = service.activity_status(activity) if isinstance(status, ActivityStatusUploading): print(f"Uploading: {status.uploaded}/{status.total}") elif status == ActivityStatus.processing: print("Still processing...") elif isinstance(status, ActivityStatusAnalyzing): analysis_status = service.analysis_status(status.task) elif status == ActivityStatus.ready: print("Activity ready for analysis") elif status == ActivityStatus.failed: print("Processing failed")
Starts an analysis task for an activity that is ready for analysis.
Call this after activity_status() returns
ActivityStatus.ready. Use the returned Analysis with
analysis_status() to poll progress.
Arguments:
- activity_type: The analysis algorithm to run.
Use a
ActivityTypemember. - activity: The
Activityto analyze. - session: The
Sessioncontaining the activity.
Returns:
An
Analysisfor tracking analysis progress.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: If the activity is not ready or the request fails.
Example:
task = service.start_analysis( ActivityType.counter_movement_jump, activity, session ) status = service.analysis_status(task)
Retrieves the current status of an analysis task.
Poll this method after start_analysis() to monitor progress.
When status reaches AnalysisStatus.completed, download results
with analysis_data_for_activity().
Arguments:
- task: The
Analysistask returned bystart_analysis().
Returns:
The current
AnalysisStatus.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
import time status = service.analysis_status(task) while status == AnalysisStatus.processing: time.sleep(10) status = service.analysis_status(task) if status == AnalysisStatus.completed: results = service.analysis_data_for_activity( activity, [AnalysisDataType.metrics, AnalysisDataType.report] ) elif status == AnalysisStatus.failed: print("Analysis failed")
Creates an activity and starts recording a dynamic movement trial.
Must be called after both camera and subject calibration are complete.
Call stop_recording() when the subject has finished the movement.
Arguments:
- name: A descriptive name for this activity (e.g.
"cmj","squat"). - session: The session this activity is associated with.
- config: Optional recording configuration.
Returns:
The newly created
Activity.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: If recording cannot start (e.g. missing calibration).
Example:
activity = service.start_recording("cmj", session, ActivityConfig(ActivityType.counter_movement_jump)) # Subject performs movement... service.stop_recording(session)
Stops the active recording for a movement trial.
Call this after the subject has completed the movement. Once stopped,
the recorded videos begin uploading and can be tracked with
activity_status().
Arguments:
- session: The session context to stop recording in.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: If there is no active recording or the request fails.
Example:
service.stop_recording(session)
Calibrates cameras using a checkerboard pattern.
Determines each camera's position and orientation in 3D space (extrinsics), enabling reconstruction of real-world movement from multiple 2D video feeds. Required once per session setup — recalibrate only if cameras are moved.
Note:
rowsandcolumnsrefer to internal corners, not squares. A 5×6 board has 4 internal corner rows and 5 internal corner columns.
This method blocks until calibration completes. The status_callback
is called synchronously on each status update during the operation.
Arguments:
- session: The session context in which calibration is performed.
- checkerboard: The checkerboard dimensions and placement.
- status_callback: Callable receiving a
CalibrationStatus,CalibrationStatusUploadingorCalibrationStatusProcessingon each update.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: If calibration fails (e.g. pattern not detected).
Example:
from modelhealth import CheckerboardDetails, CheckerboardPlacement details = CheckerboardDetails( rows=4, # Internal corners, not squares (for 5×6 board) columns=5, # Internal corners, not squares (for 5×6 board) square_size=35, # Measured in millimeters placement=CheckerboardPlacement.perpendicular, ) service.calibrate_camera(session, details, lambda s: print(s))
Calibrates a subject by recording a neutral standing pose.
Scales the 3D biomechanical model to the subject's body size. Must be run after camera calibration and requires the subject profile to include height and weight.
Important:
The subject must stand upright, feet pointing forward, completely still and fully visible to all cameras for the duration of the recording.
This method blocks until calibration completes. The status_callback
is called synchronously on each status update during the operation.
Arguments:
- subject: The subject to calibrate.
- session: The session context in which calibration is performed.
- status_callback: Callable receiving a
CalibrationStatus,CalibrationStatusUploadingorCalibrationStatusProcessingon each update.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: If calibration fails.
Example:
service.calibrate_subject(subject, session, lambda s: print(s))
Starts preparing a session archive for download.
Kicks off a server-side task that packages the session data into a ZIP
file. Poll archive_status() until status reaches
ArchiveStatus.ready, then call archive_data() to download
the ZIP file.
Arguments:
- session: The
Sessionto archive. - with_videos: If
True, include raw video files in the archive. Defaults toFalse.
Returns:
An
Archivefor tracking preparation progress.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
import time archive = service.prepare_archive(session) status = service.archive_status(archive) while status == ArchiveStatus.processing: time.sleep(5) status = service.archive_status(archive) if status == ArchiveStatus.ready: data = service.archive_data(archive) with open("session.zip", "wb") as f: f.write(data)
Retrieves the current preparation status of an archive task.
Poll this method after prepare_archive() to monitor progress.
When status reaches ArchiveStatus.ready, download the archive
with archive_data().
Arguments:
- archive: The
Archivetask returned byprepare_archive().
Returns:
The current
ArchiveStatus.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error or unexpected response.
Example:
status = service.archive_status(archive) if status == ArchiveStatus.processing: print("Archive being prepared...") elif status == ArchiveStatus.ready: print("Archive ready to download") elif status == ArchiveStatus.failed: print("Archive preparation failed")
Imports a set of activities into Model Health.
Performs the full import workflow: session creation, configuration, subject association, activity creation, video download and upload, processing trigger and polling until complete for each activity.
Arguments:
- activities_json: Raw JSON string of a JSON array of activity objects.
- subject: Subject to associate with the session.
- session_config: Session settings.
Noneuses defaults. - session_meta_json: Optional JSON string of the source session's
metafield. When provided, the new session is patched with this metadata before settings are applied, preserving source data (e.g.sessionWithCalibration) needed for processing. - status_callback: Optional callable invoked at each step with a
status value. Receives one of:
"creating_session",ImportStatusCreatedSession,ImportStatusUploading, or"processing".
Returns:
The
Sessioncontaining all imported activities.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: On server error, invalid JSON or processing failure.
Example:
import json activities_json = json.dumps([{...}, {...}]) # list of activity dicts def on_status(status): if isinstance(status, ImportStatusUploading): print(f"[{status.trial}] Uploading {status.uploaded}/{status.total}") else: print(status) session = service.import_session( activities_json, subject, status_callback=on_status, )
Downloads the prepared session archive as a ZIP file.
Call this after archive_status() returns
ArchiveStatus.ready.
Arguments:
- archive: The
Archivetask returned byprepare_archive().
Returns:
Raw ZIP bytes. Write directly to a
.zipfile.
Raises:
- AuthenticationError: If the API key is invalid or expired.
- NetworkError: On connection failure or timeout.
- ModelHealthError: If the archive is not ready or the download fails.
Example:
data = service.archive_data(archive) with open("session.zip", "wb") as f: f.write(data)
Base exception for all Model Health SDK errors.
Raised when the API key is missing, invalid or expired (HTTP 401/403).
Raised when a requested resource does not exist (HTTP 404).
Raised on connection failure, timeout or DNS error.
A parent container for a movement capture workflow.
A movement recording trial with associated videos and results.
A processed result file associated with an activity.
A recorded video file from an activity.
An individual being monitored or assessed.
Parameters for creating a new subject.
A tag that can be applied to activities for categorization.
Analysis result data downloaded from an activity with a completed analysis.
An active analysis task returned by start_analysis.
Pass to get_analysis_status to poll for completion.
An active archive preparation task.
Motion data types available for download from a processed activity.
Pass one or more values to ModelHealthService.motion_data_for_activity().
Example:
results = service.motion_data_for_activity( activity, [MotionDataType.kinematics_mot, MotionDataType.animation], )
Inverse-kinematics results. MOT format.
Inverse-kinematics results. CSV format.
Analysis result types available for download after a completed analysis.
Pass one or more values to ModelHealthService.analysis_data_for_activity().
Example:
results = service.analysis_data_for_activity( activity, [AnalysisDataType.metrics, AnalysisDataType.report], )
Video version to download for an activity.
Sort order for activity lists.
Analysis algorithm to run on an activity.
Pass to ModelHealthService.start_analysis().
Example:
task = service.start_analysis( ActivityType.counter_movement_jump, activity, session )
Configuration for starting a recording.
Attributes:
- activity_type: The type of activity being recorded. When set, the corresponding analysis starts automatically once the recording is processed.
Orientation of the calibration checkerboard relative to the ground.
Pass to CheckerboardDetails.
Checkerboard upright, plane perpendicular to the ground.
Checkerboard flat on the floor, plane parallel to the ground.
The processing state of an activity (non-uploading variants).
Activities must reach ready before analysis can begin.
When videos are still uploading, ModelHealthService.activity_status()
returns ActivityStatusUploading instead.
Poll ModelHealthService.activity_status() after recording stops to
track upload and processing progress. Once ready, pass the activity to
ModelHealthService.start_analysis().
Example:
import time status = service.activity_status(activity) while status == ActivityStatus.processing: time.sleep(5) status = service.activity_status(activity) if status == ActivityStatus.ready: task = service.start_analysis(ActivityType.counter_movement_jump, activity, session) elif status == ActivityStatus.failed: print("Processing failed")
Videos have been uploaded and are being processed.
Videos are being uploaded from cameras.
Returned by ModelHealthService.activity_status() when upload is in
progress. uploaded and total track progress.
Example:
status = service.activity_status(activity) if isinstance(status, ActivityStatusUploading): print(f"Uploading: {status.uploaded}/{status.total}")
Analysis has been triggered and is in progress.
Returned by ModelHealthService.activity_status() after processing
completes when an activity type was set at recording time. Pass task
to ModelHealthService.analysis_status() to track analysis progress.
Example:
status = service.activity_status(activity) if isinstance(status, ActivityStatusAnalyzing): analysis_status = service.analysis_status(status.task)
The current state of an analysis task.
Poll ModelHealthService.analysis_status() after calling
ModelHealthService.start_analysis() to monitor progress.
When status reaches completed, download results with
ModelHealthService.analysis_data_for_activity().
Example:
import time status = service.analysis_status(task) while status == AnalysisStatus.processing: time.sleep(10) status = service.analysis_status(task) if status == AnalysisStatus.completed: results = service.analysis_data_for_activity(activity, [AnalysisDataType.metrics])
The current state of an archive preparation task.
Poll ModelHealthService.archive_status() after calling
ModelHealthService.prepare_archive() to monitor progress.
When status reaches ready, download the archive with
ModelHealthService.archive_data().
Example:
import time archive = service.prepare_archive(session) status = service.archive_status(archive) while status == ArchiveStatus.processing: time.sleep(5) status = service.archive_status(archive) if status == ArchiveStatus.ready: data = service.archive_data(archive)
The current state of a calibration process (non-uploading, non-processing variants).
When videos are uploading, ModelHealthService.calibrate_camera() and
ModelHealthService.calibrate_subject() pass CalibrationStatusUploading
to the callback. When the server is processing, CalibrationStatusProcessing
is passed instead.
All connected cameras are actively recording.
The server is processing the uploaded videos.
Passed to the status callback during server-side processing.
percent is the completion percentage, or None if unavailable.
Configuration for a calibration checkerboard pattern.
Settings to apply to a session before recording.
All fields have sensible defaults. Pass to
ModelHealthService.import_session() (or call
ModelHealthService.configure_session() directly) to override.
Example:
from modelhealth import SessionConfig, SessionFramerate, SessionDataSharing config = SessionConfig( framerate=SessionFramerate.fps_60, data_sharing=SessionDataSharing.share_no_data, ) session = service.import_session(activities_json, subject, session_config=config)
OpenSim musculoskeletal model. Default: lai_uhlrich_2022_shoulder.
Scaling pose. Default: upright_standing_pose.
Low-pass filter frequency. Default: server-chosen.
Data-sharing preference. Default: share_processed_data_and_identified_videos.
Camera frame rate for a recording session.
Higher framerates capture fast movements more accurately but increase processing time proportionally. Collect only as much footage as needed and keep recordings under the suggested durations.
60 frames per second. Suggested maximum recording duration: 60 s.
120 frames per second (default). Suggested maximum recording duration: 30 s.
240 frames per second. Suggested maximum recording duration: 15 s.
OpenSim musculoskeletal model used for biomechanical analysis.
Full-body model with 33 degrees of freedom plus a 6-DoF shoulder complex with a scapulothoracic body and a glenohumeral joint using the ISB-recommended Y-X-Y rotation sequence. Default.
Same full-body model as lai_uhlrich_2022_shoulder without the
ISB shoulder complex.
Pose used for subject scaling during calibration.
Subject stands straight with feet pointing forward and no bending or rotation at the hips, knees, or ankles. Default.
No posture assumptions. Use when the subject cannot adopt the upright standing pose. Requires all body segments to be visible by at least two cameras.
Core processing engine version.
Data-sharing preference for a session.
Session data and videos are uploaded to a secure cloud server for processing. This setting controls what Model Health can use for internal development. Identified videos contain original footage with faces unblurred; de-identified videos have faces blurred. Processed data (e.g. joint angles) is always de-identified.
Use the server-chosen filter frequency.
Use a specific filter frequency in Hz.
Session created successfully during a session import.
Passed to the status callback during ModelHealthService.import_session()
once the new session has been created on the server.
A video is being uploaded during a session import.
Passed to the status callback during ModelHealthService.import_session()
while videos are being transferred. trial names the current trial;
uploaded and total track progress within that trial.