A defect identification method and system based on semi-supervised learning and change detection

By combining semi-supervised learning and change detection, and comparing image changes using unsupervised and supervised models, the problem of insufficient sample data in industrial hardware defect detection is solved, achieving fast and accurate defect identification and reducing sensitivity to changes in illumination.

CN120495299BActive Publication Date: 2026-02-27CHENGDU UNION BIG DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510985049.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2026-02-27
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

Existing technologies lack sample data for industrial hardware defect detection, which makes it impossible to transfer supervised learning, identify new defects, and make manual inspection costly and susceptible to human factors.

Method used

A method combining semi-supervised learning and change detection is adopted. By comparing images taken at different times under the same shooting conditions, a sample dataset is constructed. Defect identification is performed using unsupervised and supervised models. Data augmentation and feature exchange techniques are combined to generate rich sample data.

Benefits of technology

It reduces the cost of manual annotation, improves the accuracy of defect identification, can identify new defects, reduces sensitivity to changes in lighting, and achieves fast and accurate defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495299B_ABST
    Figure CN120495299B_ABST
Patent Text Reader

Abstract

The application provides a defect identification method and system based on semi-supervised learning and change detection, and relates to the field of defect detection.The method flow is as follows: single-time-phase images under different times and under the same shooting conditions are acquired, and the single-time-phase images are preprocessed to construct a sample data set; a defect identification model is constructed, and semi-supervised learning and change detection are performed on the defect identification model based on the sample data set to obtain a final defect identification model; wherein the defect identification model comprises an unsupervised model and a supervised model; and the single-time-phase images are subjected to defect identification by using the final defect identification model to obtain a defect identification result.The application detects defects by using the semi-supervised learning and change detection mode, collects part of samples in hardware defects, and detects defects by using the change detection mode, so that the manpower is reduced and the accuracy of defect identification detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of defect detection, in particular to a defect recognition method and system based on semi-supervised learning and change detection. BACKGROUND

[0002] In the industrial hardware production process, manual visual recognition is usually used for defect detection. However, manual detection is high in labor cost and is affected by subjective factors, which may result in over-detection or missed detection.

[0003] In order to save manpower and improve the defect detection rate of industrial hardware, traditional visual detection can be used for defect detection. However, traditional visual detection is sensitive to light, and cannot be used in machines with variable light sources. Then, a neural network based on supervised learning is proposed for defect detection. However, this method requires a large amount of defect data for learning, and it is difficult to provide a large amount of sample data in the field of industrial hardware. In addition, some defects may not have occurred before, which makes some supervised learning methods unable to migrate and lose the matching ability of new defects. SUMMARY

[0004] The present application provides a defect recognition method and system based on semi-supervised learning and change detection, which solves the problem of lack of sample data in existing industrial hardware defect detection, and the problem that some supervised learning methods cannot be migrated, resulting in a lack of new defect matching ability of the model.

[0005] In a first aspect, the present application provides a defect recognition method based on semi-supervised learning and change detection, which comprises the following steps:

[0006] Obtain single-time-phase images under different times and under the same shooting conditions, and pre-process the single-time-phase images to construct a sample data set;

[0007] Construct a defect recognition model, and perform semi-supervised learning and change detection on the defect recognition model based on the sample data set to obtain a final defect recognition model; wherein the defect recognition model comprises an unsupervised model and a supervised model;

[0008] Use the final defect recognition model to perform defect recognition on the single-time-phase images to obtain a defect recognition result.

[0009] In the above embodiment, the present application combines unsupervised learning and change detection and applies it to defect detection in the hardware field. By comparing images taken at different times under the same shooting conditions, the differences between the images are obtained, and the defect recognition and detection are realized.

[0010] As some optional embodiments of the present application, the pre-processing process of the single-time-phase image is as follows:

[0011] The single-time-phase images at different times under the same shooting condition are denoised, size-cropped, and image-scaled, and the partially denoised, size-cropped, and image-scaled single-time-phase images are feature-labeled;

[0012] A sample data set is constructed based on the unlabeled single-time-phase images and the labeled single-time-phase images.

[0013] In the above embodiments, the present application pre-processes the single-time-phase images, facilitating subsequent training of the defect recognition model.

[0014] As some optional embodiments of the present application, the process of semi-supervised learning and change detection of the defect recognition model based on the sample data set is as follows:

[0015] The unlabeled single-time-phase images are input into an unsupervised model for unsupervised training, and in the unsupervised training process, the unlabeled single-time-phase images are subjected to data enhancement, data disturbance, double-time-phase exchange, spatial and channel feature exchange, and global feature enhancement extraction.

[0016] The labeled single-time-phase images are input into a supervised model for supervised training, and in the supervised training process, the labeled single-time-phase images are subjected to random occlusion, data enhancement, and double-time-phase exchange.

[0017] In the above embodiments, the present application jointly performs data enhancement and data disturbance on a small amount of labeled samples, adds a constraint on time change, thereby generating a large number of double-time-phase images from single-time-phase images, enriching the number of sample data and reducing the cost of manual labeling.

[0018] As some optional embodiments of the present application, the process of data enhancement, data disturbance, double-time-phase exchange, spatial and channel feature exchange, and global feature enhancement extraction on the unlabeled single-time-phase images is as follows:

[0019] The unlabeled single-time-phase images are subjected to data enhancement to obtain enhanced images.

[0020] The enhanced images are subjected to data disturbance and double-time-phase exchange to obtain distorted images.

[0021] The enhanced images and the distorted images are subjected to feature extraction to obtain double-time-phase feature images.

[0022] The double-time-phase feature images are subjected to spatial feature exchange and channel feature exchange, and the double-time-phase feature images subjected to spatial feature exchange and channel feature exchange are subjected to global feature enhancement extraction to obtain resampled image features of the double-time-phase feature images.

[0023] In the above embodiments, the application can more effectively obtain the context relationship and frequency domain relationship of the image by performing spatial feature exchange and channel feature exchange on the dual-time-phase feature image, and performing global feature enhancement extraction on the dual-time-phase feature image subjected to spatial feature exchange and channel feature exchange.

[0024] As some optional embodiments of the application, the process of performing spatial feature exchange and channel feature exchange on the dual-time-phase feature image is as follows:

[0025] The feature extraction is performed on the dual-time-phase feature image, the image features are projected into a feature space, and the attention mechanism is introduced, and the distributed attention mechanism is used to adaptively reweight the spatial features related to the current position in the dual-time-phase feature image.

[0026] The feature extraction is performed on the dual-time-phase feature image, the image features are projected into a feature channel, and the attention mechanism is introduced, and the distributed attention mechanism is used to adaptively reweight the features related to the current channel in the dual-time-phase feature image.

[0027] In the above embodiments, the application faces a large number of pseudo-dual-time-phase images, and the model needs to fully learn the global features and the respective channel features and spatial features. In order to enhance the global features, the dual-time-phase features are projected into a feature space, and the global common features are obtained, and then the distributed attention mapping is used to adaptively reweight each channel of the dual-time-phase features. In order to fully obtain the channel features and the spatial features, the extracted features are exchanged, so as to learn the context information of the dual-time-phase features. And make the feature distribution of the two branches more similar, and automatically realize a certain degree of domain adaptation between the dual-time-phase domains.

[0028] As some optional embodiments of the application, the process of randomly occluding, data enhancing and dual-time-phase exchanging the labeled single-time-phase image is as follows:

[0029] Randomly selecting the single-time-phase image and the corresponding label to obtain a pseudo-dual-time-phase image and a corresponding label;

[0030] Performing dual-time-phase exchange on the pseudo-dual-time-phase image to obtain a time-symmetric image, and performing change detection label generation on the corresponding label of the pseudo-dual-time-phase image to obtain a corresponding change detection label.

[0031] In the above embodiments, the application applies change detection to the defect detection field to judge the change of defects in the same background. Change detection is a technology for identifying the region that has changed from one time point to another time point, thereby avoiding the false detection of unobserved feature defects.

[0032] In a second aspect, the present application provides a defect identification system based on semi-supervised learning and change detection, the system comprising:

[0033] an image data acquisition unit configured to acquire single-time-phase images at different times under the same shooting condition, and to pre-process the single-time-phase images to construct a sample data set;

[0034] a defect identification model unit configured to construct a defect identification model, and to perform semi-supervised learning and change detection on the defect identification model based on the sample data set to obtain a final defect identification model; wherein the defect identification model comprises an unsupervised model and a supervised model;

[0035] a defect identification detection unit configured to perform defect identification on the single-time-phase images using the final defect identification model to obtain a defect identification result.

[0036] In a third aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the defect identification method based on semi-supervised learning and change detection when executing the computer program.

[0037] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the defect identification method based on semi-supervised learning and change detection.

[0038] The present application has the following advantages: the present application uses a small amount of single-time-phase images to enhance double-time-phase images, solves the problems of small sample quantity and complex double-time-phase data labeling; at the same time, unsupervised learning and change detection are combined and applied to defect presence / absence detection in the hardware field, and by comparing images at different times under the same shooting condition, the differences between the images are obtained to realize defect identification and detection. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0040] Figure 1 is a schematic diagram of the computer device structure of the hardware running environment described in the embodiments of the present application;

[0041] Figure 2is a flowchart of the defect identification method based on semi-supervised learning and change detection described in the embodiments of the present application;

[0042] Figure 3 is a workflow diagram of the unsupervised model and the supervised model described in the embodiments of the present application;

[0043] Figure 4 is a flowchart of the training of the supervised model described in the embodiments of the present application. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are merely intended to explain the present application and not to limit the present application.

[0045] In order to solve the problem that the existing industrial hardware defect detection lacks sample data, and due to the partial migration of supervised learning, the model lacks new defect matching capability. The present application provides a defect identification method, system, device and storage medium based on semi-supervised learning and change detection. Before introducing the specific technical solutions of the present application, the hardware running environment involved in the embodiments of the present application is introduced.

[0046] Please refer to Figure 1 , Figure 1 is a computer device structure diagram of the hardware running environment involved in the embodiments of the present application.

[0047] As Figure 1 shown, the computer device can include a processor, such as a central processing unit (CPU), a communication bus, a user interface, a network interface, and a memory. The communication bus is used to realize the connection and communication between these components. The user interface can include a display, an input unit such as a keyboard, and optionally, the user interface can also include a standard wired interface, a wireless interface. The network interface can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity interface). The memory can be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as a magnetic disk memory, and the memory can optionally be a storage device independent of the aforementioned processor.

[0048] Those skilled in the art can understand that Figure 1 the structure shown in the foregoing description does not constitute a limitation on the computer device, and can include more or fewer components than the diagram, or combine certain components, or different component arrangements.

[0049] As Figure 1As shown, the memory as a storage medium can include an operating system, a network communication module, a user interface module, and an electronic program module.

[0050] In Figure 1 In the computer device shown, the network interface is mainly used for data communication with the network server; the user interface is mainly used for data interaction with the user; the processor and the memory in the computer device of the present application can be arranged in the computer device, the computer device calls the computer program product stored by the electronic program module through the processor, and executes the defect identification method based on semi-supervised learning and change detection provided by the embodiments of the present application.

[0051] Based on the hardware environment of the foregoing embodiments, the embodiments of the present application provide a defect identification method based on semi-supervised learning and change detection, please refer to Figure 2 , Figure 2 For the flowchart of the defect identification method based on semi-supervised learning and change detection, the method flow is as follows:

[0052] (1) Obtain single-time-phase images at different times under the same shooting conditions, and pre-process the single-time-phase images to construct a sample data set.

[0053] In the embodiments of the present application, the process of pre-processing the single-time-phase images is as follows:

[0054] (1.1) Denoising, size cropping, image scaling, etc. are performed on single-time-phase images at different times under the same shooting conditions, and part of the denoised, size-cropped, and image-scaled single-time-phase images are labeled with features.

[0055] (1.2) Construct a sample data set based on unlabeled single-time-phase images and labeled single-time-phase images.

[0056] (2) Construct a defect identification model, and perform semi-supervised learning and change detection on the defect identification model based on the sample data set to obtain a final defect identification model; wherein the defect identification model includes an unsupervised model and a supervised model.

[0057] In the embodiments of the present application, the process of performing semi-supervised learning and change detection on the defect identification model based on the sample data set is as follows:

[0058] (2.1) Input the unlabeled single-time-phase images into the unsupervised model for unsupervised training, and in the unsupervised training process, perform data enhancement, data disturbance, double-time-phase exchange, spatial and channel feature exchange, and global feature enhancement extraction on the unlabeled single-time-phase images.

[0059] In the embodiments of the present application, please refer to Figure 3 , Figure 3The workflow diagram of the unsupervised model and the supervised model is shown in the following:

[0060] (2.11) Data augmentation is performed on the N unlabeled single-time images to obtain augmented images .

[0061] In the embodiment of the present application, data augmentation is performed on the unlabeled single-time images , which can increase the diversity of data and expand the sample data amount. Specifically, the data augmentation method adopted in the embodiment of the present application is a data weak augmentation method, including random flipping and translation.

[0062] (2.12) Data disturbance and double-time exchange are performed on the augmented images to obtain distorted images .

[0063] In the embodiment of the present application, data disturbance is performed on the augmented images , which can enhance the types and semantic expressions of data and expand the sample data amount. Specifically, the data disturbance method adopted in the embodiment of the present application is a data strong augmentation method, including contrast change, histogram equalization, rotation, sharpening, brightness change and the like; preferably, 2-3 kinds of augmentation methods are randomly combined to form the augmented distorted images .

[0064] In the embodiment of the present application, the main purpose of the change detection is to detect "change", so the time sequence of the augmented images is not important, and the change of the sequence of the images input into the unsupervised training model does not affect the final change detection result. Therefore, the double-time exchange method is adopted, in the unsupervised training process, the positions of the two augmented images are exchanged to increase the time symmetry constraint and enrich the sample data types.

[0065] (2.13) Feature extraction is performed on the augmented images and the distorted images to obtain double-time feature images.

[0066] (2.14) The double-time feature images are input into the aggregated distribution model, the spatial feature exchange and the channel feature exchange of the double-time feature images are performed by the aggregated distribution model, and the global feature enhancement extraction of the double-time feature images subjected to the spatial feature exchange and the channel feature exchange is performed to obtain the resampled image features of the double-time feature images ;

[0067] Specifically, first, multi-stage feature extraction is performed on the dual-time-phase feature images respectively to obtain corresponding features. Then, spatial feature exchange and twice channel feature exchange are performed on the features. The basic idea of spatial feature exchange and channel feature exchange is to project the dual-time-phase features into a feature space and obtain global common features, and then use distributed attention mapping to adaptively reweight each channel of the dual-time-phase features.

[0068] Specifically, the process of spatial feature exchange and channel feature exchange on the dual-time-phase feature images is as follows:

[0069] (2.141) Feature extraction is performed on the dual-time-phase feature images, the image features are projected into a feature space, and an attention mechanism is introduced, and a distributed attention mechanism is used to adaptively reweight the spatial features related to the current position in the dual-time-phase feature images.

[0070] (2.142) Feature extraction is performed on the dual-time-phase feature images, the image features are projected into a feature channel, and an attention mechanism is introduced, and a distributed attention mechanism is used to adaptively reweight the features related to the current channel in the dual-time-phase feature images.

[0071] In addition, global feature enhancement extraction is performed on the dual-time-phase feature images subjected to spatial feature exchange and channel feature exchange, including using two multi-layer perception decoder (MLP Decoder) to extract common features, and using an activation function to obtain the final two attention mappings. Then, the misalignment problem in feature extraction is solved by a dual-flow alignment fusion network (FDAF Module), and the dual-time-phase feature images are resampled by a deformable field to obtain their respective corrected features .

[0072] Specifically, the process of global feature enhancement extraction on the dual-time-phase feature images subjected to spatial feature exchange and channel feature exchange is as follows:

[0073] (2.143) The features of the dual-time-phase feature images are element-wise added to obtain an element-wise added image, and global average pooling is performed on the element-wise added image to obtain a global pooled feature image.

[0074] (2.144) The global pooled feature image is activated and subjected to dual-flow alignment fusion processing to obtain a resampled image feature of the dual-time-phase feature images .

[0075] In the embodiments of the present application, considering that there is no label in unsupervised learning, the resampled image feature Data disturbance is performed again. In order to avoid partial confidence threshold interference, a confidence threshold filter is set, so as to obtain filtered resampled image features . And by calculating a loss function , the distance between the confidence threshold filtered resampled image features and the original feature map is continuously narrowed; wherein the original feature map is an original feature map of an unlabeled single time phase image .

[0076] (2.2) The labeled single time phase image is input into a supervised model for supervised training. In the supervised training process, the labeled single time phase image is randomly occluded, data enhanced, and double time phase exchanged.

[0077] In the embodiments of the present application, please refer to Figure 3 , Figure 3 is a workflow diagram of the unsupervised model and the supervised model, and the process of the supervised training is as follows:

[0078] (2.21) Twice random selection is performed on N single time phase images and corresponding labels , so as to obtain pseudo double time phase images and labels and pseudo double time phase images and , please refer to Figure 4 , Figure 4 is a process diagram of the supervised training.

[0079] (2.22) Data enhancement is performed on the pseudo double time phase images and labels and the pseudo double time phase images and , so as to generate more pseudo double time phase images and and corresponding labels and ; specifically, the data enhancement method adopted in the embodiments of the present application is a data weak enhancement method, including random flipping and translation.

[0080] (2.23) Double time phase exchange is performed on the pseudo double time phase images and , so as to obtain time symmetric images and , and change detection label generation is performed on the labels and , so as to obtain corresponding change detection labels .

[0081] At the same time, the pseudo-bi-temporal images and and the time-symmetry images and are subjected to feature extraction to obtain corresponding feature images; and the feature images are input into an aggregated distribution model, spatial feature exchange and channel feature exchange are performed on the feature images of the pseudo-bi-temporal images and and the time-symmetry images and by the aggregated distribution model, and global feature enhancement extraction is performed on the feature images subjected to the spatial feature exchange and the channel feature exchange, to obtain resampled image features of pseudo-bi-temporal features and , and the gap between the resampled image features and and the change detection labels is continuously narrowed by calculating loss functions and .

[0082] Specifically, in the supervised data enhancement process, strong enhancement and weak enhancement are adopted to expand the sample data. And the sensitivity of the model to the time change is reduced by increasing the combination of data exchange at different times. In the supervised learning process, firstly, the input N single temporal images and corresponding labels are randomly selected twice, and the obtained two groups of image pairs are paired to obtain a group of pseudo-bi-temporal images. Secondly, in order to further increase the number of pseudo-bi-temporal image groups, data enhancement (strong enhancement and weak enhancement, etc.) is adopted, and at the same time, the exclusive or operation is used to generate pseudo-change detection labels. Finally, the time similarity constraint is added, and the image pairs are doubled at the model input layer.

[0083] (3) The final defect recognition model is used for defect recognition on the single temporal images to obtain a defect recognition result.

[0084] In the embodiments of the present application, after supervised training and unsupervised training, the defect recognition model has the ability of defect recognition, and can realize fast and accurate defect recognition detection.

[0085] In summary, the present application converts the problem of recognizing defect types into the problem of detecting whether the region is "changed". By collecting part of the samples in hardware defects, the change detection method is used for defect detection, so as to reduce the manpower and improve the accuracy of defect recognition detection.

[0086] Further, in an embodiment, based on the same inventive concept as the foregoing embodiment, the present embodiment provides a defect identification system based on semi-supervised learning and change detection, which corresponds to the method one by one, and the system comprises:

[0087] an image data acquisition unit configured to acquire single-time-phase images at different times under the same shooting condition, and pre-process the single-time-phase images to construct a sample data set;

[0088] a defect identification model unit configured to construct a defect identification model, and perform semi-supervised learning and change detection on the defect identification model based on the sample data set to obtain a final defect identification model; wherein the defect identification model comprises an unsupervised model and a supervised model;

[0089] a defect identification detection unit configured to perform defect identification on the single-time-phase images by using the final defect identification model to obtain a defect identification result.

[0090] It should be noted that the units in the defect identification system based on semi-supervised learning and change detection in the present embodiment correspond to the steps in the defect identification method based on semi-supervised learning and change detection in the foregoing embodiment one by one, and therefore the specific embodiments and technical effects of the present embodiment can refer to the embodiments of the foregoing defect identification method based on semi-supervised learning and change detection, which will not be described herein again.

[0091] Further, in an embodiment, the present application also provides a computer device, which comprises a processor, a memory, and a computer program stored in the memory, and the computer program realizes the method in the foregoing embodiment when executed by the processor.

[0092] Further, in an embodiment, the present application also provides a computer storage medium, which stores a computer program, and the computer program realizes the method in the foregoing embodiment when executed by a processor.

[0093] In some embodiments, the computer readable storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM, etc. memory; or various devices comprising one or any combination of the above memories. The computer can be various computing devices including smart terminals and servers.

[0094] In some embodiments, the executable instructions can take the form of a program, software, software modules, scripts, or code, written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and they can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0095] By way of example, an executable instruction can, but need not, correspond to a file in a file system. An executable instruction can be stored in one or more files, in a portion of a file, in a single file that contains many instructions, in a single file that contains one or more instructions, in a single file that contains many instructions, in a single file that contains one or more instructions, in a single file that contains many instructions, or in many files.

[0096] By way of example, an executable instruction can be deployed to be executed on one computer, or on multiple computers of a system, or on multiple computers located at different sites, or on multiple computers distributed among multiple sites and interconnected via a communication network.

[0097] It has to be noted that, as used herein, the terms "comprising", "including", "containing", or any other any other variant are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises, includes or contains an element or list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a", "has... a", "includes... a", or "contains... a", does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises, includes or contains an element or list of elements. The terms "a" and "an" are defined as one or more unless explicitly indicated to the contrary.

[0098] The sequence numbers of the above-mentioned embodiments of the present application only describe, but not represent the advantages and disadvantages of the embodiments.

[0099] Those skilled in the art can clearly understand the above-mentioned embodiment methods by means of software and necessary general hardware platform, of course, they can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory, a random access memory, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device) to execute the methods described in the embodiments of the present application.

[0100] The above merely preferred embodiments of the present application and are not intended to limit the patent scope of the present application, any equivalent structure or equivalent process transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for defect identification based on semi-supervised learning and change detection, characterized in that, The method The method comprises the following steps: (1) acquiring single-phase images at different times under the same shooting condition, and pre-processing the single-phase images to construct a sample data set; (2) constructing a defect recognition model, and performing semi-supervised learning and change detection on the defect recognition model based on the sample data set to obtain a final defect recognition model; wherein the defect recognition model comprises an unsupervised model and a supervised model; The process of unsupervised training is as follows: (2.11) for N unlabeled single time phase images perform data augmentation to obtain augmented images ; (2.12) to the enhanced image data perturbation and two-phase swapping to obtain a distorted image ; (2.13) performing feature extraction on the enhanced image and the distorted image to obtain a dual-time-point feature image; (2.14) inputting the dual-time feature images into the aggregated distribution model, performing spatial feature exchange and channel feature exchange on the dual-time feature images by the aggregated distribution model, and performing global feature enhancement extraction on the dual-time feature images after the spatial feature exchange and the channel feature exchange, to obtain a resampling image feature of the dual-time feature images ; Furthermore, the resampled image features are extracted after the global feature enhancement model is applied. Perform another data perturbation and set a confidence threshold for filtering to obtain the filtered resampled image features. And by calculating the loss function This continuously narrows down the resampled image features filtered by the confidence threshold. Compared with the original feature map The difference in distance; wherein, the original feature map Unlabeled single-phase images The original feature map; The process of supervised training is as follows: (2.21) for N single time phase images and corresponding labels two random selections are made to obtain pseudo double time phase images and labels and pseudo double time phase images and ; (2.22) to pseudo dual time phase images and labels as well as pseudo dual time phase images and perform data augmentation to generate more pseudo dual time phase images and and corresponding labels and ; (2.23) performing a dual-phase exchange on the pseudo-dual-phase image and to obtain a time-symmetric image and and performing a change detection tag generation on the tags and to obtain a corresponding change detection tag ; And, the pseudo-dual time phase images and and the time symmetry images and are subjected to feature extraction to obtain corresponding feature images; and the feature images are input into an aggregated distribution model, and the feature images of the pseudo-dual time phase images and and the time symmetry images and are subjected to spatial feature exchange and channel feature exchange, and the feature images subjected to the spatial feature exchange and the channel feature exchange are subjected to global feature enhancement extraction to obtain resampled image features of pseudo-dual time phase features and , and the gap between the resampled image features and and the change detection labels is continuously narrowed down by calculating loss functions and . (3) using the final defect recognition model to perform defect recognition on the single-phase images to obtain a defect recognition result. 2.The defect identification method based on semi-supervised learning and change detection according to claim 1, characterized in that, The process of pre-processing the single-phase images is as follows: (1.1) denoising, size cropping and image scaling are performed on the single-phase images at different times under the same shooting condition, and part of the denoised, size-cropped and image-scaled single-phase images are feature-labeled; (1.2) constructing a sample data set based on the unlabeled single-phase images and the labeled single-phase images. 3.The defect identification method based on semi-supervised learning and change detection of claim 1, wherein, The process of spatial feature exchange and channel feature exchange of the dual-phase feature images is as follows: (2.141) feature extraction is performed on the dual-phase feature images, the image features are projected into a feature space, and an attention mechanism is introduced, and a distributed attention mechanism is used to adaptively reweight the spatial features related to the current position in the dual-phase feature images; (2.142) feature extraction is performed on the dual-phase feature images, the image features are projected into a feature channel, and an attention mechanism is introduced, and a distributed attention mechanism is used to adaptively reweight the features related to the current channel in the dual-phase feature images. 4.The defect identification method based on semi-supervised learning and change detection according to claim 3, characterized in that, The process of global feature enhancement extraction of the dual-phase feature images subjected to spatial feature exchange and channel feature exchange is as follows: (2.143) element addition is performed on the dual-phase feature images to obtain an element-added image, and global average pooling is performed on the element-added image to obtain a global-pooled feature image; (2.144) activation processing and dual-flow alignment fusion processing are performed on the global-pooled feature image to obtain a resampled image feature of the dual-phase feature image.

5. A defect identification system based on semi-supervised learning and change detection, characterized in that, The system comprises: An image data acquisition unit, which is configured to acquire single-phase images at different times under the same shooting condition, and pre-process the single-phase images to construct a sample data set; A defect recognition model unit, which is configured to construct a defect recognition model, and perform semi-supervised learning and change detection on the defect recognition model based on the sample data set to obtain a final defect recognition model; wherein the defect recognition model comprises an unsupervised model and a supervised model; The process of unsupervised training is as follows: (2.11) for N unlabeled single time phase images data augmentation is performed to obtain augmented images ; (2.12) to the enhanced image performing data perturbation and two-phase swapping to obtain a distorted image ; (2.13) performing feature extraction on the enhanced image and the distorted image to obtain a dual-time-point feature image; (2.14) inputting the dual-time feature images into the aggregated distribution model, performing spatial feature exchange and channel feature exchange on the dual-time feature images by the aggregated distribution model, and performing global feature enhancement extraction on the dual-time feature images after the spatial feature exchange and the channel feature exchange, to obtain a resampled image feature of the dual-time feature images ; And, the resampling image features after passing through the global feature enhancement model extraction model Again, data disturbance is performed, a confidence threshold is set for filtering, and filtered resampling image features are obtained , and the loss function is calculated , so as to continuously narrow the resampling image features filtered by the confidence threshold and the distance gap of the original feature map ; wherein the original feature map is the original feature map of the unlabeled single time phase image . The process of supervised training is as follows: (2.21) for N single time phase images and corresponding labels two random selections are made to obtain pseudo double time phase images and labels and pseudo double time phase images and ; (2.22) to pseudo dual time phase images and labels and pseudo dual time phase images and perform data augmentation to generate more pseudo dual time phase images and and corresponding labels and ; (2.23) performing a dual-phase exchange on the pseudo-dual-phase image and to obtain a time-symmetric image and and performing a change detection tag generation on the tags and to obtain a corresponding change detection tag ; And, the pseudo-dual time phase images and and the time symmetry images and are subjected to feature extraction to obtain corresponding feature images; and the feature images are input into the aggregated distribution model, the feature images of the pseudo-dual time phase images and and the time symmetry images and are subjected to spatial feature exchange and channel feature exchange by the aggregated distribution model, and the feature images subjected to the spatial feature exchange and the channel feature exchange are subjected to global feature enhancement extraction to obtain the resampling image features of the pseudo-dual time phase features and , and the gap between the resampling image features and and the change detection labels is continuously narrowed by calculating the loss function and . A defect recognition detection unit, which is configured to use the final defect recognition model to perform defect recognition on the single-phase images to obtain a defect recognition result.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the defect recognition method based on semi-supervised learning and change detection in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the defect identification method based on semi-supervised learning and change detection in any one of claims 1-4.

Citation Information

Patent Citations

  • Semi-supervised remote sensing image change detection method and device based on joint learning

    CN117173561A

  • Remote sensing image change detection method and system based on semantic fusion

    CN119068351A