# Federated Learning for Clients' Data Privacy Assurance in Food Service Industry
## 5 Results and Discussion
### Privacy and Performance Trade-Off  
As already discussed, the primary goal of using FL is to improve clients' data privacy. However, there would be a privacy and model performance trade-off. We considered two scenarios to evaluate at what cost we can have more privacy compared to a centralized approach. In the first scenario (S1), we combined data from eight clients and used it for training and evaluation of the model (81,961 frames) and tested the trained model on clients 9 and 10 (the two most recent data we collected, 9106 frames). The first scenario was performed for both classification and segmentation tasks. For the classification task, we achieved 96.36% accuracy, 97.32% precision, 95.96% recall, 96.84% specificity, and 96.64% F-score for testing the model on client 9. By testing the model on client 10, we could achieve an accuracy of 95.68%, a precision of 96.63%, a recall of 95.93%, a specificity of 95.34%, and an F-score of 96.28%. For the segmentation task, we could also achieve a mean IoU of 93.21% for client 9 and a mean IoU of 91.73% for client 10. In the second scenario (S2), we combined data from all ten clients (91,067 frames) and used 70% of it for training, 20% for validation, and 10% for testing. We believe this scenario could result in the highest performance because the data from all the clients could be part of training, validation, and testing. For the classification task, the model had an accuracy of 97.81%, precision of 98.03%, recall of 97.71%, specificity of 97.91%, and F-score of 97.87%. For the segmentation task, the model had a mean IoU of 95.87. For more clarification, the comparison between the model performance for the FL and centralized (S1 and S2) approach is shown in Figures 7 and 8. If we consider client 9 in Figure 7, by testing the model trained using the FL approach, we could achieve an accuracy of 95.84, which is 0.52% less than the S1 and 1.97% less than S2. This comparison shows that by losing a negligible amount of performance, we can preserve the privacy of the client's data. Similarly, for the segmentation task, in Figure 8, by comparing the result for client 10 we can see the difference between the FL approach, S1, and S2 is 2.28% and 6.42%, respectively, which is reasonably acceptable performance. Figure 6: FL semantic segmentation model performance on new client’s dataset. (**A**) Raw frames captured by CIS-D. (**B**) Segmented frames by FL model. (**C**) Annotated frames by human experts. Sanitization and infection prevention is of the utmost importance in food service establishments such as restaurants and institutional kitchens, since they are the most common places where outbreaks of foodborne illnesses occur. They must prevent food contamination and also must deal with potential infection spread among workers and customers. Beyond zero tolerance legal requirements and damage to institutional, brand, or restaurant reputation, loss of trust between workers and customers can be very costly [48]. Restaurants and other institutional kitchens may benefit from new technology such as the SafetySpect sanitization inspection technology, which can assist these establishments in maintaining a safer environment and a higher level of cleanliness. However, there might be doubts and concerns between companies and institutions that using new technologies such as CSI-D could raise privacy issues, and the leak of sensitive information could harm their reputations. To clear such doubts and concerns, this paper focuses on incorporating a data safety approach into the sanitization monitoring technology. We used federated learning, a new paradigm in machine learning that trains a model on client devices so that no private data is shared with other parties. FL can play a crucial role in designing scalable artificial intelligence (AI) technology when it is challenging to build up data-sharing agreements across clients or organizations. Recently, FL has been shown to be useful in  
Figure 8: Privacy performance trade-off for the segmentation task.