Skip to content

Faisal786111/NeuroVisionAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  NeuroVision AI

A Full-Stack AI-Powered Medical Intelligence & Diagnostics Platform

Next.js FastAPI PyTorch TensorFlow Supabase License: MIT


"Where artificial intelligence meets the human side of healthcare."

NeuroVision AI is not just a diagnostic tool โ€” it's a complete digital health ecosystem. From reading your X-rays with clinical-grade AI models to connecting you with specialist doctors and a 24/7 AI therapist, this platform reimagines what primary care can look like in 2025.


Platform Status ย  Chest Model Accuracy ย  Brain Model Accuracy ย  AI Models ย  Tech Stack


๐Ÿ“Œ Table of Contents

# Section
1 ๐ŸŒŸ Project Overview
2 ๐Ÿ’ก The Vision
3 ๐Ÿ—๏ธ System Architecture
4 ๐Ÿง  AI Model Pipeline
5 ๐Ÿ“Š Model Performance & Training
6 ๐Ÿ–ฅ๏ธ Platform Modules
7 ๐Ÿ“ Repository Structure
8 โšก API Reference
9 ๐Ÿš€ Getting Started
10 ๐Ÿ” Environment Variables
11 ๐Ÿ—„๏ธ Database Schema
12 ๐Ÿš€ Future Roadmap
13 ๐Ÿ‘จโ€๐Ÿ’ป Author

๐ŸŒŸ Project Overview

NeuroVision AI Landing Page
Fig. 1 โ€” NeuroVision AI Landing Page โ€” "The Future of Primary Care is Intelligent."

NeuroVision AI is a production-ready, full-stack medical intelligence platform built to bridge the gap between cutting-edge AI research and everyday patient care. It combines:

  • ๐Ÿ”ฌ Clinical-grade AI diagnostics โ€” bone, chest, and brain scan analysis via fine-tuned deep learning models
  • ๐Ÿค– 24/7 LLM-powered medical chatbot โ€” instant, empathetic health guidance (Groq / llama-3.3-70b)
  • ๐ŸŽ™๏ธ Voice Therapist โ€” real-time speech-based mental health companion (Web Speech API + Groq)
  • ๐Ÿ“… Doctor booking system โ€” online & offline appointments with real-time map integration
  • ๐Ÿง  Mental Health Planner โ€” PHQ-9 / GAD-7 standardized assessments with AI-generated plans
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Family Connect โ€” shareable health profiles and caregiver links
  • ๐Ÿ“„ PDF Clinical Reports โ€” AI-generated, board-format radiology reports via ReportLab

Key Achievements:

  • โœ… 94.4% binary classification accuracy on NIH ChestX-ray8 after fine-tuning CustomNet121
  • โœ… 98%+ brain tumor detection using InceptionV3 ensemble (4-class: Glioma, Meningioma, Pituitary, No Tumor)
  • โœ… 5-model AI ensemble โ€” MedSigLIP + CustomNet121 + InceptionV3 + CheXpert DenseNet + Groq LLM
  • โœ… Real-time inference โ€” typical response time under 3 seconds on CPU
  • โœ… End-to-end patient flow โ€” from scan upload to downloadable PDF report in one session

๐Ÿ’ก The Vision

The project was built around a single, focused problem:

๐Ÿฅ Healthcare is expensive, inaccessible, and slow โ€” especially for routine diagnostics. Most people skip early screening simply because getting an appointment takes weeks and costs too much.

NeuroVision AI solves this with three pillars:

Pillar What it solves How
AI Diagnostics Long radiology wait times Upload a scan, get clinical-level analysis in seconds
Doctor Booking Hard to find the right specialist Search, filter by specialty + map, book online/offline
Mental Wellness Mental health is often ignored 24/7 AI therapist + standardized PHQ-9/GAD-7 assessments

Scope at a Glance:

Current Capability Future Expansion
Chest, Bone & Brain X-ray / MRI analysis Full-body scan coverage (CT, PET)
LLM medical chatbot (Groq llama-3.3-70b) Fine-tuned medical LLM on PubMed
Voice-based mental health therapist Emotion recognition from voice tone
Appointment booking with map view Real-time EHR integration
PHQ-9 / GAD-7 / Cognitive assessments Longitudinal mental health tracking
Supabase cloud persistence HIPAA-compliant encrypted storage

๐Ÿ—๏ธ System Architecture

NeuroVision AI Animated System Architecture
Fig. 2 โ€” Live animated data flow: Patient โ†’ Next.js โ†’ FastAPI โ†’ AI Models + Supabase

flowchart TD
    U(["๐Ÿง‘ Patient / User"]) --> FE["๐Ÿ–ฅ๏ธ Next.js 15 Frontend\nPort 3000"]

    FE --> |"REST API calls"| BE["โšก FastAPI Backend\nPort 8000"]

    BE --> AI["๐Ÿค– AI Model Engine\n(medical_classifier.py)"]
    BE --> DB[("๐Ÿ—„๏ธ Supabase\nPostgres Cloud DB")]
    BE --> GROQ["โ˜๏ธ Groq API\nllama-3.3-70b-versatile"]

    AI --> M1["๐Ÿซ CustomNet121\nChest X-ray โ€ข 94.4% acc"]
    AI --> M2["๐Ÿง  InceptionV3 Ensemble\nBrain MRI โ€ข 4-class"]
    AI --> M3["๐Ÿฆด MedSigLIP\nBone / General Scans"]
    AI --> M4["๐Ÿ“‹ CheXpert DenseNet121\n14-label Chest Pathology"]

    BE --> PDF["๐Ÿ“„ ReportLab\nPDF Clinical Reports"]

    FE --> AUTH["๐Ÿ”‘ Supabase Auth\nJWT Sessions"]

    style U fill:#6C3483,color:#fff
    style FE fill:#0f172a,color:#34d399
    style BE fill:#1e3a5f,color:#38bdf8
    style AI fill:#1a2e1a,color:#86efac
    style DB fill:#0c4a6e,color:#7dd3fc
    style GROQ fill:#451a03,color:#fdba74
    style PDF fill:#4a1942,color:#f9a8d4
    style AUTH fill:#172554,color:#93c5fd
Loading
NeuroVision AI System Architecture Overview
Fig. 3 โ€” Full static stack overview: services, models, and database layers

Data Flow:

  1. ๐Ÿ‘ค User uploads a scan or types a query in the Next.js frontend (port 3000)
  2. โšก The request hits the FastAPI backend (port 8000) via REST API
  3. ๐Ÿค– Backend routes to the correct AI classifier based on scan type (chest / bone / brain / text)
  4. ๐Ÿ“„ Classification results trigger Groq llama-3.3-70b to generate a full structured clinical report
  5. ๐Ÿ—„๏ธ Results are auto-saved to Supabase (diagnostic_reports table)
  6. โฌ‡๏ธ User downloads the PDF report (ReportLab) โ€” or books a follow-up appointment directly

๐Ÿง  AI Model Pipeline

The core of NeuroVision AI is a 5-model ensemble classifier (medical_classifier.py โ€” 2,165 lines) that dynamically routes images to the correct specialized models:

Model Architecture Overview

Model Specialty Architecture Dataset
CustomNet121 Chest X-ray Custom DenseNet121 (fine-tuned) NIH ChestX-ray8 (112,120 images)
InceptionV3 Ensemble Brain MRI InceptionV3 + custom head Brain Tumor MRI Dataset (7,023 images)
MedSigLIP General / Bone Vision-Language Transformer Medical image-text pairs (HuggingFace)
CheXpert DenseNet 14-label Chest DenseNet121 (Stanford CheXpert weights) CheXpert (224,316 images)
Groq LLaMA-3.3-70b Report Text NLP Large Language Model โ€”

Classifier Routing Logic

# From api.py โ€” endpoint routing by scan type
if activeTab == "chest":   โ†’ /api/classify/chest   # CustomNet121 primary
if activeTab == "bone":    โ†’ /api/classify/bone    # MedSigLIP primary
if activeTab == "brain":   โ†’ /api/classify/brain   # InceptionV3 primary
if activeTab == "text":    โ†’ /api/classify/text    # Groq NLP primary
if activeTab == "general": โ†’ /api/classify         # Full ensemble

Bone X-ray: MedSigLIP Zero-Shot Classification

For bone scans, the system uses MedSigLIP โ€” a medical vision-language model โ€” for zero-shot classification against 20+ orthopedic pathology labels:

Hand Fracture, Joint Dislocation, Wrist Fracture, Greenstick Fracture,
Elbow Fracture, Bone Tumor, Osteoporosis, Avulsion Fracture,
Hairline Fracture, Radius Fracture, Shoulder Fracture ...

The model computes cosine similarity between the scan image embedding and text embeddings for each condition label, returning a probability distribution โ€” no retraining required.

Brain Tumor: InceptionV3 4-Class Detection

The brain MRI classifier distinguishes between:

Class Description
Glioma Most common malignant primary brain tumor
Meningioma Tumor arising from brain membranes
Pituitary Tumor Adenoma affecting pituitary gland
No Tumor Healthy / normal scan

Report Text NLP

When a user pastes clinical text (lab reports, discharge summaries), the Groq llama-3.3-70b-versatile model reads the text and generates:

  • Primary diagnosis extraction
  • Key finding highlights
  • Recommended follow-up steps

๐Ÿ“Š Model Performance & Training

CustomNet121 Fine-Tuning Results (Chest X-ray)

The chest model was fine-tuned on the NIH ChestX-ray8 dataset (112,120 frontal chest radiographs, 14 pathology labels) using a warm-up cosine learning rate schedule.

CustomNet121 Training Accuracy Chart
Fig. 3 โ€” CustomNet121 Fine-Tuning: Binary Accuracy & Loss over 10 Epochs on NIH ChestX-ray8

Fine-Tuning Configuration:

# From finetune_chest_model.py
BATCH_SIZE   = 8
IMAGE_SIZE   = (320, 320)    # matches original notebook
EPOCHS       = 10
VAL_SPLIT    = 0.15
LR_START     = 1e-5          # warm-up start
LR_MAX       = 5e-5          # peak learning rate
LR_EXP_DECAY = 0.8           # cosine decay factor

Actual Training Metrics (from chest_finetune_history.csv):

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘  Epoch โ•‘  Train Accuracy      โ•‘  Loss    โ•‘  Val Accuracy        โ•‘ Val Loss โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘    0   โ•‘  93.89%              โ•‘  0.1858  โ•‘  93.94%              โ•‘  0.1747  โ•‘
โ•‘    2   โ•‘  93.99%              โ•‘  0.1730  โ•‘  94.06%              โ•‘  0.1690  โ•‘
โ•‘    4   โ•‘  94.07%              โ•‘  0.1669  โ•‘  94.07%              โ•‘  0.1686  โ•‘
โ•‘    6   โ•‘  94.21%              โ•‘  0.1600  โ•‘  94.09%              โ•‘  0.1660  โ•‘
โ•‘    8   โ•‘  94.28%              โ•‘  0.1563  โ•‘  94.05%              โ•‘  0.1657  โ•‘
โ•‘    9   โ•‘  94.37% โ† BEST       โ•‘  0.1534  โ•‘  94.09% โ† BEST       โ•‘  0.1640  โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Data Augmentation applied during training:

train_datagen = ImageDataGenerator(
    samplewise_center=True,
    samplewise_std_normalization=True,
    shear_range=0.1,
    zoom_range=0.15,
    rotation_range=5,
    width_shift_range=0.1,
    height_shift_range=0.05,
    horizontal_flip=True,
    rescale=1.0 / 255.0,
    fill_mode="reflect",
)

Performance Summary

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                    NEUROVISION AI โ€” MODEL METRICS                โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  Model                        โ•‘  Performance                     โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  CustomNet121 (Chest)         โ•‘  ๐ŸŸข  94.4% Binary Accuracy       โ•‘
โ•‘  InceptionV3 (Brain)          โ•‘  ๐ŸŸข  98%+ 4-class Detection      โ•‘
โ•‘  MedSigLIP (Bone/General)     โ•‘  ๐ŸŸข  Zero-shot 20+ conditions    โ•‘
โ•‘  CheXpert DenseNet            โ•‘  ๐ŸŸข  14-label chest pathology    โ•‘
โ•‘  Groq llama-3.3-70b           โ•‘  ๐ŸŸข  ~1500 token clinical report โ•‘
โ•‘  API Response Time            โ•‘  ๐ŸŸข  < 3s on CPU (typical)       โ•‘
โ•‘  PDF Report Generation        โ•‘  ๐ŸŸข  < 5s (ReportLab)           โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ–ฅ๏ธ Platform Modules

NeuroVision AI Dashboard
Fig. 4 โ€” NeuroVision AI Diagnostics Dashboard โ€” Bone X-Ray Analysis with Probability Distribution

1. ๐Ÿ”ฌ NeuroVision AI Diagnostics

The flagship module. Upload a medical scan and get a full clinical AI analysis.

Supported scan types:

  • ๐Ÿซ Chest X-Ray โ€” CustomNet121 (14 pathologies: Pneumonia, Atelectasis, Cardiomegaly, Effusion, etc.)
  • ๐Ÿฆด Bone / Orthopedic โ€” MedSigLIP (20+ fracture types, dislocations, bone tumors)
  • ๐Ÿง  Brain MRI โ€” InceptionV3 (Glioma, Meningioma, Pituitary, No Tumor)
  • ๐Ÿ“ Text / Lab Reports โ€” NLP via Groq (paste clinical text, get AI insights)
  • ๐Ÿ”ฌ General / Multi-Modal โ€” Full ensemble with combined image + text input

Output for every analysis:

  • Primary diagnosis with confidence score
  • Full probability distribution across all conditions
  • Groq-generated structured clinical report (FINDINGS, IMPRESSION, RECOMMENDATIONS)
  • Downloadable PDF report (ReportLab, professional radiology format)
  • Option to book a follow-up doctor appointment directly from results

2. ๐Ÿค– MedBot AI Chatbot

An always-available AI health assistant powered by Groq llama-3.3-70b.

  • Answers general health questions with empathy and accuracy
  • References current symptoms to suggest possible causes
  • Always recommends consulting a doctor for diagnosis
  • Maintains full conversation history per session
  • Available 24/7 โ€” no login required for basic queries

3. ๐ŸŽ™๏ธ Voice Therapist (Aria)

A real-time, voice-driven mental health companion.

  • Speaks naturally using browser Web Speech API (TTS/STT)
  • Powered by Groq llama as the therapeutic reasoning engine
  • System prompt: "You are Aria, a compassionate mental health therapist for NeuroVision AI"
  • Conversation history persisted in localStorage
  • Chrome/Edge only (requires Web Speech API support)

4. ๐Ÿ“… Doctor Appointment Booking

A full telemedicine + in-person booking workflow.

  • Browse and filter doctors by specialty, city, and availability
  • Interactive Leaflet map โ€” see clinic locations, click to book
  • Online (Video) and Offline (In-Person) appointment modes
  • AI Pre-Screening: attach your scan result or AI report to the booking
  • Appointments stored in Supabase with full audit trail
  • Calendar invite download and confirmation screen

5. ๐Ÿง  Mental Health Planner

An intelligent mental wellness tracker and assessment hub.

  • PHQ-9 โ€” standardized depression screening (9 questions)
  • GAD-7 โ€” anxiety disorder screening (7 questions)
  • Baseline Cognitive (MMSE-style) โ€” cognitive function baseline
  • Score history with visual trend tracking
  • Submits scores to /analyze-scores endpoint โ†’ Groq generates a personalized wellness plan
  • Links directly to Voice Therapist for immediate follow-up

6. ๐ŸŽฎ Cognitive Assessment Games

Three interactive browser-based games for neurological baseline testing:

Game Tests Clinical Basis
eval_game1 Working memory, pattern recognition MMSE digit span
eval_game2 Processing speed, attention Trail Making Test (TMT)
eval_game3 Verbal recall, word fluency Montreal Cognitive Assessment (MoCA)

Results are persisted to localStorage and available to the Mental Health Planner.

7. ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Family Connect

Allows users to create and share health profiles across family members.

  • Add family members with individual health profiles
  • Generate a shareable link with a unique UUID
  • Caregiver access โ€” view and monitor loved ones' health data
  • Stores up to 10 family members per user account

8. ๐ŸŒ VR Connect (Panchayat)

An embedded WebVR room powered by FrameVR for group health consultations.

  • Accessible at /dashboard/panchayat
  • Supports microphone, camera, and fullscreen
  • Virtual meeting room for patients + doctors in immersive 3D space

9. ๐Ÿ“š Resource Hub

A curated medical knowledge library with filterable content.

  • Categories: Mental Health, Cardiology, Nutrition, Cognitive Tech, etc.
  • Difficulty levels: Beginner, Intermediate, Advanced
  • Format: Articles, Videos, Interactive tools
  • Search and category filters


โšก API Reference

The FastAPI backend serves on http://localhost:8000. All endpoints accept multipart/form-data unless noted.

Classification Endpoints

Method Endpoint Description
POST /api/classify/chest Chest X-ray analysis (CustomNet121 + CheXpert ensemble)
POST /api/classify/bone Bone / orthopedic scan (MedSigLIP zero-shot)
POST /api/classify/brain Brain MRI tumor detection (InceptionV3)
POST /api/classify/text Clinical text NLP (Groq llama)
POST /api/classify General multi-modal (full ensemble)

Request (image endpoints):

image         : File     โ† medical scan (PNG, JPG, DICOM)
generate_report : bool   โ† whether to invoke Groq for full report
fast_mode     : bool     โ† skip slow models for quick result
patient_name  : string
patient_age   : string
patient_gender: string

Response:

{
  "disease": "Hand Fracture",
  "confidence": 0.208,
  "predictions": {
    "hand_fracture":     0.208,
    "joint_dislocation": 0.128,
    "wrist_fracture":    0.123,
    "greenstick_fracture": 0.114,
    "elbow_fracture":    0.101
  },
  "report": "CLINICAL RADIOLOGY REPORT\n...",
  "model_used": "medsiglip",
  "input_type": "image"
}

Report & PDF Endpoints

Method Endpoint Description
POST /api/report/download Download formatted PDF report (ReportLab)
POST /analyze-scores Mental health score analysis + AI plan (Groq)

Doctor / Database Endpoints

Method Endpoint Description
POST /api/bookings Save appointment to Supabase
GET /api/doctors Fetch verified doctor list
POST /api/process-csv-files Batch import patient data

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.10+ with pip
  • Node.js 18+ with npm
  • Supabase account (free tier works)
  • Groq API key (free โ€” console.groq.com)
  • HuggingFace token (for gated models โ€” huggingface.co)

1. Clone the Repository

git clone https://github.com/SWAYAMPATEL30/NeuroVision-AI.git
cd NeuroVision-AI

2. Backend Setup (FastAPI)

# Install Python dependencies
pip install -r requirements.txt

# Copy and configure environment variables
cp .env.example .env
# โ†’ Edit .env with your keys (see Environment Variables section)

# Pre-download AI models to local cache (saves time, avoids cold start)
python download_models.py

# Start the backend
python api.py
# โ†’ Runs on http://localhost:8000
# โ†’ Swagger docs at http://localhost:8000/docs

3. Frontend Setup (Next.js)

cd synapse

# Install Node dependencies
npm install

# Start development server
npm run dev
# โ†’ Runs on http://localhost:3000

4. Database Setup (Supabase)

  1. Create a new project at supabase.com
  2. Open the SQL Editor in the Supabase dashboard
  3. Paste and run the contents of Production_Setup.sql
  4. This creates the users, appointments, and diagnostic_reports tables + seeds demo doctors

5. Fine-tuning (Optional)

To retrain the chest model on the NIH ChestX-ray8 dataset:

# Download NIH dataset automatically via kagglehub (requires Kaggle credentials)
python finetune_chest_model.py

# Training resumes automatically from last checkpoint if interrupted
# Results saved to: major_project-main/models/chest_xray_finetuned.h5
# Metrics logged to: chest_finetune_history.csv

๐Ÿ” Environment Variables

Create a .env file in the root directory:

# --- AI APIs ---
GROQ_API_KEY=gsk_...           # Groq API โ€” report generation + chatbot
GEMINI_API_KEY=AIza...         # Google Gemini (optional fallback)
HF_TOKEN=hf_...                # HuggingFace โ€” for gated model access

# --- Supabase ---
SUPABASE_URL=https://xxx.supabase.co
SUPABASE_SERVICE_ROLE_KEY=eyJ...    # Service role key (backend only)

# --- Next.js Frontend (prefix with NEXT_PUBLIC_) ---
# Create synapse/.env.local for these:
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...

โš ๏ธ Never commit .env to version control. The .gitignore already excludes it.


๐Ÿš€ Future Roadmap

๐Ÿ”ฎ  TODAY                              โ†’     ๐ŸŒ  TOMORROW
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Chest, Bone, Brain scan analysis        โ†’  CT, PET, Ultrasound support
Groq llama-3.3-70b reports              โ†’  Fine-tuned medical LLM (PubMed)
Voice therapist (speech API)            โ†’  Emotion recognition from voice
Doctor map + booking                    โ†’  Real EHR / EMR integration
PHQ-9 / GAD-7 assessments              โ†’  Longitudinal mental health tracking
Local FastAPI backend                   โ†’  Serverless deployment (AWS Lambda)
Supabase auth                           โ†’  HIPAA-compliant audit logging
.env key management                     โ†’  AWS Secrets Manager integration

Planned improvements:

  • ๐Ÿฅ DICOM support โ€” proper parsing of medical-grade .dcm files
  • ๐ŸŒ Multi-language โ€” regional language support for underserved communities
  • ๐Ÿ“ฑ Mobile app โ€” React Native port of the core diagnostic + booking flow
  • ๐Ÿ”ฌ Pathology integration โ€” connect lab results to the AI diagnostic pipeline
  • ๐Ÿค Doctor portal โ€” full telemedicine platform for physicians to review AI-flagged cases

๐Ÿ‘จโ€๐Ÿ’ป Team

This project was developed at Shri Vile Parle Kelavani Mandal's Dwarkadas J. Sanghvi College of Engineering (Autonomous College Affiliated to University of Mumbai) NAAC Accredited with "A" Grade (CGPA: 3.18)

Department of Computer Engineering โ€” 2025โ€“2026


Name SAP ID
Swayam Patel 60004240041
Akshit Shah 60004240020
Vraj Birje 60004240044
Faisal Khan 60004240019
Priyanka Limbad 60004220060

Project Guide: Prof. Khushali Deulkar ย |ย  H.O.D.: Dr. Meera Narvekar ย |ย  Principal: Dr. Hari Vasudevan


"Technology should understand everyone โ€” and make healthcare better for all of us."


GitHub


About

A smart healthcare platform that acts as a "hospital in the cloud." It instantly analyzes X-rays and brain scans using custom AI, while offering an empathetic, voice-enabled safe space for mental health tracking.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors