Skip to main content

Python-powered activity detection algorithms that build upon Acti4, processing data from multiple accelerometers with a required thigh sensor.

Project description

Acti-Motus Logo

Acti-Motus

Python-powered activity detection algorithms that build upon Acti4, processing data from multiple accelerometers with a requirement for a thigh-worn sensor.

  • Scientifically validated activity detection
  • Device-independent, relies on RAW accelerometry
  • Requires only a single accelerometer sensor worn on the thigh (front or side)
  • Detects activities: lying, sitting, standing, walking, stair climbing, and bicycling
  • An optional back-worn sensor enhances lying and sitting detection
  • A calf-worn sensor detects squatting and kneeling
  • Python | Multi-threaded

See documentation for more details.

Installation

Install using pip install acti-motus.

A Simple Example

import pandas as pd
from acti_motus import Features, Activities, Exposures

df = pd.read_parquet(thigh.parquet)
print(df)
#>                                      acc_x        acc_y        acc_z
#> datetime  
#> 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

features = Features().extract(df)
acivities, references = Activities().detect(features)
print(activities)
#>                           activity  steps
#> datetime  
#> 2024-09-02 08:08:51+00:00      sit    0.0
#> 2024-09-02 08:08:52+00:00      sit    0.0
#> 2024-09-02 08:08:53+00:00      sit    0.0

exposures = Exposures().generate(df)
print(exposures)
#>                                    sedentary           standing            walking
#> datetime  
#> 2024-09-02 00:00:00+00:00    0 days 09:12:21    0 days 04:34:03    0 days 01:26:00
#> 2024-09-03 00:00:00+00:00    0 days 17:05:21    0 days 04:11:19    0 days 01:30:02
#> 2024-09-04 00:00:00+00:00    0 days 18:26:01    0 days 04:05:18    0 days 00:46:19
#> 2024-09-05 00:00:00+00:00    0 days 04:47:29    0 days 00:59:53    0 days 00:08:28

Detailed information on Acti-Motus processing and features is available here.

About Acti4

Developed by Jørgen Skotte, Acti4 was a sophisticated Matlab program designed to process data from multiple accelerometer sensors that participants wore on their thigh, hip, arm, and trunk. The core function of Acti4 was to classify physical activities, such as lying, sitting, standing, or walking. It also offered further calculations to assess a participant's posture by determining arm and trunk inclination. Lastly, these detections could be combined with participant diaries to obtain more contextual information, such as movement behaviour during periods of work and leisure.

The development of Acti4 concluded in July 2020 with its final release. Subsequently, the focus was redirected toward a successor project: rewriting the original Acti4 algorithm in Python. This new initiative, known as Motus, is being developed in partnership with SENS Innovation ApS.

Contributing

For guidance on setting up a development environment and how to make a contribution to Acti-Motus, see Contributing to Acti-Motus.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acti_motus-0.1.5.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acti_motus-0.1.5-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file acti_motus-0.1.5.tar.gz.

File metadata

  • Download URL: acti_motus-0.1.5.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for acti_motus-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d1947bc1a586cf06c1c879ac89d467d49daa38e68b11198faf391a451edde50c
MD5 e606b2aa1f3ea276ba3142f816bf2f98
BLAKE2b-256 aab48f872f8773a1fa9424e260fae0f0493fa97c2a057efbc137cca39082db0a

See more details on using hashes here.

File details

Details for the file acti_motus-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: acti_motus-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for acti_motus-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2387104854866a7edec7c4d9b65c0821ff89a8b2c66ee5c5babf462bcb1f3a35
MD5 2e9b05f56bed8bab06baf3b886722c93
BLAKE2b-256 c740a1fc9627f125670b5dab106eed516e5798b4700b91b8c4848409b6e207ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page