# Validating the Use of Smart Glasses in Industrial Quality Control: A Case Study
## 4 Results
### Experimentation and Results  
The model training for the pneumatic cylinder prototype utilized the YOLOv8 object detection architecture over 50 epochs, with a dataset partitioned into 70% for training, 20% for testing, and 10% for validation. Consistency was maintained by resizing all input images to a resolution of 640 \(\times\) 640 pixels, providing a standardized input format that enhances training efficiency. The metrics showcased in Figure 7 show the commendable performance of the trained model when applied to the dataset. These metrics, serving as quantifiable evidence of the model's capabilities, lend credibility to the approach. These satisfactory outcomes validate the efforts in the design and training processes and emphasize the model's potential. The performance of the proposed detector is quantified using the metrics recall, mAP50, and mAP50-95. Specifically, mAP50-95 represents the mean average precision (mAP) computed over an Intersection over Union (IoU) range from 0.5 to 0.95, offering a holistic assessment of the detector's accuracy across varied thresholds. The training results for all classes based on the proposed method are shown in Table 1.  
These results provide valuable insights into the performance of the object detector in distinct classes and overall. For all combined classes, we observed that a recall of 0.917 indicates proficiency in identifying objects; since the value is greater than 90%, we considered it a very good value to stop the training process. An mAP50 score of 0.916 further attests to the model's precision and recall balance at an IoU threshold of 0.5. While lower, the mAP50-95 score of 0.777 still signifies strong performance across varied IoU thresholds, underscoring the model's adaptability and effectiveness in different scenarios. These findings collectively suggest that the proposed object detector exhibits substantial efficacy in identifying and classifying objects of distinct classes with commendable accuracy and consistency. The specific strengths and areas for improvement highlighted by these metrics can inform focused refinements to enhance the model's performance further. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **R** & **mAP50** & **mAP50-95** \\ \hline All & 0.917 & 0.916 & 0.777 \\ End caps & 0.953 & 0.919 & 0.82 \\ Cylinder & 0.865 & 0.921 & 0.82 \\ Complete & 0.875 & 0.921 & 0.854 \\ Tie rods & 0.879 & 0.821 & 0.701 \\ Nuts & 0.94 & 0.959 & 0.619 \\ Piston & 0.991 & 0.957 & 0.847 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training results for all classes. Figure 7: (a) Confusion matrix and (b) precision/recall curve. To address false positives, an analysis of the confusion matrix and precision/recall curves in Figure 7a,b is crucial. These values suggest that while the model demonstrates good performance overall, there is room for improvement. In real-time processing, Microsoft HoloLens 2 smart glasses capture the video stream, which is transmitted to the server for analysis by the trained YOLO model. Combined with the YOLO model, OpenCV ensures that the system can swiftly and accurately identify components and assess the assembly quality. The analysis results are then sent back to the smart glasses, where the custom Unity application processes the information and generates an MR overlay on the inspector's view. Figure 8 shows the information presented by the Hololens in the validation process of the pneumatic cylinder's assembly quality control. If the assembly is correct, a holographic indication of \"OK\" appears on the glasses. If the assembly is found to be incorrect or incomplete, a holographic representation of \"NOT OK\" appears. This real-time feedback mechanism allows the inspector to instantly identify and correct any errors, enhancing the efficiency and accuracy of the assembly process. The validation process focuses on the external result of the components' assembly. The system compares the observed assembly configuration with the expected configuration.