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

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().compute(df)
acivities, references = Activities().compute(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().compute(df)
print(exposures)
#>                                    sedentary           standing            on_feet
#> 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-2.2.0.tar.gz (26.0 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-2.2.0-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for acti_motus-2.2.0.tar.gz
Algorithm Hash digest
SHA256 3408d278a8e12e018cbdae7ad1a8785f99b639a5080b0f29b0faa4c3483368dd
MD5 1637e9abedbda09d4b36bcc6292536bf
BLAKE2b-256 cfec938d90f9f5c5d67e12faba5eab66e286edfa79c2422e0ddbff2b2e736d8a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for acti_motus-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64860ee792d27bcefd98f0ee0f342efbe0320e14179e6ebd314aa74ee16cd415
MD5 f353dd17f00c80e76ed9285d0287a6dd
BLAKE2b-256 46a9d7efb688a333a7865698a7abb84df791a390a89bc2d93fb258d4fb49519d

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