# Real-Time Detection of Hole-Type Defects on Industrial Components Using Raspberry Pi 5
## 4 Results and Real-Time Deployment
### Real-Time Testing
This accuracy loss was severe enough to render the PTQ model unsuitable for deployment, so we ultimately did not adopt the quantized model in the final real-time system. Further analysis suggests that the accuracy degradation was exacerbated by platform mismatches and deployment environment differences affecting inference reliability. In other words, the conditions under which the model was quantized (e.g., the calibration data and development hardware/software) did not perfectly align with the conditions of the target deployment platform. Such discrepancies can introduce additional quantization errors and inconsistency in model outputs. For example, when a model trained in floating-point is run on hardware with 8-bit fixed-point arithmetic, the conversion to low-precision operations can inject quantization noise that degrades accuracy. In our case, these platform-specific \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Metric** & **ResNet50** & **MobileNetV3-Large** & **EfficientNetB3** \\ \hline Number of Test Samples & 100 & 100 & 100 \\ Correct Predictions & Not Unstable Predictions & 96 & 95 \\ Incorrect Predictions & Not Unstable Predictions & 4 & 5 \\ Inference Time (ms) & \(\sim\)250 ms & \(\sim\)120 ms & \(\sim\)210 ms \\ FPS & \(\sim\)3.8 & \(\sim\)8.2 & \(\sim\)4.7 \\ Model Size & 94.7 MB & 13.6 MB & 47.0 MB \\ Parameters & 23.5 M & 4.2 M & 10.7 M \\ FLOPs (GFLOPs) & 4.13 GFLOPs & 0.23 GFLOPs & 1.02 GFLOPs \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of MobileNetV3-Large, ResNet50, and EfficientNetB3 models in real-time defect detection on Raspberry Pi 5 using 100 test samples. Metrics include accuracy, inference speed, model size after quantization, and computational complexity (FLOPs). numerical differences led to unreliable inference results with the PTQ model, undermining the benefits of quantization. This finding aligns with recent studies showing reliability issues in current PTQ methods, where average accuracy may be high, but significant drops can occur in specific cases [31]. Given the unacceptably large accuracy drop and potential unpredictability, we opted to retain a higher-precision model for real-time testing to ensure consistent performance. It is worth noting that the efficiency gains from quantization remain highly attractive, and we consider our PTQ outcome as a motivation for future improvements rather than a definitive failure. Going forward, we plan to explore more advanced quantization and optimization techniques to achieve faster, resource-efficient inference without sacrificing accuracy. We will investigate enhanced PTQ strategies (for example, using improved calibration methods or mild fine-tuning after quantization) and Quantization-Aware Training (QAT), which integrates quantization into the training process and is known to better preserve accuracy at low bit widths. Additionally, other model optimization methods such as network pruning, weight clustering, or knowledge distillation will be considered alongside quantization in our future work. By addressing the identified platform and environment mismatches and leveraging these techniques, we aim to deploy an optimized model that maintains high prediction reliability in real-time conditions while reaping the benefits of reduced model complexity and latency. Figure 15: Real-time defect classification results using MobileNetV3 deployed on Raspberry Pi 5. The model confidently detects corner plate defects under varying surface textures and backgrounds. Each image displays the predicted defect probability overlayed in red, demonstrating consistent high-confidence predictions (above 0.91) in both light-colored and dark backgrounds.