## 3 Research Methodology
### Proposed Approach  
The proposed research methodology is depicted in Figure 1, which demonstrates an abstract view of the proposed TL-based approach for brain tumor classification using MRI images. The proposed TL-based brain tumor classification comprises the following steps. Firstly, we downloaded the freely available Kaggle MR image dataset [35], including glioma, meningioma and pituitary MR images, and we placed the dataset into the training directory. Secondly, we employed imageDataStore to read the MR images of the dataset from the training directory. In the third step, we applied a data augmentation technique to test the generalizability of the TL models. Data augmentation, or increasing the amount of available data without acquiring new data by applying multiple processes to the current data, has been proven to be advantageous in image classification. Due to the limited number of images in the dataset, we applied the data augmentation technique in this study. The images in the training set were rotated at a random angle between \(-20\) and \(20\) degrees, and were arbitrarily translated up to thirty pixels vertically and horizontally to create additional images. It is also worth noting that the imageDataAugmenter function was utilized to dynamically create sets of augmented images during each training phase. The number of images in the training set was significantly expanded using this data augmentation method, enabling more effective use of our DL model by training with a much higher number of training images. Furthermore, the augmented images were only used to train the proposed framework, not to test it; hence, only real images from the dataset were utilized to test the learned framework. In the fourth step, the input MRI images of the dataset were resized according to the pre-trained CNN model's input image requirements. The images in the dataset were of various sizes, and different models required input images of various sizes, such as the TL mobilenetv2 classifier, accepting 224 \(\times\) 224 input images, and the inceptionv3 classifier, requiring 229 \(\times\) 229 input images. Therefore, before being inserted into the DL network, the training and testing images were automatically scaled utilizing augmented image data stores of TL. Next, we employed different pre-trained deep neural networks, i.e., Inceptionresnetv2, Inceptionv3, Xception, Resnet18, Resnet50, Resnet101, Shufflenet Densenet201 and Mobilenetv2, to identify their performance in identifying and classifying different kinds of brain tumors. The proposed TL models consisted of layers from the pre-trained networks and three new layers, i.e., the last three layers modified to suit the new image categories (meningioma, pituitary and glioma). The transfer learned models had a softmax layer, classifying images into meningioma, pituitary and glioma. For example, for \"Inceptionv3\" and \"InceptionResNetV2\", we replaced \"predictions\", \"predictions_softmax\" and \"ClassificationLayer_predictions\" with a \"fully connected layer\", a \"softmax layer\" and a \"classification output\" layer. We connected the additional layers to the network's last remaining transferred layer, i.e., \"avg pool\". We replaced the network's last three lay  
Figure 1: Overview of the proposed method for brain tumor classification. ers, i.e., \"fc1000\", \"fc1000_softmax\" and \"ClassificationLayer_fc1000\", with a \"completely connected layer\", a \"softmax layer\" and \"classification output\" layers for \"ResNet50\" and connected the additional layers to the network's last remaining transferred layer (\"avg pool\"). Similarly, we replaced the \"fc1000\", \"prob\" and \"ClassificationLayer_predictions\" layers of the network with a \"fully connected layer\", a \"softmax layer\" and a \"classification output\" layer for \"ResNet101\" and connected the new layers to the network's last remaining transferred layer (\"pool5\"). The detailed structure of the proposed DL framework is shown in Figure 2, extended from the concept of TL.