# Computer Vision as a Tool to Support Quality Control and Robotic Handling of Fruit: A Case Study
## 3 Results
### Method Implementation and Results  
To evaluate the model, the TensorFlow Object Detection API was used for the models before conversion, as well as the tool developed by [PERSON] [31], which provides AP and AR information, divided by the IoU range. In the results, the sizes of the images were classified as small, medium, and large, according to the following criteria:  
* Small images: area smaller than 32\({}^{2}\) pixels;
* Medium images: area between 32\({}^{2}\) and 96\({}^{2}\) pixels;
* Large images: an area larger than  
The regularization loss (see Figure 11) starts at around 0.15 and decreases steadily and smoothly throughout the training time, reaching approximately 0.07 at the end. The continuous and stable downward curve indicates that the regularization process is being applied effectively, helping to reduce overfitting and improving the generalizability of the model. Figure 11: Loss of regularization during training—tomato detection and classification model—four classes. Figure 9: Loss of localization during training—tomato detection and classification model—four classes. Figure 12 shows the learning rate of this model. There is a progressive decrease in the learning rate, allowing fine adjustments to be made in the final stages of training. Table 2 shows the actual results of the TensorFlow model, while Table 3 shows the results after conversion to TensorFlow Lite. These results were obtained using the methods described in the model evaluation section. According to the numerical analysis of the training of the tomato detection and classification model with four classes, the accuracy metrics show greater effectiveness when working with large images (77.4%), lower performance for medium images (41.6%), and no effectiveness for small images (0.0%). Recovery shows similar behavior, with superior results for large images (82.5%), followed by medium images (59.9%), and no recovery for small images (0.0%). The model shows high accuracy (91.1%) with an IoU threshold of 0.50, indicating excellent effectiveness in detecting objects with low overlap. As expected, the accuracy decreases at higher thresholds (83.6%). In terms of recovery, the model has a moderate ability to detect up to one object (29.0%) and a good ability to detect up to ten objects (72.9%) and up to one hundred objects (80.1%). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Metric** & **IoU** & **Area** & **Value** \\ \hline  & [0.50\(\pm\)0.95] & All & 0.738 \\  & 0.50 & All & 0.911 \\  & 0.75 & All & 0.836 \\ Average Precision (AP) & [0.50\(\pm\)0.95] & Small & 0.000 \\  & [0.50\(\pm\)0.95] & Medium & 0.416 \\  & [0.50\(\pm\)0.95] & Large & 0.774 \\ \hline  & [0.50\(\pm\)0.95] & All & 0.801 \\ Average Recall (AR) & [0.50\(\pm\)0.95] & Small & 0 \\  & [0.50\(\pm\)0.95] & Medium & 0.599 \\  & [0.50\(\pm\)0.95] & Large & 0.825 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: TensorFlow model results—tomato detection and classification model—four classes. Figure 12: Learning rate during training—tomato detection and classification model—four classes. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**IoU** & \begin{tabular}{c} **Tomato Half** \\ **Ripe AP** \\ \end{tabular}  & \begin{tabular}{c} **Tomato** \\ **Overripe AP** \\ \end{tabular}  & \begin{tabular}{c} **Tomato** \\ **AP** \\ \end{tabular}  & \ \begin{tabular}{c} **Tomato** \\ **Rotten AP** \\ \end{tabular}  & \begin{tabular}{c} **mAP** \\ \end{tabular}  \\ \hline
0.5 & 65.49 & 90.72 & 68.82 & 89.74 & 78.69 \\
0.55 & 65.34 & 90.72 & 68.55 & 89.74 & 78.59 \\
0.6 & 65.2 & 89.7 & 67.35 & 89.62 & 77.97 \\
0.65 & 65.2 & 89.7 & 67.03 & 89.49 & 77.86 \\
0.7 & 64.63 & 87.95 & 66.67 & 89.34 & 77.15 \\
0.75 & 63.06 & 87.01 & 65.93 & 88.6 The TensorFlow Lite conversion for different IoU thresholds demonstrates the variation in average precision (mAP) between tomatoes at different ripeness stages.