HeartAI 🫀
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
- GitHub: AhmetX-HeartAi
- Email: ahmetxhero@gmail.com
Made with ❤️ for the healthcare research community
Metadata
Release files for heartai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| heartai-0.1.0.tar.gz | 36.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| heartai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.4 kB
Release files / heartai-0.1.0.tar.gz
| Download URL | heartai-0.1.0.tar.gz |
|---|---|
| Size | 36.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
279ebe7099e7f031cd847fe5d0543f18ad6984b11c7a14f7954e91cb389193bf
|
|
BLAKE2b-256 checksum How to use checksums |
16db9036adb82ee86cfa58d5133f6b67b9627feb07c097da03505a433b0ef570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / heartai-0.1.0-py3-none-any.whl
| Download URL | heartai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6124b424eb3656bd0eabc29d9d4cff4d6251adf4db1f8b914916848b476a346a
|
|
BLAKE2b-256 checksum How to use checksums |
9e3f1bb56d154b0dddb4933fe3771f93d047967caedf3a0e979dbe8c1cac9065
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for heartai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.