Skip to main content

AI-powered ECG/EKG signal processing and arrhythmia detection library

Project description

HeartAI 🫀

Python License Status

heartai is a Python library designed to process ECG/EKG (electrocardiogram) signals and provide AI-powered predictions for potential arrhythmia risks. It is aimed at researchers, healthcare data scientists, and developers who want to experiment with biosignal processing and lightweight machine learning models in the medical domain.

🛠 Features

📊 ECG Signal Processing

  • Load ECG data from .csv, .txt, or standard formats
  • Apply noise filtering (Butterworth, band-pass, etc.)
  • Normalize and segment signals for analysis

🤖 AI/ML Prediction

  • Pre-trained lightweight ML model for arrhythmia detection
  • Binary classification: Normal rhythm vs Potential arrhythmia
  • Option to train on custom datasets

📈 Visualization Tools

  • Plot ECG waveforms (P-QRS-T cycles)
  • Highlight detected anomalies

🔌 Extensible

  • Easy integration with healthcare IoT devices and research pipelines
  • Modular design for custom ML models

🚀 Quick Start

Installation

pip install heartai

Command Line Usage

# Predict arrhythmia risk from ECG data
heartai predict ecg_data.csv

Python API Usage

from heartai import ECGAnalyzer

# Load and analyze ECG data
analyzer = ECGAnalyzer("ecg_data.csv")
analyzer.preprocess()
prediction = analyzer.predict()

print("Prediction:", prediction)

Output example:

Prediction: Potential arrhythmia detected (confidence: 87%)

📋 Requirements

  • Python 3.8+
  • NumPy, SciPy, Pandas
  • Scikit-learn
  • Matplotlib, Seaborn

🎯 Roadmap (2025 Vision)

  • Support for real-time ECG streaming
  • Integration with wearable devices (Apple Watch, Fitbit, etc.)
  • Deep learning models for multi-class arrhythmia classification
  • REST API & FastAPI microservice deployment

Documentation

For detailed documentation, examples, and API reference, visit our GitHub repository.

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

This library is for research and educational purposes only. It is not intended for clinical diagnosis or medical decision-making. Always consult with qualified healthcare professionals for medical advice.

📧 Contact


Made with ❤️ for the healthcare research community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heartai-0.1.0.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heartai-0.1.0-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file heartai-0.1.0.tar.gz.

File metadata

  • Download URL: heartai-0.1.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for heartai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 279ebe7099e7f031cd847fe5d0543f18ad6984b11c7a14f7954e91cb389193bf
MD5 51d2a1f62f564e04e54530fb8b3f0136
BLAKE2b-256 16db9036adb82ee86cfa58d5133f6b67b9627feb07c097da03505a433b0ef570

See more details on using hashes here.

File details

Details for the file heartai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: heartai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for heartai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6124b424eb3656bd0eabc29d9d4cff4d6251adf4db1f8b914916848b476a346a
MD5 9c18f3b29ff15b91889cda9056e242f5
BLAKE2b-256 9e3f1bb56d154b0dddb4933fe3771f93d047967caedf3a0e979dbe8c1cac9065

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page