Skip to content

Repository files navigation

Brain Tumour QCNN Banner

Python Badge PyTorch Badge PennyLane Badge Gradio Badge Status Badge License Badge

Brain Tumour Detection using Quantum Convolutional Neural Networks (QCNN)

This project demonstrates a hybrid Quantum + Classical deep learning model for brain tumour classification using MRI images. The architecture uses EfficientNet-B0 + a 4-qubit quantum variational layer.


Motivation

Accurate brain tumour detection from MRI scans can speed up diagnosis and improve patient outcomes. This project explores a hybrid approach — classical convolutional feature extractors enhanced by a small quantum variational layer — to improve classification robustness and generalization on medical images.


Research Publication

This project is based on the following published research paper:

Title: Brain Tumour Detection Using Quantum Convolutional Neural Networks (QCNN)

Conference: IEEE Odisha International Conference on Information Technology (OCIT 2025)

Publisher: IEEE

DOI: https://doi.org/10.1109/OCIT66168.2025.11400476

This repository contains the implementation corresponding to the published work.


Features

  • Hybrid QCNN architecture (EfficientNet + Quantum Layer)
  • Binary brain tumor classification
  • Quantum circuit built using PennyLane
  • Gradio UI for predictions
  • Safe-cleaning of model checkpoints
  • GPU supported

Key Performance Highlights

  • Achieved high accuracy on binary MRI tumour classification
  • Quantum variational layer improves feature separability
  • EfficientNet-B0 extracts strong spatial representations
  • Stable training with smooth loss convergence
  • Works efficiently on GPU (recommended)
  • Produces confident predictions for both tumour and no tumour classes
  • Lightweight architecture suitable for deployment

Tech Stack

Deep Learning:

  • PyTorch
  • EfficientNet-B0

Quantum:

  • PennyLane
  • Strongly Entangling Layers (4-qubit)

Utilities:

  • NumPy, Pillow, Scikit-Learn, Torchvision, Gradio

Dataset

Kaggle dataset by the author: https://www.kaggle.com/datasets/skarthik112/karthik-braindataset-mri

Folder structure:

brain_Tumor_karr/
 ├── yes/    → tumour present
 └── no/     → no tumour

Classification Report

Class Precision Recall F1-Score
Yes (Tumour) 0.98 0.97 0.98
No (Normal) 0.99 0.99 0.99

Overall Accuracy: 0.996


Sample Results

Tumour Detected (YES)

YES

No Tumour (NO)

NO


Repository Structure

Brain-Tumor-QCNN/
│
├── train_qcnn.py          
├── predict_qcnn.py        
├── README.md              
├── requirements.txt       
├── .gitignore             
│
└── assets/                
    ├── yes_result.png
    └── no_result.png


Author

S. Karthik
Developer & Research Student
Brain Tumour Detection using Quantum Convolutional Neural Networks (2025)


Installation

Follow the steps below to set up and run the QCNN model.

Clone the Repository

git clone https://github.com/Karthik7661/Brain-Tumor-QCNN.git
cd Brain-Tumor-QCNN
# 2 Install Dependencies
pip install -r requirements.txt
# 3 Train the Model
python train_qcnn.py
# 4 Run the Gradio Prediction App
python predict_qcnn.py

About

Hybrid Quantum–Classical Neural Network (QCNN) for automated brain tumour detection using MRI images. Combines EfficientNet-B0 feature extraction with a 4-qubit PennyLane quantum layer and includes a Gradio-based prediction interface.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages