Skip to content

pragyamv/TrueScan

Repository files navigation

TrueScan: Medical Image Authenticity & Analysis System

TrueScan is a deep learning-powered system that detects AI-generated or manipulated knee X-rays and classifies them for anomalies. It uses an ensemble of three state-of-the-art CV models served through a full-stack clinical web dashboard.


3rd Place — ML/DL Track | State Level Inter-Collegiate Tech Exhibition at AIT, CKM


The Problem

AI-generated medical images are increasingly indistinguishable from real scans. A radiologist or clinician relying on a manipulated X-ray for diagnosis could cause serious harm. TrueScan acts as a verification layer by flagging images that are likely synthetic or tampered with before they enter the diagnostic pipeline.


How It Works

Rather than relying on a single model, TrueScan uses an ensemble of three architecturally distinct networks. Each model votes on whether the image is authentic or AI-generated, and the majority vote determines the final prediction. This approach reduces the risk of any single model's blind spots affecting the outcome.

Model Architecture Type Role
ResNet50 Residual CNN Deep feature extraction
VGG19_BN Classical deep CNN (Batch Norm) Texture & pattern detection
YOLOv8m-cls YOLO classification head Fast, generalized classification

Ensemble voting: A prediction is only marked as confident when at least 2 of 3 models agree.


Datasets

  1. Real Knee Scans: Knee Osteoarthritis Severity Grading Dataset
  2. Fake Knee Scans: Synthetic (DeepFake) Knee Osteoarthritis X-ray Images from GANs

Features

  • Ensemble inference — ResNet50 + VGG19_BN + YOLOv8m-cls with majority voting
  • Doctor authentication — role-based login and access management
  • Automated PDF reports — downloadable reports with prediction confidence and patient details
  • Full-stack dashboard — Flask backend with a clean clinical UI

Tech Stack

ML: PyTorch, Ultralytics YOLOv8, ONNX
Backend: Flask, Python
Frontend: HTML/CSS/JS
Database: Supabase Deployment: Local deployment only


Run Locally

git clone https://github.com/prajwalnayaka/TrueScan.git
pip install -r requirements.txt
cd Python_Scripts
python app.py

Note: Trained model weights are not included due to file size. Download from Google Drive and update the model paths in test.py accordingly.


Contributors

  • Prajwal Nayaka T (GitHub)

    • Trained the Core ML models (ResNet50, VGG19_BN, YOLOv8m-cls).
    • Developed the Ensemble Voting Mechanism and Inference Pipeline.
    • Developed the Report Generation module.
    • Integrated above mentioned features into the Flask API.
  • Pragya MV (GitHub)

    • Designed and developed frontend files along with styling.
    • Developed the Report Generation module.
    • Initialized the database structure.
    • Built the organized Flask API.

What I'd Improve Next

  • Train on a larger, more diverse dataset across multiple human anatomical regions
  • Add Grad-CAM visualizations so clinicians can see which regions triggered the prediction
  • Explore diffusion-model-generated fakes, which are harder to detect than GAN-generated ones

Screenshots

Landing page

landing_page

User Authentication

user_auth

Dashboard

dashboard

Scan Selection

scan_selection

Analyzing Screen

analyzing

Analysis Page

anaysis_page

Report Form

report_form

Report

Report

About

Medical scan authenticity detection using ResNet50, VGG19_BN, YOLOv8m-cls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors