Project Info

Cognivi — Quick, Accurate Stroke Detection Under $10

Devpost

This project did not submit a demo video on Devpost.

Inspiration

Stroke is a leading cause of death and disability worldwide, despite its distinct early symptoms. Each year, stroke kills 7 million people, with a 60+% disability rate for survivors. If a stroke goes untreated for 60+ minutes, approximately 2 million brain cells die per minute, and the brain ages by over three years. Even if traditional screening tools like FAST are already in place, these protocols still rely on subjective human judgment, resulting in delays in seeking care when every minute counts. We saw an opportunity to leverage widely accessible technology, smartphone cameras and open clinical data, to make stroke screening objective, rapid, and accessible. Cognivi was built with a simple mission: turn a 60-second video into a reliable neurologic triage signal that empowers patients, families, and telehealth providers.

What it does

Cognivi is an AI-assisted screening tool that analyzes a short video recorded on a smartphone to identify signs of acute stroke. It specifically targets objective correlates of neurologic dysfunction, based on established FAST stroke criteria. Hand motion impairment via computer vision to detect the inability to raise both hands at the same time. Facial asymmetry quantification using computer vision to detect lip droop, eyebrow shift, or midline deviation. Speech abnormality detection using acoustic feature analysis and pretrained audio models to identify slurring or irregular prosody. A stroke risk score that combines visual and audio signals into an interpretable risk estimate. Clear, actionable output with visual overlays (e.g., asymmetry heatmaps) and speech abnormality summaries to help users understand why risk was flagged. Rather than diagnosing stroke, Cognivi provides a quantified triage indication that complements clinical workflows and encourages timely care escalation when appropriate.

How we built it

We designed StrokePager around three core principles: clinical grounding, technical rigor, and privacy by design. Robust Video Ingestion ("Sanitizer" Pipeline) Browser-recorded videos (WebM) frequently upload with corrupted headers (e.g., missing moov atom), which causes Python video libraries to crash. To ensure reliability, we implemented a raw FFmpeg ingestion layer: Every uploaded file is immediately re-encoded into a clean H.264 MP4. Codecs and container formats are normalized before any model touches the file. This prevents crashes from malformed uploads and ensures consistent downstream processing. This sanitizer layer makes the backend resilient to real-world browser variability and large (~2-minute) uploads. Computer Vision: Arm Drift & Facial Droop Tools: MediaPipe + OpenCV We perform frame-by-frame skeletal landmark tracking to quantify motor asymmetry. The system computes: Arm drift detection: Vertical displacement differences between left and right wrists during bilateral raise tasks. Facial asymmetry detection: Positional differences between eye corners, mouth corners, and midline landmarks to quantify facial droop. These measurements are transformed into structured risk percentages rather than binary flags. To improve interpretability, we render an annotated output video with skeletal overlays. Clinicians can visually confirm the exact movement that triggered the score. This mirrors objective NIHSS components rather than relying on black-box classification. Speech & Cognitive Assessment Tools: FFmpeg (audio extraction), NVIDIA NeMo (automatic speech recognition), Claude 3 (LLM-based neurologic grading), Retrieval-Augmented Generation (PubMed-grounded prompting). First, we extract audio using FFmpeg and transcribe it with NVIDIA NeMo to obtain a high-fidelity transcript. Rather than using keyword detection, we implement a structured grading pipeline: Relevant stroke literature and diagnostic criteria are retrieved from PubMed-indexed sources and other peer reviewed medical databases. These evidence snippets are injected into Claude’s prompt context. Claude is instructed to act as a neurologist and evaluate: Dysarthria (slurring) Aphasia (word-finding difficulty) Deviations from the expected phrase (“The quick brown fox…”) Cognitive coherence and prosody This is a retrieval-augmented neurologic grading system, not simple LLM classification. The output includes a structured speech impairment score, a medical summary, and evidence-grounded reasoning. By grounding the LLM with peer-reviewed criteria at inference time, we increase interpretability and reduce hallucination risk. Multimodal Risk Fusion The system generates separate scores for: Arm motor impairment Facial asymmetry Speech and language dysfunction These components are fused into a unified stroke risk estimate returned as structured JSON. This approach preserves transparency: clinicians can see which neurologic domain contributed most to risk. Privacy-First Architecture StrokePager is deployed across three separated layers: Frontend (Next.js on Vercel) Secure backend (FastAPI on Render) AI inference engine (Modal deployment) Uploads are processed transiently, and only necessary artifacts and derived scores are retained. The architecture minimizes exposure of raw biometric data while preserving clinical utility. We intentionally separated inference from core application logic to reduce risk surface and support HIPAA-conscious deployment models.

Challenges we ran into

Balancing sensitivity and specificity: Reducing false positives while capturing subtle neurologic abnormalities required iterative tuning and validation. Multi-deploy coordination: Vercel + Render + Modal requires disciplined project roots, env vars, and endpoint hygiene. Privacy vs. usability: video exams are sensitive, so we intentionally separated services and made AI inference its own deploy path. Hackathon reliability: building a smooth end-to-end experience under time pressure meant keeping interfaces stable and minimizing moving parts.

Accomplishments we're proud of

A fully functional prototype that converts a 60-second video into a clinically relevant risk estimate for stroke detection. It contains three distinct layers (web app, secure backend, AI inference backend). Clinical-inspired and accurate scoring that approximates elements of standardized neurologic screening. A deployment architecture that runs on standard consumer devices without requiring wearables or specialized hardware.

What we learned

Real-world clinical signal extraction and the challenges of translating clinician heuristics into machine-usable features. How to responsibly leverage public clinical datasets to train models that generalize to diverse populations. Building privacy-preserving pipelines where sensitive input remains local to the device.

What's next

We’re excited to expand the project in several directions: Clinical validation studies with partners to benchmark sensitivity against real stroke presentations. We are working with researchers from Stanford School of Medicine to expand this project to clinical settings. Integration with telehealth platforms to offer on-demand screening during virtual visits. Expanded language support for broader global accessibility outside of mainstream languages like English. Automated accessibility enhancements (e.g., prompts in local languages, low-bandwidth modes). Our vision is to make objective neurologic triage available to everyone with a smartphone, reducing disparities in stroke recognition and care.

Analysis

Compare with all teams

View

Metric

Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.

Technology

Found in codeClaimed only
  • CSSIn code
  • FastAPIIn code
  • HTMLIn code
  • JavaScriptIn code
  • Next.jsIn code
  • PythonIn code
  • ReactIn code
  • Tailwind CSSIn code
  • TypeScriptIn code
  • VercelClaimed

9 of 10 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.

AI coding agents

  • CursorCommits

Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.

Codebase size

Source size

437 KB

Source files

136

Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.

0 stars