# A Vision Detection Scheme Based on Deep Learning in a Waste Plastics Sorting System
###### Abstract
However, for scenarios where the conveyor belt is applied, introducing new sensors to obtain more information increases the complexity of the system and sources of error. Furthermore, object detection processes the static single frame and does not correlate the detection results of the preceding and following frames. It is obviously not feasible to send all the information detected in the camera field of view directly to the sorting device. To solve this problem, multiple object tracking based on detection is introduced in this paper. This algorithm is commonly used for pedestrian tracking [33] and traffic flow detection [34]. Applying it to plastic detection can achieve deduplication and avoid unordered sorting. In addition, due to the different shapes and random postures of the waste plastics, it is necessary to obtain information about the height, angle, and velocity of the plastics to ensure the success of sorting. Based on the above analysis, this paper takes five common categories of plastics, such as wash supplies bottles, beverage bottles, Tetra Paks, express packages, and tableware boxes, as macroscopic sorting objects, and designs a multi-category dynamic sorting system based on visual guidance in unstructured scenes. Since the quality of the vision detection method directly affects the sorting performance of the system [35], this study focuses on the feasibility and effectiveness of the plastic detection method based on object detection and multiple object tracking. The process of the plastics detection algorithm is designed as shown in Figure 1.  
The main contributions of this paper are as follows:  
1. A plastic detection algorithm based on improved YOLOX [36]. The algorithm achieves a better trade-off between detection accuracy and inference speed. It classifies and localizes plastics by capturing appearance features. 2. A plastic tracking algorithm based on improved DeepSORT [37]. The algorithm performs tracking based on the output information of the detector. It transforms multiple object tracking into a problem of data association of detection results to achieve object deduplication. Figure 1: The process of plastics detection. An information acquisition method based on virtual two-line detection. The method combines the plastic detection algorithm and the plastic tracking algorithm. To save computational resources, two virtual detection lines are set up to constitute the plastic detection area for filtering and extracting relevant information. It realizes an efficient real-time dynamic detection method. 4. For the acquisition of plastic information, the combination of minimum bounding rectangle, image mask, and the topK algorithm to calculate the angle and height, using a Kalman filter for real-time filtering of velocity. The system is no longer external to other sensors, giving full play to the role and advantages of vision detection technology and improving the flexibility and versatility of the system. The rest of this paper is organized as follows: Section 2 introduces the design of the vision detection system. Section 3 elaborates on the plastic detection method based on object detection and multiple object tracking, and describes the workflow of the system for detecting plastics. Section 4 gives the implementation and results of the experiments. Section 5 summarizes the whole paper.