YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
rotating-anomaly-detector
1-D convolutional autoencoder for unsupervised anomaly detection on rolling-bearing vibration signals. Trained on healthy-only data; windows the model cannot reconstruct (high reconstruction MSE) are flagged as anomalous.
Model
ConvAutoencoder (PyTorch): 3 Γ (Conv1d stride-2 + ReLU) encoder β 32-d
latent vector β mirrored transposed-convolution decoder. ~1.1M parameters
(see model.py). Input: 2048-sample windows, per-window z-normalised.
Results (reproduced locally on CPU)
Trained on NORMAL-ONLY windows (CWRU 98.mat, drive-end, first 80% of the
signal, stride-512 windows β 753 windows; 50 epochs, Adam 1e-3, ~13 min CPU).
The alarm threshold (0.3397) is the 95th percentile of the normal
validation scores β fixed before any fault window was seen. Tested on
held-out normal windows (23) + all 9 fault files (2081 windows).
| Metric | Value |
|---|---|
| AUROC (normal vs fault windows) | 1.000 |
| Precision @ threshold | 0.9995 |
| Recall @ threshold | 1.000 |
| F1 @ threshold | 0.9998 |
Per fault condition, recall at the fixed threshold: 100% for all nine (ball / inner-race / outer-race Γ 0.007" / 0.014" / 0.021"). Mean fault scores are 2.8β3.3Γ the normal mean. The one imperfection: 1 of 23 healthy test windows trips the threshold (β4% false-alarm rate, as designed by the 95th-percentile rule).
Usage
from model import load_model, anomaly_score
model = load_model("pytorch_model.bin", device="cpu")
scores = anomaly_score(model, signal) # per-window reconstruction errors
threshold = 0.3397 # from config.json
flagged = scores >= threshold
print(f"{100*flagged.mean():.1f}% of windows above threshold")
See config.json for hyperparameters, the threshold, and the exact
preprocessing/train protocol.
Dataset
Case Western Reserve University Bearing Data Center, 48 kHz drive-end
recordings (1 HP load, ~1772 rpm). Ten conditions: healthy (98.mat) plus
seeded ball / inner-race / outer-race faults at three severities.
Limitations (read before deploying)
- CWRU faults are seeded (EDM-drilled) defects on a single test rig, one load, one speed β not naturally evolving field faults.
- Trained on one operating condition; a speed/load change shifts the vibration signature and needs re-validation (or domain adaptation).
- The 95th-percentile rule bakes in β5% false alarms on healthy data; in production add a persistence filter (e.g. alarm only after K consecutive flagged windows).
- Threshold estimated from a small normal validation set (23 windows).
- Downloads last month
- 13