actinet

An activity classification model based on self-supervised learning for wrist-worn accelerometer data.

https://github.com/oxwearables/actinet

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.0%) to scientific vocabulary

Keywords

deep-learning fitness-tracker healthcare human-activity-recognition machine-learning self-supervised-learning wearables
Last synced: 6 months ago · JSON representation ·

Repository

An activity classification model based on self-supervised learning for wrist-worn accelerometer data.

Basic Info
Statistics
  • Stars: 8
  • Watchers: 2
  • Forks: 2
  • Open Issues: 0
  • Releases: 18
Topics
deep-learning fitness-tracker healthcare human-activity-recognition machine-learning self-supervised-learning wearables
Created about 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

ActiNet

GitHub all releases DOI

A tool to extract meaningful health information from large accelerometer datasets. The software generates time-series and summary metrics useful for answering key questions such as how much time is spent in sleep, sedentary behaviour, or doing physical activity.

Install

Minimum requirements: Python>=3.9, Java 8 (1.8)

The following instructions make use of Anaconda to meet the minimum requirements:

  1. Download & install Miniconda (light-weight version of Anaconda).
  2. (Windows) Once installed, launch the Anaconda Prompt.
  3. Create a virtual environment:

    console conda create -n actinet python=3.9 openjdk pip

    This creates a virtual environment called actinet with Python version 3.9, OpenJDK, and Pip.

  4. Activate the environment:

    console conda activate actinet

    You should now see (actinet) written in front of your prompt.

  5. Install actinet:

    console pip install actinet

You are all set! The next time that you want to use actinet, open the Anaconda Prompt and activate the environment (step 4). If you see (actinet) in front of your prompt, you are ready to go!

Usage

```bash

Process an AX3 file

$ actinet sample.cwa.gz

Or an ActiGraph file

$ actinet sample.gt3x

Or a GENEActiv file

$ actinet sample.bin

Or a CSV file (see data format below)

$ actinet sample.csv ```

See the Usage page for further uses of the tool.

Troubleshooting

Some systems may face issues with Java when running the script. If this is your case, try fixing OpenJDK to version 8:

console conda create -n actinet openjdk=8

Output files

By default, output files will be stored in a folder named after the input file, outputs/{filename}/, created in the current working directory. You can change the output path with the -o flag:

```console $ actinet sample.cwa -o /path/to/some/folder/

The following output files are created:

  • Info.json Summary info, as shown above.
  • timeSeries.csv Raw time-series of activity levels

See Data Dictionary for the list of output variables.

Plotting activity profiles

To plot the activity profiles, you can use the -p flag:

console $ actinet sample.cwa -p <Output plot written to: data/sample-timeSeries-plot.png>

Crude vs. Adjusted Estimates

Adjusted estimates are provided that account for missing data. Missing values in the time-series are imputed with the mean of the same timepoint of other available days. For adjusted totals and daily statistics, 24h multiples are needed and will be imputed if necessary. Estimates will be NaN where data is still missing after imputation.

Processing multiple files

Windows

To process multiple files you can create a text file in Notepad which includes one line for each file you wish to process, as shown below for file1.cwa, file2.cwa, and file2.cwa.

Example text file commands.txt:

console actinet file1.cwa & actinet file2.cwa & actinet file3.cwa :END `

Once this file is created, run cmd < commands.txt from the terminal.

Linux

Create a file command.sh with:

console actinet file1.cwa actinet file2.cwa actinet file3.cwa

Then, run bash command.sh from the terminal.

Collating outputs

A utility script is provided to collate outputs from multiple runs:

console actinet-collate-outputs outputs/

This will collate all *-Info.json files found in outputs/ and generate a CSV file.

Citing our work

When using this tool, please consider citing the works listed in CITATION.md.

Licence

See LICENSE.md.

Acknowledgements

We would like to thank all our code contributors, manuscript co-authors, and research participants for their help in making this work possible.

Owner

  • Name: Oxford Wearables Group
  • Login: OxWearables
  • Kind: organization
  • Location: United Kingdom

Citation (CITATION.cff)

cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Acquah"
  given-names: "Aidan"
  orcid: "https://orcid.org/0000-0002-3241-1280"
- family-names: "Chan"
  given-names: "Shing"
  orcid: "https://orcid.org/0000-0001-9600-5575"
- family-names: "Doherty"
  given-names: "Aiden"
  orcid: "https://orcid.org/0000-0003-1840-0451"
title: "ActiNet: An activity classification model based on self-supervised learning for wrist-worn accelerometer data."
doi: 10.5281/zenodo.15365422
date-released: 2025-05-08
url: "https://github.com/OxWearables/actinet"

GitHub Events

Total
  • Create event: 22
  • Release event: 9
  • Issues event: 6
  • Watch event: 2
  • Delete event: 16
  • Member event: 1
  • Issue comment event: 3
  • Push event: 36
  • Pull request review event: 3
  • Pull request event: 27
  • Fork event: 2
Last Year
  • Create event: 22
  • Release event: 9
  • Issues event: 6
  • Watch event: 2
  • Delete event: 16
  • Member event: 1
  • Issue comment event: 3
  • Push event: 36
  • Pull request review event: 3
  • Pull request event: 27
  • Fork event: 2

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 197 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 18
  • Total maintainers: 1
pypi.org: actinet

Activity detection algorithm compatible with the UK Biobank Accelerometer Dataset

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 197 Last month
Rankings
Dependent packages count: 9.9%
Average: 37.7%
Dependent repos count: 65.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/release.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
setup.py pypi
  • actipy >=3.0.5
  • imbalanced-learn ==0.9.1
  • joblib ==1.2.
  • matplotlib ==3.5.
  • numpy ==1.24.
  • pandas ==2.0.
  • scikit-learn ==1.1.1
  • scipy ==1.10.
  • torch ==1.13.
  • torchvision ==0.14.
  • tqdm ==4.64.
  • transforms3d ==0.4.