Coder Social home page Coder Social logo

aryakoureshi / brain-tumor-detection Goto Github PK

View Code? Open in Web Editor NEW
52.0 2.0 6.0 1.82 MB

Implementation of medical image segmentation and deep learning framework with CNN and U-net

Home Page: https://aryakoureshi.github.io/projects/BT_Detection

License: MIT License

Jupyter Notebook 78.32% Python 21.68%
deep-learning unet image-segmentation cnn keras-tensorflow neural-networks

brain-tumor-detection's Introduction

Brain-tumor-detection

The architecture was inspired by U-Net: Convolutional Networks for Biomedical Image Segmentation.


overview

Data

The original dataset is from Kaggle: Br35H::Brain Tumor Detection 2020, and I've downloaded it and making PNG annotations from JSON annotation, and done the pre-processing.

Since the original dataset has 500 images for training and this number is small, I collected more data from different sources and generated more data using Flimimg.py. You can find it in /ImageSegmentation/MakeMoreData/ and use this dataset to train your custom model.

You can by using this site: Makesense annotate your data and use the JsonAnnotation_to_PNGAnnotation.py to make the PNG annotations. You can find it in /ImageSegmentation/AnnotationMaker/ .

This Dataset has been used to train these models.


Model

Unet Architecture

This deep neural network is implemented with Keras functional API.


Training

U-net

The U-net model is used to segment tumors in MRI images of the brain. After 10 epochs of training, the calculated accuracy is about 98%. Loss function for the training is basically just a binary crossentropy You can download my trained model from U-net

CNN

The CNN model is used to detect whether a tumor is there or not. After 15 epochs of training, the calculated accuracy is about 99.6%. Loss function for the training is basically just a binary crossentropy You can download my trained model from CNN


How to use

Run detectBT.py

Or follow notebook and codes


Results

Use the trained model to do segmentation on test images. The result is satisfactory.

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.