Search

CN-121981997-A - Method and system for visual on-line detection and defect classification of package quality of cards

CN121981997ACN 121981997 ACN121981997 ACN 121981997ACN-121981997-A

Abstract

The invention discloses a method and a system for visual on-line detection and defect classification of card packaging quality, which belong to the technical field of machine vision, the method obtains visible light and near infrared images through double-spectrum imaging, eliminates film coating reflection based on self-adaptive Retinex, adopts a attention-enhancing characteristic pyramid network to realize cross-scale defect positioning, the three major classes, twelve minor classes and defects are cooperatively classified by introducing a graph neural network, dynamically optimizing a threshold value through Bayesian decision, deducing a fault root cause through time sequence analysis, and supporting 200 sheets/min online detection, wherein the detection rate is more than 99.5%, and the classification accuracy is 97.8%.

Inventors

  • YANG CHAO

Assignees

  • 广东望京卡牌科技有限公司

Dates

Publication Date
20260505
Application Date
20260126

Claims (10)

  1. 1. The visual on-line detection and defect classification method for the package quality of the cards is characterized by comprising the following steps: A step of dual spectrum image acquisition, which is to synchronously acquire the moving card package by adopting a dual spectrum imaging unit, acquire the image of the printing content through a visible light channel and acquire the texture image of the material through a near infrared channel; The image preprocessing module processes the printing content image based on the self-adaptive Retinex algorithm to eliminate the specular reflection interference of the film covered material, recovers the image degradation caused by high-speed transmission through motion blur reverse convolution, and fuses the processed printing content image with the texture image of the material to obtain a double-spectrum fused image; The defect detection module extracts multi-scale characteristics of the double-spectrum fusion image, adopts a multi-scale characteristic pyramid network based on an attention mechanism, enhances the characteristic response of a defect area through the synergistic effect of channel attention and space attention, realizes the cross-scale defect positioning from micron-scale printed spots to millimeter-scale edge breakage, and obtains a defect positioning result; The defect classification module introduces a defect association reasoning mechanism based on a graph neural network, constructs a plurality of detected defect areas into a topological graph structure, constructs an adjacent matrix by taking the defect areas as nodes and the space relation among defects as edges, aggregates the neighborhood defect characteristics through message transmission, realizes cooperative judgment of defect types, and classifies the severity according to the defect morphological characteristics; A Bayesian threshold self-adaptive adjustment step, wherein a Bayesian decision threshold adjustment unit calculates posterior probability distribution of various defect detection according to the statistical characteristics of production batches, dynamically optimizes the decision boundary threshold of various defects, and feeds back the optimized threshold to a defect detection module to adjust detection sensitivity; And a time sequence correlation analysis step, in which the time sequence correlation analysis module performs time-space correlation analysis on defect distribution of continuous frames, identifies a defect distribution mode by constructing a time-space correlation matrix, and deduces the root cause of equipment faults.
  2. 2. The method for visual on-line detection and defect classification of package quality of playing cards according to claim 1, wherein in the step of dual-spectrum image acquisition, the working band of a visible light channel is 380nm to 780nm, the working band of a near infrared channel is 780nm to 1100nm, the synchronous time deviation of two channel acquisition is less than 1ms, the image acquisition resolution is not less than 2048×2048 pixels, and the supported on-line detection speed is not less than 200 pieces/min.
  3. 3. The method for visual on-line detection and defect classification of package quality of playing cards according to claim 1, wherein the adaptive Retinex algorithm adopts a multi-scale gaussian kernel to estimate illumination components, the gaussian scale parameters are 15 pixels, 80 pixels and 240 pixels in sequence, and the specular reflection suppression coefficient is adaptively adjusted according to the film coating reflection coefficient, and the range of the specular reflection suppression coefficient is 0.1 to 0.5.
  4. 4. The method for visually inspecting and classifying defects of package quality of playing cards according to claim 1, wherein the reverse convolution of motion blur is implemented by wiener filtering algorithm, the point spread function is determined according to the speed of the conveyor belt and the exposure time, the value range of the motion blur length is 3 to 20 pixels, the value range of the motion blur angle is 0 to 180 degrees, and the value range of the wiener filtering signal-to-noise ratio parameter is 0.001 to 0.1.
  5. 5. The method for visual on-line inspection and defect classification of card packaging quality according to claim 1, wherein the multi-scale feature pyramid network comprises five scale levels corresponding to 1/8, 1/16, 1/32, 1/64 and 1/128 resolutions of the input image, respectively, channel attention calculating channel attention weights by global average pooling and full-connected layers, and spatial attention calculating spatial attention weights by maximum pooling and average pooling feature stitching, the channel attention weights and the spatial attention weights each being in the range of 0 to 1.
  6. 6. The method for visually inspecting and classifying defects on line of package quality of playing cards according to claim 1, wherein the message transmission process of the graphic neural network comprises calculating an adjacent matrix according to the space position and feature similarity of the defect area, wherein the adjacent matrix element represents the connection strength between defect nodes, aggregating the neighborhood node features through the graphic convolution layer, stacking the layers of the graphic convolution layer to be 2-4 layers, weighting contributions of different neighborhood nodes by adopting attention coefficients, and obtaining the attention coefficients through calculation of the learnable parameters and the node features.
  7. 7. The method for visual online detection and defect classification of package quality of playing cards according to claim 1, wherein in the step of adaptively adjusting the bayesian threshold, the prior probability distribution parameters of various defects are updated according to the defect detection statistical data of the current batch, the posterior probability distribution is calculated by adopting a conjugate prior form, the decision threshold is dynamically adjusted according to the expected value and the confidence interval of the posterior probability distribution, and the threshold updating period is updated once every 100 to 500 playing card packages are detected.
  8. 8. The method according to claim 1, wherein the defects are classified into twelve main categories, namely, printing defects including flying ink defects, missing printing defects, color difference defects and overprinting offset defects, material defects including scratch defects, impression defects, bubble defects and foreign matter defects, and forming defects including edge burr defects, notch misalignment defects, corner warping defects and crease defects.
  9. 9. The method for on-line visual inspection and defect classification of package quality of playing cards according to claim 1, wherein in the time sequence correlation analysis step, rows of a space-time correlation matrix correspond to continuous frame numbers, columns correspond to positions of defect detection areas, matrix elements are confidence levels of occurrence of defects, a periodic defect mode is identified by performing feature decomposition on the space-time correlation matrix, and the periodic defect mode is correlated to equipment parts according to periodic characteristics and spatial distribution characteristics of the defect mode, so that fault causes are positioned.
  10. 10. A card package quality vision on-line detection and defect classification system for implementing the card package quality vision on-line detection and defect classification method according to any one of claims 1-9, characterized by comprising: The double-spectrum image acquisition unit is used for synchronously acquiring the moving card packages and comprises a visible light channel and a near infrared channel, wherein the visible light channel acquires a printing content image, and the near infrared channel acquires a texture image of a material; the image preprocessing module is connected with the double-spectrum image acquisition unit and is used for eliminating the specular reflection interference of the laminating material based on the self-adaptive Retinex algorithm, recovering the image degradation through motion blur reverse convolution and carrying out fusion processing on the printing content image and the material texture image; the defect detection module is connected with the image preprocessing module and is used for realizing cross-scale defect positioning through a multi-scale feature pyramid network based on an attention mechanism; the defect classification module is connected with the defect detection module and is used for realizing cooperative judgment and severity classification of defect types through a defect association reasoning mechanism based on a graph neural network; The Bayesian decision threshold adjusting unit is connected with the defect detecting module and the defect classifying module and is used for dynamically optimizing and judging the boundary threshold according to the statistical characteristics of the production batch; The time sequence association analysis module is connected with the defect classification module and is used for carrying out space-time correlation analysis on the defect distribution of the continuous frames so as to infer the root cause of the equipment faults.

Description

Method and system for visual on-line detection and defect classification of package quality of cards Technical Field The invention relates to the technical field of machine vision detection, in particular to a method and a system for visual on-line detection and defect classification of card packaging quality. Background Playing cards are a recreational product with a long history, and the packaging quality directly influences the market competitiveness and brand image of the product. Modern card packages often employ elaborate printing processes and are covered with protective films to enhance the durability and visual effect of the product. However, in the high-speed automated production process, card packaging is prone to various types of defects including problems of ink flying, leakage, color difference and the like in the printing process, problems of scratches, bubbles, foreign matters and the like in the film coating process, and problems of edge burrs, uneven cuts, corner warpage and the like in the molding process. These defects not only affect the aesthetics of the product, but can also cause consumers to challenge the quality of the product, thereby affecting the reputation and economic benefits of the enterprise. In the prior art, the quality inspection of card packages has relied primarily on manual visual inspection or automatic inspection systems based on machine vision. Manual detection has the problems of low efficiency, strong subjectivity, easy fatigue, missed detection and the like, and is difficult to meet the detection requirement of hundreds of sheets per minute of a high-speed production line. Although the automatic detection system based on machine vision can improve the detection efficiency, the prior art scheme still has a plurality of defects. Chinese invention CN119399203a discloses a method and system for detecting package defects, wherein the method comprises obtaining a first image to establish target feature template information, then performing edge detection and edge segmentation on a second image to be detected, and matching with the template information to identify defects such as false marks, missing marks, and missing marks. However, the technical scheme has the following technical problems that firstly, a single visible light imaging channel is adopted, printing defects below a film coating layer of card packaging cannot be effectively detected, false detection or omission is easily caused when the film coating material generates specular reflection, secondly, the scheme is thick in defect classification granularity, three basic defect types including misprint, omission and missing printing cannot be identified, the requirement on fine-granularity defect classification of printing, material, forming and the like cannot be met, and secondly, the scheme adopts a fixed template matching and threshold judging mechanism, lacks self-adaptation capability of different production batch characteristics, obviously reduces detection accuracy when production process parameters fluctuate, and finally, lacks time sequence analysis capability of continuous frame defect distribution, cannot infer equipment fault causes from defect modes, and is difficult to realize preventive maintenance. In addition, existing visual inspection systems often employ generic objective inspection algorithms for inspection of card packages, lacking specialized optimization for card printing characteristics. Card packages have special visual features including high gloss coated surfaces, fine printed patterns, regular geometric edges, etc., which place special demands on the detection algorithm. When the general detection algorithm is used for treating fine granularity defects such as film-covered reflection, edge burrs, chromatic aberration offset and the like, the problems of high omission ratio and high misjudgment rate exist. The card packages on the high-speed production line move at a speed of more than 200 cards per minute, the traditional detection method is difficult to meet the real-time requirement while ensuring the detection precision, the time consumption of single card detection is often more than 100ms, and the single card package becomes a bottleneck for limiting the improvement of productivity. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a visual on-line detection and defect classification method and system for card packaging quality, which aim to solve the technical problems of low defect detection accuracy, coarse classification granularity, lack of self-adaption capability and fault diagnosis capability under the high-speed operation condition of a card packaging production line. The invention provides a card package quality vision on-line detection and defect classification method, which comprises the following steps of carrying out synchronous acquisition on moving card packages by adopting a double-spectrum imaging unit, obtaining a print