Giter Club home page Giter Club logo

brain-tumor-detection's Introduction

Brain-Tumor-Detection

This repository contains Brain Tumor detection model using a Convolutional Neural Network in Tensorflow & Keras.

The model Uses brain MRI images dataset founded on Kaggle - https://www.kaggle.com/navoneel/brain-mri-images-for-brain-tumor-detection . The dataset contains 2 folders: The folder yes contains 155 Brain MRI Images that are tumorous and the folder no contains 98 Brain MRI Images that are non-tumorous.


Data Augmentation

There wasn't enough examples to train the neural network. Also, data augmentation was useful in taclking the data imbalance issue in the data.

Before data augmentation, the dataset consisted of: 155 positive and 98 negative examples, resulting in 253 example images.

After data augmentation, now the dataset consists of: 1085 positive and 980 examples, resulting in 2065 example images.

Note: these 2065 examples contains also the 253 original images. They are found in folder named 'augmented data'.

Data Preprocessing

For every image, the following preprocessing steps were applied:

  1. Crop the part of the image that contains only the brain.
  2. Resize the image to have a shape of (240, 240, 3). So, all images should have the same shape to feed it as an input to the neural network.
  3. Apply normalization

The data was splitted as follows -

  • 70% of the data for training.
  • 15% of the data for validation.
  • 15% of the data for testing.

Conclusion:

Now, the model detects brain tumor with:

  • 83.6% accuracy on the test set.
  • 85.87% f1 score on the test set.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.