- Shayan Akhoondan - @Shayan414
- Shahbozbek Hakimov - @ShahbozbekH
- Andrew Ballard - @andrewb2011
- Krish Naik - @KrishNaik707
The dataset used for this project can be downloaded from this link.
To use the dataset and code in Google Collab:
- Download the dataset from the link above
- Open the notebook in a Google Collab environment
- Drag the zip file in the file directory on the left side of Google Collab
- Wait a few minutes for the folder to upload. There should be a circle-shaped progress bar at the bottom of the file directory
- Once the file is uploaded you can run the code blocks as necessary
Language: Python3
Development: Google Collab
Libraries: Tensorflow, NumPy, MatPlotLib
Medical misdiagnosis and malpractice are increasing concerns, with overworked professionals sometimes making errors. This project aims to provide radiologists with an assistive tool to diagnose brain tumors using a machine learning model trained on real-life MRI image data. This model serves as a reliable second opinion, reducing the risk of human error and ensuring timely and accurate diagnoses.
We utilized two labeled image sets from Kaggle. The primary dataset is split into training (80%) and testing (20%) sets, containing around 6000 and 2000 images respectively, of normal brains and brains with tumors. A second dataset, with 3200 images, is used to evaluate the model's performance on other data.
We implemented a Convolutional Neural Network (CNN) using the TensorFlow library due to its strong pattern recognition capabilities for processing images. Additional libraries such as NumPy and Matplotlib were used for data manipulation and visualization.
Our model achieved high accuracy in detecting brain tumors, demonstrating its potential as a reliable diagnostic tool. The scalability and runtime were optimized to ensure the model could process large datasets better.
We used two labeled image sets from Kaggle:
- Primary Dataset: Contains approximately 6000 training images and 2000 testing images, split into subfolders for normal brains and brains with tumors. Images are in JPEG format.
- Secondary Dataset: Contains about 3200 images for evaluating the model's performance on outside data.
The datasets provide a comprehensive benchmark for training and testing the model's accuracy and robustness.
Our primary approach was to use a Convolutional Neural Network (CNN) due to its efficacy in image pattern recognition. The steps included:
- Data Preprocessing: Normalizing and augmenting the MRI images to improve the model's generalization.
- Model Training: Using TensorFlow to build and train the CNN on the labeled datasets.
- Model Evaluation: Assessing the model's performance on the test set and secondary dataset.
- Python3: Primary programming language.
- Google Colab: Development environment for coding and testing.
- TensorFlow: For building and training the CNN.
- NumPy: For data manipulation.
- Matplotlib: For data visualization and creating accuracy graphs.
The source code is organized as follows:
- Import Libraries and Data:
- Model Setup and Data Augmentation:
- Model Traning and Validation Results:
- Model Evaluation on Test Dataset w/ Various Trends:
- Model Evaluation on Outside Dataset w/ Various Trends: