LRF-IMU latent Rectified Flow generation of wearable IMU signals

LRF-IMU

Fold-specific VAE and latent Rectified Flow checkpoints for synthetic wearable IMU generation

Paper DOI GitHub code REALDISP dataset

A latent rectified flow approach to generate synthetic wearable data – a LABDA solution
Amin Rezaei · Morten Kjærgaard · Jasper Schipperijn
\ Machine Learning: Health (2026) Β· DOI: 10.1088/3049-477X/ae91ef

πŸ€— LRF-IMU checkpoints

This model repository hosts the fold-specific VAE and latent Rectified Flow checkpoint pairs for class-conditioned synthetic wearable IMU generation.

The accompanying GitHub repository contains the training, generation, evaluation, analysis, and reproducibility code.

These weights accompany the published paper:

Code: github.com/aminsens/LRF-IMU

Used Dataset: REALDISP Activity Recognition Dataset β€” UCI Machine Learning Repository

πŸ”₯ Timeline

  • 2026-08-11 β€” Fold-specific checkpoint pairs are available for the six-channel and separately trained accelerometer-only models.
  • 2026-07-29 β€” Accepted Manuscript became available online in Machine Learning: Health.
  • 2026-06-29 β€” Paper accepted for publication in Machine Learning: Health.
  • 2026-06-08 β€” R2 revision submitted (MLHEALTH-100129.R2).
  • 2026-05-26 β€” R2 revision requested.
  • 2026-05-11 β€” R1 revision submitted (MLHEALTH-100129.R1).
  • 2026-04-13 β€” R1 revision requested.
  • 2025-12-31 β€” Initial manuscript submitted to Machine Learning: Health.

🧠 Model overview

LRF-IMU combines a variational autoencoder (VAE) with a class-conditioned Rectified Flow model. The VAE maps a 3.2-second IMU window to a compact latent representation. Rectified Flow transports Gaussian noise to an activity-conditioned latent, and the frozen VAE decoder maps that latent back to a time-domain sensor window.

activity class + Gaussian noise
              ↓
class-conditioned Rectified Flow
      latent shape B Γ— 48 Γ— 40
              ↓
        frozen VAE decoder
              ↓
standardized IMU window B Γ— C Γ— 160
Specification Value
Dataset used for the study REALDISP, ideal-placement logs
Sensor location Right thigh
Sampling frequency 50 Hz
Native window 160 samples (3.2 s)
Hop used in the study 40 samples (0.8 s; 75% overlap)
Latent shape B Γ— 48 Γ— 40
Rectified Flow width 256 in the distributed historical checkpoints
Flow classes 4
Paper sampler 10 explicit reverse-Euler steps, noise at t=1 to data at t=0
Study protocol 12-fold leave-one-subject-out (LOSO)

Two independently trained sensor configurations are included:

Configuration Channels Signal shape Checkpoint pairs
six_channel ax, ay, az, gx, gy, gz B Γ— 6 Γ— 160 12
accelerometer_only ax, ay, az B Γ— 3 Γ— 160 12

The accelerometer-only model is not made by dropping gyroscope channels from a six-channel model at inference time. It has its own VAE and Rectified Flow weights.

πŸ“¦ REALDISP dataset

The checkpoints were trained and evaluated using the REALDISP Activity Recognition Dataset from the UCI Machine Learning Repository.

LRF-IMU uses the documented ideal-placement, right-thigh subset with 12 complete participants and four activity classes: walking, running, jump up, and cycling.

The REALDISP recordings themselves are not included in this Hugging Face repository. They can be obtained directly from UCI:

πŸ‘‰ Download / view REALDISP on the UCI Machine Learning Repository

The corresponding data-access and preprocessing assumptions are documented in DATA_ACCESS.md.

πŸ—‚οΈ Fold-specific checkpoints

Each directory contains one matched vae.pt and flow.pt pair:

checkpoints/
β”œβ”€β”€ six_channel/
β”‚   └── fold_XX/{vae.pt, flow.pt, manifest.json}
└── accelerometer_only/
    └── fold_XX/{vae.pt, flow.pt, manifest.json}

Available held-out folds are:

01, 02, 03, 05, 08, 09, 10, 11, 12, 13, 14, 16

A fold number names the REALDISP participant held out from model training. For example, fold_01 is the pair trained without participant 01 and intended for the participant-01 LOSO fold. There is no single global checkpoint in this collection. Choose the pair matching the held-out participant and never mix VAE and Flow files across sensors or folds.

Every pair was retained only after its SHA-256 hashes, sensor configuration, held-out fold, channel geometry, latent geometry, Flow width, and successful loader-generation record agreed. Exact hashes and byte sizes are in the adjacent manifest.json and the top-level model_index.json. The files were copied byte-for-byte; weights were not retrained, resaved, or converted.

πŸƒ Activity classes

Class ID Activity REALDISP activity code
0 walking 1
1 running 3
2 jump_up 4
3 cycling 33

πŸ“Š Reported paper results

The following are the paper-reported downstream macro-F1 results across the 12 LOSO folds (mean Β± sample SD):

Scenario 6-ch RF 3-ch RF 6-ch CNN 3-ch CNN
TRTR β€” full real training 0.985 Β± 0.021 0.980 Β± 0.027 1.000 Β± 0.000 0.957 Β± 0.083
Scarce β€” 2 real windows/class 0.400 Β± 0.088 0.467 Β± 0.082 0.340 Β± 0.190 0.441 Β± 0.202
TSTR β€” synthetic-only training 0.956 Β± 0.081 0.980 Β± 0.061 0.845 Β± 0.195 0.954 Β± 0.085
TSTR + scarce real data 0.951 Β± 0.087 0.979 Β± 0.061 0.858 Β± 0.145 0.969 Β± 0.058

The main six-channel Random Forest TSTR result retained approximately 97.1% of the full-real baseline.

The signal analyses reported no synthetic acceleration samples above 10g and a mean log-PSD correlation of approximately 0.966, while also identifying attenuation in the upper-frequency tail.

Privacy results apply only to the paper's stated membership-inference and reconstruction threat models; they do not establish a general anonymization guarantee.

πŸ’Ώ Installation

Python 3.10 or newer is supported. Install the model implementation from GitHub and the Hugging Face client:

python -m pip install "lrf-imu[training] @ git+https://github.com/aminsens/LRF-IMU.git"
python -m pip install huggingface_hub

For a local code checkout:

git clone https://github.com/aminsens/LRF-IMU.git
cd LRF-IMU
python -m pip install -e ".[training]"
python -m pip install huggingface_hub

πŸš€ Generate synthetic IMU

The included example downloads only model_index.json, the selected configuration, and the selected fold's manifest, VAE, and Flow files. It verifies SHA-256 hashes before loading the checkpoints through the validated lrf_imu API.

python examples/generate.py \
  --sensor six_channel \
  --fold 1 \
  --activity walking \
  --count 8 \
  --steps 10 \
  --seed 42 \
  --device cpu \
  --output walking_fold01.npz

For the separately trained accelerometer-only model:

python examples/generate.py \
  --sensor accelerometer_only \
  --fold 1 \
  --activity cycling \
  --count 8 \
  --output cycling_acc_fold01.npz

The NPZ contains samples with shape [count, channels, 160] and integer labels. A neighboring .metadata.json records the selected fold, activity, seed, solver steps, checkpoint hashes, output hash, and coordinate system.

The decoder output is in training-standardized VAE signal space. These values are not physical m/sΒ² or rad/s until the matching fold's training-only normalization statistics are applied inversely. Those participant-derived statistics are not contained in this model repository. Do not assign physical units directly to the raw generated array.

To download one pair without the example:

hf download Aminrezaei/LRF-IMU \
  model_index.json \
  configs/six_channel_160_40.yaml \
  checkpoints/six_channel/fold_01/manifest.json \
  checkpoints/six_channel/fold_01/vae.pt \
  checkpoints/six_channel/fold_01/flow.pt \
  --local-dir lrf-imu-fold01

πŸ”¬ Data and reproducibility

REALDISP recordings are not included. Obtain the original dataset from the UCI Machine Learning Repository and follow the data-access instructions in DATA_ACCESS.md.

The study used ideal-placement logs, the right-thigh sensor, participants 1, 2, 3, 5, 8, 9, 10, 11, 12, 13, 14, and 16, and activity codes 1, 3, 4, and 33. Normalization is fit only on the training participants for each LOSO fold.

The code repository contains checkpoint-safe loaders, the exact source-compatible VAE and Flow model geometry, the 10-step paper generation profile, evaluation commands, reproducibility instructions, and documented result comparisons. Use model_index.json and each fold manifest to verify all downloaded bytes before execution.

⚠️ Limitations

  • exact_paper_reproduction=false: manuscript and historical implementation evidence disagree on some training settings, including a Flow width-128 description versus the width-256 historical checkpoints distributed here.
  • The 3-channel preprocessing path in the repository code is an explicit reconstruction paired with separately trained historical 3-channel models; it is strong empirical compatibility evidence, not proof of the unavailable historical parser lineage.
  • Same-seed generation is deterministic within a fixed runtime/device path, but CPU and CUDA outputs need not be bitwise identical.
  • Checkpoints are specific to the documented REALDISP cohort, sensor placement, activities, sampling rate, and windowing scheme. Performance must not be assumed to transfer unchanged to other populations, placements, devices, activities, or clinical settings.
  • Synthetic data are not automatically anonymous. The reported privacy analyses cover specific threat models and do not provide a universal privacy guarantee.
  • The models are research artifacts and are not validated for diagnosis, treatment, safety-critical decisions, or unsupervised clinical deployment.

πŸ“ Citation

If you use these checkpoints, please cite the associated paper:

@article{rezaei2026lrfimu,
  title     = {A latent rectified flow approach to generate synthetic wearable data -- a LABDA solution},
  author    = {Rezaei, Amin and Kjærgaard, Morten and Schipperijn, Jasper},
  journal   = {Machine Learning: Health},
  year      = {2026},
  doi       = {10.1088/3049-477X/ae91ef},
  publisher = {IOP Publishing}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support