Skip to content

Quickstart

This walkthrough first proves that the public code is healthy, then shows the minimum authorized-data path from one folder of sensor streams to an activity workbook.

1. Install

conda env create -f environment.yml
conda activate imu-activity-pipeline
python -m pip install -e .
python tests/smoke_test.py

No private recordings or trained checkpoints are needed for this step.

2. Layout

data/
├── signals/
│   ├── train/
│   ├── internal_eval/
│   └── external_test/
├── annotations/
├── splits/
└── metadata/

saved_models/
├── ensemble_config.json
└── <HF downloads appear here>

Each sensor file is UTF-8, tab-separated, and contains at least:

ACC_TIME  ACC_X  ACC_Y  ACC_Z  GYRO_X  GYRO_Y  GYRO_Z

The default model consumes the six physical channels. ACC_TIME contains millisecond timestamps; released files may retain additional columns.

3. Inference

Put authorized input files under data/signals/external_test/, then run:

python run_inference.py

The first run downloads and verifies the public PyTorch assets from Hugging Face. Prepare them in advance with python scripts/download_model_assets.py python.

The compatibility entry point calls the installed package and writes:

predictions_external_test.xlsx

Every prediction row follows:

user_id, category, start, end

4. Paths

python -m imu_activity_pipeline.inference \
  --data_dir data/signals/internal_eval \
  --output predictions_internal_eval.xlsx

Canonical locations can also be redirected without moving the checkout:

export HLS_HAR_DATA_ROOT=/absolute/path/to/data
export HLS_HAR_MODEL_DIR=/absolute/path/to/saved_models
export HLS_HAR_INFERENCE_SPLIT=internal_eval
python run_inference.py

5. Evaluate

python evaluate.py \
  --split internal_eval \
  --predictions predictions_internal_eval.xlsx

The evaluator performs same-class, one-to-one segment matching and reports precision, recall, and F1 at IoU > 0.5.

6. Reproduce

When the required local data and fixed assets are present:

bash run_reproducibility_experiments.sh

Generated material stays in ignored directories:

experiments/results/
experiments/figures/
experiments/logs/

Use a specific interpreter when needed:

PYTHON_BIN=/absolute/path/to/python bash run_reproducibility_experiments.sh

Next