# Computer Vision as a Tool to Support Quality Control and Robotic Handling of Fruit: A Case Study
## 4 Discussion  
The primary behavior under examination is the impact on model accuracy following its conversion to a TensorFlow Lite version. For the four-class tomato classification model, the initial average accuracy across all Intersection over Union (IoU) levels was 77.4%. Post-conversion, the average accuracy decreased to 67.54%, indicating a notable decline. However, the IoU range of practical significance for the system's assigned tasks is between 0.5 and 0.85. Within this specific IoU range, the average accuracy for the TensorFlow Lite model is 76.14%. While this is slightly lower than the pre-conversion accuracy, the difference is minimal and does not substantially impact the system's performance. A similar behavior was observed in the two-class model. Initially, the average accuracy was 83.6%, which decreased to 64.66% following conversion to TensorFlow Lite. However, excluding the IoU values of 0.95 and 0.9, which are irrelevant for this application, the average accuracy is 76.10%. This drop is more significant compared to the four-class model. Despite removing these high IoU values, the reduction in accuracy for the two-class model is more pronounced than for the four-class model. The second aspect to consider is whether it is beneficial to reduce the number of classes. Although the average performance of both models is quite similar, it is important to highlight that for Intersection over Union (IoU) values up to 0.75, the two-class model has a more significant advantage. Nevertheless, the accuracy of the four-class model is sufficiently high, making it a valid option for most cases. The two-class model should be considered in scenarios in which either the IoU is expected to be closer to 0.5 or there is no substantial benefit from distinguishing between the proposed categories. In conclusion, while the four-class model performs well in general, the two-class model may be preferable under specific conditions, particularly when precision gains from class separation are minimal. The drop in mAP after converting the model to TensorFlow Lite can be attributed to various factors intrinsic to the conversion process. One of the main factors is the effect of quantization. During the conversion, TensorFlow Lite optimizes the models for deployment on devices with limited resources by reducing the precision of the model's weights and activations from a 32-bit floating point to an 8-bit integer. While this reduction decreases the model size and computational requirements, it can also introduce quantization noise, resulting in a loss of accuracy in model predictions. This effect is especially noticeable in models that rely on precise calculations to differentiate between classes with small margins of separation, as is the case with fruit classification models. Another relevant factor is the simplification of operations during conversion. TensorFlow Lite performs a series of optimizations that simplify model operations to improve efficiency on low-power devices. However, this simplification can lead to the loss of some nuances in the calculations, especially in complex layers such as high-resolution convolutions or advanced non-linear operations. As a result, the model's ability to capture subtle  
Figure 21: Configuration of the proposed work area. details in images can be compromised, contributing to the reduction in mAP observed after conversion. The results obtained in this study, with an average accuracy (mAP) of 81.43% in detecting healthy and rotten tomatoes and 78.69% in classifying different stages of ripeness, are comparable to those found in other relevant works in the literature, despite significant differences in experimental conditions. For example, [PERSON] et al. [32] achieved 76% accuracy in detecting three classes of diseases in tomato plants using the YOLO model, with images sourced from the internet and the PlantVillage database. [PERSON] et al.