Skip to content

About

This project leverages deep learning techniques to assist in the early detection of breast cancer using ultrasound images. By training a Convolutional Neural Network on a dataset of breast ultrasound images, the model can classify tumors as benign or malignant with high accuracy. The project includes a user-friendly web interface bu

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Breast Cancer Detection with CNN and Gradio

This project demonstrates the use of a Convolutional Neural Network (CNN) to classify ultrasound images of breast tumors as benign or malignant. The project utilizes PyTorch for model training and Gradio for creating a user-friendly interface for predictions.

Table of Contents

  1. Installation
  2. Dataset
  3. Model Architecture
  4. Data Preparation
  5. Training the Model
  6. Evaluation
  7. Creating a Gradio Interface
  8. Running the Application
  9. License

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/Breast-Cancer-Detection-with-CNN-and-Gradio.git
    cd Breast-Cancer-Detection-with-CNN-and-Gradio
  2. Install the required dependencies:

    pip install -r requirements.txt

Dataset

The dataset used for this project is the Ultrasound Breast Images for Breast Cancer dataset from Kaggle.

  1. Download the dataset from Kaggle and extract it into a directory named data.

    kaggle datasets download -d vuppalaadithyasairam/ultrasound-breast-images-for-breast-cancer
    unzip ultrasound-breast-images-for-breast-cancer.zip -d data

Model Architecture

The model used in this project is a Convolutional Neural Network (CNN) with the following architecture:

  • 4 Convolutional layers with batch normalization and max pooling
  • 2 Fully connected layers
  • Dropout for regularization

Data Preparation

Data preparation includes transforming the images and splitting the dataset into training, validation, and test sets.

Training the Model

Training the model involves several epochs of forward and backward propagation using a defined loss function and optimizer.

Evaluation

Evaluation includes checking the model's performance on the validation set and using metrics such as accuracy, confusion matrix, and classification report.

Creating a Gradio Interface

We use Gradio to create an interface for users to upload images and get predictions.

Running the Application

Run the following command to start the Gradio interface:

python main.py

About

This project leverages deep learning techniques to assist in the early detection of breast cancer using ultrasound images. By training a Convolutional Neural Network on a dataset of breast ultrasound images, the model can classify tumors as benign or malignant with high accuracy. The project includes a user-friendly web interface bu

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages