This project implements an Electrocardiogram (ECG) detection system using deep learning techniques. The system is designed to identify specific patterns in ECG signals associated with various cardiac conditions.
The core of the system consists of a custom Deep Learning model called ECGDETR, which utilizes a set of Convolutional Neural Networks (CNNs) to process ECG data and make predictions.
- ECG Data Processing: The system preprocesses raw ECG data to extract relevant features for detection.
- Multiple CNN Models: ECGDETR incorporates multiple CNN models, each trained to detect specific cardiac abnormalities.
- Training and Validation: The system supports training and validation of the models using labeled ECG datasets.
- Performance Evaluation: Provides tools for evaluating model performance, including accuracy, sensitivity, specificity, and F1 score.
- Visualization: Includes functions for plotting training curves, confusion matrices, and other performance metrics.
- The trained models have an average of 95% accuracy in detecting anomalies as a result of the connection.
-
Clone the repository to your local machine:
git clone https://github.com/SashaDz4/ECG_Detection.git
-
Create a conda environment from the provided environment.yml file:
conda env create -f environment.yml
-
Activate the created environment:
conda activate ECG
-
Prepare your ECG data and ensure it is in a compatible format.
-
To detect anomalies in your ECG data, use the
run.py
script. Specify the path to the file containing your ECG data as a command-line argument. The file can be in different formats. For example:python run.py --data_path data/ecg_data.csv
The script will process the ECG data and generate a file indicating possible places where there are anomalies.
-
Explore the generated file to identify and analyze potential anomalies in the ECG data.
-
Optionally, you can visualize the results using the provided visualization tools. For example, to plot the detected anomalies.
Contributions are welcome! If you have any suggestions, bug fixes, or feature implementations, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- This project was inspired by the need for accurate and efficient ECG detection systems in clinical practice.
- We would like to thank the contributors and open-source community for their valuable contributions.