Metadata-Version: 2.4
Name: heartai
Version: 0.1.0
Summary: AI-powered ECG/EKG signal processing and arrhythmia detection library
Home-page: https://github.com/ahmetxhero/AhmetX-HeartAi.git
Author: AhmetXHero
Author-email: AhmetXHero <ahmetxhero@gmail.com>
License: MIT License
        
        Copyright (c) 2025 AhmetXHero
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/ahmetxhero/AhmetX-HeartAi
Project-URL: Bug Reports, https://github.com/ahmetxhero/AhmetX-HeartAi/issues
Project-URL: Source, https://github.com/ahmetxhero/AhmetX-HeartAi
Keywords: ecg,ekg,arrhythmia,detection,machine-learning,healthcare,biosignal
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: joblib>=1.1.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: seaborn>=0.11.0
Requires-Dist: click>=8.0.0
Requires-Dist: rich>=12.0.0
Requires-Dist: pydantic>=1.8.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# HeartAI 🫀

[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Status](https://img.shields.io/badge/status-alpha-orange.svg)](https://github.com/ahmetxhero/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

```bash
pip install heartai
```

### Command Line Usage

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

### Python API Usage

```python
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](https://github.com/ahmetxhero/AhmetX-HeartAi).

## Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.

## License

This project is licensed under the MIT License - see the [LICENSE](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](https://github.com/ahmetxhero/AhmetX-HeartAi)
- Email: ahmetxhero@gmail.com

---

Made with ❤️ for the healthcare research community
