RobustLungAI AST
Respiratory sound classification using Audio Spectrogram Transformers (AST).
RobustLungAI is an MSc research project exploring respiratory sound classification and robustness to noise and recording-device differences.
Research and educational use only. This model is not clinically validated and must not be used for medical diagnosis.
Model details
- Architecture: Audio Spectrogram Transformer (AST)
- Base model: MIT AST AudioSet
- Framework: PyTorch and Hugging Face Transformers
- Classes: Normal, crackle, wheeze, both
- Checkpoint:
ast_lung_fp16.pt
Preprocessing
- Sampling rate: 16 kHz
- Target audio duration: 8 seconds
- Mel frequency bins: 128
Use the preprocessing and checkpoint-loading code provided in the demo notebook to ensure compatibility.
Evaluation
On the project's internal patient-level 70/15/15 split, the recorded AST cross-entropy results were:
| Split | Sensitivity | Specificity | ICBHI score |
|---|---|---|---|
| Validation | 67.45% | 74.51% | 70.98% |
| Test | 56.51% | 76.87% | 66.69% |
These are recorded project results, not independently verified benchmarks. The split is not the official ICBHI challenge protocol.
How to run
Open notebooks/05b_gradio_demo.ipynb in Google Colab, replace the placeholder with your actual GitHub repository URL, and run the notebook cells. The notebook downloads the checkpoint and launches the Gradio interface.
There is no permanent hosted demo.
Limitations
Performance may vary with recording conditions, noise, and dataset distribution. Model predictions and interpretability visualizations are not clinical evidence or proof of causal reasoning.