# Cascaded Machine-Learning Technique for Debris Classification in Floor-Cleaning Robot Application
## 4 Methodology
### SVM for Error Reduction and Spill Size-Based Classification
Hence, two experiments are conducted to validate this scheme. The first experiment is to assess the performance of debris classifier using real-world test images. The model has not been exposed to these images during the training phase. The second experiment is to assess the performance of liquid spill size classifier to avoid hard-to-clean debris. ### Performance Metrics

Standard statistical measures are used to assess the performance of the proposed scheme. These include accuracy, precision, recall and \(F_{measure}\) which are computed as shown in Equations (15)-(18). Here, \(tp,fp,tn,fn\) represents the true positives, false positives, true negatives, and false negatives respectively as per the standard confusion matrix. In Equations (19) and (20), \(\eta_{miss}\) is for the target debris not recognized by the network and \(\eta_{false}\) is for other objects detected as debris. \[Accuracy(Acc)=\frac{tp+tn}{tp+fp+tn+fn} \tag{15}\]

\[Precision(Prec)=\frac{tp}{tp+fp} \tag{16}\]

\[Recall(Rec)=\frac{tp}{tp+fn} \tag{17}\]

\[F_{measure}(F_{1})=\frac{2\times precision\times recall}{precision+recall} \tag{18}\]

\[K(x_{1},x_{2})=\exp{(-\frac{||x_{1}-x_{2}||^{2}}{2\sigma^{2}})} \tag{10}\]0

\[K(x_{1},x_{2})=\exp{(-\frac{||x_{1}-x_{2}||^{2}}{2\sigma^{2}})} \tag{10}\]1

### Debris Classification

Figures 4 and 5 shows the typical detection results for various types of floor debris captured at both top view and robot view with different angle. Here, solid debris is marked by a green rectangle box and liquid spills region are marked by a sky-blue rectangle box. The imaging system is mounted at the height of 150 cm from the floor for the top view and 60 cm for robot perspective. The experimental results show that the trained SSD MobileNet architecture can detect most of the solid and liquid spill debris (97-98% of them) on the floor. Solid debris that is detected typically have a 98% or higher confidence level and liquid spillage debris have a 96% or higher confidence level, respectively. The overall accuracy of this classifier on both perspectives is shown in \[K(x_{1},x_{2})=\exp{(-\frac{||x_{1}-x_{2}||^{2}}{2\sigma^{2}})} \tag{10}\]2

\[K(x_{1},x_{2})=\exp{(-\frac{||x_{1}-x_{2}||^{2}}{2\sigma^{2}})} \tag{10}\]3 Overhead View Results. \[K(x_{1},x_{2})=\exp{(-\frac{||x_{1}-x_{2}||^{2}}{2\sigma^{2}})} \tag{10}\]4 _Cont._ \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Perspective**} & \multicolumn{2}{c}{**AP (\%)**} & \multirow{2}{*}{**mAP (\%)**} \\ \cline{2-3}  & **Solid Spills** & & **Liquid Spills** \\ \hline Top Perspective & 99 & 97.5 & 98.25 \\ Robot Perspective & 98.5 & 94.2 & 96.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: AP and mAP for the proposed scheme. Furthermore, to validate the robustness of the proposed scheme, debris classification has been applied to regions where a mixture of solid and liquid debris is present. The performance of the scheme on these scenarios is shown in Figure 6. The classification results indicate that the trained SSD MobileNet architecture can determine solid and liquid debris present in these scenarios very accurately. ### Liquid Spill Size Classification

This experiment is performed with liquid spillage of varying compositions. Spillages made of everyday food products such as eggs, yogurt, milk, etc. are spread on the test bed with various sizes and captured by Aver Visualizer Module [39]. The Visualizer Module comprises of a 5 megapixel (MP), 180\({}^{\circ}\) Field of View CMOS camera sensor with a flexible arm for adjusting the camera height and tilt from \(-\)90-90\({}^{\circ}\) degrees as shown in Figure 7.

In our experiment, floor images are captured at 60 cm from the ground and the camera head is inclined at an angle of 45 degrees downwards for robot perspective (Figure 7a) and 90 degrees downwards (Figure 7b) for top perspective. The focused area has been measured accurately through a laser marker on-board the vision system. It helps to compute and verify the pixel-based bounding box area estimation.