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)
#>                           non_wear          sedentary           standing            walking
#> datetime  
#> 2024-09-02 00:00:00+00:00   0 days    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    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    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    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.0.tar.gz (5.7 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.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for acti_motus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3fb3dc0e094af34a55e599fd4e6347613e210f13516d9cd5bcb3ac7c7a114c31
MD5 9a419c4a4a02aad65cfcfaa0c3c63515
BLAKE2b-256 3ca8ff6377a828f9a258ea1a22df48219370bcc77b2a10beb43c18a643630861

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for acti_motus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3e96f851d2871314fe60035e629b9c3d1aa177d8e5d48131ad58b5f5ce7cb51
MD5 a300a71179807c4dfc351ae610e2a2ad
BLAKE2b-256 e5ebf0ee8939f403cf2272d7fbba9018f8f552b119b97e475688fe830c106d6c

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