# Deep Convolutional Neural Networks Object Detector for Real-Time Waste Identification
## 3 Results
### Confusion Matrix
Due to the fact that the detection of bottles in municipal waste is a process that involves identification of objects that have different degrees of deformation, shapes, position, and transparency, this small set of images has been taken into account for testing at the inference time. While bottles are the most common object in municipal waste, our small set consists of plastic and glass bottles. Figure 8 presents the main case study detections successfully performed. The plastic and glass bottles in the image are placed in different positions (including bottom up), are partially obstructed, deformed, with different shapes, etc. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**CNN Model** & **Accuracy/mAP [\%]** & **Object Detector** & **Fine-Tuning** & **Optimizer** \\ \hline SSD (MobileNetV2-OID V4) & 97.63 & Yes & OID V4 & RMSProp \\ MobileNetV2 & 88 & No & ImageNet & \\ Faster R-CNN (Inception V2) [7] & 81.6 & Yes & COCO & \\ VGG-16 [6] & 88.42 & No & ImageNet & \\ ResNet50 [9] & 87 & No & No & \\ RecycleNetV4 [8] & 81 & No & No & Adam \\ DenseNet121 [8] & 95 & No & ImageNet & [PERSON], SGD \\ Inception-ResNetV2 [8] & 87 & No & ImageNet & [PERSON], SGD \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Evaluation with other trained or fine-tuned model on the TrashNet dataset. The evaluation at inference time has been made on our custom dataset, switching the resolution from \(300\times 300\) to \(500\times 500\). The \(500\times 500\) resolution is needed in order to detect small size bottles and cans. The average confidence reached 75.54%, but an object (one plastic bottle) has been misclassified as a can, although the localization was accurate (Table 6). Another thing to note is that the model with the highest average confidence, MobileNetV2 + SSD + COCO + VOC, does not distinguish between recycling waste and only can detect bottles, whether plastic or glass. This paper focuses on the detection of one waste per each image, but object identification for different degrees of clustering has also been tested, obtaining promising results as well. Although the clutter scenario was not the main focus in this research, the preliminary results will be used for further enhancements of CNN models. For this scenario, the main types of objects encountered during waste sorting have been considered, that is: plastic, glass, and metal. In Figure 9, waste identification for a clutter scenario is presented, considering detections with a confidence score higher than the 50% threshold defined at the inference time. As expected, there are objects that the model has not been able to localize and classify, or the confidence score was lower than 50%. This is quite common for CNN models trained with one object in an image (e.g., TrashNet), instead of multiple objects. The model is biased towards recognizing fewer objects or detecting all the objects in the images as part of the same class and bounding box. Another drawback in clutter scenarios for CNN models trained on the TrashNet dataset is that there is a high aspect ratio between object size and image size, with objects filling a large portion of the image. In order to deal with these outcomes in the future, the TrashNet dataset will be further augmented with images that contain more objects with different sizes of the same class. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model** & **Average Confidence Custom Dataset** \\ \hline MobileNetV2 + SSD + OIDV4 + TrashNet & 72.8 \\ Faster R-CNN & 39.83 \\ MobileNet & 27.06 \\ MobileNetV2 + SSD + COCO + VOC & 78.13 \\ MobileNetV2 + SSD + COCO & 42.31 \\ Inception V2 + SSD + COCO & 59.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Evaluation on our waste test dataset at inference time. Figure 8: Custom dataset predictions for one object in image. The small size of the TrashNet dataset affects the performances of the CNN models. In order to overcome this drawback, data augmentation, transfer learning, and fine-tuning have been used among other techniques.