## 3 Approach to Object Detection  
### Development of the Detector and Development Tools  
The mainstream algorithms used in object detection can be divided into two categories: the YOLO model family and the Region-Based Convolutional Neural Network (R-CNN) model family. YOLO version 4 (YOLOv4) [35] and Fast R-CNN [36] are often compared as representative algorithms of their respective families. While both models achieve a high accuracy, YOLOv4 offers a speed advantage over Fast R-CNN [37]. Although it has been noted in many literature reviews on YOLO that YOLOv4 has a lower performance compared to the latest YOLO variants [38; 39; 40; 41], it still offers a good balance of accuracy and efficiency in some use cases. YOLOv4 is considered to be a variant with a level of maturity and performance, which makes it popular among researchers and practitioners; thereby, YOLOv4 has been widely applied in various fields. [PERSON] et al. [42] proposed a YOLOv4-based traffic sign recognition algorithm. Generative Adversarial Networks have been employed to produce more training data to supplement the actual arrangement of images. [PERSON] et al. [43] applied a YOLOv4 model to detect drones and birds to prevent the adverse effects caused by drones. [PERSON] et al. [44] also applied YOLOv4 to detect plant leaf diseases to reduce economic consequences and maximize crop yield and underscored the capabilities of YOLOv4 as a useful tool for accurate disease prediction. [PERSON] et al. [45] applied YOLOv4 for the automatic detection and classification of architectural textures in Portuguese cities to promote the development of potential urban cultural tourism areas, which provided a new perspective on the study of tourism development. [PERSON] et al. [46] proposed a fabric defect identification method. The method combines YOLOv4 for rapid detection and a Region-based Convolutional Neural Network for the localization of fabric defects. [PERSON] et al. [47] proposed an improved YOLOv4-based face mask recognition and standard wear detection algorithm to address issues such as low accuracy caused by complex environments. [PERSON] et al. [48] also proposed an improved YOLOv4 to improve the detection of internal defects in aluminum alloy welds. [PERSON] et al. [49] created a simplified detection model based on YOLOv4 to achieve the rapid and accurate detection of apple flowers in natural environments. Therefore, in this study, YOLOv4 was employed as an algorithm to structure the object detector. The YOLOv4 [35] architecture mainly consists of three parts, backbone, neck, and head, as shown in Figure 3. Transfer learning (TL), a machine learning method [50; 51], was used to train the detector, enhancing learning efficiency. TL allows information acquired in  
Figure 2: Classification of studies on the utilization of AI in waste treatment. previous tasks to be applied in new areas to shorten the learning time. In the backbone, CSPDarknet53 [52], pre-trained on the common objects in context dataset [53], was used as a convolutional neural network to extract features from the RGB input images with a size of 608 \(\times\) 608 pixels, and these features included edges, textures, shapes, and so on [54]. CSPDarknet53 contains 29 3 \(\times\) 3 convolutional layers, a 725 \(\times\) 725 receptive field, and 27.6 M parameters. By introducing the Cross Stage Partial (CSP) structure, this process reduces the number of computations in the convolutional neural network while improving inference speed and accuracy. The neck connects the backbone and head. It consists of Spatial Pyramid Pooling (SPP) [55] and a Path Aggregation Network (PAN) [56]. The SPP module is used to obtain feature information at different scales. It uses multiple pooling operations at different levels of the network to extract and integrate features of different receptive fields by applying different kernel sizes (1 \(\times\) 1, 5 \(\times\) 5, 9 \(\times\) 9, 13 \(\times\) 13), thereby improving the model's ability to capture objects of various sizes.