Inspiration

AFib is a common but often “silent” arrhythmia that can lead to stroke if undetected, yet it often goes undetected until severe complications occur. We wanted to create a lightweight, real-time tool that could assist in early detection using only RR intervals, making it more accessible than full ECG waveform analysis. The idea was to combine AI + healthcare for impact that could potentially save lives. Full ECG-based systems are heavy and not always practical. We were inspired to design a lightweight, real-time tool that uses only RR intervals , simple, accessible, and effective , to detect AFib early.

What it does

NeuraRhythm is a real-time dashboard that: Accepts RR interval .csv files as input. Runs predictions using both a base XGBoost model and an Intensified Stacked Ensemble (RF, XGB, Logistic, CNN, BiLSTM). Displays AFib vs Normal classification with confidence scores. Visualizes the RR sequence for transparency.

How we built it

Datasets: Combined CinC 2017 and MIT-BIH AFib datasets to balance AFib and Normal cases. Preprocessing: Extracted R-peaks → computed RR intervals → cleaned and normalized sequences → fixed-length (50 beats). Base Models: Trained Random Forest, XGBoost, Logistic Regression, 1D-CNN, and BiLSTM. Stacked Ensemble: Logistic Regression meta-learner on base model outputs for robust classification. Dashboard: Built in Streamlit for live inference, visualization, and demo with sample inputs.

Challenges we ran into

Balancing AFib vs Normal cases → solved by merging MIT-BIH AFib data with CinC 2017. Version mismatches between scikit-learn and xgboost when loading models. Handling different input shapes for CNN (1,50) vs BiLSTM (50,1). Keeping the dashboard lightweight and evaluator-friendly under time limits.

Accomplishments that we're proud of

Built a working, real-time AFib detection system in hackathon time. Successfully integrated 5 base models into a stacked ensemble. Achieved high performance with improved recall and AUC using stacking. Designed a demo-friendly dashboard with drag-and-drop .csv testing.

What we learned

How to preprocess physiological data (RR intervals) for ML/DL models. Strengths/weaknesses of tree-based vs deep learning models on time-series data. Practical issues with model persistence (joblib, PyTorch) and version compatibility. Building interpretable dashboards for medical AI demos.

What's next for NeuraRhythm: Real-Time AFib Detection Dashboard

Add explainability (SHAP/LIME) for more transparent predictions. Deploy on Raspberry Pi / edge devices for real-time monitoring. Extend pipeline to include ECG waveform segments + RR hybrid input. Collect feedback from clinicians for real-world applicability. Expand to multi-arrhythmia detection, beyond AFib.

Built With

  • github
  • joblib
  • matplotlib
  • matplotlib-platforms:-local-development-(windows-/-linux)-with-virtual-environments-(venv)-cloud-/-data:-physionet-cinc-2017-dataset
  • mit-bih-afib-dataset
  • mit-bih-afib-dataset-model-persistence:-joblib-(for-scikit-learn-/-xgboost-models)
  • numpy
  • pandas
  • pandas-visualization-&-dashboard:-streamlit
  • physionet-cinc-2017-dataset
  • python
  • pytorch
  • pytorch-data-processing:-numpy
  • scikit-learn
  • streamlit
  • xgboost
Share this project:

Updates