Defect detection method and system for plastic packaging product
Through the multimodal detection method of infrared, ultraviolet and visible light sensor data fusion, the single-modal detection system's information single-modal detection system in the identification of defects in plastic packaging products is solved, and high-precision, low false alarm and missed defect detection is achieved, adapting to a diverse production environment.
Patent Information
- Application Number
- CN202510503845.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-25
AI Technical Summary
Existing plastic packaging products defect detection systems mostly use single-modal visual detection methods, which have information singularity and limitations, making it difficult to accurately identify defects such as tiny scratches on the transparent packaging surface and microcracks inside the material, resulting in high false alarms and missed response rates, affecting product quality and production costs.
The sensor data fusion of three modes: infrared, ultraviolet and visible light is adopted. Through modules such as data acquisition and preprocessing, multi-modal data fusion, defect area identification and positioning, defect classification and analysis, detection result post-processing and optimization, multi-dimensional defect information extraction and accurate identification are achieved.
It improves the detection system's perception of complex defects, reduces the rate of missed and false alarms, enhances the system's adaptability and robustness in diversified packaging materials and production environments, and improves detection accuracy and production efficiency.
Smart Images

Figure CN120375083A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plastic packaging defect detection, and specifically provides a defect detection method and system for plastic packaging products. Background Art
[0002] Defect detection technology is an important part of the fields of intelligent manufacturing and industrial automation, and is widely used in scenarios such as product quality control and production efficiency optimization. In the production of plastic packaging products, defect detection is mainly used to discover defects on the surface or inside of the products, such as cracks, bubbles, scratches, and stains, etc., to ensure that the products meet the quality standards. Specifically, for high-demand food, pharmaceutical, and industrial packaging, the detection system not only needs to quickly and accurately identify these defects, but also must adapt to diverse packaging materials and complex production environments.
[0003] Currently, many plastic packaging product defect detection systems adopt single-modal visual detection methods, such as surface detection based on visible light imaging or internal defect detection based on infrared imaging. Although these single-mode detection means can cover some types of defects, there are still limitations in detection accuracy and scope. For example, visible light detection is not sensitive to tiny scratches on the surface of transparent packaging, while infrared detection may not be able to identify color or texture abnormalities.
[0004] The deficiencies of single-modal detection technology mainly stem from its information singularity and locality. For example, visible light imaging mainly reflects surface color and brightness information, but has insufficient ability to detect structural defects; infrared imaging is more suitable for detecting micro-cracks inside materials, but it is difficult to effectively perceive surface texture and stains. These deficiencies will directly affect product quality assessment and user experience, and may also increase production costs, such as rework of qualified products caused by false alarms or brand reputation losses caused by unqualified products flowing into the market due to missed detections. Summary of the Invention
[0005] Aiming at the deficiencies of the prior art, the present invention provides a defect detection method and system for plastic packaging products, which solves the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention is realized through the following technical solutions: A defect detection system for plastic packaging products includes a data acquisition and preprocessing module, a multi-modal data fusion module, a defect area identification and location module, a defect classification and analysis module, a detection result post-processing and optimization module, and a feedback and adaptive adjustment module; The data acquisition and preprocessing module collects data in different modes through sensors installed on the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y), and performs preprocessing to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y); The multi-modal data fusion module fuses the enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y) by using feature fusion technology to form a unified image set Ifu(x, y); The defect area identification and location module processes the image set Ifu(x, y) by using image segmentation algorithms and edge detection algorithms to identify the defect area RX; The defect classification and analysis module extracts features of the defect area RX, including the shape, size, and texture features of the defect, to form a defect feature set Cd, and classifies the defect area RX through the defect feature set to obtain a defect classification set Cd; The post-processing and optimization module for detection results post-processes the defect classification set Cd, adjusts the detection accuracy, and performs secondary verification on the detected defects through the confidence weighting method and the post-processing correction algorithm, and calculates and obtains the severity score Sev of the defects; The feedback and adaptive adjustment module analyzes and feedbacks on the detected defects, and adjusts the preset weight value of the feature fusion technology through the obtained severity score Sev, thereby adjusting the accuracy of defect detection.
[0007] Preferably, the data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; The data acquisition unit obtains image data from infrared sensors, ultraviolet sensors, and visible light cameras in the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y); Among them, the infrared image data IR(x, y) is collected by an infrared sensor, the ultraviolet image data IU(x, y) is collected by an ultraviolet sensor, and the visible light image data IV(x, y) is collected by a visible light camera; The data preprocessing unit performs denoising and contrast enhancement processing on the obtained infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y) to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y); Among them, denoising is achieved by using the Gaussian filtering denoising algorithm to remove the noise in the image; The contrast enhancement process adjusts the brightness contrast of the image by using histogram equalization.
[0008] Preferably, the multi-modal data fusion module includes a feature extraction and normalization unit and a feature fusion and weighted generation unit; The feature extraction and normalization unit extracts edge features from the enhanced infrared image data IRg(x, y), the enhanced ultraviolet image data IUg(x, y), and the enhanced visible light image data IVg(x, y), and performs normalization processing to obtain the infrared edge image data FR(x, y), the ultraviolet edge image data FU(x, y), and the visible light edge image data FV(x, y); The infrared edge image data FR(x, y) is obtained by the following formula: ; In the formula, ∂ represents the partial derivative, ∂x represents the partial derivative with respect to the x-axis direction, ∂y represents the partial derivative with respect to the y-axis direction, represents the rate of change of the enhanced infrared image data IRg(x, y) in the x-axis direction, represents the rate of change of the enhanced infrared image data IRg(x, y) in the y-axis direction; The ultraviolet edge image data FU(x, y) is obtained by the following formula: ; In the formula, represents the rate of change of the enhanced ultraviolet image data IUg(x, y) in the x-axis direction, represents the rate of change of the enhanced ultraviolet image data IUg(x, y) in the y-axis direction; The visible light edge image data FV(x, y) is obtained by the following formula: ; In the formula, represents the rate of change of the enhanced visible light image data IVg(x, y) in the x-axis direction, represents the rate of change of the enhanced visible light image data IVg(x, y) in the y-axis direction; The feature fusion and weighted generation unit fuses the infrared edge image data FR(x, y), the ultraviolet edge image data FU(x, y), and the visible light edge image data FV(x, y) to generate a unified image set Ifu(x, y); The unified image set Ifu(x, y) is obtained by the following formula: ; In the formula, Represent the preset weight values of the infrared edge image data FR(x, y), the ultraviolet edge image data FU(x, y), and the visible light edge image data FV(x, y) respectively, and .
[0009] Preferably, the defect area recognition and positioning module calculates the gray value histogram in the image set Ifu(x, y) by using the image threshold segmentation algorithm, combines it with the preset given threshold T, calculates and obtains the segmentation threshold TFu, and divides the image set Ifu(x, y) into different regions through the segmentation threshold TFu, including the normal region RZ and the defect region RX; The segmentation threshold TFu is obtained through the following steps: S1. Define the image gray level histogram: Define the image gray range as [0, L - 1], where L represents the total number of gray levels as 256, and calculate and obtain the proportion Pi of the pixels with gray value i in the total pixels, and ; The proportion Pi of the pixels with gray value i in the total pixels is obtained by the ratio of the number ni of the pixels with gray value i to the total number N of the pixels in the image; S2. Calculate the foreground weight and the background weight : Divide the image set Ifu(x, y) into the background and the foreground through the preset given threshold T, where the background range is [0, T] and the foreground range is [T, L - 1]; The background weight is obtained through the following formula: ; The foreground weight is obtained through the following formula: ; S3. Calculate the foreground mean μf(T) and the background mean μb(T); The background mean μb(T) is obtained through the following formula: ; The foreground mean μf(T) is obtained through the following formula: ; S4. Calculate the between-class variance ; The between-class variance is obtained through the following formula: ; S5. Obtain the segmentation threshold TFu; By traversing all possible thresholds T ∈ [0, L - 1], find the segmentation threshold TFu that maximizes the between-class variance ; The segmentation threshold TFu is obtained through the following formula: ; In the formula, argmax represents taking the data peak value; The normal region RZ and the defect region RX are obtained by matching in the following way: When the image set Ifu(x, y) > the segmentation threshold TFu, it represents the defect region RX; When the image set Ifu(x, y) ≤ the segmentation threshold TFu, it represents the normal region RZ.
[0010] Preferably, the defect classification and analysis module includes a feature extraction unit and a defect classification unit; The feature extraction unit extracts shape, size, and texture features from the defect region RX, generating a defect feature set Fd = {f1, f2,..., fn}; Among them, the shape features include the aspect ratio fa and the roundness fr; the size features include the area fm and the perimeter fc; the texture features are extracted through the LBP algorithm; The aspect ratio fa is obtained by the ratio of the length of the defect region RX to the width of the defect region RX; The defect classification unit classifies the defect region RX according to the obtained defect feature set Fd by using the support vector random classification algorithm, obtains the classification result CdR, and performs fitting to generate a defect classification set Cd; The classification result CdR is obtained through the following formula: ; In the formula, CdRi represents the classification result of the i-th type of defect sample, N represents the total number of defect samples, represents the preset weight value of the support vector, yi represents the label of the training defect sample, K represents the kernel function, Fdi represents the i-th defect sample feature in the defect feature set Fd, and b represents the bias term.
[0011] Preferably, the detection result post-processing and optimization module includes a confidence evaluation and weighting unit and a post-processing correction and sorting unit; The confidence evaluation and weighting unit evaluates the confidence of the detected defects, combines the features extracted during the detection process, assigns a confidence score ConfR to each defect, and compares it with the preset confidence threshold Tcon, filtering out the defects with a confidence score ConfR less than the confidence threshold Tcon to obtain a filtered defect classification set Cfid; The confidence score ConfR is obtained through the following formula: ; Wherein, ConfRj represents the confidence score of the j-th defect region Rj in the defect region RX, k represents the total number of defect categories, Cj represents the defect category, represents the probability that the i-th defect sample feature in the defect feature set Fd belongs to the defect category Cj, represents the preset weight value of the category; The filtered defect classification set Cfid is obtained through the following formula: Cfid = {Rj ∈ Cd | ConfRj ≥ Tcon}.
[0012] Preferably, the post-processing correction and sorting unit corrects and sorts the filtered defect classification set Cfid after confidence filtering; The correction includes verifying the reliability of the defect through a post-processing algorithm twice and sorting according to the severity score Sev of the defect; The secondary verification includes judging whether the defect is a real defect according to whether the shape, size and texture features of the defect meet the standards; the severity sorting calculates the severity score Sev of the defect according to the matching degree M and the confidence score ConfR, and sorts according to, and obtains the sorted classification set Csod; For the defect region Rj, the matching degree M is defined; The matching degree M is obtained through the following formula: ; Wherein, M(Rj) represents the matching degree score of the defect region Rj, respectively represent the preset weight values of the shape feature and the size feature, Aj represents the actual area of the defect region Rj, Aavg represents the average area of the detected defect, represents the similarity between the shape Sj of the defect region Rj and the standard shape Sstd; The severity score Sev is obtained through the following formula: ; Wherein, Sev(Rj) represents the severity score of the defect region Rj; The sorted classification set Csod is obtained through the following formula: ; ; Wherein, n represents the total number of defect regions, represents the sorting of the severity scores of the defect regions Rj from high to low.
[0013] Preferably, the feedback and adaptive adjustment module includes a detection feedback analysis unit and an adaptive parameter adjustment unit; The detection feedback analysis unit analyzes the detected defect information, including detection accuracy Acc, false positive rate FPR, and false negative rate FNR, and conducts summary and statistics; The detection accuracy Acc is obtained through the following formula: ; In the formula, TP represents the number of true defects correctly detected as defects; TN represents the number of defect-free areas correctly detected as defect-free; FP represents the number of defect-free areas misdetected as defects; FN represents the number of true defects missed; The false positive rate FPR is obtained through the following formula: ; The false negative rate FNR is obtained through the following formula: .
[0014] Preferably, the adaptive parameter adjustment unit adjusts the weighting coefficients of the feature fusion technology through the obtained severity score Sev to obtain the preset weight values of the new infrared edge image data FR(x, y), the new ultraviolet edge image data FU(x, y), and the new visible light edge image data FV(x, y) (to ensure the detection accuracy of the system under different environments or defect types) and brings them back into the formula to re-obtain the unified image set Ifu(x, y); The preset weight value of the new infrared edge image data FR(x, y) is obtained through the following formula: ; In the formula, NSev represents the total severity score, and λ represents the adjustment coefficient; The preset weight value of the new ultraviolet edge image data FU(x, y) is obtained through the following formula: ; The preset weight value of the new visible light edge image data FV(x, y) is obtained through the following formula: .
[0015] A method for detecting defects in plastic packaging products includes the following steps: Step 1: The data acquisition and preprocessing module collects data in different modes through sensors installed on the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y), and performs preprocessing to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y). Step 2: The multimodal data fusion module fuses the enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y) by using feature fusion technology to form a unified image set Ifu(x, y). Step 3: The defect area recognition and localization module processes the image set Ifu(x, y) by using image segmentation algorithms and edge detection algorithms to identify the defect area RX. Step 4: The defect classification and analysis module extracts features from the defect area RX, including the shape, size, and texture features of the defect, forms a defect feature set Cd, and classifies the defect area RX through the defect feature set to obtain a defect classification set Cd. Step 5: The post-processing and optimization module for detection results post-processes the defect classification set Cd, adjusts the accuracy of detection, and performs secondary verification on the detected defects through the confidence weighting method and the post-processing correction algorithm, and calculates and obtains the severity score Sev of the defect. Step 6: The feedback and adaptive adjustment module analyzes and feeds back the detected defects, and adjusts the preset weight value of the feature fusion technology through the obtained severity score Sev, thereby adjusting the accuracy of defect detection.
[0016] The present invention provides a method and system for detecting defects in plastic packaging products, having the following beneficial effects: (1) During the operation of the system, through the fusion of sensor data in three modes of infrared, ultraviolet, and visible light, the limitation of single-modal detection technology with single information is overcome. Infrared images can detect internal microcracks invisible to the naked eye, ultraviolet images can capture microdefects on the surface caused by ultraviolet exposure, and visible light images can accurately identify surface scratches, color abnormalities, etc. The multimodal data fusion technology realizes the extraction of multi-dimensional defect information, greatly improves the perception ability of the detection system for complex defects, and reduces the risks of missed reports and false alarms.
[0017] Through the collaborative work of multiple functional modules such as the data acquisition and preprocessing module, the multi-modal data fusion module, and the defect area recognition and localization module, the present invention forms a highly flexible and scalable detection framework. The independent design of each module allows the system to be adjusted under different production conditions, such as the dynamic optimization of sensor sensitivity and feature fusion weights, enabling the system to adapt to diverse packaging materials and production environments.
[0018] (2) By introducing the threshold segmentation algorithm of image gray histogram analysis and maximum between-class variance, the segmentation threshold TFu is accurately calculated, and the image is segmented into the normal area RZ and the defect area RX. By optimizing the between-class variance, it is ensured that the calculation result of the segmentation threshold TFu can distinguish the foreground and background to the greatest extent, thus accurately identifying the defect area; the automatic calculation of the segmentation threshold reduces manual intervention, improves the detection efficiency, and simultaneously reduces the possibility of false alarms and missed detections.
[0019] The feature extraction unit extracts multi-dimensional features such as shape, size, and texture from the defect area RX to generate a high-quality defect feature set Fd. The comprehensive analysis of multi-dimensional features enhances the system's ability to distinguish different types of defects, providing a solid data basis for subsequent classification and severity assessment.
[0020] (3) Through the feedback severity score Sev(Rj), the adaptive parameter adjustment unit dynamically optimizes the weighting coefficients of the feature fusion technology; the optimized weight values can adapt to different production environments or defect types, further enhancing the detection accuracy and robustness of the system in diverse scenarios. This dynamic adjustment mechanism significantly improves the sensitivity and response speed of the detection system to environmental changes, avoiding false detections or missed detections caused by changes in environmental conditions.
[0021] (4) Through the data acquisition and preprocessing module and the multi-modal data fusion module, this embodiment integrates the image data of three modalities: infrared, ultraviolet, and visible light, forming a unified image set Ifu(x,y): Infrared imaging is good at detecting microcracks and internal defects in materials, ultraviolet imaging can detect surface defects caused by ultraviolet light, and visible light imaging captures surface scratches, stains, and color abnormalities; using feature fusion technology to combine multi-modal features enhances the system's ability to perceive different defects, effectively reducing false alarms and missed detections caused by single-modal detection. This technology provides a comprehensive and high-precision solution for the detection of plastic packaging products in complex environments.
[0022] Through the modularly designed defect area recognition and positioning module and defect classification and analysis module, this embodiment can quickly identify the defect area RX and accurately classify it: using the image segmentation algorithm and the edge detection algorithm, the image is divided into defect areas and normal areas to ensure accurate capture of the defect areas; by extracting shape, size and texture features to form a defect feature set Cd, and using the classification algorithm to subdivide the defects into different categories. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a schematic diagram of a flow chart of a defect detection system for plastic packaging products of the present invention; Figure 2 A schematic diagram of the steps of a defect detection method for plastic packaging products of the present invention; Figure 3 A schematic diagram of the steps of the segmentation threshold acquisition method of the present invention; Figure 4 It is a line graph showing the relationship between aspect ratio and roundness and defect type according to the present invention. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0025] Example 1 The present invention provides a defect detection system for plastic packaging products, see Figures 1 - 4 , including data acquisition and preprocessing module, multimodal data fusion module, defect area identification and positioning module, defect classification and analysis module, detection result post-processing and optimization module and feedback and adaptive adjustment module; The data acquisition and preprocessing module collects data of different modes through sensors installed on the production line, including infrared image data IR (x, y), ultraviolet image data IU (x, y) and visible light image data IV (x, y), and performs preprocessing to obtain enhanced infrared image data IRg (x, y), enhanced ultraviolet image data IUg (x, y) and enhanced visible light image data IVg (x, y); The multimodal data fusion module fuses the enhanced infrared image data IRg(x, y), the enhanced ultraviolet image data IUg(x, y) and the enhanced visible light image data IVg(x, y) by using feature fusion technology to form a unified image set Ifu(x, y); The defect area identification and location module processes the image set Ifu(x, y) using image segmentation algorithms and edge detection algorithms to identify the defect area RX; The defect classification and analysis module extracts features from the defect area RX, including the shape, size, and texture features of the defect, to form a defect feature set Cd, and classifies the defect area RX through the defect feature set to obtain a defect classification set Cd; The detection result post-processing and optimization module post-processes the defect classification set Cd, adjusts the detection accuracy, and performs secondary verification on the detected defects through the confidence-weighted method and the post-processing correction algorithm, and calculates and obtains the severity score Sev of the defect; The feedback and adaptive adjustment module analyzes and provides feedback on the detected defects, and adjusts the preset weight value of the feature fusion technology through the obtained severity score Sev, thereby adjusting the accuracy of defect detection.
[0026] In this embodiment, through the sensor data fusion of three modes: infrared, ultraviolet, and visible light, the limitations of single-modal detection technology with single information are overcome. Infrared images can detect internal microcracks that are invisible to the naked eye, ultraviolet images can capture microdefects on the surface caused by ultraviolet exposure, and visible light images can accurately identify surface scratches, color abnormalities, etc. The multi-modal data fusion technology realizes the extraction of multi-dimensional defect information, greatly improves the perception ability of the detection system for complex defects, and reduces the risks of missed reports and false alarms.
[0027] Through the collaborative work of multiple functional modules such as the data acquisition and preprocessing module, the multi-modal data fusion module, and the defect area identification and location module, the present invention forms a highly flexible and scalable detection framework. The independent design of each module allows the system to be adjusted under different production conditions, such as the dynamic optimization of sensor sensitivity and feature fusion weights, enabling the system to adapt to diverse packaging materials and production environments.
[0028] The detection result post-processing and optimization module performs secondary verification on the detection results through the confidence-weighted method and the post-processing correction algorithm, filters out false alarm results with low confidence, and ensures that only defects meeting specific conditions are confirmed. In addition, by calculating the severity score Sev of the defects for ranking, the system can prioritize the processing of defect areas with greater impacts, thereby improving the detection efficiency and decision-making quality and reducing resource waste. Through the feedback and adaptive adjustment module, the detection performance can be analyzed and optimized in real time. Based on the detected severity score Sev, the weighting coefficient of the feature fusion technology is adjusted to dynamically optimize the sensitivity of the detection system to different defect types. This adaptive optimization ability not only improves the detection accuracy but also ensures the robustness of the system under different environmental conditions.
[0029] The defect classification and analysis module extracts the shape, size, and texture features of the defect area, generates a comprehensive defect feature set Cd, and classifies it through a classification algorithm. The multi-level feature analysis avoids classification errors caused by single features and provides high-quality data support for subsequent detection verification and severity assessment. Through precise defect detection and dynamic optimization mechanisms, an intelligent solution is provided for the production quality control of plastic packaging products. While ensuring high detection accuracy, the system significantly reduces the need for manual intervention, improves production efficiency, and reduces cost losses caused by missed or misdetected defects.
[0030] Embodiment 2 This embodiment is an explanatory description based on Embodiment 1. Please refer to Figure 1 , specifically: The data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; The data acquisition unit obtains image data from infrared sensors, ultraviolet sensors, and visible light cameras in the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y); Among them, the infrared image data IR(x, y) is collected by the infrared sensor, the ultraviolet image data IU(x, y) is collected by the ultraviolet sensor, and the visible light image data IV(x, y) is collected by the visible light camera; The data preprocessing unit performs denoising and contrast enhancement processing on the obtained infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y) to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y); Among them, denoising is performed by using a Gaussian filtering denoising algorithm to remove the noise in the image; The contrast enhancement processing adjusts the brightness contrast of the image by using histogram equalization.
[0031] The multi-modal data fusion module includes a feature extraction and normalization unit and a feature fusion and weighted generation unit; The feature extraction and normalization unit extracts edge features from the enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y), and performs normalization processing to obtain infrared edge image data FR(x, y), ultraviolet edge image data FU(x, y), and visible light edge image data FV(x, y); The infrared edge image data FR(x, y) is obtained through the following formula: ; In the formula, ∂ represents the partial derivative, ∂x represents the partial derivative in the x-axis direction, and ∂y represents the partial derivative in the y-axis direction. represents the rate of change of the enhanced infrared image data IRg(x, y) in the x-axis direction. represents the rate of change of the enhanced infrared image data IRg(x, y) in the y-axis direction. The ultraviolet edge image data FU(x, y) is obtained through the following formula: ; In the formula, represents the rate of change of the enhanced ultraviolet image data IUg(x, y) in the x-axis direction. represents the rate of change of the enhanced ultraviolet image data IUg(x, y) in the y-axis direction. The visible light edge image data FV(x, y) is obtained through the following formula: ; In the formula, represents the rate of change of the enhanced visible light image data IVg(x, y) in the x-axis direction. represents the rate of change of the enhanced visible light image data IVg(x, y) in the y-axis direction. The feature fusion and weighting generation unit fuses the infrared edge image data FR(x, y), the ultraviolet edge image data FU(x, y), and the visible light edge image data FV(x, y) to generate a unified image set Ifu(x, y). The unified image set Ifu(x, y) is obtained through the following formula: ; In the formula, respectively represent the preset weight values of the infrared edge image data FR(x, y), the ultraviolet edge image data FU(x, y), and the visible light edge image data FV(x, y), and .
[0032] In this embodiment, through the data acquisition and preprocessing module, multi-modal image data is collected from the infrared sensor, the ultraviolet sensor, and the visible light camera, and denoising and contrast enhancement processing are performed on it, effectively improving the quality and usability of the image data. By histogram equalization to enhance the image brightness and contrast, the subtle defects in the image become more clearly visible. This preprocessing method makes up for the false alarms or missed detections that are prone to occur in single-modal images under low-quality data, provides high-quality data input for the subsequent modules, and improves the overall robustness of the system.
[0033] Through the feature extraction and normalization unit, edge features are extracted from the enhanced multi-modal images, and the edge features of different modalities are normalized. The edge features of infrared, ultraviolet, and visible light images are calculated using partial derivatives to generate an infrared edge image FR(x, y), an ultraviolet edge image FU(x, y), and a visible light edge image FV(x, y) respectively. Mapping the feature values of different modalities to a unified scale range solves the problem of differences in data intensity among different sensors and creates better conditions for feature fusion.
[0034] Through the feature fusion and weighted generation unit, in this embodiment, the edge features of multi-modal images are weighted and fused to generate a unified image set Ifu(x, y). The fused unified image set Ifu(x, y) has the comprehensive features of multi-modal images, enabling the detection system to simultaneously perceive complex defects on the surface and inside of the material, significantly improving the comprehensiveness and accuracy of detection.
[0035] Embodiment 3 This embodiment is an explanatory description based on Embodiment 2. Please refer to Figure 1 、 Figure 3 and Figure 4 Specifically: The defect area recognition and positioning module calculates the gray value histogram in the image set Ifu(x, y) by using an image threshold segmentation algorithm, combines it with a preset given threshold T, calculates and obtains a segmentation threshold TFu, and divides the image set Ifu(x, y) into different regions through the segmentation threshold TFu, including a normal region RZ and a defect region RX; The segmentation threshold TFu is obtained through the following steps: S1. Define the image gray level histogram: Define the image gray level range as [0, L - 1], where L is 256 representing the total number of gray levels, and calculate and obtain the proportion Pi of the pixels with gray value i in the total pixels, and ; The proportion Pi of the pixels with gray value i in the total pixels is obtained by the ratio of the number ni of pixels with gray value i to the total number N of pixels in the image; S2. Calculate the foreground weight and the background weight : Divide the image set Ifu(x, y) into background and foreground through a preset given threshold T, where the background range is [0, T] and the foreground range is [T, L - 1]; The background weight is obtained through the following formula: ; The foreground weight is obtained through the following formula: ; S3. Calculate the foreground mean μf(T) and the background mean μb(T); The background mean μb(T) is obtained through the following formula: ; The foreground mean μf(T) is obtained through the following formula: ; S4. Calculate the between-class variance ; The between-class variance is obtained through the following formula: ; S5. Obtain the segmentation threshold TFu; By traversing all possible thresholds T ∈ [0, L - 1], find the segmentation threshold TFu that maximizes the between-class variance ; The segmentation threshold TFu is obtained through the following formula: ; In the formula, argmax represents taking the data peak value; The normal region RZ and the defect region RX are obtained through the following matching method: When the image set Ifu(x, y) > the segmentation threshold TFu, it represents the defect region RX; When the image set Ifu(x, y) ≤ the segmentation threshold TFu, it represents the normal region RZ.
[0036] The defect classification and analysis module includes a feature extraction unit and a defect classification unit; The feature extraction unit extracts the shape, size, and texture features of the defect region RX, generating a defect feature set Fd = {f1, f2,..., fn}; Among them, the shape features include the aspect ratio fa and the roundness fr; the size features include the area fm and the perimeter fc; the texture features are extracted through the LBP algorithm; The aspect ratio fa is obtained through the ratio of the length of the defect region RX to the width of the defect region RX; The defect classification unit classifies the defect region RX according to the obtained defect feature set Fd using the support vector random classification algorithm, obtaining the classification result CdR, and performing fitting to generate a defect classification set Cd; The classification result CdR is obtained through the following formula: ; In the formula, CdRi represents the classification result of the i-th type of defect sample, and N represents the total number of defect samples. w represents the preset weight value of the support vector, yi represents the label of the training defect sample, K represents the kernel function, Fdi represents the feature of the i-th defect sample in the defect feature set Fd, and b represents the bias term.
[0037] Table 1 Classification Table of Defect Detection Data: The post-processing and optimization module for detection results includes a confidence evaluation and weighting unit and a post-processing correction and sorting unit; The confidence evaluation and weighting unit conducts a confidence evaluation on the detected defects, combines the features extracted during the detection process, assigns a confidence score ConfR to each defect, compares it with the preset confidence threshold Tcon, filters out the defects with a confidence score ConfR less than the confidence threshold Tcon, and obtains the filtered defect classification set Cfid; The confidence score ConfR is obtained through the following formula: ; In the formula, ConfRj represents the confidence score of the j-th defect region Rj in the defect region RX, k represents the total number of defect categories, Cj represents the defect category, represents the probability that the feature of the i-th defect sample in the defect feature set Fd belongs to the defect category Cj, represents the preset weight value of the category; The filtered defect classification set Cfid is obtained through the following formula: Cfid = {Rj ∈ Cd | ConfRj ≥ Tcon}.
[0038] In this embodiment, by introducing the threshold segmentation algorithm of image gray histogram analysis and maximum between-class variance, the segmentation threshold TFu is accurately calculated, and the image is segmented into a normal region RZ and a defect region RX. By optimizing the between-class variance, it is ensured that the calculation result of the segmentation threshold TFu can distinguish the foreground and background to the greatest extent, thereby accurately identifying the defect region; the automatic calculation of the segmentation threshold reduces manual intervention, improves the detection efficiency, and at the same time reduces the possibility of false alarms and missed detections.
[0039] The feature extraction unit extracts multi-dimensional features such as shape, size, and texture from the defect region RX to generate a high-quality defect feature set Fd. The comprehensive analysis of multi-dimensional features enhances the system's ability to distinguish different types of defects and provides a solid data basis for subsequent classification and severity assessment.
[0040] This embodiment uses a support vector random classification algorithm to classify the defect area RX through the defect feature set Fd, generate the classification result CdR, and fit it into the defect classification set Cd. The confidence evaluation and weighting unit assigns a confidence score ConfR to each detected defect, and filters out the defects with low confidence through the confidence threshold Tcon, thereby generating a filtered defect classification set Cfid with high confidence.
[0041] The modular design of this embodiment enables the defect area recognition, classification, and post-processing functions to be independent of each other but cooperate with each other. Both the segmentation algorithm and the classification algorithm can adjust parameters according to different application scenarios to adapt to diverse production requirements; Example 4 This embodiment is an explanatory note based on Embodiment 3. Please refer to Figure 1 , specifically: The post-processing correction and sorting unit corrects and sorts the filtered defect classification set Cfid after confidence screening; The correction includes secondarily verifying the reliability of the defect through a post-processing algorithm and sorting according to the severity score Sev of the defect; The secondary verification includes determining whether the defect is a real defect based on whether the shape, size, and texture features of the defect meet the standards; the severity sorting calculates the severity score Sev of the defect according to the matching degree M and the confidence score ConfR, and sorts them to obtain the sorted classification set Csod; For the defect area Rj, the matching degree M is defined; The matching degree M is obtained through the following formula: ; In the formula, M(Rj) represents the matching degree score of the defect area Rj, respectively represent the preset weight values of the shape feature and the size feature, Aj represents the actual area of the defect area Rj, and Aavg represents the average area of the detected defects, represents the similarity between the shape Sj of the defect area Rj and the standard shape Sstd; The severity score Sev is obtained through the following formula: ; In the formula, Sev(Rj) represents the severity score of the defect area Rj; The sorted classification set Csod is obtained through the following formula: ; ; In the formula, n represents the total number of defect areas.
[0042] The feedback and adaptive adjustment module includes a detection feedback analysis unit and an adaptive parameter adjustment unit; The detection feedback analysis unit analyzes the detected defect information, including detection accuracy Acc, false positive rate FPR, and false negative rate FNR, and conducts summary and statistics; The detection accuracy Acc is obtained through the following formula: ; In the formula, TP represents the number of true defects correctly detected as defects; TN represents the number of defect-free areas correctly detected as defect-free; FP represents the number of defect-free areas misdetected as defects; FN represents the number of true defects missed; The false positive rate FPR is obtained through the following formula: ; The false negative rate FNR is obtained through the following formula: .
[0043] The adaptive parameter adjustment unit adjusts the weighting coefficients of the feature fusion technology through the obtained severity score Sev to obtain the preset weight values of the new infrared edge image data FR(x, y), the new ultraviolet edge image data FU(x, y), and the new visible light edge image data FV(x, y) (ensuring the detection accuracy of the system under different environments or defect types) and brings them back into the formula to re-obtain the unified image set Ifu(x, y); The preset weight value of the new infrared edge image data FR(x, y) is obtained through the following formula: ; In the formula, NSev represents the total severity score, and λ represents the adjustment coefficient; The preset weight value of the new ultraviolet edge image data FU(x, y) is obtained through the following formula: ; The preset weight value of the new visible light edge image data FV(x, y) is obtained through the following formula: .
[0044] In this embodiment, through the post - processing correction and sorting unit, the filtered defect classification set Cfid after confidence filtering is secondarily verified and sorted: comprehensively considering whether the shape, size, and texture features of the defect area meet the standards, the ability to confirm real defects is improved; the severity score Sev(Rj) of the defect is calculated through the matching degree M(Rj) and the confidence score ConfR(Rj), and they are arranged in descending order to generate the sorted classification set Csod. This correction and sorting mechanism significantly reduces the interference of false - alarm defects on the production process, and gives priority to handling high - severity defects, thereby optimizing the working efficiency and reliability of the detection system.
[0045] The detection feedback analysis unit comprehensively analyzes the detection results, including detection accuracy Acc, false - positive rate FPR, and false - negative rate FNR; the overall detection ability of the system is reflected by the accuracy, and the reliability and sensitivity of the system are evaluated by the false - positive rate and the false - negative rate respectively; the performance statistical results provide a basis for subsequent adaptive parameter adjustment to ensure that the system always maintains a high - level detection performance.
[0046] Through the feedback severity score Sev(Rj), the adaptive parameter adjustment unit dynamically optimizes the weighting coefficients of the feature fusion technology; the optimized weight values can adapt to different production environments or defect types, further enhancing the detection accuracy and robustness of the system in diverse scenarios. This dynamic adjustment mechanism significantly improves the sensitivity and response speed of the detection system to environmental changes, avoiding false detections or missed detections caused by changes in environmental conditions.
[0047] In this embodiment, by combining feedback analysis and parameter adjustment, a closed - loop design of detection - feedback - optimization is formed; the detected defects generate the sorted classification set Csod through the post - processing correction and sorting module to ensure the high quality of the detection results; the feature fusion weights are optimized according to the severity score, and the unified image set Ifu(x, y) is regenerated to make subsequent detections more accurate; Embodiment 5 A method for detecting defects in plastic packaging products, please refer to Figure 2 , specifically: including the following steps: Step 1: The data acquisition and pre - processing module collects data in different modes through sensors installed on the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible - light image data IV(x, y), and performs pre - processing to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible - light image data IVg(x, y); Step 2: The multimodal data fusion module fuses the enhanced infrared image data IRg (x, y), the enhanced ultraviolet image data IUg (x, y) and the enhanced visible light image data IVg (x, y) by using feature fusion technology to form a unified image set Ifu (x, y); Step 3: The defect area identification and positioning module processes the image set Ifu (x, y) by using the image segmentation algorithm and the edge detection algorithm to identify the defect area RX; Step 4: The defect classification and analysis module extracts features of the defect area RX, including the shape, size and texture features of the defect, to form a defect feature set Cd, and classifies the defect area RX by the defect feature set to obtain a defect classification set Cd; Step 5: The detection result post-processing and optimization module performs post-processing on the defect classification set Cd, adjusts the detection accuracy, and performs secondary verification on the detected defects through the confidence weighting method and post-processing correction algorithm, and calculates the severity score Sev of the defect; Step 6: The feedback and adaptive adjustment module analyzes and provides feedback on the detected defects, and adjusts the preset weight value of the feature fusion technology through the obtained severity score Sev, thereby adjusting the accuracy of defect detection.
[0048] In this embodiment, through the data acquisition and preprocessing module and the multimodal data fusion module, this embodiment integrates the image data of three modes, infrared, ultraviolet and visible light, to form a unified image set Ifu(x,y): infrared imaging is good at detecting microcracks and internal defects of materials, ultraviolet imaging can find surface defects caused by ultraviolet rays, and visible light imaging can capture surface scratches, stains and color anomalies; the use of feature fusion technology combined with multimodal features enhances the system's perception of different defects and effectively reduces false positives and false negatives caused by single-mode detection. This technology provides a comprehensive and high-precision solution for the detection of plastic packaging products in complex environments.
[0049] Through the modularly designed defect area recognition and positioning module and defect classification and analysis module, this embodiment can quickly identify the defect area RX and accurately classify it: using the image segmentation algorithm and the edge detection algorithm, the image is divided into defect areas and normal areas to ensure accurate capture of the defect areas; by extracting shape, size and texture features to form a defect feature set Cd, and using the classification algorithm to subdivide the defects into different categories.
[0050] The post - processing and optimization module for detection results performs secondary verification on the defect classification set Cd and calculates the severity score Sev through the confidence - weighted method and the post - processing correction algorithm: calculates the confidence score based on the classification results and feature contribution degrees, and filters out false - alarm defects with low confidence; calculates the severity score Sev of the defect through the matching degree M and the confidence score ConfR, sorts them by priority, and generates high - quality detection results. The feedback and adaptive adjustment module dynamically optimizes the feature fusion weights according to the severity score Sev: through the feedback of the severity score, recalculates the preset weight values of infrared, ultraviolet, and visible light features, enabling the system to flexibly respond to different detection scenarios.
[0051] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A defect detection system for plastic packaging products, characterized in that: The data acquisition and preprocessing module collects data in different modes through sensors installed on the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y), and performs preprocessing to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y); The multi-modal data fusion module fuses the enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y) by using feature fusion technology to form a unified image set Ifu(x, y); The defect area recognition and localization module processes the image set Ifu(x, y) by using image segmentation algorithms and edge detection algorithms to identify the defect area RX; The defect classification and analysis module extracts features of the defect area RX, including the shape, size, and texture features of the defect, to form a defect feature set Cd, and classifies the defect area RX through the defect feature set to obtain a defect classification set Cd; The post-processing and optimization module for detection results performs post-processing on the defect classification set Cd, adjusts the accuracy of detection, and performs secondary verification on the detected defects through the confidence weighting method and the post-processing correction algorithm, and calculates and obtains the severity score Sev of the defect; The feedback and adaptive adjustment module analyzes and gives feedback on the detected defects, and adjusts the preset weight value of the feature fusion technology through the obtained severity score Sev, so as to adjust the accuracy of defect detection.
2. A flaw detection system for plastic packaging products according to claim 1, characterized in that: The data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; The data acquisition unit obtains image data from infrared sensors, ultraviolet sensors, and visible light cameras in the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y); Among them, the infrared image data IR(x, y) is collected by an infrared sensor, the ultraviolet image data IU(x, y) is collected by an ultraviolet sensor, and the visible light image data IV(x, y) is collected by a visible light camera; The data preprocessing unit performs denoising and contrast enhancement processing on the obtained infrared image data IR(x, y), ultraviolet image data IU(x, y), and visible light image data IV(x, y) to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y); Among them, denoising is performed by using a Gaussian filter denoising algorithm to remove the noise in the image; The contrast enhancement processing adjusts the brightness contrast of the image by using histogram equalization.
3. A defect detection system for plastic packaging products according to claim 1, characterized in that: The multi-modal data fusion module includes a feature extraction and normalization unit and a feature fusion and weighting generation unit; The feature extraction and normalization unit extracts edge features from the enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y), and enhanced visible light image data IVg(x, y), and performs normalization processing to obtain infrared edge image data FR(x, y), ultraviolet edge image data FU(x, y), and visible light edge image data FV(x, y); The infrared edge image data FR(x, y) is obtained through the following formula: ; In the formula, ∂ represents the partial derivative, ∂x represents the partial derivative in the x-axis direction, and ∂y represents the partial derivative in the y-axis direction. represents the change rate of the enhanced infrared image data IRg(x, y) in the x-axis direction. represents the change rate of the enhanced infrared image data IRg(x, y) in the y-axis direction. The ultraviolet edge image data FU(x, y) is obtained through the following formula: ; In the formula, represents the change rate of the enhanced ultraviolet image data I Ug(x, y) in the x-axis direction, represents the change rate of the enhanced ultraviolet image data I Ug(x, y) in the y-axis direction; The visible light edge image data FV(x, y) is obtained through the following formula: ; In the formula, represents the change rate of the enhanced visible light image data IVg(x, y) in the x-axis direction, represents the change rate of the enhanced visible light image data IVg(x, y) in the y-axis direction; The feature fusion and weighting generation unit fuses the infrared edge image data FR(x, y), ultraviolet edge image data FU(x, y), and visible light edge image data FV(x, y) to generate a unified image set Ifu(x, y); The unified image set Ifu(x, y) is obtained through the following formula: ; In the formula, respectively represent the preset weight values of the infrared edge image data FR(x, y), the ultraviolet edge image data FU(x, y), and the visible light edge image data FV(x, y), and .
4. A defect detection system for plastic packaging products according to claim 1, characterized in that: The defect area recognition and positioning module calculates the gray value histogram in the image set Ifu(x, y) by using the image threshold segmentation algorithm, combines it with a preset given threshold T, calculates and obtains the segmentation threshold TFu, and divides the image set Ifu(x, y) into different regions through the segmentation threshold TFu, including the normal region RZ and the defect region RX; The segmentation threshold TFu is obtained through the following steps: S1. Define the image gray-level histogram: Define the image gray-level range as [0, L-1], where L = 256 represents the total number of gray levels, and calculate the proportion Pi of the pixels with gray value i in the total pixels, and ; The proportion Pi of pixels with gray value i in the total pixels is obtained by the ratio of the number ni of pixels with gray value i to the total number N of pixels in the image; S2. Calculate the foreground weight and the background weight : Divide the image set Ifu(x, y) into background and foreground through a preset given threshold T, where the background range is [0, T] and the foreground range is [T, L - 1]; Background weight Obtained by the following formula: ; Foreground weight Obtained by the following formula: ; S3. Calculate the foreground mean μf(T) and the background mean μb(T); The background mean μb(T) is obtained through the following formula: ; The foreground mean μf(T) is obtained through the following formula: ; S4. Calculate the between-class variance ; The between-class variance is obtained through the following formula: ; S5. Obtain the segmentation threshold TFu; By traversing all possible thresholds \(T\in[0,L - 1]\), find the segmentation threshold \(T_{Fu}\) that maximizes the between-class variance ; The segmentation threshold TFu is obtained through the following formula: ; In the formula, argmax represents taking the data peak value; The normal region RZ and the defect region RX are obtained by matching in the following way: When the image set Ifu(x, y) > the segmentation threshold TFu, it represents the defect region RX; When the image set Ifu(x, y) ≤ the segmentation threshold TFu, it represents the normal region RZ.
5. A defect detection system for plastic packaging products according to claim 4, characterized in that: The defect classification and analysis module includes a feature extraction unit and a defect classification unit; The feature extraction unit extracts shape, size, and texture features from the defect region RX to generate a defect feature set Fd = {f1, f2, fn}; Among them, the shape features include the aspect ratio fa and the roundness fr; the size features include the area fm and the perimeter fc; the texture features are extracted through the LBP algorithm; The aspect ratio fa is obtained by the ratio of the length of the defect region RX to the width of the defect region RX; The defect classification unit uses the support vector random classification algorithm to classify the defect region RX according to the obtained defect feature set Fd, obtains the classification result CdR, and performs fitting to generate a defect classification set Cd; The classification result CdR is obtained through the following formula: ; Wherein, CdRi represents the classification result of the i-th type of defective sample, N represents the total number of defective samples, represents the preset weight value of the support vector, yi represents the label of the training defective sample, K represents the kernel function, Fdi represents the feature of the i-th defective sample in the defective feature set Fd, and b represents the bias term.
6. A defect detection system for plastic packaging products according to claim 5, characterized in that: The detection result post-processing and optimization module includes a confidence evaluation and weighting unit and a post-processing correction and sorting unit; The confidence evaluation and weighting unit evaluates the confidence of the detected defects, combines the features extracted during the detection process, assigns a confidence score ConfR to each defect, compares it with the preset confidence threshold Tcon, filters out the defects with a confidence score ConfR less than the confidence threshold Tcon, and obtains the filtered defect classification set Cfid; The confidence score ConfR is obtained through the following formula: ; Wherein, ConfRj represents the confidence score of the j-th defect region Rj in the defect region RX, k represents the total number of defect classification categories, Cj represents the defect category, represents the probability that the i-th defect sample feature in the defect feature set Fd belongs to the defect category Cj, represents the preset weight value of the category; The filtered defect classification set Cfid is obtained through the following formula: Cfid = {Rj ∈ Cd | ConfRj ≥ Tcon}.
7. A defect detection system for plastic packaging products according to claim 6, characterized in that: The post-processing correction and sorting unit corrects and sorts the filtered defect classification set Cfid after confidence screening; The correction includes verifying the reliability of the defects through a post-processing algorithm twice and sorting them according to the severity score Sev of the defects; The secondary verification includes judging whether the defect is a real defect according to whether the shape, size and texture features of the defect meet the standards; The severity sorting calculates the severity score Sev of the defect according to the matching degree M and the confidence score ConfR, and sorts them according to, and obtains the sorted classification set Csod; For the defect area Rj, the matching degree M is defined; The matching degree M is obtained through the following formula: ; Wherein, M(Rj) represents the matching degree score of the defect area Rj, respectively represent the preset weight values of the shape feature and the size feature, Aj represents the actual area of the defect area Rj, and Aavg represents the average area of the detected defects, represents the similarity between the shape Sj of the defect area Rj and the standard shape Sstd; The severity score Sev is obtained through the following formula: ; In the formula, Sev(Rj) represents the severity score of the defect area Rj; The sorted classification set Csod is obtained through the following formula: ; ; In the formula, n represents the total number of defect areas.
8. A flaw detection system for plastic packaging products according to claim 1, characterized in that: The feedback and adaptive adjustment module includes a detection feedback analysis unit and an adaptive parameter adjustment unit; The detection feedback analysis unit analyzes the detected defect information, including detection accuracy Acc, false positive rate FPR and false negative rate FNR, and summarizes and statistics them; The detection accuracy Acc is obtained through the following formula: ; In the formula, TP represents the number of real defects correctly detected as defects; TN represents the number of defect-free areas correctly detected as defect-free; FP represents the number of defect-free areas misdetected as defects; FN represents the number of real defects missed; The false positive rate FPR is obtained through the following formula: ; The false negative rate FNR is obtained through the following formula: 。 9. A defect detection system for plastic packaging products according to claim 8, characterized in that: The adaptive parameter adjustment unit adjusts the weighting coefficient of the feature fusion technology based on the obtained severity score Sev to obtain the preset weight values of the new infrared edge image data FR(x, y), the new ultraviolet edge image data FU(x, y), and the new visible light edge image data FV(x, y) and brings them back into the formula to re-obtain the unified image set Ifu(x, y); The preset weight value of the new infrared edge image data FR(x, y) is obtained by the following formula: ; In the formula, NSev represents the total severity score, and λ represents the adjustment coefficient; Preset weight value of new ultraviolet edge image data FU(x, y) Obtained through the following formula: ; Preset weight value of the new visible light edge image data FV(x, y) Obtained by the following formula: 。 10. A method for detecting defects in plastic packaging products, applied to a system for detecting defects in plastic packaging products according to any one of claims 1 to 9, characterized in that: It includes the following steps: Step 1: The data acquisition and preprocessing module collects data in different modes through sensors installed on the production line, including infrared image data IR(x, y), ultraviolet image data IU(x, y) and visible light image data IV(x, y), and performs preprocessing to obtain enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y) and enhanced visible light image data IVg(x, y); Step 2: The multi-modal data fusion module fuses the enhanced infrared image data IRg(x, y), enhanced ultraviolet image data IUg(x, y) and enhanced visible light image data IVg(x, y) by using feature fusion technology to form a unified image set Ifu(x, y); Step 3: The defect area identification and localization module processes the image set Ifu(x, y) using image segmentation algorithms and edge detection algorithms to identify the defect area RX; Step 4: The defect classification and analysis module extracts features from the defect area RX, including the shape, size, and texture features of the defect, to form a defect feature set Cd, and classifies the defect area RX through the defect feature set to obtain a defect classification set Cd; Step 5: The detection result post-processing and optimization module post-processes the defect classification set Cd, adjusts the detection accuracy, and performs secondary verification on the detected defects through the confidence weighting method and the post-processing correction algorithm, and calculates and obtains the severity score Sev of the defects; Step 6: The feedback and adaptive adjustment module analyzes and feedbacks on the detected defects, and adjusts the preset weight value of the feature fusion technology through the obtained severity score Sev, thereby adjusting the accuracy of defect detection.
Citation Information
Cited By
Substation equipment state real-time monitoring method
CN120747058A