Advanced deep learning system for rapid and accurate bone fracture detection from X-ray images.
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.
- π 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
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
- 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)
βββ 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
- Python 3.8+
- pip (Python package manager)
- Modern web browser
-
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
frontend
folder - Open
index.html
in your web browser
OR
- Serve the frontend using a simple HTTP server:
cd frontend python -m http.server 8080
- Open
http://localhost:8080
in your browser
- Navigate to the
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 |
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']}")
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
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
This project is licensed under the MIT License - see the LICENSE file for details.
- Ultralytics YOLOv8 for the object detection model
- FastAPI for the backend framework
- Medical partners for providing expertise and testing
Made with β€οΈ for improving medical diagnostics
Β© 2025 MediScan Team