## 4 Proposed Method  
### Deep Learning for Feature Extraction  
This section presents detailed information about the implementation of MobileNetV3 used in our framework for medical image feature extraction. To benefit from the transfer learning technique, we used the pre-trained weights of MobileNetV3 on the ImageNet dataset [56] to acquire the knowledge of previously trained models with different settings and to fine-tune the weights on the medical datasets used in our study. The model takes a \(224\times 224\) image as an input and outputs a feature vector of size 128 to be exploited in the feature selection phase. In addition, we only trained specific layers of the model to reduce the training time and the model size; the top layers were replaced with \(1\times 1\) point-wise convolution layers for the extraction of features and classification of images. Figure 2: Steps of the AHA. More specifically, the weights of MobileNetV3 were kept fixed during the fine-tuning process, which included 16 bottleneck layers, a 2D convolution layer, and an adaptive average pooling layer, as shown in Figure 3. Meanwhile, we updated the weights of the new layers during the training process, and they replaced the vanilla MobileNetV3 classifier's layers (top layers) with two \(1\times 1\) point-wise convolution layers for feature extraction and classification, respectively. Our experiments used different medical image datasets to fine-tune the MobileNetV3-Large version of the MobileNetV3 and perform feature extraction. Figure 3 shows the model architecture that was implemented and integrated as the backbone feature extractor of our proposed framework. MobileNetV3 was fine-tuned to boost performance in medical image classification, where the learned activation values of a certain layer were stored as vectors representing the input images. The model was composed of 16 bottleneck layers [56] containing inverted residual blocks, which were kept fixed during the fine-tuning process, and only the top layers were used to learn the characteristics of the training samples from each medical dataset. The inverted residual blocks' core component was the depthwise separable convolution layer. In addition, in a certain layer, the depthwise separable convolution layer could contain a squeeze-and-excite (SE) block [53], which was used for relevant feature selection on a channel-wise basis. A \(3\times 3\) depthwise separable convolution replaced the point-to-point convolution by using one filter for each input channel, which helped to reduce the model's computational complexity. The \(1\times 1\) point-wise convolution was used on all of the channels in the inverted residual block to convert the output into a linear combination, which can be seen as a multilayer perceptron (MLP). The depthwise separable convolution block consisted of four different components placed in the following order: \((1\times 1 Conv)\rightarrow(BN)\rightarrow(ReLU/h\text{-}swish) \rightarrow(3\times 3 Conv)\rightarrow(BN)\rightarrow(ReLU/h\text{-}swish) \rightarrow(1\times 1 Conv)\rightarrow(BN)\rightarrow(ReLU/h\text{-}swish)\). Two types of activation functions were used interchangeably in the model; these were the rectified linear unit (ReLU) and a function recently proposed by [57, 58] named _h-swish_. The _h-swish_ activation function integrates the ReLU6 activation function to reduce the computational resources on small devices and replace the sigmoid function [57], as defined in Equation (21). Figure 3: The architecture of the model used for feature extraction. \[ \begin{split} h\text{-}swish(x)=x\cdot\sigma(x)\\ \sigma(x)=\frac{ReLU6(x+3)}{6}\end{split}  \tag{21}\]  
where \(\sigma(x)\) represents the piecewise linear hard analog function. Furthermore, we placed a \(1\times 1\) point-wise convolutional layer before the final classification layer to perform feature extraction, where the output of this layer was flattened to form the feature vectors.