DocGPT (Doctor GPT) - AI-Powered Medical Diagnosis System
DocGPT (Doctor GPT) is an advanced medical diagnosis system that combines Vision Transformer (ViT) based deep learning models with LangChain agents to provide comprehensive medical image analysis and detailed diagnostic reports. The system leverages the power of PyTorch for deep learning and Groq's LLM for generating human-like medical insights.
Core Technology
LangChain Agents: Intelligent agents that coordinate between different disease detection models and the LLM to provide comprehensive medical analysis
Vision Transformer (ViT): State-of-the-art transformer architecture for medical image analysis
Deep Learning Models: Specialized PyTorch models trained for different medical conditions:
ResNet-based architecture for Eye Disease detection
Vision Transformer for Skin Cancer classification
Custom CNN architecture for Pneumonia detection
Features
Multi-Disease Detection: Supports multiple medical conditions:
Eye Diseases (Cataract, Glaucoma, Diabetic Retinopathy)
Skin Cancer (Melanoma Detection)
Pneumonia (X-ray Analysis)
Brain Tumor (Coming Soon)
Heart Disease (Coming Soon)
AI-Powered Analysis:
Deep learning models for accurate disease detection
Groq LLM integration for detailed medical reports
LangChain agents for orchestrating the analysis pipeline
Modern Architecture:
FastAPI backend with automatic OpenAPI documentation
Streamlit frontend for testing (React.js interface planned)
Modular design for easy extension to new disease types
Tech Stack
Backend Framework: FastAPI
Deep Learning:
PyTorch
torchvision
Vision Transformer (ViT)
AI Integration:
LangChain for agent orchestration
Groq API for medical report generation
Image Processing:
PIL
torchvision transforms
Development:
Python 3.12+
pydantic for data validation
uvicorn for ASGI server
Installation
Clone the repository:
Create and activate a virtual environment:
Install dependencies:
Set up environment variables in
.env:Usage
Start the FastAPI backend:
Start the Streamlit frontend (in a new terminal):
Access the applications:
API Documentation: http://localhost:8000/docs
Streamlit Interface: http://localhost:8501
API Endpoints
Health Check
GET /api/v1/health: Check API health statusDisease Prediction
POST /api/v1/predict: Submit an image for disease predictionParameters:
disease_type: Type of disease to predictfile: Image fileProject Structure
Disease Types
Eye Disease Detection:
Normal
Cataract
Glaucoma
Diabetic Retinopathy
Skin Cancer Detection:
Melanoma
Non-Melanoma
Pneumonia Detection:
Normal
Pneumonia
Contributing
Fork the repository
Create a feature branch
Commit your changes
Push to the branch
Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Medical datasets providers
PyTorch team
Groq API team
FastAPI and Streamlit communities
0 likes · 15 views · Feb 4, 2025
DocGPT (Doctor GPT) is an advanced medical diagnosis system that combines Vision Transformer (ViT) based deep learning models with LangChain agents to provide …