Skip to content

DoNguyenHung/Brain-Tumor-Detection

Repository files navigation

CS615: Final Project - Brain Tumor Detection with Multi-Class MLPs and CNNs

Kenneth Pan [email protected]
Amira Bendjama [email protected]
Ramona Rubalcava: [email protected]
Hung Do [email protected]


Code Usage:

This code was created to satisfy the work necessary for CS615 Final Project

Data:

The data used in this project was retrieved from Kaggle at this link:
https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset

Due to the size of the dataset, the dataset was unable to be attached to this submission. To recreate the folder structure of the dataset used for training and testing:

  1. Download the data from Kaggle
  2. Unzip from the archive folder
  3. Place the unzipped folders Training and Testing in a new folder named full
  4. Place this folder in the same directory as the Preprocessing.py script
  5. Run the Preprocessing.py script
  6. Verify that the dataset results in trainingfull.csv, trainingfull_labels.csv, testingfull.csv, testingfull_labels.csv

Folder structure:

The file strucutre is as follows:

Final_submission
├── Preprocessing.py - the script used to resize the images in the brain tumor MRI dataset
├── layers.py - the layers file used for construction of the MLP and CNN architectures
├── MLP.ipynb - the noteboook used to run the MLP network and generate graphs
├── CNN.py - the script used to train and validate the CNN architecture
└── CNN-2.py - the script used to train and validate the CNN architecture with 2 convolutional layers

Folder also includes images of the loss function and confusion matrix for both MLP and CNN

Running the code:

The only packages necessary for running the scripts are below:

pip install pandas
pip install numpy
pip install matplotlib
pip install cv2
pip install imutils
pip install tqdm

To recreate the results of MLP, make sure the notebook is in the same file location as the pre-processed data files. Then run all the cells of the notebook.

To recreate the results of the CNN, make sure the cnnp.py is in the same file lcoation as the pre-processed data files. Then run the .py file.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published