Renewable resource sorting line optical selector testing method
By using image detection and time control methods, the activation timing of the air valve of the optical separator is precisely controlled, which solves the problem of low efficiency in existing testing methods and realizes efficient and accurate air valve testing and equipment monitoring.
Patent Information
- Application Number
- CN202411016352.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-27
- Publication Date
- 2024-11-22
AI Technical Summary
Existing methods for testing the air valves of optical separators are inefficient and rely on manual operation, leading to large errors and making it difficult to accurately control the timing of valve activation.
By acquiring images of the conveyor belt, the location of the target item is determined using an image detection algorithm, converted into actual physical distance, the estimated arrival time at the valve is calculated, the valve is controlled to start at a preset time, and the actual start time is recorded. The time difference is compared to determine whether the separation was successful or failed.
It enables precise control of the valve start-up timing, improves testing efficiency and accuracy, reduces human error, can simulate valve performance under normal operating conditions, and provides automated equipment monitoring and troubleshooting support.
Smart Images

Figure CN119000056A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine testing, and in particular to a method for testing an optical sorting machine for a renewable resource sorting line. Background Art
[0002] After the optical sorter used to sort renewable resources has been running for a long time, the air valve used for blowing may not blow or blow inaccurately due to wrong blowing timing. Therefore, it is necessary to perform fatigue / precision testing on the air valve of the optical sorter. The testing process mainly simulates the various functions of the air valve during normal operation.
[0003] At present, the testing method for the air valve of the optical sorter mainly adopts the method of blowing air simultaneously on a single or all the air valves, or adopts the method of intermittent air blowing. In terms of test accuracy, more manual target placement is required, and then the targets blown out are counted after being sorted by the optical sorter. This method leads to low efficiency in the air valve testing. Summary of the invention
[0004] The present application provides a method for testing an optical sorter of a renewable resource sorting line, which is used to improve the efficiency of testing gas valves.
[0005] In the first aspect, the present application provides a method for testing an optical sorter of a recycling resource sorting line, which is applied to an optical sorter, and the method includes: acquiring a transmission image on a conveyor belt, and detecting the position of a target object in the transmission image according to an image detection algorithm; converting the position of the target object into an actual physical distance according to preset calibration parameters; calculating an estimated time for the target object to reach an air valve device based on the actual physical distance and the conveyor belt speed; controlling the air valve device to start at a preset time based on the estimated time; recording the actual start-up time of the air valve device; comparing the actual start-up time with the preset time to obtain a time difference to obtain a judgment result, and the judgment result includes if the time difference is not greater than a preset threshold, it is judged that the separation is successful, and if it is less than the preset threshold, it is judged that the separation fails.
[0006] By adopting the above technical solution, the transmission image on the conveyor belt is obtained and the position of the target object is detected, and the position is converted into the actual physical distance, so as to calculate the estimated time for the target object to reach the air valve device. Based on the estimated time, the air valve device is controlled to start at the preset time, and the actual start time is recorded. The time difference between the actual start time and the preset time is compared to determine whether the separation is successful. The precise control of the air valve start timing is achieved through the method based on image detection and time control, which improves the accuracy of the air valve test. Through the automated detection and judgment process, the test efficiency is significantly improved, the errors caused by manual operation are reduced, and the operation of the air valve under the normal working state of the optical sorter can be simulated, and the target recognition accuracy at the algorithm level can be directly tested.
[0007] In combination with some embodiments of the first aspect, in some embodiments, the step of converting the position of the target object into the actual physical distance according to preset calibration parameters specifically includes: obtaining the length and width of the conveyor belt, and obtaining the field of view angle and installation height of the camera on the optical sorting machine; establishing a mapping relationship between the image coordinate system and the actual physical coordinate system according to the length, the width, the field of view angle and the installation height; converting the pixel coordinates of the target object in the image into actual physical coordinates through the mapping relationship; calculating the distance between the actual physical coordinates and the preset base point to obtain the actual physical distance of the target object.
[0008] By adopting the above technical solution, a mapping relationship between the image coordinate system and the actual physical coordinate system is established, and the accurate conversion of the target object position from the image pixel coordinates to the actual physical coordinates is realized. The length and width of the conveyor belt and the field of view and installation height of the camera are obtained, and a complete spatial reference system is constructed. The conversion method takes into account the imaging characteristics and installation position of the camera to ensure the accuracy of the coordinate conversion. By calculating the distance between the actual physical coordinates and the preset base point, the accurate physical position of the target object is obtained, thereby enhancing the reliability and accuracy of the optical sorter valve test.
[0009] In combination with some embodiments of the first aspect, in some embodiments, after the step of comparing the actual start time with the preset time to obtain the time difference, if the time difference is not greater than the preset threshold, it is determined that the separation is successful, if it is less than the preset threshold, it is determined that the separation fails, the method also includes: counting the determination results of all target objects to obtain a result collection; calculating the accuracy of the optical sorter based on the result collection; and sending the accuracy to the client for display.
[0010] By adopting the above technical solution, the judgment results of all target objects are counted, the accuracy of the optical sorter is calculated, and the accuracy is sent to the client for display. This method can not only evaluate the separation effect of a single target object, but also comprehensively analyze the overall performance of the entire optical sorter. By summarizing a large amount of data, a more statistically significant accuracy index is obtained, which fully reflects the working status of the gas valve. The accuracy data is transmitted to the client in real time, which improves the efficiency of equipment monitoring and provides data support for equipment maintenance and optimization. Ultimately, it realizes the accurate evaluation and continuous improvement of the performance of the optical sorter, ensuring that the equipment maintains an efficient and stable working state during long-term operation.
[0011] In combination with some embodiments of the first aspect, in some embodiments, after the step of calculating the accuracy of the optical sorter based on the result collection, the method also includes: if the accuracy is lower than a preset accuracy threshold, detecting the speed of the conveyor belt to obtain a speed detection result, detecting the air valve parameters of the optical sorter to obtain a parameter detection result, and detecting the machine operating parameters of the optical sorter to obtain an operation detection result; if at least one of the speed detection result, the parameter detection result and the operation detection result is not within the preset range, a prompt message is generated for display.
[0012] By adopting the above technical solution, when the accuracy of the optical sorter is lower than the preset accuracy threshold, the detection of the conveyor belt speed, air valve parameters and machine operating parameters is automatically triggered, and the detection results are compared with the preset range. If there is an abnormality, a prompt message is generated for display. Through multi-dimensional parameter detection, the equipment operation status is comprehensively evaluated, and the key factors affecting the accuracy are effectively identified. The automated detection and prompt mechanism greatly improves the troubleshooting efficiency, reduces the need for manual intervention, can promptly detect and warn of potential problems, and improves the overall operation efficiency and reliability.
[0013] In combination with some embodiments of the first aspect, in some embodiments, before the step of comparing the actual start time with the preset time to obtain the time difference to obtain a judgment result, the judgment result includes if the time difference is not greater than a preset threshold, it is judged that the separation is successful, if it is less than the preset threshold, it is judged that the separation fails, the method also includes: obtaining size information of the target object; classifying the target object into one of multiple preset size grades according to the size information; obtaining the corresponding preset threshold from a preset threshold database according to the size grade to which the target object belongs, wherein the threshold database stores preset thresholds corresponding to different size grades, and the preset thresholds in the preset threshold database are obtained by performing valve separation tests on sample items of each size grade.
[0014] By adopting the above technical solution, before determining the air valve separation performance, the size information of the target object is first obtained and classified into preset size grades. According to the size grade to which the object belongs, the corresponding preset threshold is obtained from the preset threshold database. The preset threshold database stores the thresholds corresponding to different size grades, which are obtained by performing air valve separation tests on sample items of each size grade. This method takes into account the impact of objects of different sizes on the air valve separation performance, sets a special determination standard for each size grade, and improves the accuracy and applicability of separation performance determination by using targeted thresholds, ultimately achieving accurate classification and evaluation of objects of different sizes, and improving the flexibility and reliability of the optical sorter air valve test.
[0015] In combination with some embodiments of the first aspect, in some embodiments, after the step of comparing the actual start time with the preset time to obtain a time difference, if the time difference is not greater than a preset threshold, determining that the separation is successful, if it is less than the preset threshold, determining that the separation fails, the method also includes: inputting a recycled object image recognition model into an image recognition model to identify the current object to obtain category information of the current object, the image recognition model is trained by a recycled object training set, and the recycled object training set is made up of all types of recycled object images; matching the corresponding valve start time according to the category information; starting the valve at the valve start time, so that the current object is classified into the corresponding category.
[0016] By adopting the above technical solution, the recycled object image recognition model is applied to the recognition of the current object to obtain the category information of the object. The image recognition model is trained by a training set containing images of all kinds of recycled objects and has a wide range of recognition capabilities. According to the recognized category information, the corresponding valve start time is automatically matched, and the valve is accurately started at the specified time to achieve accurate classification of the object, thereby improving the accuracy of object recognition and classification. The automated recognition and control process reduces human intervention, improves sorting efficiency, and can adapt to various types of recycled objects, with strong versatility and expansibility.
[0017] In combination with some embodiments of the first aspect, in some embodiments, after the step of calculating the accuracy of the optical sorter based on the result collection, the method also includes: if the accuracy is not lower than a preset accuracy threshold, obtaining the current conveyor belt speed, the current machine operating parameters and air valve parameters of the optical sorter, and saving the current conveyor belt speed, the current machine operating parameters and the air valve parameters.
[0018] By adopting the above technical solution, when the accuracy of the optical sorter is not lower than the preset accuracy threshold, the current conveyor belt speed, the current machine operating parameters of the optical sorter and the valve parameters are automatically obtained and saved, thereby achieving accurate capture and recording of the optimal working state of the optical sorter. By real-time monitoring and saving of key operating parameters, a dynamic optimal parameter library is established, which reflects the ideal configuration of the equipment when it operates with high precision, and provides reliable benchmark data for subsequent performance optimization and fault diagnosis. The automated parameter collection and storage mechanism reduces human intervention, ensures the accuracy and consistency of the data, adapts to the characteristics of the equipment changing over time, and improves the long-term operation stability and efficiency of the equipment.
[0019] In a second aspect, an embodiment of the present application provides an optical sorter, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to make the optical sorter execute the method described in the first aspect and any possible implementation method of the first aspect.
[0020] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, and when the above-mentioned computer program product runs on an optical sorter, the above-mentioned optical sorter executes the method described in the first aspect and any possible implementation method of the first aspect.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the instructions are executed on an optical sorter, the optical sorter executes the method described in the first aspect and any possible implementation of the first aspect.
[0022] It can be understood that the optical sorter provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. This application obtains the transmission image on the conveyor belt and detects the position of the target object, converts the position into the actual physical distance, and calculates the estimated time for the target object to arrive at the air valve device. Based on the estimated time, the air valve device is controlled to start at a preset time, and the actual start time is recorded. The time difference between the actual start time and the preset time is compared to determine whether the separation is successful. The method based on image detection and time control realizes precise control of the air valve start timing, thereby improving the accuracy of the air valve test. Through the automated detection and judgment process, the test efficiency is significantly improved, the errors caused by manual operation are reduced, and the operation of the air valve under the normal working state of the optical sorter can be simulated, and the target recognition accuracy at the algorithm level can be directly tested.
[0024] 2. This application realizes the accurate conversion of the target object position from the image pixel coordinates to the actual physical coordinates by establishing a mapping relationship between the image coordinate system and the actual physical coordinate system, obtains the length and width of the conveyor belt, the field of view angle and the installation height of the camera, and constructs a complete spatial reference system. The conversion method takes into account the imaging characteristics and installation position of the camera to ensure the accuracy of the coordinate conversion. By calculating the distance between the actual physical coordinates and the preset base point, the accurate physical position of the target object is obtained, thereby enhancing the reliability and accuracy of the optical sorter valve test.
[0025] 3. This application obtains the category information of the object by applying the recycled object image recognition model to the identification of the current object. The image recognition model is trained by a training set containing images of all types of recycled objects and has a wide range of recognition capabilities. According to the identified category information, the corresponding valve start-up time is automatically matched, and the valve is accurately started at the specified time to achieve accurate classification of the object, thereby improving the accuracy of object recognition and classification. The automated recognition and control process reduces human intervention, improves sorting efficiency, and can adapt to various types of recycled objects, with strong versatility and extensibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of a method for testing an optical sorter of a recycling resource sorting line in an embodiment of the present application; Figure 2 This is another flow chart of the test method of the optical sorter of the recycling resource sorting line in the embodiment of the present application; Figure 3 This is another flow chart of the test method of the optical sorter of the recycling resource sorting line in the embodiment of the present application; Figure 4 It is a schematic diagram of the structure of a physical device of the optical sorter in the embodiment of the present application. DETAILED DESCRIPTION
[0027] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.
[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0029] For ease of understanding, the application scenarios of the embodiments of the present application are introduced below.
[0030] like Figure 1 As shown, Figure 1 As shown in (A), the basic structural layout of the optical sorter is shown. The computing terminal usually refers to the device that processes and displays the test results. It is used to receive signals from the optical sorter, process and analyze data, and finally output the judgment results. The camera is an image acquisition device installed on the optical sorter. It captures the image data on the conveyor belt in real time and sends the data to the control system for processing. The field of view and installation height of the camera are key parameters for determining the mapping relationship between the image coordinate system and the actual physical coordinate system. Conveyor belt: a device for transporting target objects. The length and width of the conveyor belt are important components of the calibration parameters, which are used to establish the mapping relationship between image coordinates and physical coordinates. The air valve (including air pipes and air holes) is a device used to blow air to separate the target objects. In the optical sorter, the start-up timing and accuracy of the air valve are directly related to the separation effect and the accuracy of the test results. Among them, the target objects are generally recycled resources such as glass bottles and cans.
[0031] like Figure 2 As shown, Figure 2 Part (B) in the figure shows the detection and recognition process of the target image, which is the image of the object on the conveyor belt captured by the camera. In the present invention, the target image is processed by the image detection algorithm to identify the location and category of the target object. In the target image, the bounding box is used to mark and locate the location of the target object. The pixel coordinates of the target object can be determined through the bounding box and further converted into actual physical coordinates. The confidence score is the AI algorithm's assessment of the accuracy of the target object recognition. The higher the confidence score, the more accurate the algorithm's recognition of the target object. The confidence score is an important indicator for judging the credibility of the recognition result.
[0032] For example, as shown in the detection target bounding box, the target objects detected by the camera (most of which are recycled resources) can be roughly divided into multiple categories by image processing, such as transparent white bottles with labels, oil bottles, wide-mouth and aluminum-mouth bottles, and cans. By collecting bottle data of the above categories and manually annotating the categories and positions of the bottles, the detection algorithm model can be trained to enable the model to remember which bottle belongs to which category.
[0033] like Figure 3 As shown, Figure 3 Part (C) shows the calibration parameters of the optical sorter and the calculation of the physical distance.
[0034] The conveyor belt entrance is the starting position where the target item enters the optical sorting machine. In the present invention, the conveyor belt entrance is the key point to determine the initial position of the item and calculate the conveying time. The camera shooting range is the field of view of the camera, which determines the image area that can be captured. The size of this range is determined by the field of view and installation height of the camera, and is an important part of the calibration parameters. mmW is a visual calibration parameter, which indicates the actual width of the camera scanning range. mmW is a key parameter for converting from the image coordinate system to the actual physical coordinate system. mmH2 is a visual calibration parameter, which indicates the distance from the camera scanning line to the air valve. mmH2 is used to calculate the actual distance from the target item to the air valve. mmH1 is a visual calibration parameter, which indicates the distance from the bottom of the camera scanning line to the air valve. mmH1 can be used to further determine the vertical position of the item in the physical space.
[0035] For ease of understanding, the following describes the process of the method provided by this implementation in combination with the above scenario. Figure 1 , which is a flow chart of a method for testing an optical sorter for a recycling resource sorting line in an embodiment of the present application.
[0036] S101, acquiring a transmission image on a conveyor belt, and detecting the position of a target object in the transmission image according to an image detection algorithm; Among them, the conveyor belt refers to the conveyor belt in the optical sorter, which is used to transport the target objects; the transmitted image refers to the image acquired by the image acquisition device set on the conveyor belt; the image detection algorithm refers to the algorithm that can detect the position information of the target object in the image.
[0037] Specifically, in this step, during the operation of the optical sorter, the image acquisition device acquires the image information on the conveyor belt in real time, and then uses the image detection algorithm to process these images to identify the position of the target object in each image frame, that is, the coordinate position of the target object in the image.
[0038] In some embodiments, this step can be implemented in the following two ways: An industrial camera is set up to directly capture the image of the conveyor belt. The camera is connected to the optical sorter control system, and the captured image is transmitted to the control system in real time. In the control system, a target detection algorithm such as Faster R-CNN is used to detect the target position in each image; the image is acquired using the line scan camera that comes with the optical sorter. The line scan camera is installed above the conveyor belt and can scan objects in the vertical direction. By analyzing the output signal of the line scan camera, the pixel value of each scan line can be obtained, and the target position can be determined based on the pixel value. It is understandable that other image acquisition and processing methods can also be used to implement this step, which is not limited here.
[0039] S102, converting the position of the target object into an actual physical distance according to preset calibration parameters; Among them, the preset calibration parameters include the conversion relationship from the image coordinate system to the actual physical coordinate system. This step is to convert the coordinate position of the detected target object in the image into the distance in the actual physical space.
[0040] Specifically, first obtain the length and width parameters of the conveyor belt, as well as the field of view angle and height parameters of the camera installed on the optical sorter; establish a mapping relationship between the image coordinate system and the actual physical coordinate system based on the length and width parameters of the conveyor belt and the field of view angle and height parameters of the camera; convert the pixel coordinates of the target object in the image into coordinates in the actual physical space through the mapping relationship established in the previous step; calculate the distance between the physical coordinates of the target object and the set coordinate origin, and obtain the actual physical distance of the target object.
[0041] Among them, the preset calibration parameters include mmW, mmH1, mmH2 are the actual widths of the air valve scanning range, mmH1 is the distance from the air valve to the camera, mmH2 is the distance from the air valve to the bottom of the camera scanning, and the pixel distance h1 from the bottom of the image is calculated according to the upper and lower positions of the target object in the image. According to the actual physical distance corresponding to each pixel, the actual physical distance TH1 corresponding to the h1 pixel distance is calculated, and TH1 is added to mmH1 to obtain the actual distance OBJ_H from the target center to the air valve.
[0042] S103, calculating the estimated time for the target object to reach the gas valve device based on the actual physical distance and the conveyor belt speed; Among them, the actual physical distance is the actual distance between the target object and the air valve; the conveyor belt speed is the moving speed of the optical sorting machine conveyor belt; and the estimated time is the estimated time from the detection of the target object to the arrival of the target object at the air valve position.
[0043] Specifically, this step is to calculate the estimated time from the moment the target object is detected to the moment the target object arrives at the position of the air valve device based on the actual physical distance of the target object and the moving speed of the conveyor belt, and the calculation is performed using the formula "estimated time = actual physical distance / conveyor belt speed", that is, the time for the target object to arrive at the air valve position is equal to the distance it leaves the air valve divided by the speed of the conveyor belt. For example, the estimated time is calculated using the formula T1 = OBJ_H / v, that is, the distance OBJ_H from the center point of the target to the air valve is divided by the conveyor belt speed v, and the estimated time T1 from the detection of the target to its arrival at the air valve position is obtained.
[0044] S104, controlling the gas valve device to start at a preset time based on the estimated time; The preset time refers to the best time to start the gas valve calculated based on the expected time.
[0045] Specifically, this step uses the estimated time for the target object to reach the air valve position calculated in the previous step to deduce the best time to start the air valve, and then sends a control signal to the air valve device at the preset time to start the air flow blowing action of the air valve device.
[0046] In some embodiments, this step can be implemented in the following two ways: in the control system, a gas valve control module is set, which receives the T1 time parameter and starts the gas valve at a fixed advance time before T1 arrives; the timing function of the programmable logic controller is directly used to set the timing output according to the T1 time, and the gas valve is started at a preset advance time.
[0047] S105, recording the actual start-up time of the gas valve device; The actual start time refers to the actual time from when the gas valve device receives the control signal to when the gas flow is ejected. Specifically, this step is to detect the actual time from when the gas valve device receives the start control signal to when the gas is ejected, and record this time value as a basis for subsequent judgment of the performance of the gas valve device.
[0048] In some embodiments, this step can be implemented in the following two ways: in the control system, a detection module is set to calculate and record the actual time from the control signal being sent to the air valve to start the injection according to the control signal sending time and the feedback status of the air valve, the air valve is monitored by a high-speed camera, and the time interval from the control signal being sent to the air valve to start the injection is calculated by image analysis. It can be understood that as long as the actual time from control to startup of the air valve can be correctly obtained, no limitation is made here.
[0049] S106, comparing the actual start time with the preset time to obtain a time difference to obtain a determination result, wherein if the time difference is not greater than a preset threshold, it is determined that the separation is successful, and if it is less than the preset threshold, it is determined that the separation fails.
[0050] Among them, the preset moment is the optimal start time of the valve calculated in advance according to the target transmission time; the time difference is the time difference between the preset moment and the actual start time; the preset threshold is the time range threshold for determining the performance of the valve.
[0051] Specifically, this step is to compare the recorded actual valve start time with the optimal valve start time pre-calculated according to the target transmission time, and calculate the time difference between the two time points. If the time difference is within the specified threshold range, it is determined that the valve action is normal and the target segmentation is successful; if the time difference exceeds the threshold range, it is determined that the valve action is abnormal and the target segmentation fails.
[0052] For example, the actual start time is the actual time T2 from when the gas valve is controlled to when the injection is started; the time difference is the time difference between T2 and T1; and the preset threshold is given as plus or minus 8 ms in the example.
[0053] Specifically, since the conveyor belt speed is very fast and the target to be blown is small, the blowing error is relatively strict. Here, the maximum blowing error is 8 milliseconds, otherwise the air valve is easy to blow off and cause blowing failure. Each image is recorded from the model detection data time to the air valve blowing time T2. If the air valve has not blown after 500ms, the failure record is increased by 1, and the next image is continued. The T1 time is the theoretically normal blowing time. If the air valve time T2 does not eject the air normally within the T1 time 105.5ms plus or minus 8ms, it is determined that the air valve blowing of the current target has failed, and the failure record is increased by 1, otherwise the success record is increased by 1.
[0054] The following is a more detailed description of the process of the method provided by this implementation. Figure 2 , is another flow chart of the testing method of the optical sorter of the recycling resource sorting line in the embodiment of the present application.
[0055] S301, acquiring a transmission image on a conveyor belt, and detecting the position of a target object in the transmission image according to an image detection algorithm.
[0056] It can be understood that this step is similar to step S101 and will not be described in detail here.
[0057] S302, obtaining the length and width of the conveyor belt, and obtaining the field of view angle and installation height of the camera on the optical sorting machine.
[0058] Among them, the conveyor belt length and width refer to the length and width of the conveyor belt in the optical sorter; the field of view angle refers to the field of view angle parameter of the camera installed on the optical sorter; and the installation height refers to the height installation position of the camera relative to the conveyor belt.
[0059] Specifically, this step is to obtain the length and width parameters of the conveyor belt in the optical sorter, as well as the field of view angle of the camera configured on the optical sorter and the height parameters relative to the conveyor belt. These parameters will be used to subsequently establish the conversion relationship from the image coordinate system to the actual physical coordinate system. The length and width information of the conveyor belt can be obtained by reading the design parameters of the optical sorter, using a measuring tool to measure the installation height of the camera, and obtaining the field of view angle parameters from the camera data sheet.
[0060] S303: Establish a mapping relationship between the image coordinate system and the actual physical coordinate system according to the length, the width, the field of view and the installation height.
[0061] Among them, the length and width refer to the length and width of the conveyor belt given in the technical briefing; the field of view angle and installation height refer to the field of view angle of the camera on the optical sorting machine and the installation height relative to the conveyor belt.
[0062] The mapping relationship refers to establishing the correspondence between the image coordinate system and the actual physical coordinate system.
[0063] Specifically, this step uses the length and width parameters of the conveyor belt and the field of view and height parameters of the camera to determine the actual length in the actual physical coordinate system corresponding to each pixel point in the image coordinate system through the optical mapping principle.
[0064] The mapping relationship can be established through the following steps: calculate the actual physical range of the conveyor belt based on the length and width parameters of the conveyor belt, calculate the projection area of the camera's field of view on the conveyor belt based on the camera's field of view angle and installation height parameters, divide the camera's field of view into multiple small units that match the resolution of the image coordinate system, and calculate the actual length represented by each small unit within the actual physical range of the conveyor belt. In this way, the actual physical length corresponding to each image coordinate pixel point can be obtained, and a mapping relationship between pixel coordinates and actual coordinates can be established.
[0065] S304: Convert the pixel coordinates of the target object in the image into actual physical coordinates through the mapping relationship.
[0066] Specifically, this step utilizes the mapping relationship between the image coordinate system and the actual physical coordinate system established previously to convert the two-dimensional pixel coordinates of the detected target object in the image plane into physical coordinate values in the actual three-dimensional space. This can be done by establishing a conversion function, inputting the pixel coordinates of the target, and calculating the actual physical space coordinates of the target on the conveyor belt based on the conversion function in the mapping relationship.
[0067] S305: Calculate the distance between the actual physical coordinates and the preset base point to obtain the actual physical distance of the target object.
[0068] Specifically, this step requires determining a preset base point coordinate as the reference origin, and then calculating the straight-line distance from the target center point coordinate to the base point coordinate to obtain the actual physical distance of the target object relative to the control actuator such as the gas valve.
[0069] For example, if it is inferred that the target object is contained, the target position information detection data will be obtained. For example, the target in the current image has the position information on the left (xmin=298, ymin=95, xmax=412, ymax=163). Then, the pixel distance from the center point of the target to the bottom edge of the image can be calculated as h1=248-(ymin+ymax) / 2=119pix. According to the mapping relationship established earlier, the actual distance corresponding to each pixel given in the technical briefing is 1.766mm, so the actual distance from the center point of the target to the bottom edge of the image can be calculated as: TH1=1.766*119=210.15mm. mmH1 represents the distance from the valve to the bottom of the camera scanning line as 212mm, so the actual distance from the center point of the target to the valve can be obtained as: OBJ_H=TH1+mmH1=210.15mm+212mm=422.15mm.
[0070] S306: Calculate the estimated time for the target object to reach the gas valve device based on the actual physical distance and the conveyor belt speed.
[0071] It can be understood that this step is similar to step S103 and will not be described in detail here.
[0072] S307: Control the gas valve device to start at a preset time based on the estimated time.
[0073] It can be understood that this step is similar to step S104 and will not be described in detail here.
[0074] S308, recording the actual start-up time of the gas valve device.
[0075] It can be understood that this step is similar to step S105 and will not be described in detail here.
[0076] S309: Obtain size information of the target object.
[0077] Among them, size information refers to analyzing the target object through image processing algorithms to obtain data on the physical dimensions of the target object, such as length, width, and height.
[0078] Specifically, this step utilizes the visual system in the optical sorter to process and analyze the image of the target object to measure and obtain the physical size information of the target object, such as parameters such as length, width and height. This can be achieved by comparing the target boundaries and performing pixel conversion based on existing mapping relationships.
[0079] S310: Classify the target object into one of a plurality of preset size grades according to the size information.
[0080] The preset size classes refer to multiple categories that are pre-defined according to the types of target objects.
[0081] Specifically, this step is to determine which type of object classification the target object belongs to based on the acquired size information of the target object and other features of the target object. For example, you can pre-define categories such as plastic bottles, metal cans, and cardboard boxes, and then determine and classify the target object into the corresponding item category based on its specific size, shape, material, and other features.
[0082] The classification criteria can be obtained by collecting and analyzing the size data of various types of items. The classification results will be used to determine the selection of control parameters in the future.
[0083] S311. Obtain a corresponding preset threshold from a preset threshold database according to the size grade of the target item, wherein the preset threshold database stores preset thresholds corresponding to different size grades, and the preset thresholds in the preset threshold database are obtained by performing valve separation tests on sample items of each size grade.
[0084] The preset threshold refers to the parameter threshold required for precise control of the gas valve for targets of different size levels. The database is a structure for storing these threshold data.
[0085] Specifically, this step is to use the size grade of the target object as a key value to query the preset threshold database to obtain the parameter threshold data corresponding to the size grade. The database stores the threshold conditions that need to be met for precise control of air valves corresponding to different size grades obtained through testing.
[0086] S312, comparing the actual start time with the preset time to obtain a time difference to obtain a determination result, wherein if the time difference is not greater than a preset threshold, it is determined that the separation is successful, and if it is less than the preset threshold, it is determined that the separation fails.
[0087] It can be understood that this step is similar to step S106 and will not be described in detail here.
[0088] S313, inputting a recycled object image recognition model into an image recognition model to recognize the current object and obtain category information of the current object, wherein the image recognition model is trained by a recycled object training set, and the recycled object training set is made up of all kinds of recycled object images.
[0089] The recycling object image recognition model is a model trained by a machine learning algorithm and can recognize different types of recycling object images. The recycling object training set contains labeled images of various types of recycling objects. The current object is the target object to be recognized. The category information is the object type of the recognition result.
[0090] Specifically, this step is to input the image of the object that needs to be identified into a pre-trained image recognition model. The model can correctly identify objects of different categories and output the type information of the current object. The recognition model is trained by labeling various types of recycled object images and can recognize various types of objects that the optical sorter needs to process.
[0091] The specific model building process is as follows: First, collect images of various target objects (such as plastic bottles, glass bottles, etc.), perform preprocessing such as data cleaning, manual labeling, and data enhancement, and generate a YOLO format dataset with all category labels. Then use lightweight convolutional networks such as MobileNet as the backbone feature extraction network of the model, and cooperate with optimizers such as Adam to accelerate model training. Use the labeled dataset to iteratively train the YOLOv8 target detection model to obtain an efficient AI model for detecting various objects. Then use tools such as NVIDIATensorRT and Rockchip Neural Network to quantize and compile the model, and finally deploy it on edge computing hardware devices.
[0092] At runtime, the real-time video stream of the area to be monitored is collected through the network interface or camera hardware. The edge device uses the hardware decoder to decode the video frame and performs preprocessing such as affine transformation, channel conversion, image normalization, and channel conversion. The processed frame data is then input into the deployed YOLOv8 model, which infers the image content of each frame, detects the specific coordinate positions of all objects of interest in the frame, determines the category of each object, and outputs the number of objects in the frame. In this way, the YOLOv8 model can perform real-time, low-latency multi-category target detection and recognition on continuous video streams.
[0093] Finally, the YOLOv8 model can process real-time input video, detect key information such as the bottle target position coordinates, category information, and quantity in each video frame, and achieve accurate detection and recognition of moving objects. S314. Match the corresponding gas valve start time according to the category information.
[0094] Specifically, according to the object category obtained by image recognition, the corresponding optimal start-up time of the valve is determined by matching. The matching process needs to consider multiple factors and determine them comprehensively. First, according to the estimated time of the target object from detection to running to the valve position calculated in the previous steps, the start-up time of the valve can be preliminarily determined. Then, it is necessary to combine the size, shape, material and other attributes of the object. For large or complex-shaped objects with smooth materials, it may be necessary to open the valve a certain time in advance to generate sufficient airflow to separate them. In addition, for object categories with higher precision requirements, the valve opening time can also be appropriately advanced to expand the adjustment range. Next, it is necessary to consult the parameter database to obtain the adjustment value of the valve start-up time corresponding to the object category, and apply it to the determined start-up time for adjustment.
[0095] S315: Start the air valve at the air valve start time, so that the current object is classified into the corresponding category.
[0096] Among them, air valve activation refers to controlling the air valve to blow air according to the calculated optimal time to classify the object. Corresponding category refers to classifying the object into the identified object type through precise control.
[0097] Specifically, this step is to send a control signal to the valve to start the valve at the optimal start time of the valve obtained above. The precise timing of the air flow can enable the objects to be accurately sorted into the corresponding object categories obtained by image recognition.
[0098] S316: Count the determination results of all target objects to obtain a result collection.
[0099] The judgment result refers to the judgment category after identification and valve control of each target object. The result collection refers to the collective result after statistically collating the individual judgment results of all target objects.
[0100] Specifically, this step is to collect the judgment result classification of each target object after performing image recognition, matching valve control parameters, and accurate blowing classification on all target objects in turn, and statistically generate a collection containing all target judgment results.
[0101] S317. Calculate the accuracy of the optical sorter based on the result set.
[0102] The accuracy rate refers to the correct proportion of the results of accurate classification of valve control.
[0103] Specifically, this step is based on the result set obtained in the previous step, and the accuracy of the optical sorter valve control precise classification of the batch of target objects is obtained by dividing the number of correct classifications by the total number of targets. The accuracy can evaluate the control performance of the optical sorter.
[0104] For example, 100 iteration tests were performed on the optical sorter: a total of 100*1000=100,000 images were inferred, of which 10,000 images had targets and 25,642 targets in total. The number of times the valve was blown within the 8ms fluctuation of the upper and lower T1 time was 25,021 times, and the remaining blowing failure records were 621 times, of which 534 failures were due to the valve receiving the blowing signal but no gas was ejected, and the remaining 87 failures were due to a blowing time delay of more than 20ms, resulting in blowing failure. From the above, it can be concluded that the valve success rate is 97.578% for the current 100 rounds of tests.
[0105] S318: Send the accuracy rate to the client for display.
[0106] The client refers to the user interface that receives data for interactive display. Sending refers to transmission over the network. Displaying refers to displaying in the form of graphics or text.
[0107] Specifically, this step is to send the calculated valve control accuracy value to the remote monitoring client of the optical sorter through network transmission, and display it to the user in the form of charts, numbers, etc., to complete the output and display of the accuracy.
[0108] S319: Determine whether the accuracy is lower than a preset accuracy threshold.
[0109] The accuracy rate is the accurate classification ratio of the valve control calculated above. The preset accuracy rate threshold is the minimum value of the accuracy rate standard set in advance based on experience. Judgment refers to making a comparative judgment.
[0110] Specifically, this step is to compare the calculated valve control accuracy with a preset accuracy threshold standard to determine whether the actual accuracy is lower than the standard threshold.
[0111] S320. If the accuracy is lower than the preset accuracy threshold, the speed of the conveyor belt is detected to obtain a speed detection result, the valve parameters of the optical sorter are detected to obtain a parameter detection result, and the machine operation parameters of the optical sorter are detected to obtain an operation detection result.
[0112] When the accuracy rate is lower than the preset threshold, it is necessary to comprehensively test various parameters that may affect the accuracy rate to find out the reasons. The first is to detect the actual running speed of the conveyor belt. Too fast or fluctuating speed will directly affect the time it takes for objects to pass through. The conveyor belt encoder needs to be used to obtain the real-time speed value. The second is to detect the working parameters of the air valve, including the air valve opening time, blowing duration, airflow strength and other parameters. These will directly affect the sorting effect. It is necessary to obtain the feedback parameters of the air valve controller. These will directly affect the sorting effect. It is necessary to obtain the feedback parameters of the air valve controller. Finally, the operating status parameters of the optical sorter itself are detected, such as power supply voltage, temperature, vibration and other parameters. These will also indirectly affect the sorting effect. It is necessary to collect data on various operating parameters through sensors. By comprehensively testing the above three parameters, speed detection results, parameter detection results and operation detection results can be obtained.
[0113] S321: If at least one of the speed detection result, the parameter detection result and the operation detection result is not within a preset range, a prompt message is generated for display.
[0114] After obtaining the test results, it is necessary to make a judgment and compare the results with the preset normal working range threshold. If it is found that any of the speed, valve parameters, and operating parameters are not within the normal range, it may be the reason for the decrease in accuracy. At this time, it is necessary to generate prompt information through the human-machine interface to display the abnormal parameter items and values, so that the operation and maintenance personnel can quickly check and locate the cause of the fault and take repair measures.
[0115] S322. If the accuracy is not lower than the preset accuracy threshold, obtain the current conveyor belt speed, the current machine operating parameters and the gas valve parameters of the optical sorting machine, and save the current conveyor belt speed, the current machine operating parameters and the gas valve parameters.
[0116] Here, the preset accuracy threshold refers to the lower limit requirement of the judgment accuracy of the optical sorter. When the calculated actual accuracy is not lower than the threshold requirement, it means that the optical sorter is working normally.
[0117] Specifically, after confirming that the accuracy meets the requirements, it is necessary to obtain the current actual operating data of three key parameters and save them as normal reference states. The first item is the real-time operating speed of the conveyor belt, which is detected and obtained by the encoder, and the speed value is stored in the database. The second item is the machine operating parameters of the optical sorter itself, such as voltage, temperature, vibration, etc., which are monitored and collected in real time by sensors and stored in the database. The third item is the working parameters of the gas valve, such as key parameters such as the gas valve opening time and airflow duration. The real-time status is obtained from the gas valve controller and also saved in the database.
[0118] The purpose of saving these three parameters is to obtain a set of parameter data sets under normal working conditions during equipment operation, which can be used as benchmark data for later state detection, fault prediction, system optimization, etc. For example, the speed range of the conveyor belt, the normal working conditions of the gas valve, etc. Only after obtaining the parameter range under normal conditions can fault detection and state evaluation be performed later.
[0119] By acquiring and saving key parameters, a benchmark data set under normal working conditions of the optical sorter was established, which laid a data foundation for subsequent maintenance and guarantee, and is an important link in precise control and troubleshooting.
[0120] The optical sorter in the embodiment of the present invention is described below from the perspective of hardware processing. Figure 4 , which is a schematic diagram of a physical device structure of an optical sorter in an embodiment of the present application.
[0121] It should be noted that Figure 4 The structure of the optical sorter shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0122] like Figure 4 As shown, the optical sorter includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in RAM403. CPU401, ROM 402 and RAM403 are connected to each other through bus 304. Input / output (I / O) interface 405 is also connected to bus 404.
[0123] The following components are connected to the I / O interface 405: an input section 406 including an audio input device, a button switch, etc.; an output section 407 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0124] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the present invention are performed.
[0125] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0127] Specifically, the optical sorter of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the test method of the optical sorter of the renewable resource sorting line provided in the above embodiment is implemented.
[0128] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the optical sorter described in the above embodiment; or may exist independently without being assembled into the optical sorter. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the optical sorter, the optical sorter implements the test method of the optical sorter for the recycling resource sorting line provided in the above embodiment.
[0129] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0130] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0131] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A method for testing an optical sorter for a renewable resource sorting line, characterized in that: Applied to an optical sorting machine, the method comprises: Acquire a transmission image on the conveyor belt, and detect the position of a target object in the transmission image according to an image detection algorithm; Converting the position of the target object into an actual physical distance according to preset calibration parameters; Calculating an estimated time for the target object to arrive at the gas valve device based on the actual physical distance and the conveyor belt speed; Controlling the gas valve device to start at a preset time based on the estimated time; Recording the actual start-up time of the gas valve device; The actual start time is compared with the preset time to obtain a time difference to obtain a determination result, wherein if the time difference is not greater than a preset threshold, it is determined that the separation is successful, and if it is less than the preset threshold, it is determined that the separation fails.
2. The method according to claim 1, characterized in that The step of converting the position of the target object into an actual physical distance according to the preset calibration parameters specifically includes: Obtain the length and width of the conveyor belt, and obtain the field of view angle and installation height of the camera on the optical sorter; Establishing a mapping relationship between an image coordinate system and an actual physical coordinate system according to the length, the width, the field of view angle, and the installation height; Convert the pixel coordinates of the target object in the image into actual physical coordinates through the mapping relationship; The distance between the actual physical coordinates and the preset base point is calculated to obtain the actual physical distance of the target object.
3. The method according to claim 1, characterized in that After the step of comparing the actual start time with the preset time to obtain a time difference, if the time difference is not greater than a preset threshold, determining that the separation is successful, and if the time difference is less than the preset threshold, determining that the separation is unsuccessful, the method further includes: Counting the judgment results of all target objects to obtain a result collection; Calculating the accuracy of the optical sorter according to the result set; The accuracy rate is sent to the client for display.
4. The method according to claim 3, characterized in that After the step of calculating the accuracy of the optical sorter according to the result set, the method further includes: If the accuracy rate is lower than the preset accuracy rate threshold, the speed of the conveyor belt is detected to obtain a speed detection result, the valve parameters of the optical sorter are detected to obtain a parameter detection result, and the machine operation parameters of the optical sorter are detected to obtain an operation detection result; If at least one of the speed detection result, the parameter detection result and the operation detection result is not within a preset range, a prompt message is generated for display.
5. The method according to claim 1, characterized in that Before the step of comparing the actual start time with the preset time to obtain a time difference to obtain a determination result, wherein the determination result includes determining that the separation is successful if the time difference is not greater than a preset threshold, and determining that the separation is failed if the time difference is less than the preset threshold, the method further includes: Acquire size information of the target object; classifying the target object into one of a plurality of preset size classes according to the size information; The corresponding preset threshold is obtained from a preset threshold database according to the size grade of the target object, wherein the preset threshold database stores preset thresholds corresponding to different size grades, and the preset thresholds in the preset threshold database are obtained by performing valve separation tests on sample items of each size grade.
6. The method according to claim 1, characterized in that After the step of comparing the actual start time with the preset time to obtain a time difference, if the time difference is not greater than a preset threshold, determining that the separation is successful, and if the time difference is less than the preset threshold, determining that the separation is unsuccessful, the method further includes: Inputting a recycled object image recognition model into an image recognition model to recognize a current object, and obtaining category information of the current object, wherein the image recognition model is trained by a recycled object training set, and the recycled object training set is made of images of all kinds of recycled objects; Matching the corresponding gas valve start time according to the category information; The gas valve is activated at the gas valve activation time, so that the current object is classified into the corresponding category.
7. The method according to claim 3, characterized in that After the step of calculating the accuracy of the optical sorter according to the result set, the method further includes: If the accuracy is not lower than the preset accuracy threshold, the current conveyor belt speed, the current machine operating parameters and the gas valve parameters of the optical sorter are obtained, and the current conveyor belt speed, the current machine operating parameters and the gas valve parameters are saved.
8. An optical sorting machine, characterized in that: The optical sorter includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the optical sorter to execute the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on an optical sorting machine, the optical sorting machine is caused to execute the method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product runs on an optical sorting machine, the optical sorting machine is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Material optical screening method, system and device based on deep learning instance segmentation and classification
CN121788958A
