Brain Tumour Detection Project Using Deep Learning From MRI Image

Brain tumors are one of the most critical and life-threatening conditions affecting the human brain. Early and accurate detection of brain tumors is crucial for effective treatment planning and improving patient outcomes. However, manual detection and diagnosis from MRI (Magnetic Resonance Imaging) scans can be time-consuming, prone to human error, and require expert radiologists.

This project focuses on automating the process of brain tumor detection using deep learning techniques. By leveraging the power of Convolutional Neural Networks (CNNs), we aim to create a model that can accurately classify MRI images into tumor and non-tumor categories. The trained model is then integrated into a user-friendly web application developed using Flask, allowing healthcare professionals and researchers to easily upload MRI images and receive real-time predictions.

Data Preprocessing

  • Data Acquisition: The MRI images and their labels were obtained from this Kaggle dataset. It provides a diverse set of brain images, crucial for training a robust model.

  • Data Augmentation: To enhance the model's ability to generalize and to mitigate overfitting, I used TensorFlow's ImageDataGenerator. This tool allowed for augmenting the images in various ways (like rotation, zoom, flip) to artificially expand the dataset.

  • Normalization and Resizing: Each image was resized to a standard dimension and normalized to ensure uniformity in the input data, which is important for effective training of the CNN.

  • Train-Test Split: The dataset was split into training and test sets. The training set is used to train the model, while the test set helps in evaluating its performance on unseen data.

Model Structure

The CNN model used in this project is a sequential model composed of several Convolution2D and MaxPooling2D layers, carefully structured for effective image classification:

  • Convolution Layers: The model includes multiple Conv2D layers with 128 and 256 filters. These layers are responsible for extracting features from the images. The first two convolution layers have 128 filters each, followed by another set of two with the same number. The next four convolution layers have 256 filters each.

  • Pooling LayersMaxPooling2D layers are used after certain convolution layers to reduce the spatial dimensions (width and height) of the output volume, helping to reduce the number of parameters and computation in the network.

  • Output Layer: The final layer of the model is a Dense layer with neurons equal to the number of classes, using a 'softmax' activation function for multi-class classification. This allows the model to output a probability distribution over the classes.

  • Optimization and Loss Function: The model is compiled with the Adamax optimizer and categorical cross-entropy loss function. This combination is chosen for effective learning and generalization in multi-class classification tasks.

  • Parameters and Size: The total number of parameters in the model is 3,763,940 (14.36 MB). All these parameters are trainable, ensuring that the model can learn complex patterns in the data.

This structure is designed to effectively capture the intricate patterns in MRI brain images, leading to accurate classification of brain tumors.

Technology Used in the project :-

  1. We have developed this project using the below technology
  2. HTML : Page layout has been designed in HTML
  3. CSS : CSS has been used for all the desigining part
  4. JavaScript : All the validation task and animations has been developed by JavaScript
  5. Python : All the business logic has been implemented in Python
  6. Flask: Project has been developed over the Flask Framework

Supported Operating System :-

  1. We can configure this project on following operating system.
  2. Windows : This project can easily be configured on windows operating system. For running this project on Windows system, you will have to install
  3. Python 3.8, PIP, Django.
  4. Linux : We can run this project also on all versions of Linux operating systemMac : We can also easily configured this project on Mac operating system.

Installation Step : -

  1. python 3.8.0
  2. command 1 - python -m pip install --user -r requirements.txt
  3. command 2 - python app.py

Buy Now Source Code ₹1501

Posted in Machine Learning Projects With Source Code and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .