Autoencoders developed by Group 3 for the IAAC AI Methods I hackathon and the Motion Atlas project. They reconstruct construction-worker movement from wearable inertial sensors (IMU) or from video pose keypoints, and use the reconstruction error as an anomaly score. Despite the project name, reconstruction error is not a validated measurement of physical strain or injury risk.
| Folder | Model | Input | Used by the Motion Atlas API |
|---|---|---|---|
imu/ |
Conv1D autoencoder, latent 32 | 200 time steps × 18 IMU channels | Yes (sensor CSV analysis) |
keypoint/ |
Dense autoencoder, latent 16 | 48 frames × 34 pose coordinates | Yes (video pose analysis) |
| repository root | Mixed files, see below | – | No |
imu/ and keypoint/ each hold a matching model.onnx, config.json and scaler.npz. Always use the three files from the same folder: mixing files from different folders produces wrong shapes or wrong scaling.
At the repository root, model.onnx is a copy of the keypoint model, while config.json and scaler.npz belong to the earlier dense IMU baseline. The root files do not form a working set; use imu/ or keypoint/ instead.
imu/notebook_conv1d32/ is an identical copy of the imu/ export, with its own model card.
imu/): Conv1D-32 anomaly detectorimu/config.json.(raw - mean) / std from imu/scaler.npz. Scaling happens outside the ONNX graph.sensor_window, output reconstruction (batch, 200, 18).anomaly_threshold = 1.6177, the 95th percentile of normal validation errors.Test results on the held-out workers:
| Metric | Value |
|---|---|
| ROC AUC | 0.839 |
| Precision | 0.934 |
| Recall | 0.366 |
| F1-score | 0.526 |
The detector is precise but misses many anomalies (147 of 232 anomalous test windows).
keypoint/)keypoint/config.json.threshold_mse = 0.6588, the 90th percentile of normal validation reconstruction error.Occlusion and missed joints can raise the score without any change in movement.
The first IMU model of the project. Its configuration and scaler are kept at the repository root for reference; its ONNX export is no longer published here.
(raw - mean) / scale from the root scaler.npz.| Metric | Value |
|---|---|
| Training / validation / test windows | 8,295 / 929 / 928 |
| Best epoch | 25 |
| Best validation MSE | 0.4346 |
| Test MSE | 0.3406 |
| Training-mean baseline test MSE | 1.0112 |
For comparison, the convolutional models with latent sizes 32 and 16 reached a test MSE of 0.369 and 0.457 on the same reconstruction task.
Install numpy, pandas, onnxruntime and huggingface_hub, then run:
import json
from pathlib import Path
import numpy as np
import pandas as pd
import onnxruntime as ort
from huggingface_hub import snapshot_download
folder = Path(snapshot_download(
"iaac-maai/hackathon-team3-movement-strain-ae",
allow_patterns=["imu/model.onnx", "imu/config.json", "imu/scaler.npz"],
)) / "imu"
config = json.loads((folder / "config.json").read_text())
scaler = np.load(folder / "scaler.npz")
frame = pd.read_csv("your_imu_recording.csv")
raw = frame[config["features"]].iloc[:config["window"]].to_numpy(dtype=np.float32)
assert raw.shape == (200, 18) and np.isfinite(raw).all()
x = ((raw - scaler["mean"]) / scaler["std"])[None].astype(np.float32)
session = ort.InferenceSession(str(folder / "model.onnx"),
providers=["CPUExecutionProvider"])
(reconstruction,) = session.run(["reconstruction"], {"sensor_window": x})
score = float(np.mean((x - reconstruction) ** 2))
print("Anomaly score:", score, "| flagged:", score > config["anomaly_threshold"])
For the pose model, download the keypoint/ files instead and apply the preprocessing described in keypoint/config.json; compare the score with threshold_mse.
The FastAPI model server downloads this repository and loads imu/ for sensor CSV files and keypoint/ for pose windows. Keep the ONNX file, scaler and configuration together when publishing a new revision. The React app and Cloudflare Worker provide the user interface.
Dataset: VTT-ConIoT, with 207 IMU recordings from 13 participants performing up to 16 construction-related activities. Participants are separated across splits, and channel scaling is fitted on training participants only. Random seed: 42.
For educational research, sensor and pose reconstruction, and experimental anomaly detection. A high reconstruction error can reflect unfamiliar movements, sensor noise, occlusion or distribution shift; it does not establish unsafe posture, fatigue, pain or injury. These models do not detect PPE or produce RULA/REBA scores. They were evaluated on only two held-out workers, and the thresholds are dataset-specific. Do not use them as a standalone worker safety or medical assessment.
This repository hosts model files only; it does not deploy an application or an inference endpoint.
Model repository license: MIT. The original dataset is licensed separately; consult its source record for reuse conditions. Raw dataset files are not included here.
keypoint/model.onnx 2 MBmodel.onnx 2 MBimu/model.onnx 664.8 kBimu/notebook_conv1d32/model.onnx 664.8 kBimu/notebook_conv1d32/scaler.npz 2 kBimu/scaler.npz 2 kBkeypoint/scaler.npz 0.8 kBscaler.npz 0.6 kB