## 5 Results
### Comparison with Other Solutions  
Table 7 provides a comprehensive comparison of key attributes across several related works in this field. Some key observations are the following.  
Figure 12: Power consumption profile of image capture + preprocessing + inference.  
Figure 13: Power consumption profile of data packet transmission via NB-IoT.  
As can be seen from the table, various platforms were used across the related works, including Raspberry Pi models (RPi3b+ and RPi Zero W) and smartphone devices. Our approach utilizes Espressif's ESP32, a low-power MCU, which represents a significant contribution in terms of energy efficiency compared to the other solutions that rely on more power-demanding devices.  
In contrast to previous systems that utilize different ML frameworks, such as TensorFlow (TF) or Darknet, our approach employs a lightweight, custom-made, barebone CNN architecture, optimized for direct training on edge devices. Furthermore, our method integrates CNNs with FL, which sets it apart from earlier works that do not leverage this technique.  
Power consumption is a critical factor in embedded systems, especially those deployed in resource-constrained environments. As previously mentioned, in our approach, constrained resources in terms of the hardware capabilities of the edge devices lead to lower consumption (87 uA on average) than alternatives (420 mA and 78 mA on average). We used the smallest battery (1000 mAh), compared to other solutions and achieved a solid estimated battery lifetime of 477 days. Additionally, our approach utilizes NB-IoT technology for data transfer, which is, in general terms, more power-efficient compared to WiFi or mobile network solutions used by other systems.  
Memory efficiency is also highlighted, where our model has a significantly smaller footprint (172 KB) compared to the larger memory requirements of other systems (up to 30 MB).  
The accuracy comparison reflects that our solution presents results that are around 1.7% lower than those of competitors. However, we consider it a solid result, having in mind the constrained hardware resources we used to achieve it. The only other work we can compare our work with, but only in terms of lightweightness (using ESP32), is [46]. The authors used ML and FL on resource-constrained devices in different scenarios than ours and achieved an accuracy of up to 86.5%.  
\begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Paper** & [34] & [31] & [30] & [33] & [40] & **OUR** \\ \hline _Device type_ & PE & PE & MA & - & MCU & NP \\ _Comp. device_ & RPi3b+ & RPi Z & M & - & STM32 & ESP32 \\ \hline _Communication_ & WiFi & WiFi & Mobile & WiFi & - & NB-IoT \\ \hline _Framework_ & OCV, TF & - & Darknet & TF & CNN A. & - \\ \hline _Recognition_ & AoI+D & AoI & I & I & AoI+D \\ \hline _Power supply_ & B & BEH & B & N/A & N/A & B \\ \hline _ML model_ & CNN & RF & CNN & CNN & CNN & CNN \\ \hline _FL_ & - & - & - & - & - & + \\ \hline \multicolumn{6}{l}{**Quantitative comparison**} \\ \hline _Image size_ & 28 \(\times\) 28 & - & 224 \(\times\) 224 & 60 \(\times\) 200 & 96 \(\times\) 96\(\times\) 3 & 16 \(\times\) 24 \\ \hline _Model size_ & N/A & 30 MB & N/A & 4.3 MB & [167:294] KB & 172 KB \\ \hline _Battery [mAh]_ & 9800 & 5000 & High & N/A & - & 1000 \\ \hline _Consumption_ & \textgreater{}420 mA & \textgreater{}78 mA & High & N/A & - & 87 uA (avg.) \\ \hline _Battery lifetime_ & 46 h & 578.3 d & - & - & - & 477 d \\ \hline _Accuracy [\%]_ & 98.70 & 97.69 & 98.67 & 98.70 & [83:88.8] & 97.01 \\ \hline \hline \end{tabular}  
* **PE—**prototype using existing modules; **NP—**new prototype; **MA—**mobile app_; **OCV—**OpenCV; **RF—**random forest; **TF—**tensorflow; **AoI—**area of interest; **I—**image; **D—**digit; **B—**battery; **BEH—**battery with energy harvesting.  
\end{table}
Table 7: Comparisons of related work.