An independent study to assess the usage of deep learning artificial intelligence (convolutional neural networks) in the field of medical image analysis (brain tumors and cancers).
This specific neural network is able to evaluate brain magnetic resonance imaging (MRI) scans to detect the presence of brain tumors / cancers.
Created by Azhaan Salam
-
Download this repository and cd into it.
-
On your terminal, execute
pip install -r requirements.txt
to install the packages necessary to using this program. -
To create and train the model, execute
python trainbrain.py train test model.h5
and wait for training to complete.The model is being trained on the
train
data split, and its accuracy is being evaluated on thetest
data split. Afterwards, it gets saved into a file namedmodel.h5
When prompted, confirm if you want to save the model or not.
The model is now setup and ready for use.
-
Obtain the scans you would like to get a diagnosis of and load it onto your computer.
-
Create an
input
folder, where images will be fed in, and anoutput
folder, where images will go when evaluated. -
To execute the diagnosis program, run
python braindiagnosis.py model.h5 [INPUT_FOLDER] [OUTPUT_FOLDER]
, replacing[INPUT_FOLDER]
and[OUTPUT_FOLDER]
with the path to your input and output folders. -
Move the scans into the
input
folder
The program will then output its diagnosis, and move each image into the output folder.
-azh