High-voltage cable insulation layer defect detection method and device, terminal equipment and storage medium
By building a defect detection model and utilizing transfer learning and cross-domain feature splicing technology, the problems of low efficiency and high subjectivity in high-voltage cable insulation layer detection were solved, achieving efficient and accurate defect identification.
Patent Information
- Application Number
- CN202510721093.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
AI Technical Summary
In the existing technology, the detection of defects in the insulation layer of high-voltage cables relies on manual visual inspection or local electrical performance testing, resulting in low detection efficiency and strong subjectivity.
A defect detection model is constructed by obtaining the surface texture image and internal transmittance distribution image of the high-voltage cable insulation layer. The method of transfer learning and cross-domain feature splicing is used to combine the feature extraction layers of natural scene cracks, industrial metal defects and medical imaging hierarchical models to perform feature fusion and domain adversarial training to generate a defect detection model.
It improves the efficiency and accuracy of high-voltage cable insulation defect detection, reduces the subjectivity of detection, and realizes automated and efficient defect identification.
Smart Images

Figure CN120635002A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cable defect detection, and in particular to a method, device, terminal equipment and storage medium for detecting defects in the insulation layer of a high-voltage cable. Background Art
[0002] The insulation layer of high-voltage cables, the core structural layer that ensures safe operation, is susceptible to defects such as tiny scratches, bubbles, or embedded impurities caused by mechanical stripping during manufacturing or maintenance. These defects can seriously affect the insulation performance of high-voltage cables. Traditional defect detection methods rely primarily on manual visual inspection or local electrical performance testing, which suffers from low detection efficiency and high subjectivity. Summary of the Invention
[0003] The embodiments of the present invention provide a method, apparatus, terminal device and storage medium for detecting defects in the insulation layer of a high-voltage cable, which can effectively solve the problems of low detection efficiency and strong subjectivity caused by manual defect detection of the insulation layer of a high-voltage cable in the prior art, and improve the efficiency and accuracy of defect detection of the insulation layer of a high-voltage cable.
[0004] An embodiment of the present invention provides a method for detecting defects in the insulation layer of a high-voltage cable, comprising:
[0005] Acquire a surface texture image to be inspected and an internal transmittance distribution image to be inspected of the insulation layer of the high-voltage cable to be inspected;
[0006] Inputting the surface texture image to be inspected and the internal transmittance distribution image to be inspected into a defect detection model, so that the defect detection model outputs a detection result of the insulation layer of the high-voltage cable to be inspected; wherein the detection result includes: no defect, crack defect and bubble defect;
[0007] The construction of the defect detection model includes:
[0008] Acquire a high-voltage cable insulation layer image sample dataset; the high-voltage cable insulation layer image sample dataset includes a plurality of high-voltage cable insulation layer image sample subsets, each high-voltage cable insulation layer image sample subset includes a surface texture image sample of the high-voltage cable insulation layer image sample, an internal transmittance distribution image sample of the high-voltage cable insulation layer image sample, and a labeled detection result of the high-voltage cable insulation layer image sample;
[0009] An initial defect detection model is constructed, and the initial defect detection model is iteratively trained using a high-voltage cable insulation layer image sample dataset until the initial defect detection model converges, generating a defect detection model; in each iterative training, the initial defect detection model extracts surface crack features of surface texture image samples and internal bubble features of internal transmittance distribution image samples, generates fusion features based on the surface crack features and the internal bubble features, and outputs the predicted detection results of the high-voltage cable insulation layer image samples based on the fusion features.
[0010] Furthermore, the constructing of the initial defect detection model includes:
[0011] Obtain the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model;
[0012] The feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are cross-domain spliced to obtain a multi-source feature splicing layer;
[0013] Construct a domain classifier and a gradient reversal layer, and then concatenate the multi-source feature concatenation layer, the gradient reversal layer, and the domain classifier to obtain a multi-source feature fusion layer.
[0014] Perform domain adversarial training and distribution alignment on the multi-source feature fusion layer to obtain the feature extraction layer of the initial defect detection model;
[0015] Build the input layer, variable convolutional layer, and classifier of the initial defect detection model;
[0016] The input layer, feature extraction layer, variable convolution layer, and classifier of the initial defect detection model are concatenated to obtain the initial defect detection model.
[0017] Furthermore, cross-domain feature splicing of the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to obtain a multi-source feature splicing layer includes:
[0018] Adjust the feature extraction layers of the natural scene crack model, the industrial metal defect model, and the medical image layered model to the same dimension;
[0019] The feature extraction layer of the adjusted natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are feature spliced at the same dimension to obtain a multi-source feature splicing layer.
[0020] Furthermore, the multi-source feature fusion layer is subjected to domain adversarial training and distribution alignment to obtain a feature extraction layer of the initial defect detection model, including:
[0021] Obtain high-voltage cable insulation layer image sample datasets, natural scene crack datasets, industrial metal defect datasets, and medical image layered datasets;
[0022] The high-voltage cable insulation layer image sample dataset is used as the target domain data, and the data source is annotated as the target domain data; the natural scene crack dataset, industrial metal defect dataset, and medical image layered dataset are used as the source domain data, and the data source is annotated as the source domain data;
[0023] After the target domain data and the source domain data are extracted through the multi-source feature splicing layer, they are alternately input into the domain classifier through the gradient reversal layer so that the domain classifier outputs the data source until the domain adaptation loss of the domain classifier is minimized, completing the domain adversarial training of the multi-source feature fusion layer; wherein the gradient reversal layer is used to reverse the gradient during back propagation;
[0024] According to the features of the target domain data extracted by the multi-source feature splicing layer and the features of the source domain data extracted by the multi-source feature splicing layer, the maximum mean difference loss is calculated, and the gradient of the multi-source feature splicing layer is updated according to the maximum mean difference loss to obtain the feature extraction layer of the initial defect detection model.
[0025] Furthermore, the iterative training of the initial defect detection model using the high-voltage cable insulation layer image sample dataset until the initial defect detection model converges to generate a defect detection model includes:
[0026] Freeze the network parameters of the remaining network structures of the initial defect detection model except the domain classifier and the classifier to obtain a first initial defect detection model;
[0027] Training the first initial defect detection model using a high-voltage cable insulation layer image sample dataset until the first initial defect detection model converges to obtain a second initial defect detection model;
[0028] Unfreeze the network parameters of the high-level convolutional layer of the second initial defect detection model to obtain a third initial defect detection model;
[0029] Training the third initial defect detection model using the high-voltage cable insulation layer image sample dataset until the third initial defect detection model converges to obtain a fourth initial defect detection model;
[0030] Unfreeze the network parameters of the bottom convolutional layer of the fourth initial defect detection model to obtain a fifth initial defect detection model;
[0031] The fifth initial defect detection model is trained using the high-voltage cable insulation layer image sample dataset until the fifth initial defect detection model converges to obtain a defect detection model.
[0032] Based on the above method embodiment, the present invention provides a corresponding device embodiment;
[0033] An embodiment of the present invention provides a high-voltage cable insulation layer defect detection device, comprising: a data acquisition module, a defect detection module, and a defect detection model construction module;
[0034] The data acquisition module is used to acquire a surface texture image to be detected and an internal transmittance distribution image to be detected of the insulation layer of the high-voltage cable to be detected;
[0035] The defect detection module is used to input the surface texture image to be detected and the internal transmittance distribution image to be detected into the defect detection model, so that the defect detection model outputs the detection result of the insulation layer of the high-voltage cable to be detected; wherein the detection result includes: no defect, crack defect and bubble defect;
[0036] The defect detection model construction module is used to obtain a high-voltage cable insulation layer image sample dataset; the high-voltage cable insulation layer image sample dataset includes several high-voltage cable insulation layer image sample subsets, each high-voltage cable insulation layer image sample subset includes a surface texture image sample of the high-voltage cable insulation layer image sample, an internal transmittance distribution image sample of the high-voltage cable insulation layer image sample and annotated detection results of the high-voltage cable insulation layer image sample; an initial defect detection model is constructed, and the initial defect detection model is iteratively trained with the high-voltage cable insulation layer image sample dataset until the initial defect detection model converges, thereby generating a defect detection model; in each iterative training, the initial defect detection model extracts surface crack features of the surface texture image sample and internal bubble features of the internal transmittance distribution image sample, generates fusion features based on the surface crack features and the internal bubble features, and outputs the predicted detection results of the high-voltage cable insulation layer image sample based on the fusion features.
[0037] Furthermore, the constructing of the initial defect detection model includes:
[0038] Obtain the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model;
[0039] The feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are cross-domain spliced to obtain a multi-source feature splicing layer;
[0040] Construct a domain classifier and a gradient reversal layer, and then concatenate the multi-source feature concatenation layer, the gradient reversal layer, and the domain classifier to obtain a multi-source feature fusion layer.
[0041] Perform domain adversarial training and distribution alignment on the multi-source feature fusion layer to obtain the feature extraction layer of the initial defect detection model;
[0042] Build the input layer, variable convolutional layer, and classifier of the initial defect detection model;
[0043] The input layer, feature extraction layer, variable convolution layer, and classifier of the initial defect detection model are concatenated to obtain the initial defect detection model.
[0044] Furthermore, cross-domain feature splicing of the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to obtain a multi-source feature splicing layer includes:
[0045] Adjust the feature extraction layers of the natural scene crack model, the industrial metal defect model, and the medical image layered model to the same dimension;
[0046] The feature extraction layer of the adjusted natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are feature spliced at the same dimension to obtain a multi-source feature splicing layer.
[0047] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the high-voltage cable insulation layer defect detection method described in the above-mentioned embodiment of the invention.
[0048] Another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the high-voltage cable insulation layer defect detection method described in the above-mentioned embodiment of the invention.
[0049] The following beneficial effects are achieved by implementing the present invention:
[0050] A method, apparatus, terminal device, and storage medium for detecting defects in the insulation layer of a high-voltage cable. This method obtains a dataset of high-voltage cable insulation layer image samples and constructs an initial defect detection model. The initial defect detection model is then iteratively trained using the dataset. This allows the initial defect detection model to learn the features of the surface texture image and internal transmittance distribution image of the high-voltage cable insulation layer during training, thereby generating a defect detection model capable of detecting defects in the high-voltage cable insulation layer based on the features of the surface texture image and internal transmittance distribution image of the high-voltage cable insulation layer. When defect detection of the high-voltage cable insulation layer is required, only the surface texture image and internal transmittance distribution image to be detected need to be input into the defect detection model. The model then extracts features and outputs the detection results. This effectively addresses the low detection efficiency and high subjectivity inherent in manual defect detection of high-voltage cable insulation layers in existing technologies, thereby improving the efficiency and accuracy of defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The figure is a flow chart of a method for detecting defects in the insulation layer of a high-voltage cable provided by one embodiment of the present invention.
[0052] Figure 2 The figure is a schematic structural diagram of a high-voltage cable insulation layer defect detection device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0054] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0056] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0057] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0058] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0059] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0060] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.
[0061] like Figure 1 FIG. 1 is a method for detecting defects in the insulation layer of a high-voltage cable provided by an embodiment of the present invention, comprising:
[0062] Step S1: Acquire a surface texture image and an internal transmittance distribution image of the insulation layer of the high-voltage cable to be inspected;
[0063] Step S2: Inputting the surface texture image to be inspected and the internal transmittance distribution image to be inspected into a defect detection model, so that the defect detection model outputs a detection result of the insulation layer of the high-voltage cable to be inspected; wherein the detection result includes: no defect, crack defect and bubble defect;
[0064] In step S1, for the high-voltage cable insulation layer, defects mainly occur in the form of surface cracks and internal bubbles. Therefore, when detecting defects in the high-voltage cable insulation layer, the visible light imaging unit is used to capture a surface texture image of the high-voltage cable insulation layer to be inspected, and the near-infrared imaging unit is used to capture an internal transmittance distribution image of the high-voltage cable insulation layer to be inspected.
[0065] Preferably, after obtaining the surface texture image to be detected and the internal transmittance distribution image to be detected, data synchronization, spatial registration, image enhancement and other processing may be performed on the obtained images.
[0066] For step S2, the surface texture image to be detected and the internal transmittance distribution image to be detected obtained in step S1 are input into the defect detection model, and the surface crack features and internal bubble features of the surface texture image to be detected are extracted by the defect detection model, and the surface crack features and the internal bubble features are fused to obtain fused features. The probability of the existence of crack defects and the probability of the existence of bubble defects are determined according to the fused features, and the probability of the existence of crack defects in the fused features is compared with the preset crack defect threshold to determine whether there is a crack defect. If it exceeds the preset crack defect threshold, it is considered that there is a crack defect, and the detection result is a crack defect; the probability of the existence of bubble defects in the fused features is compared with the preset bubble defect threshold to determine whether there is a bubble defect; if neither the bubble defect nor the crack defect exists, the detection result is no defect.
[0067] The construction of the above defect detection model includes:
[0068] Step S201: Acquire a high-voltage cable insulation layer image sample dataset; the high-voltage cable insulation layer image sample dataset includes a plurality of high-voltage cable insulation layer image sample subsets, each high-voltage cable insulation layer image sample subset including a surface texture image sample of the high-voltage cable insulation layer image sample, an internal transmittance distribution image sample of the high-voltage cable insulation layer image sample, and a labeled detection result of the high-voltage cable insulation layer image sample;
[0069] Step S202: constructing an initial defect detection model;
[0070] Step S203: The initial defect detection model is iteratively trained using a high-voltage cable insulation layer image sample data set until the initial defect detection model converges, thereby generating a defect detection model; in each iterative training, the initial defect detection model extracts the surface crack features of the surface texture image samples and the internal bubble features of the internal transmittance distribution image samples, generates fusion features based on the surface crack features and the internal bubble features, and outputs the predicted detection results of the high-voltage cable insulation layer image samples based on the fusion features.
[0071] For step S201, surface texture image samples and internal transmittance distribution image samples are collected for several high-voltage cable insulation layer samples with known inspection results of no defects, known inspection results of crack defects, and known inspection results of bubble defects, through a visible light imaging unit and a near-infrared imaging unit. For each high-voltage cable insulation layer sample, a high-voltage cable insulation layer image sample subset is generated based on the surface texture image sample of the high-voltage cable insulation layer image sample, the internal transmittance distribution image sample of the high-voltage cable insulation layer image sample, and the annotated inspection results of the high-voltage cable insulation layer image sample, and a high-voltage cable insulation layer image sample dataset is constructed based on the high-voltage cable insulation layer image sample subset.
[0072] The constructed high-voltage cable insulation layer image sample dataset provides a data basis for subsequent model transfer learning and training.
[0073] Regarding step S202, constructing an initial defect detection model based on transfer learning. In the present invention, in order to reduce the training cost of the defect detection model and the dependence on the number of training samples, transfer learning is used to construct the initial defect detection model, and then the defect detection model is constructed by fine-tuning and layered training of the initial defect detection model.
[0074] In a preferred embodiment, the construction of the initial defect detection model includes: obtaining a feature extraction layer of a natural scene crack model, a feature extraction layer of an industrial metal defect model, and a feature extraction layer of a medical image hierarchical model; performing cross-domain feature splicing on the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image hierarchical model to obtain a multi-source feature splicing layer; constructing a domain classifier and a gradient reversal layer, splicing the multi-source feature splicing layer, the gradient reversal layer, and the domain classifier to obtain a multi-source feature fusion layer; performing domain adversarial training and distribution alignment on the multi-source feature fusion layer to obtain the feature extraction layer of the initial defect detection model; constructing the input layer, variable convolution layer, and classifier of the initial defect detection model; splicing the input layer, feature extraction layer, variable convolution layer, and classifier of the initial defect detection model to obtain the initial defect detection model.
[0075] Specifically, the purpose of transfer learning is to introduce the existing perfect model structure and network parameters into the initial defect detection model to be constructed by the present invention through transfer learning.
[0076] Before performing transfer learning, the data required for transfer learning must be prepared. Because the defect detection model of the present invention is applicable to defect detection in high-voltage cable insulation, three models were selected for transfer learning: a natural scene crack model, an industrial metal defect model, and a medical image layered model. These three models are mature models trained based on natural scene crack datasets, industrial metal defect datasets, and medical image layered datasets. Specifically, for the natural scene crack dataset, the input is a 512×512 RGB image, the pre-trained model is ResNet50 (ImageNet-Crack), which is used to extract global texture features, and the output dimension is 1024; for the industrial metal dataset, the input is a 256×256 grayscale image, the pre-trained model is EfficientNet-B4 (NEU-MET), which is used to extract local micro-defect features, and the output dimension is 1792; for the medical image layered dataset, the input is a 512×512 16-bit grayscale image, the pre-trained model is UNet (LIDC-IDRI), which is used for material layered structure features, and the output is multi-scale features (64×64→512×512).
[0077] By acquiring the feature extraction layers of these three models and then performing cross-domain feature splicing on them, the resulting multi-source feature splicing layer can be endowed with the ability to identify material hierarchical structures, extract global texture features, and extract local microscopic defect features. The material hierarchical structure identification capability enables delamination detection of high-voltage cable insulation layers, the global texture feature extraction capability improves the detection of surface crack features within high-voltage cable insulation layers, and the local microscopic defect feature extraction capability improves the detection of internal air bubbles within high-voltage cable insulation layers.
[0078] In a preferred embodiment, the cross-domain feature stitching of the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to obtain a multi-source feature stitching layer includes: adjusting the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to the same dimension; and feature stitching of the adjusted feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model under the same dimension to obtain a multi-source feature stitching layer.
[0079] Specifically, since the natural scene crack model, industrial metal defect model and medical image stratification model are trained based on data of different dimensions, before splicing the feature extraction layers of these three models, the dimensions of the three models must be synchronized first so that the feature extraction layers of the three models are in the same dimension. The feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model and the feature extraction layer of the medical image stratification model in the same dimension are then feature spliced to obtain a multi-source feature splicing layer.
[0080] The purpose of this processing is to integrate the multi-source feature splicing layer's ability to extract surface crack features and internal bubble features, so that it has the ability to extract surface crack features and internal bubble features.
[0081] After obtaining the multi-source feature concatenation layer, a domain classifier (usually a fully connected layer) and a gradient reversal layer must be constructed. By concatenating the multi-source feature concatenation layer, the gradient reversal layer, and the domain classifier, a multi-source feature fusion layer is obtained. The purpose of constructing the gradient reversal layer and domain classifier here is to generalize the multi-source feature fusion layer's classification capabilities for target domain features through domain adversarial training and distribution alignment, making it suitable for feature recognition in the target domain (high-voltage cable insulation layer), while retaining the feature extraction and classification capabilities of the source domain.
[0082] In a preferred embodiment, domain adversarial training and distribution alignment are performed on the multi-source feature fusion layer to obtain a feature extraction layer of an initial defect detection model, including: obtaining a high-voltage cable insulation layer image sample dataset, a natural scene crack dataset, an industrial metal defect dataset, and a medical image layered dataset; using the high-voltage cable insulation layer image sample dataset as target domain data and annotating the data source as target domain data; using the natural scene crack dataset, the industrial metal defect dataset, and the medical image layered dataset as source domain data and annotating the data source as source domain data; after extracting features from the target domain data and the source domain data through the multi-source feature splicing layer, alternately inputting the target domain data and the source domain data into a domain classifier through a gradient reversal layer so that the domain classifier outputs the data source until the domain adaptation loss of the domain classifier is minimized, thereby completing the domain adversarial training of the multi-source feature fusion layer; wherein the gradient reversal layer is used to invert the gradient during back propagation; calculating the maximum mean difference loss based on the features of the target domain data extracted by the multi-source feature splicing layer and the features of the source domain data extracted by the multi-source feature splicing layer, and updating the gradient of the multi-source feature splicing layer based on the maximum mean difference loss to obtain the feature extraction layer of the initial defect detection model.
[0083] Specifically, domain adversarial training is essentially adversarial training between the target domain data (high-voltage cable insulation layer image samples) and multi-source domain data using the multi-source feature concatenation layer. The role of the gradient reversal layer in domain adversarial training is to directly input features into the domain classifier during forward propagation. During backward propagation, the gradient is multiplied by the dynamic coefficient before being input into the domain classifier, making it unable to distinguish the source of features, thereby making it suitable for feature classification of target domain data. For the domain classifier, its domain adaptation loss (i.e., domain adversarial loss) can be expressed as: Among them, d represents the real data source label, Indicates the source label of the predicted data. The gradient reversal layer reverses the gradient direction (valid only during back propagation), making the parameter update direction of the feature extractor opposite to that of the domain classifier (the multi-source feature splicing layer maximizes L domain , the domain classifier minimizes L domain ), ultimately achieving domain-invariant feature extraction. When the domain adaptation loss of the domain classifier is minimized, the domain adversarial training of the multi-source feature fusion layer is completed.
[0084] Preferably, combined with the classifier loss of the initial defect detection model, after considering the domain adaptation loss, the loss function of the initial defect detection model can be expressed as:
[0085]
[0086] Among them, L total represents the total loss function of the initial defect detection model; represents the classification loss of the classifier; represents the domain adaptation loss of the domain classifier; λ is The weight coefficient is dynamically adjusted with training (gradually increasing from 0 to 1).
[0087] Based on the features of the target domain data extracted by the multi-source feature splicing layer and the features of the source domain data extracted by the multi-source feature splicing layer, the maximum mean difference (MMD) is used to measure the distance between the target domain features and the source domain features in the regenerated kernel Hilbert space (RKHS) through the kernel function. At the same time, the maximum mean difference loss is added to the total loss function. The gradient of the multi-source feature splicing layer is updated according to the maximum mean difference loss. The kernel width of the kernel function is dynamically adjusted according to the distribution of target domain features and source domain features to minimize the difference in the distribution of source and target domain features and improve the alignment effect. After minimizing the difference in the distribution of source and target domain features, the feature extraction layer of the initial defect detection model is obtained. In addition, the maximum mean difference loss is added to the total loss function of the initial defect detection model.
[0088] The multi-source feature fusion layer, which has undergone domain adversarial training and distribution alignment, serves as the feature extraction layer of the initial defect detection model, extracting surface crack features and internal bubble features. Furthermore, the input layer of the initial defect detection model must be constructed to input the surface texture image and internal transmittance distribution image. Deformable convolutional layers and classifiers are constructed. These layers are the primary targets for fine-tuning network parameters after transfer learning.
[0089] It should be noted that the role of the deformable convolution layer is mainly to introduce a learnable offset and dynamically adjust the convolution kernel sampling points to adapt to the geometric features of the high-voltage cable surface and improve the detection accuracy of cracks on the curved surface of the high-voltage cable insulation layer. At the same time, the variable convolution layer can cope with the perspective changes and occlusion of the surface of the high-voltage cable insulation layer. By offsetting and compensating the defect information, the comprehensiveness of the initial defect detection model in extracting surface crack features can be improved, thereby improving the stability of the model detection. For the learnable offset, the offset (Δx, Δy) of each sampling point is predicted through an additional convolution layer. Its mathematical expression is as follows:
[0090]
[0091] Among them, p k is the standard convolution kernel position; Δp k is the predicted offset, Δp k =(Δx k ,Δy k ).
[0092] For step S203, in a preferred embodiment, the initial defect detection model is iteratively trained with a high-voltage cable insulation layer image sample dataset until the initial defect detection model converges, thereby generating a defect detection model, including: freezing the network parameters of the remaining network structures of the initial defect detection model except the domain classifier and the classifier to obtain a first initial defect detection model; training the first initial defect detection model with a high-voltage cable insulation layer image sample dataset until the first initial defect detection model converges to obtain a second initial defect detection model; unfreezing the network parameters of the high-level convolutional layer of the second initial defect detection model to obtain a third initial defect detection model; training the third initial defect detection model with a high-voltage cable insulation layer image sample dataset until the third initial defect detection model converges to obtain a fourth initial defect detection model; unfreezing the network parameters of the bottom-level convolutional layer of the fourth initial defect detection model to obtain a fifth initial defect detection model; training the fifth initial defect detection model with a high-voltage cable insulation layer image sample dataset until the fifth initial defect detection model converges to obtain a defect detection model.
[0093] Specifically, after the initial defect detection model is constructed, the initial defect detection model is trained through a layered unfreezing strategy.
[0094] First, freeze the network parameters of the initial defect detection model except for the domain classifier and the classifier. That is, freeze all convolutional layers, and only train the classification head in this round of training. Train the first initial defect detection model on a dataset of high-voltage cable insulation layer images until convergence, resulting in a second initial defect detection model.
[0095] It should be noted that during the training process, a penalty term for parameter changes must be introduced into the loss function to prevent the model from deviating too much from the network parameters of the model determined in transfer learning during training and to reduce catastrophic forgetting. The total loss function of the model after introducing the penalty term can be expressed as:
[0096]
[0097] Among them, L total represents the total loss function of the initial defect detection model; L task represents the classification loss of the classifier; λ(t) is the time-varying attenuation coefficient, which controls the constraint strength, and t is the training round; θ i is the network parameter of the previous model; θ pre,i The initial network parameters introduced for transfer learning; S is the set of frozen layer parameter indices.
[0098] After introducing the penalty term, during training, when updating the network parameters for each iteration, the value of λ(t) is calculated based on the current training round t and added to the total loss function. This constraint penalizes excessive deviations from the initial network parameters, thereby maintaining the stability of the model in the target domain task.
[0099] In addition, during the back-propagation process, the contribution of the constraint term to the gradient can be expressed as:
[0100]
[0101] in, Represents the gradient of task loss, driving the parameters to update towards the optimization target; 2λ(t)(θ i -θ pre,i ) is the gradient of the constraint term, which pulls the network parameters of the current model toward the initial network parameters to prevent excessive drift. When λ(t) is high, the constraint term plays a dominant role, parameter updates are limited, and the model is more stable. When λ(t) is low, the task loss plays a dominant role, allowing the model to flexibly adapt to new tasks.
[0102] After obtaining the second initial defect detection model, the network parameters of the high-level convolutional layers (the 4th and 5th convolutional layers) of the second initial defect detection model are unfrozen to obtain the third initial defect detection model; the purpose is to enable the high-level convolutional layers to learn domain-invariant features. The third initial defect detection model is trained using a high-voltage cable insulation layer image sample dataset until the third initial defect detection model converges, thereby obtaining the fourth initial defect detection model. Finally, the network parameters of the bottom-level convolutional layers (the 2nd and 3rd convolutional layers) of the fourth initial defect detection model are unfrozen to obtain the fifth initial defect detection model; the fifth initial defect detection model is trained using a high-voltage cable insulation layer image sample dataset until the fifth initial defect detection model converges, thereby obtaining the defect detection model.
[0103] Preferably, during the training process, important parameters are identified by calculating the Fisher information matrix of the parameters to prevent these important parameters from changing significantly during the update process.
[0104] When a new sample is detected, it is added to the long-term memory module of the edge server. Based on historical data, the association rules between defects and stripping process parameters are mined, and the contribution of defect characteristics to gradient backpropagation in the model update layer is analyzed. When the migration deep learning model detects a new defect on the cable surface, it generates treatment strategies and process parameter optimization recommendations, while also updating the model training data.
[0105] It should be noted that the initial defect detection model extracts surface crack features from surface texture image samples and internal bubble features from internal transmittance distribution image samples. Fusion features are generated based on these features, specifically categorized as early fusion, mid-term fusion, and late fusion. Early fusion includes data preprocessing: denoising, contrast enhancement, and geometric correction are performed on surface texture image samples; and non-uniformity correction and radiometric calibration are performed on internal transmittance distribution image samples. Multiscale decomposition: Discrete wavelet transform is used to decompose the preprocessed surface texture image samples into low-frequency (LL), horizontal high-frequency (LH), vertical high-frequency (HL), and diagonal high-frequency (HH) subbands. Contourlet transform is used to decompose the preprocessed internal transmittance distribution image samples into multi-directional subbands. Pixel-level fusion: For low-frequency component fusion, weights are dynamically adjusted based on the modal signal-to-noise ratio using a weighted average method. For high-frequency component fusion, the maximum value is extracted and high-frequency maximum fusion is performed to preserve edge and texture details. Inverse transform reconstruction: The fused subbands are reconstructed into an enhanced image using an inverse wavelet transform or inverse Contourlet transform. Mid-term fusion and early fusion are processed in parallel. Mid-term fusion: Feature extraction: For surface texture image samples, surface crack features are extracted; for internal transmittance distribution image samples, internal bubble features are extracted. Trans-membrane state attention: Using the trans-membrane state attention mechanism, surface crack features and internal bubble features are fused to obtain fused features, and the fused features are weighted. Spatio-temporal convolution modeling: By jointly modeling the spatial and temporal dimensions, that is, the single-frame image features and the dimensional information of dynamic changes between frames, the motion patterns and state evolution in multiple frames of high-voltage cable insulation layer image samples (that is, continuous frame images collected by the visible light imaging unit and the near-infrared imaging unit) are captured to obtain dynamic features in continuous frames. Feature splicing: Features of different modalities are spliced along the channel dimension to obtain the final fused features. Late fusion: The classifier outputs the probability of crack defects and the probability of bubble defects, determines which defect exists based on the threshold, and outputs the detection results. Preferably, when only the presence of a defect needs to be determined without determining the defect type, a weight can be assigned based on the confidence level, and the crack defect probability and bubble defect probability can be dynamically weighted and fused to obtain a final probability. Based on the final probability and a preset defect threshold, the presence of a defect in the high-voltage cable insulation layer can be determined. When a defect in the high-voltage cable insulation layer is detected, a control instruction is triggered to drive the high-voltage cable outer semi-conductive layer stripping equipment, achieving end-to-end real-time control.
[0106] Based on the above method embodiments, the present invention provides corresponding device embodiments.
[0107] like Figure 2 As shown, an embodiment of the present invention provides a high-voltage cable insulation layer defect detection device, comprising: a data acquisition module, a defect detection module and a defect detection model construction module;
[0108] The data acquisition module is used to acquire a surface texture image to be detected and an internal transmittance distribution image to be detected of the insulation layer of the high-voltage cable to be detected;
[0109] The defect detection module is used to input the surface texture image to be detected and the internal transmittance distribution image to be detected into the defect detection model, so that the defect detection model outputs the detection result of the insulation layer of the high-voltage cable to be detected; wherein the detection result includes: no defect, crack defect and bubble defect;
[0110] The defect detection model construction module is used to obtain a high-voltage cable insulation layer image sample dataset; the high-voltage cable insulation layer image sample dataset includes several high-voltage cable insulation layer image sample subsets, each high-voltage cable insulation layer image sample subset includes a surface texture image sample of the high-voltage cable insulation layer image sample, an internal transmittance distribution image sample of the high-voltage cable insulation layer image sample and annotated detection results of the high-voltage cable insulation layer image sample; an initial defect detection model is constructed, and the initial defect detection model is iteratively trained with the high-voltage cable insulation layer image sample dataset until the initial defect detection model converges, thereby generating a defect detection model; in each iterative training, the initial defect detection model extracts surface crack features of the surface texture image sample and internal bubble features of the internal transmittance distribution image sample, generates fusion features based on the surface crack features and the internal bubble features, and outputs the predicted detection results of the high-voltage cable insulation layer image sample based on the fusion features.
[0111] In a preferred embodiment, the constructing of the initial defect detection model includes:
[0112] Obtain the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model;
[0113] The feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are cross-domain spliced to obtain a multi-source feature splicing layer;
[0114] Construct a domain classifier and a gradient reversal layer, and then concatenate the multi-source feature concatenation layer, the gradient reversal layer, and the domain classifier to obtain a multi-source feature fusion layer.
[0115] Perform domain adversarial training and distribution alignment on the multi-source feature fusion layer to obtain the feature extraction layer of the initial defect detection model;
[0116] Build the input layer, variable convolutional layer, and classifier of the initial defect detection model;
[0117] The input layer, feature extraction layer, variable convolution layer, and classifier of the initial defect detection model are concatenated to obtain the initial defect detection model.
[0118] In a preferred embodiment, cross-domain feature splicing of the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to obtain a multi-source feature splicing layer includes:
[0119] Adjust the feature extraction layers of the natural scene crack model, the industrial metal defect model, and the medical image layered model to the same dimension;
[0120] The feature extraction layer of the adjusted natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are feature spliced at the same dimension to obtain a multi-source feature splicing layer.
[0121] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive effort.
[0122] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0123] Based on the above method embodiment, the present invention provides a corresponding terminal device embodiment.
[0124] An embodiment of the present invention provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a high-voltage cable insulation layer defect detection method as described in any one of the present inventions is implemented.
[0125] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0126] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.
[0127] The memory can be used to store the computer program, and the processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0128] Based on the above method embodiment, the present invention provides a corresponding storage medium embodiment.
[0129] An embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a high-voltage cable insulation layer defect detection method as described in any one of the present inventions.
[0130] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. The computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium.
[0131] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for detecting defects in the insulation layer of a high-voltage cable, characterized in that: include: Acquire a surface texture image to be inspected and an internal transmittance distribution image to be inspected of the insulation layer of the high-voltage cable to be inspected; Inputting the surface texture image to be inspected and the internal transmittance distribution image to be inspected into a defect detection model, so that the defect detection model outputs a detection result of the insulation layer of the high-voltage cable to be inspected; wherein the detection result includes: no defect, crack defect and bubble defect; The construction of the defect detection model includes: Acquire a high-voltage cable insulation layer image sample dataset; the high-voltage cable insulation layer image sample dataset includes a plurality of high-voltage cable insulation layer image sample subsets, each high-voltage cable insulation layer image sample subset includes a surface texture image sample of the high-voltage cable insulation layer image sample, an internal transmittance distribution image sample of the high-voltage cable insulation layer image sample, and a labeled detection result of the high-voltage cable insulation layer image sample; An initial defect detection model is constructed, and the initial defect detection model is iteratively trained using a high-voltage cable insulation layer image sample dataset until the initial defect detection model converges, generating a defect detection model; in each iterative training, the initial defect detection model extracts surface crack features of surface texture image samples and internal bubble features of internal transmittance distribution image samples, generates fusion features based on the surface crack features and the internal bubble features, and outputs the predicted detection results of the high-voltage cable insulation layer image samples based on the fusion features.
2. A method for detecting defects in the insulation layer of a high-voltage cable according to claim 1, characterized in that: The constructing of the initial defect detection model includes: Obtain the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model; The feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are cross-domain spliced to obtain a multi-source feature splicing layer; Construct a domain classifier and a gradient reversal layer, and then concatenate the multi-source feature concatenation layer, the gradient reversal layer, and the domain classifier to obtain a multi-source feature fusion layer. Perform domain adversarial training and distribution alignment on the multi-source feature fusion layer to obtain the feature extraction layer of the initial defect detection model; Build the input layer, variable convolutional layer, and classifier of the initial defect detection model; The input layer, feature extraction layer, variable convolution layer, and classifier of the initial defect detection model are concatenated to obtain the initial defect detection model.
3. A method for detecting defects in the insulation layer of a high-voltage cable according to claim 2, characterized in that: The cross-domain feature splicing of the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to obtain a multi-source feature splicing layer includes: Adjust the feature extraction layers of the natural scene crack model, the industrial metal defect model, and the medical image layered model to the same dimension; The feature extraction layer of the adjusted natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are feature spliced at the same dimension to obtain a multi-source feature splicing layer.
4. A method for detecting defects in the insulation layer of a high-voltage cable according to claim 3, characterized in that: The multi-source feature fusion layer is subjected to domain adversarial training and distribution alignment to obtain the feature extraction layer of the initial defect detection model, including: Obtain high-voltage cable insulation layer image sample datasets, natural scene crack datasets, industrial metal defect datasets, and medical image layered datasets; The high-voltage cable insulation layer image sample dataset is used as the target domain data, and the data source is annotated as the target domain data; the natural scene crack dataset, industrial metal defect dataset, and medical image layered dataset are used as the source domain data, and the data source is annotated as the source domain data; After the target domain data and the source domain data are extracted through the multi-source feature splicing layer, they are alternately input into the domain classifier through the gradient reversal layer so that the domain classifier outputs the data source until the domain adaptation loss of the domain classifier is minimized, completing the domain adversarial training of the multi-source feature fusion layer; wherein the gradient reversal layer is used to reverse the gradient during back propagation; According to the features of the target domain data extracted by the multi-source feature splicing layer and the features of the source domain data extracted by the multi-source feature splicing layer, the maximum mean difference loss is calculated, and the gradient of the multi-source feature splicing layer is updated according to the maximum mean difference loss to obtain the feature extraction layer of the initial defect detection model.
5. A method for detecting defects in the insulation layer of a high-voltage cable according to claim 4, characterized in that: The iterative training of the initial defect detection model using the high-voltage cable insulation layer image sample dataset until the initial defect detection model converges to generate a defect detection model includes: Freeze the network parameters of the remaining network structures of the initial defect detection model except the domain classifier and the classifier to obtain a first initial defect detection model; Training the first initial defect detection model using a high-voltage cable insulation layer image sample dataset until the first initial defect detection model converges to obtain a second initial defect detection model; Unfreeze the network parameters of the high-level convolutional layer of the second initial defect detection model to obtain a third initial defect detection model; Training the third initial defect detection model using the high-voltage cable insulation layer image sample dataset until the third initial defect detection model converges to obtain a fourth initial defect detection model; Unfreeze the network parameters of the bottom convolutional layer of the fourth initial defect detection model to obtain a fifth initial defect detection model; The fifth initial defect detection model is trained using the high-voltage cable insulation layer image sample dataset until the fifth initial defect detection model converges to obtain a defect detection model.
6. A high-voltage cable insulation layer defect detection device, characterized in that: include: Data acquisition module, defect detection module and defect detection model building module; The data acquisition module is used to acquire a surface texture image to be detected and an internal transmittance distribution image to be detected of the insulation layer of the high-voltage cable to be detected; The defect detection module is used to input the surface texture image to be detected and the internal transmittance distribution image to be detected into the defect detection model, so that the defect detection model outputs the detection result of the insulation layer of the high-voltage cable to be detected; wherein the detection result includes: no defect, crack defect and bubble defect; The defect detection model construction module is used to obtain a high-voltage cable insulation layer image sample dataset; the high-voltage cable insulation layer image sample dataset includes several high-voltage cable insulation layer image sample subsets, each high-voltage cable insulation layer image sample subset includes a surface texture image sample of the high-voltage cable insulation layer image sample, an internal transmittance distribution image sample of the high-voltage cable insulation layer image sample and annotated detection results of the high-voltage cable insulation layer image sample; an initial defect detection model is constructed, and the initial defect detection model is iteratively trained with the high-voltage cable insulation layer image sample dataset until the initial defect detection model converges, thereby generating a defect detection model; in each iterative training, the initial defect detection model extracts surface crack features of the surface texture image sample and internal bubble features of the internal transmittance distribution image sample, generates fusion features based on the surface crack features and the internal bubble features, and outputs the predicted detection results of the high-voltage cable insulation layer image sample based on the fusion features.
7. A high-voltage cable insulation layer defect detection device according to claim 6, characterized in that: The constructing of the initial defect detection model includes: Obtain the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model; The feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are cross-domain spliced to obtain a multi-source feature splicing layer; Construct a domain classifier and a gradient reversal layer, and then concatenate the multi-source feature concatenation layer, the gradient reversal layer, and the domain classifier to obtain a multi-source feature fusion layer. Perform domain adversarial training and distribution alignment on the multi-source feature fusion layer to obtain the feature extraction layer of the initial defect detection model; Build the input layer, variable convolutional layer, and classifier of the initial defect detection model; The input layer, feature extraction layer, variable convolution layer, and classifier of the initial defect detection model are concatenated to obtain the initial defect detection model.
8. A high-voltage cable insulation layer defect detection device according to claim 7, characterized in that: The cross-domain feature splicing of the feature extraction layer of the natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model to obtain a multi-source feature splicing layer includes: Adjust the feature extraction layers of the natural scene crack model, the industrial metal defect model, and the medical image layered model to the same dimension; The feature extraction layer of the adjusted natural scene crack model, the feature extraction layer of the industrial metal defect model, and the feature extraction layer of the medical image layered model are feature spliced at the same dimension to obtain a multi-source feature splicing layer.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a method for detecting defects in the insulation layer of a high-voltage cable according to any one of claims 1 to 5 is implemented.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the high-voltage cable insulation layer defect detection method according to any one of claims 1 to 5.