Dispensing quality detection method, device, equipment, medium and program product
By preprocessing and detecting anomalies in the dispensing images, the dispensing quality and anomaly locations can be determined, solving the problem of inaccurate anomaly location in existing technologies and improving product yield.
Patent Information
- Application Number
- CN202410622529.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies cannot pinpoint the exact location of dispensing abnormalities in defective products, making it difficult to guide the control and adjustment of production processes and affecting product yield.
By acquiring the original dispensing image of the product to be inspected, image preprocessing is performed, including filtering, region of interest cropping, morphological processing, and determination of the region to be inspected. The anomaly detection model is used to output predicted values and thermal images to determine the dispensing quality inspection information, including the specific locations of qualified and abnormal areas.
It enables automatic detection of dispensing quality, determines whether the product is qualified and identifies abnormal areas, guides production process adjustments, and improves product yield.
Smart Images

Figure CN120997110A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of process testing, specifically to a method, apparatus, equipment, medium, and procedure for testing dispensing quality. Background Technology
[0002] In recent years, the requirements for production capacity and quality of computer, communication, and consumer electronics products (collectively referred to as 3C electronic products) have been increasing. As an important process for component mounting and heat dissipation in the manufacturing of 3C electronic products, the dispensing quality needs to be tested in a timely manner to ensure the heat dissipation effect of the components and the yield rate of the products.
[0003] However, the testing methods using relevant technologies can only determine whether the dispensing quality of a product is up to standard, but cannot pinpoint the specific location of dispensing abnormalities in defective products, thus lacking guidance for controlling and adjusting the production process. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus, equipment, medium, and procedure for dispensing quality testing.
[0005] According to a first aspect of the present disclosure, a method for detecting dispensing quality is provided, the method comprising:
[0006] Obtain the original dispensing image of the product to be tested;
[0007] The original dispensing image is preprocessed to obtain the image to be detected;
[0008] Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified.
[0009] In some embodiments of this disclosure, the image preprocessing of the original dispensing image to obtain the image to be detected includes:
[0010] The original dispensing image is subjected to image filtering processing to obtain a filtered image;
[0011] The region of interest in the filtered image is determined, and the filtered image within the region of interest is cropped to obtain a cropped image;
[0012] The cropped image is subjected to morphological processing to obtain a morphologically processed image;
[0013] Based on the morphologically processed image, the region to be detected is determined;
[0014] The region corresponding to the region to be detected is cropped from the cropped image to obtain the image to be detected.
[0015] In some embodiments of this disclosure, determining the region of interest (ROI) of the filtered image includes:
[0016] Based on the process information of the product to be tested, the reference object information in the filtered image is determined;
[0017] Based on the reference object information, line detection is performed on the filtered image to obtain the region of interest.
[0018] In some embodiments of this disclosure, determining the region to be detected based on the morphologically processed image includes:
[0019] Based on the morphologically processed image, determine the largest connected component of the morphologically processed image;
[0020] Based on the maximum connected component, determine the minimum bounding rectangle of the maximum connected component;
[0021] Based on preset diffusion pixel parameters, the minimum bounding rectangle is diffused to obtain the detection area.
[0022] In some embodiments of this disclosure, determining the dispensing quality inspection information of the product to be inspected based on the image to be inspected includes:
[0023] Based on the image to be detected, the predicted value and thermal image corresponding to the image to be detected are determined, and the thermal image is used to characterize the degree of anomaly of each pixel.
[0024] The dispensing quality detection information is determined based on the predicted value, the thermal image, the predicted classification threshold, and the anomaly segmentation threshold.
[0025] In some embodiments of this disclosure, determining the dispensing quality detection information based on the predicted value, the thermal image, the predicted classification threshold, and the anomaly segmentation threshold includes:
[0026] Based on the comparison between the predicted value and the predicted classification threshold, it is determined whether the dispensing quality of the product to be tested is qualified.
[0027] If the dispensing quality of the product to be tested is unqualified, the dispensing abnormal area is determined based on the comparison result of the abnormal value of each pixel in the thermal image and the abnormal segmentation threshold.
[0028] In some embodiments of this disclosure, determining the dispensing quality detection information based on the predicted value, the thermal image, the predicted classification threshold, and the anomaly segmentation threshold includes:
[0029] If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the area of each of the abnormal dispensing regions is less than the first region area threshold, the dispensing quality of the product to be tested is determined to be qualified; and / or,
[0030] If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification conditions, and the sum of the areas of each of the abnormal dispensing regions is less than the second region area threshold, the dispensing quality of the product to be tested is determined to be qualified.
[0031] In some embodiments of this disclosure, determining the predicted value and thermal image corresponding to the image to be detected based on the image to be detected includes:
[0032] The image to be detected is input into the anomaly detection model so that the anomaly detection model outputs the predicted value and the thermal image.
[0033] In some embodiments of this disclosure, the anomaly detection model is trained in the following manner:
[0034] Each first sample image in the first sample image set is sequentially input into the initial test network model to train the initial test network model until a preset training termination condition is met. Based on the initial test network model that meets the preset training termination condition, the anomaly detection model is determined.
[0035] In this set of first sample images, each of the first sample images is a qualified sample image.
[0036] In some embodiments of this disclosure, training the initial test network model includes:
[0037] The first sample image is subjected to forward diffusion processing to obtain a noisy image;
[0038] Using the first sample image as the desired output image, the noisy image is subjected to anti-diffusion denoising processing to obtain the reconstructed image;
[0039] The preset training termination conditions include:
[0040] The correlation index values of the first sample image and the reconstructed image corresponding to the first sample image converge. The correlation index values are determined based on the mean square error information and cosine similarity information between the first sample image and the reconstructed image.
[0041] In some embodiments of this disclosure, determining the anomaly detection model based on the initial test network model that satisfies the preset training termination condition includes:
[0042] Based on the second set of sample images, the initial test network model that meets the preset training termination condition is verified, and the verified initial test network model is used as the anomaly detection model.
[0043] The second set of sample images includes a set of qualified sample images and a set of unqualified sample images.
[0044] In some embodiments of this disclosure, the dispensing quality detection method further includes:
[0045] The third set of sample images is input into the anomaly detection model to obtain the predicted classification threshold and the anomaly segmentation threshold;
[0046] The third set of sample images includes a set of qualified sample images and a set of unqualified sample images.
[0047] In some embodiments of this disclosure, the set of non-compliant sample images is obtained in the following manner:
[0048] Data augmentation processing is performed on the images of defective samples with substandard dispensing quality to obtain the set of defective sample images. The data augmentation processing includes contrast adjustment processing and / or color channel conversion processing.
[0049] According to a second aspect of the present disclosure, a dispensing quality testing device is provided, the dispensing quality testing device comprising:
[0050] The acquisition module is used to acquire the original dispensing image of the product to be tested;
[0051] The preprocessing module is used to perform image preprocessing on the original dispensing image to obtain the image to be detected;
[0052] The determination module is used to determine the dispensing quality inspection information of the product to be inspected based on the image to be inspected. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be inspected is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
[0053] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0054] processor;
[0055] Memory used to store processor-executable instructions;
[0056] The processor is configured as follows:
[0057] Obtain the original dispensing image of the product to be tested;
[0058] The original dispensing image is preprocessed to obtain the image to be detected;
[0059] Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified.
[0060] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform a dispensing quality detection method, the dispensing quality detection method comprising:
[0061] Obtain the original dispensing image of the product to be tested;
[0062] The original dispensing image is preprocessed to obtain the image to be detected;
[0063] Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified.
[0064] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following:
[0065] Obtain the original dispensing image of the product to be tested;
[0066] The original dispensing image is preprocessed to obtain the image to be detected;
[0067] Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified.
[0068] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: the dispensing quality detection information can characterize whether the dispensing quality of the product under test is qualified and the dispensing abnormal area when the dispensing quality is unqualified. This detection method can not only judge whether the dispensing quality of the product under test is qualified, but also determine the specific location of the dispensing abnormality of the unqualified product, so that the detection results can be used to guide the control and adjustment of the production process, which is conducive to improving the product yield.
[0069] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0070] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0071] Figure 1 This is a flowchart illustrating a dispensing quality inspection method according to an exemplary embodiment.
[0072] Figure 2 This is a flowchart illustrating image preprocessing of an original dispensing image to obtain an image to be detected, according to an exemplary embodiment.
[0073] Figure 3 This is a flowchart illustrating the determination of the region of interest in a filtered image according to an exemplary embodiment.
[0074] Figure 4 This is a flowchart illustrating a morphological image processing method for determining a region to be detected, according to an exemplary embodiment.
[0075] Figure 5 This is a flowchart illustrating, according to an exemplary embodiment, the determination of dispensing quality inspection information of a product to be inspected based on an image to be inspected.
[0076] Figure 6 This is a flowchart illustrating, according to an exemplary embodiment, a process for determining dispensing quality inspection information based on predicted values, thermal images, predicted classification thresholds, and anomaly segmentation thresholds.
[0077] Figure 7 This is a thermal image shown according to an exemplary embodiment.
[0078] Figure 8 This is a thermal image shown according to another exemplary embodiment.
[0079] Figure 9 This is a thermal image shown according to another exemplary embodiment.
[0080] Figure 10 This is a flowchart illustrating, according to another exemplary embodiment, a process for determining dispensing quality inspection information based on predicted values, thermal images, predicted classification thresholds, and anomaly segmentation thresholds.
[0081] Figure 11 This is a flowchart illustrating the training of an initial test network model according to an exemplary embodiment.
[0082] Figure 12This is a flowchart illustrating a dispensing quality inspection method according to another exemplary embodiment.
[0083] Figure 13 This is a block diagram illustrating a dispensing quality inspection device according to an exemplary embodiment.
[0084] Figure 14 This is a block diagram of an electronic device according to an exemplary embodiment.
[0085] In the picture:
[0086] 10-Acquisition module; 20-Preprocessing module; 30-Determination module; 101-Processing component; 102-Memory; 103-Power component; 104-Multimedia component; 105-Audio component; 106-Input / output interface; 107-Sensor component; 108-Communication component; 109-Processor. Detailed Implementation
[0087] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0088] In the manufacturing process of electronic products, thermal adhesive is typically applied to transfer heat from high-power components such as chips and cameras, ensuring optimal performance. However, factors such as air pressure fluctuations and the dispensing equipment's operating speed can cause issues like adhesive leakage, interruptions, insufficient adhesive, and overflow, leading to inadequate heat dissipation and affecting the functionality of surrounding components. Therefore, it is necessary to inspect the adhesive quality of products after dispensing to ensure a high yield rate.
[0089] In related technologies, dispensing quality is typically inspected based on 3D height detection or 2D glue line contour feature detection, followed by defect detection in batches of products using deep learning. However, this method only allows for a general classification of products with acceptable and unacceptable dispensing quality; it cannot pinpoint the specific location of dispensing abnormalities in unacceptable products, nor can it determine the cause and type of dispensing quality defects based on the inspection results. Consequently, it cannot guide the control and adjustment of the production process based on the inspection results.
[0090] Based on this, an exemplary embodiment of this disclosure provides a method for inspecting dispensing quality. This method acquires the original dispensing image of the product to be inspected, performs image preprocessing on the original dispensing image to obtain the image to be inspected, and then determines the dispensing quality inspection information of the product to be inspected based on the image to be inspected, thus achieving automatic inspection of the dispensing quality of the product to be inspected. The dispensing quality inspection information can characterize whether the dispensing quality of the product to be inspected is qualified and the abnormal dispensing areas when the dispensing quality is unqualified. This inspection method can not only judge whether the dispensing quality of the product to be inspected is qualified, but also determine the specific location of the dispensing abnormality in the unqualified product, so that the inspection results can be used to guide the control and adjustment of the production process, which is beneficial to improving the product yield.
[0091] In one exemplary embodiment, a method for detecting dispensing quality is provided, with reference to... Figure 1 As shown, the dispensing quality inspection methods include:
[0092] S100: Obtain the original dispensing image of the product to be tested.
[0093] In step S100, after the product to be inspected completes the corresponding dispensing process, the original dispensing image of the product to be inspected can be acquired, for example, by using a 2D camera. The optical scheme for acquiring the original dispensing image of the product to be inspected, i.e., the model of the camera, the model of the lens, and the model of the light source device, can be adaptively adjusted according to different inspection scenarios or product types.
[0094] S200. Perform image preprocessing on the original dispensing image to obtain the image to be detected.
[0095] In step S200, when the original dispensing image has a lot of noise or low contrast, directly performing dispensing quality detection based on the original dispensing image will reduce detection efficiency and accuracy. Therefore, it is necessary to preprocess the original dispensing image to obtain the image to be detected, so that the image characteristics of the image to be detected meet the requirements for dispensing quality detection. For example, image preprocessing may include image filtering, determining the region of interest, morphological processing, and image cropping.
[0096] S300. Based on the image to be inspected, determine the dispensing quality inspection information of the product to be inspected. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be inspected is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
[0097] In step S300, after obtaining the image to be inspected, the dispensing quality inspection information of the product to be inspected can be determined based on the image. The determined dispensing quality inspection information can characterize whether the dispensing quality of the product to be inspected is qualified, and can also characterize the dispensing abnormal area when the dispensing quality of the product to be inspected is unqualified. For example, the image to be inspected can be input into a pre-created inspection model, and the inspection model can output the evaluation index value corresponding to the image to be inspected. Then, the evaluation index value is compared with the preset index value to determine whether the dispensing quality of the product to be inspected is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
[0098] Different dispensing defects typically correspond to different reasons and types of dispensing quality failures. Production personnel can adjust process parameters based on dispensing quality inspection information. For example, they can adjust the amount of glue or the dispensing speed according to the location, size, and shape of the defective area, thereby providing guidance for production process control and adjustment.
[0099] In this embodiment, by acquiring the original dispensing image of the product to be tested and performing image preprocessing on the original dispensing image to obtain the image to be tested, and then determining the dispensing quality inspection information of the product to be tested based on the image to be tested, automatic detection of the dispensing quality of the product to be tested is realized. The dispensing quality inspection information can characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified. This detection method can not only judge whether the dispensing quality of the product to be tested is qualified, but also determine the specific location of the dispensing abnormality in the unqualified product, so that the detection results can be used to guide the control and adjustment of the production process, which is conducive to improving the product yield.
[0100] In some embodiments, reference Figure 2 As shown, image preprocessing is performed on the original dispensing image to obtain the image to be detected, including:
[0101] S210. Perform image filtering on the original dispensing image to obtain a filtered image.
[0102] In step S210, the original dispensing image is subjected to image filtering to obtain a filtered image. For example, the original dispensing image can first be mean-filtered, replacing the pixel value of the target pixel with the average value of the pixels surrounding it. Then, histogram equalization is performed on the mean-filtered image, mapping the gray values of each pixel to the target gray value based on the gray value distribution determined by the corresponding gray-level histogram, thereby improving the image's contrast and brightness. By performing image filtering on the original dispensing image, the interference of image noise on dispensing quality detection can be reduced, and the contrast between the dispensing area and the background can be improved.
[0103] S220. Determine the region of interest (ROI) of the filtered image and crop the filtered image within the ROI to obtain the cropped image.
[0104] In step S220, the Region of Interest (ROI) of the filtered image is determined. The ROI includes the dispensing area requiring dispensing quality inspection. A cropped image is obtained by cropping the filtered image within the ROI. This cropped image, while still containing the dispensing area, has a smaller image size compared to the filtered image, which improves the efficiency and accuracy of dispensing quality inspection. For example, the ROI can be dynamically sized and positioned based on the dispensing area specified in the process.
[0105] S230. Perform morphological processing on the cropped image to obtain a morphologically processed image.
[0106] In step S230, morphological processing is performed on the cropped image to obtain a morphologically processed image. For example, the cropped image can first be binarized based on Weighted Object Variance (WOV) to ensure that the two pixel sets after binarization correspond to the adhesive substrate and the adhesive line, respectively. Then, an opening operation is performed on the binarized image to remove small non-critical regions through erosion and to fill gaps left by excessive erosion through dilation. By performing morphological processing on the cropped image, isolated noise points and small regions can be removed, avoiding abnormal adhesive line segmentation due to differences in materials and imaging stability.
[0107] S240. Based on morphological image processing, determine the region to be detected.
[0108] S250. The region corresponding to the area to be detected is cropped in the cropped image to obtain the image to be detected.
[0109] In steps S240 and S250, the region to be detected in the morphologically processed image is determined based on the morphologically processed image, and the region corresponding to the region to be detected is cropped in the cropped image, so that the cropped image can be used as the final image to be detected. By determining the region to be detected and cropping the region corresponding to the region to be detected in the cropped image, the dispensing area is always located in the central region of the image to be detected, which facilitates the subsequent determination of dispensing quality detection information based on the image to be detected, thereby improving the efficiency and stability of dispensing quality detection.
[0110] In this embodiment, the image to be detected is acquired by sequentially performing image filtering, region of interest (ROI) cropping, morphological processing, and region to be detected determination on the original dispensing image, as well as cropping the region corresponding to the region to be detected in the cropped image. This provides a basis for determining dispensing quality detection information. Image filtering reduces the interference of image noise on dispensing quality detection and improves the contrast between the dispensing area and the background. The determination and cropping of the ROI improves the efficiency and accuracy of dispensing quality detection. Morphological processing avoids the problem of abnormal glue line segmentation. The determination and cropping of the region to be detected improves the efficiency and stability of dispensing quality detection, ensuring that the image characteristics of the image to be detected after image preprocessing meet the requirements for dispensing quality detection.
[0111] In some embodiments, reference Figure 3 As shown, the region of interest in the filtered image is determined, including:
[0112] S221. Based on the process information of the product to be tested, determine the reference object information in the filtered image.
[0113] In step S221, when determining the region of interest in the filtered image, reference information in the filtered image is first determined based on the process information of the product to be inspected. The process information of the product to be inspected can characterize the type of standard process of the product to be inspected, excluding the dispensing process, and the reference information can characterize the device in the filtered image that can serve as a reference for the dispensing area under that standard process type. For example, when the manufacturing process of the product to be inspected also includes the engraving process of a laser engraving frame, the dispensing area is close to the laser engraving frame, and the engraved laser engraving frame can be used as a reference for the dispensing area in the filtered image.
[0114] S222. Based on the reference object information, perform line detection on the filtered image to obtain the region of interest.
[0115] In step S222, line detection can be performed on the filtered image based on the reference object information to determine the corresponding region of interest, so that the dispensing area can be included within the region of interest. For example, when the reference object information indicates that the reference object is a laser engraving frame, the boundary of the laser engraving frame can be determined by the Hough line detection algorithm, and the boundary of the laser engraving frame can be used as the boundary of the region of interest, so that the dispensing area surrounded by the laser engraving frame is located within the region of interest.
[0116] In this embodiment, reference information in the filtered image is determined based on the process information of the product to be inspected. Linear detection is then performed on the filtered image based on this reference information to obtain the region of interest (ROI), thus achieving ROI determination. Using process components with linear characteristics as references for the dispensing area improves the efficiency of ROI determination and ensures that the dispensing area is located within the ROI, thereby enabling the subsequent image to meet the requirements for dispensing quality inspection.
[0117] In some embodiments, reference Figure 4 As shown, based on morphological image processing, the region to be detected is determined, including:
[0118] S241. Based on the morphologically processed image, determine the largest connected component of the morphologically processed image.
[0119] In step S241, the largest connected region of the morphologically processed image is obtained. The largest connected region of the morphologically processed image is the region that is interconnected and has the largest area in the morphologically processed image. The region where the adhesive lines are mainly distributed can be determined based on the position of the largest connected region of the morphologically processed image.
[0120] S242. Based on the maximum connected component, determine the minimum bounding rectangle of the maximum connected component.
[0121] In step S242, the minimum bounding rectangle corresponding to the maximum connected component is determined based on the maximum connected component. The minimum bounding rectangle of the maximum connected component is the rectangle that can contain the range of the maximum connected component and has the smallest area.
[0122] S243. Based on the preset diffusion pixel parameters, the smallest bounding rectangle is diffused to obtain the area to be detected.
[0123] In step S243, the minimum bounding rectangle corresponding to the largest connected region is diffused according to the preset diffusion pixel parameters, thereby determining the area to be detected. The preset diffusion pixel parameters are the number of pixels that diffuse outward from the minimum bounding rectangle, and can be set according to the detection scenario and product type. Diffusion of the minimum bounding rectangle can include the main adhesive line outline within the area to be detected and exclude irrelevant areas that may interfere with the dispensing quality detection from the area to be detected.
[0124] In this embodiment, the maximum connected component of the morphologically processed image is determined, and the minimum bounding rectangle of the maximum connected component is determined based on the maximum connected component. Then, the minimum bounding rectangle is diffused according to the preset diffusion pixel parameters to obtain the region to be detected. This realizes the determination of the region to be detected, provides a basis for the cropping of the image to be detected, and ensures that the dispensing area is located within the region to be detected, so that the image to be detected can meet the requirements for dispensing quality detection.
[0125] In some embodiments, reference Figure 5 As shown, based on the image to be inspected, the dispensing quality inspection information of the product to be inspected is determined, including:
[0126] S310. Based on the image to be detected, determine the predicted value and thermal image corresponding to the image to be detected. The thermal image is used to characterize the degree of anomaly of each pixel.
[0127] In step S310, a predicted value and a thermal image corresponding to the image to be detected can be determined based on the image to be detected. The predicted value, for example, can characterize the level of dispensing quality of the product to be detected as determined by the image; a larger predicted value indicates higher dispensing quality, or vice versa. Each pixel in the thermal image has a corresponding outlier. The degree of abnormality of each pixel can be characterized by its outlier; a larger outlier indicates a higher degree of abnormality, and a higher degree of abnormality indicates a greater likelihood that the pixel is located within an abnormal dispensing area. For example, the image to be detected can be input into a pre-created detection model, and the detection model can output the predicted value and thermal image corresponding to the image to be detected, using the predicted value and the outlier values of each pixel in the thermal image as evaluation indicators of the dispensing quality of the product to be detected.
[0128] S320: Based on predicted values, thermal images, predicted classification thresholds, and anomaly segmentation thresholds, determine dispensing quality detection information.
[0129] In step S320, the predicted classification threshold can, for example, characterize the minimum standard of dispensing quality when the dispensing quality is acceptable or the maximum standard of dispensing quality when the dispensing quality is unacceptable. The anomaly segmentation threshold can, for example, characterize the minimum anomaly level of a pixel that can be considered a dispensing anomaly region or the maximum anomaly level of a pixel that cannot be considered a dispensing anomaly region. Based on the predicted value, thermal image, predicted classification threshold, and anomaly segmentation threshold, it can be determined whether the dispensing quality of the product to be inspected is acceptable and the dispensing anomaly region when the dispensing quality is unacceptable, thus realizing the determination of dispensing quality inspection information.
[0130] In this embodiment, based on the image to be detected, the predicted value and thermal image corresponding to the image are determined. Then, based on the predicted value, thermal image, prediction classification threshold, and anomaly segmentation threshold, dispensing quality detection information is determined. This enables the determination of dispensing quality detection information to characterize whether the dispensing quality of the product under test is qualified and to identify abnormal dispensing areas when the quality is unqualified. This information can be used to guide the control and adjustment of the production process, which is beneficial to improving the product yield. The predicted value, the anomaly values of each pixel in the thermal image, the prediction classification threshold, and the anomaly segmentation threshold are all precise and specific values and parameters, improving the efficiency of determining dispensing quality detection information and ensuring its accuracy.
[0131] In some embodiments, reference Figure 6 As shown, based on predicted values, thermal images, predicted classification thresholds, and anomaly segmentation thresholds, dispensing quality detection information is determined, including:
[0132] S321. Based on the comparison results between the predicted value and the predicted classification threshold, determine whether the dispensing quality of the product to be tested is qualified.
[0133] In step S321, the quality of the adhesive dispensing of the product to be inspected can be determined based on the comparison between the predicted value and the predicted classification threshold. As mentioned earlier, the predicted value characterizes the degree of adhesive dispensing quality of the product to be inspected as determined by the image to be inspected. A larger predicted value indicates lower adhesive dispensing quality. The predicted classification threshold characterizes the highest standard of adhesive dispensing quality when the dispensing quality is unqualified. When the predicted value is less than the predicted classification threshold, it means that the adhesive dispensing quality of the product to be inspected is higher than the highest standard of adhesive dispensing quality when the dispensing quality is unqualified, and the adhesive dispensing quality of the product to be inspected can be determined to be qualified. When the predicted value is equal to or greater than the predicted classification threshold, it means that the adhesive dispensing quality of the product to be inspected is lower than or equal to the highest standard of adhesive dispensing quality when the dispensing quality is unqualified, and the adhesive dispensing quality of the product to be inspected can be determined to be unqualified.
[0134] S322. If the dispensing quality of the product to be tested is unqualified, the dispensing abnormal area is determined based on the comparison results of the abnormal values of each pixel in the thermal image and the abnormal segmentation threshold.
[0135] In step S322, when it is determined that the dispensing quality of the product to be inspected is unqualified based on the comparison result between the predicted value and the predicted classification threshold, the dispensing abnormal region can be determined based on the comparison result between the outlier values of each pixel in the thermal image and the abnormal segmentation threshold. As mentioned above, the larger the outlier value of a pixel, the higher the degree of abnormality. The abnormal segmentation threshold can characterize the highest degree of abnormality of pixels that cannot be considered as dispensing abnormal regions. When the outlier value of a pixel is greater than the abnormal segmentation threshold, it means that the degree of abnormality of the pixel makes it eligible as a dispensing abnormal region. Therefore, the regions composed of pixels with outlier values greater than the abnormal segmentation threshold are considered as dispensing abnormal regions.
[0136] After determining the dispensing anomaly region based on the comparison results of outlier values of each pixel in the thermal image with the anomaly segmentation threshold, the cause and type of dispensing quality failure can be determined according to the location, size, and shape of the anomaly region. For example, when the determined dispensing anomaly region is as follows... Figure 7 As shown, the type of dispensing quality defect can be identified as adhesive breakage. When the identified dispensing abnormality area is as follows... Figure 8 As shown, the type of dispensing quality defect can be determined to be insufficient glue. When the identified dispensing abnormality area is as follows... Figure 9 As shown, the type of dispensing defect can be identified as excess adhesive.
[0137] In this embodiment, the quality of dispensing in the product under test is determined based on the comparison between the predicted value and the predicted classification threshold. If the dispensing quality is unqualified, the abnormal dispensing area is determined by comparing the outlier values of each pixel in the thermal image with the abnormal segmentation threshold. This achieves the determination of dispensing quality detection information, enabling it to characterize whether the dispensing quality of the product under test is qualified and the abnormal dispensing area when the quality is unqualified. This information can be used to guide the control and adjustment of the production process, which is beneficial to improving the product yield. By mapping the predicted value to the predicted classification threshold and the outlier values of each pixel in the thermal image to the abnormal segmentation threshold, the two evaluation index values determined from the image under test can be used to judge whether the dispensing quality is qualified and to determine the abnormal dispensing area according to the corresponding preset standards. This improves the efficiency of determining dispensing quality detection information and ensures its accuracy.
[0138] If the dispensing quality of the product under test is determined to be unqualified, and the area of the dispensing abnormality area is small, it can be considered that the dispensing quality of the product under test can still meet the heat dissipation requirements of the device and the usage requirements of the product to a certain extent. If the dispensing quality of this part of the product under test is uniformly determined to be unqualified, it will lead to an excessively high over-testing rate.
[0139] To address the aforementioned problems, in some other embodiments, reference is made to... Figure 10As shown, based on predicted values, thermal images, predicted classification thresholds, and anomaly segmentation thresholds, dispensing quality detection information is determined, including:
[0140] S323. If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification conditions, and the area of each dispensing abnormal area is less than the first area threshold, the dispensing quality of the product to be tested is determined to be qualified.
[0141] In step S323, if the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the area of each dispensing abnormal region is less than the first area threshold, the dispensing quality of the product under test can be determined to be qualified. The preset qualification condition can be, for example, that the predicted value is less than the predicted classification threshold. When the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, it means that the dispensing quality should be determined to be unqualified based solely on the comparison result between the predicted value and the predicted classification threshold. However, when the area of each dispensing abnormal region is less than the first area threshold, it means that each dispensing abnormal region is small and will not cause a significant reduction in the overall dispensing quality. The dispensing quality of the product under test can still meet the heat dissipation requirements of the device and the usage requirements of the product to a certain extent, and the dispensing quality of the product under test can be determined to be qualified.
[0142] S324. If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification conditions, and the sum of the areas of each dispensing abnormal area is less than the second area threshold, the dispensing quality of the product to be tested is determined to be qualified.
[0143] In step S324, if the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the sum of the areas of all dispensing abnormal regions is less than the second region area threshold, the dispensing quality of the product under test can be determined to be qualified. The preset qualification condition can be, for example, that the predicted value is less than the predicted classification threshold. When the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, it means that the dispensing quality should be determined to be unqualified based solely on the comparison result between the predicted value and the predicted classification threshold. However, when the sum of the areas of all dispensing abnormal regions is less than the second region area threshold, it means that the proportion of all dispensing abnormal regions is small, and it will not lead to a significant reduction in the overall dispensing quality. The dispensing quality of the product under test can still meet the heat dissipation requirements of the device and the usage requirements of the product to a certain extent, and the dispensing quality of the product under test can be determined to be qualified.
[0144] Understandably, if the comparison between the predicted value and the predicted classification threshold meets the preset acceptance criteria, the dispensing quality of the product under test can be directly determined to be acceptable. If the comparison between the predicted value and the predicted classification threshold does not meet the preset acceptance criteria, and the area or sum of the areas of each dispensing abnormal region is large, the dispensing quality of the product under test can be determined to be unacceptable.
[0145] In this embodiment, if the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the area of each dispensing abnormal region is less than the first region area threshold, the dispensing quality of the product to be tested is determined to be qualified. If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the sum of the areas of each dispensing abnormal region is less than the second region area threshold, the dispensing quality of the product to be tested is determined to be qualified. This allows the area of each dispensing abnormal region to be used as another criterion for judging whether the dispensing quality of the product to be tested is qualified when the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition. This ensures that the dispensing quality of the product to be tested can still meet the heat dissipation requirements of the device and the usage requirements of the product, thus determining the dispensing quality of the product to be qualified. This avoids excessively high over-testing rates and reduces the cost of destroying products.
[0146] In some embodiments, determining the predicted value and thermal image corresponding to the image to be detected based on the image to be detected includes: inputting the image to be detected into an anomaly detection model so that the anomaly detection model outputs the predicted value and thermal image.
[0147] When the corresponding predicted value and thermal image are determined based on the image to be detected, the image to be detected can be input into the anomaly detection model. The anomaly detection model can output the corresponding predicted value and thermal image based on the input image to be detected, so as to realize the determination of the predicted value and thermal image.
[0148] For example, the anomaly detection model can be a Dynamic Denoising Diffusion for Anomaly Detection (DDAD) model. The anomaly detection model can perform anomaly detection by learning the features and latent representations of the image. When the learned image is a sample image with qualified dispensing quality, after the image to be detected is input into the anomaly detection model, the anomaly detection model can output a predicted value representing the degree of dispensing quality and a thermal image representing the anomaly value of each pixel.
[0149] In this embodiment, by inputting the image to be detected into the anomaly detection model, the model outputs predicted values and thermal images, thus determining the predicted values and thermal images corresponding to the image to be detected, providing a basis for determining dispensing quality inspection information. The trained anomaly detection model can automatically determine the level of dispensing quality of the product to be detected and determine the thermal images that characterize the anomalies of each pixel in the image to be detected based on the features learned from the sample images, improving the efficiency and accuracy of dispensing quality inspection.
[0150] In some embodiments, the anomaly detection model is trained as follows: each first sample image in the first sample image set is sequentially input into an initial test network model to train the initial test network model until a preset training termination condition is met, and the anomaly detection model is determined based on the initial test network model when the preset training termination condition is met. Each first sample image in the first sample image set is a qualified sample image.
[0151] The first sample image set may include multiple first sample images, each of which is a qualified sample image, i.e., a sample image of other products that have the same dispensing process as the product to be inspected and whose dispensing quality is qualified. Each first sample image may undergo the same image preprocessing process as the original dispensing image. The first sample image set can be used as the training set for the anomaly detection model. Before the anomaly detection model outputs predicted values and thermal images, each first sample image in the first sample image set needs to be sequentially input into the initial test network model to perform an unsupervised training process on the untrained initial test network model. When a preset training termination condition is met, the training of the initial test network model is stopped, and based on the initial test network model that meets the preset training termination condition, an anomaly detection model that can be used for dispensing quality detection is determined.
[0152] In this embodiment, each first sample image from the first sample image set is sequentially input into the initial test network model to train the initial test network model. When a preset training termination condition is met, an anomaly detection model is determined based on the initial test network model at this time, resulting in an anomaly detection model that can be used for dispensing quality detection. This allows the anomaly detection model to output the required predicted values and thermal images based on the input image to be detected. Each first sample image in the first sample image set is a qualified sample image, and the training process of the anomaly detection model can be completed using only qualified sample images. During the training process, it is not necessary to provide different types of unqualified sample images, thus preventing the impact on production capacity and avoiding excessively long training cycles caused by the collection and import of unqualified samples.
[0153] In some embodiments, reference Figure 11 As shown, training the initial test network model includes:
[0154] S400. Perform forward diffusion processing on the first sample image to obtain a noisy image.
[0155] In step S400, the first sample image of the output initial test network model is subjected to forward diffusion processing to obtain a corresponding noise image. For example, the forward diffusion processing may include adding Gaussian noise to the first sample image a predetermined number of times. Gaussian noise is used to simulate random interference in reality, and its probability density function follows a Gaussian distribution. For example, if the first sample image of the input initial test network model is X, Gaussian noise ∈(t)θ can be added to the first sample image X a total of T times. Each addition of Gaussian noise is based on the image obtained after the previous addition of Gaussian noise, ultimately resulting in the noise image X. T′ .
[0156] S500. Using the first sample image as the desired output image, perform anti-diffusion denoising on the noisy image to obtain the reconstructed image.
[0157] In step S500, the desired output image is the anti-diffusion target for anti-diffusion denoising. The first sample image is used as the desired output image. Gaussian noise can be added to the desired output image to guide the anti-diffusion denoising process on the noisy image, thereby restoring the noisy image obtained after forward diffusion to a clear image, resulting in a reconstructed image that is close to the original first sample image without added noise. For example, the first sample image X can be used as the desired output image Y, and Gaussian noise ∈(t)θ can be gradually added to the desired output image T to obtain Y1, Y2, ..., Y... T′-1 Y T′ Then we can use Y1, Y2, ..., Y T′-1 Y T′ Guided noisy image X T′ The anti-diffusion process yields the reconstructed image X0.
[0158] The preset training termination conditions include: the correlation index value between the first sample image and the reconstructed image corresponding to the first sample image converges. The correlation index value is determined based on the mean square error information and cosine similarity information between the first sample image and the reconstructed image.
[0159] The preset training termination condition may include the convergence of the correlation index between the first input sample image and the corresponding reconstructed image. The correlation index is determined based on the mean squared error (MSE) and cosine similarity information between the first sample image and the reconstructed image. For example, the MSE information may include the mean squared error (MSE) between the first sample image and the reconstructed image. The MSE can be used as a pixel-wise loss between the first sample image and the reconstructed image to characterize their spatial similarity D. pCosine similarity information can include the cosine similarity between the first sample image and the reconstructed image. Cosine similarity can be used as a feature-level distance function to characterize the cosine distance feature D between the two. f The correlation index value D is calculated using the formula shown below. anomaly :
[0160]
[0161] Where v represents the adjustment space similarity D p The importance adjustment factor, v, ranges from 0 to 1, and v can be, for example, 0.75. When the correlation index value D... anomaly Upon convergence, the preset training termination condition is considered met. As mentioned earlier, when the preset training termination condition is met, the input of the first sample image and the training of the initial test network model are stopped. The anomaly detection model is then determined based on the initial test network model that meets the preset training termination condition. For example, the initial test network model that meets the preset training termination condition can be directly used as the anomaly detection model. Alternatively, the initial test network model that meets the preset training termination condition can be validated, and the validated initial test network model can be used as the anomaly detection model. The training process of the initial test network model determines that the anomaly detection model can be a Dynamic Denoising Diffusion Anomaly Detection (DDAD) model, and the fact that all the first sample images are qualified sample images determines that the anomaly detection model is an unsupervised detection model.
[0162] In this embodiment, a noisy image is obtained by performing forward diffusion processing on the first sample image. This first sample image is then used as the desired output image. The noisy image is then subjected to anti-diffusion denoising processing to obtain a reconstructed image, thus training the initial test network model. The convergence of the correlation index between the first sample image and the corresponding reconstructed image is used as a preset training termination condition. An anomaly detection model is determined based on the initial test network model that meets the preset training termination condition, enabling the anomaly detection model to be used to determine dispensing quality detection information. Training the initial test network model through forward diffusion and anti-diffusion denoising improves the image quality of the reconstructed image and effectively identifies dispensing anomaly regions, thereby ensuring the generalization ability and robustness of the trained anomaly detection model and improving the accuracy of dispensing quality detection information.
[0163] In some embodiments, determining an anomaly detection model based on an initial test network model that meets a preset training termination condition includes: performing a verification process on the initial test network model that meets the preset training termination condition based on a second set of sample images, and using the verified initial test network model as the anomaly detection model. The second set of sample images includes a set of qualified sample images and a set of unqualified sample images.
[0164] The second sample image set may include a qualified sample image set and a non-qualified sample image set. Each second sample image in the qualified sample image set is a qualified sample image, that is, a sample image of other products that have the same dispensing process as the product to be tested and whose dispensing quality is qualified. Each second sample image in the non-qualified sample image set is a non-qualified sample image, that is, a sample image of other products that have the same dispensing process as the product to be tested and whose dispensing quality is non-qualified.
[0165] The second set of sample images can serve as a validation set for the anomaly detection model. When determining the anomaly detection model based on the initial test network model that meets the preset training termination conditions, the initial test network model that meets the preset training termination conditions can be validated using the second set of sample images. This verifies whether the dispensing quality detection information determined by the initial test network model at this point is correct, thereby determining whether the initial test network model can meet the detection requirements of the anomaly detection model. If the validation result is qualified, the qualified initial test network model is used as the anomaly detection model. If the validation result is unqualified, the initial test network model can continue to be trained or adjusted until it is qualified.
[0166] In this embodiment, the initial test network model that meets the preset training termination conditions is verified based on the second sample image set, and the verified initial test network model is used as the anomaly detection model. This realizes the verification of the initial test network model that meets the preset training termination conditions, and can judge whether the initial test network model that meets the preset training termination conditions can be used to determine the dispensing quality detection information. This ensures that the anomaly detection model meets the error and omission indicators after being put into use, and improves the accuracy of dispensing quality detection information.
[0167] In some embodiments, the dispensing quality detection method further includes: inputting a third set of sample images into an anomaly detection model to obtain a predicted classification threshold and an anomaly segmentation threshold, wherein the third set of sample images includes a set of qualified sample images and a set of unqualified sample images.
[0168] The third sample image set can include a qualified sample image set and a non-qualified sample image set. Each third sample image in the qualified sample image set is a qualified sample image, that is, a sample image of other products that have the same dispensing process as the product to be tested and whose dispensing quality is qualified. Each third sample image in the non-qualified sample image set is a non-qualified sample image, that is, a sample image of other products that have the same dispensing process as the product to be tested and whose dispensing quality is non-qualified.
[0169] The third set of sample images can serve as a test set for the anomaly detection model. When determining dispensing quality detection information, in addition to the predicted values and thermal images output by the anomaly detection model, it is also necessary to predict classification thresholds and anomaly segmentation thresholds as a basis. The third set of sample images can be input into the trained anomaly detection model, which will then output the required predicted classification thresholds and anomaly segmentation thresholds.
[0170] In this embodiment, by inputting the third set of sample images into the anomaly detection model, the predicted classification threshold and the anomaly segmentation threshold are obtained, thus determining the predicted classification threshold and the anomaly segmentation threshold and providing a basis for determining dispensing quality inspection information. The predicted value, thermal image, predicted classification threshold, and anomaly segmentation threshold are all determined using the same anomaly detection model. Dispensing quality inspection of the product to be inspected can be achieved using only the image to be inspected and the anomaly detection model, improving the inspection efficiency and accuracy of the inspection results.
[0171] In some embodiments, the set of defective sample images is obtained by performing data augmentation processing on the defective sample images with substandard dispensing quality to obtain a set of defective sample images. The data augmentation processing includes contrast adjustment processing, or the data augmentation processing includes color channel conversion processing, or the data augmentation processing includes both contrast adjustment processing and color channel conversion processing.
[0172] As mentioned earlier, both the second and third sample image sets include sets of non-conforming sample images. These sets consist entirely of non-conforming sample images, meaning they are sample images of other products that have the same dispensing process as the product under test but whose dispensing quality is substandard. To ensure that the number of non-conforming sample images in the second sample image set meets the requirements for validating the anomaly detection model, and to ensure that the number of non-conforming sample images in the third sample image set meets the requirements for testing the anomaly detection model, data augmentation processing can be performed on the non-conforming sample images to increase the number of non-conforming sample images in each set.
[0173] Data augmentation processing for defective sample images can include contrast adjustment. For example, gamma transformation can be used to adjust the contrast of the initial defective sample image to multiple different preset contrast levels to simulate the colors of different materials under different lighting conditions, thus obtaining defective sample images corresponding to the number of preset contrast levels. Data augmentation processing for defective sample images can also include color channel conversion. For example, an initial defective sample image with an RGB color channel can be converted to other color channels such as HSV to obtain the corresponding defective sample image.
[0174] In this embodiment, by performing contrast adjustment and color channel conversion on the defective sample images of dispensing quality failure, data augmentation processing of the defective sample images is achieved, increasing the number of defective sample images in the defective sample image set. This ensures that the number of defective sample images in the defective sample image set can meet the verification requirements of the second sample image set or the testing requirements of the third sample image set, thereby improving the stability and accuracy of dispensing quality detection.
[0175] In one exemplary embodiment, a method for detecting dispensing quality is provided, with reference to... Figure 12 As shown, the dispensing quality inspection methods include:
[0176] S1. Input each first sample image in the first sample image set into the initial test network model in sequence to train the initial test network model until the correlation index value between the first sample image and the reconstructed image corresponding to the first sample image converges. The correlation index value is determined based on the mean square error information and cosine similarity information between the first sample image and the reconstructed image.
[0177] S2. Based on the second set of sample images, the initial test network model is verified when the correlation index value between the first sample image and the reconstructed image corresponding to the first sample image converges. The verified initial test network model is used as the anomaly detection model.
[0178] S3. Input the third set of sample images into the anomaly detection model to obtain the predicted classification threshold and the anomaly segmentation threshold;
[0179] S4. Obtain the original dispensing image of the product to be tested;
[0180] S5. Perform image filtering on the original dispensing image to obtain the filtered image;
[0181] S6. Based on the process information of the product to be tested, determine the reference object information in the filtered image;
[0182] S7. Based on the reference object information, perform line detection on the filtered image to obtain the region of interest;
[0183] S8. Extract the filtered image from the region of interest to obtain the extracted image;
[0184] S9. Perform morphological processing on the cropped image to obtain a morphologically processed image;
[0185] S10. Based on the morphologically processed image, determine the largest connected component of the morphologically processed image;
[0186] S11. Based on the maximum connected component, determine the minimum bounding rectangle of the maximum connected component;
[0187] S12. Based on the preset diffusion pixel parameters, the minimum bounding rectangle is diffused to obtain the area to be detected;
[0188] S13. Extract the region corresponding to the region to be detected from the cropped image to obtain the image to be detected;
[0189] S14. Input the image to be detected into the anomaly detection model so that the anomaly detection model outputs the predicted value and the thermal image;
[0190] S15. Based on the comparison results between the predicted value and the predicted classification threshold, determine whether the dispensing quality of the product to be tested is qualified.
[0191] S16. If the dispensing quality of the product to be tested is unqualified, the dispensing abnormal area is determined based on the comparison results of the abnormal values of each pixel in the thermal image and the abnormal segmentation threshold.
[0192] In this embodiment, by acquiring the original dispensing image of the product to be tested and performing image preprocessing on the original dispensing image to obtain the image to be tested, and then determining the dispensing quality inspection information of the product to be tested based on the image to be tested, automatic detection of the dispensing quality of the product to be tested is realized. The dispensing quality inspection information can characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified. This detection method can not only judge whether the dispensing quality of the product to be tested is qualified, but also determine the specific location of the dispensing abnormality in the unqualified product, so that the detection results can be used to guide the control and adjustment of the production process, which is conducive to improving the product yield.
[0193] In one exemplary embodiment, a dispensing quality inspection device is provided, with reference to... Figure 13 As shown, the dispensing quality inspection device includes an acquisition module 10, a preprocessing module 20, and a determination module 30. The acquisition module 10 is used to acquire the original dispensing image of the product to be inspected. The preprocessing module 20 is used to perform image preprocessing on the original dispensing image to obtain the image to be inspected. The determination module 30 is used to determine the dispensing quality inspection information of the product to be inspected based on the image to be inspected. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be inspected is qualified and to identify abnormal dispensing areas when the dispensing quality is unqualified.
[0194] In this embodiment, the acquisition module 10 acquires the original dispensing image of the product to be tested, and the preprocessing module 20 performs image preprocessing on the original dispensing image to obtain the image to be tested. Then, the determination module 30 determines the dispensing quality inspection information of the product to be tested based on the image to be tested, thus realizing automatic detection of the dispensing quality of the product to be tested. The dispensing quality inspection information can characterize whether the dispensing quality of the product to be tested is qualified and the abnormal dispensing area when the dispensing quality is unqualified. This detection method can not only judge whether the dispensing quality of the product to be tested is qualified, but also determine the specific location of the dispensing abnormality in the unqualified product. This allows the detection results to be used to guide the control and adjustment of the production process, which is beneficial to improving the product yield.
[0195] In one embodiment, the preprocessing module 20 is further configured to: perform image filtering on the original dispensing image to obtain a filtered image; determine the region of interest in the filtered image and crop the filtered image within the region of interest to obtain a cropped image; perform morphological processing on the cropped image to obtain a morphologically processed image; determine the region to be detected based on the morphologically processed image; and crop the region corresponding to the region to be detected in the cropped image to obtain the image to be detected.
[0196] In one embodiment, the preprocessing module 20 is further configured to: determine reference object information in the filtered image based on the process information of the product to be detected; and perform line detection on the filtered image based on the reference object information to obtain the region of interest.
[0197] In one embodiment, the preprocessing module 20 is further configured to: determine the maximum connected component of the morphologically processed image based on the morphologically processed image; determine the minimum bounding rectangle of the maximum connected component based on the maximum connected component; and diffuse the minimum bounding rectangle based on preset diffusion pixel parameters to obtain the region to be detected.
[0198] In one embodiment, the determining module 30 is further configured to: determine the predicted value and thermal image corresponding to the image to be detected based on the image to be detected, wherein the thermal image is used to characterize the degree of abnormality of each pixel; and determine the dispensing quality detection information based on the predicted value, the thermal image, the predicted classification threshold, and the abnormal segmentation threshold.
[0199] In one embodiment, the determining module 30 is further configured to: determine whether the dispensing quality of the product to be tested is qualified based on the comparison result of the predicted value and the predicted classification threshold; if the dispensing quality of the product to be tested is unqualified, determine the dispensing abnormal area based on the comparison result of the abnormal value of each pixel in the thermal image and the abnormal segmentation threshold.
[0200] In one embodiment, the determining module 30 is further configured to: determine that the dispensing quality of the product to be tested is qualified if the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the area of each dispensing abnormal area is less than the first area threshold; and / or, determine that the dispensing quality of the product to be tested is qualified if the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the sum of the areas of each dispensing abnormal area is less than the second area threshold.
[0201] In one embodiment, the determining module 30 is further configured to: input the image to be detected into the anomaly detection model, so that the anomaly detection model outputs a predicted value and a thermal image.
[0202] In one embodiment, the dispensing quality detection device further includes a training module, which is used to: sequentially input each first sample image in the first sample image set into an initial test network model to train the initial test network model until a preset training termination condition is met, and determine an anomaly detection model based on the initial test network model when the preset training termination condition is met; wherein each first sample image in the first sample image set is a qualified sample image.
[0203] In one embodiment, the training module is further configured to: perform forward diffusion processing on the first sample image to obtain a noisy image; and use the first sample image as the desired output image to perform anti-diffusion denoising processing on the noisy image to obtain a reconstructed image. The preset training termination condition includes: the correlation index value between the first sample image and the reconstructed image corresponding to the first sample image converges, and the correlation index value is determined based on the mean square error information and cosine similarity information between the first sample image and the reconstructed image.
[0204] In one embodiment, the training module is further configured to: perform verification processing on the initial test network model that meets the preset training termination condition based on the second sample image set, and use the verified initial test network model as the anomaly detection model; wherein, the second sample image set includes a qualified sample image set and an unqualified sample image set.
[0205] In one embodiment, the training module is further configured to: input the third sample image set into the anomaly detection model to obtain the predicted classification threshold and the anomaly segmentation threshold; the third sample image set includes a set of qualified sample images and a set of unqualified sample images.
[0206] In one embodiment, the training module is further configured to: perform data augmentation processing on the defective sample images with substandard dispensing quality to obtain a set of defective sample images, wherein the data augmentation processing includes contrast adjustment processing and / or color channel conversion processing.
[0207] In one exemplary embodiment, an electronic device is provided, which may be a terminal device such as a mobile phone or a computer.
[0208] refer to Figure 14 As shown, the electronic device may include one or more of the following components: processing component 101, memory 102, power component 103, multimedia component 104, audio component 105, input / output (I / O) interface 106, sensor component 107, and communication component 108.
[0209] Processing component 101 typically controls the overall operation of an electronic device, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 101 may include one or more processors 109 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 101 may include one or more modules to facilitate interaction between processing component 101 and other components. For example, processing component 101 may include a multimedia module to facilitate interaction between multimedia component 104 and processing component 101.
[0210] Memory 102 is configured to store various types of data to support the operation of the electronic device. Examples of such data include instructions for any application or method used to operate on the electronic device, contact data, phonebook data, messages, pictures, videos, etc. Memory 102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0211] Power component 103 provides power to various components of the electronic device. Power component 103 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0212] Multimedia component 104 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 104 includes a front-facing camera and / or a rear-facing camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0213] Audio component 105 is configured to output and / or input audio signals. For example, audio component 105 includes a microphone (MIC) configured to receive external audio signals when the electronic device is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 102 or transmitted via communication component 108. In some embodiments, audio component 105 also includes a speaker for outputting audio signals.
[0214] I / O interface 106 provides an interface between processing component 101 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0215] Sensor assembly 107 includes one or more sensors for providing state assessments of various aspects of the electronic device. For example, sensor assembly 107 can detect the on / off state of the electronic device, the relative positioning of components such as the display and keypad of the electronic device, changes in the position of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device, and temperature changes of the electronic device. Sensor assembly 107 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 107 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 107 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0216] Communication component 108 is configured to facilitate wired or wireless communication between electronic devices and other devices. Devices can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 108 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 108 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0217] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the dispensing quality inspection method described above for use in electronic devices.
[0218] In one exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 102 including instructions, which can be executed by a processor 109 of an electronic device to perform the dispensing quality inspection method applied to the electronic device described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the instructions in the storage medium are executed by the processor 109 of the electronic device, the electronic device is able to perform the dispensing quality inspection method shown in the above embodiment.
[0219] In one exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor 109, implements the above-described dispensing quality detection method.
[0220] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0221] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for detecting the quality of adhesive dispensing, characterized in that, The dispensing quality testing method includes: Obtain the original dispensing image of the product to be tested; The original dispensing image is preprocessed to obtain the image to be detected; Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
2. The dispensing quality detection method according to claim 1, characterized in that, The step of preprocessing the original dispensing image to obtain the image to be detected includes: The original dispensing image is subjected to image filtering processing to obtain a filtered image; The region of interest in the filtered image is determined, and the filtered image within the region of interest is cropped to obtain a cropped image; The cropped image is subjected to morphological processing to obtain a morphologically processed image; Based on the morphologically processed image, the region to be detected is determined; The region corresponding to the region to be detected is cropped from the cropped image to obtain the image to be detected.
3. The dispensing quality detection method according to claim 2, characterized in that, Determining the region of interest in the filtered image includes: Based on the process information of the product to be tested, the reference object information in the filtered image is determined; Based on the reference object information, line detection is performed on the filtered image to obtain the region of interest.
4. The dispensing quality detection method according to claim 2, characterized in that, The process of determining the region to be detected based on the morphologically processed image includes: Based on the morphologically processed image, determine the largest connected component of the morphologically processed image; Based on the maximum connected component, determine the minimum bounding rectangle of the maximum connected component; Based on preset diffusion pixel parameters, the minimum bounding rectangle is diffused to obtain the detection area.
5. The dispensing quality testing method according to claim 1, characterized in that, The step of determining the dispensing quality inspection information of the product to be inspected based on the image to be inspected includes: Based on the image to be detected, the predicted value and thermal image corresponding to the image to be detected are determined, and the thermal image is used to characterize the degree of anomaly of each pixel. The dispensing quality detection information is determined based on the predicted value, the thermal image, the predicted classification threshold, and the anomaly segmentation threshold.
6. The dispensing quality detection method according to claim 5, characterized in that, The process of determining the dispensing quality detection information based on the predicted value, the thermal image, the predicted classification threshold, and the anomaly segmentation threshold includes: Based on the comparison between the predicted value and the predicted classification threshold, it is determined whether the dispensing quality of the product to be tested is qualified. If the dispensing quality of the product to be tested is unqualified, the dispensing abnormal area is determined based on the comparison result of the abnormal value of each pixel in the thermal image and the abnormal segmentation threshold.
7. The dispensing quality testing method according to claim 5, characterized in that, The process of determining the dispensing quality detection information based on the predicted value, the thermal image, the predicted classification threshold, and the anomaly segmentation threshold includes: If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification condition, and the area of each of the abnormal dispensing regions is less than the first region area threshold, the dispensing quality of the product to be tested is determined to be qualified; and / or, If the comparison result between the predicted value and the predicted classification threshold does not meet the preset qualification conditions, and the sum of the areas of each of the abnormal dispensing regions is less than the second region area threshold, the dispensing quality of the product to be tested is determined to be qualified.
8. The dispensing quality detection method according to claim 5, characterized in that, The step of determining the predicted value and thermal image corresponding to the image to be detected based on the image to be detected includes: The image to be detected is input into the anomaly detection model so that the anomaly detection model outputs the predicted value and the thermal image.
9. The dispensing quality detection method according to claim 8, characterized in that, The anomaly detection model is trained in the following manner: Each first sample image in the first sample image set is sequentially input into the initial test network model to train the initial test network model until a preset training termination condition is met. Based on the initial test network model that meets the preset training termination condition, the anomaly detection model is determined. In this set of first sample images, each of the first sample images is a qualified sample image.
10. The dispensing quality detection method according to claim 9, characterized in that, The training of the initial test network model includes: The first sample image is subjected to forward diffusion processing to obtain a noisy image; Using the first sample image as the desired output image, the noisy image is subjected to anti-diffusion denoising processing to obtain the reconstructed image; The preset training termination conditions include: The correlation index values of the first sample image and the reconstructed image corresponding to the first sample image converge. The correlation index values are determined based on the mean square error information and cosine similarity information between the first sample image and the reconstructed image.
11. The dispensing quality detection method according to claim 9, characterized in that, The step of determining the anomaly detection model based on the initial test network model that meets the preset training termination condition includes: Based on the second set of sample images, the initial test network model that meets the preset training termination condition is verified, and the verified initial test network model is used as the anomaly detection model. The second set of sample images includes a set of qualified sample images and a set of unqualified sample images.
12. The dispensing quality detection method according to claim 8, characterized in that, The dispensing quality testing method further includes: The third set of sample images is input into the anomaly detection model to obtain the predicted classification threshold and the anomaly segmentation threshold; The third set of sample images includes a set of qualified sample images and a set of unqualified sample images.
13. The dispensing quality testing method according to claim 11 or 12, characterized in that, The set of non-compliant sample images was obtained in the following manner: Data augmentation processing is performed on the images of defective samples with substandard dispensing quality to obtain the set of defective sample images. The data augmentation processing includes contrast adjustment processing and / or color channel conversion processing.
14. A dispensing quality detection device, characterized in that, The dispensing quality testing device includes: The acquisition module is used to acquire the original dispensing image of the product to be tested; The preprocessing module is used to perform image preprocessing on the original dispensing image to obtain the image to be detected; The determination module is used to determine the dispensing quality inspection information of the product to be inspected based on the image to be inspected. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be inspected is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
15. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; The processor is configured as follows: Obtain the original dispensing image of the product to be tested; The original dispensing image is preprocessed to obtain the image to be detected; Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
16. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform a dispensing quality inspection method, the dispensing quality inspection method comprising: Obtain the original dispensing image of the product to be tested; The original dispensing image is preprocessed to obtain the image to be detected; Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the dispensing abnormal area when the dispensing quality is unqualified.
17. A computer program product, comprising a computer program, characterized in that, The computer program is executed by the processor to achieve the following: Obtain the original dispensing image of the product to be tested; The original dispensing image is preprocessed to obtain the image to be detected; Based on the image to be tested, the dispensing quality inspection information of the product to be tested is determined. The dispensing quality inspection information is used to characterize whether the dispensing quality of the product to be tested is qualified and the dispensing abnormal area when the dispensing quality is unqualified.