Skip to main content

ActiMotus

PyPi Coverage Monthly Downloads License

A Python-powered human activity recognition algorithm building upon Acti4. It processes data from multiple accelerometers with a primary requirement for a thigh-worn sensor.

  • Scientifically validated activity detection.
  • Device-independent, relies on RAW accelerometry.
  • Minimum Requirement: Single accelerometer worn on the thigh (front or side).
  • Detects: Lying, sitting, standing, walking, running, stair climbing, and bicycling.
  • Optional: A back-worn sensor enhances lying/sitting detection; a calf-worn sensor adds squatting/kneeling detection.

About predecessor Acti4

Developed by the Danish National Research Center for Working Environment (NRCWE), Acti4 was a MATLAB-based tool designed to classify physical activities (lying, sitting, standing, walking) and assess posture using sensors on the thigh, hip, arm, and trunk. It allowed for combining detections with participant diaries to analyze movement behavior during work and leisure. Development of Acti4 concluded in July 2020. Focus has since shifted to its Python-based successor, ActiMotus, which is being developed in partnership with SENS Innovation ApS and is the core of Motus infrastructure.

Installation

Install using pip install acti-motus.

Usage example

To see ActiMotus in action, here is a simple workflow processing data from a single thigh-worn accelerometer.

1. Load the raw accelerometer data

import pandas as pd
from actimotus import Sens

# Load binary data
raw = Sens.from_bin(raw_thigh.bin)
print(raw)

datetime                           acc_x       acc_y       acc_z  
2024-09-02 08:08:50.227000+00:00   0.218750   -0.171875   -0.773438
2024-09-02 08:08:50.307000+00:00   0.257812   -0.203125   -0.937500
2024-09-02 08:08:50.387000+00:00   0.242188   -0.226562   -0.953125
2024-09-02 08:08:50.467000+00:00   0.234375   -0.242188   -0.945312
2024-09-02 08:08:50.548000+00:00   0.257812   -0.226562   -0.953125

2. Extract features and detect activity types

Next step is to extract features and detect activity types:

from actimotus import Features, Activities

# Calculate features from the raw data
features = Features(calibrate=False).compute(df)

# Classify activities
acivities, references = Activities(vendor="Sens").compute(features)
print(activities)

datetime                    activity  
2024-09-02 08:08:51+00:00   sit
2024-09-02 08:08:52+00:00   sit
2024-09-02 08:08:53+00:00   sit
2024-09-02 08:08:54+00:00   sit
2024-09-02 08:08:55+00:00   sit

3. Generate aggregated exposures

To summarize the detected activities over time (e.g., daily totals), transform the data into exposures:

from actimotus import Exposures

# Compute daily exposures from the activity data
exposures = Exposures().compute(df)
print(exposures)

datetime                    sit               stand             walk              bicycle
2024-09-02 00:00:00+00:00   0 days 04:13:20   0 days 02:29:48   0 days 01:43:48   0 days 00:00:00
2024-09-03 00:00:00+00:00   0 days 07:20:48   0 days 02:23:44   0 days 01:42:22   0 days 00:17:35
2024-09-04 00:00:00+00:00   0 days 08:16:13   0 days 02:24:17   0 days 00:54:27   0 days 00:37:01
2024-09-05 00:00:00+00:00   0 days 00:44:01   0 days 00:38:16   0 days 00:10:19   0 days 00:17:27

Detailed information on ActiMotus processing and features is available in the learning center.

Metadata

Release files for acti-motus 2.4.1

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

Source distribution (sdist)

Source distribution for acti-motus 2.4.1
File Size Uploaded Provenance Actions
acti_motus-2.4.1.tar.gz 41.0 kB Without provenance Details for acti_motus-2.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acti-motus 2.4.1
File Interpreter ABI Platform Actions
acti_motus-2.4.1-py3-none-any.whl Python 3 none any Details for acti_motus-2.4.1-py3-none-any.whl

Total release size: 88.9 kB

Release files / acti_motus-2.4.1.tar.gz

Download URL acti_motus-2.4.1.tar.gz
Size 41.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a163edbe4d6f2cb1210680dfecf92a0c25b230210dfc85625365f1fe5e5c2db6
BLAKE2b-256 checksum
How to use checksums
21495329caa929b21d291d1cbc1d16291e5acd64980d4de8ac66229b3a6c9c95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / acti_motus-2.4.1-py3-none-any.whl

Download URL acti_motus-2.4.1-py3-none-any.whl
Size 47.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9f6bbaed6149d9301546c5e37c60e013b257f9da7f1fca0965a1305706fa657
BLAKE2b-256 checksum
How to use checksums
25bf188e2f4fa2bb5d23d480d23850c0e587f8c145f668c56e844603b7b75884
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for acti-motus 2.4.1

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