MediScan
MediScan: AI-powered bone fracture detection system achieving 99.8% accuracy through deep learning. Features real-time X-ray analysis, transparent Grad-CAM visualizations, and clinical integration tools. Built with Python/FastAPI backend and responsive HTML/CSS frontend, making advanced medical diagnostics more accessible to healthcare providers.
Install / Use
/learn @alok-devforge/MediScanREADME
MediScan: AI-Powered Bone Fracture Detection
</div> <div align="center">
📋 Overview
MediScan is a state-of-the-art web application that uses artificial intelligence to help healthcare professionals identify bone fractures from X-ray images with high accuracy. The system leverages YOLOv8 deep learning models and provides visual explanations using Grad-CAM technology to enhance trust and interpretability.
✨ Key Features
- 🔍 Advanced Detection: Identifies various fracture types (transverse, oblique, spiral, comminuted, greenstick)
- ⚡ Speed: Processes X-ray images in under 2 seconds
- 🔬 Grad-CAM Visualization: Shows exactly where the model is focusing, increasing clinical trust
- 📊 Detailed Analysis: Provides confidence scores and explanations for each detection
- 🌐 Web Interface: User-friendly frontend for easy image uploads and result viewing
- 🔄 API Access: RESTful endpoints for integration with other clinical systems
🖼️ Screenshots
<div align="center"> <table> <tr> <td><strong>Detection Results</strong></td> <td><strong>Grad-CAM Visualization</strong></td> </tr> <tr> <td><img src="frontend/images/sample-result.jpg" alt="Detection Results" width="100%"/></td> <td><img src="frontend/images/sample-gradcam.jpg" alt="Grad-CAM Visualization" width="100%"/></td> </tr> </table> </div>🏗️ Architecture
MediScan consists of two main components:
- Backend (FastAPI): Handles image processing, runs the YOLOv8 model, and generates visualizations
- Frontend (HTML/CSS/JS): Provides user interface for uploading X-rays and viewing results
🛠️ Technology Stack
- Backend: Python, FastAPI, PyTorch, Ultralytics YOLOv8, OpenCV
- Frontend: HTML5, CSS3, JavaScript, FontAwesome
- AI Model: YOLOv8 trained on bone fracture X-ray datasets
- Visualization: Grad-CAM (Gradient-weighted Class Activation Mapping)
📂 Project Structure
├── graphs/
│ ├── epochs_vs_accuracy.png
│ └── confusion_matrices/
├── models/
│ ├── yolo_model.py
├── backend/ # FastAPI backend
│ ├── app.py # Main application file
│ ├── requirements.txt # Backend dependencies
│ ├── models/ # YOLOv8 model files
│ ├── results/ # Detection results
│ │ ├── explanations/ # Model explanation images
│ │ └── gradcam/ # Grad-CAM visualization images
│ └── uploads/ # Uploaded X-ray images
│
├── frontend/ # Static web frontend
│ ├── index.html # Home page
│ ├── detect.html # Detection page
│ ├── gradcam.html # Grad-CAM explanation page
│ ├── about.html # About page
│ ├── features.html # Features page
│ ├── team.html # Team page
│ ├── contact.html # Contact page
│ ├── styles.css # Main stylesheet
│ └── images/ # Frontend images
│
├── requirements.txt # Project dependencies
└── README.md # Project documentation
🚀 Getting Started
Prerequisites
- Python 3.8+
- pip (Python package manager)
- Modern web browser
Installation
-
Clone the repository
git clone https://github.com/yourusername/mediscan.git cd mediscan -
Install dependencies
pip install -r requirements.txt -
Start the backend server
cd backend uvicorn app:app --reload -
Open the frontend
- Navigate to the
frontendfolder - Open
index.htmlin your web browser
OR
- Serve the frontend using a simple HTTP server:
cd frontend python -m http.server 8080 - Open
http://localhost:8080in your browser
- Navigate to the
📡 API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| / | GET | API status check |
| /status | GET | Get backend system status |
| /detect | POST | Upload and analyze X-ray image |
| /gradcam/{image_id} | GET | Get Grad-CAM visualization for a specific image |
Example API Usage
import requests
# Upload an X-ray image for detection
with open('xray.jpg', 'rb') as f:
files = {'file': f}
response = requests.post('http://localhost:8000/detect', files=files)
result = response.json()
print(f"Detection ID: {result['detection_id']}")
print(f"Result image: {result['result_image']}")
print(f"Grad-CAM visualization: {result['gradcam_image']}")
💻 Development Setup
For developers who want to contribute to the project:
-
Create a virtual environment
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate -
Install development dependencies
pip install -r requirements.txt -
Run backend with debug mode
cd backend uvicorn app:app --reload --debug
👥 Our Team
MediScan is developed by a multidisciplinary team of AI/ML developers and software engineers:
- Alok Kumar - Full Stack Dev - Lead developer specializing in AI integration and full-stack development
- Amrit Kumar - Technical Lead - Project architect and technical lead overseeing system design and implementation
- Aashish Kumar - Python Dev - Backend Python developer specializing in AI model integration and machine learning
- Samridhi Bagchi - Frontend Developer - UI/UX specialist focused on creating intuitive medical interfaces
- Karan Singh - ML Engineer - AI/ML expert specializing in medical image processing and deep learning model optimization
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgements
- Ultralytics YOLOv8 for the object detection model
- FastAPI for the backend framework
- Medical partners for providing expertise and testing
<div align="center"> <p>Made with ❤️ for improving medical diagnostics</p> <p>© 2025 MediScan Team</p> </div>
