Skip to content

End-to-end cancer detection pipeline using MRI scans (Prostate & Breast) with PyTorch, Flask API, and React frontend.

Notifications You must be signed in to change notification settings

Sidzzzzzzzzzzzz/cancer-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 Cancer Detection (Breast & Prostate MRI)

Python PyTorch Flask React License: MIT

This project demonstrates a full-stack ML deployment workflow, focusing on prostate and breast cancer detection from MRI images using 3D U-Net and other deep learning architectures.


πŸš€ Features

  • Deep Learning Models
    • 3D U-Net for prostate cancer detection
    • CNN-based model for breast cancer detection
  • Backend
    • Flask REST API for model inference
  • Frontend
    • React.js interface for uploading MRI scans and viewing predictions
  • End-to-End Flow
    • Upload β†’ Preprocess β†’ Predict β†’ Display results

πŸ“‚ Project Structure

cancer-detection/ │── backend/ # Flask API code β”‚ β”œβ”€β”€ app.py # Main API script β”‚ β”œβ”€β”€ models/ # Saved ML models β”‚ └── utils/ # Preprocessing & helper functions β”‚ │── frontend/ # React.js frontend β”‚ β”œβ”€β”€ src/ # React source code β”‚ └── public/ # Static assets β”‚ │── datasets/ # MRI datasets (not included in repo) │── requirements.txt # Python dependencies │── README.md # Project documentation


βš™οΈ Installation

1️⃣ Clone the Repository

git clone https://github.com/your-username/cancer-detection.git

cd cancer-detection

2️⃣ Backend Setup (Flask + PyTorch)

cd backend

python -m venv .venv

source .venv/bin/activate # (Linux/Mac)

.venv\Scripts\activate # (Windows)

pip install -r requirements.txt

Run the Flask server:

python app.py

3️⃣ Frontend Setup (React.js)

cd frontend

npm install

npm start


πŸ–₯️ Usage

  • Start the Flask backend.
  • Run the React frontend.
  • Upload an MRI scan via the UI.
  • Get predictions for cancer presence (positive/negative).

πŸ“¦ Requirements

All Python dependencies are listed in requirements.txt. Key libraries:

  • PyTorch
  • Flask
  • scikit-learn
  • numpy, pandas
  • opencv-python
  • matplotlib
  • React.js (frontend)

About

End-to-end cancer detection pipeline using MRI scans (Prostate & Breast) with PyTorch, Flask API, and React frontend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published