Giter VIP home page Giter VIP logo

brain_tumor_edge_detection's Introduction

brain_tumor_edge_detection

Dataset

The dataset used was from kaggle https://www.kaggle.com/navoneel/brain-mri-images-for-brain-tumor-detection

Preprocessing

  • Creating a function for augmenting the dataset
    1. Rotating range 10
    2. Width shift range of 0.1
    3. Height shift range of 0.1
    4. Shear range 0.1
    5. Brightness range 0.3 and 1.0
    6. Horizontal flip
    7. Vertical flip
  • Reading the data
  • Applying augmentation and then storing the data

Loading Data

  • Read the data
  • Print the length of the data
  • Print count plot for the classes
  • Convert image to gray scale
  • Splitting the dataset
  • Convert the train and test to numpy array
  • Plotting some of the images with lable
  • Reshape the train and test and then normalize the dataset
  • Printing the shape

Model

  • Making a CNN model
    1. Convolutional layer with 32 neurons and 5,5 filter
    2. Leaky relu as activation
    3. Maxpooling with filter 2,2
    4. Convolutional layer with 128 neurons and 5,5 filter
    5. Leaky relu as activation
    6. Convolutional layer with 64 neurons and 5,5 filter
    7. Leaky relu as activation
    8. Convolutional layer with 32 neurons and 5,5 filter
    9. Leaky relu as activation
    10. Maxpooling with filter 2,2
    11. Flatten Layer
    12. Dense layer with 1000 neurons
    13. Leaky relu as activation
    14. Dropout of 0.5
    15. Dense layer with 500 neurons
    16. Leaky relu as activation
    17. Dropout of 0.5
    18. Dense layer with 250 neurons
    19. Leaky relu as activation
    20. Dense layer with 1 neuron and sigmoid activation
  • Print model summary
  • Compile model
  • Fit model for 100 epoch
  • Get the testing accuracy and loss
  • Plot the training and validation accuracy and loss
  • Print classification report
  • Print confusion matric
  • Plot the incorrect and correct predictions with correct labels
  • Send positive images to matlab

Edge Detection

  • Preprocess the input image
  • Apply thresholding
  • Apply morphological operations
  • Display image with red border around the tumor

brain_tumor_edge_detection's People

Contributors

the-swapster avatar

Watchers

 avatar

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.