Dumpers/ecg-image-classifier
0
ECG Image-Based Arrhythmia Classifier
Classifies ECG images into three categories using MobileNetV2, and shows which parts of the image influenced the prediction using Grad-CAM.
Classes
- Abnormal Heartbeat
- History of Myocardial Infarction
- Normal Person
Results
Four pretrained CNN models were compared using 5-fold stratified cross-validation on a dataset of 707 ECG images.
MobileNetV2 performed best and is used in the demo.
Running locally
Install dependencies:
pip install -r requirements.txtTrain the model and save weights:
python train_and_save.pyLaunch the app:
python app.pyDataset
The dataset is not included in this repository due to size. Place the ECG Dataset 2 folder in the project root before training. The folder should contain three subfolders matching the class names above.
