Skip to content

AKHIL-SAURABH/HealthAI-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


🫁 HealthAI – AI-Powered Chest X-Ray Disease Detection System

A deep-learning powered platform for multi-disease medical imaging analysis, built with TensorFlow, FastAPI, Streamlit, and deployed on Render.

HealthAI Banner


🏷️ Tech Stack Badges

Python TensorFlow FastAPI Streamlit Render Pandas NumPy EfficientNet

Machine Learning Deep Learning Computer Vision

Status


πŸš€ Overview

HealthAI is an end-to-end medical imaging project that detects multiple chest diseases from X-ray images using a deep learning model trained on the CheXpert dataset. It features:

  • πŸ“Έ Multi-Disease Chest X-Ray Classification (supports 5+ pathologies)
  • 🧠 CNN/Transfer Learning Model (EfficientNetB0)
  • βš™οΈ FastAPI Backend for AI Inference
  • 🧩 Streamlit Dashboard for Real-time Diagnosis
  • ☁️ Cloud Deployment on Render
  • πŸ”’ Clean architecture, modular API, scalable structure

This project demonstrates real-world deep learning workflow: data pipeline β†’ model training β†’ evaluation β†’ API β†’ UI β†’ deployment.


🧠 Features

βœ” 1. Multi-Label Disease Detection

Predicts probability for diseases such as:

  • Atelectasis
  • Cardiomegaly
  • Consolidation
  • Edema
  • Pleural Effusion

Example output:

{
  "Atelectasis": 0.14,
  "Cardiomegaly": 0.02,
  "Consolidation": 0.51,
  "Edema": 0.09,
  "Pleural Effusion": 0.78
}

βœ” 2. FastAPI Backend

Endpoints:

POST /predict-xray

  • Accepts an uploaded X-ray image
  • Returns normalized probabilities for all diseases

GET /health

Health check endpoint


βœ” 3. Streamlit Dashboard

  • Upload X-ray image
  • Call backend API
  • Display disease probabilities in clean UI
  • Visual + interactive

βœ” 4. Cloud Deployment

Backend deployed on Render, accessible publicly.


πŸ“ Project Structure

HealthAI-Project/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ model/
β”‚   β”‚   β”œβ”€β”€ healthai_model.keras
β”‚   β”‚   └── diseases.json
β”‚   └── requirements.txt
β”‚
β”œβ”€β”€ dashboard/
β”‚   β”œβ”€β”€ app.py
β”‚   └── assets/
β”‚
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ 01_train_healthai_model.ipynb
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
└── LICENSE

🌍 Live API (Render Deployment)

Base URL:

https://healthai-backend-oj25.onrender.com/

Swagger Docs:

https://healthai-backend-oj25.onrender.com/docs

πŸ“‘ API Reference (Quick Guide)

πŸ”Ή POST /predict-xray

Request: multipart/form-data field name = file

Response:

{
  "Atelectasis": 0.14,
  "Cardiomegaly": 0.02,
  "Consolidation": 0.51,
  "Edema": 0.09,
  "Pleural Effusion": 0.78
}

πŸ”Ή GET /health

Simple API check.


πŸ— Architecture

graph TD
    A[CheXpert Dataset] --> B[Model Training - EfficientNet]
    B --> C[Saved Model - Keras]
    C --> D[FastAPI Backend]
    D --> E[Streamlit Dashboard]
    D --> F[Mobile App - Future]
    D --> G[Cloud Deployment - Render]

Loading

πŸ“₯ How to Run Locally

1️⃣ Create environment

conda create -n healthai python=3.10
conda activate healthai

2️⃣ Install backend dependencies

cd backend
pip install -r requirements.txt

3️⃣ Run FastAPI backend

uvicorn main:app --reload --host 0.0.0.0 --port 8000

Docs: http://127.0.0.1:8000/docs


4️⃣ Run Dashboard

Open a second terminal:

cd dashboard
streamlit run app.py

Streamlit UI: http://localhost:8501/


πŸ“Έ Screenshots

Add these once screenshots are uploaded:

DASBOARD

Dashboard Home

PNEUMONIA PREDICTION

Pneumonia Prediction Result

MULTIPLE DISEAS PREDICTION

Multi-Diseas1 Prediction Result Multi-Diseas2 Prediction Result


πŸ“Š Model Training Details

  • Dataset: CheXpert small (5 diseases)

  • Input size: 224x224

  • Base model: EfficientNetB0

  • Optimizer: Adam (lr=1e-4)

  • Loss: Binary Crossentropy

  • Metrics: AUC, Accuracy

  • Achieved Validation Metrics:

    • Accuracy: ~88%
    • Loss: ~0.27

🧩 Future Improvements

  • Add more diseases (14-class CheXpert full)
  • Add attention heatmaps (Grad-CAM)
  • Add mobile app (Flutter)
  • Add hospital-level data logging
  • Improve UI/UX of dashboard

πŸ’Ό Why This Project?

This project demonstrates:

  • Deep learning model building
  • Medical imaging pipeline
  • Multi-label classification
  • Clean backend architecture
  • Real-world API integration
  • Deployment experience
  • Professional-grade UI

A perfect portfolio project for Machine Learning, AI Engineering, and Healthcare AI roles.


πŸ“„ License

This project is licensed under the MIT License.


πŸ‘€ Author

Akhil Saurabh


About

AI-powered medical imaging system for multi-disease chest X-ray detection,built with EfficientNet deep learning, a FastAPI backend, and an interactive Streamlit dashboard. Deployed on Render for real-time healthcare diagnostics, detecting conditions like Atelectasis, Edema and more.An end-to-end project demonstrating model training,API development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors