Skip to content

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.

License

Notifications You must be signed in to change notification settings

alok-devforge/MediScan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MediScan: AI-Powered Bone Fracture Detection

Version License: MIT Built with: Python Framework: FastAPI Model: YOLOv8

Advanced deep learning system for rapid and accurate bone fracture detection from X-ray images.

πŸ“‹ 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

Detection Results Grad-CAM Visualization
Detection Results Grad-CAM Visualization

πŸ—οΈ Architecture

MediScan consists of two main components:

  1. Backend (FastAPI): Handles image processing, runs the YOLOv8 model, and generates visualizations
  2. 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

  1. Clone the repository

    git clone https://github.com/yourusername/mediscan.git
    cd mediscan
  2. Install dependencies

    pip install -r requirements.txt
  3. Start the backend server

    cd backend
    uvicorn app:app --reload
  4. 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

πŸ“‘ 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:

  1. Create a virtual environment

    python -m venv env
    source env/bin/activate  # On Windows: env\Scripts\activate
  2. Install development dependencies

    pip install -r requirements.txt
  3. 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

Made with ❀️ for improving medical diagnostics

Β© 2025 MediScan Team

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published