← Projects

Respiratory Sound Classification and an Audit of How We Evaluate It

2026 · Co-author · MobileNetV2, ICBHI 2017 · Course project

A doctor listening to a chest for crackles and wheezes is doing something hard. Heartbeats and background noise cover the sounds that matter, and physicians often describe the same breath differently. The ICBHI 2017 lung sound dataset is the usual place to start automating it. For CSE465 in Summer 2026, our team of four set out to classify its breathing cycles as normal, crackle, wheeze or both.

We turned each cycle into a log-scaled spectrogram and trained a handful of image models on it. My share was the model training, the physician benchmark and a modified loss. I trained the lightweight MobileNetV2, and it did better than any of the vision transformers my teammates trained, even though the largest of them is many times its size. That biggest transformer collapsed to predicting Normal for almost everything, which scores well on raw accuracy only because most cycles are normal.

I also designed a modified loss, a physics-informed auxiliary term added to the usual classification loss. It gave the highest scores of any experiment we ran, but those runs used an older train and test split that we later found was invalid, so I can’t rank them against the corrected results.

That split turned out to be the real story. We found five faults in our own evaluation. One was that the dataset’s official split assigns recordings rather than patients, so two patients appear on both sides of it. Another was a fallback that had quietly scored us on a much smaller test set than we thought, and a third was how we chose which checkpoint to keep. Once they were fixed, the same model went from 0.71 to 0.56. The patient leak itself explains very little of that drop, but it is the flaw none of the papers we read mention.

Row-normalised confusion matrix for Normal, Crackle, Wheeze and Both on the corrected test split
The best model on the corrected split. Wheeze and Both are where it struggles most.

The physician benchmark asked how good the labels are. One physician labelled a set of clips blind, with repeated clips hidden in the set to check his own consistency. His crackle sensitivity against the dataset labels matched a published seven-physician study almost exactly, and his agreement on crackles was low. Many of our model’s errors were also crackle against wheeze, so part of the ceiling comes from the labels, not only the network.

We then ran the best model unchanged on two other datasets, SPRSound and HF Lung V1. It failed to beat a baseline that calls every cycle Normal. A simple probe on its frozen features did much better on SPRSound, so the learned representation travelled even though the decision boundary did not. Its confidence also rose as its accuracy fell, the wrong way round for anything clinical. Grad-CAM added a caution of its own: with a wheeze present, the model attended less to the wheeze frequency band than without one.

Grid of spectrograms beside their Grad-CAM and occlusion maps, one row per test cycle
Attribution panels: each row is one test cycle, shown as a spectrogram, a Grad-CAM map and an occlusion map.

None of this is clinical validation, and the physician study used a single rater. What I value most is the habit it built: fix the test before trusting the score.

Status: CSE465 course project, Summer 2026, North South University, with Barshon Basak, Sami Uddin and Farhana Rahman.