Vision-based wine bottle screen printing arrangement abnormity detection method
By training the model and constructing horizontal and vertical sequences, combined with adaptive center point sorting and cyclic offset mode, the problems of line scan camera angle uncertainty and insufficient samples were solved, and high-precision logical anomaly detection of wine bottle silk screen printing was achieved.
Patent Information
- Application Number
- CN202510775283.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-11
AI Technical Summary
The existing technology uses line scan cameras to capture images, resulting in inconsistent silk screen arrangement order rules due to different entry angles, and insufficient actual production defect samples, resulting in low accuracy in detecting logical anomalies in wine bottle silk screen printing.
By training the silk screen pattern detection model and adopting data enhancement techniques such as target position exchange, horizontal and vertical sequences are constructed. Combined with adaptive center point coordinate sorting and cyclic offset mode, a standard sequence group is generated. Sequence verification and minimum bounding rectangle positioning are performed to achieve logical anomaly detection.
It improves the versatility and accuracy of detection, adapts to different rotation angles and bottle shapes, reduces dependence on relative position, solves the problem of sample scarcity, and achieves pixel-level anomaly positioning.
Smart Images

Figure CN120672709A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial image processing and provides a method for detecting abnormal arrangement of silk screen printing on wine bottles based on vision. Background Art
[0002] During the wine production process, quality inspection of silk screen printing on wine bottles is a crucial step. Silk screen patterns are typically distributed across various areas of the bottle, including the base, body, and neck. During the actual production process, various factors can lead to quality issues, which not only impact the aesthetics of the product but also cause consumers to question its authenticity. Silk screen anomalies can be categorized into two main categories: structural anomalies and logical anomalies. Structural anomalies refer to physical defects in the silk screen pattern itself, such as color difference, scratches, bubbles, dirt, and blurriness. Logical anomalies refer to errors in the order of the silk screen patterns and missing elements. Detecting both types of anomalies is equally important.
[0003] Traditional silk screen quality inspection relies primarily on manual inspection, a method characterized by subjectivity, low efficiency, and the tendency for fatigue and misjudgment. Automated visual inspection systems can improve inspection efficiency and accuracy. Industrial defect detection research has focused on intelligent identification of structural anomalies, and in recent years, research on logical anomalies has also gained momentum. Common approaches include setting specific sorting logic rules, but this approach is difficult to apply to wine bottle production lines that capture images using line scan cameras, as different angles of entry produce different sorting rules. Anomaly detection based on template comparison is sensitive to rotation, scaling, and lighting variations. The limited number of actual production defect samples makes it difficult to directly train an end-to-end network for defect anomaly detection. Alternatively, a combined local and global branch network is employed to capture both structural and logical anomalies. However, when the normal order distribution is complex, fitting the global branch network to the normal distribution can be challenging. This patent proposes a visual-based method for detecting anomalies in wine bottle silk screen print arrangement. This method is applicable to verifying silk screen image sequences using both circular and linear arrangements generated by line scan acquisition and linear arrangements generated by area array acquisition, making it applicable to different bottle shapes and different bottle parts. Summary of the Invention
[0004] The purpose of this invention is to solve the technical problems of low accuracy in detecting logical anomalies in wine bottle silk screen printing due to inconsistent silk screen arrangement rules due to different entrance angles when capturing images with a line scan camera, and insufficient actual production defect samples making it difficult to train an end-to-end network.
[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical means:
[0006] The present invention provides a method for detecting abnormal arrangement of silk screen printing on wine bottles based on vision, comprising the following steps:
[0007] Step 1: Training the silk screen pattern detection model: By collecting normal bottle data and performing data augmentation including target position swapping, the model is trained based on the target detection algorithm;
[0008] Step 2: Construct horizontal and vertical sequences of the image to be detected: After inputting the image into the model trained in step 1 for element positioning, construct horizontal and vertical sequences respectively through the center point coordinates (cx, cy);
[0009] Step 3: Check whether the sequence is abnormal: Generate a standard sequence group and compare them in sequence. If the match fails, the positioning module is triggered;
[0010] Step 4: Output anomaly location box: Based on the sequence length difference or element difference statistics, return the minimum enclosing rectangular box or multi-element anomaly bounding box of the detection model.
[0011] In the above scheme, step 1 includes the following steps:
[0012] Step 1.1: Select a line scan camera or area array camera to image the silk screen pattern on the wine bottle to be inspected. Collect silk screen image data of a batch of normal bottles. The number N of normal bottles is greater than 200 to cover different glass bottle reflectivity and feeding angles.
[0013] Step 1.2: Manually annotate the silk screen image data, assign a category label to each silk screen element, and perform data augmentation operations on the annotated data; the data augmentation operations include: flipping, rotation, brightness change, mosaic enhancement, and target position swap enhancement;
[0014] The target position swap enhancement specifically involves randomly selecting two silk-screen elements from the annotated data, swapping their positions, adjusting their sizes to the corresponding size of the target position and covering the elements at the original target position, and swapping their category labels to generate new training samples.
[0015] Step 1.3: Perform supervised training on the enhanced data based on the object detection model. During the training process, mosaic enhancement is enabled in the early stage to improve generalization, and mosaic enhancement is disabled in the last 10 rounds to improve the accuracy of object boundary positioning.
[0016] In the above solution, the step of constructing the horizontal sequence and the vertical sequence of the image to be detected includes:
[0017] Step 2.1: Input the image to be inspected into the silk screen pattern detection model to obtain the silk screen element positioning result. The positioning result includes the category, confidence level, and target rectangle coordinate information. The coordinates of the upper left corner of the target rectangle are (x1, y1), and the coordinates of the lower right corner are (x2, y2).
[0018] The following filtering strategy is executed on the positioning results:
[0019] (a) Filter low-confidence detection results according to the confidence threshold th = 0.5;
[0020] (b) Calculate the pixel width of each silk-screen element and remove abnormal elements based on the preset category standard width and error threshold;
[0021] (c) For the repeated area imaged by the line scan camera, the coordinates of the center point of the target frame are Sort and locate the leftmost target object O a , and remove the subsequent repeated similar target objects O b and the test results on its right side;
[0022] Step 2.2: Based on the filtered target box center point coordinate c x and c y , press c for the horizontal elements respectively x Sort to generate a horizontal sequence, and sort the vertical elements by Sorting generates a vertical sequence; if the silk screen pattern is distributed in multiple areas, construct horizontal and vertical sequences for each area separately.
[0023] In the above solution, the step of checking whether the horizontal sequence and the vertical sequence are abnormal includes:
[0024] Step 3.1: Generate a standard sequence group: according to the horizontal target frame center coordinates and the vertical target frame center coordinates Constructing horizontal and vertical standard sequences;
[0025] For circularly arranged silk-screen elements, all cyclic offset patterns are generated in the original order as a standard sequence group;
[0026] For linearly arranged silk-screen elements, only one standard sequence pattern with a fixed order is generated;
[0027] Step 3.2: Perform anomaly check: compare the horizontal sequence and vertical sequence of the image to be tested with all valid patterns in the standard sequence group one by one;
[0028] If any valid pattern is matched, it is determined that no permutation anomaly is found;
[0029] If no valid pattern can be matched, the positioning module is triggered to perform sequence length check or element difference statistics to determine the abnormal location.
[0030] In the above solution, the step of outputting a sequence anomaly locating frame according to the sequence anomaly locating module includes:
[0031] Step 4.1: Length check to locate missing elements
[0032] When the length of the sequence to be detected is inconsistent with the length of any valid pattern in the standard sequence group, the minimum bounding rectangle of all target position information of the sequence to be detected is output;
[0033] The minimum enclosing rectangle is calculated by the following formula:
[0034]
[0035] Where n is the number of target elements in the sequence to be detected; (x i1 ,y i1 ) is the coordinate of the upper left corner of the i-th target rectangle, (x i2 ,y i2 ) is the coordinate of the lower right corner of the i-th target rectangle; (ox1, oy1) and (ox2, oy2) are the coordinates of the upper left corner and lower right corner of the minimum bounding rectangle;
[0036] Step 4.2: Differential elements locate abnormal status
[0037] When the length of the sequence to be detected is the same as the length of a pattern in the standard sequence group, all standard sequence patterns are traversed:
[0038] Record the element categories that differ between each standard sequence and the verification sequence; the element category refers to the silk screen element category set when the silk screen pattern detection model is annotated, such as Figure 2 The 7 categories of silk screen elements shown are as follows: bottom_s1 / bottom_s2 / sjf / bottom_s3 / bottom_s4 / bottom_s5 / bottom_s6;
[0039] Compare the lengths of the difference element arrays corresponding to all standard sequences and select the standard sequence with the smallest difference as the closest match. Specifically, the sequence to be tested is compared with each standard sequence: if the two sequences have the same length, the element categories of the two sequences (the sequence to be tested and the standard sequence i) are compared at each position to see if they are the same. If they are different, the element category is recorded in the exception array i (or difference element array i). If there are n standard sequences, there are n corresponding exception arrays. The one with the smallest difference, i.e., the shortest of the n exception arrays, is selected as the closest match to the standard sequence.
[0040] Returns the target rectangular boxes corresponding to all element categories output by the detection model that are different from the standard sequence as anomaly location information.
[0041] Because the present invention adopts the above technical means, it has the following beneficial effects:
[0042] 1. Solve the universal defects caused by the uncertainty of the feeding angle of the line scan camera
[0043] Existing methods based on template matching or fixed sorting rules are sensitive to the angle of the material being fed into the line scan camera, making them unable to adapt to the changes in the arrangement of the silkscreen pattern at different rotation angles. This proposal introduces a cyclic offset pattern to generate a standard sequence group (for example, a horizontal sequence includes seven rotation offset combinations), and combines it with an adaptive center point coordinate sorting algorithm to enable the system to be compatible with the circular arrangement characteristics of line scan camera imaging. This design breaks through the limitation of traditional rules that adapt to a single angle and is particularly suitable for scenarios that require multi-circle acquisition, such as cylindrical bottles.
[0044] 2. Reduce the model’s reliance on relative position prior information
[0045] The existing target detection network is easily disturbed by the element position distribution when processing logical anomalies, resulting in an increase in the misjudgment rate. This proposal innovatively introduces the "exchange target position" method in the data enhancement stage (such as Figure 3 By artificially constructing element-swapped images, the model is forced to actively learn category features rather than position distribution during training.
[0046] 3. Construct an unsupervised sequence verification framework to avoid the problem of sample scarcity
[0047] Existing end-to-end detection methods are limited by a shortage of industrial defect samples, making it difficult to directly train anomaly recognition models. This proposal transforms the problem into a sequence verification task: first, an object detection network is used to obtain element position information, and then horizontal / vertical sequences are constructed based on the coordinates of the geometric center point. Comparison with the standard sequence group is completed through permutation and combination matching, without relying on abnormal sample labels. This solution can be implemented with only a normal sample dataset (N>200), solving the problem of high abnormal sample collection costs in industrial scenarios.
[0048] 4. Two-dimensional sequence verification enables precise positioning capabilities
[0049] Traditional methods for detecting logical anomalies often only output an overall status, making it difficult to pinpoint the specific defect location. This proposal innovatively constructs a horizontal and vertical dual-sequence verification mechanism: when lengths are consistent, a minimum difference matching algorithm is used to accurately locate the anomaly by calculating the element deviation set of the standard sequence; when lengths are inconsistent, a minimum bounding rectangle is used to quickly determine the missing area. This method improves positioning accuracy from the component level of existing technologies to the pixel level, ensuring that every anomaly location can be traced.
[0050] 5. Compatible with multiple camera types and complex bottle type detection requirements
[0051] Existing solutions are typically designed for specific camera types (such as area scan cameras), making them difficult to adapt to different bottle shapes and inspection locations. This proposal achieves technical adaptability through a modular architecture: line scan cameras utilize a circular sequence processing strategy with repeated element rejection (calculating center point coordinates using Formula 1), while area scan cameras utilize linear sequence processing. For specialized areas like bottle bottoms and necks, multi-region inspection is achieved through a splittable vertical sequence construction method (e.g., sjf->bottom s3 in the example). This design enables seamless integration into existing production lines without requiring hardware modifications. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 Represents an algorithm flow chart;
[0053] Figure 2 Examples of line scan camera imaging and manual annotation;
[0054] Figure 3 This is an image augmentation example where the positions of the bottom s1 and bottom s3 elements are swapped. DETAILED DESCRIPTION
[0055] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with certain specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions of the present invention are intended to fall within the scope of the claims of the present invention.
[0056] In addition, in order to better illustrate the present invention, numerous specific details are given in the following detailed description. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.
[0057] Example 1
[0058] The flow chart of this patent method is as follows Figure 1 As shown, the image to be detected is first input into the pre-trained detection model to identify the silk screen pattern elements. Based on the detection results, the silk screen pattern sequence of the image to be detected is extracted, and the sequence is input into the sequence verification module for verification. If there is an abnormality, the specific abnormal element is located and the abnormal status and abnormal location box are reported. Otherwise, the normal status is reported.
[0059] Step 1: Train the Silkscreen Pattern Detection Model
[0060] Step 1.1 Select the appropriate camera to image the silk-screen pattern to be inspected. Common image acquisition cameras used on wine bottle production lines can be divided into line scan cameras and area array cameras. Select a camera based on the bottle shape and silk-screen printing status. Silk-screen images of common cylindrical bottles are typically imaged using line scan cameras. Line scan cameras accommodate various feed angles and avoid distortion issues caused by curved screen images captured by area array cameras. Other bottle shapes often use area array cameras, which offer faster imaging response. Normal bottles are common in production, so a batch of N normal bottles is collected here, with N set to greater than 200 to account for varying glass bottle reflectivity and feed angles.
[0061] Step 1.2: Manually label and enhance the data collected above. Label the silk screen elements and give them different labels, such as Figure 2 As shown. In addition to using common flipping, rotation, brightness change, mosaic enhancement, etc., this patent introduces a method of exchanging target position data enhancement to reduce the target detection network's reference and utilization of element relative position prior information, thereby improving the model's ability to learn the distinguishing features of each category. Figure 3 As shown in the figure, for the labeled data, any two silk-screen elements are selected for position swapping: the size is adjusted to the target position object size and the target position object is covered as a new image, and the corresponding labels are swapped as new labels.
[0062] Step 1.3: Train the silkscreen element localization model based on the object detection model. Select an object detection network (such as YOLO or RT-DETR) for supervised learning. During training, follow these guidelines: Apply mosaic enhancement early in the training to enrich the data and improve model generalization. Disable mosaic enhancement for the final 10 rounds to improve the detection model's accuracy in locating object boundaries.
[0063] Step 2: Construct the horizontal and vertical sequences of the image to be detected
[0064] Step 2.1: Input the image to be inspected into the silk screen pattern detection model to locate the silk screen elements and perform post-processing with the filtering strategy. The model output includes the category, confidence level, and target rectangle location information.
[0065] (x1, y1) is the coordinate of the upper left corner of the target rectangular box, and (x2, y2) is the coordinate of the lower right corner of the target rectangular box. Filtering is performed based on the output of the model. The filtering strategy is as follows: (1) Filtering is performed based on the confidence probability of the model output. Given a confidence threshold th=0.5, the results with high confidence are retained to filter out false alarms caused by incomplete silk-screen images on both sides of the line scan imaging and interference such as glass light; (2) Further, the silk-screen element pixel width is calculated based on the detection results to filter out incomplete elements on both sides of the line scan imaging. The positions of the camera and the wine bottle are relatively stable. The image widths and error thresholds of each category are set to be checked and eliminated; (3) For line scan camera imaging, due to the uncertainty of the entry angle, in order to ensure that the image after imaging has a complete silk-screen element pattern, it will generally rotate 1.5 circles or more, so the repeated parts need to be eliminated. Elimination method: All detection results are filtered according to the center point c x Sorting, the center point coordinates (cx, cy) are calculated according to the vertex coordinates of the target box, and the center point coordinates are shown in Formula 1; find the leftmost target object Oa, and query when the target of this category appears again as the target object Ob, eliminate Ob and other detection results to the right of Ob, such as Figure 2 As shown in the figure, the rightmost bottom_s6 target is removed.
[0066]
[0067] Step 2.2: Construct the sequence relationship of the image to be detected. The sequence relationship can be divided into horizontal sequence and vertical sequence. Horizontal sequence extraction: The elements to be sorted are sorted by the coordinates of the center point of the target rectangle. c Sort x, such as Figure 2 The level sequence is:
[0068] bottom_s6->bottom_s1->bottom_s2->sjf->bottom_s3->bottom_s4->bottom_s5;
[0069] Vertical sequence extraction: The elements to be sorted are sorted by analogy using the coordinate cy of the center point of the target rectangle. For example, a wine bottle consists of two parts: the base and the body. The six silk-screen elements, bottom_s1 to bottom_s6, represent the bottom of the bottle, which is concave upward and forms a hexagonal well. Therefore, a vertical sequence is constructed by selecting any one of the bottom pattern elements. The vertical sequence is: sjf->bottom_s3. For complex silk-screen patterns, split the pattern into multiple regions and construct the horizontal and vertical sequences one by one.
[0070] Step 3: Check whether the horizontal and vertical sequences are abnormal
[0071] Step 3.1 Generate the horizontal and vertical standard sequence groups. The standard sequence generation rules here are consistent with the generation method of the image to be tested. The horizontal standard sequence and the vertical standard sequence are constructed based on the cx and cy coordinates of the center point coordinates of the silk screen pattern elements respectively. The generation of the standard sequence group needs to distinguish between cyclic sequences and linear arrangements. The linear arrangement sequence group only contains one standard sequence. For cyclic sequences, all cyclic offset patterns of the standard sequence need to be generated in advance. For example Figure 2 The horizontal sequence shown in the line scan imaging is a circular sequence. The example wine bottle horizontal standard sequence group is as follows:
[0072] [[bottom_s1->bottom_s2->sjf->bottom_s3->bottom_s4->bottom_s5->bottom_s6],
[0073] [bottom_s2->sjf->bottom_s3->bottom_s4->bottom_s5->bottom_s6->bottom_s1],
[0074] [sjf->bottom_s3->bottom_s4->bottom_s5->bottom_s6->bottom_s1->bottom_s2],
[0075] [bottom_s3->bottom_s4->bottom_s5->bottom_s6->ottom_s1->bottom_s2->sjf],
[0076] [bottom_s4->bottom_s5->bottom_s6->botcom_s1->bottom_s2->sjf->bottom_s3],
[0077] [bottom_s5->bottom_s6->bottom_s1->bottom_s2->sjf->bottom_s3->bottom_s4],
[0078] [bottom_s6->bottom_s1->bottom_s2->sjf->bottom_s3->bottom_s4->bottom_s5]]. If the vertical sequence group is a linear sequence, it only contains one sequence pattern: [[sjf->bottom_s3]].
[0079] Step 3.2 Sequence Anomaly Verification: Verify that the horizontal and vertical sequences of the image to be inspected match any valid pattern in the annotated sequence group. If they match, no arrangement anomaly has been found. If they do not match, the anomaly needs to be located and reported.
[0080] Step 4: Output sequence anomaly location frame according to the sequence anomaly location module
[0081] Step 4.1: Length check to locate missing elements. When the length of the check sequence is inconsistent with the length of any standard sequence, directly output the minimum bounding rectangle position information (ox1, oy1, ox2, oy2) of the detection box contained in the sequence to be detected. The minimum bounding rectangle is obtained as shown in Formula 2: traverse all target position information in the sequence to be detected, the sequence length is n, ox1 and oy1 are the minimum values of all target positions x1 and y1, respectively, and ox2 and oy2 are the maximum values of all target positions x2 and y2, respectively.
[0082]
[0083] Where n is the number of target elements in the sequence to be detected; (x i1 ,y i1 ) is the coordinate of the upper left corner of the i-th target rectangle, (x i2 ,y i2 ) is the coordinate of the lower right corner of the i-th target rectangle; (ox1, oy1) and (ox2, oy2) are the coordinates of the upper left corner and lower right corner of the minimum bounding rectangle;
[0084] In step 4.2, when the length of the check sequence matches the length of any standard sequence, traverse each sequence in the standard sequence group to find the standard sequence with the smallest difference from the check sequence, and count the sequence element categories that differ from it. Finally, return the target detection frame of these differing element categories to the silk screen pattern detection model, which is the sequence anomaly location frame. The method for finding the standard sequence with the smallest difference described above: traverse all standard sequences, record the elements that differ from each standard sequence, and finally compare the lengths of the difference element arrays of all standard sequences. The smallest length is the closest standard sequence, and the corresponding difference element is the specific location that causes the arrangement anomaly.
[0085] In summary, the present invention has the following characteristics:
[0086] Versatile: Circular offset is introduced to adapt to the uncertain feeding angle of line scan cameras. It supports anomaly detection for both circular and linear arrangements, and supports common industrial line scan cameras and area array cameras, thus supporting different bottle shapes and different parts of the bottle.
[0087] High-precision recognition: In addition to using common image augmentation methods, by introducing target position swapping image enhancement, the model's learning of prior information on the relative position of patterns is reduced, thereby improving the model's recognition accuracy of silk-screen elements.
[0088] The difficulty of collecting industrial abnormal samples is avoided by combining the positioning of silk screen elements and sequence verification scheme to achieve sorting anomaly detection.
Claims
1. A method for detecting abnormal arrangement of silk screen printing on wine bottles based on vision, characterized in that: The following steps are involved: Step 1: Training the silk screen pattern detection model: By collecting normal bottle data and performing data augmentation including target position swapping, the model is trained based on the target detection algorithm; Step 2: Construct horizontal and vertical sequences of the image to be detected: After inputting the image into the model trained in step 1 for element positioning, construct horizontal and vertical sequences respectively through the center point coordinates (cx, cy); Step 3: Check whether the sequence is abnormal: Generate a standard sequence group and compare them in sequence. If the match fails, the positioning module is triggered; Step 4: Output anomaly location box: Based on the sequence length difference or element difference statistics, return the minimum enclosing rectangular box or multi-element anomaly bounding box of the detection model.
2. The method according to claim 1, characterized in that The steps include the following steps: Step 1.1: Select a line scan camera or area array camera to image the silk screen pattern on the wine bottle to be inspected. Collect silk screen image data of a batch of normal bottles. The number N of normal bottles is greater than 200 to cover different glass bottle reflectivity and feeding angles. Step 1.2: Manually annotate the silk screen image data, assign a category label to each silk screen element, and perform data augmentation on the annotated data; The data enhancement operations include: flipping, rotation, brightness change, mosaic enhancement, and target position exchange enhancement; The target position swap enhancement specifically involves randomly selecting two silk-screen elements from the annotated data, swapping their positions, adjusting their sizes to the corresponding size of the target position and covering the elements at the original target position, and swapping their category labels to generate new training samples. Step 1.3: Perform supervised training on the enhanced data based on the object detection model. During the training process, mosaic enhancement is enabled in the early stage to improve generalization, and mosaic enhancement is disabled in the last 10 rounds to improve the accuracy of object boundary positioning.
3. The method according to claim 1, characterized in that The step of constructing the horizontal sequence and the vertical sequence of the image to be detected includes: Step 2.1: Input the image to be inspected into the silk screen pattern detection model to obtain the silk screen element positioning result. The positioning result includes the category, confidence level, and target rectangle coordinate information. The coordinates of the upper left corner of the target rectangle are (x1, y1), and the coordinates of the lower right corner are (x2, y2). The following filtering strategy is executed on the positioning results: (a) Filter low-confidence detection results according to the confidence threshold th = 0.5; (b) Calculate the pixel width of each silk-screen element and remove abnormal elements based on the preset category standard width and error threshold; (c) For the repeated area imaged by the line scan camera, the coordinates of the center point of the target frame are Sort and locate the leftmost target object O a , and remove the subsequent repeated similar target objects O b and the test results on its right side; Step 2.2: Based on the filtered target box center point coordinate c x and c y , press c for the horizontal elements respectively x Sort to generate a horizontal sequence, and sort the vertical elements by Sorting generates a vertical sequence; if the silk screen pattern is distributed in multiple areas, construct horizontal and vertical sequences for each area separately.
4. The method according to claim 1, wherein The step of checking whether the horizontal sequence and the vertical sequence are abnormal includes: Step 3.1: Generate a standard sequence group: according to the horizontal target frame center coordinates and the vertical target frame center coordinates Constructing horizontal and vertical standard sequences; For circularly arranged silk-screen elements, all cyclic offset patterns are generated in the original order as a standard sequence group; For linearly arranged silk-screen elements, only one standard sequence pattern with a fixed order is generated; Step 3.2: Perform anomaly check: compare the horizontal sequence and vertical sequence of the image to be tested with all valid patterns in the standard sequence group one by one; If any valid pattern is matched, it is determined that no permutation anomaly is found; If no valid pattern can be matched, the positioning module is triggered to perform sequence length check or element difference statistics to determine the abnormal location.
5. The method according to claim 1, wherein The step of outputting a sequence anomaly locating frame according to the sequence anomaly locating module includes: Step 4.1: Length check to locate missing elements When the length of the sequence to be detected is inconsistent with the length of any valid pattern in the standard sequence group, the minimum bounding rectangle of all target position information of the sequence to be detected is output; The minimum enclosing rectangle is calculated by the following formula: Where n is the number of target elements in the sequence to be detected; (x i1 ,y i1 ) is the coordinate of the upper left corner of the i-th target rectangle, (x i2 ,y i2 ) is the coordinate of the lower right corner of the i-th target rectangle; (ox1, oy1) and (ox2, oy2) are the coordinates of the upper left corner and lower right corner of the minimum bounding rectangle; Step 4.2: Differential elements locate abnormal status When the length of the sequence to be detected is the same as the length of a pattern in the standard sequence group, all standard sequence patterns are traversed: Record the element categories that differ between each standard sequence and the verification sequence; Compare the lengths of the difference element arrays corresponding to all standard sequences, and select the standard sequence with the smallest difference as the closest matching pattern; Returns the target rectangular boxes corresponding to all element categories output by the detection model that are different from the standard sequence as anomaly location information.
Citation Information
Patent Citations
Screen printing positioning method, screen printing defect detection method and related device
CN109584220A
Multi-channel plane information detection method, system and device
CN110530872A
Intelligent monitoring system and method for plastic bottle labeling
CN118015546A
Method and system for detecting and removing three-phase codes on production line
CN119888760A
Printed matter inspection method and printed matter inspection device
JP2014106069A