An example of integrating image classification into an FL system
We learned about how to initiate an FL process with a minimal example. In this section, we will give a brief example of FL with image classification (IC) using a CNN.
First, the package that contains the image classification example code is found in the examples/image_classification/
folder in the GitHub repository at https://github.com/tie-set/simple-fl, as shown in Figure 5.3:
Figure 5.3 – The image classification package
The main code in charge of integrating the IC algorithms into the FL systems is found in the classification_engine.py
file.
When importing the libraries, we use a couple of extra files that include CNN models, converter functions, and data managers related to IC algorithms. The details are provided in the GitHub code at https://github.com/tie-set/simple-fl.
Next, let’s import some standard ML libraries as well as client libraries from the...