Kenneth Pan [email protected]
Amira Bendjama [email protected]
Ramona Rubalcava: [email protected]
Hung Do [email protected]
This code was created to satisfy the work necessary for CS615 Final Project
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:
- Download the data from Kaggle
- Unzip from the archive folder
- Place the unzipped folders Training and Testing in a new folder named full
- Place this folder in the same directory as the Preprocessing.py script
- Run the Preprocessing.py script
- Verify that the dataset results in trainingfull.csv, trainingfull_labels.csv, testingfull.csv, testingfull_labels.csv
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
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.