A method, device and medium for enhancing light guide plate defect image data

Through deep learning algorithms, the problem of difficulty in updating defect detection equipment in light guide plates is solved, and the detection accuracy and product quality are improved.

CN119205558BActive Publication Date: 2025-03-25DONGGUAN CITY HYUNDAI SEIKO IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411552097.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-03-25
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

It is difficult to update and replace existing light guide plate defect detection equipment according to the new defect type, resulting in insufficient detection accuracy and low product quality.

Method used

The latent defect image is automatically generated through deep learning algorithms, supplement the defect image database, and train the defect type prediction model through the latent defect data set to realize the identification and classification of new defect types.

Benefits of technology

It improves the accuracy of light guide plate defect detection, ensures that new defect types can be identified, and improves the product's excellent rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205558B_ABST
    Figure CN119205558B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and medium for enhancing defect image data of a light guide plate, and relates to the technical field of image data enhancement, including: obtaining defect images and corresponding defect type annotations to construct an original defect image data set; training an initial defect type prediction model through the original defect image data set to obtain a defect type prediction model after preliminary training; generating a potential defect image, and inputting the potential defect image into the defect type prediction model after preliminary training; comparing the potential defect image with the defect image to obtain the similarity between the potential defect image and the defect image; selecting potential defect images with similarities within a similarity threshold and corresponding potential defect type annotations to construct a potential defect image data set; training the defect type prediction model after preliminary training through the potential defect image data set to obtain the final defect type prediction model after training. The present application has the effect of improving the accuracy of light guide plate defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data enhancement, and in particular to a method, device and medium for enhancing defect image data of a light guide plate. Background Art

[0002] A light guide plate is a plate made of a material with a high refractive index and does not absorb light. It can convert a line light source into a surface light source. The quality of the light guide plate can significantly affect the performance of the liquid crystal display. Machine vision is a multidisciplinary cross-cutting technology that uses an image acquisition device to obtain a target image, then processes, analyzes and understands the target image through image engineering methods, and finally uses automated methods to process physical targets.

[0003] Defect detection of light guide plates is an important part of the light guide production process that can ensure product quality and reduce unqualified products. Machine vision technology has replaced manual detection methods on a large scale. It has the advantages of high efficiency, high detection accuracy, high flexibility and strong stability. It is also widely used in the field of light guide plate defect detection. Thanks to the improvement of production technology, most light guide plate defect types on the production line are stable, the number of defects is small, and the product quality is also high. The excellent rate of light guide plate products of high-quality enterprises can reach 90%. However, with the development of science and technology, new processes and new equipment are constantly introduced into the light guide plate production process, and new types of defects will inevitably be introduced in the production process.

[0004] At present, there are three main methods used in the market to discover new types of defects or update existing light guide plate defect detection equipment. The first method is to add a group of inspectors to manually detect defects after discovering new types of defects in the production process. However, due to the many uncontrollable factors of manual labor, this method has problems such as low degree of automation, low detection efficiency and poor detection accuracy. The second method is to use traditional image processing algorithms to update the existing defect detection program and issue abnormal alarms for new defects. This method is relatively easy to implement and has low update costs. It can distinguish new types of defects and improve the product's quality rate, but it cannot classify new types of defects, resulting in poor detection results, which cannot guide the production process and is not very helpful in further improving the product's quality rate. The third method is to re-collect data on new types of defects based on the development steps of previous equipment, and then professionals extract defect features, perform related defect identification tasks, and finally update the detection equipment. This method requires professionals to extract the features of defects, and new defect types often have fewer samples, which has the disadvantages of long development cycle and high cost. Summary of the invention

[0005] The purpose of this application is to provide a method, device and medium for enhancing light guide plate defect image data, which can improve the accuracy of light guide plate defect detection and further improve the product quality rate of light guide plates.

[0006] In a first aspect, a method for enhancing light guide plate defect image data provided by the present application adopts the following technical solution:

[0007] A method for enhancing light guide plate defect image data, comprising:

[0008] Obtain defect images and corresponding defect type annotations to construct an original defect image dataset;

[0009] Construct an initial defect type prediction model, train the initial defect type prediction model using the original defect image data set, and obtain a defect type prediction model after preliminary training;

[0010] Generate a potential defect image, input the potential defect image into the defect type prediction model after preliminary training, and obtain the potential defect type label;

[0011] Preset a similarity threshold, compare the potential defect image with the defect image, and obtain the similarity between the potential defect image and the defect image;

[0012] Select potential defect images whose similarity is within a similarity threshold and the corresponding potential defect type annotations to construct a potential defect image dataset;

[0013] The defect type prediction model after preliminary training is trained by using the potential defect image data set to obtain the final defect type prediction model after training;

[0014] Defect type prediction is performed through the final trained defect type prediction model.

[0015] By adopting the above-mentioned technical scheme, the present application automatically generates potential defect images of the light guide plate through a deep learning algorithm, and then supplements the defect image database, and trains the defect type prediction model through the potential defect data set to facilitate subsequent defect type identification, and ensure that the corresponding defect type can be identified after new defects in the light guide plate are found during the production process. It can effectively solve the problem that existing defect detection equipment is difficult to update according to new defect types, improve the accuracy of light guide plate defect detection, and further improve the product quality rate of light guide plates.

[0016] Furthermore, generating a potential defect image includes:

[0017] Generate a pure noise image through a Gaussian noise function;

[0018] Convert text data of preset defect types into text feature vectors through a text compiler;

[0019] Train the denoising model to obtain a trained denoising model;

[0020] The pure noise image and the text feature vector of the preset defect type are input into the trained denoising model to obtain a defect image that meets the preset defect type as a potential defect image.

[0021] By adopting the above technical solution, the present application obtains the required potential defect image through the preset defect type using the denoising model, which can enhance the data volume of the defect image data set, thereby improving the accuracy of subsequent light guide plate defect identification.

[0022] Furthermore, the pure noise image is generated by using the Gaussian noise function, and the probability distribution function formula of the Gaussian noise used on the time axis is:

[0023]

[0024] Where n(t) represents the Gaussian white noise value at time t, A represents the amplitude of the noise, t0 represents the time offset of the noise, and σ represents the standard deviation.

[0025] By adopting the above technical solution, the present application generates a pure noise image through a Gaussian noise function. Gaussian noise is continuous and uniformly distributed in time and space. This characteristic makes it appear as smooth random changes in the image, which is conducive to the accuracy of generating potential defect images.

[0026] Furthermore, the denoising model is trained to obtain a trained denoising model, which specifically includes:

[0027] Obtain the latent vector of the defect image through the encoder;

[0028] Randomly select a time step t for the vector in the latent space, encode the time step t through sine and cosine coding to form a coding vector;

[0029] Add Gaussian noise corresponding to time step t to the input defect image in the latent space to obtain a noisy image;

[0030] The noise image and the encoding vector formed by the time step t are embedded into the U-net network model to obtain the predicted noise level added to the noise image;

[0031] Obtain the actual noise level added to the image, compare the predicted noise level with the actual noise level, and determine the prediction ability of the U-net network model;

[0032] The trained denoising model is obtained according to the prediction ability of the U-net network model.

[0033] By adopting the above technical solution, the present application can reduce memory and computing requirements by obtaining the latent vector of the defective image through the encoder. At the same time, since the U-net network model adopts a U-shaped network structure and a jump connection mechanism, it can effectively capture feature information at different levels, thereby improving the accuracy of image segmentation and detail retention capabilities. Compared with other deep learning methods, the U-net network model performs well on a small amount of annotated data, can be trained on less annotated data, and achieve better segmentation effects, so it can effectively improve the efficiency and accuracy of denoising model training.

[0034] Furthermore, the denoising model trained according to the prediction ability of the U-net network model specifically includes:

[0035] Obtain the difference between the predicted noise level and the actual noise level, and preset the difference range;

[0036] The prediction ability of the U-net network model is optimized through the loss function, so that the difference between the final predicted noise level and the actual noise is within the difference range, and the trained U-net weight coefficient is obtained;

[0037] The trained denoising model is obtained according to the trained U-net weight coefficient.

[0038] By adopting the above technical solution, the present application judges the prediction ability of the U-net network model by the difference between the predicted noise level and the actual noise level, and then obtains the trained U-net weight coefficient based on the judgment result, thereby obtaining a trained denoising model, thereby improving the accuracy of the final generated potential defect image.

[0039] Furthermore, the time step t is encoded by sine-cosine coding, and the sine-cosine coding formula used is:

[0040]

[0041] Here, i represents the index of the dimension and d represents the dimension of the vector.

[0042] By adopting the above technical solution, the present application encodes the time step t through sine-cosine coding, and sine-cosine coding has the advantages of high precision, strong anti-interference and wide adaptability.

[0043] Furthermore, the Gaussian noise is added to the defect image input in the latent space corresponding to the time step t, and the noise addition formula used is:

[0044]

[0045] Among them, z trepresents the latent vector after adding noise at time t, ε represents the random noise drawn from the standard normal distribution N(0,1), and α t Indicates the amount of controlled noise.

[0046] By adopting the above technical solution, the present application obtains a noisy image by adding Gaussian noise to the defect image, which facilitates the subsequent training of the denoising model and improves the accuracy of the denoising model.

[0047] Furthermore, the prediction ability of the U-net network model is optimized by the loss function, and the formula of the loss function used is:

[0048]

[0049] Where ε(x) represents the potential vector, ∈ θ represents the U-net network model, y represents the defect type corresponding to the defect image, and z t represents the potential vector after adding noise at time t, τ θ A feature vector representing text transformed by the text compiler.

[0050] By adopting the above technical solution, this application optimizes the prediction ability of the U-net network model through the loss function. The loss function provides a clear direction for the optimization of the U-net network model. By minimizing the loss function, the model parameters can be gradually adjusted so that the prediction results of the model are constantly close to the true value, thereby improving the accuracy of the U-net network model.

[0051] In a second aspect, the present application provides a computer device that adopts the following technical solution:

[0052] A computer device comprises a memory and a processor, wherein the memory stores a method for enhancing defective image data of a light guide plate as described in the first aspect, which can be loaded and executed by the processor.

[0053] In a third aspect, the present application provides a computer-readable storage medium using the following technical solution:

[0054] A computer-readable storage medium stores a computer program that can be loaded by a processor and executes a method for enhancing defect image data of a light guide plate as described in the first aspect.

[0055] In summary, the present application includes at least one of the following beneficial technical effects:

[0056] 1. This application automatically generates potential defect images of light guide plates through deep learning algorithms, and then supplements the defect image database. The defect type prediction model is trained through the potential defect data set to facilitate subsequent defect type identification, ensuring that the corresponding defect type can be identified after new defects of the light guide plate are found during the production process. It can effectively solve the problem that existing defect detection equipment is difficult to update according to new defect types, improve the accuracy of light guide plate defect detection, and further improve the product quality rate of light guide plates;

[0057] 2. This application uses a denoising model to obtain the required potential defect image through preset defect types, which can increase the data volume of the defect image data set, thereby improving the accuracy of subsequent light guide plate defect identification;

[0058] 3. The present application obtains the latent vector of the defective image through the encoder to reduce memory and computing requirements. At the same time, since the U-net network model adopts a U-shaped network structure and a skip connection mechanism, it can effectively capture feature information at different levels, thereby improving the accuracy of image segmentation and detail retention. Compared with other deep learning methods, the U-net network model performs well on a small amount of annotated data, can be trained on less annotated data, and achieves better segmentation effects, so it can effectively improve the efficiency and accuracy of denoising model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 is a flow chart of a defect image data enhancement method according to an embodiment of the present application;

[0060] Figure 2 is a flow chart of a potential defect image generation method according to an embodiment of the present application;

[0061] Figure 3 It is a flow chart of the denoising model training method of an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following is combined with Figure 1 -Attached Figure 3 , further details of this application are given.

[0063] There are currently three main methods used on the market to discover new types of defects or update existing light guide plate defect detection equipment. The first method is to add a group of inspection personnel to manually detect defects after discovering new types of defects during the production process. However, due to the many uncontrollable factors of manual labor, this method has problems such as low degree of automation, low detection efficiency and poor detection accuracy. The second method is to use traditional image processing algorithms to update the existing defect detection program and issue abnormal alarms for new defects. This method is relatively easy to implement and has low update costs. It can distinguish new types of defects and improve the quality rate of products, but it cannot classify new types of defects, resulting in poor detection results, which cannot achieve the purpose of guiding the production process and is not very helpful in further improving the quality rate of products. The third method is to re-collect data on new defect types based on the development steps of previous equipment, and then professionals extract defect features, perform related defect identification tasks, and finally update the detection equipment. This method requires professionals to extract the features of defects, and new defect types often have fewer samples, which has the disadvantages of long development cycle and high cost. Therefore, the embodiment of the present application provides a method for enhancing light guide plate defect image data, referring to Figure 1 ,include:

[0064] S1. Obtain defect images and corresponding defect type annotations to construct an original defect image dataset.

[0065] Specifically, an actual defect image is obtained through an image acquisition device, and the defect type of the defect image is manually labeled. The defect image is used as an input feature, and the defect type is used as an output feature to construct an original defect image dataset.

[0066] S2. Construct an initial defect type prediction model, train the initial defect type prediction model using the original defect image data set, and obtain a defect type prediction model after preliminary training.

[0067] Specifically, the defect type prediction model is initially trained through the manually annotated original defect image data set, and the defect type prediction model is enabled to learn the feature relationship between the defect image and the corresponding defect type annotation through the deep learning algorithm to obtain the defect type prediction model after preliminary training. In the specific implementation process, the initial defect type prediction model adopts the YOLOv5s network model. The YOLOv5s network model can better adapt to targets of different sizes and proportions by using atrous spatial pyramid pooling (ASPP) instead of spatial pyramid pooling (SPP). In addition, by adding an attention mechanism module (SE module) to the backbone network, the network's sensitivity to tiny defects is increased, the detection accuracy and training speed are improved, and the model's convergence ability and target positioning accuracy are improved.

[0068] S3. Generate a potential defect image, input the potential defect image into the defect type prediction model after preliminary training, and obtain the potential defect type label.

[0069] Specifically, a potential defect image is generated according to possible new defect types, and a potential defect type is obtained to simulate the situation where new defects may appear in the production process.

[0070] S4. Preset a similarity threshold, compare the potential defect image with the defect image, and obtain the similarity between the potential defect image and the defect image.

[0071] Specifically, the similarity threshold is determined according to the sample size requirement of the potential defect image data set. By comparing the potential defect image with the defect image through the image recognition algorithm, the similarity between the potential defect image and the defect image can be obtained.

[0072] S5. Select potential defect images whose similarities are within a similarity threshold and corresponding potential defect type annotations to construct a potential defect image dataset.

[0073] Specifically, potential defect images with similarities within a similarity threshold are regarded as defect images that meet the requirements, and a new data set is constructed as a potential defect image data set.

[0074] S6. Train the defect type prediction model after preliminary training using the potential defect image dataset to obtain a final trained defect type prediction model.

[0075] Specifically, further training the defect type prediction model after preliminary training through the potential defect image data set can improve the defect type prediction model's prediction ability for potential defect types. When new defect types exist, there is no need to update the detection equipment time-consuming and laboriously, which can effectively shorten the development cycle and cost.

[0076] S7. Defect type prediction is performed using the defect type prediction model after final training.

[0077] Specifically, by predicting the defect type using the defect type prediction model that has been finally trained on the potential defect image data set, the accuracy of the defect type prediction model can be effectively improved.

[0078] The implementation principle of the embodiment of the present application is: automatically generate potential defect images of the light guide plate through a deep learning algorithm, and then supplement the defect image database, train the defect type prediction model through the potential defect data set, facilitate the subsequent defect type identification, and ensure that the corresponding defect type can be identified after new defects of the light guide plate are found in the production process. It can effectively solve the problem that the existing defect detection equipment is difficult to update according to the new defect type, improve the accuracy of the light guide plate defect detection, and further improve the product quality rate of the light guide plate.

[0079] like Figure 2 As shown, the step S3 of the embodiment of the present application generates a potential defect image, and the specific steps include:

[0080] S31. Generate a pure noise image through a Gaussian noise function.

[0081] Specifically, the probability distribution function formula of the Gaussian noise used on the time axis is:

[0082]

[0083] Where n(t) represents the Gaussian white noise value at time t, A represents the amplitude of the noise, t0 represents the time offset of the noise, and σ represents the standard deviation.

[0084] S32. Convert the text data of the preset defect type into a text feature vector through a text compiler.

[0085] Specifically, the Transformer model is used to convert the defect type text into a text feature vector through a text compiler.

[0086] S33, training the denoising model to obtain a trained denoising model.

[0087] Specifically, the denoising model adopts the U-net network model. Since the U-net network model adopts a U-shaped network structure and a jump connection mechanism, it can effectively capture feature information at different levels, thereby improving the accuracy of image segmentation and the ability to retain details. Compared with other deep learning methods, the U-net network model performs well on a small amount of annotated data, can be trained on less annotated data, and achieve better segmentation effects.

[0088] S34, inputting the pure noise image and the text feature vector of the preset defect type into the trained denoising model to obtain a defect image that meets the preset defect type as a potential defect image.

[0089] Specifically, it is also necessary to remap the generated potential defect image to the pixel space through an image decoder to generate a corresponding potential defect image.

[0090] The implementation principle of the embodiment of the present application is: through the preset defect type, the required potential defect image is obtained using the denoising model, which can enhance the data volume of the defect image data set, thereby improving the accuracy of subsequent light guide plate defect identification.

[0091] like Figure 3 As shown, in step S33 of the embodiment of the present application, the denoising model is trained to obtain a trained denoising model, and the specific steps include:

[0092] S331. Obtain a latent vector of the defective image through an encoder.

[0093] Specifically, defect images in the original defect image dataset are used, and the defect images in the pixel space are mapped to the latent space through an encoder to obtain the latent vector of the defect image, which can reduce memory and computing requirements.

[0094] S332. Randomly select a time step t for the vector in the latent space, encode the time step t through sine-cosine coding to form a coding vector.

[0095] Specifically, the sine-cosine encoding formula used is:

[0096]

[0097] Here, i represents the index of the dimension and d represents the dimension of the vector.

[0098] S333. Add Gaussian noise corresponding to the time step t to the defect image input in the latent space to obtain a noisy image.

[0099] Specifically, the noise addition formula used is:

[0100]

[0101] Among them, z t represents the latent vector after adding noise at time t, ε represents the random noise drawn from the standard normal distribution N(0,1), and α t Indicates the amount of controlled noise.

[0102] S334, embed the noise image and the encoding vector formed by the time step t into the U-net network model to obtain the predicted noise level added to the noise image.

[0103] S335. Obtain the actual noise level added to the image, compare the predicted noise level with the actual noise level, and determine the prediction capability of the U-net network model.

[0104] Specifically, the difference between the predicted noise level and the actual noise level is obtained, and the difference range is preset; the prediction ability of the U-net network model is optimized through the loss function, so that the final difference between the predicted noise level and the actual noise is within the difference range, and the trained U-net weight coefficient is obtained; the trained denoising model is obtained according to the trained U-net weight coefficient. The formula of the loss function used is:

[0105]

[0106] Where ε(x) represents the potential vector, ∈ θ represents the U-net network model, y represents the defect type corresponding to the defect image, and z t represents the potential vector after adding noise at time t, τ θ A feature vector representing text transformed by the text compiler.

[0107] S336. Obtain a trained denoising model based on the prediction capability of the U-net network model.

[0108] The implementation principle of the embodiment of the present application is: optimize the prediction ability of the U-net network model through the loss function. The loss function provides a clear direction for the optimization of the U-net network model. By minimizing the loss function, the model parameters can be gradually adjusted so that the prediction results of the model are constantly close to the true value, thereby improving the accuracy of the U-net network model.

[0109] The embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes a method for enhancing defect image data of a light guide plate, specifically including:

[0110] S1. Obtain defect images and corresponding defect type annotations to construct an original defect image dataset.

[0111] S2. Construct an initial defect type prediction model, train the initial defect type prediction model using the original defect image data set, and obtain a defect type prediction model after preliminary training.

[0112] S3. Generate a potential defect image, input the potential defect image into the defect type prediction model after preliminary training, and obtain the potential defect type label.

[0113] S4. Preset a similarity threshold, compare the potential defect image with the defect image, and obtain the similarity between the potential defect image and the defect image.

[0114] S5. Select potential defect images whose similarities are within a similarity threshold and corresponding potential defect type annotations to construct a potential defect image dataset.

[0115] S6. Train the defect type prediction model after preliminary training using the potential defect image dataset to obtain a final trained defect type prediction model.

[0116] S7, predicting defect types through the defect type prediction model after final training. Wherein, the computer is a server, and the computer device includes a processor, a memory, a network interface and a database connected through a system bus. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store original defect image data sets, potential defect image data sets, defect type prediction models, similarity thresholds, Gaussian noise functions, Transformer models, denoising models, encoders, sine and cosine encoding, noise addition formulas, loss functions, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for enhancing light guide plate defect image data can be provided.

[0117] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0118] S1. Obtain defect images and corresponding defect type annotations to construct an original defect image dataset.

[0119] S2. Construct an initial defect type prediction model, train the initial defect type prediction model using the original defect image data set, and obtain a defect type prediction model after preliminary training.

[0120] S3. Generate a potential defect image, input the potential defect image into the defect type prediction model after preliminary training, and obtain the potential defect type label.

[0121] S4. Preset a similarity threshold, compare the potential defect image with the defect image, and obtain the similarity between the potential defect image and the defect image.

[0122] S5. Select potential defect images whose similarities are within a similarity threshold and corresponding potential defect type annotations to construct a potential defect image dataset.

[0123] S6. Train the defect type prediction model after preliminary training using the potential defect image dataset to obtain a final trained defect type prediction model.

[0124] S7. Defect type prediction is performed using the defect type prediction model after final training.

[0125] In addition, the processor in the computer device executes all the steps of the above-mentioned light guide plate defect image data enhancement method when executing the computer program.

[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).

[0127] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0128] The embodiments of this specific implementation are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. The same components are represented by the same figure marks. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for enhancing light guide plate defect image data, characterized in that: include: Obtain defect images and corresponding defect type annotations to construct an original defect image dataset; Construct an initial defect type prediction model, train the initial defect type prediction model using the original defect image data set, and obtain a defect type prediction model after preliminary training; Generate a potential defect image, input the potential defect image into the defect type prediction model after preliminary training, and obtain the potential defect type label; Preset a similarity threshold, compare the potential defect image with the defect image, and obtain the similarity between the potential defect image and the defect image; Select potential defect images whose similarity is within a similarity threshold and the corresponding potential defect type annotations to construct a potential defect image dataset; The defect type prediction model after preliminary training is trained by using a potential defect image data set to obtain a final defect type prediction model after training; Defect type prediction is performed through the final trained defect type prediction model.

2. The method for enhancing light guide plate defect image data according to claim 1, characterized in that: The generating of the potential defect image comprises: Generate a pure noise image through a Gaussian noise function; Convert text data of preset defect types into text feature vectors through a text compiler; Train the denoising model to obtain a trained denoising model; The pure noise image and the text feature vector of the preset defect type are input into the trained denoising model to obtain a defect image that meets the preset defect type as a potential defect image.

3. The method for enhancing light guide plate defect image data according to claim 2, characterized in that: The pure noise image is generated by the Gaussian noise function, and the probability distribution function formula of the Gaussian noise used on the time axis is: Where n(t) represents the Gaussian white noise value at time t, A represents the amplitude of the noise, t0 represents the time offset of the noise, and σ represents the standard deviation.

4. The method for enhancing light guide plate defect image data according to claim 2, characterized in that: The denoising model is trained to obtain a trained denoising model, specifically comprising: Obtain the latent vector of the defect image through the encoder; Randomly select a time step t for the vector in the latent space, encode the time step t through sine and cosine coding to form a coding vector; Add Gaussian noise corresponding to time step t to the input defect image in the latent space to obtain a noisy image; The noise image and the encoding vector formed by the time step t are embedded into the U-net network model to obtain the predicted noise level added to the noise image; Obtain the actual noise level added to the image, compare the predicted noise level with the actual noise level, and determine the prediction ability of the U-net network model; The trained denoising model is obtained according to the prediction ability of the U-net network model.

5. The method for enhancing light guide plate defect image data according to claim 4, characterized in that: The denoising model trained according to the prediction capability of the U-net network model specifically includes: Obtain the difference between the predicted noise level and the actual noise level, and preset the difference range; The prediction ability of the U-net network model is optimized through the loss function, so that the difference between the final predicted noise level and the actual noise is within the difference range, and the trained U-net weight coefficient is obtained; The trained denoising model is obtained according to the trained U-net weight coefficient.

6. The method for enhancing light guide plate defect image data according to claim 5, characterized in that: The time step t is encoded by sine-cosine coding, and the sine-cosine coding formula used is: Here, i represents the index of the dimension and d represents the dimension of the vector.

7. The method for enhancing light guide plate defect image data according to claim 6, characterized in that: The Gaussian noise is added to the defect image input in the latent space corresponding to the time step t, and the noise addition formula used is: Among them, z t represents the latent vector after adding noise at time t, ε represents the random noise drawn from the standard normal distribution N(0,1), and α t Indicates the amount of controlled noise.

8. The method for enhancing light guide plate defect image data according to claim 7, characterized in that: The prediction ability of the U-net network model is optimized by the loss function, and the formula of the loss function used is: Where ε(x) represents the potential vector, ∈ θ represents the U-net network model, y represents the defect type corresponding to the defect image, and z t represents the potential vector after adding noise at time t, τ θ A feature vector representing text transformed by the text compiler.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a method for enhancing defective image data of a light guide plate as described in any one of claims 1 to 8, which can be loaded and executed by the processor.

10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and executes a method for enhancing light guide plate defect image data as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Product surface defect detection method and device, and equipment

    CN111652852A

  • System and method for testing and predictive analysis with artificial intelligence motivation

    CN116194759A