A multi-modal defect quality detection method and system

Through the multimodal defect quality detection method, the image and text feature fusion model is used to screen the target defect features, which solves the long project cycle and high cost caused by changes in detection standards, and achieves rapid conversion and efficiency improvement.

CN118297898BActive Publication Date: 2024-11-29TIANJIN UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410391496.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-01
Publication Date
2024-11-29
Estimated Expiration
2044-04-01

AI Technical Summary

Technical Problem

Existing defect detection technologies require re-labeling data and training models when detecting changes in standards, resulting in a long and high cost of project implementation.

Method used

Using multimodal defect quality detection method, by obtaining image and text information, using defect detection model and text detection model to obtain features, combining feature fusion model, filtering out target defect features, avoiding re-labeling and training, and achieving rapid conversion of detection standards .

Benefits of technology

It shortens the conversion cycle and time after the detection standard changes, reduces the project implementation cycle and reduces the cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118297898B_ABST
    Figure CN118297898B_ABST
Patent Text Reader

Abstract

The present invention discloses a multimodal defect quality detection method and system, which belongs to the field of defect detection technology. The method includes: obtaining an image to be tested and text information; inputting the image to be tested into a defect detection model to obtain defect features output by the defect detection model; inputting text information into a text detection model to obtain text features output by the text detection model; inputting defect features and text features into a feature fusion model to obtain fused defect features and fused text features output by the feature fusion model; for each fused text feature, screening out a target defect feature corresponding to the fused text feature from each fused defect feature. When the detection conditions change, the application of the present invention can ensure that only the text description of the original detection needs to be replaced with the text description of the new detection standard, without the need to re-annotate and train the image, and ultimately achieve the purpose of shortening the conversion cycle, conversion time, and project implementation cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of defect detection, and in particular relates to a multi-modal defect quality detection method and system. Background Art

[0002] In the current production defect detection technology, in order to ensure high precision requirements, most scenarios still use conventional target detection and instance segmentation technology. After the actual survey of the production site, a reasonable optical solution is formulated according to the production site, the characteristics of the products produced, and the types and characteristics of product defects. Subsequently, the optical equipment and image acquisition equipment are arranged on site, and detailed image annotation rules and annotation standards are formulated based on the images collected on site, according to the actual detection technology protocols and operating standards. After annotating the image, the training of the AI ​​target detection or instance segmentation algorithm can be completed based on the annotated image, and finally the final defect screening and statistics are completed according to the actual detection situation of the model, and the final detection results are output.

[0003] However, after the detection standards change, the data needs to be re-labeled according to the detection standards, and the training, evaluation and deployment of the entire AI model must be completed again. The project implementation cycle is long and the project delivery cost is high. Summary of the invention

[0004] The purpose of the present invention is to meet practical needs and provide a multimodal defect quality detection method and system. When the detection conditions change, it is only necessary to replace the original detection text description with the text description of the new detection standard. There is no need to re-annotate and train the pictures, thereby ultimately achieving the purpose of shortening the conversion cycle, conversion time, and project implementation cycle.

[0005] In a first aspect, the present invention provides a multi-modal defect quality detection method, the method comprising:

[0006] Obtain the image to be tested and text information describing various production defect categories;

[0007] Inputting the image to be tested into a defect detection model to obtain defect features output by the defect detection model;

[0008] Inputting the text information into a text detection model to obtain text features output by the text detection model;

[0009] Inputting the defect feature and the text feature into a feature fusion model, and obtaining a fused defect feature and a fused text feature output by the feature fusion model;

[0010] For each fused text feature, a target defect feature is screened out from each fused defect feature, wherein the target defect feature is: a fused defect feature corresponding to the fused text feature.

[0011] Preferably, the step of inputting the image to be tested into a defect detection model to obtain defect features output by the defect detection model includes:

[0012] Inputting the image to be tested into a defect detection model, and obtaining an abnormal area in the image to be tested based on an abnormality detection algorithm;

[0013] The abnormal region and the pre-configured prior region are taken together as a defect region, and defect features in the defect region are acquired.

[0014] Preferably, the acquiring the abnormal area in the image to be tested based on an abnormality detection algorithm includes:

[0015] Acquire feature vectors representing various regions in the image to be tested;

[0016] For each feature vector, the distance between the feature vector and the sample vector in the feature vector library is calculated, and the area corresponding to the feature vector whose distance is greater than a preset threshold is taken as the defect area.

[0017] Preferably, before outputting the defect feature and the text feature to the feature fusion model and obtaining the matching relationship output by the feature fusion model, the method further includes:

[0018] The defect features and the text features are input into a pre-trained self-attention module to obtain semantically enhanced defect features and image-enhanced text features.

[0019] Preferably, the self-attention module includes an input layer, a first cross-fusion layer, a second cross-fusion layer, a SE layer and an upsampling layer.

[0020] Preferably, for each fused text feature, selecting a target defect feature corresponding to the fused text feature from each fused defect feature includes:

[0021] For each fused text feature, the membership between each fused defect feature and the fused text feature is calculated through the membership function, and the defect feature with a membership higher than a preset membership threshold is taken as the target defect feature.

[0022] Preferably, the membership function is:

[0023]

[0024] Among them, the F ci represents: the category corresponding to the defect feature is classified as the membership degree of the target defect category, the x represents: the feature vector of the defect feature, the p iRepresents: the image feature vector corresponding to the center of the target defect category, the t i Represents: the text feature vector corresponding to the center of the target defect category, the α and β i is a hyperparameter.

[0025] Preferably, the method further comprises:

[0026] Determine the screening area based on the pre-built defect detection location screening module;

[0027] For each fused text feature, a target defect feature corresponding to the fused text feature is screened out from each fused defect feature located in the screening area.

[0028] Preferably, the step of inputting the text information into a text detection model and obtaining text features output by the text detection model comprises:

[0029] The text information is input into a text detection model, and the text detection model extracts features from the operation manual specification requirement dimension, the technical protocol defect definition dimension, and the defect feature description dimension in the text information to obtain text features output by the text detection model.

[0030] In a second aspect, the present invention provides a multi-modal defect quality detection system, the system comprising:

[0031] An acquisition module, used for acquiring the image to be tested through a camera;

[0032] The image feature extraction module is used to input the image to be tested into the defect detection model to obtain the defect features output by the defect detection model. The defect area represents: the production defect in the image to be tested:

[0033] A text feature extraction module, used to input the text information into a text detection model to obtain text features output by the text detection model;

[0034] A feature enhancement module, used for inputting the defect features and the text features into a pre-trained self-attention module to obtain semantically enhanced defect features and image-enhanced text features;

[0035] A feature fusion module, used for inputting the defect feature and the text feature into a feature fusion model, and obtaining a fused defect feature and a fused text feature output by the feature fusion model;

[0036] The result screening module is used to screen out a target defect feature corresponding to each fused text feature from among various fused defect features.

[0037] Compared with the prior art, the advantages and positive effects of this application are:

[0038] Compared with the prior art, the present invention pre-trains a multimodal deep learning model, namely a defect detection model and a text detection model. The defect detection model obtains defect features representing production defects in the image to be tested, and the text detection model is used to obtain text features describing the types of defects. In addition, because the defect feature is mainly used to characterize the image direction, and the text feature is mainly used to characterize the semantic direction, the image direction and the semantic direction are two completely different directions, that is, the correlation between the defect feature and the text feature is low. The image features and the text features are fused to improve the correlation between the defect features and the text features, thereby ensuring that the image features and the text features can be matched and aligned, and the corresponding defect features can be screened out from each defect feature according to the defect description in the text feature.

[0039] The present invention processes text features and image features separately. When the on-site inspection conditions change, only the changed part needs to be converted into language and text, that is, the text description of the original inspection standard is replaced by the text description of the new inspection standard. Even if the image feature vector has not changed, the purpose of screening defect features according to the change of the text description can also be achieved. There is no need to re-annotate and train the image, which shortens the conversion cycle and conversion time, thereby shortening the project implementation cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention 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 in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0041] Figure 1 A schematic diagram of a flow chart of a multi-modal defect quality detection method provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of the structure of a self-attention module provided by an embodiment of the present invention;

[0043] Figure 3 A schematic structural diagram of a multi-modal defect quality detection system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0045] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.

[0046] For the first embodiment, please refer to Figure 1 , Figure 1 A flow chart of a multimodal defect quality detection method provided in an embodiment of the present invention is applied to an electronic device, which may be a terminal, a server, or other device capable of running a deep learning model, and specifically includes steps 101 to 105.

[0047] Step 101: Acquire an image to be tested and text information for describing various production defects.

[0048] The above-mentioned production defects may include defects in various scenarios, such as paint defects or tire defects in the production process of automobiles or ships, and building material defects or building design defects in the production of the construction industry. Taking the detection of ship production defects as an example, the above-mentioned images to be tested may include various parts of the ship to be tested, such as images of ship decks and images of ship hull structures.

[0049] Text information is used to describe various production defects. Taking the detection of automobile production defects as an example, the text information of the defect description can be established in the following way. For example, a bump type defect can be described as: round bump, long bump, edge bump, black bump with depth, etc.

[0050] Step 102: input the image to be tested into a defect detection model to obtain defect features output by the defect detection model.

[0051] The defect feature represents: the defect feature of the product in the image to be tested. In one implementation, each defect feature can be represented by a one-dimensional vector, and the multiple defect features output by the defect detection model can form a matrix.

[0052] Step 103: Input the text information into a text detection model to obtain text features output by the text detection model.

[0053] Specifically, the file detection model can be a traditional NLP network model based on a Transformer structure, and the above text information is input into the NLP network model to obtain text features. Similarly, text features can also be represented by a one-dimensional vector.

[0054] In this embodiment, the NLP network model can perform feature extraction on text data in three dimensions: operating manual specification requirements, technical protocol defect definitions, and defect feature descriptions, to obtain text features.

[0055] Step 104: output the defect feature and the text feature to a feature fusion model, and obtain fused defect features and fused text features output by the feature fusion model.

[0056] Specifically, the defect feature is mainly used to characterize the image direction, while the text feature is mainly used to characterize the semantic direction. The image direction and the semantic direction are two completely different directions, that is, the correlation between the defect feature and the text feature is low.

[0057] The feature fusion module is used to realize the fusion of image features and text features, that is, to improve the correlation between the defect features and the text features, thereby ensuring that the image features and text features can be matched and aligned. In other words, the subsequent steps can screen out the corresponding defect features from each defect feature according to the defect description in the text features.

[0058] Step 105: For each fused text feature, select a target defect feature corresponding to the fused text feature from each fused defect feature.

[0059] For example, for each fused text feature, the Euclidean distance between the fused text feature and the fused defect feature can be calculated. If the Euclidean distance between a fused defect feature and the fused text feature is less than a preset threshold, it means that there is a corresponding relationship between the text defect feature and the fused defect feature, that is, the text information represented by the fused text feature can describe the production defect category represented by the fused defect feature.

[0060] For example, the defect features output in step 102 include: a first defect feature indicating a scratch in the shape of a long strip, a second defect feature indicating a depression in the shape of a dot, and a third defect feature indicating a bump.

[0061] For example, for the text feature representing a long strip-shaped scratch, it is easy to calculate that the distance between the text feature and the first defect feature is closer, and the distance between the text feature and the second defect feature and the third defect feature is farther, so the long strip-shaped scratch defect is detected in each fused defect feature.

[0062] It can be seen that compared with the prior art, the present invention pre-trains a multimodal deep learning model, namely a defect detection model and a text detection model. The defect detection model obtains defect features representing production defects in the image to be tested, and the text detection model is used to obtain text features describing the types of defects. In addition, because the defect features are mainly used to characterize the image direction, and the text features are mainly used to characterize the semantic direction, the image direction and the semantic direction are two completely different directions, that is, the correlation between the defect features and the text features is low. The image features and the text features are fused to improve the correlation between the defect features and the text features, thereby ensuring that the image features and the text features can be matched and aligned, and the corresponding defect features can be screened out from each defect feature according to the defect description in the text features.

[0063] The present invention processes text features and image features separately. When the on-site inspection conditions change, only the changed part needs to be converted into language and text, that is, the text description of the original inspection standard is replaced by the text description of the new inspection standard. Even if the image feature vector has not changed, the purpose of screening defect features according to the change of the text description can also be achieved. There is no need to re-annotate and train the image, which shortens the conversion cycle and conversion time, thereby shortening the project implementation cycle.

[0064] In addition, the above feature fusion model is a pre-trained model, and the training process of the model is as follows:

[0065] Suppose the feature vector of the fused defect feature is P, and the feature vector of the fused text feature is T, where the dimensions of the fused defect feature P and the fused text feature T are both N*M: where M is the vector space dimension of the feature vector, and N is the number of samples.

[0066] L2 regularization is used for both the fusion defect feature P and the fusion text feature T, that is, standardization is performed by row, and the result is:

[0067]

[0068]

[0069] After normalization by row, feature fusion is performed in the form of inner product. After feature fusion, nonlinear activation is used. The activation function can be a polynomial kernel function or a nonlinear kernel function of a Gaussian kernel, or a Relu function can be used directly for activation. For example, an activation function is as follows:

[0070] E=P*T T *e tem .

[0071] Among them, T T Represents the transpose of the fused text feature T, and tem represents a learnable parameter used to control the vector that changes with the iteration step.

[0072] Then construct the vector for Loss calculation, which can be calculated by the following formula:

[0073]

[0074]

[0075] Finally, construct the Loss function for training:

[0076] In the second embodiment, in the above step 102, during the detection phase, the detection system needs to be able to extract different defects in the image according to different scenes. At the same time, in order to ensure the most complete defect detection recall rate, this embodiment adopts a prompt learning training method based on Prompt feature prompts and an algorithm model for anomaly detection to improve the detection accuracy of defect features.

[0077] Specifically, the image to be tested is first input into the defect detection model, the abnormal area in the image to be tested is obtained based on the abnormality detection algorithm, and then the abnormal area and the pre-configured prior area are used together as the defect area to obtain the defect features located in the defect area.

[0078] Among them, the defects in the above abnormal area are relatively large and uncommon defects that rarely occur during production. Since such uncommon defects are difficult to occur and the amount of data is very small, conventional target detection algorithms are prone to miss detection, and the prior area is an area where defects are prone to occur during the production process. This embodiment detects both the abnormal area and the prior area to ensure that the detected defect features have a high recall rate.

[0079] As an implementation method, the staff can generate the corresponding AnchorBox (anchor box) as the Prompt information of the BBox (bounding box) at the location where defects are prone to occur based on their personal experience of defect distribution in the production process. The defect detection model detects the defect features in the prior area based on the Prompt information. In addition, the smaller the production defect to be detected, the smaller the BBox (bounding box) to ensure that the production defect can be accurately detected.

[0080] In another implementation, the abnormal area in the image to be tested can be obtained through the following steps A-B.

[0081] Step A: Obtain feature vectors representing various regions in the image to be tested.

[0082] Step B: For each feature vector, the distance between the feature vector and the sample vector in the feature vector library is calculated, and the area corresponding to the feature vector whose distance is greater than a preset threshold is regarded as the defect area.

[0083] First, the pre-trained SAM model is used as a feature extractor to generate a feature vector library of normal samples. The SAM model includes a convolution layer, a DotPredictMask layer (mask layer), and a feature layer in sequence. The feature map output by the convolution layer before the DotPredictMask layer is used as the feature layer for local anomaly perception. The local anomaly perception feature is constructed using normal samples, and this is used as the core sampling space to sample the area of ​​normal samples to form a feature vector library of normal samples. At the same time, shared convolution and SelfAttention operations can also be used when training the model to improve the training speed of the SAM model.

[0084] After the feature database is generated, the feature vectors representing each area in the image to be tested are obtained. Then, for each feature vector, the feature vector is compared with the normal sample in the feature database, that is, the distance between the feature vector and the sample vector in the feature vector database is calculated. The distance can be Euclidean distance, Manhattan distance, etc. If the distance is greater than a preset threshold, it means that the area corresponding to the feature vector is greatly different from the area corresponding to the normal sample, so the area corresponding to the feature vector is regarded as a defect area.

[0085] Fourth embodiment, in the field of defect detection, defect features are often relatively small. Compared with the object features in the general COCO dataset, the features of defect data are often composed of edge information, texture information, light and dark information, etc., lacking deeper semantic information. Therefore, if the defect features and the text features are directly input into the feature fusion model, the alignment of the defect features and the text features is poor, which leads to low detection accuracy of production defects. Therefore, in order to improve the detection accuracy of production defects, before the image features and text features are transmitted to the feature fusion model, the defect features and text features need to be enhanced.

[0086] For details, please refer to Figure 2 , the defect area and the text features are input into a pre-trained self-attention module to obtain semantically enhanced defect features and image-enhanced text features to achieve cross-fusion. The self-attention module includes an input layer, a first cross-fusion layer, a second cross-fusion layer, an SE layer, and an upsampling layer.

[0087] like Figure 2 As shown, first, the product of the text feature and the Q matrix and the product of the defect feature and the KV matrix are respectively input into the first cross-fusion layer for cross-fusion. Common cross-fusion methods include matrix stacking, matrix addition, etc. The first cross-fusion layer outputs the first cross matrix. Then, the product of the first cross matrix and the KV matrix and the product of the first cross matrix and the Q matrix are respectively input into the second cross-fusion layer for cross-fusion. The second cross-fusion layer outputs the second cross matrix to the SE layer. The SE layer includes an attention model, that is, the SE layer uses the attention mechanism to increase the features of the defect features and text features. Finally, through the upsampling layer, it is cross-layer connected and added with the shallow features to complete the fusion and enhancement of the shallow features.

[0088] In the sixth embodiment, the target defect features can be screened out through the membership function. Since the defect description feature vector is relatively fuzzy and brief, the membership function can be used to perform fuzzy matching and fuzzy screening on the defect features to improve the detection success rate.

[0089] Specifically, for each fused text feature, the membership between each fused defect feature and the fused text feature is calculated through a membership function, and the defect feature with a membership higher than a preset membership threshold is taken as the target defect feature.

[0090] Wherein, the membership function is:

[0091]

[0092] Among them, the F cirepresents: the category corresponding to the defect feature is classified as the membership degree of the target defect category, the x represents: the feature vector of the defect feature, the p i Represents: the image feature vector corresponding to the center of the target defect category, the t i Represents: the text feature vector corresponding to the center of the target defect category, the α and β i is a hyperparameter.

[0093] The value range of the above membership function is 0-1. The closer the value of the membership function is to 1, the higher the possibility that the category corresponding to the defect feature is classified as the target defect category. Therefore, a preset membership threshold can be set in advance, such as 0.8. If the calculated membership is higher than 0.8, the defect feature is classified as the target defect feature.

[0094] In addition, β i Represents the membership function adjustment variable, which is used to measure the ambiguity. For feature vectors with higher ambiguity, a larger β i value.

[0095] The seventh embodiment, the above embodiment mainly filters the target defect features based on text information. In addition, this embodiment can also filter the target defect features based on location information.

[0096] Specifically, first, an offline defect detection location screening module is constructed by combining the location information of the defect detection and the size information of the defect, and then a screening area is determined based on the pre-constructed defect detection location screening module. For each fused text feature, a target defect feature corresponding to the fused text feature is screened out from each fused defect feature located in the screening area.

[0097] Taking automobile production defect detection as an example, in an image to be tested, the image to be tested may include various defects such as scratches and bumps. The above defects may be located in different areas of the image, such as some defects are located in the center of the image, some defects are located in the upper left corner of the image, and so on. For example, when there is a need to detect only scratch defects located in the upper left corner of the image, the defect detection position screening module can be used. That is, the defect detection position screening module will generate a detection frame including x-coordinates and y-coordinates, and the detection frame limits the detection area to the upper left corner of the image, and thus only the scratch defects located in the upper left corner of the image will be screened out.

[0098] For the eighth embodiment, please refer to Figure 3 The present invention also provides a multi-modal defect quality detection system, the system comprising:

[0099] The acquisition module is used to acquire the image to be tested through a camera.

[0100] The image feature extraction module is used to input the image to be tested into the defect detection model to obtain the defect features output by the defect detection model, and the defect area represents: the production defect in the image to be tested.

[0101] The text feature extraction module is used to input the text information into the text detection model to obtain the text features output by the text detection model.

[0102] The feature enhancement module is used to input the defect features and the text features into a pre-trained self-attention module to obtain semantically enhanced defect features and image-enhanced text features.

[0103] The feature fusion module is used to input the defect feature and the text feature into a feature fusion model to obtain the fused defect feature and fused text feature output by the feature fusion model.

[0104] The result screening module includes a language information guidance submodule and a defect detection position screening submodule. For each fused text feature output by the feature fusion module, the language information guidance submodule screens out the target defect feature corresponding to the fused text feature from each fused defect feature. Alternatively, the defect detection position screening submodule determines a screening area, and for each fused text feature, the language information guidance submodule screens out the target defect feature corresponding to the fused text feature from each fused defect feature located in the screening area.

[0105] The auxiliary training module is used to build a feature database for model training and to train the defect detection model, text detection model and feature fusion model.

[0106] In the early stage of model training, image defect images collected from different scenes are collected, and the original defect data in the image is manually annotated using a model similar to target detection to obtain the BBox defect location information and the local feature map of the defect in the image in the current scene. According to the scene information, the defect annotation information in the image is manually annotated with secondary text and morphological features, and the text features and defect features are combined into a feature database. At the same time, the defect feature data and text description data of the same defect in other scenes are supplemented to improve the diversity of the feature database and the richness of the text description, and to improve the adaptability and generalization ability of the model in different scenes.

[0107] The above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims

1. A multi-modal defect quality detection method, characterized in that: The method comprises: Obtain the image to be tested and text information describing various production defect categories; Inputting the image to be tested into a defect detection model to obtain defect features output by the defect detection model; specifically comprising: obtaining an abnormal area in the image to be tested based on an abnormality detection algorithm; taking the abnormal area and a pre-configured prior area as a defect area, and obtaining defect features located in the defect area; Inputting the text information into a text detection model to obtain text features output by the text detection model; Inputting the defect features and the text features into a feature fusion model, matching and aligning the image features and the text features, and obtaining fused defect features and fused text features output by the feature fusion model; For each fused text feature, a target defect feature is selected from each fused defect feature, wherein the target defect feature is: a fused defect feature corresponding to the fused text feature; specifically including: For each fused text feature, the membership between each fused defect feature and the fused text feature is calculated through the membership function, and the defect feature with a membership higher than a preset membership threshold is taken as the target defect feature; The membership function is: ; Among them, the represents: the category corresponding to the defect feature is classified as the membership degree of the target defect category, the x represents: the feature vector of the defect feature, the Represents: the image feature vector corresponding to the center of the target defect category, Represents: the text feature vector corresponding to the center of the target defect category, and is a hyperparameter; Determine the screening area based on the pre-built defect detection location screening module; For each fused text feature, a target defect feature corresponding to the fused text feature is screened out from each fused defect feature located in the screening area.

2. The multi-modal defect quality detection method according to claim 1, characterized in that: The step of obtaining the abnormal area in the image to be tested based on an abnormality detection algorithm includes: Acquire feature vectors representing various regions in the image to be tested; For each feature vector, the distance between the feature vector and the sample vector in the feature vector library is calculated, and the area corresponding to the feature vector whose distance is greater than a preset threshold is taken as the defect area.

3. The multi-modal defect quality detection method according to claim 1, characterized in that: Before outputting the defect feature and the text feature to the feature fusion model and obtaining the matching relationship output by the feature fusion model, the method further includes: The defect features and the text features are input into a pre-trained self-attention module to obtain semantically enhanced defect features and image-enhanced text features.

4. The multi-modal defect quality detection method according to claim 3, characterized in that: The self-attention module includes an input layer, a first cross-fusion layer, a second cross-fusion layer, a SE layer and an upsampling layer.

5. The multi-modal defect quality detection method according to claim 1, characterized in that: The step of inputting the text information into a text detection model and obtaining text features output by the text detection model includes: The text information is input into a text detection model, and the text detection model extracts features from the operation manual specification requirement dimension, the technical protocol defect definition dimension, and the defect feature description dimension in the text information to obtain text features output by the text detection model.

6. A multi-modal defect quality detection system, characterized in that: For implementing the multi-modal defect quality detection method according to any one of claims 1 to 5, the system comprises: An acquisition module, used for acquiring the image to be tested through a camera; An image feature extraction module is used to input the image to be tested into a defect detection model to obtain defect features output by the defect detection model, wherein the defect area represents: a production defect in the image to be tested; A text feature extraction module, used to input text information into a text detection model and obtain text features output by the text detection model; A feature enhancement module, used for inputting the defect features and the text features into a pre-trained self-attention module to obtain semantically enhanced defect features and image-enhanced text features; A feature fusion module, used for inputting the defect feature and the text feature into a feature fusion model, and obtaining a fused defect feature and a fused text feature output by the feature fusion model; The result screening module is used to screen out a target defect feature corresponding to each fused text feature from among various fused defect features.

Citation Information

Patent Citations

  • Industrial defect detection method and device based on pre-training model and storage medium

    CN116468725A

  • Electric power defect image detection method based on image-text question-answer multi-modal model

    CN117763107A