Skip to content

LVH-Tony/braintumor-identification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Brain Tumor Image Classifier ๐Ÿฅ

This project is about building a Brain Tumor Image Classifier using Convolutional Neural Networks (CNNs) and Transfer Learning.

๐Ÿ“ Project Overview

The project uses a dataset of brain images stored in a structured folder. The images are extracted in an auto-labelled fashion using Keras' flow_from_directory. The images are of different sizes, which is a problem for CNNs as they expect all images to have the same size. Therefore, the images are cropped from the center to ensure they all have the same size. Data Augmentation is used to generate more training data.

๐Ÿš€ Setup

Requirements

  • Python 3.6 or above ๐Ÿ
  • TensorFlow 2.0 or above ๐Ÿง 
  • Keras ๐Ÿงช
  • Matplotlib ๐Ÿ“Š
  • Numpy ๐Ÿงฎ

Installation

  1. Clone the repository:
git clone https://github.com/LVH-Tony/braintumor-identification.git
cd braintumor-identification
  1. Install the required packages:
pip install -r requirements.txt

๐Ÿ› ๏ธ Usage

  1. Prepare your dataset by placing your images in a structured folder. The images should be auto-labelled and extracted using Keras' flow_from_directory.

  2. Run the script:

python brain_tumor_classifier.py

๐Ÿค– Models

Two models are used in this project:

  1. A custom Convolutional Neural Network (CNN) model.
  2. A model built using Transfer Learning with VGG16.

๐Ÿ“ˆ Results

The custom CNN model achieved a training accuracy of ~95% and a testing accuracy of ~72%. The Transfer Learning model achieved a training accuracy of ~98% and a validation accuracy of ~91%.

๐Ÿ‘ฅ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“œ License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published