Training method and system of diffusion plate defect detection model and medium
By extracting surface defect features and positioning internal defects on the diffusion plate monitoring image, combined with spectral analysis and three-dimensional morphology analysis, the problems of low efficiency and insufficient accuracy of diffusion plate defect detection in the prior art are solved, and more comprehensive and accurate defect detection is achieved, and detection efficiency is improved.
Patent Information
- Application Number
- CN202510386400.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing diffusion plate defect detection methods are inefficient, have low accuracy, and lack a comprehensive understanding of the coupling relationship between surface and internal defects, resulting in a low comprehensiveness of the detection model.
By extracting surface defect features and analyzing defect type on the diffusion plate monitoring image, combining spectral parameter settings and transmittance difference analysis, internal defect areas are located, and three-dimensional defect morphology is performed. At the same time, the defect diffusion probability is calculated through defect correlation analysis, the defect risk level is evaluated, and the model is finally trained based on high defect risk data to generate a diffusion plate defect detection model.
It improves the comprehensiveness and accuracy of the detection of defect detection models, enhances the ability to identify defects on the surface and internal defects of the diffuser plate, effectively evaluates potential risk areas, and improves detection efficiency and accuracy.
Smart Images

Figure CN119904455A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a training method, system and medium for a diffusion plate defect detection model. Background Art
[0002] Early diffuser plate defect detection methods mostly relied on manual visual inspection or simple image processing technology. These methods are not only inefficient, but also easily affected by human factors and have low accuracy. With the development of computer vision and image processing technology, image-based automatic defect detection methods have gradually emerged. Using traditional image processing methods such as edge detection, template matching, and threshold segmentation, some common defects can be detected relatively preliminarily, but these methods have limited detection effects on complex defects or low-contrast defects. The rapid development of deep learning technology has brought revolutionary changes to diffuser plate defect detection. Deep learning models such as convolutional neural networks (CNNs) have achieved remarkable results in image classification and target detection with their powerful feature extraction capabilities. However, current existing technologies often rely only on a single defect type analysis, lack a comprehensive understanding of the coupling relationship between surface and internal defects, and rarely conduct systematic assessments of defect risks, which leads to low comprehensiveness of the detection model. Summary of the invention
[0003] Based on this, it is necessary to provide a training method, system and medium for a diffusion plate defect detection model to solve at least one of the above technical problems.
[0004] To achieve the above object, a method for training a diffusion plate defect detection model is provided, the method comprising the following steps: Step S1: extracting surface defect features from the diffuser plate monitoring image; analyzing defect types based on the surface defect features to obtain defect type data; Step S2: setting spectral parameters according to the defect type data, and performing transmittance difference analysis on the diffuser plate monitoring image through the set spectral parameters to locate the internal defect area of the diffuser plate monitoring image; performing three-dimensional defect morphology analysis on the internal defect area to generate internal defect data; Step S3: performing defect correlation analysis on the surface defect data and the internal defect data, calculating the defect diffusion probability of the diffusion plate monitoring image; marking the defect risk level of the diffusion plate monitoring image according to the defect diffusion probability; Step S4: screening high defect risk levels based on a preset risk threshold; and performing corresponding image region segmentation on the diffuser plate monitoring image with a high defect risk level to perform model training and generate a diffuser plate defect detection model.
[0005] The present invention can effectively identify potential problem areas in the image by extracting surface defect features and performing defect type analysis on the monitoring image of the diffusion plate, and provide accurate defect type data for subsequent processing. According to the defect type data, the spectral parameters are set to perform transmittance difference analysis, and the internal defects in the image are located by generating a transmission feature spectrum, so that the defect area inside the diffusion plate can be accurately identified, which can provide more in-depth defect information and provide data support for subsequent three-dimensional morphology analysis and optimization design. Defect correlation analysis of surface defects and internal defect data can reveal the coupling relationship between different defects. By calculating the probability of defect diffusion and performing risk level assessment on the image, the potential risk area can be effectively assessed to help decision makers to prevent and maintain risks in a timely manner. Based on the screening and regional segmentation of high defect risk data, it can help to focus on the analysis of high risk areas. At the same time, based on these data, model training can generate a high-precision defect detection model, which can greatly improve the automation level of diffusion plate defect detection, reduce human errors, and improve detection efficiency and accuracy. Therefore, the present invention improves the comprehensiveness and accuracy of the defect detection model by combining surface and internal defect analysis, defect coupling relationship, risk assessment and regional segmentation.
[0006] Preferably, step S1 comprises the following steps: Step S11: acquiring a diffuser plate monitoring image, and performing image preprocessing on the diffuser plate monitoring image to generate a standard diffuser plate monitoring image, wherein the image preprocessing includes denoising, contrast enhancement, and grayscale standardization; Step S12: performing edge detection on the standard diffuser plate monitoring image to generate edge feature data; Step S13: performing surface scratch detection on the diffuser plate monitoring image based on the edge feature data to obtain scratch distribution data; Step S14: performing texture analysis on the standard diffuser plate monitoring image, and extracting texture abnormality areas in the standard diffuser plate monitoring image based on the result of the texture analysis to generate texture defect data; Step S15: Integrate the scratch distribution data and the texture defect data into surface defect data; classify the surface defect data by defect type label to obtain defect type data, wherein the defect type data includes bubble defect type data, crack defect type data and impurity defect type data.
[0007] The present invention can significantly improve the quality of the diffuser plate monitoring image through image preprocessing of denoising, contrast enhancement and grayscale standardization, which provides clearer and standardized input data for subsequent analysis and ensures the accuracy and reliability of further operations. By generating edge feature data through edge detection and combining scratch detection, the scratch distribution on the surface of the diffuser plate can be accurately identified. This step can effectively distinguish the fine scratches on the surface of the diffuser plate and provide key information for subsequent defect analysis. Texture analysis helps to find abnormal areas in the image caused by uneven materials or surface problems. The texture defect data extracted based on this can help identify imperceptible defects, such as local material fatigue, surface unevenness caused by scratches, etc., thereby improving the comprehensiveness and accuracy of detection. By integrating scratch distribution data and texture defect data into surface defect data, the defect status of the diffuser plate surface can be fully reflected. Further labeling and classifying defect types (bubbles, cracks, impurities, etc.) can not only refine the identification of different types of defects, but also provide a specific basis for subsequent risk assessment and repair work. The extraction of defect type data enables more accurate positioning and analysis of different types of defect problems, providing data support for subsequent targeted processing and optimization. Especially in complex industrial applications, different defect types correspond to different processing methods. Through this precise classification, the processing efficiency and effect can be greatly improved.
[0008] Preferably, the setting of the spectrum wavelength according to the defect type data in step S2 includes: When the defect type data is confirmed to be bubble defect type data, set the spectrum wavelength to 800nm-1000nm, the spectrum bandwidth to 50nm-100nm, and the light source intensity to 100mW / cm²-200mW / cm²; When the defect type data is confirmed to be crack defect type data, the spectrum wavelength is set to 500nm-600nm, the spectrum bandwidth is set to 20nm-50nm, and the light source intensity is set to 50mW / cm²-150mW / cm²; When the defect type data is confirmed to be impurity defect type data, the spectrum wavelength is set to 350nm-450nm, the spectrum bandwidth is set to 10nm-30nm, and the light source intensity is set to 10mW / cm²-100mW / cm².
[0009] The present invention can ensure that the characteristics of each defect are optimally stimulated and responded to during the spectral analysis process by setting different spectral wavelengths, bandwidths, and light source intensities according to the defect type (bubbles, cracks, impurities). This targeted setting can greatly improve the sensitivity and accuracy of defect detection, avoid interference between different defect types, and ensure the identification accuracy of each defect type. By adjusting the spectral wavelength and bandwidth for different defect types, the detection capability of tiny defects can be improved. For example, the detection of crack defect types in the range of 500nm-600nm can better respond to the unique optical properties of cracks, while the setting of bubble defects in the range of 800nm-1000nm can accurately identify the reflection and transmission changes caused by bubbles. This meticulous wavelength adjustment helps to improve the sensitivity and resolution of the detection system, ensuring that even tiny defects can be captured. The optimized setting of light source intensity (such as 100mW / cm²-200mW / cm² for bubble defect type, 50mW / cm²-150mW / cm² for crack defect, etc.) can provide the best light intensity in the spectral analysis of different defects, avoiding excessive or weak light sources that lead to excessive saturation or insufficient signals, thereby ensuring the accuracy and stability of data acquisition. Such optimization not only improves the image quality, but also reduces light source consumption and system load, and improves the overall detection efficiency. The system has strong adaptability by dynamically adjusting according to defect type data. When faced with different types of diffuser plate defects, the system can automatically adjust the spectrum settings to meet the detection needs of different defects. This flexibility enhances the intelligence of the detection system, enabling it to maintain excellent performance under different circumstances.
[0010] Preferably, the step S2 of performing transmittance difference analysis on the diffuser plate monitoring image by using the set spectral parameters includes: Partition the diffuser plate monitoring image into regions of interest to obtain diffuser plate image regions; Extract pixel intensity values of the diffuser monitoring image under different spectral parameters; Calculate the transmittance changes of different diffuser image areas based on pixel intensity values to form a transmittance distribution matrix; Based on the transmittance distribution matrix, the transmittance characteristics of the diffuser plate image area are analyzed to identify the transmittance variation pattern; Construct a transmission characteristic curve according to the transmittance variation pattern, and extract the local extreme points of the curve; The local extreme points are used to screen the key transmittance change features of the diffuser plate monitoring image to obtain the transmittance feature map.
[0011] The present invention partitions the diffuser plate monitoring image into regions of interest so that the image analysis can focus on specific regions, thereby improving the processing efficiency and the accuracy of the analysis. This regionalized analysis can reduce the interference of irrelevant data and focus on the regions in the image where defects are most likely to occur, thereby improving the effectiveness of the overall detection. Extracting pixel intensity values under different spectral settings can provide detailed optical response data for each type of defect. This method can effectively reveal the changes in the transmission characteristics of the diffuser plate under different spectral conditions, thereby providing more defect clues, especially for small or difficult to directly observe defect types (such as bubbles, cracks, etc.). By calculating the transmittance changes in different regions and generating a transmittance distribution matrix, the transmittance characteristics of each region of the diffuser plate can be systematically described. This matrix provides detailed information on the changes in the transmission characteristics of the potential defective regions in the image, laying a data foundation for subsequent feature recognition and analysis. By analyzing the transmittance distribution matrix, the transmittance change pattern can be identified, which is crucial for accurately identifying the surface and internal defects of the diffuser plate. Different types of defects usually present specific transmission characteristic patterns. Through this pattern recognition, the image area can be quickly and accurately associated with the defect type. According to the transmittance change pattern, the transmission characteristic curve is constructed, and the local extreme points are extracted, so that the detection system can accurately identify the key nodes of the transmission characteristic change. The local extreme points often correspond to the edges or variation points of the defect area. Through these extreme points, the potential defect area can be efficiently located. Using local extreme points to screen the key transmittance change characteristics helps to extract the most representative and relevant transmission features from a large amount of image data. By accurately screening the features and finally forming a transmission feature map, it can provide an accurate visual basis for subsequent defect detection and reduce unnecessary noise and false detection.
[0012] Preferably, the positioning of the internal defect area of the diffuser plate monitoring image in step S2 includes: Based on the transmission characteristic spectrum, the abnormal transmission area of the diffuser plate monitoring image is segmented to obtain the abnormal transmission area; An initial binary mask is set for the abnormal transmission area, and the mask boundary of the initial binary mask is refined to obtain a binary boundary optimized mask; The connectivity of abnormal transmission areas is calculated using binary boundary optimization masks; Combine the connectivity of abnormal transmission areas and the transmission feature map to optimize the weight of the binary boundary optimization mask and generate refined defect mask data; The area, shape and perimeter of the abnormal transmission area are calculated by refining the defect mask data, and the position of the defect area is marked according to the area, shape and perimeter to generate the coordinates of the internal defect area.
[0013] The present invention can effectively extract the areas with abnormal transmittance from the image by segmenting the abnormal transmission area of the diffuser monitoring image based on the transmission characteristic spectrum. These areas usually correspond to the internal defects or surface irregularities of the diffuser. The segmented abnormal transmission area provides a clear target area for subsequent defect positioning and feature extraction, ensuring the efficiency and accuracy of detection. The initial binary mask setting for the abnormal transmission area and the refinement of its boundary can ensure that the regional boundary is more accurate. This boundary optimization process effectively removes the noise or error generated in the segmentation process, improves the quality of the mask, and thus provides a more accurate regional identification for subsequent defect analysis, which also reduces the possibility of wrong positioning and missed detection. By calculating the connectivity of the abnormal transmission area, multiple discontinuous defect areas or connected defect structures can be identified, which is crucial for detecting and distinguishing defects of different types or different parts, and helps to clearly identify the specific distribution and morphology of the defects, thereby improving the accuracy of defect recognition. The mask weight is optimized in combination with the connectivity of the abnormal transmission area and the transmission characteristic spectrum, so that the generation of the mask is more in line with the distribution of the actual defects. This dynamic optimization process can significantly improve the accuracy of the mask and ensure that the extraction of the defect area is more in line with the actual situation. The optimized mask makes the detection system more intelligent and can automatically adjust the detection strategy according to the actual situation. By calculating the area, shape, perimeter and other features of the abnormal transmission area through refined defect mask data, detailed geometric information can be provided for further analysis of the defect area. These geometric features can help determine the nature, size and shape of the defects, and provide rich data support for the classification, evaluation and subsequent processing of defects. The Bounding Box method is used to mark the defect area according to the area, shape and perimeter of the abnormal transmission area, and generate the coordinates of the internal defect area. This method can accurately determine the specific location of the defect and provide accurate reference data for subsequent automated detection, repair and optimization. The application of the Bounding Box method ensures the rapidity and high accuracy of defect area positioning.
[0014] Preferably, the three-dimensional defect morphology analysis of the internal defect area in step S2 includes: Performing optical coherence tomography scanning on the internal defect region based on the coordinates of the internal defect region to generate internal defect optical scanning data; Analyze the defect depth of the internal defect area based on the internal defect optical scanning data, and extract the light intensity characteristics of the internal defect optical scanning data; Calculate the light intensity attenuation curve of the internal defect area according to the defect depth and light intensity characteristics; The internal defect area is layered through the light intensity attenuation curve, and the three-dimensional point cloud of the layered internal defect area is reconstructed to generate three-dimensional defect morphology data; The volume, maximum depth and spatial distribution density of defects are calculated through three-dimensional defect morphology data and integrated into internal defect data.
[0015] The present invention can obtain high-resolution defect image data by performing optical coherence tomography (OCT) on the internal defect area. This process not only provides a two-dimensional surface image of the defect area, but also deeply analyzes the depth and layer of the defect, providing reliable data support for accurately identifying deep defects. Based on the light intensity feature analysis of the internal defect optical scanning data, information related to the defect depth can be further extracted. Light intensity attenuation is an important indicator for detecting the depth of internal defects. By analyzing the change of light intensity, detailed information about the location and depth of the defect can be obtained, thereby improving the detection ability of complex defects. By calculating the light intensity attenuation curve, the depth and distribution of the defect can be quantified more accurately. This method helps to further layer the internal defect area, thereby providing a basis for the three-dimensional modeling and further analysis of the defect. This process enhances the understanding of the internal structure of the defect and provides an effective basis for subsequent three-dimensional reconstruction. After the defect area is layered by the light intensity attenuation curve, the three-dimensional point cloud reconstruction technology can be used to achieve detailed three-dimensional modeling of the spatial geometric morphology of the defect, which not only enhances the visual understanding of the morphology of the defect area, but also provides more real and accurate three-dimensional morphological data, which is helpful for defect evaluation and the formulation of repair plans. By calculating the volume, maximum depth and spatial distribution density of defects through 3D defect morphology data, the severity and distribution characteristics of defects can be evaluated in detail. These data can help determine the impact of defects on the diffuser, thus providing a basis for subsequent quality control and optimization. The calculated defect volume and depth can also help predict its long-term impact on product performance. By integrating 3D defect morphology data, including defect volume, maximum depth and spatial distribution density, detailed internal defect data is ultimately generated. These data provide multi-dimensional information for defect classification, evaluation and subsequent processing, improving the efficiency of defect management and repair.
[0016] Preferably, step S3 comprises the following steps: Step S31: aligning the surface defect data and the internal defect data in regional space coordinates to obtain the overall defect alignment coordinates of the diffuser plate; Step S32: performing defect coupling association on the surface defect data and the internal defect data according to the overall defect alignment coordinates of the diffuser plate to generate a defect coupling relationship; Step S33: calculating the defect diffusion probability of the diffusion plate monitoring image based on the defect coupling relationship; Step S34: performing stress simulation on the diffuser plate monitoring image according to the defect diffusion probability to generate diffuser plate defect stress simulation data; Step S35: evaluating the defect risk level of the diffuser plate according to the defect stress simulation data and defect type data of the diffuser plate to generate defect risk data.
[0017] The present invention can realize the effective integration of two types of defect information by aligning the regional spatial coordinates of surface defect data and internal defect data. This coordinate alignment provides an accurate spatial basis for subsequent defect coupling and risk assessment, thereby improving the overall accuracy of defect identification. Through defect coupling association, the relationship between surface defects and internal defects can be revealed, helping to identify the existing associated defect areas. The analysis of defect coupling relationship provides an important basis for subsequent defect diffusion prediction and risk assessment, which helps to comprehensively evaluate the impact of defects in the diffuser. The defect diffusion probability calculation of the diffuser monitoring image can accurately predict the expansion path of the defect. Based on the defect diffusion probability, the risk points that will appear in the future can be better evaluated and preventive measures can be taken to effectively reduce the potential threat of defects to the performance of the diffuser. Through stress simulation of defect diffusion probability, the prediction accuracy of diffuser defects is further improved. Through stress simulation data, the stress effect of defects on materials can be quantified and the damage mode caused by them can be predicted. This analysis helps to identify key stress concentration areas and provide a scientific basis for repair and reinforcement solutions. By combining the stress simulation data of diffuser defects with the defect type data for risk level assessment, the degree of impact of defects on the diffuser can be comprehensively analyzed. By generating defect risk data, we can not only assess the severity of existing defects, but also predict potential risks in the future and provide data support for subsequent quality control and decision-making.
[0018] Preferably, step S35 includes the following steps: Step S351: determining a basic risk level according to the stress simulation data of the diffusion plate defect, wherein the stress simulation data is less than or equal to 50 MPa and is classified as low risk, the stress simulation data is between 50 MPa and 100 MPa and is classified as medium risk, and the stress simulation data exceeds 100 MPa and is classified as high risk; Step S352: determining risk weights based on the defect type data, wherein the weight of bubble defect type data in the defect type data is 1, the weight of crack defect type data is 2, and the weight of impurity defect type data is 3; Step S353: Calculate the risk level comprehensively through the basic risk level and risk weight to obtain defect risk data.
[0019] The present invention divides the basic risk level (low risk, medium risk, high risk) by stress simulation data, and provides a clear and intuitive risk classification standard. Through this classification, the severity of the defects of the diffusion plate can be quickly evaluated, and corresponding treatment measures can be taken to ensure that potential problems are discovered in time. The risk weight is determined according to the defect type data, and the different effects of different types of defects on the risk of the diffusion plate can be quantified. The different weight assignments of bubble defects, crack defects, and impurity defects help to fully consider the degree of danger of various defects in the risk assessment process, so that the potential threat of different defects to the performance of the diffusion plate can be more accurately reflected. The final defect risk level is calculated by combining the basic risk level and the risk weight, so that the evaluation result is more comprehensive and accurate. This comprehensive calculation process can better balance the risks of various defects and generate a comprehensive defect risk data, which helps decision makers to make targeted treatment. Through the clear risk level division, engineers can more accurately evaluate the risks of various defects of the diffusion plate, and formulate reasonable repair or improvement plans accordingly. For high-risk areas, more urgent repair measures are required, while monitoring and preventive measures can be taken for low-risk areas. Through this process, risk management can be optimized to ensure the long-term reliability of the diffusion plate. This process not only provides a basis for the evaluation of existing defects, but also predicts future risks. The comprehensively calculated defect risk data can provide a reference for risk management in the production and use of diffusion plates, so as to reasonably allocate resources, focus on high-risk areas, and ensure maximum safety and performance.
[0020] In this specification, a training system for a diffusion plate defect detection model is provided, which is used to execute the above-mentioned training method for the diffusion plate defect detection model. The training system for the diffusion plate defect detection model includes: The surface defect analysis module is used to extract the surface defect features of the diffuser plate monitoring image; perform defect type analysis based on the surface defect features to obtain defect type data; The internal defect analysis module is used to set spectral parameters according to defect type data, and perform transmittance difference analysis on the diffuser plate monitoring image through the set spectral parameters to locate the internal defect area of the diffuser plate monitoring image; perform three-dimensional defect morphology analysis on the internal defect area to generate internal defect data; The defect correlation module is used to perform defect correlation analysis on the surface defect data and the internal defect data, calculate the defect diffusion probability of the diffusion plate monitoring image, and annotate the defect risk level of the diffusion plate monitoring image according to the defect diffusion probability; The model training module is used to screen high defect risk levels based on a preset risk threshold; and perform corresponding image area segmentation on the diffusion plate monitoring image with a high defect risk level to perform model training and generate a diffusion plate defect detection model.
[0021] The present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the training method of the diffusion plate defect detection model is implemented.
[0022] The beneficial effect of the present invention is that the surface defect analysis module and the internal defect analysis module complement each other to ensure comprehensive detection of defects on the surface and inside of the diffuser plate. The feature extraction and defect type analysis of surface defects can help quickly identify the surface defect type (such as bubbles, cracks, etc.). The internal defect analysis further explores the internal defects of the diffuser plate through transmittance difference analysis and three-dimensional defect morphology analysis, and provides more comprehensive defect data support. The internal defect analysis module can accurately locate the internal defect area in the diffuser plate monitoring image and generate detailed defect data through the combination of transmission feature map and three-dimensional defect morphology data. This refined defect positioning and classification provides a reliable basis for subsequent risk assessment and repair. The defect association module can reveal the relationship between surface defects and internal defects through the coupling analysis of surface defects and internal defect data, and further calculate the defect diffusion probability of the diffuser plate. This process provides important input for risk assessment. The defect risk level of the diffuser plate is evaluated through the defect diffusion probability, which helps to judge the potential impact of defects on the overall performance of the diffuser plate. Based on the defect risk data, the model training module can screen out high defect risk data according to the preset risk threshold, perform regional segmentation on it and train the detection model. Through this model, efficient detection and prediction of high-risk areas can be achieved, thereby achieving more accurate risk control. Timely discovery and treatment of high-risk areas can greatly reduce the failure rate caused by defects and improve the long-term reliability of the diffuser. Therefore, the present invention improves the comprehensiveness and accuracy of the defect detection model by combining surface and internal defect analysis, defect coupling relationship, risk assessment and regional segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of the steps of a training method for a diffusion plate defect detection model; Figure 2 for Figure 1 Detailed implementation steps of step S1 in FIG. Figure 3 for Figure 1 Detailed implementation steps of step S3 in FIG. The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0024] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0025] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0026] It should be understood that although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, and the term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0027] To achieve this, please refer to Figures 1 to 3 , a training method for a diffusion plate defect detection model, the method comprising the following steps: Step S1: extracting surface defect features from the diffuser plate monitoring image; analyzing defect types based on the surface defect features to obtain defect type data; Step S2: setting spectral parameters according to the defect type data, and performing transmittance difference analysis on the diffuser plate monitoring image through the set spectral parameters to locate the internal defect area of the diffuser plate monitoring image; performing three-dimensional defect morphology analysis on the internal defect area to generate internal defect data; Step S3: performing defect correlation analysis on the surface defect data and the internal defect data, calculating the defect diffusion probability of the diffusion plate monitoring image; marking the defect risk level of the diffusion plate monitoring image according to the defect diffusion probability; Step S4: screening high defect risk levels based on a preset risk threshold; and performing corresponding image region segmentation on the diffuser plate monitoring image with a high defect risk level to perform model training and generate a diffuser plate defect detection model.
[0028] The present invention can effectively identify potential problem areas in the image by extracting surface defect features and performing defect type analysis on the monitoring image of the diffusion plate, and provide accurate defect type data for subsequent processing. According to the defect type data, the spectral parameters are set to perform transmittance difference analysis, and the internal defects in the image are located by generating a transmission feature spectrum, so that the defect area inside the diffusion plate can be accurately identified, which can provide more in-depth defect information and provide data support for subsequent three-dimensional morphology analysis and optimization design. Defect correlation analysis of surface defects and internal defect data can reveal the coupling relationship between different defects. By calculating the probability of defect diffusion and performing risk level assessment on the image, the potential risk area can be effectively assessed to help decision makers to prevent and maintain risks in a timely manner. Based on the screening and regional segmentation of high defect risk data, it can help to focus on the analysis of high risk areas. At the same time, based on these data, model training can generate a high-precision defect detection model, which can greatly improve the automation level of diffusion plate defect detection, reduce human errors, and improve detection efficiency and accuracy. Therefore, the present invention improves the comprehensiveness and accuracy of the defect detection model by combining surface and internal defect analysis, defect coupling relationship, risk assessment and regional segmentation.
[0029] In the embodiment of the present invention, reference Figure 1 FIG. 1 is a schematic flow chart of the steps of a method for training a diffusion plate defect detection model according to the present invention. In this example, the method for training a diffusion plate defect detection model includes the following steps: Step S1: extracting surface defect features from the diffuser plate monitoring image; analyzing defect types based on the surface defect features to obtain defect type data; In an embodiment of the present invention, an industrial camera with a resolution of 50 million pixels is used to obtain a monitoring image of the diffusion plate. An LED ring light source is used during image acquisition to ensure uniform illumination and avoid interference from highlights or shadows. The resolution of image acquisition is set to 300 DPI to ensure sufficient detail capture. Next, image preprocessing techniques such as Gaussian blur (standard deviation set to 1.5) denoising and histogram equalization are applied to enhance image contrast and make defects more prominent. Image segmentation is performed using the Canny edge detection algorithm, with a low threshold of 50 and a high threshold of 150 set to accurately extract defect edges. For morphological analysis of defect areas, the extracted geometric features include the area of the defect (unit: square millimeter), edge length (unit: millimeter), circularity, aspect ratio, etc. Texture features include mean, variance, entropy, and contrast, all of which are calculated using the gray level co-occurrence matrix (GLCM), with the window size set to 5×5 and the step size set to 1. These feature data are organized into structured data sets, stored as CSV files, and saved in a MySQL database. Then, support vector machine (SVM) was used for defect classification, using radial basis kernel function (RBF), C parameter was set to 1, γ parameter was set to 0.1, and cross validation was performed to optimize the model. The extracted defect data was classified by this model, and different types of defects such as cracks, scratches, pits, etc. were finally identified.
[0030] Step S2: setting spectral parameters according to the defect type data, and performing transmittance difference analysis on the diffuser plate monitoring image through the set spectral parameters to locate the internal defect area of the diffuser plate monitoring image; performing three-dimensional defect morphology analysis on the internal defect area to generate internal defect data; In the embodiment of the present invention, the defect type data obtained in step S1 is analyzed by selecting a suitable spectral band. For example, for crack defects, near-infrared spectrum is used to enhance boundary contrast; for scratches, visible spectrum is used to enhance surface reflection characteristics; for bubbles, short-wave infrared spectrum is used to enhance internal transmittance differences; for impurities, ultraviolet spectrum is used to identify organic or inorganic particles. In the process of spectrum acquisition, a hyperspectral imaging device is used, the resolution is set to 1024×1024, covering the spectral range from ultraviolet to short-wave infrared, and the exposure time is adjusted between 10 milliseconds and 100 milliseconds to adapt to the transmittance characteristics of different materials. At the same time, the normalization correction method is used to eliminate the influence of light source non-uniformity, and the adaptive median filter is applied to remove noise to improve the accuracy of transmittance calculation. When analyzing the transmittance difference, the transmittance of the diffuser at different wavelengths is calculated, and the transmittance characteristic spectrum is generated based on the spectral change. Subsequently, the abnormal transmittance area is identified by a statistical analysis method, and the boundary coordinates of the internal defect area are accurately extracted by an adaptive threshold segmentation algorithm. In the defect morphology analysis stage, multi-angle imaging technology is combined to obtain defect depth information, and the optical phase recovery method is used to estimate the three-dimensional morphology of the defect. Finally, high-precision three-dimensional point cloud data is generated through structured light projection technology, and a complete three-dimensional defect morphology model is generated using advanced reconstruction algorithms. All analysis results, including the coordinates, type, transmittance characteristics and depth information of the defect, are stored in a standardized format, and the transmission characteristic thermal map and three-dimensional morphology map are generated through visualization technology.
[0031] Step S3: performing defect correlation analysis on the surface defect data and the internal defect data, calculating the defect diffusion probability of the diffusion plate monitoring image; marking the defect risk level of the diffusion plate monitoring image according to the defect diffusion probability; In an embodiment of the present invention, by matching and analyzing the surface defect data and the internal defect data, the spatial distribution, size characteristics and morphological characteristics of the defects are used to identify the correlation between the surface defects and the internal defects, thereby establishing a defect coupling model. In the analysis process, the coupling modes of different types of defects are determined based on historical defect data and statistical learning methods. For example, surface cracks are related to the stress concentration area of the internal structure, surface scratches are coupled with microscopic defects inside the material, and bubbles and impurities show multi-level defect distribution characteristics. After obtaining the defect coupling relationship, the defect diffusion probability of the diffusion plate in different areas is calculated based on the spatial distribution characteristics and evolution trend of the defects, which takes into account the initial characteristics of the defects, material thickness, stress distribution and environmental factors. Subsequently, according to the defect diffusion probability, combined with the existing defect classification standards, a risk assessment model is constructed to divide the defects of the diffusion plate into low risk, medium risk and high risk levels. In the risk assessment process, the type, distribution density, diffusion trend and impact range of the defects are comprehensively considered to ensure the accuracy and interpretability of the assessment results. Finally, the calculated defect diffusion probability and risk level data are stored in a standardized manner.
[0032] Step S4: Screening high defect risk levels based on a preset risk threshold; and performing corresponding image area segmentation on the diffusion plate monitoring image with a high defect risk level to perform model training and generate a diffusion plate defect detection model. In an embodiment of the present invention, by setting a threshold for defect risk assessment, the defect areas with higher risk levels are screened out according to the defect risk data obtained in the previous step. For example, the area with a risk value exceeding 80% is defined as a high defect risk area to ensure that the model training focuses on the key defect area. Subsequently, the screened high defect risk area is accurately segmented in the diffusion plate monitoring image, and an adaptive region growing algorithm or a semantic segmentation algorithm based on deep learning is used to improve the segmentation accuracy and ensure that only actual defect information is included without being affected by background noise. In the data preprocessing stage, the segmented defect areas are standardized, including size normalization, contrast enhancement, noise removal, etc., to optimize the quality of training data. In the model training stage, a deep learning network, such as a defect detection model based on U-Net or Mask R-CNN, is constructed, and the data of the high-risk defect area is used for training to improve the model's ability to identify key defects. During the training process, an enhanced data set is used, including different lighting conditions, rotation angles, scale changes, etc., to enhance the generalization ability of the model. At the same time, a supervised learning method is used to combine expert-annotated data for classification optimization to ensure that the model can accurately distinguish defect types and improve the recognition accuracy of complex defect morphologies. After the training is completed, the test data set is used for verification to evaluate the accuracy, recall rate, and F1-score of the model, and iterative optimization is performed on the misjudged areas. Finally, a high-precision diffuser plate defect detection model is generated.
[0033] As an example of the present invention, refer to Figure 2 As shown, in this example, step S1 includes: Step S11: acquiring a diffuser plate monitoring image, and performing image preprocessing on the diffuser plate monitoring image to generate a standard diffuser plate monitoring image, wherein the image preprocessing includes denoising, contrast enhancement, and grayscale standardization; Step S12: performing edge detection on the standard diffuser plate monitoring image to generate edge feature data; Step S13: performing surface scratch detection on the diffuser plate monitoring image based on the edge feature data to obtain scratch distribution data; Step S14: performing texture analysis on the standard diffuser plate monitoring image, and extracting texture abnormality areas in the standard diffuser plate monitoring image based on the result of the texture analysis to generate texture defect data; Step S15: Integrate the scratch distribution data and the texture defect data into surface defect data; classify the surface defect data by defect type label to obtain defect type data, wherein the defect type data includes bubble defect type data, crack defect type data and impurity defect type data.
[0034] In the embodiment of the present invention, a high-resolution industrial camera (resolution ≥ 12 million pixels) is used to collect the surface image of the diffuser under uniform illumination conditions to ensure image clarity. Gaussian filtering (σ=1.5) is used to denoise the image to reduce random noise in the image. The histogram equalization method is used to enhance the image contrast and improve the visibility of image details. The image is converted into a grayscale image and grayscale normalization is performed so that the grayscale value range is standardized to 0-255. The Canny edge detection algorithm (low threshold = 50, high threshold = 150) is used to perform edge detection on the standard diffuser monitoring image to extract edge information in the image. The detected edge information is converted into edge feature data, including the coordinates, direction and intensity of the edge point. The straight line segments in the image are detected by Hough transform, and surface scratches are identified in combination with the edge feature data. The position, length and direction information of the scratches are recorded to generate scratch distribution data. The gray level co-occurrence matrix (GLCM) method is used to perform texture analysis on the standard diffuser monitoring image to calculate the image's contrast, energy, entropy and other texture features. The texture abnormality area is identified by setting the threshold (contrast>0.2, energy<0.5, entropy>1.5). The location, area and texture characteristics of the texture abnormality area are recorded to generate texture defect data. The scratch distribution data and texture defect data are integrated into surface defect data, including the location, area, type and other information of the defect. The support vector machine (SVM) classifier is used to classify the surface defect data, and the classification threshold (bubble defect: area>10mm², crack defect: length>5mm, impurity defect: area>2mm²) is set to generate defect type data, including bubble defect type data, crack defect type data and impurity defect type data.
[0035] Preferably, the setting of the spectrum wavelength according to the defect type data in step S2 includes: When the defect type data is confirmed to be bubble defect type data, set the spectrum wavelength to 800nm-1000nm, the spectrum bandwidth to 50nm-100nm, and the light source intensity to 100mW / cm²-200mW / cm²; When the defect type data is confirmed to be crack defect type data, the spectrum wavelength is set to 500nm-600nm, the spectrum bandwidth is set to 20nm-50nm, and the light source intensity is set to 50mW / cm²-150mW / cm²; When the defect type data is confirmed to be impurity defect type data, the spectrum wavelength is set to 350nm-450nm, the spectrum bandwidth is set to 10nm-30nm, and the light source intensity is set to 10mW / cm²-100mW / cm².
[0036] In an embodiment of the present invention, a defect image of the surface of the object to be tested is obtained by high-resolution optical imaging or other surface detection methods. An image processing algorithm (such as edge detection, morphological analysis, deep learning model, etc.) is used to identify the defect type and generate defect type data. According to the defect type data, a suitable spectral wavelength, spectral bandwidth and light source intensity are selected to optimize the detection conditions. When the defect type data indicates that the defect is a bubble defect, near-infrared spectroscopy is used for detection to improve the imaging contrast of bubbles inside transparent materials. Spectral wavelength range: 800nm-1000nm spectral bandwidth: 50nm-100nm, light source intensity: 100mW / cm²-200mW / cm², because this wavelength range can effectively penetrate the transparent medium, enhance the optical contrast between bubbles and the background, and make the bubble structure clearly visible. When the defect type data indicates that the defect is a crack defect, the visible light spectrum (green band) is used for detection to enhance the appearance of the crack boundary. Spectral wavelength range: 500nm-600nm, spectral bandwidth: 20nm-50nm, light source intensity: 50mW / cm²-150mW / cm², because this wavelength range has high scattering and absorption characteristics for microcracks on the surface of the material, which helps to highlight the structural characteristics of the cracks and improve the detection accuracy. When the defect type data indicates that the defect is an impurity defect, ultraviolet spectroscopy is used for detection to excite impurity fluorescence or enhance the absorption contrast of impurities to light. Spectral wavelength range: 350nm-450nm, spectral bandwidth: 10nm-30nm, light source intensity: 10mW / cm²-100mW / cm², because this wavelength range can effectively excite the optical response of organic or inorganic impurities, improve detection sensitivity, and make impurity particles more prominent in the detection image. According to the selected spectral parameters, the light source module (such as LED, laser or fluorescent lamp) is controlled to match the set wavelength, bandwidth and light intensity. The adjustable light source system is used to flexibly adjust the spectral wavelength and bandwidth to adapt to different materials and detection environments.
[0037] Preferably, the step S2 of performing transmittance difference analysis on the diffuser plate monitoring image by using the set spectral parameters includes: Partition the diffuser plate monitoring image into regions of interest to obtain diffuser plate image regions; Extract pixel intensity values of the diffuser monitoring image under different spectral parameters; Calculate the transmittance changes of different diffuser image areas based on pixel intensity values to form a transmittance distribution matrix; Based on the transmittance distribution matrix, the transmittance characteristics of the diffuser plate image area are analyzed to identify the transmittance variation pattern; Construct a transmission characteristic curve according to the transmittance variation pattern, and extract the local extreme points of the curve; The local extreme points are used to screen the key transmittance change features of the diffuser plate monitoring image to obtain the transmittance feature map.
[0038] In an embodiment of the present invention, the diffuser plate monitoring image is partitioned into a number of regions of interest (ROIs), each of which is 10×10 pixels in size. An image segmentation algorithm (such as K-means clustering) is used to partition the diffuser plate image to ensure that each region contains uniform surface features. The pixel intensity values of the diffuser plate monitoring image are collected under different spectral parameters (such as wavelength, bandwidth, and light source intensity). A spectral imaging device is used to obtain the pixel intensity values of each region of interest under different spectral conditions and record them as an intensity matrix. Based on the pixel intensity values, the transmittance change of each region of interest is calculated. The transmittance calculation formula is: ;in, is the transmitted light intensity, is the incident light intensity. The transmittance changes in each area of interest are recorded as a transmittance distribution matrix. The transmittance distribution matrix is statistically analyzed to identify the transmittance change patterns in different areas. The principal component analysis (PCA) method is used to extract the main features of the transmittance changes and identify the abnormal transmittance areas. According to the transmittance change pattern, a transmission characteristic curve is constructed. The horizontal axis of the transmission characteristic curve is the spectral wavelength and the vertical axis is the transmittance value. The transmission characteristic curve is differentiated to extract the local extreme points (maximum and minimum) of the curve. The peak detection algorithm (such as the Savitzky-Golay filter) is used to accurately extract the local extreme points. The local extreme points are used to screen the key transmittance change features. The screened features are recorded as a transmission feature map for subsequent defect classification and location.
[0039] It is particularly important to analyze the transmission characteristics of the diffuser image area based on the transmittance distribution matrix, including: Based on the transmittance distribution matrix, statistical features of the diffuser plate image area are extracted to obtain transmittance statistical features of the diffuser plate area, wherein the statistical feature extraction includes mean, variance, windage and sliding window; Perform fast Fourier transform on the transmission statistical characteristics of the diffuser area to obtain the spatial frequency domain distribution data of the diffuser transmission; calculate the radial power spectrum density of the spatial frequency domain distribution data of the diffuser transmission to generate a frequency domain pseudo-color image; According to the frequency domain pseudo-color image, the abnormal transmission area of the diffusion plate image area is identified, and the main variation mode of the transmission field of the abnormal transmission area is extracted to obtain the transmission field mode data; The transmittance distribution of the diffuser plate image area is predicted using the transmittance field pattern data to generate a transmittance variation pattern.
[0040] In an embodiment of the present invention, a diffuser is photographed by a high-resolution image acquisition device, and the acquired image is preprocessed, including grayscale normalization, noise filtering, and edge sharpening, to ensure the accuracy and consistency of the transmittance data. Subsequently, the preprocessed transmittance image is subjected to local feature analysis, and a sliding window technique is used to gradually slide a fixed-size window (e.g., 3×3, 5×5, or 7×7) in the entire diffuser area, and the statistical features of the local transmittance are calculated in each window, including the mean, variance, skewness, and kurtosis. Among them, the mean is used to characterize the overall transmittance level of the local area, the variance is used to measure the degree of fluctuation of the transmittance, the skewness reflects the symmetry of the transmittance distribution, and the kurtosis is used to analyze the concentration of the transmittance. Through these statistical features, the uniformity of the transmittance of the diffuser area can be preliminarily judged, and the area with abnormalities can be screened out. The extracted transmittance statistical features are analyzed in the frequency domain. Fast Fourier transform is used to convert the transmittance data from the spatial domain to the frequency domain to analyze the periodic changes in the transmittance characteristics of the diffuser. In this process, the amplitude spectrum is calculated and logarithmic amplitude transformation is performed to enhance the frequency characteristics of low-contrast areas. Subsequently, the radial power spectral density is calculated to quantify the energy distribution at each spatial frequency, and then the power spectral density data is visualized by pseudo-color mapping method to generate frequency domain pseudo-color images to intuitively present the transmission characteristics of the diffuser in different frequency ranges. Based on the generated frequency domain pseudo-color images, the abnormal transmission area is further identified. First, the abnormal threshold of the transmittance statistical characteristics is set. For example, when the mean of the local area is lower than a certain threshold, or the variance is higher than a certain level, it can be considered that there is a transmission anomaly in the area. At the same time, based on the frequency domain analysis, high-energy areas within a specific frequency range are extracted to identify transmission anomalies caused by material structure changes or contamination. Subsequently, the connected region analysis method is used to detect the contours of the abnormal area, and the abnormal transmission area is separated from the background area by combining the region growing algorithm or the threshold segmentation algorithm. For the identified abnormal area, its main variation mode is further extracted, and the data of the abnormal area is reduced in dimension by principal component analysis or independent component analysis to extract the most important transmittance change mode for subsequent analysis and modeling. After the abnormal transmission area is identified and the features are extracted, the transmittance distribution of the diffuser area is predicted using the transmission field main variation mode data. First, a prediction model is trained based on historical transmittance data. The model can use a Gaussian mixture model, a deep neural network (such as a convolutional neural network or U-Net), or other machine learning methods to establish a mapping relationship between transmittance and its main variation mode. After the training is completed, the current transmittance data is input to predict the future transmittance change trend. In addition, the time series analysis method can be used to model the time-varying characteristics of the transmittance and infer the transmittance change trend of the diffuser material after long-term use.On the other hand, a higher resolution transmittance variation map is generated through spatial interpolation technology to further analyze the variation pattern of transmittance with spatial distribution. Ultimately, the generated transmittance variation pattern can be used to evaluate the quality stability of the diffuser, analyze its uniformity, predict the transmission performance attenuation, and provide a scientific basis for material optimization and quality control.
[0041] Preferably, the positioning of the internal defect area of the diffuser plate monitoring image in step S2 includes: Based on the transmission characteristic spectrum, the abnormal transmission area of the diffuser plate monitoring image is segmented to obtain the abnormal transmission area; An initial binary mask is set for the abnormal transmission area, and the mask boundary of the initial binary mask is refined to obtain a binary boundary optimized mask; The connectivity of abnormal transmission areas is calculated using binary boundary optimization masks; Combine the connectivity of abnormal transmission areas and the transmission feature map to optimize the weight of the binary boundary optimization mask and generate refined defect mask data; The area, shape and perimeter of the abnormal transmission area are calculated by refining the defect mask data, and the position of the defect area is marked according to the area, shape and perimeter to generate the coordinates of the internal defect area.
[0042] In the embodiment of the present invention, the abnormal transmission area of the diffuser monitoring image is segmented based on the transmission characteristic spectrum, the abnormal transmission area in the transmission characteristic spectrum is separated from the normal area by using a threshold segmentation method (such as the Otsu algorithm), the pixel coordinates of the abnormal transmission area are recorded, and the initial abnormal transmission area is generated. The initial binary mask is set for the abnormal transmission area, the pixel value of the abnormal transmission area is set to 1, and the pixel value of the normal area is set to 0, and an initial binary mask matrix is generated. The initial binary mask is subjected to boundary refinement processing, the mask boundary is optimized by using morphological operations (such as corrosion and expansion), the mask boundary is refined by using the Guo-Hall refinement algorithm, and a binary boundary optimized mask is generated. The connectivity of the abnormal transmission area is calculated by using the binary boundary optimized mask, the connectivity analysis of the abnormal transmission area is performed by using the 8-connected region marking algorithm, and the pixel coordinates of each connected area are recorded. In combination with the connectivity of the abnormal transmission area and the transmission characteristic spectrum, the weight of the binary boundary optimized mask is optimized, and the mask weight is adjusted by using the weighted average method to generate refined defect mask data. The area, shape, and perimeter of the abnormal transmission area are calculated by refining the defect mask data, and the area, shape (such as circularity) and perimeter of each abnormal transmission area are calculated using an image processing library (such as OpenCV). The Bounding Box method is used to mark the position of the defect area according to the area, shape, and perimeter, and the minimum circumscribed rectangle (BoundingBox) is drawn for each abnormal transmission area, and the coordinates of the rectangle vertices are recorded to generate the coordinates of the internal defect area.
[0043] Preferably, the three-dimensional defect morphology analysis of the internal defect area in step S2 includes: Performing optical coherence tomography scanning on the internal defect region based on the coordinates of the internal defect region to generate internal defect optical scanning data; Analyze the defect depth of the internal defect area based on the internal defect optical scanning data, and extract the light intensity characteristics of the internal defect optical scanning data; Calculate the light intensity attenuation curve of the internal defect area according to the defect depth and light intensity characteristics; The internal defect area is layered through the light intensity attenuation curve, and the three-dimensional point cloud of the layered internal defect area is reconstructed to generate three-dimensional defect morphology data; The volume, maximum depth and spatial distribution density of defects are calculated through three-dimensional defect morphology data and integrated into internal defect data.
[0044] In the embodiment of the present invention, an optical coherence tomography (OCT) scanner is used to scan the internal defect area based on the coordinates of the internal defect area, and the OCT scanning parameters are set: the central wavelength is 1300nm, the scanning depth is 2mm, and the resolution is 10μm, and the internal defect optical scanning data including the light intensity distribution and depth information are generated. Based on the internal defect optical scanning data, the defect depth of the internal defect area is analyzed, and the light intensity characteristics are extracted, including the maximum light intensity value, the average light intensity value and the light intensity distribution curve. According to the defect depth and light intensity characteristics, the light intensity attenuation curve of the internal defect area is calculated, and the light intensity attenuation curve formula is: ;in For Depth The light intensity at is the initial light intensity, is the attenuation coefficient. The internal defect area is layered by the light intensity attenuation curve, with each layer thickness of 10μm. The layered internal defect area is reconstructed using a 3D point cloud reconstruction algorithm (such as the Poisson reconstruction algorithm) to generate 3D defect morphology data. The volume, maximum depth, and spatial distribution density of the defect are calculated using the 3D defect morphology data, and the defect parameters are calculated using 3D image processing software (such as MATLAB or Python's Open3D library): Volume: Calculate the volume of the defect area by integration; Maximum depth: Extract the maximum depth value of the defect area; Spatial distribution density: Calculate the distribution density of the defect area per unit volume. The volume, maximum depth, and spatial distribution density of the defect are integrated into the internal defect data.
[0045] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes: Step S31: aligning the surface defect data and the internal defect data in regional space coordinates to obtain the overall defect alignment coordinates of the diffuser plate; Step S32: performing defect coupling association on the surface defect data and the internal defect data according to the overall defect alignment coordinates of the diffuser plate to generate a defect coupling relationship; Step S33: calculating the defect diffusion probability of the diffusion plate monitoring image based on the defect coupling relationship; Step S34: performing stress simulation on the diffuser plate monitoring image according to the defect diffusion probability to generate diffuser plate defect stress simulation data; Step S35: evaluating the defect risk level of the diffuser plate according to the defect stress simulation data and defect type data of the diffuser plate to generate defect risk data.
[0046] In an embodiment of the present invention, the coordinates of the surface defect data are spatially aligned with the coordinates of the internal defect data. A coordinate transformation algorithm (such as affine transformation) is used to unify the surface defect coordinates and the internal defect coordinates into the same coordinate system, generate the overall defect alignment coordinates of the diffuser plate, and record the location information of each defect. Based on the overall defect alignment coordinates of the diffuser plate, the spatial distance between the surface defect and the internal defect is calculated. A coupling threshold is set (such as distance <0.1mm), and surface defects with a distance less than the threshold are associated with internal defects as coupled defects, and a defect coupling relationship table is generated to record the type, location and spatial distance of the coupled defects. Based on the defect coupling relationship, the distribution characteristics of the defects and their impact on the performance of the diffuser plate are analyzed. A probability model (such as Markov random field) is used to calculate the defect diffusion probability. The formula for the defect diffusion probability is: ;in is the defect diffusion probability, is the defect spacing, is the diffusion coefficient (the default value is 0.1). Based on the probability of defect diffusion, use finite element analysis (FEA) software (such as ANSYS or Abaqus) to perform stress simulation on the diffuser plate. Set simulation parameters: material properties (such as elastic modulus, Poisson's ratio), boundary conditions (such as fixed support, load distribution), and generate diffusion plate defect stress simulation data, including stress distribution, strain distribution and deformation. Based on stress simulation data and defect type data, evaluate the impact of defects on the performance of the diffuser plate. Set risk level standards: Low risk: stress concentration area area <10%, defect type is bubble. Medium risk: stress concentration area area 10%-30%, defect type is crack. High risk: stress concentration area area >30%, defect type is impurity, generate defect risk data, including risk level, stress concentration area area and defect type.
[0047] Preferably, step S35 includes the following steps: Step S351: determining a basic risk level according to the stress simulation data of the diffusion plate defect, wherein the stress simulation data is less than or equal to 50 MPa and is classified as low risk, the stress simulation data is between 50 MPa and 100 MPa and is classified as medium risk, and the stress simulation data exceeds 100 MPa and is classified as high risk; Step S352: determining risk weights based on the defect type data, wherein the weight of bubble defect type data in the defect type data is 1, the weight of crack defect type data is 2, and the weight of impurity defect type data is 3; Step S353: Calculate the risk level comprehensively through the basic risk level and risk weight to obtain defect risk data.
[0048] In the embodiment of the present invention, by obtaining the defect stress simulation data of the diffusion plate, the data can be calculated by finite element analysis (FEA) or other simulation methods, and the basic risk level is divided according to the stress value, wherein the defects with stress simulation data less than or equal to 50MPa are classified as low risk, the defects with stress between 50MPa and 100MPa are classified as medium risk, and the defects with stress exceeding 100MPa are classified as high risk. Subsequently, the risk weight is set based on the degree of influence of different types of defects on the performance of the diffusion plate, wherein the risk weight of bubble defects is set to 1, the risk weight of crack defects is set to 2, and the risk weight of impurity defects is set to 3. Finally, combining the basic risk level and risk weight, the final risk level of the defect is calculated using the risk calculation formula R=B×W, where B is the value of the basic risk level (low risk=1, medium risk=2, high risk=3), and W is the risk weight of the defect type. The final risk level classification rules are as follows: if the calculated risk level R is less than or equal to 2, the defect is low risk; if the risk level is between 2 and 4, the defect is medium risk; if the risk level is greater than 4, the defect is high risk. For example, if the stress simulation data of a defect is 45MPa (low risk) and the defect type is a bubble, the calculated risk level is 1×1=11, which is low risk; if the stress simulation data is 85MPa (medium risk) and the defect type is a crack, the calculated risk level is 2×2=4, which is medium risk; if the stress simulation data is 120MPa (high risk) and the defect type is an impurity, the calculated risk level is 3×3=9, which is high risk.
[0049] It is particularly important that step S4 further comprises the following steps: Step S41: comparing the defect risk data based on a preset risk threshold, and when the defect risk data is greater than or equal to the preset risk threshold, marking the corresponding defect risk data as a high defect risk level; Step S42: segmenting the diffuser plate monitoring image based on the high defect risk level to generate diffuser plate high defect risk area data; Step S43: extracting internal and external defect features of the data of the high defect risk area of the diffusion plate, and dividing the internal and external defect features into data sets to generate a model training set and a model test set; Step S44: training the model training set by using a support vector machine algorithm to generate a diffuser plate defect detection pre-model; and optimizing and iterating the diffuser plate defect detection pre-model by using a model test set to generate a diffuser plate defect detection model.
[0050] In an embodiment of the present invention, defect detection is performed on the diffusion plate by an image processing algorithm to obtain defect risk data, which generally includes the defect probability or risk score of each area. A preset risk threshold (such as 0.7) is set based on historical data or expert experience. When the risk score of the defect is greater than or equal to the threshold, the area is considered to have a high defect risk. The defect risk data is compared with the threshold, and the area with a risk score greater than or equal to the threshold is marked as high defect risk data for classification and identification. The high defect risk area is separated from the original image by using regional growing, K-means clustering, or threshold segmentation-based technology. According to the high defect risk data marked in step S41, regional segmentation is performed on the image to highlight the defect area and generate high defect risk area data. This data may include specific information such as the location, shape, and size of the area. For the high defect risk area, edge detection, texture analysis, morphological operation and other methods are used to extract the internal and external defect features of the area, including the size, shape, texture, color, etc. of the defect, as well as the environmental features around the defect, such as color changes and edge information of adjacent areas. Data set division is performed based on the data of internal and external defect features. The data is usually divided into training set and test set at a ratio of 80%-20%. Select a suitable SVM algorithm, such as linear SVM or nonlinear SVM, to train the defect detection model. Use the training set data (i.e., internal and external defect features) generated in step S43 to train the SVM model. During the training process, the SVM learns the characteristics of the data by maximizing the classification boundary. Use the test set to test the preliminarily trained model to evaluate its accuracy and recall. Optimize the model based on the test results, by adjusting the SVM parameters (such as C, gamma, etc.), and using cross-validation, grid search and other methods for further optimization until the model reaches the best performance.
[0051] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0052] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A method for training a diffusion plate defect detection model, characterized in that: The following steps are involved: Step S1: extracting surface defect features from the diffuser plate monitoring image; Perform defect type analysis based on surface defect characteristics to obtain defect type data; Step S2: setting spectral parameters according to the defect type data, and performing transmittance difference analysis on the diffuser plate monitoring image by using the set spectral parameters to locate the internal defect area of the diffuser plate monitoring image; Conduct three-dimensional defect morphology analysis on the internal defect area to generate internal defect data; Step S3: performing defect correlation analysis on the surface defect data and the internal defect data, and calculating the defect diffusion probability of the diffusion plate monitoring image; The defect risk level of the diffusion plate monitoring image is annotated by the defect diffusion probability; Step S4: Screening high defect risk levels based on a preset risk threshold; The corresponding image area segmentation is performed on the diffusion plate monitoring images with high defect risk levels to conduct model training and generate a diffusion plate defect detection model.
2. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: acquiring a diffuser plate monitoring image, and performing image preprocessing on the diffuser plate monitoring image to generate a standard diffuser plate monitoring image, wherein the image preprocessing includes denoising, contrast enhancement, and grayscale standardization; Step S12: performing edge detection on the standard diffuser plate monitoring image to generate edge feature data; Step S13: performing surface scratch detection on the diffuser plate monitoring image based on the edge feature data to obtain scratch distribution data; Step S14: performing texture analysis on the standard diffuser plate monitoring image, and extracting texture abnormality areas in the standard diffuser plate monitoring image based on the result of the texture analysis to generate texture defect data; Step S15: Integrate the scratch distribution data and the texture defect data into surface defect data; classify the surface defect data by defect type label to obtain defect type data, wherein the defect type data includes bubble defect type data, crack defect type data and impurity defect type data.
3. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: The step S2 of setting the spectrum wavelength according to the defect type data includes: When the defect type data is confirmed to be bubble defect type data, set the spectrum wavelength to 800nm-1000nm, the spectrum bandwidth to 50nm-100nm, and the light source intensity to 100mW / cm²-200mW / cm²; When the defect type data is confirmed to be crack defect type data, the spectrum wavelength is set to 500nm-600nm, the spectrum bandwidth is set to 20nm-50nm, and the light source intensity is set to 50mW / cm²-150mW / cm²; When the defect type data is confirmed to be impurity defect type data, the spectrum wavelength is set to 350nm-450nm, the spectrum bandwidth is set to 10nm-30nm, and the light source intensity is set to 10mW / cm²-100mW / cm².
4. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: The step S2 of performing transmittance difference analysis on the diffuser plate monitoring image by using the set spectral parameters includes: Partition the diffuser plate monitoring image into regions of interest to obtain diffuser plate image regions; Extract pixel intensity values of the diffuser monitoring image under different spectral parameters; Calculate the transmittance changes of different diffuser image areas based on pixel intensity values to form a transmittance distribution matrix; Based on the transmittance distribution matrix, the transmittance characteristics of the diffuser plate image area are analyzed to identify the transmittance variation pattern; Construct a transmission characteristic curve according to the transmittance variation pattern, and extract the local extreme points of the curve; The local extreme points are used to screen the key transmittance change features of the diffuser plate monitoring image to obtain the transmittance feature map.
5. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: The positioning of the internal defect area of the diffusion plate monitoring image in step S2 includes: Based on the transmission characteristic spectrum, the abnormal transmission area of the diffuser plate monitoring image is segmented to obtain the abnormal transmission area; An initial binary mask is set for the abnormal transmission area, and the mask boundary of the initial binary mask is refined to obtain a binary boundary optimized mask; The connectivity of abnormal transmission areas is calculated using binary boundary optimization masks; Combine the connectivity of abnormal transmission areas and the transmission feature map to optimize the weight of the binary boundary optimization mask and generate refined defect mask data; The area, shape and perimeter of the abnormal transmission area are calculated by refining the defect mask data, and the position of the defect area is marked according to the area, shape and perimeter to generate the coordinates of the internal defect area.
6. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: The three-dimensional defect morphology analysis of the internal defect area in step S2 includes: Performing optical coherence tomography scanning on the internal defect region based on the coordinates of the internal defect region to generate internal defect optical scanning data; Analyze the defect depth of the internal defect area based on the internal defect optical scanning data, and extract the light intensity characteristics of the internal defect optical scanning data; Calculate the light intensity attenuation curve of the internal defect area according to the defect depth and light intensity characteristics; The internal defect area is layered through the light intensity attenuation curve, and the three-dimensional point cloud of the layered internal defect area is reconstructed to generate three-dimensional defect morphology data; The volume, maximum depth and spatial distribution density of defects are calculated through three-dimensional defect morphology data and integrated into internal defect data.
7. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: aligning the surface defect data and the internal defect data in regional space coordinates to obtain the overall defect alignment coordinates of the diffuser plate; Step S32: performing defect coupling association on the surface defect data and the internal defect data according to the overall defect alignment coordinates of the diffuser plate to generate a defect coupling relationship; Step S33: calculating the defect diffusion probability of the diffusion plate monitoring image based on the defect coupling relationship; Step S34: performing stress simulation on the diffuser plate monitoring image according to the defect diffusion probability to generate diffuser plate defect stress simulation data; Step S35: evaluating the defect risk level of the diffuser plate according to the defect stress simulation data and defect type data of the diffuser plate to generate defect risk data.
8. The method for training a diffusion plate defect detection model according to claim 1, characterized in that: Step S35 includes the following steps: Step S351: determining a basic risk level according to the stress simulation data of the diffusion plate defect, wherein the stress simulation data is less than or equal to 50 MPa and is classified as low risk, the stress simulation data is between 50 MPa and 100 MPa and is classified as medium risk, and the stress simulation data exceeds 100 MPa and is classified as high risk; Step S352: determining risk weights based on the defect type data, wherein the weight of bubble defect type data in the defect type data is 1, the weight of crack defect type data is 2, and the weight of impurity defect type data is 3; Step S353: Calculate the risk level comprehensively through the basic risk level and risk weight to obtain defect risk data.
9. A training system for a diffusion plate defect detection model, characterized in that: A method for training a diffuser plate defect detection model according to claim 1, wherein the training system of the diffuser plate defect detection model comprises: The surface defect analysis module is used to extract the surface defect features of the diffuser plate monitoring image; perform defect type analysis based on the surface defect features to obtain defect type data; The internal defect analysis module is used to set spectral parameters according to defect type data, and perform transmittance difference analysis on the diffuser plate monitoring image through the set spectral parameters to locate the internal defect area of the diffuser plate monitoring image; perform three-dimensional defect morphology analysis on the internal defect area to generate internal defect data; The defect correlation module is used to perform defect correlation analysis on the surface defect data and the internal defect data, calculate the defect diffusion probability of the diffusion plate monitoring image, and annotate the defect risk level of the diffusion plate monitoring image according to the defect diffusion probability; The model training module is used to screen high defect risk levels based on a preset risk threshold; and perform corresponding image area segmentation on the diffusion plate monitoring image with a high defect risk level to perform model training and generate a diffusion plate defect detection model.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method of the diffusion plate defect detection model according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and system for evaluating structural performance of diffusion plate
CN117541483A
Online automatic test method and system for printed circuit board
CN118817720A
Precise stainless steel quality detection method based on big data analysis
CN119048476A
Cited By
Traditional Chinese medicine detection system and method based on visual analysis
CN120468153A
Defect detection method and system for automotive trim injection molded part based on visual inspection
CN120747000A
A visual detection-based defect detection method and system for an automobile interior injection molding part
CN120747000B
Sapphire substrate automatic defect detection and classification method based on visual detection
CN120807999A
Wafer production method and system based on image segmentation
CN120890977A