CN-122023312-A - Defect detection method and device, electronic equipment and storage medium
Abstract
The embodiment of the application provides a defect detection method, a device, electronic equipment and a storage medium, which relate to the technical field of defect detection, wherein the electronic equipment can acquire an image to be detected, cut the image to be detected according to a process structure of display equipment included in the image to be detected to obtain a plurality of image blocks, determine a priority for each image block according to the process structure included in the image block and the relation between the process structure and defect information, allocate GPU (graphics processing unit) according to the priority of the image block and the resource quantity of the GPU, call the allocated GPU, execute a defect detection task corresponding to the image block to obtain a defect detection result of the image block, and fuse the defect detection results of the image blocks to obtain the defect detection result of the image to be detected. Because the plurality of image blocks can detect defects on different GPUs, parallel processing of the plurality of GPUs can be realized, the condition that the GPUs are in an idle state is reduced, and therefore, the utilization rate of the GPU is improved.
Inventors
- MAO ZHIQIANG
Assignees
- 京东方科技集团股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260126
Claims (15)
- 1. A method of defect detection, the method comprising: Acquiring an image to be detected; cutting the image to be detected according to a process structure of display equipment included in the image to be detected to obtain a plurality of image blocks; For each image block, determining the priority of the image block according to a process structure included in the image block and the relation between the process structure and defect information, wherein the defect information represents the possibility of defects of the process structure; distributing GPU for the image block according to the priority of the image block and the resource quantity of the GPU, calling the distributed GPU, and executing the defect detection task corresponding to the image block to obtain the defect detection result of the image block; and fusing the defect detection results of the image blocks to obtain the defect detection result of the image to be detected.
- 2. The method according to claim 1, wherein the step of segmenting the image to be detected according to the process structure of the display device included in the image to be detected to obtain a plurality of image blocks includes: aligning the image to be detected with a pre-generated process mask, and determining the position of each process structure included in the image to be detected; And cutting the image to be detected according to the position of each process structure and the corresponding cutting mode to obtain a plurality of image blocks.
- 3. The method according to claim 1, wherein the step of segmenting the image to be detected according to the process structure of the display device included in the image to be detected to obtain a plurality of image blocks includes: Aligning the image to be detected with a pre-generated process mask, and determining the position of each process structure included in the image to be detected as a process structure constraint condition; Performing defect probability evaluation on the image to be detected to obtain defect probability of each position in the image to be detected, performing defect region detection on the image to be detected, and determining a defect candidate region; Determining a segmentation mode of the image to be detected according to a preset segmentation mode determining rule based on the process structure constraint condition, the defect probability, a preset overlapping radius and the defect candidate region, wherein the preset segmentation mode determining rule enables a difference between defect detection benefits and defect detection costs of segmented image blocks to be minimized, the overlapping radius between segmented adjacent image blocks is the preset overlapping radius, cost of defect detection of segmented image blocks included in regions other than the defect candidate region to reach first precision is minimized, cost of defect detection of segmented image blocks included in the defect candidate region to reach second precision is minimized, and the defect detection benefits are used for evaluating negative correlation degrees between the size of each image block and defect probability sum of each position included in the image block, wherein the first precision is lower than the second precision; and cutting the image to be detected according to the cutting mode to obtain a plurality of image blocks.
- 4. The method according to claim 1, wherein the step of determining, for each image block, the priority of the image block based on the process structure included in the image block and the relationship between the process structure and the defect information, comprises: inputting each image block into a pre-trained lightweight model for each image block, so that the lightweight model performs defect screening on the image block to obtain a defect screening result; And determining the priority of the image block according to the defect screening result, the process structure included in the image block and the relation between the process structure and defect information.
- 5. The method of claim 4, wherein the step of determining the priority of the image block based on the defect screening result, the process structure included in the image block, and the relationship between the process structure and defect information, comprises: If the defect screening result indicates that the image block has defects, a preset defect score determining function is called, and the defect score of the image block is determined according to defect influence parameters of a process structure included in the image block, wherein the defect influence parameters comprise at least one of the corresponding relation between the process structure included in the image block and the defect probability, the defect screening result, process criticality weight of the process structure and duration of undetected process structure; Determining the priority of the image block as a first priority based on the defect score and a preset corresponding relation between the scoring intervals and the priorities, wherein the first priority is the corresponding priority between the scoring intervals to which the defect score belongs; And if the defect screening result indicates that the image block is not defective, determining that the priority of the image block is a second priority, wherein the second priority is lower than the first priority.
- 6. The method according to claim 1, wherein the step of calling the assigned GPU to perform the defect detection task corresponding to the image block to obtain the defect detection result of the image block includes: And sending the defect detection task corresponding to the image block to the allocated GPU, so that the GPU pauses the defect detection task which is currently executed under the condition that the priority of the defect detection task corresponding to the image block is higher than that of the defect detection task which is currently executed, and executing the defect detection task corresponding to the image block to obtain a defect detection result of the image block.
- 7. The method according to claim 1, wherein the step of calling the assigned GPU to perform the defect detection task corresponding to the image block to obtain the defect detection result of the image block includes: evaluating the estimated detection time length and the estimated detection precision of each pre-trained defect detection model for executing the defect detection task corresponding to the image block; determining a target defect detection model for executing a defect detection task corresponding to the image block based on the estimated detection duration and the estimated detection duration; And calling the allocated GPU resources, and executing the defect detection task corresponding to the image block through the target defect detection model.
- 8. The method according to claim 1, wherein the step of calling the assigned GPU to perform the defect detection task corresponding to the image block to obtain the defect detection result of the image block includes: performing defect detection on the image block through a first defect detection model to obtain a detection score of the image block; if the detection score is smaller than a first preset score threshold value, determining that the image block has no defect; If the detection score is larger than the first preset score threshold and smaller than a second preset score threshold, invoking the allocated GPU, and executing a defect detection task corresponding to the image block through a second defect detection model to obtain a defect detection result of the image block, wherein the accuracy of the second defect detection model is higher than that of the first defect detection model; and if the detection score is larger than the second preset score threshold value, determining that the image block has defects.
- 9. The method according to any one of claims 1 to 8, wherein the step of fusing the defect detection results of the plurality of image blocks to obtain the defect detection result of the image to be detected includes: Determining a target image block with defects according to defect detection results of the image blocks; Mapping the position of the defect in the target image block to the image to be detected according to the segmentation mode of the image to be detected to obtain the mapped defect position; and determining a defect detection result of the image to be detected based on the mapped defect position.
- 10. The method according to claim 9, wherein the step of determining a defect detection result of the image to be detected based on the mapped defect position comprises: if the overlapping rate of the defect positions is larger than a preset overlapping rate threshold value, fusing the defect positions to obtain fused defect positions; and fusing the confidence degrees corresponding to the defect positions to obtain fused confidence degrees, wherein the confidence degrees are output by the defect detection model.
- 11. The method of claim 10, wherein the step of fusing the confidence levels corresponding to the plurality of defect locations to obtain a fused confidence level comprises: Fusing the confidence coefficients corresponding to the defect positions according to the following formula to obtain fused confidence coefficients : Wherein, the Is the first Confidence of the correspondence of each defect location.
- 12. The method of claim 10, wherein the step of fusing the plurality of defect locations to obtain a fused defect location comprises: for each defect position in the plurality of defect positions, determining a weight corresponding to the defect position based on a confidence corresponding to the defect position; and weighting the defect positions and the corresponding weights to obtain the fused defect positions.
- 13. A defect detection apparatus, the apparatus comprising: the image acquisition module is used for acquiring an image to be detected; the image blocking module is used for splitting the image to be detected according to the process structure of the display equipment included in the image to be detected to obtain a plurality of image blocks; A priority determining module, configured to determine, for each image block, a priority of the image block according to a process structure included in the image block and a relationship between the process structure and defect information, where the defect information indicates a possibility that the process structure has a defect; the task resource scheduling module is used for distributing the GPU for the image block according to the priority of the image block and the resource quantity of the GPU, calling the distributed GPU, executing the defect detection task corresponding to the image block and obtaining the defect detection result of the image block; And the result merging module is used for merging the defect detection results of the image blocks to obtain the defect detection result of the image to be detected.
- 14. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; a memory for storing a computer program; a processor for carrying out the method steps of any one of claims 1-12 when executing a program stored on a memory.
- 15. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-12.
Description
Defect detection method and device, electronic equipment and storage medium Technical Field The present application relates to the field of defect detection technologies, and in particular, to a defect detection method, a defect detection device, an electronic device, and a storage medium. Background With the development of high definition manufacturing and intelligent factories, it is becoming common to collect large industrial images (for example, image sizes larger than 10k×10k) in processes such as display panels (DISPLAY PANEL), flexible OLED (Organic Light-Emitting Diode), and wafer manufacturing. In order to determine whether a defect exists in the display panel, a defect detection is performed on the acquired industrial image. In the related art, one of the GPUs (Graphics Processing Unit, graphics processor) is called from multiple GPUs to detect defects on the whole image, and the non-called GPU is in an idle state, so that the GPU utilization rate is low. Disclosure of Invention The embodiment of the application aims to provide a defect detection method, a defect detection device, electronic equipment and a storage medium, so as to improve the utilization rate of a GPU. The specific technical scheme is as follows: In a first aspect, an embodiment of the present application provides a defect detection method, where the method includes: Acquiring an image to be detected; cutting the image to be detected according to a process structure of display equipment included in the image to be detected to obtain a plurality of image blocks; For each image block, determining the priority of the image block according to a process structure included in the image block and the relation between the process structure and defect information, wherein the defect information represents the possibility of defects of the process structure; distributing GPU for the image block according to the priority of the image block and the resource quantity of the GPU, calling the distributed GPU, and executing the defect detection task corresponding to the image block to obtain the defect detection result of the image block; and fusing the defect detection results of the image blocks to obtain the defect detection result of the image to be detected. Optionally, the step of segmenting the image to be detected according to the process structure of the display device included in the image to be detected to obtain a plurality of image blocks includes: aligning the image to be detected with a pre-generated process mask, and determining the position of each process structure included in the image to be detected; And cutting the image to be detected according to the position of each process structure and the corresponding cutting mode to obtain a plurality of image blocks. Optionally, the step of segmenting the image to be detected according to the process structure of the display device included in the image to be detected to obtain a plurality of image blocks includes: Aligning the image to be detected with a pre-generated process mask, and determining the position of each process structure included in the image to be detected as a process structure constraint condition; Performing defect probability evaluation on the image to be detected to obtain defect probability of each position in the image to be detected, performing defect region detection on the image to be detected, and determining a defect candidate region; Determining a segmentation mode of the image to be detected according to a preset segmentation mode determining rule based on the process structure constraint condition, the defect probability, a preset overlapping radius and the defect candidate region, wherein the preset segmentation mode determining rule enables a difference between defect detection benefits and defect detection costs of segmented image blocks to be minimized, the overlapping radius between segmented adjacent image blocks is the preset overlapping radius, cost of defect detection of segmented image blocks included in regions other than the defect candidate region to reach first precision is minimized, cost of defect detection of segmented image blocks included in the defect candidate region to reach second precision is minimized, and the defect detection benefits are used for evaluating negative correlation degrees between the size of each image block and defect probability sum of each position included in the image block, wherein the first precision is lower than the second precision; and cutting the image to be detected according to the cutting mode to obtain a plurality of image blocks. Optionally, the step of determining, for each image block, the priority of the image block according to the process structure included in the image block and the relationship between the process structure and the defect information includes: inputting each image block into a pre-trained lightweight model for each image block, so that the lightweight model performs defe