# Exploring Distributed Deep Learning Inference Using Raspberry Pi Spark Cluster
## 4 Experiment Results
### Test Results with Enhancements for Pi 4B (Configuration 1)  
In contrast to Section 4.1, this section evaluates the performance of the enhanced Pi 4B and assesses the feasibility of using a Spark cluster of two Pi 4B versus using enhancements. In Experiment 1, as per Table 5, the average execution time with InceptionV3 on ImageNetV2 was noticeably reduced from 6529.43 to 5765.84 s, a reduction of 13.2%. The average execution time for CIFAR10 decreased from 3810.57 s to 3289.85 s, again achieving a reduction of 15.8%. Major reductions in average execution time were achieved when testing MobileNetV3 on ImageNetV2, where the average execution time for ImageNetV2 decreased from 828.33 s to 553.59 s, resulting in a speedup of 49.6%. Likewise, the average time on CIFAR10 was reduced from 20.67 s to 16.31 s, achieving a speedup of 26.7%. As expected, this combination set of enhancements achieved the lowest average execution time in all tests against the stock Pi 4B (without the enhancements). With these enhancements, the average execution time reduction was between 13.2% to 49.6% for Experiment 1, which is quite significant.  
For Experiment 2, as per Table 6, the enhanced Pi 4B had an average execution time of 2882.82 s using MTCNN. The reduction in execution time down from 3156.71 s made up a 9.5% improvement. When tested using YOLOface, the average execution time was slashed  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Test**} & \multicolumn{2}{c}{**Execution Time (s)**} & \multirow{2}{*}{**Enhancement Speedup**} \\ \cline{2-3} \cline{5-4}  & **Stock** & & **Enhanced** \\ \hline InceptionV3 on ImageNetV2 & 6529.43 & 5765.84 & 1.13 \\ InceptionV3 on CIFAR10 & 3810.57 & 3289.85 & 1.16 \\ MobileNetV3 on ImageNetV2 & 828.33 & 553.59 & 1.50 \\ MobileNetV3 on CIFAR10 & 20.67 & 16.31 & 1.27 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Results for Experiment 1 using the enhancements for Pi 4B.  
Figure 9: Average FPS results for Experiment 3.  
to 12,768.22 s from 14,502.36 s, a 13.6% reduction. The same trend was observed when the RetinaFace model was tested, where there is a reduction in execution time by 12.9%--from 40,590.29 s to 35,948.35 s. Overall, the combination of enhancements seemed to improve the general processing performance of Pi 4B.  
As per Table 7, applying the enhancement combination to real-time MTCNN face detection resulted in a very slight increase of average FPS from 2.64 to 2.99--which is still a 13.3% increase in FPS. Nevertheless, the increase in FPS did not significantly help with the smoothness of face detection. The enhancements had little impact on YOLOface and RetinaFace, as underwhelming results were seen in both models during face detection carried out in real-time. The average FPS values saw an extremely negligible increase from 0.21 FPS to 0.25 FPS for YOLOface, and from 0.21 FPS to 0.23 FPS for RetinaFace. There is an improvement in average FPS between 9.5% to 19.5%. Even with the enhancements, the FPS for face detection with all complex models used in this experiment failed to exceed 10, leading to a suboptimal face detection performance.