Skip to content

prashhviji/GlucoZap

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 GlucoZap - Comprehensive AI Health Analysis Platform

GlucoZap Logo

A cutting-edge AI-powered health analysis platform that combines computer vision, machine learning, and natural language processing to provide comprehensive health assessments

MIT License Next.js FastAPI Python

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ 🎯 Features β€’ πŸ—οΈ Architecture β€’ 🀝 Contributing


🌟 Overview

GlucoZap is a revolutionary AI-powered health analysis platform that leverages advanced machine learning models to provide comprehensive health assessments through multiple modalities including computer vision, questionnaire analysis, and medical document processing.

🎯 Key Capabilities

  • πŸ€– AI-Powered Health Analysis: Multiple specialized AI models for different health conditions
  • πŸ‘οΈ Computer Vision: Image-based health assessments using YOLO and CNN models
  • πŸ“‹ Questionnaire Analysis: Intelligent risk assessment through ML-powered questionnaires
  • πŸ“„ Document Processing: Medical document analysis with NLP and OCR
  • πŸ—£οΈ Voice Analysis: Stress detection through voice pattern recognition
  • πŸ“± Multi-Platform: Web application with mobile responsiveness

πŸ—οΈ System Architecture

graph TB
    subgraph "Frontend Layer"
        A[Next.js Web App] --> B[Mobile App - React Native]
        A --> C[Clerk Authentication]
        A --> D[Supabase Database]
    end
    
    subgraph "AI Backend Services"
        E[BMI Classification API]
        F[Diabetic Retinopathy API]
        G[Acanthosis Detection API]
        H[Diabetes Risk Assessment]
        I[Stress Detection API]
        J[Medical Report Bot]
        K[Face & Voice Analysis]
    end
    
    subgraph "AI Models"
        L[YOLOv8 - BMI Classification]
        M[YOLOv11 - Dark Circles]
        N[ResNet18 - Retinopathy]
        O[Random Forest - Diabetes Risk]
        P[CNN - Stress Detection]
        Q[LangChain + Groq - NLP]
    end
    
    subgraph "Data Processing"
        R[MediaPipe - Face Mesh]
        S[OpenCV - Image Processing]
        T[Unstructured - Document Processing]
        U[ChromaDB - Vector Storage]
    end
    
    A --> E
    A --> F
    A --> G
    A --> H
    A --> I
    A --> J
    A --> K
    
    E --> L
    E --> R
    F --> N
    G --> M
    H --> O
    I --> P
    J --> Q
    J --> T
    J --> U
    K --> R
    K --> S
Loading

🎯 Features

πŸ”¬ AI Health Analysis Modules

Module Technology Functionality Input Output
BMI Classification YOLOv8 + MediaPipe Body mass index assessment with face mesh visualization Face image BMI category + health recommendations
Diabetic Retinopathy ResNet18 Eye disease severity detection Retinal images Severity level + urgency recommendations
Acanthosis Detection YOLOv11 Skin condition identification Neck/skin images Detection confidence + health advice
Diabetes Risk Assessment Random Forest Comprehensive risk evaluation Questionnaire data Risk percentage + preventive measures
Stress Detection CNN + YOLO Facial stress analysis Face images/video Stress level + coping strategies
Medical Report Analysis LangChain + Groq Document intelligence Medical documents Structured analysis + insights
Voice Stress Analysis Audio ML Voice pattern stress detection Audio recordings Stress indicators + recommendations

πŸš€ Platform Features

  • πŸ” Secure Authentication: Clerk-based user management
  • πŸ’Ύ Data Persistence: Supabase integration for user data
  • πŸ“Š Real-time Analytics: Live health metric tracking
  • 🎨 Modern UI/UX: Responsive design with Shadcn/UI
  • ⚑ High Performance: FastAPI backends with async processing
  • πŸ”„ Real-time Updates: Live data synchronization
  • πŸ“± Cross-platform: Web and mobile compatibility

🎨 User Journey Flow

flowchart TD
    A[User Registration/Login] --> B{Choose Analysis Type}
    
    B --> C[BMI Analysis]
    B --> D[Eye Health Check]
    B --> E[Skin Analysis]
    B --> F[Diabetes Risk]
    B --> G[Stress Assessment]
    B --> H[Medical Document]
    
    C --> C1[Upload Face Photo]
    C1 --> C2[AI Processing]
    C2 --> C3[BMI Result + Face Mesh]
    
    D --> D1[Upload Retinal Image]
    D1 --> D2[AI Analysis]
    D2 --> D3[Severity Assessment]
    
    E --> E1[Upload Skin Photo]
    E1 --> E2[Detection Algorithm]
    E2 --> E3[Condition Analysis]
    
    F --> F1[Fill Questionnaire]
    F1 --> F2[ML Risk Calculation]
    F2 --> F3[Risk Report]
    
    G --> G1[Photo/Video Upload]
    G1 --> G2[Stress Detection]
    G2 --> G3[Stress Analysis]
    
    H --> H1[Upload Document]
    H1 --> H2[NLP Processing]
    H2 --> H3[Structured Report]
    
    C3 --> I[Health Dashboard]
    D3 --> I
    E3 --> I
    F3 --> I
    G3 --> I
    H3 --> I
    
    I --> J[Recommendations]
    I --> K[Progress Tracking]
    I --> L[Export Reports]
Loading

πŸ“ Project Structure

GlucoZap/
β”œβ”€β”€ 🌐 website/                    # Next.js Frontend
β”‚   β”œβ”€β”€ app/                       # App router pages
β”‚   β”œβ”€β”€ components/                # Reusable UI components
β”‚   β”œβ”€β”€ lib/                       # Utility functions
β”‚   β”œβ”€β”€ hooks/                     # Custom React hooks
β”‚   └── public/                    # Static assets
β”‚
β”œβ”€β”€ πŸ€– backend/                    # AI Backend Services
β”‚   β”œβ”€β”€ bmi/                       # BMI Classification API
β”‚   β”‚   β”œβ”€β”€ main.py               # FastAPI server
β”‚   β”‚   β”œβ”€β”€ yolov8n-cls.pt       # Pre-trained model
β”‚   β”‚   └── requirements.txt      # Dependencies
β”‚   β”‚
β”‚   β”œβ”€β”€ Acanthosis/                # Acanthosis Detection API
β”‚   β”‚   β”œβ”€β”€ main.py               # Detection server
β”‚   β”‚   └── requirements.txt      # Dependencies
β”‚   β”‚
β”‚   β”œβ”€β”€ Diabetes_Questionnaire/    # Risk Assessment API
β”‚   β”‚   β”œβ”€β”€ main.py               # Prediction server
β”‚   β”‚   β”œβ”€β”€ diabetes_risk_model.pkl # Trained model
β”‚   β”‚   └── requirements.txt      # Dependencies
β”‚   β”‚
β”‚   β”œβ”€β”€ Face_Stress_Detection/     # Stress Analysis API
β”‚   β”‚   β”œβ”€β”€ main.py               # Detection server
β”‚   β”‚   β”œβ”€β”€ yolo11n.pt           # YOLO model
β”‚   β”‚   └── static/               # Static files
β”‚   β”‚
β”‚   β”œβ”€β”€ Medical_Report_Bot/        # Document Analysis API
β”‚   β”‚   β”œβ”€β”€ main.py               # NLP server
β”‚   β”‚   β”œβ”€β”€ data/                 # Training data
β”‚   β”‚   β”œβ”€β”€ chroma_db/            # Vector database
β”‚   β”‚   └── uploads/              # Temp file storage
β”‚   β”‚
β”‚   β”œβ”€β”€ Rethinopathy_Detection/    # Eye Disease API
β”‚   β”‚   β”œβ”€β”€ main.py               # Classification server
β”‚   β”‚   └── requirements.txt      # Dependencies
β”‚   β”‚
β”‚   └── Face_Voice_Extract/        # Voice Analysis API
β”‚       β”œβ”€β”€ main.py               # Audio processing
β”‚       └── requirements.txt      # Dependencies
β”‚
β”œβ”€β”€ 🧠 ml/                         # Machine Learning Models
β”‚   β”œβ”€β”€ bmi/                       # BMI model training
β”‚   β”œβ”€β”€ DiabeticRetinopathy/       # Retinopathy models
β”‚   β”œβ”€β”€ Acanthosis_Nigricans_Detection/ # Skin condition models
β”‚   β”œβ”€β”€ Face_Stress_Detection/     # Stress detection models
β”‚   └── Face_Voice_Extract/        # Voice analysis models
β”‚
β”œβ”€β”€ πŸ“± app/                        # Mobile Application
β”‚   └── HealthApp/                 # React Native app
β”‚
└── πŸ“š Documentation
    β”œβ”€β”€ README.md                  # Main documentation
    β”œβ”€β”€ API_DOCS.md               # API documentation
    └── DEPLOYMENT.md             # Deployment guide

πŸš€ Quick Start

Prerequisites

  • Node.js 18.0+ and npm/yarn
  • Python 3.8+ and pip
  • Git for version control
  • GROQ API Key for AI models
  • Clerk Account for authentication
  • Supabase Account for database

πŸ”§ Installation

1. Clone the Repository

git clone https://github.com/Hariprasaadh/GlucoZap.git
cd GlucoZap

2. Setup Frontend (Next.js)

cd website
npm install
cp .env.example .env.local
# Configure environment variables in .env.local
npm run dev

3. Setup Backend Services

cd ../backend

# BMI Classification Service
cd bmi
pip install -r requirements.txt
python main.py &

# Diabetes Risk Assessment
cd ../Diabetes_Questionnaire
pip install -r requirements.txt
python main.py &

# Retinopathy Detection
cd ../Rethinopathy_Detection
pip install -r requirements.txt
python main.py &

# Acanthosis Detection
cd ../Acanthosis
pip install -r requirements.txt
python main.py &

# Stress Detection
cd ../Face_Stress_Detection
pip install -r requirements.txt
python main.py &

# Medical Report Bot
cd ../Medical_Report_Bot
pip install -r requirements.txt
python main.py &

# Voice Analysis
cd ../Face_Voice_Extract
pip install -r requirements.txt
python main.py &

4. Setup Mobile App (Optional)

cd ../app/HealthApp
npm install
npx react-native run-android  # or run-ios

🌐 Access Points


πŸ“Š API Reference

Core Endpoints

BMI Classification API

POST /predict
Content-Type: multipart/form-data

Body: image file
Response: {
  "bmi_category": "Normal-weight",
  "confidence": 0.95,
  "health_recommendations": [...],
  "annotated_image": "base64_string"
}

Diabetes Risk Assessment

POST /predict
Content-Type: application/json

Body: {
  "Age": 45,
  "Gender": "Male",
  "Height": 175,
  "Weight": 80,
  "Family History": "Yes",
  ...
}
Response: {
  "risk_percentage": 15.5,
  "risk_level": "Low",
  "recommendations": [...]
}

Diabetic Retinopathy Detection

POST /predict
Content-Type: multipart/form-data

Body: retinal image file
Response: {
  "severity": "Mild",
  "confidence": 0.88,
  "urgency": "Monitor",
  "recommendations": [...]
}

🧠 AI Models & Technologies

Computer Vision Models

  • YOLOv8: BMI classification from facial features
  • YOLOv11: Acanthosis nigricans detection
  • ResNet18: Diabetic retinopathy severity classification
  • Custom CNN: Facial stress detection

Natural Language Processing

  • LangChain: Document processing framework
  • Groq: Large language model inference
  • ChromaDB: Vector database for semantic search
  • Unstructured: Document parsing and extraction

Additional Technologies

  • MediaPipe: Face mesh generation and landmark detection
  • OpenCV: Image processing and computer vision
  • PyTorch: Deep learning framework
  • Scikit-learn: Machine learning algorithms

πŸ“± Mobile Application

Features

  • Cross-platform: React Native for iOS and Android
  • Real-time Analysis: Camera integration for live health checks
  • Offline Capability: Local model inference for basic features
  • Sync: Cloud synchronization with web platform

Setup

cd app/HealthApp
npm install
npx react-native run-android  # Android
npx react-native run-ios      # iOS

πŸ”’ Security & Privacy

Data Protection

  • End-to-end Encryption: All data transmission encrypted
  • Local Processing: AI models run locally when possible
  • Minimal Data Storage: Only essential data stored
  • GDPR Compliance: European data protection standards

Authentication

  • Clerk Integration: Secure user authentication
  • JWT Tokens: Stateless authentication
  • Role-based Access: Different user permission levels

Privacy Features

  • Anonymous Mode: Use without account creation
  • Data Deletion: Complete user data removal option
  • Audit Logs: Track all data access and processing

Database (Supabase)

  • Configure Supabase for production
  • Set up row-level security policies
  • Configure backup and monitoring

πŸ“Š Performance Metrics

AI Model Performance

Model Accuracy Inference Time Model Size
BMI Classification 94.2% ~150ms 14.1MB
Retinopathy Detection 91.8% ~200ms 44.7MB
Stress Detection 89.5% ~120ms 12.3MB
Acanthosis Detection 93.1% ~180ms 13.8MB

System Performance

  • API Response Time: <500ms average
  • Concurrent Users: 1000+ supported
  • Uptime: 99.9% target
  • Throughput: 10,000+ requests/hour

πŸ§ͺ Testing

Running Tests

# Frontend tests
cd website
npm test

# Backend tests
cd backend/bmi
python -m pytest tests/

# Integration tests
npm run test:integration

# Load testing
npm run test:load

Test Coverage

  • Frontend: 85%+ coverage target
  • Backend: 90%+ coverage target
  • Integration: Critical paths covered
  • Performance: Load and stress testing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 92.4%
  • TypeScript 5.5%
  • Python 2.0%
  • Other 0.1%