| tags: | |
| - ecg | |
| - multi-label-classification | |
| - medical | |
| - cardiology | |
| library_name: tensorflow | |
| # ECG Multi-Label Classification Model | |
| This model performs multi-label classification on ECG signals to detect: | |
| - Myocarditis | |
| - Cardiomyopathy | |
| - Kawasaki Disease | |
| - Congenital Heart Disease (CHD) | |
| - Healthy | |
| ## Model Architecture | |
| - 1D CNN with 4 convolutional blocks | |
| - Input: 12-lead ECG (5000 samples × 12 leads) | |
| - Output: 5 sigmoid outputs (multi-label) | |
| ## Training | |
| - Framework: TensorFlow/Keras | |
| - Optimizer: Adam | |
| - Loss: Binary Crossentropy | |
| - Dataset: Pediatric ECG database | |
| ## Usage | |
| ```python | |
| import tensorflow as tf | |
| from huggingface_hub import hf_hub_download | |
| # Download model | |
| model_path = hf_hub_download( | |
| repo_id="Neural-Network-Project/ECG-models", | |
| filename="checkpoint_final.keras" | |
| ) | |
| # Load model | |
| model = tf.keras.models.load_model(model_path) | |
| # Predict (input shape: [batch_size, 5000, 12]) | |
| predictions = model.predict(ecg_data) | |
| ``` | |
| ## Classes | |
| 0. Myocarditis | |
| 1. Cardiomyopathy | |
| 2. Kawasaki Disease | |
| 3. CHD | |
| 4. Healthy | |
| ## Citation | |
| Please cite this model if you use it in your research. | |