This repository presents a hybrid classical-quantum machine learning framework for breast cancer detection using medical imaging datasets. By combining classical and quantum techniques, the project explores new frontiers in medical image classification, offering a comparative evaluation of their effectiveness.
This project investigates the use of quantum computing—through variational quantum circuits and hybrid quantum convolutional neural networks (HQCNNs)—in the context of breast cancer detection. It provides implementations for both classical and quantum pipelines and evaluates their performance on standard datasets.
├── classical/ # Classical ML implementations
│ ├── BCDR/ # Classical models for BCDR dataset
│ └── BreastMNIST/ # Classical models for BreastMNIST dataset
├── quantum/ # Quantum ML implementations
│ ├── BCDR/ # Quantum models for BCDR dataset
│ └── BreastMNIST/ # Quantum models for BreastMNIST dataset
├── data/ # Dataset storage and preprocessing
│ ├── BCDR/ # BCDR dataset and utilities
│ └── utils/ # General data preprocessing tools
├── models/ # Trained models and architecture definitions
│ ├── classical/ # Classical model architectures
│ └── quantum/ # Quantum model architectures
├── utils/ # General utility scripts
│ ├── calculator.py # General-purpose computation tools
│ └── normalizations.txt # Normalization parameters used
├── LICENSE # License information
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Classical Models: Built with PyTorch for standard deep learning approaches.
- Quantum Models: Developed using PennyLane for quantum-enhanced learning.
- Dataset Support: Includes tools for both the BCDR dataset (BreastMNIST tools are on code).
- Performance Visualization: Scripts and notebooks to generate and compare ROC curves.
- Hybrid Analysis: Provides side-by-side performance evaluations between classical and quantum models.
- Clone the repository:
git clone https://github.com/yrsobrinho/BreastCancerQuanvolution.git
cd BreastCancerQuanvolution- Install the required Python packages:
pip install -r requirements.txt- BCDR: A real-world dataset of breast cancer images.
- BreastMNIST: A benchmark medical imaging dataset from MedMNIST.
Dataset-specific download instructions and preprocessing steps can be found in the respective data/ subdirectories.
- Run models from the
classical/orquantum/folders for your dataset of interest. - Evaluate using the ROC curve tools in the
graphic/folder. - Compare models using saved checkpoints and logs.
- Quantum: PennyLane
- Classical: PyTorch
See the LICENSE file for details.