# Promotion of Color Sorting in Industrial Systems Using a Deep Learning Algorithm
## 1 Introduction
YOLO is most commonly used for application in real time and combines object localization and classification into a regression problem. Test results on the largest datasets and comparisons with previous algorithms such as RCNN are presented in the work by [PERSON] et al. [18], as well as on their official website, providing detailed analyses ([[https://pireddie.com/darknet/yolo/](https://pireddie.com/darknet/yolo/)]([https://pireddie.com/darknet/yolo/](https://pireddie.com/darknet/yolo/)) (accessed on 10 June 2021)). YOLOv3 is also good enough for small object detection with Darknet-53, which possesses several improvements from Darknet-19 [29]. Regarding diseases or bruises in agricultural products, some authors have improved YOLOv3 by modifying or adding a particular network layer [13; 30]. However, there have not been a larger number of investigations of agricultural product detection of any size in industrial processing plants. [PERSON] et al. [14] presented the idea of an algorithm for tomato detection and segmentation in a greenhouse. In addition, a comparison was made with several algorithms, including YOLO. Both algorithms, in addition to the proposed YOLO, produced excellent results under the same conditions. Fruit detection in the orchard in real time represents one of the essential methods in growth stage and yield assessment. Size, color, fruit density on the crown, and other characteristics of fruits and vegetables change during growth and ripening. The YOLO algorithm can be adapted to various growth stages of agricultural products, for example, in apple detection in an orchard [16]. Traditional methods mainly detect a specific condition using a single model. A modified/improved YOLO model is proposed for apple detection in the orchard, at different growth stages, with fluctuating illumination, complex backgrounds, apples located on top of one another, and apples partially covered by branches or leaves. The aim of this paper is to find a new approach to optimize the number of the criteria and complexity of the detection algorithm while, at the same time, creating the definition of a good product. As mentioned, deep learning algorithms produce excellent results in the recognition of different types of objects, and the challenge in industrial processing of agricultural products is that automatic inspection must be performed in real time. This was the main reason for choosing the YOLOv3 algorithm over its previous versions and other deep learning algorithms. In addition to YOLOv3, both YOLOv4 (April 2020) and YOLOv5 (May 2020) were subsequently developed. Although some investigations have shown that the latest versions achieve somewhat better results compared to YOLOv3 ([PERSON] et al., 2020; [PERSON] et al., 2020; [PERSON] et al., 2020), the authors agreed to use it for initial investigation because the problem dynamics are not complex. In the case of YOLOv3, the input data include the entire image, and the algorithm itself detects a set of common characteristics obtained as training data and classifies them; raspberry variations, in the form of color and shape, are not complex, although a stalk represents a special challenge. The authors concluded that implementation of deep learning algorithms in industrial systems for various products' inspection is the next logical step, and research results indicated that there is a theoretical possibility of their application. The remainder of the paper is organized as follows: Section 2 presents the detailed methodology, followed by a visual representation of the flow of data. Section 3 first presents the results, then a detailed discussion, and the developed web application is described and proposed. Finally, Section 4 provides a final discussion and conclusions about results.