Tumor Classification
6,689 MRIs categorized into No tumor, Glioma tumor, Meningioma tumor, and Pituitary tumor diagnoses
Sequential layers including MaxPooling, Dropout, Flatten and Dense
95% of Accuracy predicting Tumors
Test made with testing dataset and an external MRI
Google Colab
Python
Tensorflow
Keras
Seaborn
Matplotlib
Technological advancements have greatly influenced medical diagnosis. In oncology, the introduction of Magnetic Resonance Imaging (MRI) has had a significant impact on the detection of neoplasms, commonly known as tumors. Given the critical importance of the brain in internal body functions and behavior, determining the correct diagnosis from MRIs has traditionally been a task reserved for human experts. However, this study explores the potential of Deep Learning models, specifically training a Convolutional Neural Network (CNN) with MRIs and diagnoses previously determined by human oncologists. The trained model was then employed to predict diagnoses for MRIs it had not been trained with, evaluating its performance in comparison to human experts.
The dataset used comprises 6,689 MRIs categorized into No tumor, Glioma tumor, Meningioma tumor, and Pituitary tumor diagnoses. Coronal, sagittal, and axial views were included in the analysis.
No Tumor
Glioma
Meningioma
Pituitary
The dataset was split into training set (70%), validating set (10%), and testing set (20%). The validation set was utilized to validate the model at the end of each epoch and tune it with new information, checking for potential overfitting. The testing dataset was used to evaluate the final trained model's performance.
The selected model architecture is a sequence of neuron layers, including:
ReLU activation function was used for its quick convergence and computational efficiency.
In total the model fitted 3,697,396 parameters in 20 epochs.
The Adam (Adaptive Moment Estimation) optimizer was employed, dynamically adjusting the learning rate based on individual weights through the incorporation of the first and second moments of the gradient.
To evaluate the model at each epoch, the Loss function and Accuracy was calculated for training dataset and validation dataset.
The Loss function used is Sparce Categorical Cross Entropy, which is specific for Multiclass Classification models. This Loss function is basically the negative sum of every true value multiply by the activation function selected for the last layer, in this case is Softmax. This value quantifies the error of the model, therefore the lower the better.
The Accuracy is the percentage of perfect predicted classification. It is useful to quantify the goodness of the classification model prediction. The higher the better.
With the Loss and Accuracy calculated for each epoch and for training and validation dataset, we can compare them to see sings of overfitting or underfitting.
Finally, the Accuracy for testing dataset was quantified to see how good the model with completely new data is.
To manage the image dataset the pipeline architecture from Keras library was used. For the Convolutional Neural Network and the rest of the layers, the Layers module from Keras library was used. To plot figures and charts Matplolib and Seaborn was used.
The Loss and Accuracy for training and validation datasets follow a decreasing and ascending trend, respectively, indicating a good model performance with relatively low overfitting across the epochs. The final Loss values are 0.03 and 0.16 for training and validation datasets, respectively. For Accuracy, the final values are 0.99 and 0.97 for training and validation datasets, respectively.
Testing the model with the testing dataset reveals an Accuracy of 0.95, indicating that 95% of the MRIs were correctly classified by the model.
A final test was conducted with an MRI from Radiology from St. Vincent's University Hospital, classified as Meningioma, which the model correctly predicted as Meningioma.
External Test: Meningioma
This study does not aim to replace human medical attention with AI algorithms but suggests that Convolutional Neural Network models can provide supportive assistance in diagnosing three types of tumors using MRIs, achieving a 95% confidence level compared to oncologists' diagnoses.
This approach could be complemented by an analysis of symptoms and other relevant exams to increase overall accuracy in diagnosing diseases like cancer. An interconnected group of models could lead to an automated diagnosis, potentially speeding up the diagnostic process and providing specialized medical services to patients who may be geographically or economically restricted.