# A Novel Method for Ground-Based Cloud Image Classification Using Transformer
## 5 Conclusions  
Transformer is a powerful deep neural network for processing sequences, but it has received little attention in the field of ground-based cloud image processing. In this paper, we apply Transformer to GCI and propose a novel GCI classification method. Different from traditional CNN-based methods, our method combines the Transformer and CNN models. Specifically, the CNN model is used as a low-level feature extraction tool to generate the local feature sequences of images, and Transformer effectively extracts long-distance dependencies between the sequences from the low-level feature. Using this method, both the local features and the global features of cloud images can be extracted. In addition, the center loss is introduced to supplement the cross-entropy loss to enhance the learning of supervised features. We evaluate the performance of the proposed method with three different GCI datasets. Compared with several other advanced methods, our method achieves the highest accuracy, with 94.24%, 92.73%, and 93.57% in the ASGC, CCSN, and GCD datasets, respectively. The proposed method shows the great potential of Transformer for GCI classification, and we will continue to study various improvements for Transformer to further improve the classification performance in the preceding work.  
Data curation, X.L., G.C. and L.Z.; investigation, C.W.; methodology, X.L. and B.Q.; resources, G.C.; Software, X.L.; supervision, B.Q.; validation, G.C. and C.W.; writing--original draft, X.L.; writing--review and editing, B.Q., C.W. and L.Z. All authors have read and agreed to the published version of the manuscript.  
This research was supported by the Joint Research Fund in Astronomy through a cooperative agreement between the National Science Foundation of China (NSFC) and the Chinese Academy of Sciences (CAS) under Grant No. U1931134 and through the Natural Science Foundation of Hebei under Grant No. A2020202001.  
The ASGC dataset was accessed from [[https://github.com/lixiaotong-su/All-Sky-Ground-based-Cloud](https://github.com/lixiaotong-su/All-Sky-Ground-based-Cloud)]([https://github.com/lixiaotong-su/All-Sky-Ground-based-Cloud](https://github.com/lixiaotong-su/All-Sky-Ground-based-Cloud)) (accessed on 5 July 2022). The CCSN and GCD datasets used in this work belong to open-source datasets available in their corresponding references within this manuscript.  
We would like to thank the anonymous reviewers for their constructive and valuable suggestions on the earlier drafts of this manuscript.  
The authors declare no conflict of interest.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Method**} & **ASGC** & **CCSN** & **GCD** \\ \cline{2-4}  & **Acc (\%)** & **Acc (\%)** & **Acc (\%)** \\ \hline DeepCloud & 85.67 & 85.15 & 84.76 \\ CloudNet & 85.05 & 84.42 & 84.24 \\ CGAT & 88.57 & 87.33 & 88.95 \\ GoogLeNet & 85.52 & 84.06 & 84.14 \\ VGG16 & 88.24 & 86.85 & 87.14 \\ ResNet34 & 89.05 & 87.58 & 88.05 \\ ResNet50 & 90.43 & 88.39 & 88.14 \\ DenseNet & 90.62 & 88.91 & 88.57 \\ MobileNet & 91.05 & 89.39 & 89.29 \\ EfficientNet-B0 & 91.38 & 89.67 & 89.90 \\ EfficientNet-B5 & 91.47 & 89.97 & 90.48 \\ ViT-B & 92.19 & 90.55 & 91.19 \\ ViT-L & 92.71 & 91.15 & 92.33 \\ Swin-T & 92.86 & 91.06 & 92.38 \\ Ours & 94.24 & 92.73 & 93.57 \\ \hline \hline \end{tabular}
\end{table}
Table 8: The classification results of different methods based on different datasets.