Litchi pest and disease damage fruit sorting device based on deep learning

By adopting the YOLOv8 detection model based on deep learning and an automatic transmission lychee fruit disease recognition device in the lychee pest and disease fruit sorting equipment, the problem of insufficient detection accuracy of existing equipment is solved, efficient and accurate pest identification and sorting is achieved, meeting the needs of large-scale production, and improving product quality and market competitiveness.

CN120155378APending Publication Date: 2025-06-17SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510301674.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

The existing litchi pest and fruit sorting equipment has insufficient detection accuracy, making it difficult to identify internal latent pests or early disease symptoms, resulting in pest and fruits being mixed into high-quality fruits, affecting product quality and market competitiveness.

Method used

The lychee pest and disease fruit sorting device based on deep learning is adopted, and the YOLOv8 detection model is combined with the automatic transmission lychee fruit disease recognition device and mobile APP to realize real-time data collection, analysis and feedback, and automatically complete the detection and sorting operations.

Benefits of technology

It improves the accuracy of detection, reduces the missed and mis-checking of pest and disease fruits, ensures the quality of lychee fruits after sorting, greatly improves sorting efficiency, meets the needs of large-scale lychee production, and realizes comprehensive quality monitoring and management of the lychee production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120155378A_ABST
    Figure CN120155378A_ABST
Patent Text Reader

Abstract

The invention discloses a litchi fruit sorting device based on deep learning and relates to the technical field of litchi sorting, the device comprises an automatic transmission type litchi fruit disease recognition device, a software system and a mobile phone APP, and the automatic transmission type litchi fruit disease recognition device comprises a detection rack; the lychee fruit disease and insect pest detection model based on YOLOv8 is adopted, various diseases and insect pests such as peronophythora blight, anthracnose and conopomorpha sinensis damage can be accurately recognized, compared with traditional manual sorting and partial existing automatic equipment, the detection accuracy is improved, the missing detection and false detection conditions of fruits with diseases and insect pests are reduced, automatic assembly line design is adopted, and the detection efficiency is improved. A series of operations such as detection and sorting can be automatically completed, rotation of the steering engine is matched with the camera to rapidly collect fruit image data, the computer and the development board carry out efficient image processing and detection, the whole process is rapid and smooth, and compared with manual sorting, the sorting efficiency is greatly improved, and the requirement for large-scale litchi production is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of litchi sorting, and specifically provides a litchi pest and disease fruit sorting device based on deep learning. Background Art

[0002] Litchi is the fruit of an evergreen tree in the genus Litchi of the Sapindaceae family, also known as Lizhi, Danli, Lizi, etc. The peel of litchi has scaly protrusions, with a bright red or purple color. When fresh, the pulp is translucent and congealed like fat, with a delicious smell, but it is not resistant to storage. Litchi is rich in various nutrients such as glucose, sucrose, protein, fat, carotene, vitamin B1, vitamin B2, vitamin C, folic acid, citric acid, malic acid, calcium, phosphorus, iron, arginine, and tryptophan. These components endow litchi with various effects such as nourishing the brain and strengthening the body, appetizing the spleen, promoting appetite, and enhancing immunity. During the production process of litchi, pests and diseases have a serious impact on the quality and yield of fruits. Traditional methods for sorting litchi fruits affected by pests and diseases mainly rely on manual labor. Manual sorting is not only inefficient and difficult to meet the needs of large-scale production, but also easily interfered by subjective human factors, resulting in low sorting accuracy. For example, long-term work can cause visual fatigue in humans, making it difficult to accurately identify some subtle pest and disease symptoms, thus causing pest and disease fruits to be mixed into high-quality fruits, affecting the overall quality of the product and its market competitiveness.

[0003] With the development of technology, although some automated sorting equipment has emerged, the existing equipment often has problems such as insufficient detection accuracy and limited detection range. Some equipment can only detect obvious diseases on the surface of fruits and cannot effectively identify some latent pests and diseases inside or early disease symptoms, resulting in a certain proportion of pest and disease fruits remaining in the sorted litchi, unable to meet the market's demand for high-quality litchi. At the same time, the existing sorting equipment also lacks in the combination with modern information technology, making it difficult to achieve real-time data collection, analysis, and feedback, which is not conducive to the overall quality monitoring and management of the litchi production process. Therefore, it is of great significance to develop a litchi pest and disease fruit sorting device based on deep learning. Summary of the Invention

[0004] The purpose of the present invention is to make up for the deficiencies of the existing technology and provide a litchi pest and disease fruit sorting device based on deep learning. It can accurately identify various pests and diseases such as downy blight, anthracnose, and damage by Conopomorpha sinensis Bradley, improve the accuracy of detection, effectively reduce the missed detection and misdetection of pest and disease fruits, ensure the quality of sorted litchi fruits, and can automatically complete a series of operations such as detection and sorting, greatly improving the sorting efficiency and meeting the needs of large-scale litchi production.

[0005] To solve the above technical problems, the present invention provides the following technical solutions: A litchi pest and disease fruit sorting device based on deep learning, which includes an automatic transmission litchi fruit disease recognition device, a software system, and a mobile phone APP; The automatic transmission litchi fruit disease recognition device includes a detection bench. On the left and right sides of the detection bench, an inlet high conveyor belt and an outlet low conveyor belt are respectively installed. On the left and right sides of the detection bench, a conveyor belt inlet and a conveyor belt outlet are respectively opened. The conveyor belt inlet and the conveyor belt outlet are respectively adapted to the inlet high conveyor belt and the outlet low conveyor belt. Inside the detection bench, a detection workbench is installed. On the outer surface of the detection bench, a camera bracket is installed. On the upper surface of the camera bracket, a camera is installed. On the inner top wall of the detection bench, two fill lights are installed. The detection workbench includes a servo installed on the inner bottom wall of the detection bench; The software system includes an image acquisition module, an image processing module, and a grading execution module. The image processing module includes a development board, and an operating system, a deep learning framework, and related runtime libraries are installed on the development board; The mobile phone APP is used to collect litchi pest and disease data in real time and perform detection, realize the identification of litchi fruit pests and diseases according to user needs, and the automatic transmission litchi fruit disease recognition device and the mobile phone APP transmit pest and disease data through serial communication.

[0006] Further, the detection workbench further includes a rotating table located inside the detection bench and a diseased fruit outlet opened on the outer surface of the detection bench. The rotating table is connected to the output end of the servo. The detection workbench further includes a push rod installed on the inner side wall of the detection bench.

[0007] Furthermore, the image acquisition module is used to control the camera to collect litchi fruit image data and number the images, and the image acquisition frequency satisfies the formula , where is the conveyor belt running speed is the distance that the litchi fruit moves along the conveyor belt direction between two adjacent image acquisitions; The image processing module is used for the computer to sequentially read the pictures numbered by the image acquisition module, perform image processing, and perform detection on the development board; The grading execution module is used to control the servo (1034) to perform grading actions according to the detection results of the pest and disease litchi fruits by the image processing module.

[0008] Further, the image processing module processes the litchi fruit image using a litchi fruit pest and disease detection model based on YOLOv8. This model is used to identify downy blight, anthracnose, damage caused by Conopomorpha sinensis Bradley, and healthy fruits, and to perform disease identification and grading as well as fruit quality assessment. During the training process of the model, the cross-entropy loss function is used for optimization, and the formula is , where is the number of samples, is the number of classes. In this device , corresponding to four categories: downy blight, anthracnose, damage caused by Conopomorpha sinensis Bradley, and healthy is the sample belonging to the category true label, is the probability that the model predicts the sample belongs to the category .

[0009] Further, the mobile APP converts the best weight file of the litchi fruit pest and disease detection model based on YOLOv8 into an NCNN file and then deploys it to the Android side to achieve the function of real-time detection on the mobile phone

[0010] Further, the device also includes a lower computer for controlling the action of the servo. The lower computer is connected to the servo, and the lower computer cooperates with the motor driver board to control the action of the servo. The camera is an industrial camera capable of collecting detailed images of the fruit surface, and the development board is an embedded computing platform capable of running the YOLOv8 model and achieving real-time image processing

[0011] Further, the lower computer conducts data interaction with the development board through a communication protocol, receives the control instructions sent by the development board based on the image processing results, and controls the rotation angle and action timing of the servo

[0012] Further, the parameters of the camera can be dynamically adjusted according to the detection environment and accuracy requirements, including resolution, frame rate, and sensitivity. The fill light is an LED light with adjustable brightness and color temperature, and the fill light effect can be flexibly adjusted according to different environmental light conditions and detection requirements

[0013] Compared with the prior art, the litchi pest and disease fruit sorting device based on deep learning has the following beneficial effects 1. The present invention adopts a litchi fruit pest and disease detection model based on YOLOv8, which can accurately identify various pests and diseases such as downy mildew, anthracnose, and damage caused by Conopomorpha sinensis Bradley. Compared with traditional manual sorting and some existing automated equipment, it improves the accuracy of detection, reduces the missed detection and misdetection of pest and disease fruits, adopts an automated production line design, and can automatically complete a series of operations such as detection and sorting. The servo rotates to cooperate with the camera to quickly collect fruit image data, and the computer and development board perform efficient image processing and detection. The whole process is fast and smooth. Compared with manual sorting, it greatly improves the sorting efficiency and meets the needs of large-scale litchi production.

[0014] 2. The present invention integrates a software system and a mobile phone APP, realizes real-time data collection, analysis and feedback, sends pest and disease data to the mobile phone APP for statistics through serial communication, which is convenient for users to understand the litchi pest and disease situation at any time. At the same time, the mobile phone APP deploys the detection model based on the converted NCNN file, and can realize the identification of litchi fruit pests and diseases according to user needs, which is convenient for comprehensive quality monitoring and management of the litchi production process.

[0015] Other advantages, objectives and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 It is the overall frame of a litchi pest and disease fruit sorting device based on deep learning Figure 2 It is a three-dimensional structure diagram of an automatic transmission type litchi fruit disease identification device; Figure 3 It is a front view of an automatic transmission type litchi fruit disease identification device; Figure 4 It is a working flow chart of a litchi pest and disease fruit sorting device based on deep learning; Figure 5 It is a sorting implementation flow chart of a litchi pest and disease fruit sorting device based on deep learning.

[0018] In the figure: 1. Detection bench; 101. Conveyor belt entrance; 102. Conveyor belt exit; 103. Detection workbench; 1031. Rotary table; 1032. Diseased fruit exit; 1033. Pushing rod; 1034. Steering gear; 104. Camera bracket; 105. Camera; 106. Fill light; 2. High-level entrance conveyor belt; 3. Low-level exit conveyor belt. Detailed implementation manners

[0019] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following combines the drawings and preferred embodiments to detail the specific implementation manners, structures, features and their effects of the present invention as follows.

[0020] Embodiment 1 Refer to Figures 1 - 3 , in this embodiment, the specific structure, connection relationship and working principle of the litchi pest and disease fruit sorting device based on deep learning are elaborated in detail.

[0021] A litchi pest and disease fruit sorting device based on deep learning, the device includes an automatic transmission type litchi fruit disease recognition device, a software system and a mobile phone APP.

[0022] In the automatic transmission type litchi fruit disease recognition device, the detection bench 1 serves as the basic support structure of the entire device, is made of high-strength aluminum alloy material, has good stability and durability, and the high-level entrance conveyor belt 2 and the low-level exit conveyor belt 3 are respectively installed on its left and right sides. The conveyor belt entrance 101 is connected to the high-level entrance conveyor belt 2 through a precise mechanical docking structure to ensure that litchi fruits can smoothly and smoothly enter the interior of the detection bench 1 from the high-level entrance conveyor belt 2. The conveyor belt exit 102 is also closely adapted to the low-level exit conveyor belt 3 to ensure the smooth output of the sorted fruits.

[0023] The detection workbench 103 is located inside the detection bench 1. The steering gear 1034 is fixedly installed on the inner bottom wall of the detection bench 1, and its output shaft is connected to the rotary table 1031 through a high-precision coupling. This connection method can ensure the accurate transmission of the power of the steering gear 1034 to the rotary table 1031, realizing the stable and accurate rotation of the rotary table 1031. The rotary table 1031 is provided with a special fruit placement groove, and the size and shape of the groove are designed according to the common size and shape of litchi fruits, which can effectively fix litchi fruits and prevent them from shifting during rotation. The diseased fruit exit 1032 is opened on the outer surface of the detection bench 1 at a suitable position on one side of the rotary table 1031 to facilitate the removal of diseased fruits. The pushing rod 1033 is installed on the inner side wall of the detection bench 1 and works in coordination with the steering gear 1034 and the rotary table 1031. When a diseased fruit is detected, the pushing rod 1033 is driven by the control system to push the diseased fruit from the rotary table 1031 to the diseased fruit exit 1032.

[0024] The camera bracket 104 is firmly installed on the outer surface of the detection bench 1. Its position has been precisely adjusted to ensure that the camera 105 is located directly above the rotating table 1031 at the best shooting position. The camera 105 is a high-resolution industrial camera with high frame rate and good low-light performance, capable of clearly capturing the fine features on the surface of litchi fruits. The fill light 106 is installed on the inner top wall of the detection bench 1. The two fill lights 106 are symmetrically distributed and are LED lights with adjustable brightness and color temperature. Through the supporting dimming system, uniform and soft light can be provided according to different ambient light conditions and detection requirements, eliminating shadows and ensuring stable and clear image quality collected by the camera 105.

[0025] In the software system, the image acquisition module runs in the control unit connected to the camera (105). It controls the startup, stop, and image acquisition frequency of the camera (105) through a specially developed driver. According to the formula , in practical applications, the running speed of the conveyor belt and the distance that the litchi fruit moves along the conveyor belt direction during two adjacent image acquisitions are preset, so as to accurately control the image acquisition frequency . For example, when the running speed of the conveyor belt is set to 50 mm / s and the fruit movement distance during two adjacent image acquisitions is set to 20 mm, the image acquisition frequency is 2.5 Hz. When the image acquisition module acquires images, it will automatically number each image. The numbering rule combines the timestamp and the image sequence to ensure the uniqueness and traceability of the image numbers.

[0026] The development board in the image processing module selects NVIDIA Jetson AGX Xavier, which integrates a powerful GPU inside, providing efficient computing power for the operation of deep learning models. A customized Linux operating system, the deep learning framework TensorFlow, and related image processing libraries are pre-installed on the development board. The computer reads and transmits the pictures numbered by the image acquisition module to the development board in sequence. The development board uses a litchi fruit pest and disease detection model based on YOLOv8 to process the images. During the training process of this model, the cross-entropy loss function is used for optimization, where is the number of samples, is 4, corresponding to four categories: downy blight, anthracnose, damage by Conopomorpha sinensis Bradley, and healthy. is the true label of the sample belonging to the category , is the predicted label of the model for the sample belonging to the category The probability. Through training with a large number of labeled litchi fruit image data, the model can accurately identify the types of pests and diseases of litchi fruits, and conduct disease identification grading and fruit quality identification.

[0027] The grading execution module receives the detection results of the image processing module. When a pest- or disease-infected fruit is detected, the grading execution module sends a control signal to the servo 1034. The servo 1034 accurately rotates a certain angle according to the signal, so that the groove of the rotating table 1031 with the diseased fruit aligns with the pushing rod 1033. The pushing rod 1033 extends under the action of the driving device, and pushes the diseased fruit from the rotating table 1031 to the diseased fruit outlet 1032. If a healthy fruit is detected, the servo 1034 does not move, and the fruit rotates with the rotating table 1031 to the conveyor belt outlet 102 and is output through the outlet low conveyor belt 3.

[0028] The mobile APP is developed based on the Android system and has a simple and easy-to-use user interface. Through serial communication, the automatic transmission type litchi fruit disease identification device transmits the pest and disease data to the mobile APP in real time. The mobile APP pre-converts the best weight file of the litchi fruit pest and disease detection model based on YOLOv8 into an NCNN file and deploys it locally to achieve the real-time detection function of the mobile phone. Users can view the real-time pest and disease data statistical charts on the APP, including information such as the quantity and proportion of different pest and disease types, and can also manually trigger the detection and analysis of specific fruit images according to needs, which is convenient for comprehensive quality monitoring and management of the litchi production process.

[0029] Embodiment 2 See Figures 4 - 5 This embodiment details the complete usage process of the litchi pest and disease fruit sorting device based on deep learning.

[0030] Before using the device, technicians first conduct a comprehensive inspection and debugging of the hardware equipment. Check whether the connections of each component of the detection bench 1 are firm, whether the operation of the inlet high conveyor belt 2 and the outlet low conveyor belt 3 is smooth, whether the rotation direction and speed of the motor are normal, set the parameters of the camera 105, and adjust the resolution to an appropriate value according to the actual detection environment and accuracy requirements, such as 5 million pixels, set the frame rate to a value matching the image acquisition frequency, and set the sensitivity to a value between ISO200 and ISO800 according to the light conditions. At the same time, adjust the brightness and color temperature of the fill light 106 to ensure that the light is uniform and bright and can clearly illuminate the surface of the litchi fruit.

[0031] In terms of software, ensure that the operating system, deep learning framework, and related runtime libraries on the development board are running properly. Check whether the programs of the image acquisition module, image processing module, and hierarchical execution module are correctly loaded without errors. On the mobile phone APP, confirm that the serial communication connection with the automatic transmission type litchi fruit disease recognition device has been successfully established. Check whether the NCNN files are correctly deployed and whether the various functions of the APP can be used normally.

[0032] Start the device. The operator places the picked litchi fruits one by one on the entrance high-position conveyor belt 2 through the manipulator. The litchi fruits are arranged at a certain interval to avoid mutual occlusion and affect the detection effect. The entrance high-position conveyor belt 2 runs smoothly at a set speed and transports the litchi fruits to the detection workbench 103 inside the detection bench 1 in sequence.

[0033] When the litchi fruit reaches the specified position on the rotating table 1031, the image acquisition module controls the camera 105 to collect fruit image data according to the preset image acquisition frequency. For example, according to the frequency calculated by the formula The camera 105 quickly takes multi-angle images of the litchi fruit, including the top, side, etc., to ensure that the surface information of the fruit can be comprehensively captured. After the collected images are automatically numbered, they are transmitted to the image processing module.

[0034] The computer in the image processing module reads the images in sequence and sends them to the development board. The development board uses the litchi fruit pest and disease detection model based on YOLOv8 to process the images, identify whether the fruit is suffering from pests and diseases such as downy blight, anthracnose, and damage by Conopomorpha sinensis Bradley, and grade the diseases to evaluate the fruit quality. For example, the model detects that there are black spots and water-soaked lesions on the surface of a certain fruit. After analysis and judgment, it is determined to be downy blight, and the disease level is determined to be moderate according to the size and quantity of the lesions.

[0035] The hierarchical execution module receives the detection results of the image processing module. If the detected fruit is a healthy fruit, the servo 1034 remains stationary, and the rotating table 1031 continues to rotate. The fruit rotates with the rotating table 1031 to the conveyor belt outlet 102 and is transported to the subsequent packaging or storage area through the outlet low-position conveyor belt 3.

[0036] If the detected fruit is a pest and disease fruit, the hierarchical execution module sends corresponding control signals to the servo 1034 according to the disease level. The servo 1034 rotates precisely, so that the groove of the rotating table 1031 with the pest and disease fruit is aligned with the push rod 1033. The push rod 1033 extends under the push of the driving device and pushes the pest and disease fruit from the rotating table 1031 to the disease fruit outlet 1032. The disease fruits are collected through a special collection channel for subsequent processing to avoid mixing into high-quality fruits.

[0037] During the fruit sorting process, the automatic transmission type litchi fruit disease recognition device sends pest and disease data to the mobile phone APP in real time through serial communication. The mobile phone APP statistically analyzes the data and generates statistical reports on the quantity of pests and diseases, charts on the proportion of different disease types, etc. Users can open the mobile phone APP at any time to view this data and understand the pest and disease situation of the current batch of litchi fruits. For example, if users find that the proportion of litchi fruits with downy blight in a certain batch reaches 10%, they can timely adjust the storage environment of litchi or take corresponding prevention and control measures to reduce losses.

[0038] Meanwhile, users can also manually select the pest and disease data within a certain period of time on the APP for detailed analysis according to actual needs, or screen and view the data of litchi fruits picked from a specific area, which is convenient for comprehensively monitoring and managing the quality of the litchi production process.

[0039] After a batch of litchi fruits is sorted, the operator stops the operation of the device, cleans and maintains the device, clears the residual fruit debris and impurities on components such as the detection bench 1, conveyor belt, and push rod 1033, checks whether there are any damages or abnormal wear on each component of the device. If there are problems, repair or replace them in time, and back up the data in the mobile phone APP for subsequent in-depth data analysis and research.

[0040] The above is only a preferred embodiment of the present invention, and it does not impose any form of limitation on the present invention. Although the present invention has been disclosed as above with the preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to equivalent embodiments with equivalent changes within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A litchi pest and disease fruit sorting device based on deep learning, characterized in that: The device includes an automatic transmission type litchi fruit disease identification device, a software system and a mobile phone APP; The automatic transmission type litchi fruit disease identification device comprises a detection stand (1), wherein an entrance high-position conveyor belt (2) and an exit low-position conveyor belt (3) are respectively installed on the left and right sides of the detection stand (1), and a conveyor belt entrance (101) and a conveyor belt exit (102) are respectively opened on the left and right sides of the detection stand (1), and the conveyor belt entrance (101) and the conveyor belt exit (102) are respectively adapted to the entrance high-position conveyor belt (2) and the exit low-position conveyor belt (3), an detection workbench (103) is installed inside the detection stand (1), a camera bracket (104) is installed on the outer surface of the detection stand (1), and a camera (105) is installed on the upper surface of the camera bracket (104), two fill lights (106) are installed on the inner top wall of the detection stand (1), and the detection workbench (103) comprises a steering gear (1034) installed on the inner bottom wall of the detection stand (1); The software system includes an image acquisition module, an image processing module and a hierarchical execution module. The image processing module includes a development board, and an operating system, a deep learning framework and related runtime libraries are installed on the development board; The mobile phone APP is used to collect and detect litchi pest and disease data in real time, and to identify litchi fruit pests and diseases according to user needs. The automatic transmission litchi fruit disease identification device and the mobile phone APP transmit the pest and disease data through serial port communication.

2. A deep learning-based litchi fruit sorting device according to claim 1, characterized in that: The detection workbench (103) further comprises a rotating table (1031) located inside the detection stand (1) and a diseased fruit outlet (1032) opened on the outer surface of the detection stand (1); the rotating table (1031) is connected to an output end of a steering gear (1034); and the detection workbench (103) further comprises a push rod (1033) mounted on the inner side wall of the detection stand (1).

3. A deep learning-based litchi fruit sorting device according to claim 1, characterized in that: The image acquisition module is used to control the camera (105) to collect litchi fruit image data and number the images. Satisfy the formula ,in Conveyor belt running speed is the distance that the litchi fruit moves along the conveyor belt when two adjacent images are collected; The image processing module is used for the computer to read the pictures numbered by the image acquisition module in sequence, perform image processing, and perform detection on the development board; The grading execution module is used to control the steering engine (1034) to execute the grading action according to the detection result of the image processing module on the diseased and insect-infested litchi fruits.

4. A deep learning-based litchi fruit sorting device according to claim 3, characterized in that: The image processing module uses a litchi fruit disease and insect pest detection model based on YOLOv8 to process litchi fruit images. The model is used to identify downy mildew, anthracnose, pedicel borer damage and healthy fruits, and to perform disease identification and classification and fruit quality identification. During the training process, the model uses a cross entropy loss function To optimize, the formula is ,in is the sample size, is the number of categories. In this device , corresponding to four categories: downy mildew, anthracnose, pedunculate borer damage, and health. It is a sample Belongs to category The real label, is the model prediction sample Belongs to category probability.

5. The device for sorting litchi fruits with diseases and insect pests based on deep learning according to claim 1, characterized in that: The mobile phone APP converts the optimal weight file of the litchi fruit disease and pest detection model based on YOLOv8 into an NCNN file and deploys it to the Android end to realize the real-time detection function of the mobile phone.

6. The device for sorting litchi fruits with diseases and insect pests based on deep learning according to claim 1, characterized in that: The device further comprises a lower computer for controlling the action of the servo (1034), the lower computer being connected to the servo (1034), and the lower computer cooperates with the motor drive board to control the action of the servo (1034), the camera (105) being an industrial camera capable of collecting detailed images of the surface of fruit, and the development board being an embedded computing platform capable of running a YOLOv8 model and realizing real-time image processing.

7. A deep learning-based litchi fruit sorting device according to claim 6, characterized in that: The lower computer exchanges data with the development board through a communication protocol, receives control instructions issued by the development board based on image processing results, and controls the rotation angle and action timing of the servo (1034).

8. The deep learning-based litchi fruit sorting device according to claim 1, characterized in that: The parameters of the camera (105) can be dynamically adjusted according to the detection environment and accuracy requirements, including resolution, frame rate and sensitivity. The fill light (106) is an LED light with adjustable brightness and color temperature, and the fill light effect can be flexibly adjusted according to different ambient light conditions and detection requirements.