Update README.md
Browse files---
license: mit
language:
- id
- en
tags:
- audio-classification
- heart-sound
- medical
- cnn-lstm
- health
pipeline_tag: audio-classification
---
# SIRAJA Heart Sound Classifier
**CNN-LSTM model for heart sound classification** · 98.3% accuracy
Classifies heart sounds into three categories: Normal, Murmur, or Artifact.
---
## 🎯 Model Description
SIRAJA is a hybrid CNN-LSTM deep learning model trained to classify heart sounds from auscultation recordings. The model analyzes MFCC features extracted from audio signals to detect:
- **Normal** — Regular heart rhythm with clear S1/S2 sounds
- **Murmur** — Turbulent blood flow indicating potential valve issues
- **Artifact** — Noise/interference in the recording
---
## 📊 Performance
| Metric | Score |
|--------|-------|
| Test Accuracy | **98.30%** |
| Validation Accuracy | **98.86%** |
**Per-Class Results:**
| Class | Precision | Recall | F1-Score |
|-------|-----------|--------|----------|
| Artifact | 100.00% | 100.00% | 100.00% |
| Murmur | 97.37% | 94.87% | 96.10% |
| Normal | 98.41% | 99.20% | 98.80% |
---
## 🏗️ Architecture
```
Audio → MFCC (52 coefficients) → CNN → LSTM → Classification
```
**Specifications:**
- Input: 10-second audio clips
- Sample Rate: 22050 Hz
- Features: 52 MFCC coefficients
- Parameters: 14.1M
- Framework: TensorFlow/Keras
---
## 📦 Usage
### Installation
```bash
pip install tensorflow librosa numpy
```
### Inference
```python
import tensorflow as tf
import librosa
import numpy as np
# Load model
model = tf.keras.models.load_model('heart_sound_classifier.h5')
# Load and preprocess audio
audio, sr = librosa.load('heart_sound.wav', sr=22050, duration=10)
# Extract MFCC features
mfcc = librosa.feature.mfcc(y=audio, sr=sr, n_mfcc=52, n_fft=2048, hop_length=512)
mfcc_mean = np.mean(mfcc.T, axis=0).reshape(1, -1, 1)
# Predict
prediction = model.predict(mfcc_mean)
classes = ['Artifact', 'Murmur', 'Normal']
result = classes[np.argmax(prediction)]
print(f"Prediction: {result} ({prediction[0][np.argmax(prediction)]:.2%})")
```
### Web Application
Full-featured Streamlit app available at: [github.com/mdprana/SIRAJA](https://github.com/mdprana/SIRAJA)
```bash
pip install streamlit huggingface_hub
streamlit run app.py
```
---
## 🎵 Training Data
**Dataset:** PASCAL Challenge 2011 Heart Sound Classification
- Source: [Kaggle - Heartbeat Sounds](https://www.kaggle.com/datasets/kinguistics/heartbeat-sounds)
- Samples: 1,755 (after 3x augmentation)
- Split: 80% train / 10% validation / 10% test
- Augmentation: Time stretching (0.8x, 1.2x)
---
## 🔧 Training Details
- **Optimizer:** Adam (lr=0.0001)
- **Loss:** Categorical Crossentropy
- **Class Weighting:** Artifact (4.88x), Murmur (1.51x), Normal (0.47x)
- **Regularization:** Dropout 50%
- **Callbacks:** Early stopping, LR scheduling
- **Epochs:** 118
---
## ⚕️ Medical Disclaimer
**Important:** This model is for screening purposes only and is **not a diagnostic tool**.
- AI predictions are not medical diagnoses
- Always consult qualified healthcare professionals
- Not a replacement for clinical examination
- For research and educational use
---
## 📄 License
MIT License — Free for research and commercial use
---
## 👥 Authors
**Kelompok 3 - Universitas Udayana**
- Made Pranajaya Dibyacita (2208561122)
- I Made Sastra Wiguna (2208561121)
- Intara Pratama Harahap (2208561104)
---
## 🔗 Links
- **GitHub:** [mdprana/SIRAJA](https://github.com/mdprana/SIRAJA)
- **Dataset:** [Kaggle - Heartbeat Sounds](https://www.kaggle.com/datasets/kinguistics/heartbeat-sounds)
- **Paper:** PASCAL Challenge 2011
---
## 📊 Model Files
- `heart_sound_classifier.h5` (161.76 MB) — Trained model weights
- `model_config.json` — Model configuration
---
## 🙏 Citation
If you use this model in your research, please cite:
```bibtex
@misc {siraja2025,
title={SIRAJA: Heart Sound Classification using CNN-LSTM},
author={Dibyacita, Made Pranajaya and Wiguna, I Made Sastra and Harahap, Intara Pratama},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/mdprana/siraja}}
}
```
|
@@ -1,3 +1,18 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- id
|
| 5 |
+
- en
|
| 6 |
+
metrics:
|
| 7 |
+
- accuracy
|
| 8 |
+
base_model:
|
| 9 |
+
- mdprana/siraja
|
| 10 |
+
pipeline_tag: audio-classification
|
| 11 |
+
library_name: keras
|
| 12 |
+
tags:
|
| 13 |
+
- audio-classification
|
| 14 |
+
- heart-sound
|
| 15 |
+
- medical
|
| 16 |
+
- cnn-lstm
|
| 17 |
+
- health
|
| 18 |
+
---
|