This repository provides tools for [💼ECG analysis], including an interactive Gradio web interface and a unified test suite for verifying model performance across multiple tasks (Classification, Detection, Forecasting, Generation).
Ensure you have the required Python packages installed:
pip install gradio wfdb torch pandas numpy matplotlib scipy scikit-learn omegaconf hydra-core- Inference: CPU or any CUDA-capable GPU (VRAM > 2GB).
- Training: NVIDIA GPU with VRAM > 6GB recommended (tested on RTX 3090).
- Introduce visualization interface for model training process.
The Gradio app provides a user-friendly interface to visualize ECG signals, crop segments, and run analysis tasks.
-
Start the application:
python gradio_app.py
-
Access the interface:
- Open your web browser and go to:
http://localhost:7860(or the URL provided in the terminal).
- Open your web browser and go to:
- Upload: Drag and drop your
.datand.heafiles (must be paired) into the upload box. - Load: Click "Load & Preprocess". The signal will be resampled to 100Hz and displayed.
- Select: Use the "Start Index" slider to choose a 500-point window. The selected red region will update on the chart.
- Analyze: Select a task (e.g., Classification) from the dropdown and click "Analyze Selected Segment".
- View Results: The result visualization and text info will appear on the right. You can also download the result CSV.
The unified test script verifies the functionality of all 4 tasks using a standard test file and generates a report.
Execute the test script:
python unified_test.py- Console: Logs of the loading and inference process.
- Report: A
test_report.mdfile summarizing the results. - Visualization: A
visualization.pngimage showing the signal processing steps.
The model weights used by these applications are stored in model_weights_backup/.
Refer to MANIFEST.md for details on the source checkpoints and configurations.
If you find this repo helpful, please cite our paper:
@inproceedings{tang2025comprehensive,
title={A Comprehensive Benchmark for Electrocardiogram Time-Series},
author={Tang, Zhijiang and Qi, Jiaxin and Zheng, Yuhua and Huang, Jianqiang},
booktitle={Proceedings of the 33rd ACM International Conference on Multimedia},
pages={6490--6499},
year={2025}
}