Inspiration
The Global Cardiac Health Crisis
Every year, cardiovascular diseases (CVDs) claim approximately 17.9 million lives – making them the #1 leading cause of death worldwide, accounting for 31% of all global deaths. But the statistics get even more alarming:
1.12+ Billion People currently suffer from cardiovascular diseases globally.
One person dies every 2-3 seconds from a heart-related condition somewhere in the world.
20.5Million annual deaths from CVDs, with 85% occurring in low and middle-income countries.
80% of heart attacks and strokes are preventable through early detection and lifestyle changes.
Only 36% of cardiac patients get diagnosed in the early, treatable stages.
Healthcare costs: CVDs cost the global economy $1 trillion annually in healthcare services and lost productivity.
Economic barriers: A single cardiac diagnostic scan costs $300-$5,000, out of reach for billions in poverty.
In a world where 1.12 billion people suffer from cardiovascular disease, and 80% of these deaths are preventable, the greatest tragedy isn't heart disease itself – it's the barriers that prevent people from knowing they have it. Kokoro exists to tear down those barriers.
What it does
Kokoro is a dual-model AI system that provides comprehensive cardiac health analysis through two complementary approaches:
Model 1: Heart Disease Risk Assessment
- Input: 15 patient health parameters (Age, Blood Pressure, Cholesterol, Heart Rate, etc.)
- Output:Cardiac risk percentage with binary classification (Disease/No Disease)
- Use Case: Quick preliminary screening in clinical settings
Model 2: ECG Condition Classification
-Input: 12-lead ECG image (standard medical format)
-Output: Classification into 4 cardiac conditions:
- Normal (No) - Healthy ECG
- HB - Heart Block
- MI - Myocardial Infarction (Heart Attack)
- PM - Pacemaker
- Technology: PCA + Deep Neural Network
How we built it
Tech Stack
-Deep Learning: PyTorch (Neural Networks)
-Data Processing: scikit-learn, pandas, numpy
-Image Processing: scikit-image (ECG image analysis)
-Frontend: Streamlit (Interactive web interface)
-Deployment: Google Colab + ngrok (Public URL access)
-Model Persistence: joblib (Model serialization)
Model Training
- Dataset: 7,500 samples
- Features: 15 (after one-hot encoding)
- Train-Test Split: 80-20
- Model: Binary Classifier (PyTorch)
- Optimization: Adam optimizer with BCE Loss
- Result: 80%+ accuracy on test set
ECG Classification Model
- Dataset: 1000+ 12-lead ECG images
- Image Processing:
- Grayscale conversion
- Gaussian filtering
- Otsu's thresholding
- Contour detection
- Feature extraction (255 features per lead × 12 leads)
- Dimensionality Reduction: PCA (3060 → 400 components)
- Result: Multi-class classification with confidence scores
- Image Processing:
Challenges we ran into
1. Environment & Installation Issues
-WFDB library installation kept failing with cryptic errors.
-Dependency conflicts with numpy/scipy versions
-Pip installation timeouts on slow connections
2. ECG Image Processing
-ECG images had non-standard coordinates across different datasets
-Lead extraction coordinates were inconsistent (300:600, 646:1135 hardcoded)
3. Feature Dimensionality
-Raw ECG features: 3060 dimensions (12 leads × 255 features each)
-Risk of overfitting with small dataset
Accomplishments that we're proud of
1.Dual-Model System
-Successfully integrated two completely different ML architectures:
-Tabular data classification (Binary Classifier)
-Image-based classification (PCA + Neural Network)
-Both models work seamlessly in one interface
2.Overcoming Technical Hurdles
-Solved WFDB installation issues by pivoting to alternative libraries.
-Reduced dimensionality from 3060 to 400 features without losing accuracy
-Achieved production-ready code despite multiple obstacles
3.Model Serialization & Loading
-Properly saved and loaded PyTorch models without compatibility issues.
-Implemented efficient caching for 10x faster load times
What we learned
1. Deep Learning Fundamentals
- PyTorch architecture design: Building efficient neural networks
-Dropout & regularization: Preventing overfitting with limited data
Activation functions: Understanding ReLU, Sigmoid, Softmax
Loss functions: Binary Cross-Entropy vs Multi-class classification
2. Problem-Solving -When one approach fails, pivot quickly (WFDB → scikit-image) -Start simple, then optimize (basic model → fine-tuned version) -Test assumptions early (validate data before complex processing)
What's next for Kokoro - Intelligent Cardiac Health Analysis
1. Advanced Models
-LSTM/RNN:Analyze ECG as time-series data instead of images.
-Attention Mechanisms: Highlight important ECG regions.
-Ensemble Methods: Combine multiple models for better accuracy.
2. Clinical Integration
-Doctor Portal: Physician dashboard for reviewing results.
-HIPAA Compliance: Secure patient data handling.
-Risk Alerts: Automatic notifications for high-risk patients.
The goal: Transform cardiac healthcare from reactive treatment to proactive prevention through intelligent AI assistance.
Log in or sign up for Devpost to join the conversation.