A glass bottle defect identification device and method based on dual-ring track sampling
By using a glass bottle defect identification device with dual-ring track sampling and a logically constrained neural network model, the problems of high false detection rate and liquid interference in glass bottle defect detection have been solved, achieving high-precision, low-cost online high-speed detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
- Filing Date
- 2026-04-22
- Publication Date
- 2026-05-26
Smart Images

Figure CN122090239A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, and in particular to a glass bottle defect identification device and method based on double-ring track sampling. Background Technology
[0002] Glass bottles are essential packaging containers in the food, pharmaceutical, and cosmetic industries, with a wide range of applications. Existing detection technologies and setups for localized detection and identification of empty bottles are quite mature. However, defects in glass bottles after they are filled with liquid (cracks, bubbles, stones, scratches, etc.) directly affect product safety and delivery time. Current detection methods still mainly rely on manual visual inspection and traditional image processing techniques, which are inefficient and costly to automate. The core challenge lies in the numerous transient artifacts created by the dynamic refraction, surface fluctuations, and random bubble displacement of the liquid within the bottle. Traditional algorithms struggle to distinguish between static glass defects and dynamic liquid interference, resulting in a very high false positive rate. Currently, the industry lacks online high-speed detection devices and identification technologies that can effectively eliminate liquid interference using multi-view physical constraints and are suitable for complex liquid-filled conditions.
[0003] Therefore, there is an urgent need for a glass bottle defect identification device and method that has a reasonable structure, multi-view collaborative sampling capability, can effectively suppress liquid refraction interference, and can operate online at high speed. Summary of the Invention
[0004] To address the aforementioned shortcomings in existing technologies, this invention provides a glass bottle defect identification device and method based on dual-ring track sampling, which solves the problems of high false detection rate, significant liquid interference, and inability to perform multi-view sampling in existing glass bottle defect detection technologies.
[0005] To achieve the above-mentioned objectives, this invention provides a method for identifying glass bottle defects based on dual-ring track sampling, comprising: Acquire multi-view images of the glass bottle to be tested; The multi-view images of the glass bottle to be tested are input into a pre-trained glass bottle defect recognition model to obtain the glass bottle defect recognition results; the glass bottle defect recognition results include "qualified" and "defective"; The glass bottle defect recognition model includes, in sequence: an input layer, a normalization layer, a front-end convolutional layer, a batch normalization layer, a ReLU activation function layer, a max pooling layer, a VAE encoder, a U-net generator, a Markov discriminator, a logically constrained neural network module, a multi-view dynamic weighted fusion layer, and an output layer. The output of the U-net generator is also connected to the VAE decoder, and the output of the VAE decoder serves as another input to the logically constrained neural network module.
[0006] Secondly, the present invention also provides an apparatus for implementing a glass bottle defect identification method based on dual-ring track sampling, comprising: A horizontal conveyor belt is used to transport glass bottles to be tested; Imaging module, used to acquire multi-view images of the glass bottle under test; The edge computing unit is used to input the multi-view images of the glass bottle to be tested into the pre-trained glass bottle defect recognition model to obtain the glass bottle defect recognition result.
[0007] The beneficial effects of this invention are as follows: 1. The design of a glass bottle defect identification device based on dual-ring track sampling enables automatic defect identification of glass bottles by simply having the conveyor belt pass through the detection area. The defect is then sorted and removed in the exit area, improving the intelligence and detection efficiency of the production line, reducing labor costs and subsequent costs of false detections and missed detections, and effectively ensuring detection accuracy.
[0008] 2. Using logical constraints on the loss function The regularization effect ensures that the false rejection rate due to bubble interference is reduced in complex environments containing liquids, effectively solving the problems of high false detection rate and low recall rate of traditional algorithms and empty bottle detection technology in high-disturbance scenarios.
[0009] 3. By designing an asynchronous servo-driven double-loop track and utilizing phase difference sampling between cameras, the instantaneous artifacts caused by liquid refraction are eliminated, enabling a fully automated device for back lighting and front lighting, thus promoting quality and efficiency improvement for glass bottle manufacturing enterprises with lower costs and higher efficiency.
[0010] 4. By using industrial cameras to capture images from multiple angles, this technology addresses issues such as redundant layout, blind spots, algorithm threshold dependence, slow speed, limitation to local detection of empty bottles, and high false detection rates. It avoids situations where defects cannot be identified during final inspection after the glass bottle is filled with liquid, thereby reducing inspection costs and expanding the application scope of this technology in more practical production scenarios.
[0011] 5. By introducing the M-LNN module, the rigid properties and stability of defects are used as the core physical criteria, which enhances the model's ability to spatially fuse and logically understand multi-view features, fundamentally reducing non-rigid liquid interference and ensuring high accuracy and robustness of defect identification in complex liquid environments. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the overall structure of a glass bottle defect identification device based on dual-ring track sampling; Figure 2 An exploded view of the main structure of a glass bottle defect identification device based on dual-ring track sampling; Figure 3 A top view of a glass bottle defect identification device based on dual-ring track sampling; Figure 4 This is a flowchart of a glass bottle defect identification method based on dual-ring track sampling; Figure 5 A schematic diagram of the glass bottle defect identification model structure; Figure 6 Heat map of defects; Figure 7 This is a convergence plot of the accuracy when training a glass bottle defect recognition model.
[0013] The components include: 1. Industrial camera; 2. Fixed bracket; 3. Servo controller; 4. Semi-circular track; 5. Semi-circular light source; 6. Photoelectric trigger sensor; 7. Horizontal conveyor belt; 8. Rejection mechanism. Detailed Implementation
[0014] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0015] like Figure 1 , Figure 2 , Figure 3 As shown, in one embodiment of the present invention, a glass bottle defect identification device based on dual-ring track sampling includes: a horizontal conveyor belt 7 for conveying glass bottles to be tested; an imaging module for acquiring multi-view images of the glass bottles to be tested; and an edge computing unit for inputting the obtained multi-view images of the glass bottles to be tested into a glass bottle defect identification model to obtain a glass bottle defect identification result. The horizontal conveyor belt 7 is an open conveyor belt, and a rejection mechanism 8 is provided at its opening. When the glass bottle defect identification result is "defective," the rejection mechanism 8 rejects the glass bottle being tested. In this embodiment, the rejection mechanism 8 uses a high-speed robotic arm to sort the output glass bottles according to the instructions of the edge computing unit.
[0016] The imaging module includes a semi-circular track 4, within which a precision slide rail is embedded. A servo-driven slide block is slidably connected to the slide rail, enabling multi-angle displacement switching within 30ms. A fixed bracket 2 is mounted on the slide block, and an industrial camera 1 (using an 8mm low-distortion industrial fixed-focus lens) is fixed on the fixed bracket 2. The optical axis of the industrial camera 1 always points towards the glass bottle at the center of the ring. A semi-circular base is located below the semi-circular track 4, and a semi-circular light source 5 is located in the inner ring of the semi-circular base. The semi-circular light source 5 is mounted on the same side as the industrial camera 1 and moves synchronously with it, serving as both supplementary lighting and backlighting. This achieves the dual function of supplementary lighting and backlighting from a single light source, simplifying the hardware layout while improving image quality. When the current imaging module is working, the light source provides frontal supplementary lighting for the camera, enhancing the grayscale contrast between the defect area and the bottle surface, greatly enhancing the feature contrast of cracks and stones, and ensuring the high stability of defect features in the acquired images. When the imaging module on the opposite side is working, the light source forms backlighting, reducing the influence of contour shadows and highlighting defects such as bubbles and stones inside the transparent bottle. The light source is a semi-circular light source 5, with brightness adjustable from 0-100% PWM steplessly. The flash duration is adapted to the image acquisition frequency setting to meet high-speed imaging requirements. The device includes two imaging modules, which are symmetrically fixed on both sides of the horizontal conveyor belt 7. A photoelectric trigger sensor 6 is installed at the connection between the imaging module and the horizontal conveyor belt 7.
[0017] In this embodiment, the specific method for identifying glass bottle defects using the glass bottle defect identification device based on double-ring track sampling provided by the present invention is as follows: Figure 4 As shown, it includes the following steps: S1. Obtain multi-view images of the glass bottle to be tested: The glass bottle to be tested is placed on the horizontal conveyor belt 7 and sent into the detection area (the area where the imaging module can acquire images of the glass bottle). When the photoelectric trigger sensor 6 senses the glass bottle, the electronic control system in the imaging module drives the slide in the semi-circular track 4 through the servo controller 3, causing the industrial camera 1 in the imaging module to move to a preset angle. Simultaneously, the dual semi-circular light sources 5 on both sides are turned on to acquire image data of the glass bottle. The two imaging modules work together to acquire multi-view image data of the glass bottle from 6 angles. After image acquisition, the data is synchronously transmitted to the edge computing unit, realizing non-contact dynamic signal synchronous acquisition. Specifically, the circular track, in conjunction with the servo control system, drives the industrial camera 1 to reciprocate at high speed between three preset key sampling angles (-30°, 0°, +30°) along the track. The upper and lower imaging modules are arranged opposite each other in space (180°). Through the phase coordination of the front and rear cameras at the three deflection angles, a single detection process can acquire 6 multi-view discrete high-definition image data covering the entire 360° circumference of the bottle.
[0018] S2. The multi-view images of the glass bottle to be tested are input into the pre-trained glass bottle defect recognition model through the edge computing unit to obtain the glass bottle defect recognition result.
[0019] The edge computing unit incorporates an improved latent space motion-aware logical constraint diffusion model (GAC-LMD) as a glass bottle defect recognition model. This model is trained only on normal glass bottle images, requiring no defect sample annotation. The inference process retains the diffusion generation network and the logical constraint forward inference module, while discarding the discriminator to improve efficiency. Specifically, it includes: firstly, preprocessing multi-view images to remove noise interference; then, outputting pixel-level defect structure probability maps for each view through the diffusion generation network; and finally, embedding two logical constraints—composite spatial geometric consistency and apparent energy spectrum stability—through the M-LNN module to perform physical-level denoising and correction on the probability maps.
[0020] like Figure 5 As shown, the glass bottle defect recognition model comprises, in sequence: an input layer, a normalization layer, a front-end convolutional layer, a batch normalization layer, a ReLU activation function layer, a max-pooling layer, a VAE encoder, a U-net generator, a Markov discriminator, a logistic constraint neural network module, a multi-view dynamic weighted fusion layer, and an output layer. The output of the U-net generator is also connected to a VAE decoder, and the output of the VAE decoder serves as another input to the logistic constraint neural network module. A logistic constraint neural network (M-LNN) is introduced as the core verification module in the unsupervised diffusion architecture. This module, taking advantage of the hardware's 6-view circular equidistant sampling characteristics, improves the general temporal processing logic into a cross-view spatial consistency verification operator strongly coupled with the camera rotation trajectory to solve the false detection problem in liquid-containing environments. The glass bottle defect recognition model exhibits good cross-platform compatibility and can run stably on computers running Linux embedded systems, Windows industrial operating systems, or high-performance server environments.
[0021] The glass bottle defect recognition model introduces M-LNN as the core of physical property verification; wherein: the VAE encoder is used to map the original image to a low-dimensional latent space; the U-net generator performs reverse denoising iteration in the latent space and outputs a defect probability distribution map; the M-LNN verification module reconstructs the continuous evolution logic into a cross-view spatial consistency verification operator, and uses the fixed position characteristics of the defect relative to the bottle surface (rigid body property) to perform spatial trajectory verification and appearance stability discrimination on the generated feature map, thereby filtering out interference caused by non-rigid body features in the generation stage.
[0022] The Logical Constraint Neural Network (M-LNN) module applies physical guidance through a logical consistency loss function, which includes the following constraints: Cross-view composite spatial geometric consistency constraints: for the translational displacement L of the glass bottle and the camera deflection angle The spatiotemporal synchronization characteristics of the defect are utilized to verify the projection trajectory of feature points across six viewpoints, based on the rigidity of the defect relative to the bottle surface. The residual formula is as follows:
[0023] In the formula, This represents the geometric consistency constraint of cross-perspective composite space. For the first The coordinate features of defect candidate points identified by the model in the latent space from each sampling perspective. This represents the conveyor belt displacement between adjacent sampling points. For the rotation angle of industrial camera 1, Describes the Euclidean norm. It is a composite spatial transformation mapping operator, that is, a coordinate transformation operator based on physical motion parameters.
[0024] The displacement vector of a real defect conforms to the geometric prediction of motion through the detected area. However, the displacement of air bubbles inside the bottle, due to the sloshing and drifting of the liquid, does not conform to this rigid body mapping law, thus producing a larger displacement. The residuals are suppressed.
[0025] Logical consistency constraints are expressed as follows:
[0026]
[0027]
[0028]
[0029] In the formula, For logical consistency loss, To adjust the weighting coefficient for time consistency, To mitigate temporal consistency loss, the coordinates of adjacent time series are constrained to be smooth and continuous. To adjust the weighting coefficients for multi-view geometric consistency, The multi-view geometric consistency loss constrains the location of the same defect to be consistent across different viewpoints at the same time. To adjust the weighting coefficients for semantic structural integrity, To adjust the weighting coefficients for motion perception consistency, The motion perception consistency loss is used to constrain the motion of defective points to conform to real physical laws, ensuring the rationality and robustness of the tracking trajectory. This embodiment sets... , , =0.3、 =0.3 to enhance the ability to eliminate interference from liquid sloshing, adapt to glass bottle inspection scenarios, and strengthen the priority of multi-view consistency constraints. express The image of the glass bottle corresponding to each moment. express The image of the glass bottle corresponding to each moment. - This represents the displacement vector of the same defect point between two adjacent frames; express Time of the first The glass bottle image corresponding to each sampling perspective; Indicates the time of the first The glass bottle image corresponding to each sampling perspective; - This represents the displacement vector of the same defect point between two adjacent frames. This represents the predicted displacement vector obtained from the conveyor belt displacement and the rotation angle of industrial camera 1. Denotes the Euclidean norm; The cross-view apparent energy spectrum stability constraint utilizes the energy spectrum fluctuation differences caused by changes in the optical path during camera deflection to identify and eliminate dynamic interference features. Its expression is:
[0030] In the formula, To represent the variance of the energy spectrum, The apparent energy spectrum intensity is defined by the product of the average pixel gray center of the suspected region and the topological area of that region; The arithmetic mean of the energy spectrum intensity under six discrete sampling perspectives is used as a physical stability benchmark. For the first Images of a glass bottle captured from various perspectives. When the camera rotates to sample the liquid bubbles, the shape and brightness undergo drastic, random changes due to variations in the angle of light refraction. Extremely large; while the morphology of solid defects is highly stable. It approaches zero. This parameter is a key physical indicator for distinguishing between real defects and bubble artifacts.
[0031] Semantic structure consistency constraints are expressed as follows:
[0032] In the formula, For semantic structure consistency constraints, This is a semantic structure integrity coefficient, ensuring that real defects do not have a destructive impact on the semantic structure. For the first At each time step, the confidence level of the glass bottle defect recognition model in predicting the semantic category of the current glass bottle defect area is in the range of [0,1]. The closer the value is to 1, the more confident the model is that the current area belongs to the preset defect semantic category.
[0033] The glass bottle defect recognition model training aims to optimize both diffusion denoising accuracy and logical constraint consistency. During the model training phase, the aforementioned physical laws are embedded into the back-iteration process of the diffusion model. The total loss function for training the glass bottle defect recognition model is:
[0034] In the formula, For the total loss function, The geometric weight is set to 0.5, which is the highest weight, to force the features generated by the model to conform to the rigid body motion trajectory of translation and rotation. To stabilize the weights, we set them to 0.5, giving them the highest weight, to force the features generated by the model to conform to the rigid body motion trajectory of translation and rotation. For the joint expectation operator, it represents the expectation of... The expected value is calculated simultaneously for the distribution of the model. The total loss term within parentheses is averaged over all possible latent space features, noise, and time steps to measure the average performance of the model under the global data distribution. This represents the latent space features of a glass bottle image across different viewpoints. To observe the noise, This is the timing sampling step. This represents the prediction error of the glass bottle defect identification model. The balancing coefficient is set to 0.15, which balances the detail sharpness of the generated image with the constraints of physical rules. When the image is blurry from a certain viewpoint, the model automatically reduces the weight of that viewpoint to 0.1 to avoid interfering with the overall judgment.
[0035] The loss functions for the Markov discriminator and the U-net generator are as follows:
[0036]
[0037] In the formula, The U-net generator loss is combined with adversarial loss and logical consistency loss to ensure that the generated defect features are both physically plausible and satisfy consistency constraints. For the expectation operator of random noise, This represents a discriminator that takes a feature map (a real image) as input and outputs the probability that the input is a "real defect feature map". This distinguishes between genuine defect features and defect features fabricated by the generator. For random noise The corresponding defect feature map, It is random noise. To counteract the loss weights (to prevent GAN dominance from causing the probability continuity of the diffusion model to fail), , For Markov discriminator loss, This is a feature map of "pseudo-real defects" (negative examples in unsupervised scenarios). This represents the expectation operator for the "pseudo-realistic defect" feature map, calculating the mean of a function over the noise space. During model training, the generator... With discriminator Using an alternating optimization approach, minimize the corresponding loss function for each step: .
[0038] The glass bottle defect recognition model uses 1000 images of qualified edible oil glass bottles from different batches (covering different lighting conditions and scenarios with slight liquid sloshing) as normal samples for unsupervised learning during the training phase. After data augmentation processing such as rotation, brightness adjustment, and liquid sloshing simulation, anomalous samples (simulating defect features such as crack length ≥ 0.5 mm, bubble diameter ≥ 0.1 mm, and stone size ≥ 0.05 mm) are first generated using a diffusion model. Then, normal samples and generated anomalous samples are input into the discriminator of a GAN for adversarial training. Simultaneously, the model parameters are optimized through triple consistency constraints. After 1000 training iterations, the total loss value converges to 0.04, and the validation set accuracy reaches 0.985. Furthermore, the loss function is constrained by logistic constraints. The regularization effect ensures that the false rejection rate due to bubble interference is less than 3% in complex environments containing liquids, effectively solving the problems of high false detection rate and low recall rate of traditional algorithms and empty bottle detection technology in high-disturbance scenarios.
[0039] Bottle-level comprehensive judgment: Calculate the consistency coefficient of defect areas from various perspectives. When the consistency coefficient is ≥0.7, it is judged as a true defect, eliminating the need for manual threshold setting. Simultaneously, the defect location, size, and type information are recorded. The interactive system displays a defect heatmap in real time, such as... Figure 6 As shown, the system allows operators to perform one-click recalibration when changing production batches. It supports automatic annotation of difficult samples: for ambiguous samples with a consistency coefficient between 0.6 and 0.7, the system automatically saves the original raw image and uploads it to the backend. The model is fine-tuned through offline active learning, and then the updated logical constraint parameters are asynchronously pushed to the edge computing unit via OTA, achieving continuous self-evolution of detection accuracy.
[0040] The multi-view dynamic weighted fusion layer employs a weighted average strategy. Using the defect probability map of the upper half-ring's middle view image as a baseline, the probability maps of the other five views are weighted and fused with a weight of 0.1. After fusion, the area and mean grayscale value of the defect region are calculated. When the defect area exceeds a set value and the mean grayscale value deviates from the normal range, the validity of the defect is further confirmed. The output is the fused defect probability map, expressed as:
[0041] In the formula, This is the defect probability map after fusion. This is a baseline probability diagram. For the first A non-benchmark view probability map This is the weighting balance coefficient. =0.5 (optimized experimentally to balance the weights of the baseline viewpoint and other viewpoints); after fusion, the area and mean grayscale of the defect region are calculated. When the defect area is greater than 0.0025mm² and | μ (defect) μ (norm) | ≥15% μ (norm) μ When the grayscale average is used, the validity of the defect is further confirmed.
[0042] S3: The judgment result is transmitted to the sorting mechanism. If it is a defective bottle, the sorting mechanism starts the robotic arm when the glass bottle reaches the designated position and sends it to the waste collection area. If it is a qualified bottle, the rejection mechanism 8 does not work and the bottle is output normally with the conveyor belt, completing one inspection process.
[0043] The rejection mechanism 8 employs a tracking-prediction-grabbing control strategy. It receives pulse signals from the position encoder via hardwired connection, calculates the precise time window for defective bottles to arrive at the rejection station in real time, and maintains synchronization between the robotic arm's end effector and the conveyor belt speed at the moment of grasping, achieving flexible rejection and sorting with zero relative speed to prevent glass bottles from tipping over or breaking. The device provided by this invention strictly locks the spatiotemporal coordinates of each glass bottle based on the displacement pulses fed back by the photoelectric trigger sensor 6, ensuring a one-to-one correspondence between the detection and judgment results and the physical entity's position, effectively avoiding production line stacking collisions caused by missed workpieces or sorting misalignments.
[0044] In this embodiment, after the glass bottles determined to be defective are sorted out by the robotic arm, a defect thermal map and specific energy spectrum stability indicators are displayed simultaneously. , it will also display the specific defect conditions. To avoid misdetection and facilitate manual review and control of the limit values, if a glass bottle that can be considered qualified is detected and determined to be a defective product, the determination threshold can be modified according to the operation manual to reduce the determination value and requirements for determining defects. After the sorting is executed, data transmission back and model self-optimization steps are added. The images determined to be defective products and their associated feature masks will be automatically stored in the local historical database. When an edge case occurs or the threshold is modified after manual review, the system will mark the sample as a difficult sample and regularly trigger the model fine-tuning mechanism. The generated pseudo-real defects and difficult samples will be jointly input into the discriminator for incremental training, so that the model can continuously maintain a detection accuracy of over 0.9 in different production environments. As shown in Table 1 and Figure 7 as shown, the test accuracy of this glass bottle defect recognition model for multiple batches of samples has reached 98.5%, and the loss rate is only 0.035. Experiments have proved that the recognition rate of the glass bottles filled with liquid by the present invention is significantly better than the traditional algorithm, effectively preventing excessive misdetection in production.
[0045] Table 1
[0046] In summary, the present invention solves the limitations of glass bottle defect recognition technology, is not limited to the local detection of empty bottles, but is more suitable for the technologies and devices required in actual production lines, forming a highly automated glass bottle defect recognition device and method with a double-ring track sampling. It only needs the conveyor belt to pass through the detection area to achieve automatic defect recognition, and sort and remove it in the exit area, improving the intelligence and detection efficiency of the production line, reducing the labor cost and the subsequent costs of misdetection and missed detection, and effectively ensuring the detection accuracy.
Claims
1. A glass bottle flaw recognition method based on double-ring type orbit sampling, characterized in that, include: Acquire multi-view images of the glass bottle to be tested; The multi-view images of the glass bottle to be tested are input into a pre-trained glass bottle defect recognition model to obtain the glass bottle defect recognition results; the glass bottle defect recognition results include qualified and defective; The glass bottle defect recognition model includes, in sequence: an input layer, a normalization layer, a front-end convolutional layer, a batch normalization layer, a ReLU activation function layer, a max pooling layer, a VAE encoder, a U-net generator, a Markov discriminator, a logically constrained neural network module, a multi-view dynamic weighted fusion layer, and an output layer. The output of the U-net generator is also connected to the VAE decoder, and the output of the VAE decoder serves as another input to the logically constrained neural network module.
2. The method of claim 1, wherein, The logically constrained neural network module applies physical guidance through a logical consistency loss function, which includes the following constraints: The expression for the cross-perspective composite spatial geometric consistency constraint is as follows: In the formula, represents the cross-view composite space geometric consistency constraint, is the first is the coordinate feature of the defect candidate point identified by the model in the latent space under the i-th sampling view, is the displacement amount of the conveyor belt between adjacent sampling points, is the rotation angle of the industrial camera, represents the Euclidean norm, is a composite space transformation mapping operator; Logical consistency constraints are expressed as follows: In the formula, For logical consistency loss, To adjust the weighting coefficient for time consistency, For time consistency loss, To adjust the weighting coefficients for multi-view geometric consistency, For multi-view geometric consistency loss, To adjust the weighting coefficients for semantic structural integrity, To adjust the weighting coefficients for motion perception consistency, This represents a loss of consistency in motion perception. express The image of the glass bottle corresponding to each moment. express The image of the glass bottle corresponding to each moment. - This represents the displacement vector of the same defect point between two adjacent frames; express Time of the first The glass bottle image corresponding to each sampling perspective; express Time of the first The glass bottle image corresponding to each sampling perspective; - This represents the displacement vector of the same defect point between two adjacent frames. This represents the predicted displacement vector obtained from the conveyor belt displacement and the rotation angle of the industrial camera. Denotes the Euclidean norm; The stability constraint of the apparent energy spectrum across perspectives is expressed as follows: In the formula, To represent the variance of the energy spectrum, The apparent energy spectrum intensity is defined by the product of the average pixel gray center of the suspected region and the topological area of that region; It is the arithmetic mean of the energy spectrum intensity under 6 discrete sampling perspectives; For the first Images of glass bottles captured from various perspectives; Semantic structure consistency constraints are expressed as follows: In the formula, For semantic structure consistency constraints, The semantic structure integrity coefficient. For the first At each time step, the confidence level of the glass bottle defect recognition model in predicting the semantic category of the current glass bottle defect area is calculated.
3. The method according to claim 2, characterized in that, The total loss function for training the glass bottle defect recognition model is: In the formula, For the total loss function, Geometric weights To stabilize the weights, For balance coefficient, For the joint expectation operator, it represents the expectation of... Find the distribution and its expected value. This represents the latent space features of a glass bottle image across different viewpoints. To observe the noise, For timing sampling steps , This represents the prediction error of the glass bottle defect identification model.
4. The method according to claim 3, characterized in that, The output of the multi-view dynamic weighted fusion layer is the fused defect probability map, and its expression is: In the formula, This is the defect probability map after fusion. This is a baseline probability diagram. For the first A non-benchmark view probability map This is the weighting balance coefficient. 0.
5.
5. The method according to claim 4, characterized in that, The loss functions for the Markov discriminator and the U-net generator are as follows: In the formula, For the U-net generator loss, For the expectation operator of random noise, Indicates the discriminator, For random noise The corresponding defect feature map, It is random noise. To counteract the loss of weight, 0.3, For Markov discriminator loss, This is a pseudo-real defect feature map. This represents the expectation operator for pseudo-realistic defect feature maps.
6. An apparatus for implementing the glass bottle defect identification method based on double-ring track sampling as described in any one of claims 1 to 5, characterized in that, include: A horizontal conveyor belt is used to transport glass bottles to be tested; Imaging module, used to acquire multi-view images of the glass bottle under test; The edge computing unit is used to input the multi-view images of the glass bottle to be tested into the pre-trained glass bottle defect recognition model to obtain the glass bottle defect recognition result.
7. The apparatus according to claim 6, characterized in that, The horizontal conveyor belt is an open conveyor belt, and a rejection mechanism is set at its opening. When the glass bottle defect identification result is a defect, the rejection mechanism rejects the glass bottle being tested.
8. The apparatus according to claim 7, characterized in that, The imaging module includes a semi-circular track, in which a precision slide rail is embedded. A servo-driven slide block is slidably connected to the slide rail, and a fixed bracket is provided on the slide block. A semi-circular base is provided below the semi-circular track, and a semi-circular light source is provided in the inner circle of the semi-circular base. The device includes two imaging modules, which are symmetrically fixed on both sides of a horizontal conveyor belt.
9. The apparatus according to claim 8, characterized in that, A photoelectric trigger sensor is installed at the connection between the imaging module and the horizontal conveyor belt.
Citation Information
Patent Citations
Glass flaw recognition method, system and equipment based on image enhancement and medium
CN121258911A
Glass bottle bottom defect detection method and device
CN121582218A
Glass bottle defect detection method
CN121860916A