# A Novel Method for Ground-Based Cloud Image Classification Using Transformer
## 2 Method
### The EfficientNet-Based CNN  
Related studies have demonstrated that the local connection and weight-sharing characteristics of CNN provide the network with strong effectiveness and robustness in the local feature extraction of images [45; 46]. GCI classification can be regarded as  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer Name** & **Output Size** & **Output Channels** & **Layers** \\ \hline Conv (3 \(\times\) 3) & 224 \(\times\) 224 & 48 & 1 \\ MBConv1 (3 \(\times\) 3) & 224 \(\times\) 224 & 24 & 3 \\ MBConv6 (3 \(\times\) 3) & 112 \(\times\) 112 & 40 & 5 \\ MBConv6 (5 \(\times\) 5) & 56 \(\times\) 56 & 64 & 5 \\ Conv (1 \(\times\) 1) & 56 \(\times\) 56 & 48 & 1 \\ Linear Embedding and Block (4\(\times\)) & 56 \(\times\) 56 & 96 & 2 \\ Patch Merging and Block (8\(\times\)) & 28 \(\times\) 28 & 192 & 2 \\ Patch Merging and Block (16\(\times\)) & 14 \(\times\) 14 & 384 & 6 \\ Patch Merging and Block (32\(\times\)) & 7 \(\times\) 7 & 768 & 2 \\ Average Pooling & \(1\times\) 1 & 768 & 1 \\ Layer Norm & \(1\times\) 1 & 768 & 1 \\ Fully Connected & \(1\times\) 1 & - & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The details of the proposed model.  
Figure 1: Overall architecture of the proposed method.  
a fine-grained classification task that requires more information for extracting the low-level features of images than natural image classification, so the use of CNN is necessary. CNN is mainly composed of a convolutional layer, a pooling layer, and a fully connected layer. The convolutional layer learns the representation information in the image through different kernels; the pooling layer plays the role of downsampling, thus filtering useful feature information; and the fully connected layer maps the learned distributed feature representations to the sample label space, thus predicting the sample class.  
EfficientNet [47] is an efficient network developed by Google Research using neural network architecture search technology. It optimizes the three factors of network depth, the number of channels, and the input image resolution according to the same fixed scale factor, with the advantages of high efficiency and accuracy. EfficientNet is stacked by Mobile Inverted Bottleneck Convolution (MBConv) in MobileNet [48]; the structure of MBConv is shown in Figure 2. For the main branch, the input feature map first passes through a convolution layer when the kernel size is \(1\times 1\) and a depthwise convolution layer when the kernel size is \(3\times 3\) or \(5\times 5\), both of which are followed by the addition of a Swish activation function [49], a batch normalization (BN) layer, and an input Squeeze and Excitation (SE) module [50], followed by a convolutional layer and a dropout layer. Finally, the output of the main branch and the input branch are summed to obtain the final output of the module. Among them, the first convolutional layer is used to increase the dimensionality of the feature map. When the increased multiplier is 6, the module is called MBConv6, and MBConv1 can be obtained for the same reason. The original EfficientNet-B0 contains thirty-nine layers MBConv, and using all layers is not the best choice for the GCI feature extraction. Therefore, only some layers are selected to form the new CNN model in this paper. Specifically, we use thirteen layers MBConv and remove the pooling and fully connected layers from the original model, and the detailed structure is shown in the CNN section in Figure 1.