Skip to content

Sfeso13/Breast-Cancer-Classifier-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balance Scale Breast Cancer Classifier App

Flask Keras TensorFlow Python HTML

A simple web-based image classification app built with Flask and Keras.
It allows users to upload an image, processes it with a trained CNN model, and returns the predicted class — all through an intuitive web interface.


Bookmark Tabs Table of Contents


Film Projector About

This project integrates a Convolutional Neural Network (CNN) model, and precisely the VGG19 model (I might change it in the future since this model is kinda overkill for this use case), with a Flask backend to classify images in real-time.
It’s designed as a minimal full-stack machine learning application — a foundation for deploying deep learning models as web services.

Key Components:

  • 2 trained Keras models (vgg19.h5 and sequential_model_cnn.h5)
  • A Flask API for serving predictions
  • File upload and image preprocessing via OpenCV and NumPy
  • Optional CORS setup for cross-origin frontend requests

Control Knobs Features

  • ✅ Upload any image through a browser or API request
  • ✅ Preprocess image input using OpenCV (resize, normalize, reshape)
  • ✅ Predict class probabilities with trained Keras models
  • ✅ Return results as clean JSON or HTML
  • ✅ Modular and easy to expand for other models or categories
  • ✅ Runs locally with or without GPU (TensorFlow handles fallback)

Card File Box Project Structure

Click to expand
cnn_app/
├── app.py
├── models/
│ ├── sequential_model_cnn.h5
│ └── vgg19.h5
├── templates/
│ ├── predictions.html
│ └── index.html
├── requirements.txt
└── README.md

Gear Setup

NOTE: This repo uses Git LFS to store large model files. Make sure you have Git LFS installed:

  1. Clone the repository
git lfs install
git clone https://github.com/Sfeso13/Breast-Cancer-Classification-App.git

If you already cloned without LFS:

git lfs pull
  1. Create and activate a virtual environment
cd Breast-Cancer-Classification-App
python3 -m venv venv

Linux/macos

source venv/bin/activate

or windows

venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt

Abacus Usage

  1. Run the app
python app.py

Now you can visit

http://127.0.0.1:5000

And upload an image to get its classification

About

A web-based image classification app for breast cancer detection using custom trained CNN models with Flask. Upload an image, get predictions, and visualize results through an intuitive interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors