# Machine Learning-Based Garbage Detection and 3D Spatial Localization for Intelligent Robotic Grasp
## 4 Experiments and Results
### Garbage Point Cloud Extraction
Therefore, this paper selects \(\varepsilon\) and \(\mu\) as 3.5 and 30, respectively, as the final combination of point cloud clustering parameters. Figure 5: The removal rate (number of points removed/total number of points) of the rubbish instance point cloud is based on the DBSCAN clustering algorithm. Where \(\epsilon=(2,2.5,3,3.5,4,4.5,5)\), \(\mu=(10,20,30,40,50)\). Whereas the red bin denotes the 4 values in the middle of the 35 removal rates sorted. (**a**) scene 1, (**b**) scene 2, (**c**) scene 3. Figure 6: A visual comparison of the interfering point removal rates and results for the corresponding 3 scenes in Figure 5. The last column shows the 3 scene point clouds with the interfering points (blue points) removed and the calculated OBB for \(\epsilon\) and \(\mu\) of 3.5 and 30, respectively. The numbers at the bottom of each subplot indicate \(\mu\), \(\epsilon\) and point removal rate in that order. Up to this point, we have trained the Yolactedge model, determined key parameters for point cloud clustering, and performed post-processing and visualization of the Yolactedge prediction results and point cloud data using OpenCV and Open3D, as shown in Figure 7. To verify the generalization performance of the Yolactedge model and the representativeness of the TACO dataset, we fed custom-collected outdoor garbage images to the Yolactedge model for mask prediction, and the results are shown in the left image of each subplot of Figure 7. Thanks to the wide range of scenes included in the TACO-28 dataset, the Yolactedge model trained on it can be used directly to predict the categories and masks of garbage in the custom-collected dataset, thus reducing the need for a lot of tedious data annotation and enabling the identification of garbage on our own collected dataset. However, due to the overlapping characteristics of different garbage categories in the TACO dataset, the prediction accuracy of the Yolactedge model for garbage classification is affected, leading to specific category errors in the identified garbage shown in the images of Figure 7. Since the calculation of the evaluation metrics for localization and segmentation accuracy relies first and foremost on the class correctness, low class accuracy leads to a failure to improve their accuracy values, and it is known from [8] that the authors also designed three different class_score methods with the intention of improving localization accuracy, but the highest \(AP\) accuracy obtained by the fine-tuned Mask R-CNN model on TACO-10 is still only 20%. Figure 7: The results of the garbage detection and 3D spatial localization algorithms proposed in this study are shown. Each subplot in (**a-j**) depicts the classes and masks of garbage instances predicted by the Yolactedge-res101 model on custom-collected outdoor rubbish data (left image), as well as the reconstructed entire scene point cloud, segmented rubbish instance point cloud, and computed OBB (right image). In addition, the accuracy of mask segmentation is the subject of this research. The segmented instance point cloud with a high quality mask has the fewest interfering points, which helps to improve the accuracy of the calculated OBB. Since the TACO dataset solely consists of garbage images without associated point clouds, the only viable option for obtaining garbage instance point clouds is by utilizing the paired images and point clouds from the custom-collected dataset. The scene point cloud acquired by the camera is shown on the right image of each subplot of Figure 7, and also shows the splited point cloud of garbage instances by using its associated predicted mask. The accuracy of the predicted garbage's 3D spatial position relies on two factors: firstly, the accuracy of the point cloud reconstruction by the RealSense D415 camera (with a \(Z\)-directional accuracy of less than 2%), and secondly, the subsequent calculations performed with the assistance of third-party equipment, such as robot arms for gripping, indirectly affecting the accuracy.