A display screen defect detection method and system based on enhanced feature extraction network

Through the combination of deep enhanced feature extraction network and semantic perception recognition network, the difficulty of multi-category identification, size changes and micro defect identification in LCD surface defect detection is solved, and high-precision identification and positioning of LCD surface defects are achieved. .

CN118570212BActive Publication Date: 2024-10-18SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411059782.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-10-18
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

LCD surface defect detection faces problems such as difficulty in identifying multiple defect categories, poor size changes, difficulty in identifying tiny defects, and insensitivity in identifying defects with different shapes.

Method used

Design a detection model based on deep enhanced feature extraction network, cross-layer interactive connection network and semantic perception recognition network. Through deep feature learning, feature enhancement, cross-layer feature fusion and global attention module, multi-scale features are extracted and the identification of defects is enhanced. ability.

Benefits of technology

It achieves accurate identification and positioning of multiple categories of defects, improves the identification accuracy of defects with significant size changes and small defects, and enhances the ability to identify defects of different shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570212B_ABST
    Figure CN118570212B_ABST
Patent Text Reader

Abstract

The present invention discloses a display screen defect detection method and system based on an enhanced feature extraction network, which belongs to the technical field of industrial surface defect detection, including inputting the acquired liquid crystal display screen image into a trained surface defect detection model, wherein the liquid crystal display screen image in the surface defect detection model first passes through a deep enhanced feature extraction network to extract different scale features of the liquid crystal display screen image, and inputs the enhanced features of different scales into a cross-layer interactive connection network to effectively combine shallow features and deep features, outputs interactive features of different scales, and inputs the interactive features of different scales into a semantic perception recognition network to capture long-distance features, enhance the multi-scale representation of defect features, and finally outputs defect detection results. A surface defect detection model for a liquid crystal display screen is constructed by designing a deep enhanced feature extraction network, a cross-layer interactive connection network, and a semantic perception recognition network, so as to realize accurate identification and positioning of multi-category defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial surface defect detection, and in particular relates to a display screen defect detection method and system based on an enhanced feature extraction network. Background Art

[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.

[0003] As an indispensable component of modern electronic devices, the detection of surface defects of LCD screens is crucial to ensure product quality and user experience. Surface defects of LCD screens, such as cracks, damage and spots, not only seriously affect the display effect of the product, but also may pose potential safety issues. Therefore, efficient defect detection is of great significance to improving production efficiency and reducing costs.

[0004] However, surface defect detection of LCD screens faces many difficulties, including the diversity of defect types, the difficulty in detecting tiny defects, and the large variation in defect size. The above detection difficulties require that the detection method must have high detection precision, accuracy, and adaptability. In traditional detection methods, techniques such as template matching and image filtering are usually used to identify defects, but they are often limited by fixed defect patterns and lighting conditions and are difficult to adapt to the complex and changeable actual production environment. With the development of deep learning technology, defect detection methods based on deep learning have gradually become mainstream. Deep learning methods can autonomously learn and extract complex features of LCD screen images by training convolutional neural networks (CNNs), such as YOLO and RCNN models, thereby achieving high-precision detection of various defects. The advantage of deep learning methods lies in their powerful feature learning and generalization capabilities. However, existing defect detection methods still have the following detection difficulties:

[0005] 1. There are many types of defects in LCD screens, which makes it difficult to effectively identify many defects.

[0006] 2. The scale of defect targets on LCD screens varies greatly. Existing detectors pay less attention to the information exchange between non-adjacent layers, resulting in the continuous reduction of spatial information in non-adjacent layers with each fusion. The fine-grained and semantic features of the backbone network cannot be fully integrated, resulting in poor detection of defects with significant size changes.

[0007] 3. LCD screens contain a large number of complex small target defects. These tiny defects contain limited semantic content, making it difficult for general detection algorithms to accurately identify tiny defects.

[0008] 4. The existing loss function is insensitive to the identification of defects of various shapes in LCD displays. Summary of the invention

[0009] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a display screen defect detection method and system based on an enhanced feature extraction network. By designing a deep enhanced feature extraction network, a cross-layer interactive connection network and a semantic perception recognition network, a liquid crystal display screen surface defect detection model is constructed to achieve accurate identification and positioning of multi-category defect detection.

[0010] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0011] In a first aspect, the present invention provides a display screen defect detection method based on an enhanced feature extraction network, comprising:

[0012] Acquire the LCD screen image to be detected;

[0013] Inputting the LCD screen image into a trained surface defect detection model to obtain a defect detection result;

[0014] Among them, the surface defect detection model includes a deep enhanced feature extraction network, a cross-layer interactive connection network and a semantic perception recognition network connected in sequence. First, the deep enhanced feature extraction network extracts different scale features of the LCD screen image, outputs enhanced features of different scales, and inputs the enhanced features of different scales into the cross-layer interactive connection network to effectively combine shallow features and deep features, fully integrate features of adjacent layers and cross-layers, output interactive features of different scales, and input the interactive features of different scales into the semantic perception recognition network to capture long-distance features, enhance the multi-scale representation of defect features, and finally output defect detection results.

[0015] According to a further technical solution, the deep enhanced feature extraction network extracts features of different scales of the LCD screen image through a deep feature learning module, inputs the features of different scales into a feature enhancement module to capture global context information, and outputs enhanced features of different scales.

[0016] According to a further technical solution, the deep feature learning module extracts the texture and detail features of the LCD screen image through an efficient feature extraction module, and inputs them into a channel perception module, which emphasizes key feature channels to highlight defective features and outputs features of different scales.

[0017] In a further technical solution, the different scale features capture global context information through a feature enhancement module, and output enhanced features of different scales.

[0018] A further technical solution is that the cross-layer interactive connection network, through cross-layer splicing of features between multi-layer interactive connection units, uses a feature reweighting strategy in top-down and bottom-up paths to fully fuse features of adjacent layers and across layers, and outputs interactive features of different scales.

[0019] According to a further technical solution, the semantic-aware recognition network first obtains semantic features at different levels through a semantic-aware module. The semantic-aware module utilizes convolution modules with different convolution kernel sizes and a fusion of semantically similar feature branches to output semantic features at different levels. The features most relevant to defect detection are then highlighted through a global attention module.

[0020] In a further technical solution, the global attention module focuses on the feature responses between different channels through the channel attention module, suppresses unimportant channels, and focuses on specific defect areas through the spatial attention module, enhances the feature responses of the defect areas, and then outputs features.

[0021] In a second aspect, the present invention provides a display screen defect detection system based on an enhanced feature extraction network, comprising:

[0022] A data acquisition module is configured to: acquire an image of a liquid crystal display screen to be detected;

[0023] A model detection module is configured to: input the LCD screen image into a trained surface defect detection model to obtain a defect detection result;

[0024] Among them, the surface defect detection model includes a deep enhanced feature extraction network, a cross-layer interactive connection network and a semantic perception recognition network connected in sequence. First, the deep enhanced feature extraction network extracts different scale features of the LCD screen image, outputs enhanced features of different scales, and inputs the enhanced features of different scales into the cross-layer interactive connection network to effectively combine shallow features and deep features, fully integrate features of adjacent layers and cross-layers, output interactive features of different scales, and input the interactive features of different scales into the semantic perception recognition network to capture long-distance features, enhance the multi-scale representation of defect features, and finally output defect detection results.

[0025] One or more of the above technical solutions have the following beneficial effects:

[0026] The present invention designs a deep enhanced feature extraction network to fully extract features of different scales, enhance the model's perception of multi-scale information, and extract richer feature representations; designs an efficient feature extraction module, utilizes a deep convolution module and a channel perception module, effectively extracts the texture and detail features of the defect image, and simultaneously identifies and emphasizes the feature channels that are most critical to the current task, so that the network can respond to defect features more sensitively; designs a feature enhancement module to obtain the overall context information of the image and enhance the model's perception of defect features. The model can perceive defect features more keenly and identify more critical and significant defects, thereby enhancing the recognition accuracy of diverse defect types.

[0027] The present invention designs a cross-layer interactive connection network and introduces shallow features containing more detailed information to improve the recognition of tiny defects. At the same time, in the top-down and bottom-up paths, the feature reweighting strategy is used to achieve effective integration of adjacent level and cross-level features, ensuring that the network can efficiently combine features of different scales, thereby improving the ability to recognize defects with significant size changes.

[0028] The present invention designs a semantic perception recognition network, including a semantic perception module and a global attention module. The semantic perception module is used to capture long-distance features, enhance multi-scale feature representation, and enrich the extraction of complex small target detail information. The designed global attention module highlights the features in the image that are most relevant to LCD defect detection, while suppressing unimportant information, thereby enhancing the representation ability of features.

[0029] The present invention designs enhanced training losses to improve the recognition and positioning of defects of various shapes on liquid crystal display screens. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0031] Figure 1 is a flow chart of a defect detection method according to an embodiment of the present invention;

[0032] Figure 2 is a deep enhanced feature extraction network structure diagram of the surface defect detection model in an embodiment of the present invention;

[0033] Figure 3 is a convolutional module structure diagram of a deep enhanced feature extraction network in an embodiment of the present invention;

[0034] Figure 4 is a structural diagram of an efficient feature extraction module of a deep enhanced feature extraction network in an embodiment of the present invention;

[0035] Figure 5 is a structural diagram of a feature enhancement module of a deep enhancement feature extraction network in an embodiment of the present invention;

[0036] Figure 6 is a cross-layer interactive connection network structure diagram of a surface defect detection model in an embodiment of the present invention;

[0037] Figure 7 is a structural diagram of a semantic perception module of a semantic perception recognition network in an embodiment of the present invention;

[0038] Figure 8 It is a structural diagram of the global attention module of the semantic perception recognition network in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0040] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0041] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0042] Terminology explanation:

[0043] Surface defect detection: Surface defect detection is a key technology in the field of industrial quality control, which aims to use computer vision technology to identify and locate defects on the surface of objects.

[0044] Feature extraction network: In the object detection task, the role of the feature extraction network is to extract the feature representation of the object from the input image. The feature extraction network can learn the features of different regions in the image, thereby providing location information. As the network level increases, the feature extraction network can capture more advanced semantic information, which is crucial for understanding the object category and shape in the image, and helps to improve the accuracy of object detection.

[0045] Multi-scale feature fusion network: The multi-scale feature fusion network aims to effectively capture information of different scales and improve the model's detection performance of targets. By integrating feature information from different levels and scales, the detection performance of targets of different scales is improved, while enhancing the modeling of target context information.

[0046] Embodiment 1

[0047] See attached Figure 1 As shown, this embodiment discloses a display screen defect detection method based on an enhanced feature extraction network, the method comprising the following steps:

[0048] Acquire a liquid crystal display screen image to be detected; input the liquid crystal display screen image into a trained surface defect detection model to obtain a defect detection result.

[0049] S1: Collect and annotate LCD screen images to obtain an LCD screen dataset;

[0050] In this embodiment, liquid crystal display images are collected, the collected images are annotated, and a data set is constructed using the annotation files and the corresponding image files; the data set is divided into a training set, a test set, and a validation set.

[0051] Specifically, the images of the LCD screen are collected and image files are created. Then, the image files are annotated using the image annotation software labelme, and corresponding annotation files are created for each image. The annotation files include six different defect categories, such as cracks, breakages, scratches, water drops, spots, and burrs, and the defect locations and defect categories in the image are recorded. The image files and the corresponding annotation files together constitute the LCD screen defect dataset. In order to train and evaluate the model, the dataset is divided into training set, test set, and validation set according to 6:2:2.

[0052] S2: constructing a surface defect detection model for a liquid crystal display screen, and training it using a liquid crystal display screen data set to obtain a trained surface defect detection model; the surface defect detection model includes a deep reinforcement feature extraction network, a cross-layer interactive connection network, and a semantic perception recognition network connected in sequence;

[0053] In this embodiment, a surface defect detection model for a liquid crystal display screen is constructed, specifically including the following steps:

[0054] S201, building a deep enhanced feature extraction network for LCD surface defect detection; the LCD image is first subjected to a deep enhanced feature extraction network to extract features of different scales from the LCD image, and output enhanced features of different scales.

[0055] The deep enhanced feature extraction network extracts different scale features of the LCD display image through the deep feature learning module, inputs the different scale features into the feature enhancement module to capture the global context information, and outputs enhanced features of different scales.

[0056] The deep enhanced feature extraction network includes a convolution module, a first deep feature learning module, a first feature enhancement module, a second deep feature learning module, a second feature enhancement module, a third deep feature learning module, a third feature enhancement module, a fourth deep feature learning module, and a fourth feature enhancement module. Specifically, the LCD screen image x is input into the deep enhanced feature extraction network, and the image x is passed through the convolution module to obtain a feature map , the feature map Input to the first deep feature learning module and output the feature map , the feature map Input to the first feature enhancement module and output the feature map , the feature map Input to the second deep feature learning module and output the feature map , the feature map Input to the second feature enhancement module and output the feature map , the feature map Input to the third deep feature learning module and output the feature map , the feature map Input to the third feature enhancement module and output the feature map , the feature map Input to the fourth deep feature learning module and output the feature map , the feature map Input to the fourth feature enhancement module and output the feature map .

[0057] The first deep feature learning module, the second deep feature learning module, the third deep feature learning module, and the fourth deep feature learning module use the same network structure. The first feature enhancement module, the second feature enhancement module, the third feature enhancement module, and the fourth feature enhancement module use the same network structure. The network structures of the first deep feature learning module and the first feature enhancement module are described in detail below, and other modules with the same network structure are not described in detail.

[0058] Specifically, the convolution module includes a convolution layer with a convolution kernel size of 3×3, batch normalization, and SiLU activation function. The deep enhanced feature extraction network reduces the size of the LCD screen image through the convolution module and inputs the reduced size LCD screen image into the deep feature learning module.

[0059] Specifically, the first deep feature learning module includes an efficient feature extraction module and a channel perception module. Furthermore, the efficient feature extraction module includes four convolution modules with a convolution kernel size of 1×1, two deep convolution modules with a convolution kernel size of 3×3, and adds residual edges to reuse input features. Specifically, the input image x is first reduced to half the original feature map size through the convolution module, and the feature map is output. , the convolution kernel size of the convolution module is 3×3 and the stride is 2. Then the feature map The input is sent to the efficient feature extraction module, which is divided into two branches, left and right, to fully extract the texture and detail features of the defect image. The left branch extracts the feature map Input to the first 1×1 convolution module and output the feature map , the feature map Input to the 3×3 deep convolution module and output the feature map , the feature map Input to the second 1×1 convolution module and output the feature map , the feature map Input to the third 1×1 convolution module and output the feature map , the feature map With feature map Add element by element and output the feature map The right branch inputs the input image x into a 3×3 deep convolution module and outputs the feature map , the feature map Input to the fourth 1×1 convolution module and output the feature map , the feature map and feature map Use the Concat function to perform concatenation and output the feature map The efficient feature extraction module can be expressed by the following formula:

[0060]

[0061]

[0062]

[0063] Among them, F is the input feature map, is a convolution and a convolution module of size 1×1, is a deep convolution module with a convolution kernel size of 3×3. It is a bitwise addition, and Concat is a concatenation operation.

[0064] Then the feature map output by the efficient feature extraction module The input is sent to the channel perception module to identify and emphasize the feature channels that are most critical to the current task, so that the network can respond more sensitively to defective feature channels and highlight defective features. The channel perception module includes three convolution modules with a convolution kernel size of 1×1. Specifically, the feature map After the first 1×1 convolution module, the output is the feature map , the feature map After the Softmax layer, the weight matrix of each channel is calculated and the feature map is output , the feature map With feature map Perform element-by-element multiplication and output the feature map , the feature map Input to the second 1×1 convolution module and output the feature map , the feature map Input to the third 1×1 convolution module and output the feature map Finally, the feature map and feature map Add element by element and output the feature map The channel perception module can be expressed by the following formula:

[0065]

[0066]

[0067] in, is the Softmax activation function, For bitwise multiplication, is a convolution module with a convolution kernel size of 1×1. It is the feature map output by the efficient feature extraction module.

[0068] Specifically, the first feature enhancement module includes a deep convolution module with a convolution kernel size of 3×3, a deep convolution module with a convolution kernel size of 5×5, a point-by-point convolution module with a convolution kernel size of 1×1, a convolution module with a convolution kernel size of 1×1, and a self-attention module.

[0069] Specifically, the feature map The feature map is input to the first feature enhancement module to capture the global context information and local modeling capabilities of the input image and enhance the model's perception of defect features. Input to the batch normalization layer and output the feature map , the feature map Input to the deep convolution module with a convolution kernel size of 3×3, and output the feature map , the feature map The input is sent to the deep convolution module with a convolution kernel size of 5×5 to extract the deep features of the defect location, and the output is the feature map , the feature map Input to the convolution module with a convolution kernel size of 1×1, and output the feature map , using convolutional modules of different sizes to improve the network's local modeling ability for defect images, and then and feature map Perform element-by-element addition and output the feature map , the feature map After the batch normalization layer, the output is the feature map , the feature map Input to the point-by-point convolution module with a convolution kernel size of 1×1, and output the feature map , the feature map Input to the self-attention module and output the feature map , the feature map and feature map Add element by element and output the feature map , the self-attention module is used to obtain the global modeling ability of the input image, capture the global features of the image, and improve the generalization ability of the model.

[0070] The self-attention module first takes the input feature map Mapped to the query vector (Q), key vector (K) and value vector (V), and then obtain the attention score by calculating the dot product of the Q vector and the K vector. The obtained attention score is normalized by softmax and used to weight the V vector, and finally the weighted output feature map is obtained. The feature enhancement module can be expressed by the following formula:

[0071]

[0072]

[0073] in, is a deep convolution module with a convolution kernel size of 3×3. is a deep convolution module with a convolution kernel size of 5×5. is a convolution module with a convolution kernel size of 1×1. is a point-by-point convolution module with a convolution kernel size of 1×1, BN is batch normalization, is bitwise addition, ATT is the self-attention module, and M is the output feature map of the channel perception module.

[0074] It can be expressed as:

[0075]

[0076] Among them, Q represents the query vector, K represents the queried vector, and V represents the value obtained by the query. represents the scale factor, represents the trainable relative position bias, T represents transposition, Represents the activation function.

[0077] S202, build a cross-layer interactive connection network for surface defect detection of LCD screens; combine the enhanced features of different scales, i.e., feature maps , , , The input to the cross-layer interactive connection network effectively combines shallow features and deep features, fully integrates the features of adjacent layers and cross-layers, and outputs interactive features of different scales.

[0078] The cross-layer interactive connection network uses the cross-layer splicing of features between multi-layer interactive connection units, and fully integrates the features of adjacent layers and cross-layers in the top-down and bottom-up paths using the feature re-weighting strategy, ensuring the efficient fusion of features of different scales in the network and outputting interactive features of different scales. Among them, the re-weighting strategy is manifested as the splicing between different feature maps.

[0079] The feature map , , , Input to a cross-layer interactive connection network, the cross-layer interactive connection network consists of a first cross-layer interactive connection unit, a second cross-layer interactive connection unit, a third cross-layer interactive connection unit, a fourth cross-layer interactive connection unit, a fifth cross-layer interactive connection unit, a sixth cross-layer interactive connection unit, a seventh cross-layer interactive connection unit, an eighth cross-layer interactive connection unit, a ninth cross-layer interactive connection unit, a tenth cross-layer interactive connection unit, an eleventh cross-layer interactive connection unit and a twelfth cross-layer interactive connection unit.

[0080] Specifically, the first cross-layer interactive connection unit is composed of a convolutional layer, an upsampling layer, and a C3 module of the YOLOV5 network in sequence. Input to the first cross-layer connection unit and output the feature map .

[0081] The second cross-layer interactive connection unit is composed of the convolutional layer, the upsampling layer and the C3 module of the YOLOV5 network in sequence. Input to the second cross-layer interactive connection unit, and output the feature map .

[0082] The third cross-layer interactive connection unit is composed of the convolutional layer, the upsampling layer and the C3 module of the YOLOV5 network in sequence. , input the feature map into the third cross-layer interactive connection unit, and output the feature map .

[0083] The fourth cross-layer interactive connection unit is composed of the convolutional layer and the C3 module of the YOLOV5 network in sequence, which transforms the feature map Input to the fourth cross-layer interactive connection unit, and output the feature map .

[0084] The fifth cross-layer interactive connection unit is composed of the deep feature learning module and the C3 module of the YOLOV5 network in turn, and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the fifth cross-layer interactive connection unit, and output the feature map .

[0085] The sixth cross-layer interactive connection unit is composed of the deep feature learning module and the C3 module of the YOLOV5 network in turn, , feature map and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the sixth cross-layer interactive connection unit, and output the feature map .

[0086] The seventh cross-layer interactive connection unit is composed of the deep feature learning module and the C3 module of the YOLOV5 network in turn, , feature map , feature map and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the seventh cross-layer interactive connection unit, and output the feature map .

[0087] The eighth cross-layer interactive connection unit is composed of the convolutional layer and the C3 module of the YOLOV5 network in sequence, , feature map and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the eighth cross-layer interactive connection unit, and output the feature map .

[0088] The ninth cross-layer interactive connection unit is composed of a convolutional layer, an upsampling layer, and the C3 module of the YOLOV5 network in sequence. Input to the ninth cross-layer interactive connection unit and output the feature map f1.

[0089] The tenth cross-layer interactive connection unit is composed of the convolutional layer, the upsampling layer and the C3 module of the YOLOV5 network in sequence, The Concat function is used to concatenate the feature map f1 and output the feature map , the feature map Input to the tenth cross-layer interactive connection unit and output the feature map f2.

[0090] The eleventh cross-layer interactive connection unit is composed of a convolutional layer, an upsampling layer, and the C3 module of the YOLOV5 network in sequence. , feature map f1 and feature map f2 are concatenated through the Concat function, and the output is the feature map , the feature map Input to the eleventh cross-layer interactive connection unit and output the feature map f3.

[0091] The twelfth cross-layer interactive connection unit is composed of the convolutional layer and the C3 module of the YOLOV5 network in sequence. , feature map , feature map f1 and feature map f3 are concatenated through the Concat function to output the feature map , the feature map Input to the twelfth cross-layer interactive connection unit and output the feature map f4.

[0092] S203. Build a semantic perception and recognition network for surface defect detection of liquid crystal display screens; input interactive features of different scales, namely feature map f1, feature map f2, feature map f3 and feature map f4, into the semantic perception and recognition network to capture long-distance features, enhance the multi-scale representation of defect features, accurately identify defect features, and finally output defect detection results.

[0093] The semantic perception recognition network consists of a semantic perception module, a global attention module, and a detection head of the YOLOV5 network. The detection head of the YOLOV5 network consists of a convolution module with a convolution kernel size of 1×1 and a Sigmoid activation function. The semantic perception recognition network first obtains semantic features at different levels through the semantic perception module, and then highlights the features most relevant to defect detection through the global attention module.

[0094] Specifically, the semantic perception module is composed of a convolution module, a parallel first branch module, a second branch module, a third branch module and a fourth branch module, and a convolution module in sequence.

[0095] The convolution module is a convolution module with a convolution kernel size of 1×1; the first branch module includes a convolution module with a convolution kernel size of 3×3, the second branch module includes two convolution modules with a convolution kernel size of 5×5, the third branch module includes two convolution modules with a convolution kernel size of 7×7, and the fourth branch module includes two convolution modules with a convolution kernel size of 9×9.

[0096] In the semantic perception module, different levels of semantic features are output by using convolution modules with different convolution kernel sizes and fusing branches with similar semantic features. First, the feature maps f1, f2, f3, and f4 output by the cross-layer interactive connection network are concatenated using the Concat function to output the feature map. , the feature map The number of channels is reduced through a 1×1 convolution module, and the output is a feature map. , and then the feature map It is divided into four branches. The first branch outputs the feature map through a 3×3 convolution module. The second branch is output through a 5×5 convolution module to obtain the feature map The third branch is output through a 7×7 convolution module to obtain a feature map , the fourth branch is output through a 9×9 convolution module to obtain the feature map , the feature map The feature map is obtained by outputting the 5×5 convolution module , the feature map output by the first branch The feature map output by the second branch Use the Concat function to perform concatenation and output the feature map , the third branch feature map The feature map is obtained by outputting the 7×7 convolution module , the second branch outputs the feature map And the third branch feature map Use the Concat function to perform concatenation and output the feature map , the fourth branch feature map The feature map is obtained by outputting the 9×9 convolution module. , the third branch outputs the feature map And the fourth branch feature map Use the Concat function to perform concatenation and output the feature map Finally, the feature map , feature map , feature map and feature map Use the Concat function to perform concatenation and output the feature map , the feature map The feature map u is obtained after the output of the 1×1 convolution module. The semantic perception module can be expressed by the following formula:

[0097] First, the feature maps f1, f2, f3, and f4 are fused, and a 1×1 convolution module is used to reduce the number of channels.

[0098]

[0099] Among them, Concat is a concatenation operation. Represents a convolution module with a convolution kernel size of 1×1.

[0100] Secondly, convolution modules with different convolution kernel sizes and the fusion of semantically similar feature branches are used to obtain semantic information at different levels and enrich multi-scale features.

[0101]

[0102]

[0103]

[0104]

[0105] in, represents a convolution module with a convolution kernel size of 3×3. represents a convolution module with a convolution kernel size of 5×5. represents a convolution module with a convolution kernel size of 7×7. It represents a convolution module with a convolution kernel size of 9×9, and Concat is a concatenation operation.

[0106] Finally, the features of different scales obtained by the four branches are fused, and the number of channels is reduced using a 1×1 convolution module.

[0107]

[0108] in, is a convolution module with a convolution kernel size of 1×1, Concat is a concatenation operation, It is the output feature map of the semantic perception module.

[0109] Specifically, the feature map u is input into the global attention module, which consists of a channel attention module and a spatial attention module. The channel attention module focuses on the feature responses between different channels and suppresses unimportant channels. The spatial attention module focuses on the defect area, enhances the feature responses of the defect area, and then outputs the features.

[0110] The channel attention module consists of global average pooling, global maximum pooling, two convolution modules with a convolution kernel size of 1×1, batch normalization, and SiLU activation function. Specifically, the feature map u is first input into the global average pooling module, and the feature map is output. , extract the rich features of the input image, capture the grayscale distribution and texture information of the image, input the feature map u into the global maximum pooling module, and output the feature map , capturing local details and edge information in the image and enhancing the recognition of subtle defects. and feature map Use the Concat function to perform concatenation and output the feature map , the feature map After the first convolution module with a convolution kernel size of 1×1, the channel dimension is reduced and the feature map is output. , the feature map The defect features are extracted through the second convolution module with a convolution kernel size of 1×1, and the feature map is output. , the feature map After the batch normalization layer and SiLU activation function, the gradient of the model is prevented from disappearing during the training process, which speeds up the convergence of the model and improves the model's ability to express image features. The weight matrix feature map is output. , the original input feature map u and the feature map Perform element-by-element multiplication, establish residual edges, and output the feature map The channel attention module can be expressed by the following formula:

[0111]

[0112]

[0113] in, represents bitwise multiplication, Concat represents concatenation operation, MaxPool represents global maximum pooling, AvgPool represents global average pooling, N represents the input feature map of the channel attention module, represents a convolution module with a convolution kernel size of 1×1, and SiLU represents the activation function.

[0114] The spatial attention module includes a dilated convolution module with a dilated ratio of 1 and a convolution kernel size of 3×3, a dilated convolution module with a dilated ratio of 3 and a convolution kernel size of 3×3, a dilated convolution module with a dilated ratio of 5 and a convolution kernel size of 3×3, and a global average pooling module. The spatial attention module is used to identify defect-related areas in the image and enhance the feature response of the defective area, so that the model can capture the defect features more sensitively. Input to the global average pooling module and output the feature map , the feature map Input to the dilated convolution module with a dilated rate of 1 and a convolution kernel size of 3×3, and output the feature map , the feature map Input to the dilated convolution module with a dilated rate of 3 and a convolution kernel size of 3×3, and output the feature map , the feature map Input to the dilated convolution module with a dilated rate of 5 and a convolution kernel size of 3×3, and the output is the feature map , the feature map With feature map Perform element-by-element multiplication and establish residual connections to reuse input features and output feature maps The spatial attention module can be expressed by the following formula:

[0115]

[0116]

[0117] in, It is a dilated convolution module with a dilated rate of 1 and a convolution kernel size of 3×3. It is a dilated convolution module with a dilation rate of 3 and a convolution kernel size of 3×3. It is a dilated convolution module with a dilation rate of 5 and a convolution kernel size of 3×3.

[0118] Specifically, the output feature map of the global attention module The image is input into the detection head of the YOLOV5 network of the semantic perception recognition network to obtain the final feature image y, i.e., the defect detection result. The final feature image y contains the category, defect location, and confidence information of the LCD screen defect.

[0119] S204, integrating the deep enhanced feature extraction network, the cross-layer interactive connection network and the semantic perception recognition network to form a surface defect detection model for a liquid crystal display.

[0120] In this embodiment, the deep enhanced feature extraction network, the cross-layer interactive connection network, and the semantic perception recognition network are connected in sequence to form a liquid crystal display defect detection model, and the training set after the data set is divided is input into the liquid crystal display defect detection model for training.

[0121] During the training process, the model uses Adam as the optimizer, the image size is initialized to 640×640, and the training is repeated for 300 rounds, with 32 images per batch.

[0122] The model uses enhanced training loss during training , It is used to perceive the difference in shape between the predicted frame and the real frame, and improve the ability to recognize defects of different shapes on LCD screens. It can be expressed by the following formula:

[0123]

[0124]

[0125]

[0126] Among them, IoU represents the intersection-over-union ratio between the real box and the predicted box. represents the weight parameter, Represents the correction factor, which is used to further adjust the loss function; , Represent the center points of the predicted box and the real box respectively, represents the Euclidean distance, Represents the square of the distance between the center of the real box and the predicted box, Represents the diagonal length of the minimum bounding box enclosed by the real box and the predicted box, , Represent the width and height of the real frame respectively, , Represent the width and height of the prediction box respectively, is the ratio of the height of the predicted bounding box to the true bounding box, is the ratio of the width of the predicted bounding box to the true bounding box, , are the heights of the predicted box and the true box, respectively. , are the widths of the predicted box and the true box respectively.

[0127] By formula Calculate the total loss , where is the cross entropy loss function.

[0128] It should be noted that the expression formulas of each module in this embodiment are for illustrative purposes only and do not include all the expression formulas of the complete process of each module. Similar formula contents will not be repeated here.

[0129] S205: Package and deploy the trained LCD surface defect detection model to detect LCD defects.

[0130] Develop an inference script for the LCD defect detection model, integrate and load the optimal weights obtained from the training results, and use it for LCD defect detection. The script is then embedded in the application and deployed to the local server to achieve automated defect identification.

[0131] S3: Collect images of the LCD screen and input them into the trained surface defect detection model to obtain defect detection results.

[0132] Embodiment 2

[0133] The present invention provides a display screen defect detection system based on an enhanced feature extraction network, comprising:

[0134] A data acquisition module is configured to: acquire an image of a liquid crystal display screen to be detected;

[0135] A model detection module is configured to: input the LCD screen image into a trained surface defect detection model to obtain a defect detection result;

[0136] Among them, the surface defect detection model includes a deep enhanced feature extraction network, a cross-layer interactive connection network and a semantic perception recognition network connected in sequence. First, the deep enhanced feature extraction network extracts different scale features of the LCD screen image, outputs enhanced features of different scales, and inputs the enhanced features of different scales into the cross-layer interactive connection network to effectively combine shallow features and deep features, fully integrate features of adjacent layers and cross-layers, output interactive features of different scales, and input the interactive features of different scales into the semantic perception recognition network to capture long-distance features, enhance the multi-scale representation of defect features, and finally output defect detection results.

[0137] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0139] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A display screen defect detection method based on an enhanced feature extraction network, characterized in that: include: Acquire the LCD screen image to be detected; Inputting the LCD screen image into a trained surface defect detection model to obtain a defect detection result; The surface defect detection model includes a deep enhanced feature extraction network, a cross-layer interactive connection network and a semantic perception recognition network connected in sequence. First, the deep enhanced feature extraction network extracts different scale features of the LCD screen image, outputs enhanced features of different scales, and inputs the enhanced features of different scales into the cross-layer interactive connection network to effectively combine shallow features and deep features, fully integrate features of adjacent layers and cross-layers, output interactive features of different scales, and inputs the interactive features of different scales into the semantic perception recognition network to capture long-distance features, enhance the multi-scale representation of defect features, and finally output defect detection results. The deep reinforcement feature extraction network includes a convolution module, a first deep feature learning module, a first feature reinforcement module, a second deep feature learning module, a second feature reinforcement module, a third deep feature learning module, a third feature reinforcement module, a fourth deep feature learning module, and a fourth feature reinforcement module; specifically, the LCD screen image x is input into the deep reinforcement feature extraction network, and the image x is passed through the convolution module to obtain a feature map , the feature map Input to the first deep feature learning module and output the feature map , the feature map Input to the first feature enhancement module and output the feature map , the feature map Input to the second deep feature learning module and output the feature map , the feature map Input to the second feature enhancement module and output the feature map , the feature map Input to the third deep feature learning module and output the feature map , the feature map Input to the third feature enhancement module and output the feature map , the feature map Input to the fourth deep feature learning module and output the feature map , the feature map Input to the fourth feature enhancement module and output the feature map ; The first deep feature learning module, the second deep feature learning module, the third deep feature learning module, and the fourth deep feature learning module use the same network structure; the first feature enhancement module, the second feature enhancement module, the third feature enhancement module, and the fourth feature enhancement module use the same network structure; The first deep feature learning module includes an efficient feature extraction module and a channel perception module. Furthermore, the efficient feature extraction module includes four convolution modules with a convolution kernel size of 1×1, two deep convolution modules with a convolution kernel size of 3×3, and adds residual edges to reuse input features. Specifically, the input image x is first reduced to half the original feature map size through the convolution module, and the feature map is output. , the convolution kernel size of the convolution module is 3×3, and the step size is 2; then the feature map The input is sent to the efficient feature extraction module, which is divided into two branches, left and right, to fully extract the texture and detail features of the defect image. The left branch extracts the feature map Input to the first 1×1 convolution module and output the feature map , the feature map Input to the 3×3 deep convolution module and output the feature map , the feature map Input to the second 1×1 convolution module and output the feature map , the feature map Input to the third 1×1 convolution module and output the feature map , the feature map With feature map Add element by element and output the feature map ; The right branch inputs the input image x into the 3×3 deep convolution module and outputs the feature map , the feature map Input to the fourth 1×1 convolution module and output the feature map , the feature map and feature map Use the Concat function to perform concatenation and output the feature map ; Then the feature map output by the efficient feature extraction module The input is sent to the channel perception module to identify and emphasize the feature channels that are most critical to the current task and highlight the defective features; the channel perception module includes three convolution modules with a convolution kernel size of 1×1. Specifically, the feature map After the first 1×1 convolution module, the output is the feature map , the feature map After the Softmax layer, the weight matrix of each channel is calculated and the feature map is output , the feature map With feature map Perform element-by-element multiplication and output the feature map , the feature map Input to the second 1×1 convolution module and output the feature map , the feature map Input to the third 1×1 convolution module and output the feature map , and finally the feature map and feature map Add element by element and output the feature map ; The first feature enhancement module includes a deep convolution module with a convolution kernel size of 3×3, a deep convolution module with a convolution kernel size of 5×5, a point-by-point convolution module with a convolution kernel size of 1×1, a convolution module with a convolution kernel size of 1×1, and a self-attention module; First, the feature map Input to the batch normalization layer and output the feature map , the feature map Input to the deep convolution module with a convolution kernel size of 3×3, and output the feature map , the feature map The input is sent to the deep convolution module with a convolution kernel size of 5×5 to extract the deep features of the defect location, and the output is the feature map , the feature map Input to the convolution module with a convolution kernel size of 1×1, and output the feature map , using convolutional modules of different sizes to improve the network's local modeling ability for defect images, and then converting the feature map and feature map Perform element-by-element addition and output the feature map , the feature map After the batch normalization layer, the output is the feature map , the feature map Input to the point-by-point convolution module with a convolution kernel size of 1×1, and output the feature map , the feature map Input to the self-attention module and output the feature map , the feature map and feature map Add element by element and output the feature map ; The cross-layer interactive connection network is composed of a first cross-layer interactive connection unit, a second cross-layer interactive connection unit, a third cross-layer interactive connection unit, a fourth cross-layer interactive connection unit, a fifth cross-layer interactive connection unit, a sixth cross-layer interactive connection unit, a seventh cross-layer interactive connection unit, an eighth cross-layer interactive connection unit, a ninth cross-layer interactive connection unit, a tenth cross-layer interactive connection unit, an eleventh cross-layer interactive connection unit and a twelfth cross-layer interactive connection unit; Specifically, the first cross-layer interactive connection unit is composed of a convolutional layer, an upsampling layer, and a C3 module of the YOLOV5 network in sequence. Input to the first cross-layer connection unit and output the feature map ; The second cross-layer interactive connection unit is composed of the convolutional layer, the upsampling layer and the C3 module of the YOLOV5 network in sequence. Input to the second cross-layer interactive connection unit, and output the feature map ; The third cross-layer interactive connection unit is composed of the convolutional layer, the upsampling layer and the C3 module of the YOLOV5 network in sequence. , input the feature map into the third cross-layer interactive connection unit, and output the feature map ; The fourth cross-layer interactive connection unit is composed of the convolutional layer and the C3 module of the YOLOV5 network in sequence, which transforms the feature map Input to the fourth cross-layer interactive connection unit, and output the feature map ; The fifth cross-layer interactive connection unit is composed of the deep feature learning module and the C3 module of the YOLOV5 network in turn, and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the fifth cross-layer interactive connection unit, and output the feature map ; The sixth cross-layer interactive connection unit is composed of the deep feature learning module and the C3 module of the YOLOV5 network in turn, , feature map and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the sixth cross-layer interactive connection unit, and output the feature map ; The seventh cross-layer interactive connection unit is composed of the deep feature learning module and the C3 module of the YOLOV5 network in turn, , feature map , feature map and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the seventh cross-layer interactive connection unit, and output the feature map ; The eighth cross-layer interactive connection unit is composed of the convolutional layer and the C3 module of the YOLOV5 network in sequence, , feature map and feature map The concatenation operation is performed through the Concat function, and the feature map is output , the feature map Input to the eighth cross-layer interactive connection unit, and output the feature map ; The ninth cross-layer interactive connection unit is composed of a convolutional layer, an upsampling layer, and the C3 module of the YOLOV5 network in sequence. Input to the ninth cross-layer interactive connection unit, and output the feature map f1; The tenth cross-layer interactive connection unit is composed of the convolutional layer, the upsampling layer and the C3 module of the YOLOV5 network in sequence, The Concat function is used to concatenate the feature map f1 and output the feature map , the feature map Input to the tenth cross-layer interactive connection unit, and output the feature map f2; The eleventh cross-layer interactive connection unit is composed of a convolutional layer, an upsampling layer, and the C3 module of the YOLOV5 network in sequence. , feature map f1 and feature map f2 are concatenated through the Concat function, and the output is the feature map , the feature map Input to the eleventh cross-layer interactive connection unit, and output the feature map f3; The twelfth cross-layer interactive connection unit is composed of the convolutional layer and the C3 module of the YOLOV5 network in sequence. , feature map , feature map f1 and feature map f3 are concatenated through the Concat function to output the feature map , the feature map Input to the twelfth cross-layer interactive connection unit, and output the feature map f4; The semantic perception recognition network consists of a semantic perception module, a global attention module, and a detection head of the YOLOV5 network. The detection head of the YOLOV5 network consists of a convolution module with a convolution kernel size of 1×1 and a Sigmoid activation function. The semantic perception recognition network first obtains semantic features at different levels through the semantic perception module, and then highlights the features most relevant to defect detection through the global attention module. Specifically, the semantic perception module is composed of a convolution module, a parallel first branch module, a second branch module, a third branch module and a fourth branch module, and a convolution module in sequence; the first branch module includes a convolution module with a convolution kernel size of 3×3, the second branch module includes two convolution modules with a convolution kernel size of 5×5, the third branch module includes two convolution modules with a convolution kernel size of 7×7, and the fourth branch module includes two convolution modules with a convolution kernel size of 9×9; the output feature map of the global attention module is input into the detection head of the YOLOV5 network of the semantic perception recognition network to obtain the final feature image, i.e., the defect detection result.

2. A display screen defect detection method based on enhanced feature extraction network as claimed in claim 1, characterized in that: The deep enhanced feature extraction network extracts different scale features of the LCD screen image through a deep feature learning module, inputs the different scale features into a feature enhancement module to capture global context information, and outputs enhanced features of different scales.

3. A display screen defect detection method based on enhanced feature extraction network as claimed in claim 1, characterized in that: The cross-layer interactive connection network uses a feature reweighting strategy to fully fuse the features of adjacent layers and cross-layers in the top-down and bottom-up paths through cross-layer splicing of features between multi-layer interactive connection units, and outputs interactive features of different scales.

4. The display screen defect detection method based on enhanced feature extraction network according to claim 1, characterized in that: The semantic perception module outputs semantic features at different levels by utilizing convolution modules with different convolution kernel sizes and fusing branches with similar semantic features.

5. The display screen defect detection method based on enhanced feature extraction network according to claim 1, characterized in that: The global attention module focuses on the feature responses between different channels through the channel attention module, suppresses unimportant channels, and focuses on specific defect areas through the spatial attention module, enhances the feature responses of the defect areas, and then outputs features.

6. A display screen defect detection system based on an enhanced feature extraction network, using a display screen defect detection method based on an enhanced feature extraction network as described in any one of claims 1 to 5, characterized in that: include: A data acquisition module is configured to: acquire an image of a liquid crystal display screen to be detected; A model detection module is configured to: input the LCD screen image into a trained surface defect detection model to obtain a defect detection result; Among them, the surface defect detection model includes a deep enhanced feature extraction network, a cross-layer interactive connection network and a semantic perception recognition network connected in sequence. First, the deep enhanced feature extraction network extracts different scale features of the LCD screen image, outputs enhanced features of different scales, and inputs the enhanced features of different scales into the cross-layer interactive connection network to effectively combine shallow features and deep features, fully integrate features of adjacent layers and cross-layers, output interactive features of different scales, and input the interactive features of different scales into the semantic perception recognition network to capture long-distance features, enhance the multi-scale representation of defect features, and finally output defect detection results.

Citation Information

Patent Citations

  • Single-stage target detection neural network based on multi-scale fusion, and industrial product surface defect detection model

    CN113780423A

  • Voice emotion recognition method and system based on cross-layer cross fusion

    CN114898775A