# Machine Learning-Based Garbage Detection and 3D Spatial Localization for Intelligent Robotic Grasp
## 4 Experiments and Results
### Model Training and Testing Results  
Training result. As shown in Figure 3a-c, after 80,000 iterations (533 epochs), the class, bbox, and mask loss of both Yolact and Yolactedge start off significantly lower until it plateaus at around 1. Firstly, comparing Yolact and Yolactedge, as [PERSON] [21] said, the latter's mask \(mAP\) falls behind the former. In Figure 3a,c, it can be observed that the individual loss values of Yolact are smaller than those of Yolactedge, but the difference is small and the trend is basically the same. In particular, in Figure 3b, the loss curves of the two models are almost identical. By comparing the loss curves for different backbones, it is noted that the loss curve for Mobilenetv2 is higher than that for Res50, and the loss curve for Res50 is higher than that for Res101. This suggests that increasing the depth of the backbone and the number of parameters improves the model's accuracy in terms of loss values. Finally, despite the models and backbones, the loss of bbox is lower than that of class, and the loss of class is lower than that of mask, implying that Yolact families object detection is better than mask segmentation. Meanwhile, in this study, Mask R-CNN and SegNet were also trained with TACO-28 and TACO-60 in turn. As shown in Figure 3d,e, the loss values of Mask R-CNN and SegNet tended to be smooth after 150 epochs of training, the loss value of TACO-28 is lower than that of TACO-60, indicating that the more categories the dataset is divided into, the more difficult it is for the model to distinguish the garbage categories. It is important to note that the true performance of the models cannot be solely summarized based on training loss data. Various metrics will be used to evaluate and characterize the performance of each model. Testing result. The _AP_ value is used to characterize the precision of the Yolactedge and Mask R-CNN models' garbage target localization, while the same precision evaluation metrics as SegNet are used in this study for their mask output, i.e., _mIoU_, _mPA_, and _PA_. As shown in Table 2, Mask R-CNN and SegNet have the highest number of parameters and the lowest FPS due to their complex network structures, which makes fine-tuning with limited datasets extremely challenging. The TACO dataset contains images with diverse backgrounds, consisting of 60 categories (28 super categories) and numerous small target instances. However, SegNet, being a semantic segmentation network, struggles with distinguishing the pixel categories of multi-category small targets, leading to significantly low evaluation metrics for mask segmentation on the test set. Mask R-CNN, as a Faster R-CNN inherited from two-stage, achieved a _mAP_ of 16.43 for the localization of garbage instances after 150 epochs of training on TACO-28, which is the best performance among the models applied in this study and is close to the _mAP_ value of 17.6 \(\pm\) 1.6% obtained in TACO [8] after training Mask R-CNN with TACO-10. However, the accuracy of the output mask still lags behind that of the Yolactedge models. Due to the simple scaling method used in processing the dataset, many features of small objects are lost, resulting in even lower detected _mAP_ values compared to those in TACO. The values of _mIoU_, _mPA_ and _PA_ are shown in Table 2. For Yolactedge families, comparing Mobilenetv2 and Res101, Res50 gives optimal values of _mIoU_ and _mPA_ of 25.03% and 37.40%, respectively. This indicates that as the backbone becomes lighter, prediction accuracy decreases while the model's real-time performance improves, as shown in columns 3 and 6 of Figure 4.  
Figure 3: Loss curves during training of these models with TACO-28. (**a–c**) show the loss curves for each branch of Yolactedge after training 80,000 iterations with Res50, Res101, and Mobilenetv2, respectively. (**d,e**) are the loss curves of Mask R-CNN and SegNet after training for 150 epochs, respectively.