# Real-Time Human Activity Recognition on Embedded Equipment: A Comparative Study
## 5 Results of Implementation
### Implementation on Raspberry Pi and Comparison with Desktop PC  
In this section, we test on a PC, because this serves us for comparisons as if we were performing HAR in the cloud. At the same time, the Raspberry is the first \"edge\" computing, which happens to be very close to a small PC. On PC, we typically find two different OS and the objective is to test if the OS can also have an impact. In this work, we measure the OS performance in terms of activity recognition processing. Figures 6-8 show, respectively, the resulting processing time for implementation on machines with Windows, Linux operating systems and a Raspberry Pi. In these figures, the y-axis represents processing time in seconds, with time units, while the x-axis represents the number of iterations. Figure 5: Segment corresponding to the activity Bed to toilet. The common feature among all curves is characterized by a notably low median alongside peaks, indicative of minimal baseline processing interspersed with occasional intensive computational activity. The observed trend in the height of the Y line representing processing time, where it is highest on a Raspberry Pi, lower on a PC with Windows OS,  
Figure 8: Resulting processing Time on Raspberry Pi. Figure 6: Resulting processing Time on Windows machine. Figure 7: Resulting processing Time on Linux machine. and even lower on a PC with Linux OS, aligns with expectations based on the varying computational power of these devices. The initial peaks could correspond to the period when the algorithm starts and performs pre-processing tasks, such as initial setup and data loading. During the dynamic segmentation phase, the algorithm can be more processing intensive because it analyzes data streams in real-time to identify activities. The peaks could represent times when segmentation is particularly complex. Once the segmentation is completed, the algorithm moves on to classifying the detected activities. This step can also lead to variations in processing time depending on the complexity of the activities to be classified. Table 8 shows the performance of implementation, in terms of processing time and memory management, on a Raspberry Pi during Period 1. These results are compared with those on Windows and Linux machines, respectively. The observed differences in processing time and memory consumption can be attributed to various factors related to hardware and software optimization. The operating system (OS) itself can introduce overhead. Linux is generally known for its efficiency and low overhead, while Windows may have more background processes and services that could impact processing times. Let us explore possible interpretations for these differences:  
* The Raspberry Pi, being a single-board computer with relatively modest hardware compared to a typical desktop or server, exhibits longer processing times due to its lower computational power. A PC often runs on more powerful hardware, which can result in faster processing times, especially for computationally intensive tasks. * Experiment results show that a PC running a Windows operating system typically consumes more memory (RAM) than a PC running a Linux operating system, and the \begin{table}
\begin{tabular}{c c c} \hline \hline
**Hardware Architecture** & **Processing Time** & **Memory Space** \\ \hline PC (Windows OS) & 0.008 s & mean memory = 107.16 \\  & & min memory = 102.51 \\  & & max memory = 111.73 \\ \hline PC (Linux OS) & 0.012 s & mean memory = 94.21 \\  & & min memory = 88.33 \\  & & max memory = 98.10 \\ \hline Raspberry Pi & 0.056 s & mean memory = 65.04 \\  & & min memory = 63.76 \\  & & max memory = 66.99 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Performance Comparison of Hardware Architectures.