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.2.tar.gz (5.8 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.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for acti_motus-0.1.2.tar.gz
Algorithm Hash digest
SHA256 96bd40aaa6620fc9e5865f43e7e6a99435b44d23fa6bf48271e63e3b8266731c
MD5 2c78eea8508826cf80f1531fc2699d15
BLAKE2b-256 5ccfd0f673c266a69c954cf7718ab0889ce5ee2d7095269b2cc6eab979553e15

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for acti_motus-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13b36065b4c1ff58cc7cb4e7e64d8f586a433cc03a257c9a5f197085f0e45c5b
MD5 9cc2e27befa704ab4aa27362d9cbf244
BLAKE2b-256 878ab62ac8a03d4dfc1e014fc6ec4c781f3b53f9bb8c2f6f44a665480554cbe9

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