This is a public Edge Impulse project, use the navigation bar to see all data and models in this project; or clone to retrain or deploy to any edge device.
Valve MIMII Balanced Subset
About this project
Valve MIMII \ Balanced Subset
This project uses a smaller, deliberately class-balanced subset of the valve machine type from the MIMII industrial sound dataset, recorded at -6dB SNR, the noisiest of the available signal-to-noise conditions, meant to simulate a realistic, noisy factory floor. The source recordings cover four physical valve units (id_00, id_02, id_04, id_06), each with normal and abnormal operating sounds, 10 seconds long, 16kHz, reduced to a single channel. This project contains 955 samples in total, a curated selection rather than the full dataset.
Why a smaller, balanced dataset
Before building this, I'd already uploaded the complete, unfiltered valve dataset (4,170 samples) to a separate project and trained a strong model on it, but two problems came with that. First, training took a long time given the dataset's size. Second, and more importantly, the data was naturally imbalanced, normal samples outnumbered abnormal ones roughly 8 to 1 across the four valve units, something I'd confirmed during an earlier exploratory analysis in Colab. Rather than relying purely on automatic class weighting to correct for that imbalance during training, I decided to build a second project on a smaller, explicitly balanced dataset, addressing both the training time and the imbalance in one move.
How I built the balanced selection
I kept every single abnormal clip, since those are the rarer and more valuable examples for the model to learn from, and randomly sampled a matching number of normal clips to go with them. I sampled separately for each of the four machine IDs rather than pooling all four together first, since pooling could easily under-represent one machine, id_02 only has 708 normal clips to begin with, compared to over 1,000 for the others, so sampling within each ID individually guaranteed all four valve units stayed represented in the final set. I also kept the selection completely random rather than hand-picking which normal clips looked cleanest or most typical, since curating them that way would have quietly made the normal class easier to distinguish than it actually is in practice, random undersampling doesn't introduce that kind of bias.
What I already knew going in
The same EDA that motivated the rebalancing also told me what to expect from the model itself. The real difference between normal and abnormal valve sounds is the strength of the click each time the valve opens or closes, abnormal clicks run roughly half the amplitude of normal ones, not a difference in pitch or overall loudness. Simple statistics like RMS and zero-crossing rate didn't separate the classes cleanly when I checked them, so this was never going to be solvable with a simple rule, the model needed to actually learn fine-grained time and frequency detail.
Window size experiment
I re-ran the same window size comparison I'd done on the full dataset, to check the result wasn't a coincidence tied to that specific project. A 5000ms window reached 98.6% validation accuracy and 97.0% test accuracy here, consistent with the full-dataset result, confirming the window size itself was doing the real work rather than something specific to how much data or which split I'd used. I also tried a 4000ms window out of curiosity, to see whether a slightly shorter window, and the resulting change in overlap between consecutive frames, would change anything. That came out at 94.1% validation and 91.4% test, a solid result but clearly a step down from 5000ms, so I kept 5000ms as the better choice.
What this project is for
This is the version of the valve model I'd point to if training time or class balance matters more than working from the complete dataset, a smaller, faster, and more balanced alternative to the full unbalanced project that lands at essentially the same accuracy.
Run this model
Dataset summary
Data collected
2h 39m 10sSensor
audio @ 16KHzLabels
abnormal, normalProject info
| Project ID | 1056452 |
| License | 3-Clause BSD |
| No. of views | 585 |
| No. of clones | 0 |