Television LED display screen defect detection method and system based on visual perception
Through self-coding network training with the fusion of visual attention mechanism and multi-scale features, the high-precision and real-time problems of defect detection of TV LED displays are solved, efficient and accurate defect detection is achieved, and labor costs and false detection are reduced.
Patent Information
- Application Number
- CN202510354061.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional artificial visual inspection and basic image processing methods have strong subjectivity in the detection of defects of TV LED display screens, are prone to missed and missed, and are difficult to deal with complex defect types. The existing visual perception methods are difficult to achieve high-precision and real-time detection.
The visual attention mechanism is used to obtain potential defect candidate areas, build a feature extraction network through the U-Net network, perform multi-scale feature fusion and self-encoding network training, and generate defect bounding block diagrams and category labels based on the semi-supervised method of pseudo-label.
It improves the accuracy and speed of defect detection, meets the requirements of real-time industrialization, reduces false detection and missed detection rates, reduces labor costs and rework costs, and improves production efficiency and product quality.
Smart Images

Figure CN120495158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection technology, and more specifically, to a method and system for detecting defects in a television LED display screen based on visual perception. Background Art
[0002] As a core component of modern display technology, the quality of LED displays for televisions directly impacts the user's visual experience. However, during the production process, LED displays may develop various defects, such as bright spots, dark spots, color differences, and scratches, due to manufacturing processes, material defects, or environmental factors. Traditional defect detection methods rely primarily on manual visual inspection, which relies on experienced inspectors to visually observe the display surface and identify defects. This method is highly subjective and susceptible to fatigue and distraction, leading to missed detections and false detections. Basic image processing techniques (such as edge detection and threshold segmentation) are also used for defect detection. This method has high requirements for image quality and struggles to handle complex defect types.
[0003] With the development of computer vision and artificial intelligence technologies, automated defect detection methods based on visual perception have gradually become a research hotspot, significantly improving detection efficiency and accuracy. Currently, visual defect detection faces many challenges. For example, LED display images may be affected by background light and reflections, making it difficult to detect small defects using conventional image processing techniques. Defect detection on production lines requires real-time detection. Therefore, how to use visual perception to achieve higher-precision and faster defect detection for TV LED displays is an urgent problem that needs to be solved. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention proposes a method and system for detecting defects in TV LED displays based on visual perception, which solves the problem that existing tiny defects are difficult to detect and cannot meet real-time requirements, and uses visual perception to achieve higher-precision and faster TV LED display defect detection.
[0005] A first aspect of the present invention provides a method for detecting defects in a television LED display screen based on visual perception, comprising the following steps:
[0006] Collect and preprocess the image data of the LED display screen of the TV, use the visual attention mechanism to obtain the potential defect candidate areas, perform primary classification on the potential defect candidate areas, and extract all defect candidate areas;
[0007] Obtaining difference features between defect features and background features in the defect candidate area, performing feature enhancement on the difference features to generate difference features of different scales, and performing multi-scale feature fusion on the difference features of different scales to generate multi-scale interactive features;
[0008] A defect detection and classification model is constructed based on an autoencoder network, and the model is trained through a semi-supervised method of pre-training and pseudo-labeling. In the defect detection and classification model, a convolution block is used to generate a defect boundary box diagram and a defect category label according to the multi-scale interaction features.
[0009] In this solution, the image data of the TV LED display is collected and preprocessed, and the visual attention mechanism is used to obtain the candidate areas of potential defects. Specifically:
[0010] Performing multi-angle full-screen scanning to collect TV LED display image data through machine vision, dividing the TV LED display image data using detection backgrounds to generate display image subsets corresponding to different detection backgrounds;
[0011] Performing filtering, denoising, contrast enhancement, and normalization processing on the image samples in the display screen image subset to obtain standard image data of the TV LED display screen under different detection backgrounds;
[0012] Segmenting the processed image samples and the standard image data into image blocks using a sliding window, performing an affine transformation on the image blocks to generate an affine transformation matrix, constructing a two-dimensional grid based on the affine transformation matrix, and using the two-dimensional grid to map pixels of the image samples to corresponding positions on the standard image data to generate registered TV LED display screen image data;
[0013] Obtain pre-processed TV LED display image data, perform color difference calculation within a preset neighborhood using a sliding window, obtain a sub-image after difference calculation, obtain the sum of the pixel grayscales of the sub-image, and select the best difference sub-image based on the sum of the pixel grayscales;
[0014] All the best differential sub-images are merged to obtain the final differential image and morphological processing is performed to extract contour information to determine the candidate areas for initial screening defects. Multi-scale visual attention is introduced to downsample each candidate area for initial screening defects, and visual attention weights are extracted through depthwise separable convolution and activation function.
[0015] According to the visual attention weight, the initial screening defect candidate area with a weight greater than a preset weight threshold is selected as the potential defect candidate area.
[0016] In this solution, the potential defect candidate areas are preliminarily classified to extract all defect candidate areas, specifically:
[0017] Obtain the gradients of the three RGB channels of the potential defect candidate area, use the potential defect area as a template image, obtain an image block of a preset size from the standard image data based on the potential defect area as the search image, and use the template image to perform sliding matching on the search image;
[0018] Calculate the gradient similarity between feature points in the sliding window, sort all the gradient similarities in the sliding window, and select the highest gradient similarity as the score of the potential defect area;
[0019] The template image and the searched image are exchanged and matched again, and the bidirectional matching score is obtained through two sliding searches. The lower score is used as the final score of the potential defect area through comparison. If the final score of the potential defect area is less than the preset score threshold and the pixel area is greater than the area threshold, it is marked as a defect candidate area.
[0020] In this solution, the difference features between the defect features and the background features in the defect candidate area are obtained, and the difference features are enhanced to generate difference features of different scales, specifically:
[0021] A feature extraction network is constructed based on the U-Net network structure. The encoder part of the U-Net network is improved using a weight-sharing Siamese network. The defect candidate region and the corresponding template sub-image are used as input. Convolution operations of different scales are used in the Siamese network to obtain multi-scale shared features.
[0022] The shared features corresponding to the template sub-image are subtracted from the shared features corresponding to the defect candidate area to obtain difference area masks corresponding to shared features of different scales. The difference area masks are multiplied with the shared features corresponding to the defect candidate area and the template sub-image respectively to remove the shared features, thereby obtaining difference features of different scales and achieving feature enhancement of the difference features.
[0023] In this solution, multi-scale feature fusion is performed on features with different scale differences to generate multi-scale interactive features, specifically:
[0024] In the feature extraction network, the difference features are graded to construct high-level difference features and low-level difference features. A progressive feature pyramid is introduced to process the high-level difference features. The spatial self-attention mechanism and channel self-attention mechanism are used to perform spatial weighting and channel weighting on high-level difference features of different scales respectively.
[0025] In the decoder part, the low-level difference features are spliced to achieve separate fusion of low-level difference features. The resolution of the fused low-level difference features and the weighted high-level difference features are unified by upsampling. The low-level difference features and the high-level difference features are interacted through cascading to obtain multi-scale interactive features.
[0026] In this solution, a defect detection classification model is built based on an autoencoder network, and the model is trained using a semi-supervised method using pre-training and pseudo-labeling. Specifically:
[0027] Add a multi-layer perceptron to the feature extraction network to construct a deep autoencoder network structure, generate a defect detection classification model, obtain defect image data to pre-train the defect detection classification model, determine the network structure parameters and weights, and perform preliminary settings on the defect detection classification model;
[0028] Obtain a small amount of defect image data with defect category labels to expand the training samples, use the expanded training samples to train the set defect detection classification model, use the preset confidence threshold to detect the unlabeled training samples, and use the category with the highest prediction probability as the pseudo label;
[0029] The model is trained again using training samples with pseudo labels and training samples with defect category labels. The classification performance of the defect detection classification model is verified using test samples. When the classification performance meets the preset standards, the defect detection classification model is output.
[0030] In this solution, the defect detection and classification model uses convolution blocks to generate defect boundary boxes and defect category labels based on the multi-scale interaction features, specifically:
[0031] In the defect detection classification model, the multi-scale interaction features are used to calculate the L1 norm to match the defect category data. According to the L1 norm between the feature vectors, the defect category data samples that meet the preset standards are obtained and the corresponding real bounding box diagram is generated;
[0032] The Softmax activation function is used to obtain the defect category label corresponding to the TV LED display image data. The convolution block is used to obtain the defect boundary box map through cross entropy calculation based on the defect category label and the true boundary box map.
[0033] The bounding box with the defect category label is output for visualization, and a quality inspection report is generated based on the defect category and size information.
[0034] The second aspect of the present invention provides a TV LED display screen defect detection system based on visual perception, the system comprising an image data acquisition module, a difference feature extraction module, a defect detection classification module and a detection result output module;
[0035] The image data acquisition module uses the actual equipment of the machine to collect the image data of the TV LED display screen and perform preprocessing;
[0036] The difference feature extraction module extracts defect candidate areas in the TV LED display screen image data, obtains difference features between the defect features and the background features in the defect candidate areas, performs feature enhancement on the difference features to generate difference features of different scales, and performs multi-scale feature fusion on the difference features of different scales to generate multi-scale interactive features;
[0037] The defect detection and classification module builds a defect detection and classification model based on an autoencoder network, performs model training through a semi-supervised method of pre-training and pseudo-labeling, and generates a defect boundary box diagram and defect category label using a convolution block according to the multi-scale interaction features;
[0038] The detection result output module outputs and visualizes the defects in the TV LED display screen image data, and generates a quality inspection report based on the category and size information of the defects.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] This invention uses high-resolution industrial cameras to capture images and capture tiny defects, and uses lightweight deep learning models to extract high-level features, accurately identifying small target defects. It supports the detection of multiple defect types (such as bright spots, dark spots, color differences, scratches, etc.); while ensuring accuracy, it improves the detection speed and outputs results in real time during the detection process to meet the needs of immediate decision-making on the production line.
[0041] The present invention uses visual perception technology to detect defects in television LED display screens, which can significantly improve detection accuracy, meet industrial real-time requirements, reduce labor costs, improve production efficiency, enhance product quality, reduce false detection and missed detection rates, and reduce rework and repair costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or exemplary descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to these drawings without paying any creative work.
[0043] Figure 1 A flow chart of a method for detecting defects in a TV LED display screen based on visual perception is shown;
[0044] Figure 2 A flowchart for extracting defect candidate areas is shown;
[0045] Figure 3 A flowchart of constructing a defect detection classification model for defect detection is shown;
[0046] Figure 4 The block diagram of the TV LED display screen defect detection system based on visual perception is shown. DETAILED DESCRIPTION
[0047] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0049] Figure 1 A flow chart of a method for detecting defects in a TV LED display screen based on visual perception is shown.
[0050] like Figure 1 As shown, the first embodiment of the present invention provides a method for detecting defects in a television LED display screen based on visual perception, comprising:
[0051] S102, collecting and preprocessing the image data of the LED display screen of the TV, using the visual attention mechanism to obtain potential defect candidate areas, performing primary classification on the potential defect candidate areas, and extracting all defect candidate areas;
[0052] S104, obtaining difference features between defect features and background features in the defect candidate area, performing feature enhancement on the difference features to generate difference features of different scales, performing multi-scale feature fusion on the difference features of different scales to generate multi-scale interactive features;
[0053] S106, constructing a defect detection and classification model based on the autoencoder network, performing model training through a semi-supervised method of pre-training and pseudo-labeling, and generating a defect boundary box diagram and a defect category label in the defect detection and classification model using a convolution block according to the multi-scale interaction features.
[0054] It should be noted that multi-angle full-screen scanning is performed to collect image data of the TV LED display screen through machine vision equipment, including acquisition equipment, image transmission equipment, image processing equipment and image storage equipment. The image data of the TV LED display screen is divided using the detection background, and the detection background includes grayscale transition background, cross-effect background, and pure color background to generate display screen image subsets corresponding to different detection backgrounds; the image samples in the display screen image subset are filtered, denoised, contrast enhanced and normalized to obtain standard image data of the TV LED display screen under different detection backgrounds.
[0055] Since reducing the image resolution may cause the defect features to become blurred and detail features to be lost, thereby reducing the detection accuracy of low-contrast defects, the processed image samples and standard image data are divided into image blocks using a sliding window, and the image blocks are affine transformed to generate an affine transformation matrix. A two-dimensional grid is constructed based on the affine transformation matrix, and the pixels of the image samples are mapped to corresponding positions on the standard image data using the two-dimensional grid to generate the aligned TV LED display image data; after the processed image samples and the standard image data are aligned, the aligned test image and the standard image can be compared using the image difference method to obtain the corresponding differential image. The system obtains preprocessed TV LED display image data and uses a sliding window to calculate color difference within a preset neighborhood. This results in a differential subimage and the sum of the pixel grayscale values of the subimage. The optimal differential subimage is selected based on this sum of pixel grayscale values. All optimal differential subimages are merged to obtain a final differential image, which is then morphologically processed to extract contour information and determine the initial defect candidate regions. Multi-scale visual attention is introduced, and a multi-scale visual attention branch is constructed using depthwise convolution, depthwise separable convolution, and 1×1 convolution to capture the dependencies between different regions. Layer normalization is applied at the end of the branch to improve network stability. The multi-scale visual attention branch downsamples each initial defect candidate region and extracts visual attention weights using depthwise separable convolution and activation functions. This represents the spatial and semantic information in each initial defect candidate region, captures key defect candidate regions, and selects initial defect candidate regions with visual attention weights greater than a preset weight threshold as potential defect candidate regions.
[0056] Figure 2 A flowchart for extracting defect candidate areas is shown.
[0057] According to an embodiment of the present invention, the potential defect candidate regions are preliminarily classified to extract all defect candidate regions, specifically:
[0058] S202, obtaining the gradients of the three RGB channels of the potential defect candidate region, using the potential defect region as a template image, obtaining an image block of a preset size from the standard image data based on the potential defect region as a search image, and performing sliding matching on the search image using the template image;
[0059] S204, calculating the gradient similarity between feature points in the sliding window, sorting all the gradient similarities in the sliding window, and selecting the highest gradient similarity as the score of the potential defect area;
[0060] S206: The template image and the searched image are exchanged for re-matching, and the bidirectional matching score is obtained through two sliding searches. The lower score is used as the final score of the potential defect area through comparison. If the final score of the potential defect area is less than the preset score threshold and the pixel area is greater than the area threshold, it is marked as a defect candidate area.
[0061] It should be noted that in edge feature extraction, a four-directional Scharr operator is used as a template to perform convolution on the potential defect candidate area. The gradient of the potential defect candidate area in four directions is calculated and summed to obtain the cumulative gradient value of the potential defect candidate area. Cosine similarity is combined with gradient matching to comprehensively consider the length and direction of the image gradient vector to reduce misjudgment during the matching process. In addition, bidirectional matching is performed between the potential defect area and the standard image data to further improve the distinguishability of defects.
[0062] It should be noted that a feature extraction network is constructed based on the U-Net network structure, and the encoder part of the U-Net network is improved using a weight-sharing twin network. The defect candidate area and the corresponding template sub-image are used as input, and convolution operations of different scales are used in the twin network to obtain multi-scale shared features. The sub-network in the twin network has four convolution layers with convolution kernels of different sizes, and a batch normalization layer and a nonlinear activation layer are set after each convolution layer; the shared features corresponding to the template sub-image are subtracted from the shared features corresponding to the defect candidate area to obtain difference area masks corresponding to shared features of different scales. The difference area masks are multiplied with the shared features corresponding to the defect candidate area and the template sub-image respectively to remove the shared features, and obtain difference features of different scales, thereby realizing feature enhancement of the difference features. By using element-by-element feature subtraction between shared features, the difference area masks corresponding to the features of the defect candidate area and the template sub-image at different scales are removed through feature multiplication, batch normalization and ReLU activation. This effectively captures the difference information between the features of the two corresponding scales, strengthens the feature representation of the defect, and weakens the background interference, thereby improving the accuracy and robustness of defect detection.
[0063] In the feature extraction network, the difference features are graded to construct high-level difference features and low-level difference features. The low-level difference features mainly contain detailed information such as space and texture, while the high-level difference features mainly contain highly discriminative semantic information to guide the defect category labeling. A progressive feature pyramid is introduced to process the high-level difference features to improve the model's detection ability for small target defects. The spatial self-attention mechanism and channel self-attention mechanism are used to perform spatial weighting and channel weighting on high-level difference features of different scales to highlight important image features. In the decoder part, the low-level difference features are spliced to achieve separate fusion of low-level difference features. Upsampling is used to unify the resolution of the fused low-level difference features and the weighted high-level difference features. Skip connections are used to fuse the low-level difference features into the high-level difference features to obtain finer details and enhance the resolution of the defect candidate area. The low-level difference features and high-level difference features are interacted through cascading to obtain multi-scale interactive features.
[0064] Figure 3 A flowchart for constructing a defect detection classification model for defect detection is shown.
[0065] According to an embodiment of the present invention, a defect detection classification model is constructed based on an autoencoder network, and model training is performed through a semi-supervised method using pre-training and pseudo-labeling, specifically:
[0066] S302, adding a multi-layer perceptron to the feature extraction network to construct a deep autoencoder network structure, generating a defect detection classification model, obtaining defect image data to pre-train the defect detection classification model, determining network structure parameters and weights, and performing preliminary settings for the defect detection classification model;
[0067] S304, obtaining a small amount of defect image data with defect category labels to expand training samples, using the expanded training samples to train the set defect detection classification model, using a preset confidence threshold to detect the unlabeled training samples, and using the category with the highest prediction probability as a pseudo label;
[0068] S306, using the training samples with pseudo labels and the training samples with defect category labels to train the model again, verifying the classification performance of the defect detection classification model through test samples, and outputting the defect detection classification model when the classification performance meets the preset standard;
[0069] S308, in the defect detection classification model, multi-scale interactive features are used to calculate the L1 norm to match defect category data, and defect category data samples that meet the preset standards are obtained based on the L1 norm between feature vectors and the corresponding real bounding box diagram is generated;
[0070] S310, using a Softmax activation function to obtain a defect category label corresponding to the TV LED display image data, and using a convolution block to obtain a defect bounding box map through cross entropy calculation based on the defect category label and the true bounding box map;
[0071] S312: Output the bounding box with the defect category label for visualization, and generate a quality inspection report based on the defect category and size information.
[0072] It should be noted that semi-supervised learning is an algorithm that mixes labeled and unlabeled data to form training data and feeds it into a deep learning framework for learning. Features are extracted from the TV LED display image through a feature extraction network. A multi-layer perceptron is added after the feature extraction network to construct a deep autoencoder network structure. By introducing pseudo-label semi-supervised training, the problem of defect classification being overly dependent on training with large amounts of labeled data is alleviated. Due to the large differences in feature vectors between different data samples, there may be a phenomenon of exceeding the threshold and causing misjudgment. By calculating the L1 norm of the two feature vectors for category matching, defect category data samples are obtained that match the multi-scale interactive features corresponding to the potential defect area. This provides a data foundation for defect category classification and location, improving the efficiency and accuracy of defect detection. The defect detection and classification model uses an anchor-free method for defect detection and localization. The core concept of this method is to directly predict the target's center point, bounding box size, or key points. This method has strong generalization capabilities and a simple framework, meeting the real-time detection requirements of TV LED display production. Defect bounding boxes are predicted through three stacked convolutional blocks. The last convolutional block uses a Softmax activation function to obtain the defect category label corresponding to the TV LED display image data. Cross-entropy is used as the loss function. During training, the ground-truth bounding box image is encoded. The goal is to minimize the cross-entropy to obtain the difference between the ground-truth bounding box image and the predicted bounding box. The predicted bounding box width and height are then adjusted to directly predict the bounding box. This defect detection and classification model avoids the error accumulation associated with anchor box regression and improves localization accuracy.
[0073] The detection data of LED display screens for televisions is stored in a database for subsequent analysis and mining. A preset time step is set in the database, and defect detection data is extracted based on the preset time step. The defect detection data is clustered by defect category. High-frequency fault categories are selected based on the data volume of clusters corresponding to different defect categories. A fishbone diagram is used to analyze the commonalities between high-frequency fault categories and historical production data to identify the factors that cause high-frequency fault categories. The production process of LED display screens for televisions is segmented according to production processes. The correlation between different production sections is evaluated based on the factors that cause these faults. The relevant production sections are read and labeled. Standard production data of the labeled production sections is obtained to train a data reconstruction model. The actual production data of the labeled production sections is used as model input for production data reconstruction. The production data is generated under standard conditions to estimate production data. The residual between the estimated production data and the actual production data is calculated. The residual is determined to be greater than a preset residual threshold. If so, a production parameter abnormality warning is generated for the labeled production section, and the corresponding production data is adjusted. The database provides intelligent decision support for production management and quality control through data analysis. By analyzing the detection data, the production process is optimized and the defect rate is reduced.
[0074] Figure 4 The block diagram of the TV LED display screen defect detection system based on visual perception is shown.
[0075] The second embodiment of the present invention provides a TV LED display screen defect detection system 4 based on visual perception, which includes an image data acquisition module 401, a difference feature extraction module 402, a defect detection classification module 403 and a detection result output module 404;
[0076] The image data acquisition module uses the actual equipment of the machine to collect the image data of the TV LED display screen and perform preprocessing;
[0077] The difference feature extraction module extracts defect candidate areas in the TV LED display screen image data, obtains difference features between the defect features and the background features in the defect candidate areas, performs feature enhancement on the difference features to generate difference features of different scales, and performs multi-scale feature fusion on the difference features of different scales to generate multi-scale interactive features;
[0078] The defect detection and classification module builds a defect detection and classification model based on an autoencoder network, performs model training through a semi-supervised method of pre-training and pseudo-labeling, and generates a defect boundary box diagram and defect category label using a convolution block according to the multi-scale interaction features;
[0079] The detection result output module outputs and visualizes the defects in the TV LED display screen image data, and generates a quality inspection report based on the category and size information of the defects.
[0080] The third embodiment of the present invention provides a computer-readable storage medium, which includes a program for a method for detecting defects in a television LED display screen based on visual perception. When the program for detecting defects in a television LED display screen based on visual perception is executed by a processor, the steps of the method for detecting defects in a television LED display screen based on visual perception are implemented.
[0081] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0082] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0083] Alternatively, if the above-mentioned integrated module of the present invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0084] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.
Claims
1. A method for detecting defects in a TV LED display screen based on visual perception, characterized in that: The following steps are involved: Collect and preprocess the image data of the LED display screen of the TV, use the visual attention mechanism to obtain the potential defect candidate areas, perform primary classification on the potential defect candidate areas, and extract all defect candidate areas; Obtaining difference features between defect features and background features in the defect candidate area, performing feature enhancement on the difference features to generate difference features of different scales, and performing multi-scale feature fusion on the difference features of different scales to generate multi-scale interactive features; A defect detection and classification model is constructed based on an autoencoder network, and the model is trained through a semi-supervised method of pre-training and pseudo-labeling. In the defect detection and classification model, a convolution block is used to generate a defect boundary box diagram and a defect category label according to the multi-scale interaction features.
2. The method for detecting defects in a TV LED display screen based on visual perception according to claim 1, wherein: The image data of the TV LED display screen is collected and preprocessed, and the visual attention mechanism is used to obtain the candidate areas of potential defects. Specifically: Performing multi-angle full-screen scanning to collect TV LED display image data through machine vision, dividing the TV LED display image data using detection backgrounds to generate display image subsets corresponding to different detection backgrounds; Performing filtering, denoising, contrast enhancement, and normalization processing on the image samples in the display screen image subset to obtain standard image data of the TV LED display screen under different detection backgrounds; Segmenting the processed image samples and the standard image data into image blocks using a sliding window, performing an affine transformation on the image blocks to generate an affine transformation matrix, constructing a two-dimensional grid based on the affine transformation matrix, and using the two-dimensional grid to map pixels of the image samples to corresponding positions on the standard image data to generate registered TV LED display screen image data; Obtain pre-processed TV LED display image data, perform color difference calculation within a preset neighborhood using a sliding window, obtain a sub-image after difference calculation, obtain the sum of the pixel grayscales of the sub-image, and select the best difference sub-image based on the sum of the pixel grayscales; All the best differential sub-images are merged to obtain the final differential image and morphological processing is performed to extract contour information to determine the candidate areas for initial screening defects. Multi-scale visual attention is introduced to downsample each candidate area for initial screening defects, and visual attention weights are extracted through depthwise separable convolution and activation function. According to the visual attention weight, the initial screening defect candidate area with a weight greater than a preset weight threshold is selected as the potential defect candidate area.
3. The method for detecting defects in a TV LED display screen based on visual perception according to claim 1, wherein: Perform primary classification on the potential defect candidate areas and extract all defect candidate areas, specifically: Obtain the gradients of the three RGB channels of the potential defect candidate area, use the potential defect area as a template image, obtain an image block of a preset size from the standard image data based on the potential defect area as the search image, and use the template image to perform sliding matching on the search image; Calculate the gradient similarity between feature points in the sliding window, sort all the gradient similarities in the sliding window, and select the highest gradient similarity as the score of the potential defect area; The template image and the searched image are exchanged and matched again, and the bidirectional matching score is obtained through two sliding searches. The lower score is used as the final score of the potential defect area through comparison. If the final score of the potential defect area is less than the preset score threshold and the pixel area is greater than the area threshold, it is marked as a defect candidate area.
4. The method for detecting defects in a TV LED display screen based on visual perception according to claim 1, wherein: Obtain the difference features between the defect features and the background features in the defect candidate area, perform feature enhancement on the difference features, and generate difference features of different scales, specifically: A feature extraction network is constructed based on the U-Net network structure. The encoder part of the U-Net network is improved using a weight-sharing Siamese network. The defect candidate region and the corresponding template sub-image are used as input. Convolution operations of different scales are used in the Siamese network to obtain multi-scale shared features. The shared features corresponding to the template sub-image are subtracted from the shared features corresponding to the defect candidate area to obtain difference area masks corresponding to shared features of different scales. The difference area masks are multiplied with the shared features corresponding to the defect candidate area and the template sub-image respectively to remove the shared features, thereby obtaining difference features of different scales and achieving feature enhancement of the difference features.
5. The method for detecting defects in a TV LED display screen based on visual perception according to claim 1, characterized in that: Multi-scale feature fusion is performed on features of different scale differences to generate multi-scale interactive features, specifically: In the feature extraction network, the difference features are graded to construct high-level difference features and low-level difference features. A progressive feature pyramid is introduced to process the high-level difference features. The spatial self-attention mechanism and channel self-attention mechanism are used to perform spatial weighting and channel weighting on high-level difference features of different scales respectively. In the decoder part, the low-level difference features are spliced to achieve separate fusion of low-level difference features. The resolution of the fused low-level difference features and the weighted high-level difference features are unified by upsampling. The low-level difference features and the high-level difference features are interacted through cascading to obtain multi-scale interactive features.
6. The method for detecting defects in a TV LED display screen based on visual perception according to claim 1, wherein: A defect detection classification model is constructed based on an autoencoder network. The model is trained using a semi-supervised method using pre-training and pseudo-labeling. Specifically: Add a multi-layer perceptron to the feature extraction network to construct a deep autoencoder network structure, generate a defect detection classification model, obtain defect image data to pre-train the defect detection classification model, determine the network structure parameters and weights, and perform preliminary settings on the defect detection classification model; Obtain a small amount of defect image data with defect category labels to expand the training samples, use the expanded training samples to train the set defect detection classification model, use the preset confidence threshold to detect the unlabeled training samples, and use the category with the highest prediction probability as the pseudo label; The model is trained again using training samples with pseudo labels and training samples with defect category labels. The classification performance of the defect detection classification model is verified using test samples. When the classification performance meets the preset standards, the defect detection classification model is output.
7. The method for detecting defects in a TV LED display screen based on visual perception according to claim 1, characterized in that: In the defect detection and classification model, a convolution block is used to generate a defect boundary box diagram and a defect category label according to the multi-scale interaction features, specifically: In the defect detection classification model, the multi-scale interaction features are used to calculate the L1 norm to match the defect category data. According to the L1 norm between the feature vectors, the defect category data samples that meet the preset standards are obtained and the corresponding real bounding box diagram is generated; The Softmax activation function is used to obtain the defect category label corresponding to the TV LED display image data. The convolution block is used to obtain the defect boundary box map through cross entropy calculation based on the defect category label and the true boundary box map. The bounding box with the defect category label is output for visualization, and a quality inspection report is generated based on the defect category and size information.
8. A TV LED display screen defect detection system based on visual perception, characterized in that: Implementing the method for detecting defects in a TV LED display screen based on visual perception as described in any one of claims 1 to 7, the system comprises an image data acquisition module, a difference feature extraction module, a defect detection classification module, and a detection result output module; The image data acquisition module uses the actual equipment of the machine to collect the image data of the TV LED display screen and perform preprocessing; The difference feature extraction module extracts defect candidate areas in the TV LED display screen image data, obtains difference features between the defect features and the background features in the defect candidate areas, performs feature enhancement on the difference features to generate difference features of different scales, and performs multi-scale feature fusion on the difference features of different scales to generate multi-scale interactive features; The defect detection and classification module builds a defect detection and classification model based on an autoencoder network, performs model training through a semi-supervised method of pre-training and pseudo-labeling, and generates a defect boundary box diagram and defect category label using a convolution block according to the multi-scale interaction features; The detection result output module outputs and visualizes the defects in the TV LED display screen image data, and generates a quality inspection report based on the category and size information of the defects.
Citation Information
Cited By
Ultrathin printed circuit board defect detection method and system based on AI vision
CN121504867A
Defect detection method and device and storage medium
CN121982016A
Screen image sharpening method and device based on multi-scale attention, and storage medium
CN122066608A