Training Time
ResNet-34: 4,721 seconds
TumorNet: 919 seconds
TumorNet is a custom convolutional neural network (CNN) designed to detect and classify brain tumors from MRI imaging. Built in PyCharm, the model was optimized for efficient classification tasks without sacrificing performance.
The network begins with three convolutional layers, each followed by max pooling to progressively reduce spatial dimensions while capturing hierarchical features. The first layer processes single-channel input images with 64 filters, while subsequent layers increase to 128 and 256 filters, enabling extraction of increasingly complex features.
After convolution and pooling, the model flattens feature maps and transitions to fully connected layers, reducing feature dimensionality from 4096 to 1024 and finally to an output size of 4—corresponding to the four tumor classes. ReLU activations are used throughout, keeping the architecture lightweight yet effective.
To evaluate accuracy and efficiency, TumorNet was tested against ResNet-34, a state-of-the-art deep learning model. Figures 2 and 3 show training and validation loss curves: both models follow similar trends, though TumorNet exhibits a slightly larger generalization gap. Despite this, TumorNet consistently achieved higher performance with a test accuracy of 90% compared to 88% for ResNet-34.
Figures 4 and 5 provide confusion matrices for both models. TumorNet produced notably fewer false positives—a critical improvement for medical applications where minimizing incorrect positive diagnoses is essential.
ResNet-34 required an extra fully connected layer to adapt to the four-class problem, making it heavier than TumorNet’s purpose-built design. TumorNet’s streamlined architecture resulted in significant efficiency gains:
ResNet-34: 4,721 seconds
TumorNet: 919 seconds
ResNet-34: 12s per image
TumorNet: 2s per image