Brain Cancer MRI Classification Using Convolutional Neural Network Architectures Optimized via Grid Search and Coordinate Ascent

Magnetic Resonance Imaging (MRI) is an important tool for brain cancer diagnosis and classification. Combined with modern Convolutional Neural Network (CNN) technology, it can effectively improve the accuracy and efficiency of tumor classification, providing critical references for clinicians. Prior studies have demonstrated the advantages of CNNs in medical image classification. However, in-depth investigations into the performance differences among CNN models for brain cancer MRI image classification tasks and their hyperparameter optimization remain insufficient, limiting model selection and accuracy improvement in clinical applications. This study aims to provide a CNN model selection and optimization methodology for brain cancer MRI image classification to improve classification accuracy and reliability. CNN models of varying depth and complexity, including LeNet-5, AlexNet, and ResNet-18, are selected, and Grid Search Enhanced with Coordinate Ascent (GSECA) is employed for hyperparameter optimization, furnishing a feasible model selection and optimization methodology for brain cancer MRI image classification. Experimental results demonstrate that the proposed method achieves excellent performance on the PMRAM four-class brain cancer MRI image dataset from Bangladesh. The ResNet-18-based classifier attains a test accuracy of 95.69%, with F1 scores of 94.33% (Glioma), 94.07% (Meningioma), 96.12% (Normal), and 98.21% (Pituitary) across the four classes, respectively. Notably, the precision for the Pituitary class reaches 99.10%. These results significantly outperform AlexNet and LeNet-5, ranking at an excellent level among comparable studies and achieving effective model selection. Meanwhile, the importance of network depth and effective hyperparameter optimization for boosting classification performance in such tasks is confirmed.