Plastic particle detection method and system based on image recognition
By combining the image recognition model with weight sensor feedback data, a multi-parameter recognition algorithm and artifact determination mechanism were constructed, which solved the problem of artifact interference that could not be quantified in the existing technology, achieved high-precision plastic particle detection, and improved the accuracy and credibility of the detection system.
Patent Information
- Application Number
- CN202510864052.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing plastic particle detection methods based on image recognition have difficulty in achieving dynamic judgment and closed-loop correction of artifact interference, resulting in inaccurate particle identification quantity and quality assessment deviation, affecting overall process control and data credibility.
By combining the image recognition model with the weight sensor feedback data, a recognition algorithm with multiple parameters such as color saturation, edge gradient, and image grayscale is constructed. A high-precision mapping between the image-estimated total weight and the actual measured weight is established. The artifact suspicion level value and graded interference judgment mechanism are used to achieve rapid identification and correction of artifact interference.
It improves the detection accuracy of the detection method in complex environments, significantly improves the recognition accuracy of plastic particles and the credibility of quality assessment, enhances the adaptability and robustness of the system in complex backgrounds, and avoids misjudgment caused by artifact interference.
Smart Images

Figure CN120375006B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plastic particle detection, and in particular to a plastic particle detection method and system based on image recognition. Background Art
[0002] In recent years, during the production, sorting and packaging of plastic pellets, parameters such as the quantity, morphology, color difference and quality consistency of the pellets have a significant impact on product performance and subsequent processing. With the improvement of industrial automation, more and more companies are using image recognition technology to conduct online inspection of plastic pellets to replace traditional manual visual inspection methods and achieve efficient, non-contact quality monitoring. Existing systems mostly use industrial cameras to capture images and combine image recognition algorithms to determine the appearance characteristics of the pellets.
[0003] The detection methods currently used in the field of plastic particle detection are difficult to achieve dynamic judgment and closed-loop correction of artifact interference during actual use. In particular, when image misjudgment cannot be immediately fed back and calibrated, it is easy to cause inaccurate particle identification and quality assessment deviations, thereby affecting the overall process control and data credibility. Summary of the Invention
[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.
[0005] In view of the problems existing in the above-mentioned existing plastic particle detection method and system based on image recognition, the present invention is proposed.
[0006] Therefore, the purpose of the present invention is to provide a plastic particle detection method and system based on image recognition, which is suitable for solving the problem of easily causing inaccurate particle identification quantity and quality assessment deviation, thereby affecting the overall process control and data credibility.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In a first aspect, an embodiment of the present invention provides a plastic particle detection method based on image recognition, comprising:
[0009] Acquire plastic particle image data, and acquire particle weight sensor measured data corresponding to the image data;
[0010] Building an image recognition model based on the image data to obtain an estimated total weight of the image;
[0011] Based on the total weight estimated by the image and the actual measured data of the weight sensor, a feedback verification model is constructed and calculated to obtain an artifact suspicion degree value;
[0012] Artifact interference in the image recognition model is determined based on the estimated total weight of the image and the artifact suspicion level value, thereby realizing plastic particle detection based on image recognition.
[0013] As a preferred embodiment of the plastic particle detection method based on image recognition of the present invention, the image data refers to the plastic particle image data collected by the image acquisition device, and the image data includes the distribution, color, shape, edge contour, projection area and image grayscale information of the particles in the image;
[0014] The weight sensor measured data refers to the total weight data of the current batch of plastic particles collected in real time by a quality detection device arranged on the particle conveying path or the weighing platform.
[0015] As a preferred embodiment of the method for detecting plastic particles based on image recognition according to the present invention, an image recognition model is constructed based on the image data to obtain an estimated total weight of the image, comprising the following steps:
[0016] By introducing color saturation, edge gradient, image grayscale, and shape parameters, the original pixel features of each plastic particle in the image are processed nonlinearly, and a single-particle image feature enhancement function is constructed to obtain the image feature response value, thereby comprehensively characterizing the key identification features of each plastic particle in the image. The specific formula is as follows:
[0017] ;
[0018] in, is the image feature response value of the i-th particle, represents the color saturation of the i-th particle, represents the edge gradient strength, represents the grayscale mean of the particle area, represents the particle roundness ratio; by introducing a power function and a proportional mapping factor to perform a nonlinear transformation on the image feature response value, the estimated weight of a single particle image is obtained, thereby enhancing the accuracy and stability of the image recognition model in estimating particle mass under conditions of drastic changes in particle size or inconsistency in image scale. The specific formula is as follows:
[0019] ;
[0020] in, Estimate the weight of the image of the i-th particle, is the standard density of plastic particles, is the proportional adjustment factor;
[0021] An image recognition model is constructed based on the optimized single particle image estimated weight to obtain the image estimated total weight result.
[0022] As a preferred embodiment of the plastic particle detection method based on image recognition of the present invention, the image recognition model formula is as follows:
[0023] ;
[0024] in, Estimate the total weight for the image, where n is the number of particles identified in the image.
[0025] As a preferred embodiment of the plastic particle detection method based on image recognition of the present invention, the following steps are included: constructing a feedback verification model based on the total weight estimated from the image and the actual measured data from the weight sensor and performing calculations to obtain an artifact suspicion degree value:
[0026] By introducing the hyperbolic tangent function and the logarithmic function to process the combined effect of image estimation error and particle distribution fluctuation, a normalized response score is obtained, thereby enhancing the feedback verification model's ability to respond to scenarios with uneven particle distribution or sudden changes in image recognition deviation. The specific formula is as follows:
[0027] ;
[0028] in, is the normalized response score, The total weight of the plastic particles is measured by the weight sensor. is the normalized adjustment constant, is the variance of the image particle distribution; by introducing an exponential decay function to process the relative change rate of the measured weight in the current time period, a feedback verification model is constructed to suppress the misjudgment effect caused by short-term fluctuations in the particle transportation process, and obtain the artifact suspicion degree value. The specific formula of the feedback verification model is as follows:
[0029] ;
[0030] in, is the artifact suspicion value, It is a suppression adjustment factor used to control the sensitivity of the model to the actual weight fluctuation. is the measured weight at the current time point, The actual weight at the previous time point.
[0031] As a preferred embodiment of the plastic particle detection method based on image recognition described in the present invention, the determination status of the artifact interference includes no interference, acceptable interference, moderate artifact interference and severe artifact interference.
[0032] As a preferred embodiment of the method for detecting plastic particles based on image recognition according to the present invention, determining the artifact interference in the image recognition model based on the estimated total weight and the artifact suspicion value includes the following steps:
[0033] A basic interference judgment is performed based on the absolute error between the image-estimated total weight and the actual weight sensor measured data. If the absolute error is less than or equal to the first error threshold W0 and the artifact suspicion level is less than or equal to the first interference threshold M0, the current state is determined to be free of interference, and the image recognition-based plastic particle detection continues.
[0034] If the absolute error is less than or equal to the first error threshold W0 and the artifact suspicion level value is greater than the first interference threshold M0, it is preliminarily determined that the current state is acceptable interference and the next step is executed;
[0035] If the initial determination result is acceptable interference, an interference upgrade is performed based on the distribution uniformity coefficient of the image feature response value and the dispersion of the estimated weight of the single particle image. If the distribution uniformity coefficient is greater than or equal to the uniformity threshold A0 and the dispersion is less than or equal to the dispersion threshold B0, the current state is determined to be acceptable interference, and a first-level prompt message is sent to the operator, suggesting that the image sensor be cleaned and checked.
[0036] If the distribution uniformity coefficient is less than the uniformity threshold AO or the dispersion is greater than the dispersion threshold B0, the current state is determined to be moderate artifact interference, a second-level warning message is sent to the operator, and the parameter calibration process of the image recognition model is immediately triggered;
[0037] If the absolute error is greater than the first error threshold W0 and less than or equal to the second error threshold W0', and the artifact suspicion level value is less than or equal to the second interference threshold M0', then the current state is preliminarily determined to be moderate artifact interference, and the next step is executed;
[0038] When the preliminary judgment result is moderate artifact interference, the interference upgrade judgment is performed based on the proportion of abnormal grayscale areas in the image and the number of abnormal edge contour particles. If the proportion of abnormal grayscale areas is less than or equal to the area threshold C0 and the number of abnormal edge contour particles is less than or equal to the number threshold D0, the current state is determined to be moderate artifact interference, a secondary warning message is sent to the operator, and the parameter calibration process of the image recognition model is immediately triggered;
[0039] If the proportion of grayscale abnormal areas is greater than the regional threshold C0 or the number of edge contour abnormal particles is greater than the number threshold D0, the current state is determined to be severe artifact interference, a level 3 alarm message is sent, the current detection process is stopped, and the backup detection system is activated;
[0040] If the absolute error is greater than the second error threshold W0' or the artifact suspicion value is greater than the second interference threshold M0', the current state is determined to be severe artifact interference, a third-level alarm message is sent, the current detection process is stopped, and the backup detection system is activated.
[0041] Secondly, to further address the issues that can easily lead to inaccurate particle identification and quality assessment, which in turn affect overall process control and data credibility, this embodiment provides a plastic particle detection system based on image recognition, including:
[0042] A data acquisition module is used to acquire plastic particle image data and acquire particle weight sensor measured data corresponding to the image data;
[0043] Recognition model building module: used to build an image recognition model based on the image data to obtain the image estimated total weight;
[0044] A verification model building module is used to build a feedback verification model and perform calculations based on the total weight estimated from the image and the actual measured data from the weight sensor to obtain a suspected artifact degree value;
[0045] Intelligent detection module: used to determine the artifact interference in the image recognition model based on the estimated total weight and the artifact suspicion level value of the image, and realize plastic particle detection based on image recognition.
[0046] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the plastic particle detection method based on image recognition as described in the first aspect of the present invention is implemented.
[0047] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the plastic particle detection method based on image recognition as described in the first aspect of the present invention is implemented.
[0048] Beneficial effects of the present invention: The present invention combines the image recognition model with the feedback data of the weight sensor to establish a recognition algorithm that extracts multi-parameter image features including color saturation, edge gradient, image grayscale, etc., thereby achieving high-precision mapping and error evaluation between the estimated weight of the particle image and the actual weight. By constructing a suspected artifact degree value and a graded interference judgment mechanism, it is possible to quickly judge the abnormality level and respond to the system when an identification error occurs, effectively solving the problems in the prior art of image recognition errors being difficult to correct and artifact interference being unquantifiable, thereby improving the detection accuracy of the detection method in complex environments. At the same time, the present invention can achieve coordinated control of the image detection system and the feedback device, significantly improving the overall detection capability without increasing the hardware cost, and has good engineering promotion value.
[0049] The present invention is suitable for online identification, quality judgment and abnormal interference detection of plastic particles, and is particularly suitable for scenarios such as image detection during particle transportation, sorting or packaging. It can be used for real-time analysis of particle quantity, morphological integrity and estimated weight in automated production lines. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them:
[0051] Figure 1 This is a schematic diagram of the overall process of the plastic particle detection method based on image recognition proposed in the present invention;
[0052] Figure 2 This is a logic diagram of artifact interference determination for the plastic particle detection method based on image recognition proposed in the present invention. DETAILED DESCRIPTION
[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0055] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0056] Furthermore, the present invention is described in detail with reference to schematic diagrams. For ease of illustration, when describing the embodiments of the present invention, cross-sectional views illustrating device structures may be partially enlarged and not to scale. Furthermore, the schematic diagrams are merely illustrative and should not limit the scope of protection of the present invention. Furthermore, in actual production, the three-dimensional dimensions of length, width, and depth should be included.
[0057] Example 1
[0058] Reference Figure 1-Figure 2 , as an embodiment of the present invention, provides a plastic particle detection method based on image recognition.
[0059] The existing plastic particle detection methods based on image recognition have the following main problems: it is difficult to achieve dynamic judgment and closed-loop correction of artifact interference. Especially when image misjudgment cannot be immediately fed back and calibrated, it is easy to cause inaccurate particle identification quantity and quality assessment deviation, which in turn affects the overall process control and data credibility.
[0060] This application provides an effective solution to the above-mentioned problems. Next, we will combine multiple embodiments to explain in detail how to implement the plastic particle detection method based on image recognition.
[0061] Figure 1 The overall flow chart of the plastic particle detection method based on image recognition is shown, including:
[0062] S1: Obtain plastic particle image data and obtain actual particle weight sensor measurement data corresponding to the image data.
[0063] Image data refers to plastic particle image data collected by an image acquisition device, where the image acquisition device can be a visual sensing device with imaging capabilities, such as an industrial camera, a line scan camera, or a multispectral imaging device, which is used to obtain information including the distribution, color, shape, edge contour, projected area, and image grayscale of the particles in the image;
[0064] The actual measured data of the weight sensor refers to the total weight data of the current batch of plastic particles collected in real time by a quality detection device arranged on the particle conveying path or weighing platform, wherein the quality detection device can be a physical quantity acquisition device with real-time weight detection capability, such as a static or dynamic weighing sensor, a piezoelectric load cell and an electromagnetic balance mass measurement module.
[0065] This step, by fusing the image data collected by the visual sensing device with the actual weight data collected by the quality inspection device, can lay a high-precision basic data support for the construction of the subsequent image recognition model and the setting of the feedback verification model, ensuring the mapping consistency between the particle image features and the actual quality information in the spatial dimension and the complementarity in the feature dimension.
[0066] S2: Build an image recognition model based on the image data to obtain the estimated total weight of the image.
[0067] Furthermore, an image recognition model is constructed based on the image data to obtain the estimated total weight of the image, including the following steps:
[0068] By introducing color saturation, edge gradient, image grayscale, and shape parameters, the original pixel features of each plastic particle in the image are processed nonlinearly, and a single-particle image feature enhancement function is constructed to obtain the image feature response value, thereby comprehensively characterizing the key identification features of each plastic particle in the image. The specific formula is as follows:
[0069] ;
[0070] in, is the image feature response value of the i-th particle, represents the color saturation of the i-th particle, represents the edge gradient strength, represents the grayscale mean of the particle area, represents the particle roundness ratio;
[0071] Furthermore, the distribution uniformity coefficient of the image feature response value is calculated based on the obtained image feature response value;
[0072] First, count the image feature response values of all particles in the image ;
[0073] Calculate the mean of the image feature response values and standard deviation ;
[0074] The specific formula is as follows:
[0075] ;
[0076] Where A is the distribution uniformity coefficient, the smaller it is, the more uniform the distribution is.
[0077] By introducing a power function and a proportional mapping factor to perform a nonlinear transformation on the image feature response value, the estimated weight of a single particle image is obtained, thereby enhancing the accuracy and stability of the image recognition model in particle mass estimation under conditions of drastic changes in particle size or inconsistency in image scale. The specific formula is as follows:
[0078] ;
[0079] in, Estimate the weight of the image of the i-th particle, is the standard density of plastic particles, is the proportional adjustment factor;
[0080] Furthermore, the dispersion of the image-estimated weight of a single particle is calculated based on the image-estimated weight;
[0081] First, count the images of all particles and estimate their weight ;
[0082] The specific formula is:
[0083] ;
[0084] Among them, IQR is the interquartile range of weight obtained by using the interquartile range calculation method, is the median of the weight, and B is the dispersion. The larger it is, the higher the dispersion of the weight estimation.
[0085] An image recognition model is constructed based on the optimized single particle image estimated weight to obtain the image estimated total weight result.
[0086] Furthermore, the image recognition model formula is as follows:
[0087] ;
[0088] in, Estimate the total weight for the image, where n is the number of particles identified in the image.
[0089] In an embodiment of the present application, during the construction of the image recognition model, color saturation, edge gradient intensity, image grayscale and shape parameters are introduced to characterize the image response characteristics of plastic particles under different lighting and background conditions, which can effectively enhance the image recognition model's ability to distinguish particles with blurred contours and similar colors. The scale adjustment factor can be obtained by comparing the two-dimensional projection area of the particles in the image with the known particle volume data, or by calibrating by setting a reference scale or standard particles of known size, to achieve a mapping relationship between the image scale and the actual physical size, thereby ensuring the consistency of the model output under different image resolutions or shooting angles.
[0090] It should be noted that traditional image recognition methods mostly use linear regression or average pixel grayscale weight estimation methods, which are difficult to fully extract fine-grained image differences of particles, resulting in high misrecognition rate and large weight estimation deviation under complex backgrounds; the embodiment of the present application breaks through the limitations of traditional methods in insufficient image feature extraction capabilities by constructing an image recognition model that integrates image enhancement functions and nonlinear weighted mapping, significantly improves the correlation between the detection accuracy of plastic particles in images and the estimated weight, and provides reliable technical support for realizing real-time, high-precision online particle detection.
[0091] S3: Based on the image-estimated total weight and the actual measured data of the weight sensor, a feedback verification model is constructed and calculated to obtain an artifact suspicion degree value.
[0092] Based on the image-estimated total weight and the actual weight sensor data, a feedback verification model is constructed and calculated to obtain an artifact suspicion level value, including the following steps:
[0093] By introducing the hyperbolic tangent function and the logarithmic function to process the combined effect of image estimation error and particle distribution fluctuation, a normalized response score is obtained, thereby enhancing the feedback verification model's ability to respond to scenarios with uneven particle distribution or sudden changes in image recognition deviation. The specific formula is as follows:
[0094] ;
[0095] in, is the normalized response score, The total weight of the plastic particles is measured by the weight sensor. is the normalized adjustment constant, is the image particle distribution variance;
[0096] By introducing an exponential decay function to process the relative change rate of the measured weight within the current time period, a feedback verification model is constructed to suppress the misjudgment effect caused by short-term fluctuations in the particle transportation process and obtain the artifact suspicion degree value. The specific formula of the feedback verification model is as follows:
[0097] ;
[0098] in, is the artifact suspicion value, It is a suppression adjustment factor used to control the sensitivity of the model to the actual weight fluctuation. is the measured weight at the current time point, The actual weight at the previous time point.
[0099] Furthermore, the proportion of abnormal grayscale areas in the image is calculated based on the obtained artifact suspicion level value;
[0100] First, perform grayscale histogram analysis on the image and set the normal grayscale range ;
[0101] Count the pixel areas whose grayscale values exceed this range Total particle projected area The specific formula is as follows:
[0102] ;
[0103] Where C is the proportion of abnormal grayscale areas in the image.
[0104] It should be noted that the number of particles with abnormal edge contours is determined in the following way:
[0105] Use the image recognition module to segment each plastic particle in the image and extract the pixel area of its edge contour. Specifically, it is preferred to use the Canny edge detection algorithm or the Sobel operator to extract the edge gradient to obtain a binary boundary image of the particle contour. Fit and analyze each extracted particle edge contour, and calculate characteristic indicators such as the particle contour's closure, edge continuity, number of edge corner points, and edge gradient change rate. Preferably, if any one of the following three judgment conditions is met, the particle is considered to have an abnormal edge contour:
[0106] If the contour closure is lower than the set threshold (e.g., closure < 85%), it means that the edge is incomplete or broken;
[0107] If the number of edge corners exceeds the set upper limit (e.g., > 10 sharp corners), it indicates that the particle surface has obvious jagged edges or damage.
[0108] The edge gradient change rate fluctuates abnormally in the boundary area. For example, its standard deviation exceeds twice the average value of normal particles, indicating that the edge may be chipped, broken or interfered by artifacts.
[0109] The system counts the number of particles that meet any of the above conditions among all detected particles as the number of particles with abnormal edge contours, and uses this value as one of the important indicators for subsequent evaluation of the overall quality of the particles or judgment of the degree of artifact interference.
[0110] For example, in a plastic particle detection scenario, the system collects and calculates a frame of image as follows. The image recognition module identifies 50 particles and estimates the total weight as: The weighing sensor measures the weight of the current batch of plastic particles as , the measured weight at the previous time point (for example, 0.5s ago) is 236.7g, and the variance of the number of particles in the image frame counted by the image recognition model is: , set the normalization adjustment constant to , set the fluctuation suppression adjustment coefficient ;
[0111] Then the image error normalization function value is ;
[0112] Artifact suspicion level Assuming that in this detection process, the first interference threshold M0 is set to 0.3, it can be determined that the image recognition result is not infected and the recognition result is credible.
[0113] In an embodiment of the present application, the normalization adjustment constant can be determined by constructing an error function model between the image estimated weight and the measured weight, and performing parameter fitting with the goal of minimizing the normalized error deviation, thereby determining the normalization adjustment constant that best suits the current particle image feature distribution; this parameter can also be set as a fixed constant in combination with the density fluctuation range of different types of plastic particles in actual applications, to avoid the problem of the error denominator approaching zero under extreme working conditions; the inhibition adjustment factor can be obtained by fitting and analyzing the measured weight change rate per unit time with known stable state data, constructing an error attenuation function, and solving it by minimizing the misjudgment risk function; it can also be set as an empirical parameter in the system design stage in combination with the vibration characteristics of the particle conveyor line and the stability index of the weighing platform, to adjust the sensitive response of the exponential attenuation function to weight fluctuations.
[0114] It should be noted that traditional image detection methods typically separate the particle recognition process from the image quality assessment process, lacking a deep tracing mechanism for recognition distortion caused by image interference factors (such as edge blur, ghosting, and water reflections). This results in the system being unable to effectively identify potential misjudgment trends in the early stages of anomalies. This embodiment introduces an image edge contour anomaly recognition mechanism, constructs a statistical function for the number of abnormal particles based on local edge quality indicators, and incorporates this statistical result into the comprehensive judgment process of the artifact interference state. This can accurately capture the recognition structure anomalies caused by local interference in the image. Together with the proportion of abnormal grayscale areas in the image, this constitutes an important reference dimension for image stability, enabling the system to quantitatively assess image detail-level disturbances, thereby issuing intervention signals before artifacts spread widely. This method overcomes the limitation of traditional particle recognition algorithms' reliance on global contours, improves the system's response sensitivity to small boundary disturbances, provides basic support for the dynamic self-calibration of online image recognition models, and enhances the adaptability of the detection method in complex background environments.
[0115] S4: Determine the artifact interference in the image recognition model based on the image estimated total weight and the artifact suspicion level value, and realize plastic particle detection based on image recognition.
[0116] Preferably, the determination status of artifact interference includes no interference, acceptable interference, moderate artifact interference and severe artifact interference.
[0117] Specifically, such as Figure 2 As shown, determining artifact interference in the image recognition model based on the image estimated total weight and the artifact suspicion level value includes the following steps:
[0118] A basic interference judgment is performed based on the absolute error between the image-estimated total weight and the actual weight sensor data. If the absolute error is less than or equal to the first error threshold W0 and the artifact suspicion level is less than or equal to the first interference threshold M0, the current state is determined to be free of interference, and plastic particle detection based on the image recognition model continues.
[0119] If the absolute error is less than or equal to the first error threshold W0 and the artifact suspicion level value is greater than the first interference threshold M0, it is preliminarily determined that the current state is acceptable interference and the next step is executed;
[0120] If the initial determination result is acceptable interference, an interference upgrade is performed based on the distribution uniformity coefficient of the image feature response value and the dispersion of the estimated weight of the single particle image. If the distribution uniformity coefficient is greater than or equal to the uniformity threshold A0 and the dispersion is less than or equal to the dispersion threshold B0, the current state is determined to be acceptable interference, and a first-level prompt message is sent to the operator, suggesting that the image sensor be cleaned and checked.
[0121] If the distribution uniformity coefficient is less than the uniformity threshold AO or the dispersion is greater than the dispersion threshold B0, the current state is determined to be moderate artifact interference, a second-level warning message is sent to the operator, and the parameter calibration process of the image recognition model is immediately triggered;
[0122] The parameter calibration process is as follows:
[0123] The system will trigger the image data cache of the current image frame and several adjacent frames (such as ±2 frames) and extract the basic image features of all plastic particles, including but not limited to: the distribution of particles in the image, color, shape, edge contour, projection area and image grayscale information;
[0124] Compare the above image features with the normal recognition parameter range initially set by the system to identify feature items with deviation trends;
[0125] Based on the above deviation features, the recognition parameters or weight factors corresponding to the features in the image recognition model are automatically adjusted, for example: enhancing the edge response of low-contrast images, correcting the particle segmentation threshold, etc.
[0126] The adjusted image recognition model re-recognizes the current image and evaluates it based on the artifact suspicion level value;
[0127] If the artifact suspicion value of the recognition result is significantly reduced after calibration, the current parameter settings will be saved as the temporary running configuration of the model. Otherwise, it will return to the state before calibration and prompt manual re-inspection.
[0128] If the absolute error is greater than the first error threshold W0 and less than or equal to the second error threshold W0', and the artifact suspicion level value is less than or equal to the second interference threshold M0', then the current state is preliminarily determined to be moderate artifact interference, and the next step is executed;
[0129] When the preliminary judgment result is moderate artifact interference, the interference upgrade judgment is performed based on the proportion of abnormal grayscale areas in the image and the number of abnormal edge contour particles. If the proportion of abnormal grayscale areas is less than or equal to the area threshold C0 and the number of abnormal edge contour particles is less than or equal to the number threshold D0, the current state is determined to be moderate artifact interference, a secondary warning message is sent to the operator, and the parameter calibration process of the image recognition model is immediately triggered;
[0130] If the proportion of grayscale abnormal areas is greater than the regional threshold C0 or the number of edge contour abnormal particles is greater than the number threshold D0, the current state is determined to be severe artifact interference, a level 3 alarm message is sent, the current detection process is stopped, and the backup detection system is activated;
[0131] If the absolute error is greater than the second error threshold W0' or the artifact suspicion value is greater than the second interference threshold M0', the current state is determined to be severe artifact interference, a third-level alarm message is sent, the current detection process is stopped, and the backup detection system is activated.
[0132] The starting of the backup detection system includes the following steps:
[0133] The main detection system writes the current image frame number, timestamp, abnormal indicators (grayscale abnormality ratio, number of edge abnormal particles) and model operation parameters into the abnormal record cache, suspends the current image recognition and result upload process to prevent erroneous results from entering the quality control chain, sends a third-level alarm message to the system management layer, and triggers the backup system initialization signal at the same time.
[0134] The backup detection system refers to a redundant image recognition pathway built into the system that is independent of the main detection process. It can include any one or more of the following implementation methods: switching to a backup industrial camera and auxiliary lighting components to capture images of the same detection area, or calling another image recognition model with a different structure from the main model (for example, the main model is YOLO, and the backup model is a ResNet + FCN combination); by switching the combination of "image input channel" and "recognition algorithm channel", rapid fault bypass reconstruction of the image recognition link can be achieved.
[0135] After the backup inspection system is activated, it re-inspects the current batch of plastic pellets using the same image acquisition and recognition logic as the primary inspection system. This includes the following operations: Activating a backup image acquisition channel (e.g., a backup industrial camera) to re-capture images of the current area to be inspected; Inputting the acquired new image data into the original image recognition model for processing; Combining the image recognition results with the real-time weight sensor measured data, the artifact suspicion value calculation module performs interference determination; If the artifact suspicion value is less than the set threshold, the inspection result is reliable, and the system outputs the backup inspection result as valid identification data; If the artifact suspicion value is still greater than the threshold, the current image is marked as a "high-risk interference image," and the system enters manual re-inspection or system standby mode.
[0136] For example, assume that an image recognition-based plastic pellet inspection system is operating on a plastic pellet production line, monitoring the quality of plastic pellets on a conveyor belt. After several hours of continuous operation, the system detects slight unevenness in the particle distribution through image data collected by an industrial camera. The absolute error between the image-estimated total weight and the actual weight sensor data increases slightly, but still does not exceed the first error threshold. However, the artifact suspicion level gradually increases, exceeding the first interference threshold. Based on the feedback verification model, the system detects that the distribution uniformity coefficient of the image feature response value is slightly below the uniformity threshold, triggering a preliminary determination of acceptable interference and sending a first-level prompt message to the operator, suggesting that the image sensor be checked for dust or light interference. The operator then cleans the industrial camera lens and finds slight contamination on the lens surface. After cleaning, the system returns to normal, the artifact suspicion level decreases, and the error between the image-estimated total weight and the actual weight data further decreases, ensuring the accuracy of the particle quality detection and avoiding misjudgment of particle count or quality assessment deviation due to artifact interference.
[0137] In the embodiment of the present application, the first error threshold and the second error threshold are determined by statistically analyzing the difference between the total weight estimated from a large number of images collected by the plastic particle detection system under normal operating conditions and the actual measured data from the weight sensor, calculating the standard deviation and confidence interval, and comprehensively evaluating the technical specifications and error tolerance range of the industrial camera and weight sensor. The first interference threshold and the second interference threshold are determined by analyzing the statistical distribution characteristics of the artifact suspicion value based on the feedback verification model, using the quantile method to preliminarily set them, and then verifying and adjusting them through simulation tests. The uniformity threshold and the discreteness threshold are determined by long-term observation of the distribution uniformity coefficient of the image feature response value and the discreteness of the estimated weight of the particle image, combined with the distribution characteristics of the particles on the conveyor belt and the stability analysis of the image recognition algorithm, in order to effectively distinguish between normal particle distribution fluctuations and anomalies caused by artifact interference. The area threshold and the number threshold are determined by analyzing the distribution characteristics of the proportion of the image grayscale abnormal area and the number of particles with abnormal edge contours, and comprehensively evaluating common interference factors (such as particle overlap and background noise) in the actual production environment. In addition, in actual applications, the above thresholds can be initially determined by small-scale test data, and optimized through continuous monitoring and feedback, or combined with machine learning methods to obtain a better threshold combination through historical data training. This embodiment does not make specific limitations on this.
[0138] It should be noted that traditional plastic particle detection methods mostly rely on a single image recognition algorithm, lacking dynamic judgment and closed-loop correction mechanisms for artifact interference, and are prone to recognition errors due to factors such as light changes, lens contamination, or particle stacking, affecting the accuracy of particle quantity and quality assessment. This embodiment establishes a refined judgment system for no interference, acceptable interference, moderate artifact interference, and severe artifact interference by constructing a multi-level interference judgment mechanism that combines an image recognition model with a feedback verification model. It comprehensively considers the image estimated total weight, the artifact suspicion value, and the particle distribution characteristics, and realizes dynamic recognition and graded response to artifact interference. This mechanism overcomes the limitations of single threshold judgment of traditional detection methods, and can take corresponding early warning and calibration measures according to the nature, degree, and development trend of the interference, significantly improving the robustness and accuracy of the detection system in complex production environments, reducing misjudgments due to artifact interference, and avoiding unnecessary downtime and maintenance costs, thereby optimizing the process control and data credibility of plastic particle detection.
[0139] In summary, the present invention combines the image recognition model with the feedback data of the weight sensor to establish a recognition algorithm for extracting multi-parameter image features including color saturation, edge gradient, image grayscale, etc., thereby achieving high-precision mapping and error evaluation between the estimated weight of the particle image and the actual weight. By constructing a suspected artifact degree value and a graded interference judgment mechanism, it can quickly perform abnormality level judgment and system response when a recognition error occurs, effectively solving the problems in the prior art that image recognition errors are difficult to correct and artifact interference cannot be quantified, and improving the detection accuracy of the detection method in complex environments. At the same time, the present invention can realize the coordinated control of the image detection system and the feedback device, significantly improving the overall detection capability without increasing the hardware cost, and has good engineering promotion value.
[0140] Example 2
[0141] According to one embodiment of the present invention, a plastic particle detection system based on image recognition is provided, comprising:
[0142] A data acquisition module is used to acquire plastic particle image data and obtain particle weight sensor measured data corresponding to the image data;
[0143] Recognition model building module: used to build an image recognition model based on image data to obtain the estimated total weight of the image;
[0144] Verification model construction module: used to construct a feedback verification model and perform calculations based on the total weight estimated from the image and the actual measured data from the weight sensor to obtain the artifact suspicion level value;
[0145] Intelligent detection module: used to determine artifact interference in the image recognition model based on the image's estimated total weight and artifact suspicion value, thereby realizing plastic particle detection based on image recognition.
[0146] Example 3 is an embodiment of the present invention, which is different from the previous embodiment in that:
[0147] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0148] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0149] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting, or processing it in another suitable manner as necessary, and then storing it in a computer memory.
[0150] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0151] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A plastic particle detection method based on image recognition, characterized in that: include: Acquire plastic particle image data, and acquire particle weight sensor measured data corresponding to the image data; The image data refers to the image data of plastic particles collected by an image acquisition device, and the image data includes the distribution, color, shape, edge contour, projection area and image grayscale information of the particles in the image; The weight sensor measured data refers to the total weight data of the current batch of plastic particles collected in real time by a quality detection device arranged on the particle conveying path or weighing platform; Building an image recognition model based on the image data to obtain an estimated total weight of the image; Constructing an image recognition model based on the image data to obtain the image estimated total weight includes the following steps: By introducing color saturation, edge gradient, image grayscale, and shape parameters, the original pixel features of each plastic particle in the image are processed nonlinearly and a single-particle image feature enhancement function is constructed to obtain the image feature response value. This comprehensively characterizes the key identification features of each plastic particle in the image and calculates the distribution uniformity coefficient of the image feature response value. The specific formula is as follows: ; in, is the image feature response value of the i-th particle, represents the color saturation of the i-th particle, represents the edge gradient strength, represents the grayscale mean of the particle area, represents the particle roundness ratio; Furthermore, the distribution uniformity coefficient of the image feature response value is calculated based on the obtained image feature response value; First, count the image feature response values of all particles in the image ; Calculate the mean of the image feature response values and standard deviation ; The specific formula is as follows: ; Among them, A is the distribution uniformity coefficient, the smaller it is, the more uniform the distribution is; By introducing a power function and a proportional mapping factor to perform a nonlinear transformation on the image feature response value, the estimated weight of a single particle image is obtained, and the discreteness of the estimated weight of a single particle image is calculated. The specific formula is as follows: ; in, Estimate the weight of the image of the i-th particle, is the standard density of plastic particles, is the proportional adjustment factor; Furthermore, the dispersion of the image-estimated weight of a single particle is calculated based on the image-estimated weight; First, count the images of all particles and estimate their weight ; The specific formula is: ; Among them, IQR is the interquartile range of weight obtained by using the interquartile range calculation method, is the median of weight, B is the dispersion, the larger it is, the higher the dispersion of weight estimation; An image recognition model is constructed based on the optimized single particle image weight estimation to obtain the image estimated total weight result; The specific formula of the image recognition model is as follows: ; in, Estimate the total weight for the image, where n is the number of particles identified in the image; Based on the total weight estimated by the image and the actual measured data of the weight sensor, a feedback verification model is constructed and calculated to obtain an artifact suspicion degree value; Based on the image-estimated total weight and the actual measured data of the weight sensor, a feedback verification model is constructed and calculated to obtain an artifact suspicion degree value, including the following steps: By introducing the hyperbolic tangent function and the logarithmic function to process the combined effect of image estimation error and particle distribution fluctuation, a normalized response score is obtained, thereby enhancing the feedback verification model's ability to respond to scenarios with uneven particle distribution or sudden changes in image recognition deviation. The specific formula is as follows: ; in, is the normalized response score, The total weight of the plastic particles is measured by the weight sensor. is the normalized adjustment constant, is the image particle distribution variance; By introducing an exponential decay function to process the relative change rate of the measured weight within the current time period, a feedback verification model is constructed to suppress the misjudgment effect caused by short-term fluctuations in the particle transportation process, and the artifact suspicion degree value is obtained. The specific formula is as follows: ; in, is the artifact suspicion value, It is a suppression adjustment factor used to control the sensitivity of the model to the actual weight fluctuation. is the measured weight at the current time point, is the measured weight at the previous time point; Artifact interference in the image recognition model is determined based on the estimated total weight of the image and the artifact suspicion level value, thereby realizing plastic particle detection based on image recognition.
2. The method for detecting plastic particles based on image recognition according to claim 1, characterized in that: The determination status of the artifact interference includes no interference, acceptable interference, moderate artifact interference and severe artifact interference.
3. The method for detecting plastic particles based on image recognition according to claim 2, characterized in that: Determining artifact interference in the image recognition model based on the image estimated total weight and the artifact suspicion level value includes the following steps: A basic interference judgment is performed based on the absolute error between the image-estimated total weight and the actual weight sensor measured data. If the absolute error is less than or equal to the first error threshold W0 and the artifact suspicion level is less than or equal to the first interference threshold M0, the current state is determined to be free of interference, and the image recognition-based plastic particle detection continues. If the absolute error is less than or equal to the first error threshold W0 and the artifact suspicion level value is greater than the first interference threshold M0, it is preliminarily determined that the current state is acceptable interference and the next step is executed; If the initial determination result is acceptable interference, an interference upgrade is performed based on the distribution uniformity coefficient of the image feature response value and the dispersion of the estimated weight of the single particle image. If the distribution uniformity coefficient is greater than or equal to the uniformity threshold A0 and the dispersion is less than or equal to the dispersion threshold B0, the current state is determined to be acceptable interference, and a first-level prompt message is sent to the operator, suggesting that the image sensor be cleaned and checked. If the distribution uniformity coefficient is less than the uniformity threshold AO or the dispersion is greater than the dispersion threshold B0, the current state is determined to be moderate artifact interference, a second-level warning message is sent to the operator, and the parameter calibration process of the image recognition model is immediately triggered; If the absolute error is greater than the first error threshold W0 and less than or equal to the second error threshold W0', and the artifact suspicion level value is less than or equal to the second interference threshold M0', then the current state is preliminarily determined to be moderate artifact interference, and the next step is executed; When the preliminary judgment result is moderate artifact interference, the interference upgrade judgment is performed based on the proportion of abnormal grayscale areas in the image and the number of abnormal edge contour particles. If the proportion of abnormal grayscale areas is less than or equal to the area threshold C0 and the number of abnormal edge contour particles is less than or equal to the number threshold D0, the current state is determined to be moderate artifact interference, a secondary warning message is sent to the operator, and the parameter calibration process of the image recognition model is immediately triggered; If the proportion of grayscale abnormal areas is greater than the regional threshold C0 or the number of edge contour abnormal particles is greater than the number threshold D0, the current state is determined to be severe artifact interference, a level 3 alarm message is sent, the current detection process is stopped, and the backup detection system is activated; If the absolute error is greater than the second error threshold W0' or the artifact suspicion value is greater than the second interference threshold M0', the current state is determined to be severe artifact interference, a third-level alarm message is sent, the current detection process is stopped, and the backup detection system is activated.
4. A plastic particle detection system based on image recognition, based on the plastic particle detection method according to any one of claims 1 to 3, characterized in that: include: A data acquisition module is used to acquire plastic particle image data and acquire particle weight sensor measured data corresponding to the image data; Recognition model building module: used to build an image recognition model based on the image data to obtain the image estimated total weight; A verification model building module is used to build a feedback verification model and perform calculations based on the total weight estimated from the image and the actual measured data from the weight sensor to obtain a suspected artifact degree value; Intelligent detection module: used to determine the artifact interference in the image recognition model based on the estimated total weight and the artifact suspicion level value of the image, and realize plastic particle detection based on image recognition.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the plastic particle detection method based on image recognition according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the plastic particle detection method based on image recognition according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Plastic particle feeding weight control method based on adjustable-speed motor and weight feedback
CN114879767A
Fine particle sediment identification method fusing traditional threshold value and neural network
CN119068253A