Inspiration
Maternal health is one of the most critical and most neglected frontiers in modern medicine. Every day in 2023, over 700 women died from preventable causes related to pregnancy and childbirth, with a maternal death occurring nearly every 2 minutes worldwide. In the United States alone, more than 80% of pregnancy-related deaths are deemed preventable, yet the country continues to hold the highest maternal mortality rate among all high-income nations.
Despite this, postpartum care remains one of the most underrepresented areas in clinical AI. While machine learning has been deployed for cancer screening, diabetic retinopathy, and sepsis prediction, no comprehensive ML model has been clinically deployed to predict the full spectrum of postpartum complications.
What it does
MaternalGuard is an AI-powered clinical decision support tool that gives clinicians instant, explainable risk predictions for five major postpartum complications the moment patient data is entered:
Postpartum Hemorrhage (PPH) — predicts excessive post-delivery bleeding risk with contributing lab and vitals factors
Postpartum Preeclampsia — flags hypertensive disorder risk that can emerge days after discharge
Postpartum Sepsis — detects infection risk signals before clinical deterioration
Peripartum Cardiomyopathy — identifies cardiac failure risk unique to the peripartum window
Postpartum Depression (PPD) — screens for mood disorder risk using EHR-available clinical and demographic factors
Each prediction outputs a risk score (0–100%) with a categorical level (Low / Moderate / High / Critical), the top contributing risk factors ranked by real SHAP values with plain-language clinical explanations.
How we built it
ML Backend: XGBoost classifiers, trained on 10,000 synthetic patient records generated. SHAP (SHapley Additive exPlanations) was integrated to produce per-prediction explainability, turning black-box scores into clinician-readable factor breakdowns.
API Layer: A FastAPI (Python 3.11) backend exposes a /api/predict endpoint that loads the trained .joblib models, runs inference, computes SHAP values, and returns structured JSON responses.
Frontend: Built with Next.js, TypeScript, and Tailwind CSS.
Challenges we ran into
Synthetic data realism: Generating 10,000 records that reflected clinically meaningful correlations between features (e.g., elevated blood pressure correlating with both PPH and preeclampsia risk) required careful feature generation rather than random sampling.
Multi-condition architecture: Building five independent models with consistent input schemas, output formats, and SHAP pipelines that all funnel into one unified API response.
Accomplishments that we're proud of
Built a complete, working ML + full-stack application from scratch in a single hackathon sprint synthetic data generation, model training, FastAPI backend, and a polished Next.js frontend all in one pipeline.
Integrated real SHAP explainability into every prediction, making the tool not just predictive but interpretable a requirement for any clinically relevant AI tool.
Created a product that speaks directly to one of the most urgent, underserved gaps in modern healthcare postpartum maternal risk where 87% of deaths are preventable but clinical AI support is virtually nonexistent.
What we learned
Explainability is not optional in clinical AI — SHAP transforms a model from a black box into a tool a clinician can actually trust and act on.
Synthetic data generation requires domain knowledge: statistically valid distributions matter less than clinically coherent ones.
What's next for MaternalGuard
Real-world data validation: Partner with health systems to validate models on de-identified EHR data and benchmark against AUROC targets seen in recent postpartum AI research.
EHR integration: Build HL7 FHIR-compatible connectors so MaternalGuard can pull patient data directly from hospital EHR systems (Epic, Cerner) rather than requiring manual input. Longitudinal risk tracking: Extend predictions beyond the delivery window to track risk evolution across the full 6-week postpartum period, the highest-risk window for most complications.
FDA regulatory pathway: Pursue classification as a clinical decision support tool under FDA guidelines and begin the prospective clinical validation studies required for real-world deployment.
Built With
- machine-learning
- python
- tailwindcss
Log in or sign up for Devpost to join the conversation.