## 5 Experimental Results and Implementation into the Assembly Process  
An initial experiment of the cam switch parts recognition was executed using a small set of training samples (five per part, 155 samples altogether) with the different floor. Considering this small teaching set the obtained results are acceptable (see Table 1). The training process for Inception V2 is shown in Figure 13, where the unit on the X-axis is the number of cycles and the unit on the Y-axis is mAP. CNN models with single shot detection can be retrained very fast by transfer learning with accepted results within less than 2 h of training without dedicated GPU (for example the used pretrained Faster RCNN Inception V2 SSD reached the required accuracy within 1.35 h). CNN models with segmentation for the same input samples need 4-5 times more time for successful training (for example the used pretrained Mask RCNN Resnet101 reached required accuracy up to 5.20 h). But in contrast to SSD where a model is saved after unpredictable numbers of iteration, the training of models with Segmentation is stored after each epoch. The results of recognition of other images (not training set) of some parts for both tested CNN models (SSD and instance segmentation) are shown in Figure 14. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Pretrained CNN Model** & **Testing Set** & **Number of Samples** & **Classification Results [\%]** & **Training Time [h]** \\ \hline Faster RCNN Inception V2 SSD 1 & virtual & 155 & 67–86 & 1.35 \\ Mask RCNN Resnet101 1 & virtual & 155 & 91–95 & 5.20 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The acquired results by autogenerated training samples based on virtual 3D models. Figure 12: An example of the autogenerated training/tests set with XML bounding box annotation. The inference time experiments with trained CNN models (SSD and Mask) have been performed on many different platforms. The delay results presented in Tables 2 and 3 for inference time is average value from a multiple test in loop for recognition of 40 sample images. The obtained results for CNN model SSD Inception V2 and TensorFlow 1 are in Table 2, for CNN Segmentation model Resnet101 and TensorFlow 2 with Pixelib in Table 3. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Testing** & **Platform Type** & **Platform Parameters** & **Delay [ms]** \\ \hline Google Colab & CPU & Intel Xeon 2.30 GHz Gen. 6 & 2726.18 \\ Google Colab & GPU & Tesla P4 & 358.37 \\ Google Colab & TPU & Cloud TPU & 2474.20 \\ NVIDIA APU & Xavier AGX & Saved model native & 885.18 \\ NVIDIA APU & AGX & FP32 Tensor RT & 445.43 \\ NVIDIA APU & AGX & FP16 Tensor RT & 339.41 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The acquired inference results for the SSD CNN model. Figure 14: Inference experiments with the SSD trained model (**top**) and instance segmentation (**bottom**). Figure 13: Training graphs for classification (**left**) and localization (**right**). The FP16 SSD Inception V2 CNN model can reach about 3 FPS, which is an acceptable parts identification delay for checking worker assembly tasks and collaborative robot assembly status. The experiment with the Mask RCNN segmentation model reached in AGX device about 700 ms delay, which is acceptable in comparison to Desktop PC with high-performance CPU. The mixed reality device is based on ARM64 architecture which does provide enough power for the execution of the trained inference model. The new approach is to stream video data to NVIDIA Xavier APU which runs an inference model and sends only extracted data: bounding box, contour polygon, and a result of classification as feedback. The collaborative work cell contains a SMART vision system consisting of three cameras. The primary camera is connected to NVIDIA Xavier AGX (Figure 15a), where is uploaded trained CNN model. The second camera is integrated into mixed reality devices (Figure 15b) and the third camera is integrated into the right hand of the collaborative robot (Figure 15c).