Search

CN-122023867-A - Method and system for quickly establishing visual defect library

CN122023867ACN 122023867 ACN122023867 ACN 122023867ACN-122023867-A

Abstract

The invention provides a method and a system for quickly establishing a visual defect library, which comprise the steps of irradiating a sample by using a first visible light beam and marking the sample as an initial marking area, irradiating the sample by using a second visible light beam based on the initial marking area and removing the irradiation area of the second visible light beam from the initial marking area in real time to obtain an ROI (region of interest) area marking result, adjusting light source parameters and image acquisition angles, repeating the irradiation marking step, acquiring enhanced sample images under different light source parameters and different angles, and constructing a training data set based on the sample images for training an image detection model. According to the invention, the pre-marking of the ROI region of the sample is realized in the data acquisition stage through the visible light beam device, so that the data marking cost and the post-processing difficulty are effectively reduced, the deviation problem of automatic marking of the diffusion model is avoided, and the efficient and reliable quick establishment of the visual defect library is realized.

Inventors

  • PAN SIZUO
  • TANG ZHAO
  • You Heyi
  • WANG SHUZHEN

Assignees

  • 四川航天计量测试研究所

Dates

Publication Date
20260512
Application Date
20251216

Claims (10)

  1. 1. A method for rapidly creating a library of visual defects, comprising: Irradiating the sample by using a first visible light beam, performing image acquisition on an irradiation area of the first visible light beam, and marking the irradiation area of the first visible light beam as an initial marking area, wherein the initial marking area is used as a forward marking result; based on the position of the initial labeling area, irradiating a sample by using a second visible light beam, and performing image acquisition on an irradiation area of the second visible light beam, wherein the irradiation area of the second visible light beam is used as a negative correction area, and the irradiation area of the second visible light beam is removed from the initial labeling area in real time to obtain an ROI (region of interest) labeling result; Adjusting light source parameters, collecting sample images under different light source parameters, and combining obtained ROI region labeling results to realize sample collection under different light source parameters; Adjusting the image acquisition angle, repeating the steps of irradiating the mark and changing the parameters of the light source, and realizing sample acquisition of the measured object under different image acquisition angles; Based on a plurality of sample images with ROI region labeling results under different light source parameters and different image acquisition angles, a training data set is constructed, the training data set is used for training an image detection model, and the image detection model is used for automatically detecting the ROI region in the image.
  2. 2. The method for quickly creating a library of visual defects according to claim 1, wherein said adjusting light source parameters comprises: The illumination brightness of the light source is regulated, so that sample collection under different illumination brightness conditions is realized; And/or adjusting the illumination angle of the light source to collect samples under different illumination angles.
  3. 3. The method for quickly creating a visual defect library of claim 1, wherein the light source parameters include illumination intensity and illumination angle, the illumination intensity and illumination angle being randomly combined, and sample collection being performed under different combinations of light source parameters.
  4. 4. The method for quickly creating a library of visual defects according to claim 1, wherein said adjusting the image acquisition angles comprises angle transforming the sample using a turret and repeating the illumination mark and light source parameter transforming steps to effect sample acquisition of the sample under test at different image acquisition angles.
  5. 5. The method for quickly creating a library of visual defects according to claim 1, wherein said adjusting the image acquisition angle comprises adjusting the photographing angle of the image acquisition device and repeating the illumination signature and light source parameter transformation steps to effect sample acquisition of the sample under test at different image acquisition angles.
  6. 6. The method for quickly creating a library of visual defects according to claim 1, wherein the first and second visible light beams are different colored visible light beams.
  7. 7. The method for quickly establishing a visual defect library according to claim 1, wherein during the irradiation marking process, the marking result of the ROI area is obtained through image processing algorithm processing according to the initial marking area and the negative correction area.
  8. 8. A system for quickly creating a library of visual defects, applied to the method of any one of claims 1 to 7, comprising: A first light beam module for providing a first visible light beam; A second light beam module for providing a second visible light beam; The image acquisition module is used for acquiring images of the samples; the illumination module is used for providing an adjustable light source; The image processing module is connected with the image acquisition module and is used for recording an initial labeling area and the negative correction area and processing the initial labeling area and the negative correction area through an image processing algorithm to obtain an ROI area labeling result; the main control module is respectively connected with the first light beam module, the second light beam module and the illumination module in a control way and is used for controlling the first light beam module and the second light beam module to start, stop and move and adjusting the light source parameters of the illumination module.
  9. 9. The system for quickly creating a library of visual defects according to claim 8, further comprising: and the turntable is used for placing the sample and adjusting the placing angle of the sample.
  10. 10. The system for quickly creating a library of visual defects according to claim 8, wherein said image acquisition module comprises an industrial camera with adjustable shooting angle.

Description

Method and system for quickly establishing visual defect library Technical Field The invention relates to the technical field of image auxiliary detection model training, in particular to a method for quickly establishing a visual defect library. Background With the development of artificial intelligence, the auxiliary detection of artificial intelligence becomes a driving force for improving the industrial production efficiency. Common models currently used for industrial inspection are the CLIP model based on multimodal information, the YOLO model based on pure visual information, and the ViT model of proprietary complex texture defects. Efficient training of these models requires large amounts of real sample data. Common training data set generation methods generally include the steps of sample data acquisition, data cleansing, data labeling, data enhancement, and the like. Sample data acquisition is the basis for generating training data sets, typically using a variety of sensors, such as high resolution industrial cameras, line cameras, and 3D visible beam radars, to complete acquisition of raw data. The collected original data often contains a large amount of irrelevant information, noise or repeated data, and redundant parts in the original data need to be filtered through data cleaning. After the data is cleaned, the region of interest in the data needs to be marked. Finally, in order to solve the problems of insufficient data and single distribution, data enhancement operation is often utilized to simulate the change of a real scene, so that data enrichment is realized. As a core step for generating a training set, the data annotation is usually realized by adopting methods such as manual annotation, semi-automatic annotation and automatic annotation. The manual labeling has higher precision, but consumes a large amount of human resources, the semi-automatic labeling is realized by using a mode of model pre-labeling and manual correction, the human resource consumption can be reduced to a certain extent, and the automatic labeling mostly adopts a diffusion model to synthesize data, but has the problems of sample deviation transmission, regular dynamic adjustment lag and the like. Therefore, the main challenges faced by the prior art are that the high manual labeling cost and the difficulty of later data processing are difficult to overcome, and meanwhile, the sample deviation and hysteresis problems introduced by the automatic labeling method influence the reliability of the data set. The invention aims to overcome the defects of the prior art, and provides a method for quickly establishing a visual defect library, which simplifies the processing difficulty of subsequent sample data by performing manual auxiliary pre-marking in a data acquisition stage, thereby realizing efficient sample acquisition and data set generation. Disclosure of Invention The present invention aims to solve at least one of the above technical problems in the prior art. To this end, a first aspect of the invention provides a method for quickly creating a library of visual defects. In a second aspect, the invention provides a system for quickly creating a library of visual defects. The invention provides a method for quickly establishing a visual defect library, which comprises the following steps: Irradiating the sample by using a first visible light beam, performing image acquisition on an irradiation area of the first visible light beam, and marking the irradiation area of the first visible light beam as an initial marking area, wherein the initial marking area is used as a forward marking result; based on the position of the initial labeling area, irradiating a sample by using a second visible light beam, and performing image acquisition on an irradiation area of the second visible light beam, wherein the irradiation area of the second visible light beam is used as a negative correction area, and the irradiation area of the second visible light beam is removed from the initial labeling area in real time to obtain an ROI (region of interest) labeling result; Adjusting light source parameters, collecting sample images under different light source parameters, and combining obtained ROI region labeling results to realize sample collection under different light source parameters; Adjusting the image acquisition angle, repeating the steps of irradiating the mark and changing the parameters of the light source, and realizing sample acquisition of the measured object under different image acquisition angles; Based on a plurality of sample images with ROI region labeling results under different light source parameters and different image acquisition angles, a training data set is constructed, the training data set is used for training an image detection model, and the image detection model is used for automatically detecting the ROI region in the image. The method for quickly establishing the visual defect library according to th