CN-122003698-A - Defect detection method, electronic device, storage medium, and program product
Abstract
The disclosure provides a defect detection method, electronic equipment, a storage medium and a program product, and relates to the technical field of detection, in particular to the technical field of computer vision and image processing. The defect detection method comprises the steps of obtaining an initial image of an object to be detected of a target process section, associating the target process section with a defect type to be detected and a region type to be detected, carrying out defect detection on the initial image to obtain a plurality of defect information aiming at the defect type to be detected, carrying out region detection on the initial image to obtain at least one region of interest information aiming at the region type to be detected, determining target defect information from the plurality of defect information according to the plurality of defect information and the at least one region of interest information, and generating a defect mark image according to the position of a target defect corresponding to the target defect information in the initial image, wherein the position of the target defect overlaps with the at least one region of interest.
Inventors
- HU BOCHENG
- CAO XUHAO
- MA MINGYUAN
Assignees
- 京东方科技集团股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20240902
Claims (20)
- A defect detection method, comprising: Acquiring an initial image of an object to be detected of a target process section, wherein the target process section is associated with a defect type to be detected and a region type to be detected; Performing defect detection on the initial image to obtain a plurality of defect information aiming at the defect type to be detected; Performing region detection on the initial image to obtain at least one region of interest information aiming at the type of the region to be detected; determining target defect information from the plurality of defect information based on the plurality of defect information and the at least one region of interest information, and Generating a defect mark image according to the position of the target defect corresponding to the target defect information in the initial image, wherein the position of the target defect is overlapped with the at least one region of interest.
- The method of claim 1, wherein the plurality of defect information includes defect regions for each of the plurality of defects, and wherein the determining target defect information from the plurality of defect information based on the plurality of defect information and the at least one region of interest information comprises: Performing region overlapping operation on the defect region of each of the plurality of defects and the at least one region of interest to obtain a plurality of overlapping results, and And determining the target defect information from the defect information according to the overlapping results.
- The method of claim 2, wherein performing a region overlapping operation on the defect region of each of the plurality of defects and the at least one region of interest to obtain a plurality of overlapping results comprises: Binarizing the defect region and the at least one region of interest of each of the plurality of defects to generate a plurality of defect region images and at least one region of interest image, respectively, and And carrying out pixel dot product operation on the defect area images and the at least one region-of-interest image to obtain the overlapping results.
- The defect detection method of claim 3, wherein the performing a pixel dot product operation on the plurality of defect region images and the at least one region of interest image to obtain the plurality of overlapping results comprises: Respectively reading a first gray value of each pixel in each defective region image and a second gray value of each pixel in the at least one region of interest image for each defective region image of the plurality of defective region images; And multiplying each second gray value by each first gray value to obtain the overlapping results.
- The method of claim 2, wherein performing a region overlapping operation on the defect region of each of the plurality of defects and the at least one region of interest to obtain a plurality of overlapping results comprises: Combining the defect areas of each of the defects with the at least one region of interest to obtain a plurality of combined areas; Binarizing the plurality of combined regions to generate a plurality of combined images, respectively, and And carrying out pixel dot product operation on the plurality of combined images and a preset image to obtain a plurality of overlapping results, wherein the area where the preset image is located surrounds the plurality of combined areas.
- The method of claim 5, wherein performing a pixel dot product operation on the plurality of combined images and the predetermined image to obtain a plurality of overlapping results comprises: Performing pixel dot product operation on the preset image and each combined image to obtain an overlapping area corresponding to each combined image, and And determining that the overlapping result is that the defect area overlaps the region of interest in response to the overlapping area being smaller than the sum of the areas corresponding to the defect area and the region of interest.
- The method of claim 6, wherein the performing the pixel dot product operation on the predetermined image and each combined image to obtain the respective overlapping area corresponding to each combined image includes: respectively reading a third gray value of each pixel in each combined image and a fourth gray value of each pixel in the preset image; Multiplying each fourth gray value by each third gray value to obtain respective overlapping region information corresponding to each combined image, and And calculating each overlapping area according to each overlapping area information.
- The method according to any one of claims 2-7, wherein the plurality of overlapping results comprises a plurality of defect areas overlapping each other and a region of interest; the determining the target defect information from the plurality of defect information according to the plurality of overlapping results includes: Determining a plurality of target region of interest information overlapping the target type defect from the plurality of overlapping results according to the defect type, and And determining the information of the target type defect as the target defect information in response to the number of the plurality of target region of interest information being greater than or equal to a first predetermined threshold.
- The defect detection method of claim 8, wherein the target region of interest information includes a region of interest type, the method further comprising: Determining object type region of interest information from a plurality of object region of interest information according to the region of interest type, and And determining the information of the target type defect as the target defect information in response to the number of the target type region of interest information being greater than or equal to a second predetermined threshold.
- The method according to any one of claims 2-7, wherein the plurality of overlapping results comprises a plurality of defect regions overlapping each other and a region of interest, the region of interest information comprising a region of interest type; Determining a plurality of defect information overlapping with the target type region of interest from the plurality of overlapping results according to the region of interest type, and And determining the plurality of defect information as the target defect information in response to the number of the plurality of defect information being greater than or equal to a third predetermined threshold.
- The method of any one of claims 1-10, wherein: The determining target defect information from the plurality of defect information according to the plurality of defect information and the at least one region of interest information includes: Determining defect information to be processed and region of interest information to be processed from the plurality of defect information and the at least one region of interest information, respectively, according to the source of the object to be detected, and And determining target defect information from the defect information to be processed according to the defect information to be processed and the region of interest information to be processed.
- The method of any one of claims 1-10, wherein determining target defect information from the plurality of defect information based on the plurality of defect information and the at least one region of interest information comprises: Determining defect information to be processed and region information to be processed from the plurality of defect information and the at least one region of interest information, respectively, according to the confidence of the plurality of defect information and the confidence of the at least one region of interest information, and And determining target defect information from the defect information to be processed according to the defect information to be processed and the region of interest information to be processed.
- The method of any one of claims 1-12, wherein the initial image comprises a plurality of images for a plurality of acquisition locations, wherein the method further comprises: and generating alarm information in response to the total number of target defects in the same type of region of interest corresponding to the plurality of images being greater than an alarm threshold.
- The method of any one of claims 1-13, wherein the method further comprises: Acquiring defect mark images of a plurality of target objects associated with the object to be detected, wherein the target objects are the same as raw materials of the object to be detected, and And splicing the defect mark image of the object to be detected and the defect mark images of the plurality of target objects according to the target relative position relationship to generate a first fusion image, wherein the target relative position relationship is determined according to the cut position of the raw material.
- The method of claim 14, wherein the method further comprises: Acquiring a plurality of first fused images for a plurality of raw materials, wherein the plurality of raw materials are of a same batch, and And splicing the plurality of first fusion images according to the raw material identification sequence to generate a second fusion image.
- The method of claim 15, wherein the method further comprises: And displaying the second fused image, the first fused image and the defect mark image on the same page according to a preset display position.
- The method of claim 1, wherein the method further comprises: Generating an initial defect mark image according to the positions of the defects corresponding to the defect information in the initial image, and And comparing and displaying the defect mark image with the initial defect mark image.
- The method of any of claims 1-17, wherein prior to acquiring the initial image of the object to be inspected corresponding to the target process segment, the method further comprises: In response to receiving a selection operation for a detection model in a detection service selection page, loading a target detection model associated with the target process segment for the defect detection and the region detection using the target detection model.
- The method of claim 18, wherein after generating the defect marker image, the method further comprises: acquiring a manual re-judging result aiming at the defect mark image; and responding to the manual re-judging result including misjudging defect information, and adjusting the confidence level aiming at the misjudging defect information in the target detection model according to the misjudging defect information.
- An electronic device, comprising: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-19.
Description
Defect detection method, electronic device, storage medium, and program product Technical Field The present disclosure relates to the field of inspection technology, and in particular, to the field of computer vision and image processing technology, and more particularly, to a defect inspection method, an electronic device, a storage medium, and a program product. Background The liquid crystal display panel has the characteristics of low power consumption, low radiation, small heat productivity and the like, and is widely applied to electronic equipment such as mobile phones, computers and the like. The production process flow of the liquid crystal display panel is complex, and when hidden defects which are not easy to be directly observed, such as scratches, burrs, edge breakage, bubbles and the like, are generated, the quality requirement of the liquid crystal display panel is difficult to meet. Disclosure of Invention The present disclosure provides a defect detection method, an electronic device, a storage medium, and a program product. According to a first aspect, the disclosure provides a defect detection method, which comprises the steps of obtaining an initial image of an object to be detected of a target process section, associating the target process section with a defect type to be detected and a region type to be detected, performing defect detection on the initial image to obtain a plurality of defect information aiming at the defect type to be detected, performing region detection on the initial image to obtain at least one region of interest information aiming at the region type to be detected, determining target defect information from the plurality of defect information according to the plurality of defect information and the at least one region of interest information, and generating a defect mark image according to the position of a target defect corresponding to the target defect information in the initial image, wherein the position of the target defect overlaps with the at least one region of interest. According to a second aspect, the present disclosure provides an electronic device comprising at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the defect detection method described above. According to a third aspect, the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described defect detection method. According to a fourth aspect, the present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described defect detection method. Drawings The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein: FIG. 1 is an application scenario diagram of a defect detection method according to an embodiment of the present disclosure; FIG. 2 is a flow chart of a defect detection method according to an embodiment of the present disclosure; FIG. 3 is a schematic view of a region overlap of an embodiment of the present disclosure; FIG. 4A is a schematic illustration of a defect marking image according to an embodiment of the present disclosure; FIG. 4B is a schematic illustration of an initial defect marking image according to another embodiment of the present disclosure; FIG. 4C is a schematic illustration of a display of a defect marking image and an initial defect marking image according to an embodiment of the present disclosure; FIG. 4D is a schematic view showing a defect marking image and an initial defect marking image according to another embodiment of the present disclosure FIG. 5 is a schematic diagram showing the summary of detection results of a plurality of detection objects of the same raw material according to the defect detection method in the embodiment of the present disclosure; FIG. 6 is a schematic diagram showing the summary of detection results of a plurality of detection objects of the same batch of raw materials according to the defect detection method of the embodiment of the present disclosure; FIG. 7 is a schematic diagram of a system interaction for performing a defect detection method of an embodiment of the present disclosure; FIG. 8 is a schematic diagram of interactions of a defect detection platform and a client cloud page for performing a defect detection method of an embodiment of the present disclosure, and Fig. 9 is a block diagram of an electronic device for performing a defect detection method of an embodiment of the present disclosure. Detailed Description For the purpose of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of th