## 1 Introduction
At this point, each client does not send data to the central server but only exchanges weights and cluster information of the trained model. This ensures data privacy and the ability to analyze images globally with the ViT model to classify fire, smoke, and normal conditions with high accuracy. The proposed model is based on a pretrained ViT model on the server to extract features from the data. The ViT model is a powerful deep learning model that can learn the global features of images. In this study, this model is used to extract important features for classifying fire, smoke, and normal images. Based on these features, the server clusters the data using the bisecting K-means algorithm to obtain global cluster information (GCI). The GCI contains information about the center point and data distribution for each cluster, and the server delivers this information to each client to help them learn from local data. Each client clusters the local data based on the GCI received from the server. The client applies the K-means algorithm to cluster its local data, and in doing so, it evaluates how well the client data match the model trained by the server by referring to the GCI provided by the server. This evaluation allows the client to perform additional training on its local data and fine-tune the initial weights received from the server. Thus, each client sends its local training results back to the server, which synthesizes the client information to improve continuously the performance of the global model. Based on the weights and clustering information received from each client, the server ensembles the weights to improve performance. During this process, the server updates the GCI, taking into account the differences and imbalances in the characteristics of the data learned by each client and sends new weights to the clients. The process of learning and sending weights between the server and clients is repeated, and the model performance improves gradually with each iteration. In each round, clients send information, which they learned about their local data,to the server. The server uses this information to update the global model. Thus, the server builds a more sophisticated model and adjusts it to reflect uniformly the data of the client. Compared to the CNN-based model, the ViT model performed better in terms of clustering accuracy and stability, while the CNN model performed relatively well in the early rounds, it showed a gradual degradation in performance as the rounds progressed. In particular, while CNNs are good at learning local features, they have limitations in learning global patterns. This limitation was more pronounced for the clustering problem, and the performance degradation of the CNN model accelerated in a federated learning environment where data were distributed across multiple clients. The ViT model, on the other hand, was very strong at learning global relationships in images. ViT effectively learned the relationships between each patch in the clustering task through its transformer structure, maintaining higher clustering accuracy compared to the CNN model. The ViT-based model showed minimal performance degradation as rounds progressed and performed particularly well on clients with unbalanced data distribution. These results suggest that ViT can provide a more robust and stable performance than CNN when processing data from a variety of clients in a federated learning environment. Thus, we found that the ViT model is superior to the CNN model in learning the global characteristics of the data and maintaining high performance on clustering tasks. This further highlights the strengths of ViT, especially in federated learning structures that require distributed processing of data in a variety of environments. The proposed model can solve the problem of data imbalance and improve the overall classification performance through FL between the server and clients. FL that reflects the data characteristics of each client can be achieved while ensuring data privacy.