## 3 Methodology
### Feature Extraction
#### 3.4.1 Texture Feature (SFTA)  
Segmentation-based fractal texture analysis (SFTA) is a texture-based feature acquisition method [15]. The texture element is the most noteworthy trait of an image, which is utilized to identify and characterize the malware images and discover the similitudes between images of various malware families. SFTA is utilized for texture feature extraction because of its robustness and low computation cost. The SFTA extraction method can be partitioned into two parts, which are discussed below. First, the input grayscale image \(i(v,u)\) is broken down into a binary image. We utilize two-threshold binary deterioration (TTBD) for binary decomposition. Binary images are formulated in Equation (6). \[i_{b}(v,u)=\left\{ \begin{array}{cc}\&\xi_{0}^{1}\,if\,\,t_{low}\leq 1(v,u) \leq t_{up}\\ &\text{otherwise}\end{array} \right\}, \tag{6}\]  
where \(t_{low}\) is the lower threshold and \(t_{up}\) represents the upper threshold value. After applying TTBD to the gray level input image, the SFTA feature vector is developed as the fractal dimension size, mean gray level, and, furthermore, the SFTA feature vector. The fractal estimations are utilized to portray the complexity of malware image structures fragmented in the input image. The fractal dimension \(D_{i}\) is determined by using the boundary around an image. The boundary image, \(\Delta(v,u)\), is computed as follows:  
\[\left\{ \begin{array}{l}1\text{ if }\exists(v^{\prime},u^{\prime})\in N_{I=8}[(v,u )]:\\ I_{b}(v^{\prime},u^{\prime})=0\wedge\\ I_{b}(v^{\prime},u^{\prime})=1\\ 0\text{ otherwise}\end{array} \right\}, \tag{7}\]  
where \(N_{I=8}[(v,u)]\) is the connected 8 pixels to \((v,u)\), \(\Delta(v,u)\) in the event that the pixel at \((v,u)\) in the binary image \(I_{b}(v^{\prime},u^{\prime})\) has the value of 1 and having in any event one neighboring pixel with esteem 0. Otherwise, the value is 0. \(\Delta(x,y)\) takes the value of 0. Consequently, one can understand that the comings about outskirts are one pixel wide. The gray level mean size (pixel tally) supplements the data extracted from every binary image withoutessentially expanding the calculation time. Algorithm 2 and Figure 4 show the SFTA feature extraction process. ```
1:Grayscale image \(i(v,u)\) and two thresholds \(t_{low}\) and \(t_{up}\). 2:SFTA feature vector \(s_{1\times m}\). 3:\(T_{a}\leftarrow\) MultiLevelOtsus \(\left\{t_{low},t_{up}\right\}\)
4:\(T_{b}\leftarrow\left\{[t_{i},t_{i+1}]:t_{i},t_{i+1}\in T_{a},i\in\left[1\ldots \right]|T|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\!|\! level features are determined by an associated fully convolutional (FC) layer. The architecture of the neural network is shown in Figure 5.

In this paper we utilize two pre-trained CNN models (AlexNet [47] and Inception-V3 [48]) for feature extraction. These models link a convolution layer, pooling layer, normalization layer, ReLu layer, and FC layer. Deep convolution layer local feature extraction from an image is expressed in the following equations. Let us denote the \(M_{i}^{N}\) output layer \(N\), and \(b_{i}^{N}\) the base value, then, the filter for the \(j\)th feature map is \(\psi_{i,j^{\prime}}^{N}\), and \(h_{j}\) denotes the \(N-1\) th output layer. Then, the deep convolutional layers have the formulation as stated in Equation (8). \[M_{i}^{N}=b_{i}^{N}+\sum_{j=1}^{m_{1}}\sum_{i,j}^{N}\psi_{i,j}^{N}\times h_{j}^ {N-1} \tag{8}\]

The pooling layer extricates the most extreme returns from the lower convolutional layer with the goal of removing unnecessary features. The maximum pooling settles the issue of over-fitting and a 2 \(\times\) 2 matrix is performed on the extracted framework. Max pooling is depicted in Equations (9)-(11). \[f_{1}^{K}=f_{1}^{k-1}, \tag{9}\]

\[f_{2}^{k}=\frac{f_{2}^{k-1}-F(k)}{g^{k}}+1, \tag{10}\]

\[f_{3}^{k}=\frac{f_{3}^{k-1}-F(k)}{g^{k}}+1, \tag{11}\]

Here, \(S^{k}\) denotes the stride and \(f_{1}^{k}\), \(f_{2}^{k}\), and \(f_{3}^{k}\) are \(2\times 2\) and \(3\times 3\) filters for feature maps.