This project provides a visualizer for the MIT-BIH Arrhythmia Database, allowing users to view ECG signal data alongside their respective annotations. The tool offers interactive data exploration, including statistical summaries, annotation distributions, and plots of signals with annotation markers.
- ECG Signal Visualization: View ECG signals with annotations from the MIT-BIH Arrhythmia Database.
- Interactive Graphs: Display signal traces, annotation distribution (bar chart, pie chart), and time-series signals with annotation markers.
- Detailed Statistics: Analyze the number and types of annotations, including beat and non-beat annotations.
- Download the Database: Download the MIT-BIH Arrhythmia Database to access the ECG signals and annotations.
- Download to a folder
- ECG Signal Visualization
Ensure that Python 3.7+ is installed on your system. You will also need to install the required dependencies.
-
Clone the repository:
git clone git@github.com:MateusjsSilva/MIT-BIH-Arrhythmia-DB-Visualizer.git cd MIT-BIH-Arrhythmia-DB-Visualizer
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required Python packages:
pip install -r requirements.txt
-
Prepare the MIT-BIH Arrhythmia Database files:
- Place your
.dat
,.hea
, and.atr
files from the MIT-BIH Arrhythmia Database into a directory (e.g.,./data/mit-bih-arrhythmia-database
).
- Place your
-
Launch the Streamlit application:
streamlit run .\src\visualizer.py
-
You will be prompted to enter the path where your MIT-BIH files are located and then select a record to visualize.
Once the visualizer is running, you can interact with the following features:
- Signal Overview: View detailed information about the signals in the selected record, including frequency, units, and available comments.
- Annotations: See all annotations in the record, with counts of beat and non-beat annotations and their corresponding definitions.
- Statistics: Graphical breakdown of annotation counts and percentages, displayed in bar and pie charts.
- Signal Plotting: Select a specific signal from the record and visualize it alongside its annotations.
Feel free to open issues or submit pull requests. All contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.