Defect detection method and device for epoxy resin insulating part

By constructing a deep learning model that combines physical parameters of X-ray flaw detection, the problem of cross-scene misjudgment in the defect detection of epoxy resin insulation components was solved, and high-precision defect identification and adaptive detection were achieved.

CN121504847APending Publication Date: 2026-02-10HENAN PINGGAO ELECTRIC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511615926.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing image defect detection methods cannot accurately identify defects in epoxy resin insulation components and are prone to misjudgment across different scenarios, thus failing to guarantee detection accuracy.

Method used

A defect classification model is constructed, and a deep learning algorithm is used to combine X-ray flaw detection physical parameters and image features. Through adaptive contrast enhancement and noise suppression processing, the correlation between image features and physical parameters is established to improve the defect detection accuracy.

Benefits of technology

By introducing physical parameters for flaw detection as auxiliary features, the accuracy and precision of defect detection for epoxy resin insulation components have been improved. This enables accurate identification of multiple types of defects and adaptability to process fluctuations in different production batches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504847A_ABST
    Figure CN121504847A_ABST
Patent Text Reader

Abstract

The invention relates to a defect detection method and device for an epoxy resin insulating part, and belongs to the technical field of image detection. The defect classification model constructed by the method is used for processing X-ray flaw detection physical parameters and X-ray images subjected to image enhancement so as to establish image feature-physical parameter relevance, for example, a combination of penetration thickness and gray value is used for distinguishing'deep bubbles' (thick penetration area + low gray level) and'interlayer stripping '(thin penetration area + low gray level); pseudo-defects are eliminated through'exposure dose + marginal definition '. Therefore, the defect classification model adopted by the invention can analyze the X-ray image characteristics of the epoxy resin insulating part, and also utilizes the flaw detection physical parameters to establish the relevance of image characteristics-physical parameters, so that compared with the existing defect classification method which only depends on image pixel characteristics, the defect classification method provided by the invention has the advantages that the defect classification efficiency is greatly improved; according to the method, flaw detection physical parameters are introduced as auxiliary characteristics, and the defect detection precision of the epoxy resin insulating part is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a kind of epoxy resin insulating piece defect detection method and device, belong to image detection technical field. BACKGROUND

[0002] Epoxy resin insulating piece plays a key role in electrical equipment, each epoxy resin insulating piece before being put into use is subjected to X-ray detection to confirm internal defects, and can be used normally after confirming no internal defects.The traditional X-ray detection method is to place epoxy resin insulating piece into detection equipment, and the operator of detection equipment observes whether there are bubbles, impurities and other defects in the interior of epoxy resin insulating piece on the screen at the equipment operating end by naked eye, and the detection efficiency is greatly related to the experience of the operator, and there is a risk of personnel error.

[0003] With the development of image recognition technology in the field of defect detection of articles, such as the Chinese patent application file with the application publication number CN115409824A, which discloses a silicon wafer surface defect detection method based on deep convolutional neural network, collects silicon wafer images, extracts silicon wafer regions using image processing methods, eliminates the influence of background image factors, filters each pure silicon wafer image using improved median filtering, constructs a silicon wafer surface defect dataset using the filtered images, performs data enhancement on the silicon wafer surface defect dataset, uses an improved attention mechanism and constructs a CNN model, trains and evaluates the CNN model, fine-tunes the parameters of the CNN model according to the evaluation results, and finally applies the CNN model to silicon wafer surface defect detection.Although the above method can realize defect detection, it uses a general defect classification algorithm, which only relies on image pixel features and is prone to "cross-scene misjudgment", i.e., when the above method is applied to defect detection of epoxy resin insulating piece, metal piece defects may be misjudged as insulating piece defects, and pseudo-defects may be judged as real defects, and the detection accuracy cannot be guaranteed. SUMMARY

[0004] The purpose of the present application is to provide a defect detection method and device for epoxy resin insulating piece to solve the problem that the current image defect detection method cannot accurately identify the defects of epoxy resin insulating piece.

[0005] The present application provides a defect detection method for epoxy resin insulating piece to solve the above technical problems, which comprises the following steps: 1) obtaining X-ray images of epoxy resin insulating piece and corresponding X-ray detection physical parameters, and performing image enhancement on the obtained X-ray images; 2) The X-ray flaw detection physical parameters and the X-ray image processed by the image enhancement are processed by using the constructed defect classification model to obtain whether the epoxy resin insulating part has defects and the defect type; the defect classification model is constructed by using a deep learning algorithm, and during training of the defect classification model, training sample data inputted includes pixel features of the X-ray image and corresponding X-ray flaw detection physical parameters, which are used to improve defect detection accuracy by establishing the correlation between image features and physical parameters.

[0006] Further, the classification model adopts a convolutional neural network model, which includes a feature input layer, a feature extraction layer, a spatial attention mechanism layer, and a classification output layer; the feature input layer is used to process the inputted X-ray flaw detection physical parameters and X-ray image, establish the correlation between image features and physical parameters, and the feature extraction layer is used to extract shape features, grayscale features, and edge features of defects from the data of the feature input layer; the spatial attention mechanism layer is used to strengthen feature extraction of high-frequency defect areas; and the classification output layer is used to improve the loss weight of rare defect types by using a weighted loss function.

[0007] Further, the X-ray flaw detection physical parameters include penetration thickness, exposure dose, and flaw detection angle.

[0008] Further, the image enhancement adopts an adaptive contrast enhancement method, the X-ray image of the epoxy resin insulating part is divided into different sub-regions according to the composition of the epoxy resin insulating part, and the corresponding contrast gain coefficient is set for each sub-region according to the grayscale feature distribution of each sub-region, so as to realize adaptive contrast enhancement of the image of each sub-region.

[0009] Further, the image enhancement further includes noise suppression processing of the X-ray image before adaptive contrast enhancement, and the denoising threshold adopted in the noise suppression processing is related to the interaction law of the epoxy resin and X-ray.

[0010] Further, the training sample used during training of the defect classification model has undergone sample gain processing, and the sample gain processing includes real sample expansion and parameterized virtual sample generation; the real sample expansion is used to realize local defect area cutting, limited angle rotation, and grayscale brightness fine adjustment on the X-ray defect sample of the epoxy resin insulating part; and the parameterized virtual sample generation is used to superimpose the grayscale features of simulated defects on the actual X-ray image of the epoxy resin insulating part without defects according to the typical defect parameters of the epoxy resin insulating part and the X-ray flaw detection physical law, so as to generate virtual X-ray defect images of different defect types and different defect positions.

[0011] Further, the generated virtual X-ray defect image strictly matches the X-ray attenuation characteristics of the epoxy material and the morphological parameters of the defect, and the grayscale distribution and edge blur degree of the virtual X-ray defect image are consistent with those of the real flaw detection image.

[0012] Further, the method further comprises associating the algorithm parameters used in defect identification with the defect identification results, recording the corresponding algorithm parameters when defect misjudgment or omission occurs, and adjusting the algorithm parameters used based on the recording results.

[0013] Further, the method further comprises counting the defect types of the epoxy resin insulating piece output by the defect classification model according to the production batch, determining the defect type distribution corresponding to each production batch, and adjusting the algorithm parameters used according to the defect type distribution to adapt to the influence of process fluctuations in different production batches.

[0014] The present application also provides a defect detection device for an epoxy resin insulating piece, comprising a processor for executing instructions to realize the steps in the defect detection method for the epoxy resin insulating piece, comprising: 1) obtaining the X-ray image of the epoxy resin insulating piece and the corresponding X-ray flaw detection physical parameters, and performing image enhancement on the obtained X-ray image; 2) processing the X-ray flaw detection physical parameters and the X-ray image after image enhancement by using the constructed defect classification model to obtain whether the epoxy resin insulating piece has defects and the defect type; the defect classification model is constructed by using a deep learning algorithm, and the training sample data input during training of the defect classification model includes pixel features of the X-ray image and corresponding X-ray flaw detection physical parameters, which is used to improve the defect detection precision by establishing the correlation between image features and physical parameters.

[0015] Further, the classification model uses a convolutional neural network model, which includes a feature input layer, a feature extraction layer, a spatial attention mechanism layer, and a classification output layer; the feature input layer is used to process the input X-ray flaw detection physical parameters and X-ray image, establish the correlation between image features and physical parameters, and the feature extraction layer is used to extract the shape features, gray features and edge features of the defects from the data of the feature input layer; the spatial attention mechanism layer is used to strengthen the feature extraction of high-frequency defect areas; and the classification output layer is used to improve the loss weight of rare defect types by using a weighted loss function.

[0016] Further, the X-ray flaw detection physical parameters include penetration thickness, exposure dose and flaw detection angle.

[0017] Further, the image enhancement uses an adaptive contrast enhancement method, the X-ray image of the epoxy resin insulating piece is divided into different sub-regions according to the composition of the epoxy resin insulating piece, and the corresponding contrast gain coefficient is set for each sub-region according to the gray feature distribution of each sub-region to realize adaptive contrast enhancement of the image of each sub-region.

[0018] Further, the image enhancement further comprises noise suppression processing on the X-ray image before adaptive contrast enhancement, and a de-noising threshold used in the noise suppression processing is related to the interaction rule between the epoxy resin and the X-ray.

[0019] Further, the training sample used in the training of the defect classification model is subjected to sample gain processing, and the sample gain processing comprises real sample expansion and parameterized virtual sample generation, the real sample expansion is used to realize local cutting of a defect area, limited angle rotation and gray brightness fine adjustment on an X-ray defect sample of the epoxy resin insulation part, and the parameterized virtual sample generation is used to superimpose gray scale features of simulated defects on an actual X-ray image of the epoxy resin insulation part without defects according to typical defect parameters of the epoxy resin insulation part and a physical rule of X-ray flaw detection, so as to generate virtual X-ray defect images of different defect types and different defect positions.

[0020] Further, the generated virtual X-ray defect image strictly matches the X-ray attenuation characteristics of the epoxy material and the morphological parameters of the defects, and the gray scale distribution and edge blur degree of the virtual X-ray defect image are consistent with those of the real flaw detection image.

[0021] Further, the method further comprises associating algorithm parameters used in defect identification with defect identification results, recording corresponding algorithm parameters when defects are misjudged or missed, and adjusting the algorithm parameters used based on the recording results.

[0022] Further, the method further comprises counting the defect types of the epoxy resin insulation part output by the defect classification model according to production batches, determining the defect type distribution corresponding to each production batch, and adjusting the algorithm parameters used according to the defect type distribution, so that the algorithm parameters adapt to the influence caused by process fluctuations of different production batches.

[0023] The beneficial effects of the present application are: as an improved invention, the defect classification model constructed by the present application is used to process X-ray flaw detection physical parameters and X-ray images subjected to image enhancement, so as to establish the correlation between image features and physical parameters, such as distinguishing "deep bubble" (thick penetration zone + low gray scale) and "interlayer peeling" (thin penetration zone + low gray scale) through "penetration thickness + gray scale value" combination, and excluding pseudo-defects through "exposure dose + edge definition". Therefore, the defect classification model used in the present application can analyze the features of the X-ray image of the epoxy resin insulation part, and also uses the flaw detection physical parameters to establish the correlation between image features and physical parameters. Compared with the existing defect classification method which only depends on image pixel features, the present application introduces the flaw detection physical parameters as auxiliary features, and improves the defect detection accuracy of the epoxy resin insulation part. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1is a flow chart of the defect detection method of the epoxy resin insulating part of the present application; Figure 2 is a schematic diagram of the defect detection result in the embodiment of the present application. DETAILED DESCRIPTION

[0025] The specific embodiments of the present application will be further described below in conjunction with the accompanying drawings.

[0026] The present application improves the defect detection accuracy of the epoxy resin insulating part by introducing the flaw detection physical parameters as auxiliary features of the defect classification model and establishing the correlation of image features-physical parameters.

[0027] Defect detection method for epoxy resin insulating part X-ray images of the epoxy resin insulating part and corresponding X-ray flaw detection physical parameters are obtained, and the obtained X-ray images are image enhanced; the X-ray flaw detection physical parameters and the X-ray images after image enhancement are processed by using the constructed defect classification model to obtain whether the epoxy resin insulating part has defects and the defect type; the defect classification model is constructed by using a deep learning algorithm, and the training sample data input during training of the defect classification model includes pixel features of the X-ray images and corresponding X-ray flaw detection physical parameters, which is used to improve the defect detection accuracy by establishing the correlation of image features-physical parameters. The implementation process of the method is shown in Figure 1 , which will be described in detail below.

[0028] 1. X-ray images of the epoxy resin insulating part and corresponding X-ray flaw detection physical parameters are obtained, and the obtained X-ray images are image enhanced.

[0029] The X-ray images of the epoxy cast insulating part generally have the problems of low contrast (difference ≤10) between defects and background gray scale and metal insert peripheral scattering noise interference. The present application takes "enhancing defect profile definition + suppressing invalid noise" as the target, and uses "layered preprocessing + adaptive enhancement" to process.

[0030] First step: noise suppression preprocessing.

[0031] The embodiment adopts a wavelet threshold denoising algorithm for noise suppression. The X-ray image is first decomposed in multiple scales, and then a dynamic threshold is set according to the noise characteristics (mainly high-frequency scattering noise) of the epoxy insulation part image (adjusted in real time according to the local gray variance of the image, the greater the variance, the higher the threshold). While preserving the edge details of defects, the scattering noise around the metal insert is accurately filtered out (noise removal rate ≥ 90%, defect edge pixel retention rate ≥ 95%). In the wavelet threshold denoising algorithm, the wavelet denoising threshold is designed according to the interaction law between epoxy material and X-ray (rather than a general noise model), avoiding the loss of edge information of small defects (such as 0.1 mm micro-cracks) during noise removal. As other embodiments, noise suppression can also use other methods, such as Gaussian filtering, median filtering, etc., where the filtering parameters are adjusted according to actual needs.

[0032] Second step: adaptive contrast enhancement.

[0033] Due to the large gray difference in different regions of the epoxy resin insulation part X-ray image and the overlapping of defects and noise characteristics, the general image enhancement algorithm (such as global histogram equalization, ordinary CLAHE) uses a unified enhancement parameter for the entire image, which cannot adapt to the characteristics of the epoxy resin insulation part X-ray image "large gray difference in multiple regions, overlapping of defects and noise characteristics". Therefore, the present application uses a regional dynamic parameter adjustment method for image enhancement, based on the adaptive contrast limited histogram equalization (CLAHE), and introduces a "region division mechanism" - for example, the epoxy resin insulation part X-ray image is divided into "insulation part main body region", "metal insert region" and "pouring interface region". According to the gray distribution characteristics of different sub-regions (such as low gray value in the insert region, uniform gray in the main body region, and large gray fluctuation in the interface region), different contrast gain coefficients are set (main body region 1.2-1.5, interface region 1.5-1.8, insert region 0.8-1.0), avoiding the problem of too dark insert region and defects being covered in the interface region caused by the general CLAHE algorithm.

[0034] The sub-region division can be determined according to the physical structure, defect distribution or gray data distribution of the epoxy resin insulation part. The metal insert region of the epoxy resin insulation part has low X-ray penetration rate, the epoxy main body region has uniform X-ray penetration, and the pouring interface region has large X-ray penetration fluctuation. Therefore, the epoxy resin insulation part can be divided into metal insert region, epoxy main body region and pouring interface region according to the physical structure. The defect rate of the pouring interface region is the highest (generally 40%-60%), the defect rate of the metal insert region is the second, and the defect rate of the epoxy main body region is the lowest. Therefore, it can also be divided according to the defect rate. Through clustering, it is found that the gray value of the metal insert region is less than or equal to 60, and the gray value of the epoxy main body region is between 80 and 150. Therefore, it can be divided according to the gray data distribution.

[0035] The gain coefficient of each sub-region is also determined according to the actual distribution of the gray scale of the epoxy insulating part X-ray image. For the metal insert area, the gray scale is relatively low, so a low gain coefficient (0.8-1.0) is used to avoid amplifying noise; for the epoxy main body area, the gray scale is moderate, a medium gain coefficient (1.2-1.5) is used to enlarge the difference between defects and background; for the pouring interface area, the gray scale fluctuates greatly, a high gain coefficient (1.5-1.8) is used to display fuzzy defects. The gain coefficient in image enhancement is determined according to the structure-imaging-defect characteristics when setting, which is used to balance development and noise reduction.

[0036] 2. Build a defect classification model.

[0037] The general defect classification model (such as a conventional CNN, a support vector machine SVM) only relies on image pixel features, and does not combine the defect characteristics of the detected object and the flaw detection physical parameters, which is prone to "cross-scene misjudgment" (such as misjudging metal part defects as insulating part defects, and misjudging false defects as real defects). Therefore, the present application proposes a defect classification model, which is constructed by using a deep learning algorithm, and introduces flaw detection physical parameters as auxiliary features. In addition to the pixel features of the X-ray image, the data input into the defect classification model also includes corresponding X-ray flaw detection physical parameters. The defect classification model is used to improve the defect detection accuracy by establishing the correlation between image features and physical parameters. The flaw detection physical parameters used in the present application include penetration thickness, exposure dose and flaw detection angle. For example, "penetration thickness + gray scale" is used to distinguish "deep bubble" (thick penetration area + low gray scale) and "interlayer peeling" (thin penetration area + low gray scale), and "exposure dose + edge sharpness" is used to exclude false defects.

[0038] The defect classification model in the present embodiment needs to accurately distinguish four typical defects (surface cracks, internal bubbles, metal inclusions and interlayer peeling) of the epoxy pouring insulating part, so the present application constructs a convolutional neural network (CNN) model with "multi-feature fusion + spatial attention mechanism" as the defect classification model. The model includes a feature input layer, a feature extraction layer, a spatial attention mechanism layer and a classification output layer.

[0039] Feature input layer: In addition to the pixel features of the X-ray image, additional X-ray flaw physical parameters (exposure dose 30-50 mAs, penetration thickness 5-20 mm, flaw angle 0°-45°) are input to establish an "image feature-physical parameter" correlation to assist in distinguishing "pseudo-defects" caused by differences in physical parameters (such as dark areas caused by insufficient exposure, uneven gray caused by angle deviation); Feature extraction layer: a structure of 3 layers of convolution (convolution kernel size 3x3) + 2 layers of maximum pooling (pooling kernel size 2x2) is used to focus on extracting the "shape features (crack strip, bubble roundness, inclusion irregularity), gray features (inclusion high gray value, peeling area low gray band), edge features (crack sharp edge, bubble fuzzy edge)" of the defects; Spatial attention mechanism layer: a channel-spatial dual attention module is added to the CNN model to allow the network to automatically focus on the "high-frequency defect area" of the epoxy insulating part (such as the pouring interface and the embedded part periphery) through model training, increasing the feature weight (weight coefficient 1.2-1.4) of defects in this area and strengthening the feature signal of micro-defects; Classification output layer: a weighted cross-entropy loss function is used to address the sample imbalance problem (such as 30% bubble samples and only 5% interlayer peeling samples), with a higher loss weight (weight value 2.0) set for the rare defect type (interlayer peeling) to ensure that the classification accuracy of the four types of defects is ≥92%.

[0040] As other implementations, the defect classification model can also use Vision Transformer (ViT) and SwinTransformer. Vision Transformer is used to segment the image into patches, focus on "pouring interface, metal embedded part periphery" and other high-frequency defect areas through self-attention, and accurately distinguish "metal embedded part scattering pseudo-defects" from "real inclusion defects" by embedding X-ray flaw angle and penetration thickness as "additional feature vectors". Swin Transformer uses hierarchical attention mechanism to capture features from local to global, which can refine the edges of defects (such as the sharp edges of micro-cracks), adapt to the characteristics of "large gray difference in multiple regions of epoxy X-ray images", and avoid background masking of interlayer peeling.

[0041] In order to improve the accuracy of the defect classification model during the training of the above model, a large amount of training data is required, i.e. samples containing various defect types and different defect positions. However, the number of X-ray defect samples of epoxy resin insulating parts is insufficient, especially the number of rare defects such as micro-cracks and deep bubbles is even smaller. In order to meet the accuracy requirements of the model, a sample gain algorithm is needed to expand the training samples.

[0042] The general sample gain algorithm (such as random flipping and global noise addition) only performs "non-discriminatory data augmentation" on the sample, does not combine the defect characteristics of the epoxy insulation and the X-ray imaging law, and is easy to generate invalid samples that deviate from the actual detection scene. Therefore, the present application uses the actual parameters of the epoxy defect and the X-ray physical law as a constraint, and the sample gain processing includes real sample expansion and parameterized virtual sample generation. When generating a virtual sample, the X-ray attenuation characteristics of the epoxy material and the morphological parameters of the defect are strictly matched to ensure that the gray scale distribution and edge blur of the virtual defect image are consistent with the real flaw detection image (such as the gray scale gradient difference of the virtual micro-crack and the real sample error ≤5%). At the same time, it can focus on the high-frequency defect area of the insulation: for the "pouring interface" and "metal insert peripheral stress concentration area" prone to defects in the epoxy pouring process, virtual samples in this area are generated first to improve the recognition sensitivity of the algorithm to defects in the key area.

[0043] Specifically, in the real sample expansion, the existing small number of epoxy insulation X-ray defect samples (such as surface cracks, internal inclusions, and bubbles) are first subjected to defect area local cutting, limited angle rotation (±15°, matching the actual X-ray flaw detection angle range), and gray scale brightness fine tuning (±8%, simulating the imaging difference under different exposure doses), while preserving the integrity of the defect characteristics, to expand the sample diversity of the same type of defects and avoid overfitting caused by single sample; in the parameterized virtual sample generation, based on the typical defect parameters of the epoxy pouring insulation (micro-crack length 0.1-0.5mm, width 0.02-0.05mm; bubble diameter 0.05-0.2mm; inclusion particle size 0.08-0.3mm) and the X-ray flaw detection physical law (such as the attenuation coefficient of epoxy material to X-ray 0.8-1.2cm⁻¹, ray scattering intensity related to defect edge), on the basis of the real defect-free epoxy insulation X-ray image, the gray scale features of the simulated defects (such as high gray scale gradient of crack edge, low gray scale value inside bubble) are superimposed to generate virtual X-ray defect images of different defect types and different defect positions (pouring interface, insert periphery, interlayer interface), and to supplement the extreme defect samples that are difficult to obtain in the real scene.

[0044] 3. Defect detection using the defect classification model.

[0045] The X-ray image of the epoxy resin insulation part subjected to image enhancement processing obtained in step 1 and the corresponding X-ray flaw detection physical parameters are input into the defect classification model constructed in step 2, and the defect classification model can output the corresponding defect detection result. For example Figure 2As shown, this invention can accurately detect defects such as cracks, non-stickiness, fractures, welds, bubbles, impurities, and textures. Among them, cracks, fractures, and abnormal textures correspond to "surface cracks" in the core category (fractures are escalation of cracks, and abnormal textures are mild cracks); non-stickiness corresponds to the core category "interlayer peeling" (mild interlayer separation); bubbles directly correspond to the core category "internal bubbles"; impurities (mainly metal) and weld defects correspond to the core category "metal inclusions" (weld defects are inclusions / cracks in the metal area).

[0046] 4. Dynamically adjust defect detection based on defect tracking.

[0047] To further improve the defect detection effect, the method of the present invention also includes adjusting the algorithm parameters used for defect detection based on the false positive or false negative of defects, and adjusting the algorithm parameters used according to the defect type distribution corresponding to each production batch, so as to adapt to the impact of process fluctuations in different production batches.

[0048] Specifically, this invention records defects identified during the inspection of epoxy resin insulation components. The recorded information includes "defect type, location coordinates (accurate to pixel level), size parameters (length / diameter), X-ray image number, inspection time, and insulation component production batch number," forming a structured defect database. Simultaneously, the "core algorithm parameters" corresponding to each defect identification (such as image enhancement contrast gain, classification model judgment threshold, and wavelet denoising threshold) are linked to the defect result (correct / false / missed identification). When a false identification occurs (e.g., misclassifying an insert scattering area as an inclusion) or a missed identification occurs (e.g., failing to identify a 0.08mm bubble), the corresponding algorithm parameters are automatically marked, generating a "parameter-defect result" association log. Through the parameter-defect log, the direction for algorithm optimization can be quickly identified (e.g., lowering the classification model judgment threshold when the false identification rate is high). Specific optimization methods are given below: For false defect misclassification (e.g., scattering area → inclusion), the classification model's judgment threshold is reduced (from 0.7 to 0.5, reducing the strictness of recognition and reducing misclassification of fuzzy features), and the contrast gain of the embedding area is reduced (from 1.8 to 1.2, suppressing the amplification of scattering noise and avoiding noise simulating defect features). For minor defect omissions (e.g., 0.1mm microcracks), the spatial attention weight is increased (from 1.2 to 1.5, strengthening the focus on high-frequency defect areas and making microcrack features more prominent), or the main area gain is increased (from 1.2 to 1.4, widening the grayscale difference between microcracks and the background and making weak features more apparent). For rare defect misclassification (e.g., peeling → bubble), the weighted loss weight of the corresponding defect is increased (from 1.0 to 2.0, compensating for insufficient learning of rare samples and prioritizing the optimization of misclassification errors).

[0049] Due to subtle differences in the casting process, epoxy insulation components from different production batches may exhibit imaging variations. For example, batch A insulation components may have a slightly higher density and a generally higher grayscale after X-ray penetration. If different parameters are used during defect detection, the defect detection results will also differ. Therefore, this invention addresses this issue by statistically analyzing the "high-frequency defect types" of different production batches of epoxy insulation components using defect tracking data (e.g., a higher proportion of bubbles in batch A, and a higher proportion of cracks in batch B). It then automatically adjusts the algorithm parameters used for defect detection (e.g., increasing the training weight of bubble samples in batch A, and improving the edge detection sensitivity of cracks in batch B), achieving "batch-specific algorithm configuration." This allows the algorithm parameters to be dynamically adapted to different production batches of insulation components, solving the problem of decreased algorithm accuracy due to process fluctuations (accuracy improved by ≥5% after batch adaptation). This addresses a scenario-specific need not covered by general defect tracking algorithms.

[0050] Specifically, when internal bubbles occur at high frequencies (in the main area, where the grayscale difference is small), the contrast gain of the epoxy main area is increased (e.g., from 1.2 to 1.4) to widen the grayscale difference between the bubbles and the background, thus highlighting the low-grayscale dot features. Alternatively, increase the loss weight for bubble-type errors (e.g., from 1.0 to 1.5) to strengthen the model's learning priority for bubbles and reduce confusion with pseudo-bubbles (areas with uneven grayscale). This is especially relevant when microcracks occur frequently (around the insert, where the edges are weak). Increase the spatial attention weight of the metal insert area (e.g., 1.2→1.6) to allow the model to focus on areas with high microcrack incidence and highlight elongated edge features; or decrease the edge detection threshold (e.g., 0.3→0.2) to reduce the requirement for edge sharpness and avoid missed detection due to weak microcrack edges. When interlayer peeling occurs frequently (interface area, blurred boundaries), increase the contrast gain of the casting interface area (e.g., 1.5→1.8) to enhance the contrast between the low grayscale band of the peeling area and the surrounding area, making the blurred boundaries explicit; or increase the loss weight of interlayer peeling (e.g., 1.0→2.0) to compensate for the problem of few samples of this type of defect and optimize the classification error with bubbles. In summary, this invention breaks through the "scene indiscriminateness" of general image recognition algorithms. All algorithm designs are based on the physical properties of epoxy materials (X-ray attenuation law, casting process characteristics) and defect characteristics (micro-size, low contrast, regional concentration), rather than simply applying image detection algorithms from other fields such as metal parts and electronic components. Meanwhile, this invention also forms a full-link optimization of "sample-enhancement-classification-tracking": the algorithms cooperate with each other (such as sample gain providing high-quality training data for classification algorithms, and defect tracking providing optimization direction for sample gain and image enhancement), systematically solving the core technical problems of "few samples, poor imaging, difficult identification, and weak adaptation" in epoxy insulation defect detection.

[0051] Implementation of a Defect Detection Device for Epoxy Resin Insulators The epoxy resin insulation component defect detection device of the present invention includes a processor, which executes instructions to implement a defect detection method for the epoxy resin insulation component. To acquire X-ray images of the epoxy resin insulation component and corresponding X-ray flaw detection physical parameters, the processor is also configured to communicate with an X-ray flaw detection device to acquire these images and parameters. When the X-ray flaw detection device is activated, the AI ​​automatic recognition system in the processor automatically starts. During X-ray flaw detection operations, the AI ​​automatic recognition system captures the screen image in real time and analyzes the captured image using image enhancement algorithms, defect tracking algorithms, and defect recognition algorithms. The captured image is compared with a trained defect model. If a defect is detected, it is highlighted with an audio prompt, and the defect type and confidence level data are provided. The AI ​​automatic recognition system in the processor processes the acquired X-ray images and corresponding X-ray flaw detection physical parameters of the epoxy resin insulation component using the following methods to achieve defect detection.

[0052] 1. Perform image enhancement on the acquired X-ray images.

[0053] X-ray images of epoxy cast insulation components generally suffer from low grayscale contrast between defects and background (difference ≤10) and noise interference from scattering around metal inserts. This invention aims to "enhance the clarity of defect contours and suppress invalid noise" and employs two parts: "layered preprocessing and adaptive enhancement".

[0054] 2. Construct a defect classification model.

[0055] General defect classification models (such as conventional CNNs and Support Vector Machines (SVMs) rely solely on image pixel features, failing to consider the defect characteristics of the detected object and the physical parameters of the flaw detection. This leads to "cross-scene misjudgments" (e.g., misclassifying metal defects as insulation defects, or identifying false defects as real defects). Therefore, this invention proposes a defect classification model constructed using deep learning algorithms, incorporating flaw detection physical parameters as auxiliary features. The data input to this model includes not only the pixel features of the X-ray image but also the corresponding X-ray flaw detection physical parameters. This model aims to improve defect detection accuracy by establishing a correlation between image features and physical parameters. The flaw detection physical parameters used in this invention include penetration thickness, exposure dose, and flaw detection angle. For example, the combination of "penetration thickness + grayscale value" distinguishes between "deep bubbles" (thick penetration area + low grayscale) and "interlayer peeling" (thin penetration area + low grayscale), while "exposure dose + edge sharpness" eliminates false defects.

[0056] To improve the accuracy of the defect classification model during training, abundant training data is required, including samples with various defect types and locations. However, the current number of X-ray defect samples for epoxy resin insulation components is insufficient, especially for rare defects such as microcracks and deep bubbles. To meet the model's accuracy requirements, a sample gain algorithm is needed to expand the training samples.

[0057] General sample gain algorithms (such as random flipping and global noise addition) only perform "indiscriminate data augmentation" on samples, without considering the defect characteristics of epoxy insulation components and the laws of X-ray imaging, which easily generates invalid samples that are out of touch with the actual inspection scenario. Therefore, this invention uses the actual parameters of epoxy defects and the physical laws of X-rays as constraints. The sample gain processing employed includes real sample augmentation and parameterized virtual sample generation. During virtual sample generation, the X-ray attenuation characteristics of epoxy materials and the morphological parameters of defects are strictly matched to ensure that the grayscale distribution and edge blurring of the virtual defect image are consistent with the real flaw detection image (e.g., the grayscale gradient difference of the virtual microcrack is ≤5% of the error of the real sample). Simultaneously, it can focus on high-frequency defect areas of insulation components: for "casting interfaces" and "stress concentration areas around metal inserts" where defects are prone to occur in the epoxy casting process, virtual samples in these areas are generated first, improving the algorithm's sensitivity to identifying defects in key areas.

[0058] 3. Use a defect classification model for defect detection.

[0059] The X-ray image of the epoxy resin insulation component after image enhancement processing obtained in step 1, along with the corresponding X-ray flaw detection physical parameters, is input into the defect classification model constructed in step 2. The defect classification model can then output the corresponding defect detection results.

[0060] 4. Dynamically adjust defect detection based on defect tracking.

[0061] To further improve defect detection performance, this invention also includes adjusting the algorithm parameters used for defect detection based on false positives or false negatives, and adjusting the algorithm parameters according to the defect type distribution for each production batch to adapt to the impact of process fluctuations in different production batches. The specific implementation details have been provided in the method implementation description and will not be elaborated further here.

Claims

1. A method for detecting defects in epoxy resin insulating components, characterized in that, The method includes the following steps: 1) Obtain X-ray images of epoxy resin insulation components and corresponding X-ray flaw detection physical parameters, and perform image enhancement on the acquired X-ray images; 2) The constructed defect classification model is used to process the physical parameters of X-ray flaw detection and the X-ray image after image enhancement to determine whether the epoxy resin insulation component has defects and the type of defects. The defect classification model is constructed using a deep learning algorithm. When training the defect classification model, the input training sample data includes the pixel features of the X-ray image and the corresponding physical parameters of X-ray flaw detection, which is used to improve the defect detection accuracy by establishing the correlation between image features and physical parameters.

2. The defect detection method for epoxy resin insulation components according to claim 1, characterized in that, The classification model employs a convolutional neural network model, comprising a feature input layer, a feature extraction layer, a spatial attention mechanism layer, and a classification output layer. The feature input layer processes the input X-ray flaw detection physical parameters and X-ray images to establish the correlation between image features and physical parameters. The feature extraction layer extracts the shape, grayscale, and edge features of defects from the data in the feature input layer. The spatial attention mechanism layer enhances feature extraction of high-frequency defect regions. The classification output layer uses a weighted loss function to increase the loss weight of rare defect types.

3. The defect detection method for epoxy resin insulation components according to claim 2, characterized in that, The physical parameters for X-ray flaw detection include penetration thickness, exposure dose, and flaw detection angle.

4. The defect detection method for epoxy resin insulation components according to claim 1, characterized in that, The image enhancement method employs an adaptive contrast enhancement approach. Based on the composition of the epoxy resin insulating component, the X-ray image of the epoxy resin insulating component is divided into different sub-regions. According to the grayscale characteristic distribution of each sub-region, a corresponding contrast gain coefficient is set for each sub-region to achieve adaptive contrast enhancement of the image of each sub-region.

5. The defect detection method for epoxy resin insulating parts according to claim 4, characterized in that, The image enhancement also includes noise suppression processing of the X-ray image before adaptive contrast enhancement. The noise suppression threshold used is related to the interaction law between epoxy resin and X-ray.

6. The defect detection method for epoxy resin insulation components according to claim 1, characterized in that, The training samples used in training the defect classification model have undergone sample gain processing, which includes real sample augmentation and parameterized virtual sample generation. Real sample augmentation is achieved by locally cropping the defect area, limiting the angle rotation, and fine-tuning the grayscale brightness of the X-ray defect samples of epoxy resin insulation. Parameterized virtual sample generation is used to superimpose the grayscale features of simulated defects onto the actual defect-free X-ray images of epoxy resin insulation based on the typical defect parameters of epoxy resin insulation and the physical laws of X-ray flaw detection, so as to generate virtual X-ray defect images of different defect types and locations.

7. The defect detection method for epoxy resin insulation components according to claim 6, characterized in that, The generated virtual X-ray defect image strictly matches the X-ray attenuation characteristics of epoxy material and the morphological parameters of the defect. Its grayscale distribution and edge blurring are consistent with the real flaw detection image.

8. The defect detection method for epoxy resin insulating parts according to any one of claims 1-7, characterized in that, The method also includes associating the algorithm parameters used in defect identification with the defect identification results, recording the algorithm parameters corresponding to false positives or false negatives, and adjusting the algorithm parameters used based on the recorded results.

9. The defect detection method for epoxy resin insulating parts according to any one of claims 1-7, characterized in that, The method also includes statistically analyzing the defect types of epoxy resin insulation components output by the defect classification model according to production batches, determining the defect type distribution corresponding to each production batch, and adjusting the algorithm parameters used according to the defect type distribution to adapt to the impact of process fluctuations in different production batches.

10. A defect detection device for epoxy resin insulation components, comprising a processor, characterized in that, The processor is used to execute instructions to implement the steps in the defect detection method for epoxy resin insulation components as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Silicon wafer surface defect detection method based on deep convolutional neural network

    CN115409824A