Image data processing method, device and medium

Through differential image processing and sparse convolution of deep fusion features, the problem of uneven distribution of defect detection algorithms in different image qualities and defect shapes in the existing technology is solved, and the accuracy of defect detection and feature sparsity are improved.

CN114331946BActive Publication Date: 2024-09-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110997240.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2024-09-24
Estimated Expiration
2041-08-27

AI Technical Summary

Technical Problem

Existing defect detection algorithms are difficult to ensure the accuracy of defect detection when the image quality is different and the defect shape is unevenly distributed. Especially because the defect area occupies a small proportion of the image, the defect features become sparse and the detection accuracy is reduced. .

Method used

By obtaining the difference image between the registration image and the template image, deep fusion image features are generated, and sparse convolution operations are performed to obtain sparse fusion image features to determine the abnormal annotation area and classification results.

Benefits of technology

It improves the accuracy of defect detection and ensures the sparsity of generated features, thereby improving the accuracy of detection during labeling and classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331946B
    Figure CN114331946B
Patent Text Reader

Abstract

The embodiment of the present application provides an image data processing method, device and medium, which relates to the field of artificial intelligence, and includes: obtaining a registered image containing a detection object, obtaining a differential image between the registered image and a template image associated with the detection object; generating deep fusion image features between the registered image, the template image and the differential image; generating a differential coordinate matrix corresponding to the differential image, performing a sparse convolution operation on the differential coordinate matrix and the deep fusion image features, and obtaining sparse fusion image features corresponding to the registered image; and determining, in the registered image, an abnormal annotation area for annotating the detection object and an abnormal classification result of the abnormal annotation area according to the sparse fusion image features. The present application can improve the accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image data processing method, device and medium. Background Art

[0002] Existing defect detection algorithms directly extract features from each pixel on the original image, and then determine the area in the original image that may have defects based on the extracted defect features, and then fine-tune the candidate box corresponding to the area that may have defects to obtain an accurate defect detection box (i.e., abnormal annotated area). Since the original images obtained in different scenes have different image quality, it is difficult to ensure the accuracy of defect detection by directly inputting the original images into the defect detection algorithm.

[0003] In addition, the defect morphology distribution in the original image varies in size. Usually, the defect area only occupies a small area compared to the original image, and most of the original image is a defect-free area. Therefore, existing defect detection algorithms are difficult to ensure the high sparsity of defect features, thereby further reducing the accuracy of defect detection. Summary of the invention

[0004] The embodiments of the present application provide an image data processing method, device, and medium, which can improve the accuracy of defect detection.

[0005] An embodiment of the present application provides an image data processing method, including:

[0006] Acquire a registration image containing the detection object, and acquire a difference image between the registration image and a template image associated with the detection object;

[0007] Generate deep fusion image features between the registration image, template image and difference image;

[0008] Generate a differential coordinate matrix corresponding to the differential image, perform a sparse convolution operation on the differential coordinate matrix and the deep fusion image features, and obtain the sparse fusion image features corresponding to the registration image;

[0009] According to the sparse fusion image features, an abnormal annotated region for marking the detection object and an abnormal classification result of the abnormal annotated region are determined in the registered image.

[0010] An embodiment of the present application provides an image data processing device, including:

[0011] An image acquisition module, used to acquire a registration image containing a detection object, and to acquire a difference image between the registration image and a template image associated with the detection object;

[0012] A deep fusion module for generating deep fusion image features between the registration image, the template image and the difference image;

[0013] The shallow fusion module is used to generate the differential coordinate matrix corresponding to the differential image, perform sparse convolution operation on the differential coordinate matrix and the deep fusion image features, and obtain the sparse fusion image features corresponding to the registration image;

[0014] The result determination module is used to determine the abnormal annotated area used to mark the detection object and the abnormal classification result of the abnormal annotated area in the registered image according to the sparse fusion image features.

[0015] Among them, the image acquisition module includes:

[0016] An image acquisition unit, used to acquire an original image containing a detection object through an acquisition component, and acquire a template image corresponding to the acquisition component;

[0017] An image registration unit, used for performing image registration on the template image and the original image to obtain a registered image containing the detection object;

[0018] The differential operation unit is used to perform a differential operation on the registration image and the template image to obtain a differential image between the registration image and the template image.

[0019] Wherein, the image registration unit includes:

[0020] A brightness correction subunit, used to perform brightness correction on the original image based on the image brightness of the template image to obtain a corrected original image;

[0021] An image graying subunit is used to gray-scale the corrected original image to obtain the original image gray-scale matrix, and gray-scale the template image to obtain the template image gray-scale matrix;

[0022] The image transformation subunit is used to transform the original image into a registration image containing the detection object based on the original image grayscale matrix and the template image grayscale matrix.

[0023] The image transformation subunit is specifically used to extract feature points from the grayscale matrix of the original image to obtain first image feature points, and to extract feature points from the grayscale matrix of the template image to obtain second image feature points;

[0024] The image transformation subunit is further specifically used to perform feature point matching on the first image feature point and the second image feature point to obtain a first matching feature point and a second matching feature point having a matching relationship; the first matching feature point belongs to the first image feature point, and the second matching feature point belongs to the second image feature point;

[0025] The image transformation subunit is further specifically used to determine a first coordinate position corresponding to the first matching feature point and a second coordinate position corresponding to the second matching feature point, and generate a perspective transformation matrix associated with the original image grayscale matrix and the template image grayscale matrix according to the first coordinate position and the second coordinate position;

[0026] The image transformation subunit is also specifically used to perform perspective transformation on the original image based on the perspective transformation matrix to obtain a registered image containing the detection object.

[0027] Among them, the deep fusion module includes:

[0028] The first processing unit is used to grayscale the registration image to obtain a registration image grayscale matrix, grayscale the template image to obtain a template image grayscale matrix, and grayscale the difference image to obtain a difference image grayscale matrix;

[0029] The first processing unit is further used to perform mean variance normalization on the grayscale matrix of the differential image to obtain a normalized differential matrix corresponding to the differential image;

[0030] A convolution operation unit, used for inputting the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix into the target network model; the target network model includes a deep fusion sub-network model;

[0031] The convolution operation unit is further used to perform convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively through the deep fusion sub-network model to obtain the deep registration image features corresponding to the registration image grayscale matrix, the deep template image features corresponding to the template image grayscale matrix and the deep difference image features corresponding to the normalized difference matrix;

[0032] The deep fusion unit is used to deeply fuse the deep registration image features, the deep template image features and the deep difference image features to generate deep fusion image features between the registration image, the template image and the difference image.

[0033] Among them, the target network model also includes a shallow fusion sub-network model;

[0034] Shallow fusion modules include:

[0035] The second processing unit is used to perform bilinear interpolation processing on the grayscale matrix of the differential image through the shallow fusion sub-network model to obtain a differential image matrix matching the features of the deep fusion image;

[0036] The second processing unit is further used to perform mean-variance normalization on the difference image matrix to obtain a normalized difference matrix corresponding to the difference image matrix;

[0037] A threshold filtering unit, used to obtain matrix elements in the normalized difference matrix and matrix thresholds associated with the matrix elements, and perform threshold filtering on the matrix elements according to the matrix thresholds to obtain a differential coordinate matrix corresponding to the differential image;

[0038] The shallow fusion unit is used to perform sparse convolution operations on the differential coordinate matrix and the deep fusion image features through the shallow fusion sub-network model to obtain the sparse fusion image features corresponding to the registered image.

[0039] Among them, the convolution operation unit includes:

[0040] The first convolution subunit is used to perform N convolution operations on the grayscale matrix of the registration image through the deep fusion subnetwork model to obtain N deep registration image features with different feature sizes; N is a positive integer;

[0041] The second convolution subunit is used to perform N convolution operations on the template image grayscale matrix through the deep fusion sub-network model to obtain N deep template image features with different feature sizes;

[0042] The third convolution subunit is used to perform N convolution operations on the normalized difference matrix through the deep fusion sub-network model to obtain N deep difference image features with different feature sizes;

[0043] The depth fusion unit is specifically used to deeply fuse the depth registration image features, the depth template image features and the depth difference image features with the same feature size to obtain the deep fusion image features corresponding to N feature sizes.

[0044] Among them, the shallow fusion module is specifically used to perform N bilinear interpolation processes on the differential image grayscale matrix through the shallow fusion sub-network model to obtain N differential image matrices with different feature sizes; the feature size of a deep fusion image feature matches the feature size of a differential image matrix;

[0045] The shallow fusion module is also specifically used to generate corresponding differential coordinate matrices for the N differential image matrices;

[0046] The shallow fusion module is also specifically used to perform sparse convolution operations on the differential coordinate matrix and deep fusion image features with the same feature size through a shallow fusion sub-network model to obtain sparse fusion image features corresponding to N feature sizes.

[0047] Among them, the target network model also includes a regional prediction sub-network model and a classification sub-network model;

[0048] The result determination module includes:

[0049] A region prediction unit is used to identify the features of the sparse fusion image through a region prediction sub-network model to obtain an initial annotated region in the registration image;

[0050] The region prediction unit is also used to filter the initial labeled regions for abnormal credibility to obtain candidate labeled regions;

[0051] The region classification unit is used to determine, in the classification subnetwork model, an abnormal annotated region for annotating a detection object and an abnormal classification result of the abnormal annotated region in the registered image based on the deep fusion image features and the candidate annotated region.

[0052] Among them, the classification subnetwork model includes M target classification network layers; M is a positive integer; M target classification network layers include target classification network layer P j ; j is a positive integer less than or equal to M;

[0053] Regional taxa include:

[0054] The first classification subunit is used to classify the target network layer P j Determine the auxiliary annotation area used to annotate the detection object, and the target classification network layer P j The auxiliary classification result of the corresponding auxiliary annotation area; if the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is generated based on the deep fusion image features and the candidate annotation area; if the target classification network layer P j If it is not the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is based on the deep fusion image features and the target classification network layer P j-1 The corresponding auxiliary annotation area is generated; the target classification network layer P j-1 For the target classification network layer P j The previous target classification network layer;

[0055] The second classification subunit is used to determine the abnormal annotation area used to mark the detection object and the abnormal classification result of the abnormal annotation area in the registered image based on the auxiliary annotation area corresponding to each target classification network layer in the M target classification network layers and the auxiliary classification result corresponding to each target classification network layer.

[0056] Among them, the first classification subunit is specifically used if the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then through the target classification network layer P jMapping the candidate annotation region to the deep fusion image feature to obtain the deep region image feature corresponding to the candidate annotation region in the deep fusion image feature;

[0057] The first classification subunit is also specifically used to perform feature alignment on the depth region image features to obtain the depth region alignment features corresponding to the depth region image features, and pass them through the target classification network layer P j Perform feature extraction on the deep regional alignment feature to obtain regional features and classification features corresponding to the deep regional alignment feature;

[0058] The first classification subunit is also specifically used to perform border regression on the regional features to obtain the target classification network layer P j A corresponding auxiliary annotation area for annotating the detected object;

[0059] The first classification subunit is also specifically used to classify the network layer P through the target j The classifier in identifies the classification features and obtains the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area.

[0060] An embodiment of the present application provides an image data processing method, including:

[0061] Acquire a sample registration image containing a detection object, a sample template image associated with the detection object, and a sample difference image between the sample registration image and the sample template image, and acquire a standard abnormality annotated region in the sample registration image and a standard abnormality classification result of the standard abnormality annotated region;

[0062] Generate deep sample image features between sample registration image, sample template image and sample difference image through the initial network model;

[0063] Generate a sample differential coordinate matrix corresponding to the sample differential image through the initial network model, perform sparse convolution operation on the sample differential coordinate matrix and the deep sample image features, and obtain sparse sample image features corresponding to the sample registration image;

[0064] Determining, in the sample registration image, a predicted abnormal annotated region for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated region according to the sparse sample image features;

[0065] Determine the regional loss value of the initial network model based on the predicted anomaly labeled area and the standard anomaly labeled area, and determine the classification loss value of the initial network model based on the predicted anomaly classification result and the standard anomaly classification result;

[0066] Determine the total loss value of the initial network model according to the regional loss value and the classification loss value;

[0067] The model parameters in the initial network model are adjusted according to the total loss value, and when the adjusted initial network model meets the model convergence condition, the adjusted initial network model is determined as the target network model.

[0068] An embodiment of the present application provides an image data processing device, including:

[0069] A sample acquisition module is used to acquire a sample registration image containing a detection object, a sample template image associated with the detection object, and a sample difference image between the sample registration image and the sample template image, and acquire a standard abnormal annotated area in the sample registration image and a standard abnormal classification result of the standard abnormal annotated area;

[0070] A first fusion module, used for generating deep sample image features between a sample registration image, a sample template image and a sample difference image through an initial network model;

[0071] The second fusion module is used to generate a sample differential coordinate matrix corresponding to the sample differential image through the initial network model, and perform a sparse convolution operation on the sample differential coordinate matrix and the deep sample image features to obtain sparse sample image features corresponding to the sample registration image;

[0072] A sample classification module, used to determine, in the sample registration image, a predicted abnormal annotated area for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated area according to the sparse sample image features;

[0073] A loss determination module is used to determine the regional loss value of the initial network model according to the predicted abnormal annotated area and the standard abnormal annotated area, and to determine the classification loss value of the initial network model according to the predicted abnormal classification result and the standard abnormal classification result;

[0074] The loss determination module is further used to determine the total loss value of the initial network model according to the regional loss value and the classification loss value;

[0075] The model training module is used to adjust the model parameters in the initial network model according to the total loss value. When the adjusted initial network model meets the model convergence condition, the adjusted initial network model is determined as the target network model.

[0076] The initial network model includes M initial classification network layers; M is a positive integer; the M initial classification network layers include initial classification network layers O i ; i is a positive integer less than or equal to M;

[0077] The sample classification module includes:

[0078] A feature recognition unit is used to recognize features of the sparse sample image and obtain an initial sample annotation area in the sample registration image;

[0079] The first classification unit is used to pass the initial classification network layer O i Determine the auxiliary prediction annotation area for annotating the detection object and the initial classification network layer O i The auxiliary prediction classification result of the corresponding auxiliary prediction marked area; if the initial classification network layer O i is the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding auxiliary prediction annotation area is generated based on the deep sample image features and the first sample annotation area; the first sample annotation area refers to the initial sample annotation area corresponding to the first area overlap between the initial sample annotation area and the standard abnormal annotation area that meets the first overlap screening condition; if the initial classification network layer O i If it is not the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding sample prediction annotation area is generated based on the deep sample image features and the second sample annotation area; the second sample annotation area refers to the initial classification network layer O i-1 The auxiliary predicted and labeled area corresponding to the second area overlap between the corresponding auxiliary predicted and labeled area and the standard abnormal labeled area, the auxiliary predicted and labeled area corresponding to the second area overlap that meets the second overlap screening condition; the initial classification network layer O i-1 is the initial classification network layer O i The previous initial classification network layer;

[0080] The second classification unit is used to determine the predicted abnormal annotation area for marking the detection object and the predicted abnormal classification result of the predicted abnormal annotation area in the sample registration image based on the auxiliary predicted annotation area corresponding to each initial classification network layer in the M initial classification network layers and the auxiliary predicted classification result corresponding to each initial classification network layer.

[0081] An embodiment of the present application provides a computer device, including: a processor and a memory;

[0082] The processor is connected to the memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

[0083] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.

[0084] In one aspect, the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the present application.

[0085] In an embodiment of the present application, a computer device having an image data processing function can obtain a registered image containing a detection object, and obtain a differential image between the registered image and a template image associated with the detection object. Further, the computer device can generate deep fusion image features between the registered image, the template image, and the differential image, and then generate a differential coordinate matrix corresponding to the differential image, perform sparse convolution operations on the differential coordinate matrix and the deep fusion image features, and obtain sparse fusion image features corresponding to the registered image. Further, the computer device can determine the abnormal annotation area used to mark the detection object and the abnormal classification result of the abnormal annotation area in the registered image based on the sparse fusion image features. It can be seen that the embodiments of the present application can obtain a differential image that highlights the image difference between the registered image and the template image, generate deep fusion image features between the registered image, the template image and the differential image, and can introduce the differential image of the prominent defect into the deep fusion image feature, and then use sparse convolution to fuse the differential features (i.e., the differential coordinate matrix) corresponding to the differential image and the deep fusion image feature, thereby ensuring the sparsity of the generated sparse fusion image features, thereby improving the accuracy of defect detection when determining the abnormal annotation area and the abnormal classification result through the sparse fusion image features. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0087] Figure 1 It is a structural diagram of a network architecture provided by an embodiment of the present application;

[0088] Figure 2 This is a schematic diagram of a scenario for defect detection and diagnosis provided by an embodiment of the present application;

[0089] Figure 3 It is a flowchart of an image data processing method provided in an embodiment of the present application;

[0090] Figure 4is a schematic diagram of a process for performing image calibration provided in an embodiment of the present application;

[0091] Figure 5a is a schematic diagram of a scenario of pressure injury detection provided by an embodiment of the present application;

[0092] Figure 5b is a schematic diagram of a sticky material detection scenario provided by an embodiment of the present application;

[0093] Figure 5c It is a schematic diagram of a scene of material shortage detection provided in an embodiment of the present application;

[0094] Figure 5d is a schematic diagram of a dirt detection scenario provided by an embodiment of the present application;

[0095] Figure 6 It is a flowchart of an industrial artificial intelligence quality inspection provided by an embodiment of the present application;

[0096] Figure 7 It is a flowchart of an image data processing method provided in an embodiment of the present application;

[0097] Figure 8 It is a structural diagram of a network model provided in an embodiment of the present application;

[0098] Fig. 9 It is a schematic diagram of a scenario for performing multi-level fusion of differential features provided in an embodiment of the present application;

[0099] Fig.10 It is a flow chart comparing common convolution and sparse convolution provided in an embodiment of the present application;

[0100] Fig.11 It is a flowchart of an image data processing method provided in an embodiment of the present application;

[0101] Fig.12 This is a schematic diagram of a scenario for comparing multiple matching strategies provided in an embodiment of the present application;

[0102] Fig.13 is a structural schematic diagram of an image data processing device provided in an embodiment of the present application;

[0103] Fig.14 is a structural schematic diagram of an image data processing device provided in an embodiment of the present application;

[0104] Fig.15 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0105] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0106] It should be understood that artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0107] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0108] Among them, the solution provided in the embodiments of the present application mainly involves computer vision (CV) technology and machine learning (ML) technology of artificial intelligence.

[0109] Among them, computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, automatic driving, smart transportation and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0110] Among them, machine learning is a multi-disciplinary interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching. Among them, deep learning technology is a technology that uses deep neural network systems to perform machine learning.

[0111] For details, see Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, Figure 1 As shown, the network architecture may include a server 2000 and a terminal device cluster. The terminal device cluster may specifically include one or more terminal devices, and the number of terminal devices in the terminal device cluster is not limited here. Figure 1 As shown, the multiple terminal devices may specifically include terminal device 3000a, terminal device 3000b, terminal device 3000c, ..., terminal device 3000n; terminal device 3000a, terminal device 3000b, terminal device 3000c, ..., terminal device 3000n may respectively be directly or indirectly connected to the server 2000 via wired or wireless communication, so that each terminal device may exchange data with the server 2000 via the network connection.

[0112] Each terminal device in the terminal device cluster may include: smart phones, tablet computers, laptop computers, desktop computers, smart homes, wearable devices, vehicle terminals, workshop detection terminals and other smart terminals with image data processing functions. Figure 1 Select one terminal device from the multiple terminal devices shown as the target terminal device. Figure 1 The terminal device 3000n is shown as the target terminal device.

[0113] Among them, server 2000 can be the server corresponding to the terminal device. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.

[0114] Among them, the target terminal device may be integrated with an acquisition component for acquiring original images and template images, and the acquisition component here may be a camera for taking photos on the target terminal device. It can be understood that the original image may include defective images and non-defective images, and the defective image here may be an image of a component with defects (the component is the detection object) captured by the camera, and the non-defective image here may be an image of a component without defects captured by the camera. The embodiment of the present application takes the original image as an example of a defective image; the template image may be an image of a component without defects captured by the camera, and the template image here may be any one of the above non-defective images. Among them, the defect type corresponding to the detection object here may be multiple, and the embodiment of the present application does not limit the defect type corresponding to the detection object.

[0115] It is understandable that the image data processing method provided in the present application can be executed by a computer device, and the computer device can be the above-mentioned target terminal device, or the above-mentioned server 2000, or can be composed of the target terminal device and the server 2000. When the image data processing method provided in the present application is executed by the target terminal device, the target terminal device can determine the registration image associated with the original image and the template image based on the original image and the template image acquired by the acquisition component, and then acquire the difference image between the registration image and the template image, and determine the abnormal annotated area used to annotate the detection object and the abnormal classification result of the abnormal annotated area in the registration image based on the difference image, the registration image and the template image. Optionally, when the image data processing method provided in the present application is executed by the server 2000, the target terminal device can send the original image and template image acquired based on the acquisition component to the server 2000. In this way, after receiving the original image and template image provided by the target terminal device through the acquisition component, the server 2000 pre-processes the original image to obtain a registered image associated with the original image and the template image, and then determines the abnormal annotated area used to mark the detection object and the abnormal classification result of the abnormal annotated area in the registered image.

[0116] It should be understood that the image data processing method provided in this application can better integrate traditional algorithms and deep learning algorithms, and can be used for defect detection and diagnosis in industrial scenarios. In modern industrial manufacturing, production efficiency has been improved by introducing assembly lines. However, complex processes also inevitably lead to product defects. These defects mostly depend on environmental conditions and occur probabilistically, requiring statistical analysis of the defects in the later stage. Therefore, defect detection and diagnosis of finished products is an indispensable part of modern production processes.

[0117] In the current industrial AI quality inspection platform, industrial manufacturing components, especially 3C (China Compulsory Certification, CCC for short) components, are usually small and precisely constructed. Therefore, the cameras are designed to shoot at multiple angles for locations where defects frequently occur (that is, multiple cameras can shoot at different angles for the same 3C component). When it comes to a specific camera, there will be a fixed "ROI (Region of Interest) area" for clear photos, and the rest of the area is relatively blurred, leaving it to other cameras to take photos. The ROI area here can be a clear area that the current camera can capture. Among them, the 3C components here can be components in digital products, such as various components in mobile phone terminals. Therefore, the above-mentioned original image and template image can be photos taken by the same camera, different cameras can correspond to different original images, and different cameras can also correspond to different template images.

[0118] For further understanding, please refer to Figure 2 , Figure 2 Schematic diagram of a defect detection and diagnosis scenario provided by an embodiment of the present application. Figure 2 The image 20a shown may be an original image (i.e., an original image) acquired by a computer device through an acquisition component. Figure 2 The image 20b shown may be a template image (ie, a template image) acquired by a computer device through an acquisition component. The original image 20a includes the detection object, while the template image 20b does not include the detection object.

[0119] like Figure 2As shown, after the computer device acquires the original image 20a containing the inspection object, if it is necessary to perform defect detection and diagnosis on the original image 20a, the original image 20a can be aligned with the template image 20b through an image registration algorithm (i.e., image registration is performed on the original image 20a based on the template image 20b) to obtain a registered image 20c corresponding to the original image 20a. The registered image 20c can contain the inspection object, and the image registration here refers to the process of matching two images (i.e., the template image 20b and the original image 20a) acquired under different conditions (different time, different imaging equipment, different angles, lighting conditions, etc.).

[0120] It can be understood that the template image 20b and the registration image 20c are registered images of the same component at the same angle. Figure 2 The template image 20b and the registered image 20c shown are subjected to a differential operation to obtain a differential image (i.e., a differential map) between the template image 20b and the registered image 20c, wherein the differential operation can weaken the similar parts between the template image 20b and the registered image 20c, while highlighting the changed parts between the template image 20b and the registered image 20c. Further, the computer device can obtain a target network model for defect detection and diagnosis, and generate deep fusion image features between the registered image 20c, the template image 20b, and the differential image through the target network model. The deep fusion image features fuse the deep registration image features corresponding to the registered image 20c, the deep template image features corresponding to the template image 20b, and the deep differential image features corresponding to the differential image.

[0121] like Figure 2 As shown, the computer device can generate a differential coordinate matrix corresponding to the differential image, and then perform a sparse convolution operation on the differential coordinate matrix and the above-mentioned deep fusion image features through the target network model to obtain the sparse fusion image features corresponding to the registration image 20c. Among them, the differential coordinate matrix can be understood as the differential features corresponding to the differential image. Further, the computer device can determine the results of defect detection and diagnosis based on the sparse fusion image features, that is, determine the abnormal annotated area used to mark the detection object and the abnormal classification results of the abnormal annotated area. Among them, the embodiment of the present application does not limit the number of abnormal annotated areas here. For example, the abnormal annotated area here can be Figure 2 The abnormality marked area 20e shown, the abnormality classification result corresponding to the abnormality marked area 20e can be the abnormality classification result G.

[0122] It can be understood that after determining the abnormal annotated area 20e and the abnormal classification result G of the abnormal annotated area 20e, the computer device can display the abnormal annotated area 20e and the abnormal classification result G in the registered image 20c to obtain the annotated registered image 20c, that is, Figure 2 The result image 20d is shown. The abnormal classification result may represent the defect type to which the abnormal annotated area belongs and the defect probability corresponding to the defect type. For example, when the defect type includes two categories, the two defect types may be defect type L1 and defect type L2. For the abnormal annotated area 20e, the defect probability corresponding to defect type L1 may be F1, and the defect probability corresponding to defect type L2 may be F2. When the defect probability F1 is greater than the defect probability F2, the computer device may use the defect type L1 and the defect probability F1 as the abnormal classification result G, and display the defect type L1 and the defect probability F1 in the result image 20d.

[0123] For further information, see Figure 3 , Figure 3 The method can be executed by a computer device, which can be a server, a terminal device, or a combination of a server and a terminal device. The server can be the above-mentioned Figure 1 The corresponding server 2000 in the implementation, the terminal device can be the above Figure 1 The corresponding terminal device 3000a in the implementation. The image data processing method may include the following steps S101-S104:

[0124] Step S101, obtaining a registration image containing a detection object, and obtaining a difference image between the registration image and a template image associated with the detection object;

[0125] Specifically, the computer device can obtain an original image containing the detection object through an acquisition component, and obtain a template image corresponding to the acquisition component. The acquisition component here can be an image taken by a camera in the same terminal device at the same position. Further, the computer device can perform image registration on the template image and the original image to obtain a registered image containing the detection object. Further, the computer device can perform a differential operation on the registered image and the template image to obtain a differential image between the registered image and the template image.

[0126] The difference operation can subtract the pixel values ​​corresponding to the registration image and the template image to weaken the similarity between the registration image and the template image and highlight the change between the registration image and the template image. It can be understood that in the process of subtracting the pixel values ​​corresponding to the registration image and the template image, if there is a pixel value whose difference is less than 0, the absolute value of the difference will be taken as the pixel value in the difference image.

[0127] It should be understood that the specific process of the computer device performing image registration (i.e., image calibration) on the template image and the original image can be described as follows: the computer device can perform brightness correction on the original image based on the image brightness of the template image to obtain a corrected original image. Further, the computer device can grayscale the corrected original image to obtain an original image grayscale matrix, and grayscale the template image to obtain a template image grayscale matrix. Further, the computer device can transform the original image into a registered image containing the detection object based on the original image grayscale matrix and the template image grayscale matrix.

[0128] Among them, the image brightness corresponding to the original image and the template image can be determined by the color channels (for example, RGB (Red, Green, Blue) channels) respectively included in the original image and the template image. By modifying the color values ​​of the color channels included in the original image based on the image brightness of the template image, the image brightness corresponding to the original image can be modified to obtain a corrected original image.

[0129] Among them, the image is grayed (i.e., graying processing, image graying processing) to obtain a grayscale image. The color value of each pixel on the grayscale image is also called grayscale (i.e., grayscale value). Grayscale refers to the color depth of a point in a black and white image, and generally ranges from 0 to 255, with white being 255 and black being 0. Among them, the grayscale image can also be called a grayscale matrix. The embodiment of the present application does not limit the specific method used for image graying. For example, the image graying method here can be a component method, a maximum value method, an average value method, or a weighted average method.

[0130] It should be understood that the specific process of the computer device transforming the original image into the registered image can be described as follows: the computer device can perform feature point extraction on the grayscale matrix of the original image to obtain the first image feature points, and perform feature point extraction on the grayscale matrix of the template image to obtain the second image feature points. Further, the computer device can perform feature point matching on the first image feature points and the second image feature points to obtain the first matching feature points and the second matching feature points having a matching relationship. Among them, the first matching feature points belong to the first image feature points, and the second matching feature points belong to the second image feature points. Further, the computer device can determine the first coordinate position corresponding to the first matching feature point and the second coordinate position corresponding to the second matching feature point, and generate a perspective transformation matrix associated with the grayscale matrix of the original image and the grayscale matrix of the template image according to the first coordinate position and the second coordinate position. Further, the computer device can perform perspective transformation on the original image based on the perspective transformation matrix to obtain a registered image containing the detection object.

[0131] It is understandable that the computer device can extract feature points from the grayscale matrix of the original image and the grayscale matrix of the template image through a feature point extraction algorithm, and the first matching feature point and the second matching feature point are the most matching feature point pairs among the first image feature points and the second image feature points. It should be understood that the feature point extraction algorithm can be a SURF (Speeded Up Robust Features) algorithm, and the embodiment of the present application does not limit the type of the feature point extraction algorithm.

[0132] Among them, the computer device can obtain a first feature vector associated with the first image feature point and a second feature vector associated with the second image feature point, determine the feature similarity between the first feature vector and the second feature vector, that is, determine the vector distance between the first feature vector and the second feature vector, and then determine the first image feature point corresponding to the first feature vector whose vector distance meets the vector threshold as the first matching feature point, and determine the second image feature point corresponding to the second feature vector whose vector distance meets the vector threshold as the second matching feature point. It should be understood that the embodiments of the present application do not limit the specific method of determining feature similarity.

[0133] For easier understanding, see Figure 4 , Figure 4 FIG. 1 is a flow chart of an image calibration process provided by an embodiment of the present application. Figure 4As shown, the defect image is the original image, and the template image is the template image. The computer device can perform brightness correction on the defect image and the template image to obtain a brightness-corrected defect image and a brightness-corrected template image (i.e., the template image), and then grayscale the brightness-corrected defect image to obtain a grayscale defect image, and grayscale the template image to obtain a grayscale template image. The grayscale defect image can be represented as an original image grayscale matrix, and the grayscale template image can be represented as a template image grayscale matrix.

[0134] like Figure 4 As shown, the computer device can extract feature points from the grayscale defect image to obtain the first image feature points corresponding to the grayscale defect image, and extract feature points from the grayscale template image to obtain the second image feature points corresponding to the grayscale template image. Further, the computer device matches the first image feature points with the second image feature points to obtain a transformation perspective matrix (i.e., a perspective transformation matrix) associated with the first image feature points and the second image feature points, and then performs perspective changes on the defect image based on the transformation perspective matrix to obtain a defect image after perspective transformation (i.e., a registration image), where the registration image is the registration image.

[0135] Step S102, generating deep fusion image features between the registration image, the template image and the difference image;

[0136] Specifically, the computer device can grayscale the registration image to obtain the registration image grayscale matrix, grayscale the template image to obtain the template image grayscale matrix, and grayscale the difference image to obtain the difference image grayscale matrix. Further, the computer device can perform mean variance normalization on the difference image grayscale matrix to obtain a normalized difference matrix corresponding to the difference image. Further, the computer device can input the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix into the target network model. Among them, the target network model may include a deep fusion sub-network model. Further, the computer device can perform convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively through the deep fusion sub-network model to obtain the depth registration image features corresponding to the registration image grayscale matrix, the depth template image features corresponding to the template image grayscale matrix and the depth difference image features corresponding to the normalized difference matrix. Furthermore, the computer device can perform deep fusion on the deep registration image features, the deep template image features and the deep difference image features to generate deep fusion image features between the registration image, the template image and the difference image. The deep fusion image features here can also be understood as multi-layer semantic features.

[0137] The specific process of the computer device converting the registration image and the difference image into grayscale respectively can be found in the above description of converting the template image into grayscale, which will not be described in detail here.

[0138] Among them, in order to avoid introducing noise, the computer equipment can obtain the grayscale value of each pixel in the grayscale matrix of the differential image, determine the mean and variance corresponding to these grayscale values, and then subtract the mean value and divide the variance of the grayscale value of each pixel in the grayscale matrix of the differential image. It can be understood that the mean-variance normalization can map all grayscale values ​​to between 0 and 1.

[0139] Among them, the target network model may include a deep fusion sub-network model for deep feature fusion, a shallow fusion sub-network model for sparse convolution operations (i.e. shallow feature fusion), a regional prediction sub-network model for regional prediction, and a classification sub-network model for regional classification.

[0140] It should be understood that the image calibration operation can suppress most of the noise, thereby obtaining a differential feature map (i.e., differential image) that highlights the defects. In order to effectively integrate the differential feature map into the deep learning algorithm, the registration map (i.e., registration image), template map (i.e., template image) and differential map (i.e., differential image) are grayed out and compressed into three channels and input into the deep network (i.e., deep fusion subnetwork model). In the deep network, the continuously stacked convolution operations can better realize the deep fusion of differential features to obtain a semantic feature map (i.e., deep fusion image features).

[0141] Step S103, generating a differential coordinate matrix corresponding to the differential image, performing a sparse convolution operation on the differential coordinate matrix and the deep fusion image features, and obtaining sparse fusion image features corresponding to the registration image;

[0142] Specifically, the computer device can perform bilinear interpolation processing on the grayscale matrix of the differential image through a shallow fusion sub-network model (i.e., the shallow fusion sub-network model in the target network model) to obtain a differential image matrix that matches the deep fusion image features. Further, the computer device can perform mean variance normalization on the differential image matrix to obtain a normalized difference matrix corresponding to the differential image matrix. Further, the computer device can obtain the matrix elements in the normalized difference matrix and the matrix thresholds associated with the matrix elements, perform threshold filtering on the matrix elements according to the matrix thresholds, and obtain a differential coordinate matrix corresponding to the differential image. Further, the computer device can perform sparse convolution operations on the differential coordinate matrix and the deep fusion image features through a shallow fusion sub-network model to obtain sparse fusion image features corresponding to the registered image.

[0143] Among them, bilinear interpolation can be used to modify the size of the differential image grayscale matrix to obtain a differential image matrix with a size different from the differential image grayscale matrix.

[0144] Among them, the specific process of the computer device performing mean variance normalization on the difference image matrix to obtain the normalized difference matrix can be referred to the above description of performing mean variance normalization on the difference image grayscale matrix to obtain the normalized difference matrix, which will not be repeated here.

[0145] Among them, the threshold filtering can filter the matrix elements in the normalized difference matrix that are less than or equal to the matrix threshold (for example, 0.12), that is, based on the matrix elements in the normalized difference matrix that are greater than the matrix threshold, the differential coordinate matrix corresponding to the differential image is obtained, and the differential coordinates here can be a sparse matrix.

[0146] It should be understood that the sparse convolution operation can be understood as shallow feature fusion. Shallow feature fusion refers to directly combining the differential feature map (i.e., differential coordinate matrix) and the semantic feature map (i.e., deep fusion image features). When performing sparse convolution operations on the differential coordinate matrix and the deep fusion image features, the differential coordinate matrix and the deep fusion image features can be used as inputs of the sparse convolution, and the result corresponding to the product operation of the differential coordinate matrix and the deep fusion image features can be used as the sparse fusion image features. In order to reduce the amount of calculation and maintain the sparsity of defect features, in the present invention, sparse convolution is used to fuse the differential features and the deep semantic features (i.e., deep fusion image features).

[0147] Step S104: determining, in the registered image according to the sparse fusion image features, an abnormal annotated region for marking the detection object and an abnormal classification result of the abnormal annotated region.

[0148] Specifically, the computer device can identify the sparse fusion image features through the regional prediction sub-network model (i.e., the regional prediction sub-network model in the target network model) to obtain the initial annotated region in the registered image. Further, the computer device can perform abnormal credibility filtering on the initial annotated region to obtain the candidate annotated region. Further, the computer device can determine the abnormal annotated region used to annotate the detection object and the abnormal classification result of the abnormal annotated region in the registered image based on the deep fusion image features and the candidate annotated region in the classification sub-network model (i.e., the classification sub-network model in the target network model).

[0149] Among them, the target network model provided in this application adopts a two-stage target detection method (i.e., the first stage finds the target bounding box, and the second stage identifies the target category in the bounding box), and the regional prediction sub-network model can directly predict the position of the candidate box corresponding to the detected object, that is, the position of the initial annotated area. It should be understood that the regional prediction sub-network model can be an RPN network (Region Proposal Network, candidate region network), and the embodiment of this application does not limit the model type of the regional prediction sub-network model.

[0150] Among them, the abnormal credibility filtering can filter the initial annotated area obtained by the above-mentioned regional prediction subnetwork model. It can be understood that the computer device can perform target detection on the initial annotated area through the target detection algorithm to determine whether the initial annotated area is a "target" or a "non-target". Among them, when the credibility value corresponding to the initial annotated area is greater than the credibility threshold, the initial annotated area can be considered as a "target", and when the credibility corresponding to the initial annotated area is not greater than the credibility threshold, the initial annotated area can be considered as a "non-target". Furthermore, the computer device can screen the initial annotated area corresponding to the "target", that is, the candidate annotated area, in the initial annotated area.

[0151] Among them, the regional prediction sub-network model generates rough candidate boxes (i.e., candidate annotation regions), and the classification sub-network model can further refine (i.e., fine-tune) the candidate annotation regions, and classify the candidate annotation regions to obtain adjusted candidate annotation regions (i.e., abnormal annotation regions) and classification results of the adjusted candidate annotation regions (i.e., abnormal classification results). It should be understood that the classification sub-network model can be a cascade RCNN network (Region Convolutional Neural Networks), and the cascade RCNN network can be a Cascade RCNN model (Cascade Region Convolutional Neural Networks). The embodiment of the present application does not limit the model type of the classification sub-network model.

[0152] It can be understood that when the image data processing method provided in the embodiment of the present application is applied to an industrial scene, the component may be a mobile phone camera bracket accessory. When analyzing the mobile phone camera bracket accessory, Figure 5a-Figure 5b The following figure shows the comparison between normal parts and defective parts. Figure 5a-Figure 5b It can be seen from the defective images shown that different types of defects have different performances and the defect size distribution varies greatly. Therefore, a robust algorithm is needed to study a variety of complex situations.

[0153] For easier understanding, see Figure 5a , Figure 5a Schematic diagram of a scenario of pressure injury detection provided by an embodiment of the present application. Figure 5a As shown, image 50a can be a picture of a normal accessory, and image 50b can be a picture of a defective accessory. Image 50a can be used as a template image. When image 50a is used as a template image, the abnormal annotation area (i.e., defect identification) determined in image 50b for marking the inspection object can be area 50c, and the abnormal classification result (i.e., defect type) of area 50c can be "compression injury".

[0154] For easier understanding, see Figure 5b , Figure 5b Schematic diagram of a sticky material detection scenario provided by an embodiment of the present application. Figure 5b As shown, image 51a can be a picture of a normal accessory, and image 51b can be a picture of a defective accessory. Image 51a can be used as a template image. When image 51a is used as a template image, the abnormal annotation area (i.e., defect mark) determined in image 51b for marking the detection object can be area 51c, and the abnormal classification result (i.e., defect type) of area 51c can be "sticky material".

[0155] For easier understanding, see Figure 5c , Figure 5c Schematic diagram of a scene of material shortage detection provided by an embodiment of the present application. Figure 5c As shown, image 52a can be a picture of a normal accessory, and image 52b can be a picture of a defective accessory. Image 52a can be used as a template image. When image 52a is used as a template image, the abnormal annotation area (i.e., defect identification) determined in image 52b for marking the detection object can be area 52c, and the abnormal classification result (i.e., defect type) of area 52c can be "material shortage".

[0156] For easier understanding, see Figure 5d , Figure 5d is a schematic diagram of a dirt detection scenario provided by an embodiment of the present application. Figure 5d As shown, image 53a can be a picture of a normal accessory, and image 53b can be a picture of a defective accessory. Image 53a can be used as a template image. When image 53a is used as a template image, the abnormal annotation area (i.e., defect mark) determined in image 53b for marking the detection object can be area 53c, and the abnormal classification result (i.e., defect type) of area 53c can be "dirty".

[0157] For easier understanding, see Figure 6 , Figure 6 This is a flow chart of an industrial artificial intelligence quality inspection process provided by the embodiment of this application. Figure 6The figure shows a flow chart of industrial AI quality inspection, which can be applied to the industrial AI quality inspection platform 120a. The industrial AI quality inspection platform 120a may include multiple cameras for shooting the same component at different angles. The multiple cameras may specifically include: camera 1, camera 2, ..., camera T.

[0158] like Figure 6 As shown, the picture taken by camera 2 can be the original picture. The present invention first aligns the ROI area of ​​the taken picture with the standard picture (i.e., the template picture) through an image registration algorithm to obtain a registration picture corresponding to the original picture, and then takes differential features from the ROI area of ​​the standard picture and the calibrated ROI area (i.e., the ROI area of ​​the registration picture). The differential features are used by the candidate defect detection module to locate and identify defects in the ROI area. Among them, the defect detection module can be understood as a target network model, and based on the defect detection module (i.e., the target network model), a result picture containing a defect detection box (i.e., an abnormal annotation area) and a defect type (i.e., an abnormal classification result) can be output.

[0159] Among them, camera 2 among camera 1, camera 2, ..., camera T is taken as an example for explanation here. For the specific process of defect detection and diagnosis of pictures taken by other cameras, please refer to the above description of defect detection and diagnosis of pictures taken by camera 2.

[0160] It is understandable that different cameras may correspond to different standard images, T cameras may correspond to at least T standard images, and the T original images provided by the T cameras may correspond to T result images. Each of the T result images may include multiple defect detection frames of different scales, and the embodiment of the present application does not limit the number of defect detection frames included in each result image.

[0161] It can be seen that the embodiment of the present application can preprocess the original image (i.e., image registration) after acquiring the original image to obtain a registered image corresponding to the original image, and then after acquiring the registered image, a differential image that highlights the image difference between the registered image and the template image can be obtained to generate deep fusion image features between the registered image, the template image, and the differential image, and the differential image that highlights the defect can be introduced into the deep fusion image feature, and then the differential features (i.e., the differential coordinate matrix) corresponding to the differential image and the deep fusion image feature are fused using sparse convolution, which can ensure the sparsity of the generated sparse fusion image features, thereby improving the accuracy of defect detection when determining the abnormal annotation area and the abnormal classification result through the sparse fusion image features.

[0162] For further information, see Figure 7 , Figure 7The method can be executed by a computer device, which can be a server, a terminal device, or a combination of a server and a terminal device. The server can be the above-mentioned Figure 1 The corresponding server 2000 in the implementation, the terminal device can be the above Figure 1 The corresponding terminal device 3000a in the implementation. The image data processing method may include the following steps S201-S209:

[0163] Step S201, graying the registration image to obtain a registration image gray matrix, graying the template image to obtain a template image gray matrix, and graying the difference image to obtain a difference image gray matrix;

[0164] The specific process of the computer device converting the registration image, template image and difference image into grayscale can be seen in the above Figure 3 The description of step S102 in the corresponding embodiment will not be repeated here.

[0165] Step S202, performing mean-variance normalization on the grayscale matrix of the differential image to obtain a normalized differential matrix corresponding to the differential image;

[0166] The specific process of the computer device normalizing the mean variance of the differential image grayscale matrix can be found in the above Figure 3 The description of step S102 in the corresponding embodiment will not be repeated here.

[0167] Step S203, inputting the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix into the target network model;

[0168] Among them, the target network model may include a deep fusion sub-network model (i.e., the target deep fusion sub-network model), and the target network model may also include a shallow fusion sub-network model (i.e., the target shallow fusion sub-network model), a regional prediction sub-network model (i.e., the target regional prediction sub-network model) and a classification sub-network model (i.e., the target classification sub-network model).

[0169] For easier understanding, see Figure 8 , Figure 8 It is a structural diagram of a network model provided in an embodiment of the present application. Figure 8 The flowchart shown may include 4 sub-network models, which may specifically include Figure 8 The sub-network model 100a, the sub-network model 100b, the sub-network model 100c and the sub-network model 100d are shown. Figure 8The flowchart shown corresponds to the process of model prediction. Figure 8 The network model shown can be a target network model, which is obtained by training the initial network model. Figure 8 When the network model shown is the target network model, sub-network model 100a can be called a deep fusion sub-network model, sub-network model 100b can be called a shallow fusion sub-network model, sub-network model 100c can be called a regional prediction sub-network model, and sub-network model 100d can be called a classification sub-network model.

[0170] Step S204, performing convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively through the deep fusion sub-network model to obtain the deep registration image features corresponding to the registration image grayscale matrix, the deep template image features corresponding to the template image grayscale matrix and the deep difference image features corresponding to the normalized difference matrix;

[0171] Specifically, the computer device can perform N convolution operations on the grayscale matrix of the registration image through the deep fusion sub-network model to obtain N deep registration image features with different feature sizes. Wherein, N here can be a positive integer. Further, the computer device can perform N convolution operations on the grayscale matrix of the template image through the deep fusion sub-network model to obtain N deep template image features with different feature sizes. Further, the computer device can perform N convolution operations on the normalized difference matrix through the deep fusion sub-network model to obtain N deep difference image features with different feature sizes.

[0172] Among them, the deep fusion sub-network model may include N layers of convolution kernels to implement N convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix, and one layer of convolution kernel corresponds to one convolution operation. It should be understood that each layer of convolution kernels in the N layers of convolution kernels may correspond to multiple convolution kernels, and each convolution operation in the N convolution operations may perform multiple actual convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively through the multiple convolution kernels corresponding to the convolution operation, that is, each convolution operation in the N convolution operations may correspond to multiple actual convolution operations.

[0173] Step S205, deep fusion is performed on the deep registration image features, the deep template image features and the deep difference image features to generate deep fusion image features between the registration image, the template image and the difference image;

[0174] Specifically, the computer device may perform deep fusion on the depth registration image features, the depth template image features and the depth difference image features having the same feature size to obtain deep fusion image features corresponding to N feature sizes.

[0175] It can be understood that the N deep fusion image features include the deep registration image features with the feature size e, the deep template image features with the feature size e and the deep difference image features with the feature size e, and the computer device can perform deep fusion on the deep registration image features with the feature size e, the deep template image features with the feature size e and the deep difference image features with the feature size e to obtain the deep fusion image features corresponding to the feature size e. The feature size e here can belong to N feature sizes.

[0176] Please see again Figure 8 , the computer device can grayscale the registration image to obtain the registration image grayscale matrix, grayscale the template image to obtain the template image grayscale matrix, and grayscale the difference image to obtain the difference image grayscale matrix. Furthermore, the computer device can input the registration image grayscale matrix, the template image grayscale matrix and the difference image grayscale matrix as three channels into the deep fusion sub-network model 100a, and generate deep fusion image features through the deep fusion sub-network model 100a. Among them, the number of deep fusion image features can be N, and one deep fusion image feature among the N deep fusion image features corresponds to a feature size, where N can be a positive integer, and here the number of deep fusion image features is 5 as an example for illustration.

[0177] It should be understood that the computer device also needs to perform mean-variance normalization on the differential image grayscale matrix to obtain a normalized differential matrix, and then input the normalized differential matrix into the deep fusion sub-network model 100a.

[0178] Step S206, performing N bilinear interpolation processing on the difference image grayscale matrix through the shallow fusion sub-network model to obtain N difference image matrices with different feature sizes;

[0179] Among them, the feature size of a deep fusion image feature matches the feature size of a difference image matrix.

[0180] Step S207, generating corresponding differential coordinate matrices for the N differential image matrices respectively;

[0181] It is understandable that the computer device can perform mean-variance normalization on the N difference image matrices respectively to obtain normalized difference matrices corresponding to the N difference image matrices respectively. Further, the computer device can obtain the matrix elements in the N normalized difference matrices and the matrix thresholds associated with the matrix elements respectively, perform threshold filtering on the matrix elements according to the matrix thresholds, and obtain N difference coordinate matrices corresponding to the difference images. Among them, one normalized difference matrix corresponds to one difference coordinate matrix.

[0182] Step S208, through the shallow fusion sub-network model, sparse convolution operation is performed on the differential coordinate matrix and deep fusion image features with the same feature size to obtain sparse fusion image features corresponding to N feature sizes.

[0183] Among them, the N deep fusion image features include deep fusion image features corresponding to the feature size e, and accordingly, the N differential coordinate matrices include the differential coordinate matrix corresponding to the feature size e. The computer device can perform sparse convolution operations on the deep fusion image features with the feature size e and the differential coordinate matrix with the feature size e through a shallow fusion sub-network model to obtain sparse fusion image features with the feature size e.

[0184] Please see again Figure 8 , the shallow fusion sub-network model 100b can perform N bilinear interpolation processes on the grayscale matrix of the differential image respectively, and obtain N differential image matrices matching the N deep fusion image features, and then perform mean variance normalization on the N differential image matrices respectively, and obtain normalized difference matrices corresponding to the N differential image matrices. Further, the computer device can generate a differential coordinate matrix corresponding to the differential image based on the normalized difference matrix, where the number of differential coordinate matrices can be N (for example, 5), and one differential coordinate matrix corresponds to one feature size.

[0185] like Figure 8 As shown, the computer device can shallowly fuse the differential coordinate matrix and the deep fusion image features with the same feature scale through the shallow fusion sub-network model 100b, that is, perform sparse convolution operations to obtain sparse fusion image features corresponding to five feature sizes. Among them, the five deep fusion image features may include the deep fusion image feature 101a, and the five differential coordinate matrices may include the differential coordinate matrix 101b. The sparse convolution operations are performed on the deep fusion image features 101a and the differential coordinate matrix 101b to obtain the sparse fusion image features 101c.

[0186] For easier understanding, see Fig. 9 , Fig. 9 is a schematic diagram of a scenario for performing multi-level fusion of differential features provided in an embodiment of the present application. Fig. 9The feature 70a shown can be a three-channel feature composed of the registration image grayscale matrix, template image grayscale matrix and normalized difference matrix input into the deep fusion sub-network model. After performing a convolution operation on the three-channel features composed of the registration image grayscale matrix, template image grayscale matrix and normalized difference matrix, and deep fusion of the generated features, N deep fusion image features can be obtained, where N can be a positive integer. The N deep fusion image features can specifically include: deep fusion image feature Y1, deep fusion image feature Y2,..., deep fusion image feature Y3.

[0187] like Fig. 9 As shown, the number of differential coordinate matrices matching the N deep fusion image features may be N, and the N differential coordinate matrices may specifically include: differential coordinate matrix X1, differential coordinate matrix X2, ..., differential coordinate matrix X N The differential coordinate matrix matching the deep fusion image feature Y1 may be the differential coordinate matrix X1, the differential coordinate matrix matching the deep fusion image feature Y2 may be the differential coordinate matrix X2, ..., the differential coordinate matrix matching the deep fusion image feature Y N The matching differential coordinate matrix can be the differential coordinate matrix X N .

[0188] like Fig. 9 As shown, the computer device can perform a sparse convolution operation on the differential coordinate matrix X1 and the deep fusion image feature Y1 to obtain a sparse fusion image feature Z1; the computer device can perform a sparse convolution operation on the differential coordinate matrix X2 and the deep fusion image feature Y2 to obtain a sparse fusion image feature Z2; ...; the computer device can perform a sparse convolution operation on the differential coordinate matrix X N and deep fusion image feature Y N Perform sparse convolution operation to obtain sparse fusion image feature Z N .

[0189] For easier understanding, see Fig.10 , Fig.10 FIG. 1 is a flow chart showing a comparison between a common convolution and a sparse convolution provided in an embodiment of the present application. Fig.10 The difference between the ordinary convolution 80a and the sparse convolution 80b is shown as follows: Fig.10 The matrix 81a and the matrix 82a shown may be the same matrix, which is sparse two-dimensional data, wherein white dots are valued areas and gray dots are valueless areas.

[0190] like Fig.10As shown, in the ordinary convolution 80a, the matrix 81b is the result of convolution of the matrix 81a once, and the matrix 81c is the result of convolution of the matrix 81a twice. With the increase of the convolution layer, the originally sparse data will become more and more dense, and the ring will gradually expand. Therefore, using the network of ordinary convolution, it is very likely to learn dense features from sparse data, and this feature will destroy the sparse appearance of the original data; in the sparse convolution 80b, the matrix 82b is the result of convolution of the matrix 82a once, and the matrix 82c is the result of convolution of the matrix 82a twice. With the increase of the convolution layer, the sparsity of the data can still be maintained.

[0191] Therefore, by Fig.10 The comparison between ordinary convolution and sparse convolution shows that ordinary convolution is easy to extract distorted features (that is, extracting dense features from sparse data). In addition, ordinary convolution will produce unnecessary calculations, and sparse convolution is less computationally intensive than ordinary convolution.

[0192] Step S209 , determining, in the registered image according to the sparse fusion image features, an abnormal annotated region for marking the detection object and an abnormal classification result of the abnormal annotated region.

[0193] Specifically, the computer device can identify the sparse fusion image features through the regional prediction sub-network model to obtain the initial annotated region in the registered image. Further, the computer device can perform abnormal credibility filtering on the initial annotated region to obtain the candidate annotated region. It can be understood that the target classification sub-network model (i.e., the classification sub-network model) can include M target classification network layers, where M can be a positive integer, and the M target classification network layers in the target classification sub-network model can correspond to the M initial classification network layers in the initial classification sub-network model; the M target classification network layers can include the target classification network layer P j , where j can be a positive integer less than or equal to M. Further, the computer device can be classified by the target network layer P j Determine the auxiliary annotation area used to annotate the detection object, and the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area. Among them, if the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation region is generated based on the deep fusion image features and the candidate annotation region. j If it is not the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is based on the deep fusion image features and the target classification network layer P j-1The corresponding auxiliary annotation area is generated. Among them, the target classification network layer P j-1 For the target classification network layer P j Furthermore, the computer device can determine, in the registered image, an abnormal annotated area for annotating the detection object and an abnormal classification result of the abnormal annotated area based on the auxiliary annotated area corresponding to each of the M target classification network layers and the auxiliary classification result corresponding to each of the target classification network layers.

[0194] It is understood that the computer device is classified by the target network layer P j Determine the auxiliary annotation area used to annotate the detection object, and the target classification network layer P j The specific process of the auxiliary classification result of the corresponding auxiliary annotation area can be described as follows: if the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then the computer device can pass the target classification network layer P j The candidate annotation region is mapped to the deep fusion image feature to obtain the depth region image feature corresponding to the candidate annotation region in the deep fusion image feature. Further, the computer device can perform feature alignment on the depth region image feature to obtain the depth region alignment feature corresponding to the depth region image feature, and pass it through the target classification network layer P j The deep region alignment feature is extracted to obtain the region feature and classification feature corresponding to the deep region alignment feature. Furthermore, the computer device can perform bounding box regression on the region feature to obtain the target classification network layer P j The corresponding auxiliary annotation area is used to annotate the detected object. Further, the computer device can classify the target network layer P j The classifier in identifies the classification features and obtains the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area.

[0195] Optional, if the target classification network layer P j If it is not the first target classification network layer in the classification subnetwork model, the computer device passes through the target classification network layer P j The specific process of determining the auxiliary annotation area and the auxiliary classification result can refer to the description of determining the auxiliary annotation area and the auxiliary classification result corresponding to the first target classification network layer above, which will not be repeated here.

[0196] Please see again Figure 8, the embodiment of the present application is explained by taking the number of target classification network layers as 3 as an example, the 3 target classification network layers may include target classification network layer 102a, target classification network layer 102b and target classification network layer 102c, the target classification network layer 102a, target classification network layer 102b and target classification network layer 102c may be arranged in a cascaded manner in the classification sub-network model, the target classification network layer 102a is the first target classification network layer in the classification sub-network model, the target classification network layer 102b and the target classification network layer 102c are not the first target classification network layer in the classification sub-network model. Among them, the target classification network layer 102a includes a sub-network W1 and a network H1 for feature extraction, the target classification network layer 102b includes a sub-network W2 and a network H2 for feature extraction, and the target classification network layer 102c includes a sub-network W3 and a network H3 for feature extraction. At this time, sub-networks W1, W2 and W3 are trained sub-networks, and networks H1, H2 and H3 are trained networks. Sub-networks W1, W2 and W3 can adjust the region to a fixed size, where sub-networks W1, W2 and W3 can be ROIPooling (i.e., ROI pooling layer).

[0197] Among them, it can be understood that B0 can be a candidate annotation area, B1 can be an auxiliary annotation area corresponding to the target classification network layer 102a, C1 can be an auxiliary classification result corresponding to the target classification network layer 102a, B2 can be an auxiliary annotation area corresponding to the target classification network layer 102b, C2 can be an auxiliary classification result corresponding to the target classification network layer 102b, B3 can be an auxiliary annotation area corresponding to the target classification network layer 102c, and C3 can be an auxiliary classification result corresponding to the initial classification network layer 102c.

[0198] like Figure 8 As shown, the sub-network W1 in the target classification network layer 102a can determine the depth region alignment feature corresponding to the sub-network W1 based on the deep fusion image features and the candidate annotation area, and then based on the network H1 in the target classification network layer 102a, the depth region alignment feature corresponding to the sub-network W1 is extracted to obtain the auxiliary annotation area (i.e., B1) corresponding to the target classification network layer 102a, and the auxiliary classification result (i.e., C1) corresponding to the target classification network layer 102a.

[0199] like Figure 8As shown, the sub-network W2 in the target classification network layer 102b can determine the depth region alignment feature corresponding to the sub-network W2 based on the deep fusion image feature and the auxiliary annotation region corresponding to the target classification network layer 102a, and then extract the depth region alignment feature corresponding to the sub-network W2 based on the network H2 in the target classification network layer 102b, and obtain the auxiliary annotation region corresponding to the target classification network layer 102b (i.e., B2), and the auxiliary classification result corresponding to the target classification network layer 102b (i.e., C2). Similarly, the auxiliary annotation region corresponding to the target classification network layer 102c (i.e., B3), and the auxiliary classification result corresponding to the target classification network layer 102c (i.e., C3) can be determined through the target classification network layer 102c.

[0200] It is understandable that the computer device can determine the abnormal annotation area for marking the detection object in the registration image based on the auxiliary annotation area corresponding to each target classification network layer in the M target classification network layers, and the computer device can also determine the abnormal classification result of the abnormal annotation area based on the auxiliary classification result corresponding to each target classification network layer. Among them, the abnormal annotation area can be determined by averaging the auxiliary annotation areas corresponding to each target classification network layer; the abnormal classification result can be determined by averaging the auxiliary classification results corresponding to each target classification network layer. Optionally, the auxiliary annotation area corresponding to each initial classification network layer and the auxiliary classification results corresponding to each initial classification network layer can be processed by the NMS (Non-Maximum Suppression) algorithm to obtain the abnormal annotation area and the abnormal classification result. It should be understood that the embodiment of the present application does not limit the specific implementation method of determining the abnormal annotation area and the abnormal classification result based on the auxiliary annotation area corresponding to each initial classification network layer and the auxiliary classification results corresponding to each initial classification network layer.

[0201] It can be seen that the defect detection method based on multi-level fusion of calibrated differential features provided in the present application can pre-process the original image to obtain the differential image and the registered image corresponding to the original image, and then generate multiple deep fusion image features based on the differential image, the registered image and the template image, and generate multiple sparse fusion image features based on the multiple deep fusion image features, which can fully utilize the advantages of traditional algorithms and deep learning algorithms. Through multiple sparse fusion image features, defect areas of various sizes in the registered image can be identified, and the corresponding defect types can be output.

[0202] For further information, see Fig.11 , Fig.11The method can be executed by a computer device, which can be a server, a terminal device, or a combination of a server and a terminal device. Figure 1 The corresponding server 2000 in the implementation, the terminal device can be the above Figure 1 The corresponding terminal device 3000a in the implementation. The image data processing method may include the following steps S301-S307:

[0203] Step S301, obtaining a sample registration image containing a detection object, a sample template image associated with the detection object, and a sample difference image between the sample registration image and the sample template image, and obtaining a standard abnormal annotated area in the sample registration image and a standard abnormal classification result of the standard abnormal annotated area;

[0204] It is understandable that the computer device can obtain a sample original image containing the detection object through the acquisition component, obtain a sample template image corresponding to the acquisition component, and then perform image registration on the sample original image and the sample template image to obtain a sample registered image containing the detection object. Further, the computer device can perform a difference operation on the sample registered image and the sample template image to obtain a sample differential image between the sample registered image and the sample template image.

[0205] The specific process of the computer device performing image registration on the sample original image and the sample template image can be found in the above Figure 3 The description of image registration between the original image and the template image in step S101 of the corresponding embodiment will not be repeated here.

[0206] It is understandable that the computer device can perform defect detection and diagnosis on the sample registration image through the initial network model to obtain the initial abnormal annotated area corresponding to the sample registration image and the initial abnormal classification result of the initial abnormal annotated area. Further, the computer device can provide the initial abnormal annotated area and the initial abnormal classification result to the detection user, so that the detection user can perform defect review on the initial abnormal annotated area and the initial abnormal classification result, and obtain the standard abnormal annotated area in the sample registration image and the standard abnormal classification result of the standard abnormal annotated area.

[0207] Step S302, generating deep sample image features between the sample registration image, the sample template image and the sample difference image through the initial network model;

[0208] Among them, the initial network model may include an initial deep fusion sub-network model for deep feature fusion, an initial shallow fusion sub-network model for sparse convolution operations (i.e., shallow feature fusion), an initial regional prediction sub-network model for regional prediction, and an initial classification sub-network model for regional classification.

[0209] Please see again Figure 8 , in such Figure 8 The flowchart shown corresponds to the process of model training. Figure 8 The network model shown can be an initial network model. Figure 8 When the network model shown is the initial network model, sub-network model 100a can be called the initial deep fusion sub-network model, sub-network model 100b can be called the initial shallow fusion sub-network model, sub-network model 100c can be called the initial regional prediction sub-network model, and sub-network model 100d can be called the initial classification sub-network model.

[0210] Among them, during the model training process, such as Figure 8 The registration map shown can be a sample registration image, such as Figure 8 The template image shown can be a sample template image, such as Figure 8 The difference image shown may be a sample difference image, wherein the sample difference image is obtained by performing a difference operation on the sample registration image and the sample template image.

[0211] It is understood that the computer device can generate the deep sample image features between the sample registration image, the sample template image and the sample difference image through the initial deep fusion sub-network model in the initial network model. It should be understood that the specific process of the computer device generating the deep sample image features through the initial deep fusion sub-network model can be referred to above. Figure 3 The description of generating deep fusion image features through the deep fusion sub-network model in step S102 of the corresponding embodiment will not be repeated here.

[0212] Please see again Figure 8, the computer device can grayscale the sample registration image to obtain a sample registration grayscale matrix, grayscale the sample template image to obtain a sample template grayscale matrix, and grayscale the sample difference image to obtain a sample difference grayscale matrix. Further, the computer device can input the sample registration grayscale matrix, the sample template grayscale matrix, and the sample difference grayscale matrix as three channels into the initial deep fusion sub-network model 100a, and generate deep sample image features through the initial deep fusion sub-network model 100a. Among them, the number of deep sample image features can be N, and one deep sample image feature corresponds to a feature size. Here, N can be a positive integer. Here, the number of deep sample image features is 5 as an example for explanation.

[0213] It should be understood that the computer device also needs to perform mean variance normalization on the sample difference grayscale matrix to obtain a sample normalized difference matrix, and then input the sample normalized difference matrix into the initial deep fusion sub-network model 100a.

[0214] Step S303, generating a sample differential coordinate matrix corresponding to the sample differential image through the initial network model, performing a sparse convolution operation on the sample differential coordinate matrix and the deep sample image features, and obtaining sparse sample image features corresponding to the sample registration image;

[0215] It is understood that the computer device can generate a sample differential coordinate matrix corresponding to the sample differential image through the initial shallow fusion sub-network model in the initial network model, and perform sparse convolution operations on the sample differential coordinate matrix and the deep sample image features to obtain sparse sample image features corresponding to the sample registration image. It should be understood that the specific process of the computer device generating the sample differential coordinate matrix and the sparse sample image features through the initial shallow fusion sub-network model can be seen in the above Figure 3 The description of generating the differential coordinate matrix and the sparse fusion image features by the shallow fusion sub-network model in step S103 of the corresponding embodiment will not be repeated here.

[0216] Please see again Figure 8 , the initial shallow fusion sub-network model 100b can perform N bilinear interpolation processes on the sample difference grayscale matrix respectively, to obtain N sample difference image matrices matching the N depth sample image features, and then perform mean variance normalization on the N sample difference image matrices respectively, to obtain sample normalized difference matrices corresponding to the N sample difference image matrices. Further, the computer device can generate a sample difference coordinate matrix corresponding to the sample difference image based on the sample normalized difference matrix, where the number of sample difference coordinate matrices can be N (for example, 5), and one sample difference coordinate matrix corresponds to one feature size.

[0217] like Figure 8 As shown, the computer device can shallowly fuse the sample differential coordinate matrix and the deep sample image features with the same feature scale through the initial shallow fusion sub-network model 100b, that is, perform sparse convolution operations to obtain sparse sample image features corresponding to five feature sizes. Among them, the five deep sample image features may include the deep sample image feature 101a, and the five sample differential coordinate matrices may include the sample differential coordinate matrix 101b. The sparse convolution operations are performed on the deep sample image features 101a and the sample differential coordinate matrix 101b to obtain the sparse sample image features 101c.

[0218] Step S304, determining, in the sample registration image, a predicted abnormal annotated region for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated region according to the sparse sample image features;

[0219] Specifically, the computer device can identify the features of the sparse sample image to obtain the initial sample annotation area in the sample registration image. The initial network model includes M initial classification network layers, where M can be a positive integer; the M initial classification network layers include initial classification network layers O i , where i can be a positive integer less than or equal to M. Further, the computer device can be classified by the initial network layer O i Determine the auxiliary prediction annotation area for annotating the detection object and the initial classification network layer O i The auxiliary prediction classification result of the corresponding auxiliary prediction marked area. Among them, if the initial classification network layer O i is the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding auxiliary prediction annotation area is generated based on the deep sample image features and the first sample annotation area; the first sample annotation area here refers to the initial sample annotation area corresponding to the first area overlap between the initial sample annotation area and the standard abnormal annotation area that meets the first overlap screening condition. i If it is not the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding sample prediction annotation area is generated based on the deep sample image features and the second sample annotation area; the second sample annotation area here refers to the initial classification network layer O i-1 The second region overlap between the corresponding auxiliary prediction and annotation region and the standard abnormal annotation region corresponds to the auxiliary prediction and annotation region whose second region overlap satisfies the second overlap screening condition. i-1 is the initial classification network layer O iFurther, the computer device can determine the predicted abnormal annotated area for marking the detection object and the predicted abnormal classification result of the predicted abnormal annotated area in the sample registration image based on the auxiliary predicted annotated area corresponding to each of the M initial classification network layers and the auxiliary predicted classification result corresponding to each of the initial classification network layers.

[0220] It is understood that the computer device can identify the sparse sample image features through the initial region prediction sub-network model in the initial network model to obtain the initial sample annotation region in the sample registration image. It should be understood that the specific process of the computer device generating the initial sample annotation region through the initial region prediction sub-network model can be referred to in the above Figure 3 In step S104 of the corresponding embodiment, the description of the initial labeled area is obtained by identifying the area prediction sub-network model, which will not be described in detail here.

[0221] It can be understood that the initial classification subnetwork model in the initial network model may include M initial classification network layers, and the computer device can jointly determine the predicted abnormal annotation area and the predicted abnormal classification results of the predicted abnormal annotation area for marking the detection object based on the M initial classification network layers.

[0222] It is understood that the computer device passes through the initial classification network layer O i Determine the auxiliary prediction annotation area for annotating the detection object and the initial classification network layer O i The specific process of the auxiliary prediction classification result of the corresponding auxiliary prediction annotation area can be described as follows: if the initial classification network layer O i is the first initial classification network layer in the initial classification subnetwork model, then the computer device can pass the initial classification network layer O i The initial sample annotation area is mapped to the depth sample image feature to obtain the sample depth area image feature corresponding to the initial sample annotation area in the depth sample image feature. Further, the computer device can perform feature alignment on the sample depth area image feature to obtain the sample depth area alignment feature corresponding to the sample depth area image feature, and pass the initial classification network layer O i The sample depth region alignment feature is extracted to obtain the sample region feature and sample classification feature corresponding to the sample depth region alignment feature. Further, the border regression is performed on the sample region feature to obtain the initial classification network layer O i The corresponding auxiliary prediction annotation area is used to annotate the detected object. i The classifier in identifies the sample classification features and obtains the initial classification network layer O i The auxiliary prediction classification results of the corresponding auxiliary prediction labeled areas.

[0223] Optionally, if the initial classification network layer O i If it is not the first initial classification network layer in the initial classification subnetwork model, the computer device passes through the initial classification network layer O i The specific process of determining the auxiliary prediction labeling area and the auxiliary prediction classification result can refer to the description of determining the auxiliary prediction labeling area and the auxiliary prediction classification result corresponding to the first initial classification network layer above, which will not be repeated here.

[0224] Please see again Figure 8 ,exist Figure 8 When the sub-network model 100d shown is an initial classification sub-network model, the three initial classification network layers may include an initial classification network layer 102a, an initial classification network layer 102b, and an initial classification network layer 102c. Among them, the initial classification network layer 102a includes a sub-network W1 and a network H1 for feature extraction, the initial classification network layer 102b includes a sub-network W2 and a network H2 for feature extraction, and the initial classification network layer 102c includes a sub-network W3 and a network H3 for feature extraction. At this time, sub-networks W1, W2, and W3 are pre-trained sub-networks, and networks H1, H2, and H3 are pre-trained networks.

[0225] Among them, it can be understood that B0 can be the initial sample annotation area, B1 can be the auxiliary prediction annotation area corresponding to the initial classification network layer 102a, C1 can be the auxiliary prediction classification result corresponding to the initial classification network layer 102a, B2 can be the auxiliary prediction annotation area corresponding to the initial classification network layer 102b, C2 can be the auxiliary prediction classification result corresponding to the initial classification network layer 102b, B3 can be the auxiliary prediction annotation area corresponding to the initial classification network layer 102c, and C3 can be the auxiliary prediction classification result corresponding to the initial classification network layer 102c.

[0226] like Figure 8As shown, the first region overlap between the initial sample annotation region and the standard abnormal annotation region can be determined through the initial classification network layer 102a, and then the first region overlap that satisfies the first overlap screening condition can be obtained in the first region overlap, and the initial sample annotation region corresponding to the obtained first region overlap can be used as the first sample annotation region. Furthermore, the sub-network W1 in the initial classification network layer 102a can determine the sample depth region alignment feature corresponding to the sub-network W1 based on the deep sample image feature and the first sample annotation region, and then the sample depth region alignment feature corresponding to the sub-network W1 is extracted based on the network H1 in the initial classification network layer 102a, and the auxiliary prediction annotation region corresponding to the initial classification network layer 102a (i.e., B1) and the auxiliary prediction classification result (i.e., C1) corresponding to the initial classification network layer 102a are obtained.

[0227] like Figure 8 As shown, the second region overlap between the auxiliary prediction annotation region and the standard abnormal annotation region corresponding to the initial classification network layer 102a can be determined through the initial classification network layer 102b, and then the second region overlap that satisfies the second overlap screening condition can be obtained in the second region overlap, and the auxiliary prediction annotation region corresponding to the obtained second region overlap is used as the second sample annotation region. Further, the sub-network W2 in the initial classification network layer 102b can determine the sample depth region alignment feature corresponding to the sub-network W2 based on the deep sample image feature and the second sample annotation region, and then based on the network H2 in the initial classification network layer 102b, the sample depth region alignment feature corresponding to the sub-network W2 is extracted to obtain the auxiliary prediction annotation region (i.e., B2) corresponding to the initial classification network layer 102b, and the auxiliary prediction classification result (i.e., C2) corresponding to the initial classification network layer 102b. By analogy, the auxiliary prediction annotation region (i.e., B3) corresponding to the initial classification network layer 102c and the auxiliary prediction classification result (i.e., C3) corresponding to the initial classification network layer 102c can be determined through the initial classification network layer 102c.

[0228] It can be understood that the first region overlap between the initial sample annotation region and the standard abnormal annotation region can be determined by the intersection-over-Union (IoU), and the initial classification network layer O can also be determined. i-1 The overlap of the second region between the corresponding auxiliary prediction annotation region and the standard abnormal annotation region can be used to quantify the effect of the annotation. IoU is a concept used in target detection, which is the overlap rate of the generated candidate box and the original labeled box, that is, the ratio of their intersection to union. Among them, the candidate box can represent the initial sample annotation region or the initial classification network layer O i-1The corresponding auxiliary prediction annotation area, the original marking box can represent the standard abnormal annotation area.

[0229] It is understandable that the first coincidence screening condition can be used to obtain positive samples associated with the first initial classification network layer in the initial classification sub-network model, and the positive samples here can be referred to as the first sample annotation area. Similarly, it is understandable that the second coincidence screening condition can be used to obtain positive samples associated with non-first initial classification network layers in the initial classification sub-network model, and the positive samples here can be referred to as the second sample annotation area.

[0230] It should be understood that the definition of positive samples is crucial for the optimization of defect detection problems. In the training phase of the initial region prediction subnetwork model, it is necessary to select appropriate anchors (i.e., reference frames of different sizes and aspect ratios preset on the image) positive and negative samples through a certain matching strategy. A large number of anchor samples can be generated by sliding windows, and then the IoU of all anchors and targets is calculated, and then positive and negative samples can be selected based on IoU.

[0231] It is understandable that in the scenario of industrial defect detection, the scale distribution of defect targets varies greatly. In order to solve the problem of imbalanced positive samples corresponding to different scales, that is, large-scale targets have more positive samples due to their large area, and small-scale targets have fewer positive samples due to their small area. The imbalanced positive samples problem will lead to the detector (i.e. Figure 8 The networks H1, H2 and H3 shown in the figure (where H1, H2 and H3 can be different networks) focus on the training of large targets, while ignoring the optimization of small target detection. The uniform matching strategy (i.e., balanced matching strategy) can achieve a balance of positive samples between scales. Each standard abnormal annotated region has the same number of positive samples regardless of size. The balanced positive samples can ensure that all standard abnormal annotated regions participate in the training equally. Correspondingly, the uniform matching strategy can also filter negative samples with large IoU and positive samples with small IoU by setting a threshold.

[0232] For easier understanding, see Fig.12 , Fig.12 FIG. 1 is a schematic diagram of a scenario for comparing multiple matching strategies provided in an embodiment of the present application. Fig.12The comparison result 110a shown can indicate the number of positive samples corresponding to different matching strategies, wherein method V1 can be a uniform matching strategy, method V2 can be a Top1 strategy, method V3 can be an ATSS strategy (Adaptive Training Sample Selection), and method V4 can be a Max-IoU strategy. In addition, the "small" in the comparison result 110a can represent the number of positive samples corresponding to a small-sized standard anomaly labeled area, "medium" can represent the number of positive samples corresponding to a medium-sized standard anomaly labeled area, and "large" can represent the number of positive samples corresponding to a large-sized standard anomaly labeled area.

[0233] like Fig.12 As shown in , the balanced matching strategy can use the closest K (for example, 4) anchors as positive samples for each standard abnormal annotated area, and the rest as negative samples. Fig.12 In the mean classification result 110c shown, after determining the IoU between all anchors (i.e., triangles and squares) and the target (i.e., circle), they can be sorted based on the IoU size, and then the K nearest neighbor algorithm is used to select the K anchors closest to the target from all anchors as positive samples. For example, when K is equal to 3, the balanced matching strategy can obtain 3 positive samples and 8 negative samples; when K is equal to 5, the balanced matching strategy can obtain 5 positive samples and 6 negative samples.

[0234] like Fig.12 The Max-IoU strategy shown can indicate that if the maximum IoU between an anchor and a standard abnormal annotated area is greater than a given threshold, the anchor is a positive sample, and if the maximum IoU is less than or equal to a given threshold, the anchor is a negative sample. It can be understood that compared with the Max-IoU strategy, ATSS strategy and Top1 strategy, the uniform matching strategy used in this application can select more positive samples of different scales, and the number of positive samples of different sizes is more balanced.

[0235] It can be understood that when determining the first overlap screening condition and the second overlap screening condition based on the balanced matching strategy, different initial classification network layers may correspond to different K values. For example, the K value corresponding to the first overlap screening condition may be K1, and the K value corresponding to the second overlap screening condition may be K2. Here, K1 may be a positive integer, and here, K2 may be a positive integer less than K1.

[0236] It should be understood that the detectors in each initial classification network layer will not overfit and have enough samples to satisfy the matching strategy, and the deeper detectors can optimize the candidate boxes with smaller K values, and the structure of multiple initial classification network layers (i.e., multiple stages) in the initial classification subnetwork model can adapt to defect targets of more sizes.

[0237] It is understandable that the computer device can determine the predicted abnormal annotated area for marking the detection object in the sample registration image based on the auxiliary predicted annotated area corresponding to each of the M initial classification network layers, and the computer device can also determine the predicted abnormal classification result of the predicted abnormal annotated area based on the auxiliary predicted classification result corresponding to each initial classification network layer. Among them, the predicted abnormal annotated area can be determined by averaging the auxiliary predicted annotated areas corresponding to each initial classification network layer; the predicted abnormal classification result can be determined by averaging the auxiliary predicted classification results corresponding to each initial classification network layer. It should be understood that the embodiment of the present application does not limit the specific implementation method of determining the predicted abnormal annotated area and the predicted abnormal classification result based on the auxiliary predicted annotated areas corresponding to each initial classification network layer and the auxiliary predicted classification results corresponding to each initial classification network layer.

[0238] Step S305, determining the regional loss value of the initial network model according to the predicted abnormal annotated area and the standard abnormal annotated area, and determining the classification loss value of the initial network model according to the predicted abnormal classification result and the standard abnormal classification result;

[0239] Step S306, determining the total loss value of the initial network model according to the regional loss value and the classification loss value;

[0240] Step S307, adjusting the model parameters in the initial network model according to the total loss value, and when the adjusted initial network model meets the model convergence condition, determining the adjusted initial network model as the target network model;

[0241] It is understandable that when the total loss value of the initial network model does not meet the model convergence condition, the computer device can adjust the model parameters in the initial network model based on the total loss value that does not meet the model convergence condition. Further, the computer device can determine the initial network model after adjusting the model parameters as the transition network model, iteratively train the transition network model until the total loss value of the transition network model after iterative training meets the model convergence condition, and use the transition network model that meets the model convergence condition as the target network model.

[0242] Among them, the initial network model and the target network model can be collectively referred to as the generalized network model. The initial network model and the target network model are the names of the generalized network model at different times. In the training stage, the generalized network model can be called the initial network model, and in the prediction stage, the generalized network model can be called the target network model.

[0243] The image data processing method provided in this application trains the model on a self-built training set of 7545 pictures and uses 3458 pictures for testing. The results are shown in Table 1:

[0244] Table 1

[0245] method Image size Parameter quantity Index (mAp) Index (Acc) Score Faster RCNN 4096x3000 41.53M 65.56 82.08 68.86 This method 4096x3000 25.16M 71.18 84.84 73.91

[0246] As shown in Table 1, under the same input conditions, the image data processing method provided by this application has a smaller number of parameters, and many indicators are better than Faster RCNN (Faster Region Convolutional Neural Networks), which can prove the effectiveness of this application. Among them, the number of parameters can indicate how many parameters the model contains; mAp (Mean Average Precision) can indicate the average Ap value; Acc (Accuracy) can indicate the accuracy; Score (F1-score) can indicate the F value.

[0247] It is understandable that the target detection method based on the deep learning algorithm requires a large number of defect images for training, has high computational complexity, and has high cost for retraining the model; the target detection method based on the traditional algorithm only requires a small number of defect samples to debug the algorithm in a controllable environment, and has low algorithm computational complexity, but relies on algorithm foundation and industry experience and cannot be popularized on a large scale. The target network model provided in this application can better integrate the traditional algorithm and the deep learning algorithm.

[0248] It can be seen that the embodiments of the present application can fully combine the advantages of traditional algorithms and deep learning algorithms to improve the accuracy of defect detection; use sparse convolution operations to reduce the amount of calculation while ensuring the sparsity of high-level semantic features (i.e., sparse fusion image features); use a uniform matching strategy to solve the problem of dividing positive and negative samples of candidate boxes of different scales; use a cascaded RCNN structure to identify defect features of various sizes, making defect detection more accurate.

[0249] For further information, see Fig.13 , Fig.13 is a structural schematic diagram of an image data processing device provided in an embodiment of the present application. The image data processing device 1 may include: an image acquisition module 11, a deep fusion module 12, a shallow fusion module 13, and a result determination module 14;

[0250] An image acquisition module 11 is used to acquire a registration image containing a detection object, and to acquire a difference image between the registration image and a template image associated with the detection object;

[0251] The image acquisition module 11 includes: an image acquisition unit 111, an image registration unit 112, and a differential operation unit 113;

[0252] An image acquisition unit 111 is used to acquire an original image containing a detection object through an acquisition component, and acquire a template image corresponding to the acquisition component;

[0253] An image registration unit 112 is used to perform image registration on the template image and the original image to obtain a registered image containing the detection object;

[0254] The image registration unit 112 includes: a brightness correction subunit 1121, an image grayscale subunit 1122, and an image transformation subunit 1123;

[0255] The brightness correction subunit 1121 is used to perform brightness correction on the original image based on the image brightness of the template image to obtain a corrected original image;

[0256] An image graying subunit 1122 is used to gray-scale the corrected original image to obtain an original image gray-scale matrix, and gray-scale the template image to obtain a template image gray-scale matrix;

[0257] The image transformation subunit 1123 is used to transform the original image into a registered image containing the detection object based on the grayscale matrix of the original image and the grayscale matrix of the template image.

[0258] The image transformation subunit 1123 is specifically used to extract feature points from the gray matrix of the original image to obtain first image feature points, and to extract feature points from the gray matrix of the template image to obtain second image feature points;

[0259] The image transformation subunit 1123 is further specifically used to perform feature point matching on the first image feature point and the second image feature point to obtain a first matching feature point and a second matching feature point having a matching relationship; the first matching feature point belongs to the first image feature point, and the second matching feature point belongs to the second image feature point;

[0260] The image transformation subunit 1123 is further specifically used to determine a first coordinate position corresponding to the first matching feature point and a second coordinate position corresponding to the second matching feature point, and generate a perspective transformation matrix associated with the original image grayscale matrix and the template image grayscale matrix according to the first coordinate position and the second coordinate position;

[0261] The image transformation subunit 1123 is further specifically used to perform perspective transformation on the original image based on the perspective transformation matrix to obtain a registered image containing the detection object.

[0262] The specific implementation of the brightness correction subunit 1121, the image graying subunit 1122 and the image transformation subunit 1123 can be found in the above Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.

[0263] The difference operation unit 113 is used to perform a difference operation on the registered image and the template image to obtain a difference image between the registered image and the template image.

[0264] The specific implementation of the image acquisition unit 111, the image registration unit 112 and the differential operation unit 113 can be found in the above Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.

[0265] A deep fusion module 12, used to generate deep fusion image features between the registration image, the template image and the difference image;

[0266] The depth fusion module 12 includes: a first processing unit 121, a convolution operation unit 122, and a depth fusion unit 123;

[0267] The first processing unit 121 is used to grayscale the registration image to obtain a registration image grayscale matrix, grayscale the template image to obtain a template image grayscale matrix, and grayscale the difference image to obtain a difference image grayscale matrix;

[0268] The first processing unit 121 is further used to perform mean variance normalization on the grayscale matrix of the differential image to obtain a normalized differential matrix corresponding to the differential image;

[0269] A convolution operation unit 122, used to input the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix into the target network model; the target network model includes a deep fusion sub-network model;

[0270] The convolution operation unit 122 is further used to perform convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively through the deep fusion sub-network model to obtain the deep registration image features corresponding to the registration image grayscale matrix, the deep template image features corresponding to the template image grayscale matrix and the deep difference image features corresponding to the normalized difference matrix;

[0271] The depth fusion unit 123 is used to perform deep fusion on the depth registration image features, the depth template image features and the depth difference image features to generate deep fusion image features between the registration image, the template image and the difference image.

[0272] The convolution operation unit 122 includes: a first convolution subunit 1221, a second convolution subunit 1222, and a third convolution subunit 1223;

[0273] The first convolution subunit 1221 is used to perform N convolution operations on the registration image grayscale matrix through the deep fusion subnetwork model to obtain N deep registration image features with different feature sizes; N is a positive integer;

[0274] The second convolution subunit 1222 is used to perform N convolution operations on the template image grayscale matrix through the deep fusion sub-network model to obtain N deep template image features with different feature sizes;

[0275] The third convolution subunit 1223 is used to perform N convolution operations on the normalized difference matrix through the deep fusion sub-network model to obtain N deep difference image features with different feature sizes;

[0276] The depth fusion unit 123 is specifically used to deeply fuse the depth registration image features, the depth template image features and the depth difference image features with the same feature size to obtain the depth fusion image features corresponding to N feature sizes.

[0277] Among them, the specific implementation of the first processing unit 121, the convolution operation unit 122, the depth fusion unit 123, the first convolution subunit 1221, the second convolution subunit 1222 and the third convolution subunit 1223 can be referred to above Figure 3 In the corresponding embodiment, step S102 and Figure 7 The description of step S204 in the corresponding embodiment will not be repeated here.

[0278] The shallow fusion module 13 is used to generate a differential coordinate matrix corresponding to the differential image, and perform a sparse convolution operation on the differential coordinate matrix and the deep fusion image features to obtain sparse fusion image features corresponding to the registration image;

[0279] Among them, the target network model also includes a shallow fusion sub-network model;

[0280] The shallow fusion module 13 includes: a second processing unit 131, a threshold filtering unit 132, and a shallow fusion unit 133;

[0281] The second processing unit 131 is used to perform bilinear interpolation processing on the difference image gray matrix through the shallow fusion sub-network model to obtain a difference image matrix matching the deep fusion image features;

[0282] The second processing unit 131 is further used to perform mean-variance normalization on the difference image matrix to obtain a normalized difference matrix corresponding to the difference image matrix;

[0283] A threshold filtering unit 132 is used to obtain matrix elements in the normalized difference matrix and matrix thresholds associated with the matrix elements, and perform threshold filtering on the matrix elements according to the matrix thresholds to obtain a differential coordinate matrix corresponding to the differential image;

[0284] The shallow fusion unit 133 is used to perform sparse convolution operations on the differential coordinate matrix and the deep fusion image features through a shallow fusion sub-network model to obtain sparse fusion image features corresponding to the registered image.

[0285] Among them, the shallow fusion module 13 is specifically used to perform N bilinear interpolation processes on the differential image grayscale matrix through the shallow fusion sub-network model to obtain N differential image matrices with different feature sizes; the feature size of a deep fusion image feature matches the feature size of a differential image matrix;

[0286] The shallow fusion module 13 is also specifically used to generate corresponding differential coordinate matrices for the N differential image matrices respectively;

[0287] The shallow fusion module 13 is also specifically used to perform sparse convolution operations on the differential coordinate matrix and deep fusion image features with the same feature size through a shallow fusion sub-network model to obtain sparse fusion image features corresponding to N feature sizes.

[0288] The specific implementation of the second processing unit 131, the threshold filtering unit 132 and the shallow fusion unit 133 can be found in the above Figure 3 In the corresponding embodiment, step S103 and Figure 7 The description of step S208 in the corresponding embodiment will not be repeated here.

[0289] The result determination module 14 is used to determine, in the registered image, an abnormal annotated area for marking the detection object and an abnormal classification result of the abnormal annotated area according to the sparse fusion image features.

[0290] Among them, the target network model also includes a regional prediction sub-network model and a classification sub-network model;

[0291] The result determination module 14 includes: a region prediction unit 141, a region classification unit 142;

[0292] A region prediction unit 141 is used to identify the features of the sparse fusion image through a region prediction sub-network model to obtain an initial annotated region in the registration image;

[0293] The region prediction unit 141 is also used to perform abnormal credibility filtering on the initial labeled region to obtain a candidate labeled region;

[0294] The region classification unit 142 is used to determine, in the classification sub-network model, an abnormal annotated region for annotating the detection object and an abnormal classification result of the abnormal annotated region in the registered image based on the deep fusion image features and the candidate annotated region.

[0295] Among them, the classification subnetwork model includes M target classification network layers; M is a positive integer; M target classification network layers include target classification network layer P j ; j is a positive integer less than or equal to M;

[0296] The area classification unit 142 includes: a first classification subunit 1421 and a second classification subunit 1422;

[0297] The first classification subunit 1421 is used to classify the network layer P through the target j Determine the auxiliary annotation area used to annotate the detection object, and the target classification network layer P j The auxiliary classification result of the corresponding auxiliary annotation area; if the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is generated based on the deep fusion image features and the candidate annotation area; if the target classification network layer P j If it is not the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is based on the deep fusion image features and the target classification network layer P j-1 The corresponding auxiliary annotation area is generated; the target classification network layer P j-1 For the target classification network layer P j The previous target classification network layer;

[0298] The first classification subunit 1421 is specifically used to classify the target network layer P j is the first target classification network layer in the classification subnetwork model, then through the target classification network layer P j Mapping the candidate annotation region to the deep fusion image feature to obtain the deep region image feature corresponding to the candidate annotation region in the deep fusion image feature;

[0299] The first classification subunit 1421 is also specifically used to perform feature alignment on the depth region image features to obtain the depth region alignment features corresponding to the depth region image features, and pass them through the target classification network layer P j Perform feature extraction on the deep regional alignment feature to obtain regional features and classification features corresponding to the deep regional alignment feature;

[0300] The first classification subunit 1421 is also specifically used to perform border regression on the regional features to obtain the target classification network layer P j A corresponding auxiliary annotation area for annotating the detected object;

[0301] The first classification subunit 1421 is further specifically configured to classify the network layer P through the target j The classifier in identifies the classification features and obtains the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area.

[0302] The second classification subunit 1422 is used to determine the abnormal annotation area used to mark the detection object and the abnormal classification result of the abnormal annotation area in the registered image based on the auxiliary annotation area corresponding to each target classification network layer in the M target classification network layers and the auxiliary classification results corresponding to each target classification network layer.

[0303] The specific implementation of the first classification subunit 1421 and the second classification subunit 1422 can be found in the above Figure 3 In the corresponding embodiment, steps S104 and Figure 7 The description of step S209 in the corresponding embodiment will not be repeated here.

[0304] The specific implementation of the region prediction unit 141 and the region classification unit 142 can be found in the above Figure 3 In the corresponding embodiment, steps S104 and Figure 7 The description of step S209 in the corresponding embodiment will not be repeated here.

[0305] The specific implementation of the image acquisition module 11, the deep fusion module 12, the shallow fusion module 13 and the result determination module 14 can be found in the above Figure 3 In the corresponding embodiment, steps S101 to S104 and Figure 7 The description of steps S201 to S209 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0306] For further information, see Fig.14 , Fig.14is a structural diagram of an image data processing device provided in an embodiment of the present application. The image data processing device 2 may include: a sample acquisition module 21, a first fusion module 22, a second fusion module 23, a sample classification module 24, a loss determination module 25, and a model training module 26;

[0307] The sample acquisition module 21 is used to acquire a sample registration image containing a detection object, a sample template image associated with the detection object, and a sample difference image between the sample registration image and the sample template image, and acquire a standard abnormal annotated area in the sample registration image and a standard abnormal classification result of the standard abnormal annotated area;

[0308] A first fusion module 22, used to generate deep sample image features between a sample registration image, a sample template image and a sample difference image through an initial network model;

[0309] The second fusion module 23 is used to generate a sample differential coordinate matrix corresponding to the sample differential image through the initial network model, and perform a sparse convolution operation on the sample differential coordinate matrix and the deep sample image features to obtain sparse sample image features corresponding to the sample registration image;

[0310] A sample classification module 24, used to determine, in the sample registration image, a predicted abnormal annotated area for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated area according to the sparse sample image features;

[0311] The initial network model includes M initial classification network layers; M is a positive integer; the M initial classification network layers include initial classification network layers O i ; i is a positive integer less than or equal to M;

[0312] The sample classification module 24 includes: a feature recognition unit 241, a first classification unit 242, and a second classification unit 243;

[0313] A feature recognition unit 241 is used to recognize features of the sparse sample image and obtain an initial sample annotation area in the sample registration image;

[0314] The first classification unit 242 is used to classify the network layer O i Determine the auxiliary prediction annotation area for annotating the detection object and the initial classification network layer O i The auxiliary prediction classification result of the corresponding auxiliary prediction marked area; if the initial classification network layer O i is the first initial classification network layer in the initial network model, then the initial classification network layer O iThe corresponding auxiliary prediction annotation area is generated based on the deep sample image features and the first sample annotation area; the first sample annotation area refers to the initial sample annotation area corresponding to the first area overlap between the initial sample annotation area and the standard abnormal annotation area that meets the first overlap screening condition; if the initial classification network layer O i If it is not the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding sample prediction annotation area is generated based on the deep sample image features and the second sample annotation area; the second sample annotation area refers to the initial classification network layer O i-1 The auxiliary predicted and labeled area corresponding to the second area overlap between the corresponding auxiliary predicted and labeled area and the standard abnormal labeled area, the auxiliary predicted and labeled area corresponding to the second area overlap that meets the second overlap screening condition; the initial classification network layer O i-1 is the initial classification network layer O i The previous initial classification network layer;

[0315] The second classification unit 243 is used to determine the predicted abnormal annotation area for marking the detection object and the predicted abnormal classification result of the predicted abnormal annotation area in the sample registration image based on the auxiliary predicted annotation area corresponding to each initial classification network layer in the M initial classification network layers and the auxiliary predicted classification result corresponding to each initial classification network layer.

[0316] The specific implementation of the feature recognition unit 241, the first classification unit 242 and the second classification unit 243 can be found in the above Fig.11 The description of step S304 in the corresponding embodiment will not be repeated here.

[0317] The loss determination module 25 is used to determine the regional loss value of the initial network model according to the predicted abnormal annotated area and the standard abnormal annotated area, and to determine the classification loss value of the initial network model according to the predicted abnormal classification result and the standard abnormal classification result;

[0318] The loss determination module 25 is further used to determine the total loss value of the initial network model according to the regional loss value and the classification loss value;

[0319] The model training module 26 is used to adjust the model parameters in the initial network model according to the total loss value, and when the adjusted initial network model meets the model convergence condition, the adjusted initial network model is determined as the target network model.

[0320] The specific implementation of the sample acquisition module 21, the first fusion module 22, the second fusion module 23, the sample classification module 24, the loss determination module 25 and the model training module 26 can be found in the above Fig.11The description of steps S301 to S307 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0321] For further information, see Fig.15 , Fig.15 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.15 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. As Fig.15 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0322] In such Fig.15 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005.

[0323] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 , Figure 7 or Fig.11 The description of the image data processing method in the corresponding embodiment can also be performed as described above. Fig.13 In the corresponding embodiment, the image data processing device 1 or Fig.14 The description of the image data processing device 2 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0324] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the image data processing device 1 or the image data processing device 2 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 3 , Figure 7 or Fig.11 The description of the image data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0325] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device executes the above Figure 3 , Figure 7 or Fig.11 The description of the image data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0326] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0327] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for processing image data, characterized in that: include: Acquire a registered image containing a detection object, and acquire a difference image between the registered image and a template image associated with the detection object; Obtaining a registration image grayscale matrix corresponding to the registration image, a template image grayscale matrix corresponding to the template image, and a normalized difference matrix corresponding to the difference image, and performing a convolution operation on the registration image grayscale matrix, the template image grayscale matrix, and the normalized difference matrix to obtain a depth registration image feature corresponding to the registration image grayscale matrix, a depth template image feature corresponding to the template image grayscale matrix, and a depth difference image feature corresponding to the normalized difference matrix; Deeply fuse the depth registration image features, the depth template image features and the depth difference image features to generate a deep fusion image feature between the registration image, the template image and the difference image; Generate a differential coordinate matrix corresponding to the differential image, perform a sparse convolution operation on the differential coordinate matrix and the deep fusion image features, and obtain a sparse fusion image feature corresponding to the registration image; Determining, in the registered image, an abnormal annotated region for marking the detection object and an abnormal classification result of the abnormal annotated region according to the sparse fusion image features; Wherein, generating a differential coordinate matrix corresponding to the differential image includes: Performing bilinear interpolation processing on the differential image grayscale matrix corresponding to the differential image to obtain a differential image matrix matching the deep fusion image features; Performing mean-variance normalization on the difference image matrix to obtain a normalized difference matrix corresponding to the difference image matrix; A differential coordinate matrix corresponding to the differential image is generated based on the normalized difference matrix.

2. The method according to claim 1, characterized in that The step of acquiring a registered image containing the detection object and acquiring a difference image between the registered image and a template image associated with the detection object comprises: Acquire an original image containing a detection object through an acquisition component, and acquire a template image corresponding to the acquisition component; Performing image registration on the template image and the original image to obtain a registered image containing the detection object; A difference operation is performed on the registered image and the template image to obtain a difference image between the registered image and the template image.

3. The method according to claim 2, characterized in that The performing image registration on the template image and the original image to obtain a registered image containing the detection object includes: Based on the image brightness of the template image, performing brightness correction on the original image to obtain a corrected original image; Performing image grayscale conversion on the corrected original image to obtain an original image grayscale matrix, and performing image grayscale conversion on the template image to obtain a template image grayscale matrix; Based on the original image grayscale matrix and the template image grayscale matrix, the original image is transformed into a registered image containing the detection object.

4. The method according to claim 3, characterized in that The step of transforming the original image into a registration image containing the detection object based on the original image grayscale matrix and the template image grayscale matrix comprises: Extracting feature points from the grayscale matrix of the original image to obtain first image feature points, and extracting feature points from the grayscale matrix of the template image to obtain second image feature points; Performing feature point matching on the first image feature point and the second image feature point to obtain a first matching feature point and a second matching feature point having a matching relationship; the first matching feature point belongs to the first image feature point, and the second matching feature point belongs to the second image feature point; Determine a first coordinate position corresponding to the first matching feature point and a second coordinate position corresponding to the second matching feature point, and generate a perspective transformation matrix associated with the original image grayscale matrix and the template image grayscale matrix according to the first coordinate position and the second coordinate position; Based on the perspective transformation matrix, the original image is perspective transformed to obtain a registered image containing the detection object.

5. The method according to claim 1, characterized in that The step of obtaining a registration image grayscale matrix corresponding to the registration image, a template image grayscale matrix corresponding to the template image, and a normalized difference matrix corresponding to the difference image, and performing a convolution operation on the registration image grayscale matrix, the template image grayscale matrix, and the normalized difference matrix to obtain a depth registration image feature corresponding to the registration image grayscale matrix, a depth template image feature corresponding to the template image grayscale matrix, and a depth difference image feature corresponding to the normalized difference matrix, includes: Gray-scaling the registration image to obtain a registration image gray-scale matrix, gray-scaling the template image to obtain a template image gray-scale matrix, and gray-scaling the difference image to obtain a difference image gray-scale matrix; Performing mean-variance normalization on the grayscale matrix of the differential image to obtain a normalized differential matrix corresponding to the differential image; Inputting the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix into a target network model; the target network model includes a deep fusion sub-network model; The deep fusion sub-network model is used to perform convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively to obtain the deep registration image features corresponding to the registration image grayscale matrix, the deep template image features corresponding to the template image grayscale matrix and the deep difference image features corresponding to the normalized difference matrix.

6. The method according to claim 5, characterized in that The target network model also includes a shallow fusion sub-network model; The step of generating a differential coordinate matrix corresponding to the differential image based on the normalized difference matrix includes: Obtaining matrix elements in the normalized difference matrix and matrix thresholds associated with the matrix elements, performing threshold filtering on the matrix elements according to the matrix thresholds, and obtaining a differential coordinate matrix corresponding to the differential image; The step of performing a sparse convolution operation on the differential coordinate matrix and the deep fusion image features to obtain the sparse fusion image features corresponding to the registered image includes: Through the shallow fusion sub-network model, a sparse convolution operation is performed on the differential coordinate matrix and the deep fusion image features to obtain the sparse fusion image features corresponding to the registered image.

7. The method according to claim 5, characterized in that The deep fusion sub-network model is used to perform convolution operations on the registration image grayscale matrix, the template image grayscale matrix and the normalized difference matrix respectively to obtain the deep registration image features corresponding to the registration image grayscale matrix, the deep template image features corresponding to the template image grayscale matrix and the deep difference image features corresponding to the normalized difference matrix, including: Performing N convolution operations on the grayscale matrix of the registration image through the deep fusion sub-network model to obtain N deep registration image features with different feature sizes; N is a positive integer; Performing N convolution operations on the template image grayscale matrix through the deep fusion sub-network model to obtain N deep template image features with different feature sizes; Performing N convolution operations on the normalized difference matrix through the deep fusion sub-network model to obtain N deep difference image features with different feature sizes; Then the deep fusion of the deep registration image features, the deep template image features and the deep difference image features to generate deep fusion image features between the registration image, the template image and the difference image includes: The depth registration image features, the depth template image features and the depth difference image features having the same feature size are deeply fused to obtain deep fused image features corresponding to N feature sizes respectively.

8. The method according to claim 7, characterized in that The target network model also includes a shallow fusion sub-network model; The generating of the differential coordinate matrix corresponding to the differential image, performing a sparse convolution operation on the differential coordinate matrix and the deep fusion image features, and obtaining the sparse fusion image features corresponding to the registration image, includes: Performing N bilinear interpolation processing on the difference image grayscale matrix through the shallow fusion sub-network model to obtain N difference image matrices with different feature sizes; the feature size of a deep fusion image feature matches the feature size of a difference image matrix; Generate corresponding differential coordinate matrices for each of the N differential image matrices; Through the shallow fusion sub-network model, sparse convolution operations are performed on the differential coordinate matrix and the deep fusion image features with the same feature size to obtain sparse fusion image features corresponding to N feature sizes.

9. The method according to claim 5, characterized in that The target network model also includes a regional prediction sub-network model and a classification sub-network model; The determining, in the registered image according to the sparse fusion image features, an abnormal annotated region for marking the detection object and an abnormal classification result of the abnormal annotated region comprises: Identifying the features of the sparse fusion image through the region prediction sub-network model to obtain an initial annotated region in the registered image; Performing abnormal credibility filtering on the initial annotated area to obtain a candidate annotated area; In the classification subnetwork model, based on the deep fusion image features and the candidate annotated regions, an abnormal annotated region for annotating the detection object and an abnormal classification result of the abnormal annotated region are determined in the registered image.

10. The method according to claim 9, characterized in that The classification subnetwork model includes M target classification network layers; M is a positive integer; the M target classification network layers include target classification network layer P j ; The j is a positive integer less than or equal to the M; In the classification subnetwork model, based on the deep fusion image features and the candidate annotated regions, determining in the registered image an abnormal annotated region for annotating the detection object and an abnormal classification result of the abnormal annotated region includes: Through the target classification network layer P j Determine the auxiliary annotation area for marking the detection object, and the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area; If the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is generated based on the deep fusion image features and the candidate annotation area; if the target classification network layer P j is not the first target classification network layer in the classification subnetwork model, then the target classification network layer P j The corresponding auxiliary annotation area is based on the deep fusion image features and the target classification network layer P j-1 The corresponding auxiliary annotation area is generated; the target classification network layer P j-1 Classify the target network layer P j The previous target classification network layer; Based on the auxiliary annotation areas corresponding to each of the M target classification network layers and the auxiliary classification results corresponding to each of the target classification network layers, an abnormal annotation area for marking the detection object and an abnormal classification result of the abnormal annotation area are determined in the registered image.

11. The method according to claim 10, characterized in that The target classification network layer P j Determine the auxiliary annotation area for marking the detection object, and the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area include: If the target classification network layer P j is the first target classification network layer in the classification subnetwork model, then through the target classification network layer P j Mapping the candidate annotated area to the depth fusion image feature to obtain the depth area image feature corresponding to the candidate annotated area in the depth fusion image feature; Perform feature alignment on the depth region image features to obtain the depth region alignment features corresponding to the depth region image features, and pass them through the target classification network layer P j Performing feature extraction on the depth region alignment feature to obtain region features and classification features corresponding to the depth region alignment feature; Perform border regression on the regional features to obtain the target classification network layer P j A corresponding auxiliary marking area for marking the detected object; Through the target classification network layer P j The classifier in identifies the classification features and obtains the target classification network layer P j The auxiliary classification results of the corresponding auxiliary annotation area.

12. A method for processing image data, characterized in that: The method further comprises: Acquire a sample registration image containing a detection object, a sample template image associated with the detection object, and a sample difference image between the sample registration image and the sample template image, and acquire a standard abnormality annotated area in the sample registration image and a standard abnormality classification result of the standard abnormality annotated area; Obtaining a sample registration grayscale matrix corresponding to the sample registration image, a sample template grayscale matrix corresponding to the sample template image, and a sample normalized difference matrix corresponding to the sample difference image through an initial network model, and performing a convolution operation on the sample registration grayscale matrix, the sample template grayscale matrix, and the sample normalized difference matrix to obtain depth registration image features corresponding to the sample registration grayscale matrix, depth template image features corresponding to the sample template grayscale matrix, and depth difference image features corresponding to the sample normalized difference matrix; The depth registration image features corresponding to the sample registration grayscale matrix, the depth template image features corresponding to the sample template grayscale matrix and the depth difference image features corresponding to the sample normalized difference matrix are deeply fused through the initial network model to generate the depth sample image features between the sample registration image, the sample template image and the sample difference image; the number of the depth sample image features is N; N is a positive integer; Performing N bilinear interpolation processes on the sample difference grayscale matrix corresponding to the sample difference image through the initial network model to obtain N sample difference image matrices matching the features of the N depth sample images; Performing mean-variance normalization on the N sample difference image matrices through the initial network model to obtain sample normalized difference matrices corresponding to the N sample difference image matrices respectively; Generate sample difference coordinate matrices corresponding to the N sample difference images respectively based on the N sample normalized difference matrices through the initial network model; Performing a sparse convolution operation on the sample differential coordinate matrix and the deep sample image features through the initial network model to obtain sparse sample image features corresponding to the sample registration image; Determining, in the sample registration image, a predicted abnormal annotated region for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated region according to the sparse sample image features; Determine the regional loss value of the initial network model according to the predicted abnormal annotated area and the standard abnormal annotated area, and determine the classification loss value of the initial network model according to the predicted abnormal classification result and the standard abnormal classification result; Determining a total loss value of the initial network model according to the regional loss value and the classification loss value; The model parameters in the initial network model are adjusted according to the total loss value, and when the adjusted initial network model meets the model convergence condition, the adjusted initial network model is determined as the target network model.

13. The method according to claim 12, characterized in that The initial network model includes M initial classification network layers; M is a positive integer; the M initial classification network layers include initial classification network layer O i ; i is a positive integer less than or equal to M; The step of determining, in the sample registration image according to the sparse sample image features, a predicted abnormal annotated region for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated region, comprises: Identifying features of the sparse sample image to obtain an initial sample annotation area in the sample registration image; Through the initial classification network layer O i Determine the auxiliary prediction annotation area for annotating the detection object, and the initial classification network layer O i The auxiliary prediction classification result of the corresponding auxiliary prediction marked area; if the initial classification network layer O i is the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding auxiliary prediction annotation area is generated based on the depth sample image feature and the first sample annotation area; the first sample annotation area refers to the initial sample annotation area corresponding to the first area overlap between the initial sample annotation area and the standard abnormal annotation area that meets the first overlap screening condition; if the initial classification network layer O i is not the first initial classification network layer in the initial network model, then the initial classification network layer O i The corresponding sample prediction annotation area is generated based on the deep sample image features and the second sample annotation area; the second sample annotation area refers to the initial classification network layer O i-1 The auxiliary predicted and labeled area and the standard abnormal labeled area are overlapped in the second area, and the auxiliary predicted and labeled area corresponds to the second area overlap that satisfies the second overlap screening condition; the initial classification network layer O i-1 is the initial classification network layer O i The previous initial classification network layer; Based on the auxiliary predicted annotation areas corresponding to each of the M initial classification network layers and the auxiliary predicted classification results corresponding to each of the initial classification network layers, a predicted abnormal annotation area for annotating the detection object and a predicted abnormal classification result of the predicted abnormal annotation area are determined in the sample registration image.

14. An image data processing device, characterized in that: include: An image acquisition module, used to acquire a registration image containing a detection object, and acquire a difference image between the registration image and a template image associated with the detection object; A depth fusion module, used to obtain a registration image grayscale matrix corresponding to the registration image, a template image grayscale matrix corresponding to the template image, and a normalized difference matrix corresponding to the difference image, and perform a convolution operation on the registration image grayscale matrix, the template image grayscale matrix, and the normalized difference matrix to obtain a depth registration image feature corresponding to the registration image grayscale matrix, a depth template image feature corresponding to the template image grayscale matrix, and a depth difference image feature corresponding to the normalized difference matrix; The depth fusion module is further used to perform deep fusion on the depth registration image features, the depth template image features and the depth difference image features to generate deep fusion image features between the registration image, the template image and the difference image; A shallow fusion module, used to generate a differential coordinate matrix corresponding to the differential image, and perform a sparse convolution operation on the differential coordinate matrix and the deep fusion image features to obtain a sparse fusion image feature corresponding to the registration image; A result determination module, used for determining, in the registered image, an abnormal annotated area for marking the detection object and an abnormal classification result of the abnormal annotated area according to the sparse fusion image features; Wherein, the shallow fusion module is specifically used for: Performing bilinear interpolation processing on the differential image grayscale matrix corresponding to the differential image to obtain a differential image matrix matching the deep fusion image features; Performing mean-variance normalization on the difference image matrix to obtain a normalized difference matrix corresponding to the difference image matrix; A differential coordinate matrix corresponding to the differential image is generated based on the normalized difference matrix.

15. An image data processing device, characterized in that: include: A sample acquisition module is used to acquire a sample registration image containing a detection object, a sample template image associated with the detection object, and a sample difference image between the sample registration image and the sample template image, and acquire a standard abnormality annotated area in the sample registration image and a standard abnormality classification result of the standard abnormality annotated area; The first fusion module is used to obtain, through the initial network model, a sample registration grayscale matrix corresponding to the sample registration image, a sample template grayscale matrix corresponding to the sample template image, and a sample normalized difference matrix corresponding to the sample difference image, and perform a convolution operation on the sample registration grayscale matrix, the sample template grayscale matrix, and the sample normalized difference matrix to obtain a depth registration image feature corresponding to the sample registration grayscale matrix, a depth template image feature corresponding to the sample template grayscale matrix, and a depth difference image feature corresponding to the sample normalized difference matrix; The first fusion module is further used to perform deep fusion of the deep registration image features corresponding to the sample registration grayscale matrix, the deep template image features corresponding to the sample template grayscale matrix, and the deep difference image features corresponding to the sample normalized difference matrix through an initial network model to generate a deep sample image feature between the sample registration image, the sample template image, and the sample difference image; The number of the depth sample image features is N; N is a positive integer; A second fusion module is used to perform N bilinear interpolation processes on the sample difference grayscale matrix corresponding to the sample difference image through the initial network model to obtain N sample difference image matrices matching the features of the N depth sample images; The second fusion module is further used to perform mean-variance normalization on the N sample difference image matrices through the initial network model to obtain sample normalized difference matrices corresponding to the N sample difference image matrices respectively; The second fusion module is further used to generate sample difference coordinate matrices corresponding to the N sample difference images respectively based on the N sample normalized difference matrices through the initial network model; The second fusion module is further used to perform a sparse convolution operation on the sample differential coordinate matrix and the deep sample image features through the initial network model to obtain sparse sample image features corresponding to the sample registration image; A sample classification module, used for determining, in the sample registration image, a predicted abnormal annotated area for marking the detection object and a predicted abnormal classification result of the predicted abnormal annotated area according to the sparse sample image features; A loss determination module, used to determine the regional loss value of the initial network model according to the predicted abnormal annotated area and the standard abnormal annotated area, and to determine the classification loss value of the initial network model according to the predicted abnormal classification result and the standard abnormal classification result; The loss determination module is further used to determine the total loss value of the initial network model according to the regional loss value and the classification loss value; The model training module is used to adjust the model parameters in the initial network model according to the total loss value, and when the adjusted initial network model meets the model convergence condition, the adjusted initial network model is determined as the target network model.

16. A computer device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 13.

18. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 13.