A packaging bag sealing defect online detection method and system based on machine vision and deep learning
Patent Information
- Application Number
- CN202610995194.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]由于柔性包装膜容易受材料厚度、印刷层、初始张力、内容物振动及输送姿态影响,部分正常区域也会形成明显响应差异,而夹料、弱结合及微通道等缺陷在残余应力作用下又可能处于暂时闭合状态,使静态外观与实际密封能力之间不存在稳定对应关系;另一方面,在封口两侧分别实施检测时,包装袋在不同检测时刻可能发生位移、形变及边界状态变化,导致双向检测结果难以直接比较;采用多路同步激励时,又容易产生设备非线性、传播串扰及响应混合,使缺陷响应与检测系统自身背景相互叠加
[0043](1)本发明通过封口内、外边界的正交编码同步激励、闭合与开启偏置调制、交叉编码响应提取及深度学习判别,使封口界面的隐藏开闭行为能够在同一检测周期内被激活并识别,从而同时实现对设备背景干扰的分离以及对贯通风险路径的判断。相较于仅依据静态外观、单向响应或绝对幅值进行检测的现有技术,本发明能够获得与界面状态和空间连通关系相关的检测结果,进一步提高柔性包装袋封口在线检测的可靠性和适应性。
Smart Images

Figure CN122966535A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online packaging quality inspection and machine vision intelligent analysis technology, and in particular to an online detection method and system for packaging bag sealing defects based on machine vision and deep learning. Background Technology
[0002] Current packaging bag sealing inspection typically uses information such as visible light images, thermal images, pressure changes, and ultrasonic responses to determine sealing quality. Among these, machine vision methods often rely on the texture, wrinkles, foreign objects, and edge continuity of the sealing surface for identification.
[0003] Because flexible packaging films are easily affected by material thickness, printing layers, initial tension, vibration of contents, and conveying posture, even normal areas can exhibit significant response differences. Furthermore, defects such as material trapping, weak bonding, and microchannels may be temporarily closed under residual stress, resulting in no stable correlation between static appearance and actual sealing capability. On the other hand, when testing is performed on both sides of the seal, the packaging bag may experience displacement, deformation, and boundary state changes at different testing times, making direct comparison of bidirectional testing results difficult. Using multi-channel synchronous excitation can easily lead to equipment nonlinearity, propagation crosstalk, and response mixing, causing defect responses to overlap with the background of the detection system itself. Existing technologies typically improve detection performance by increasing imaging resolution, adding more sensors, optimizing filtering algorithms, and training complex recognition models. However, they still primarily rely on response amplitude or appearance differences, making it difficult to confirm whether abnormal responses are caused by the opening and closing of the sealing interface under stress, and also difficult to determine whether local anomalies constitute a potential through-path extending from the bag cavity side to the outside.
[0004] Therefore, how to controllably stimulate the hidden opening and closing behavior of the sealing interface under continuous conveying conditions, and identify its spatial expansion relationship based on excluding equipment background and material differences, remains a technical problem that needs to be solved in online inspection of packaging bag sealing. Summary of the Invention
[0005] This invention overcomes the shortcomings of the prior art and provides an online detection method and system for packaging bag sealing defects based on machine vision and deep learning.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: an online detection method and system for sealing defects in packaging bags based on machine vision and deep learning, comprising the following steps:
[0007] Acquire an image of the sealing area of a packaging bag moving along the conveying path, and determine the inner boundary of the sealing area near the bag cavity, the outer boundary of the bag away from the bag cavity, and the coordinate system of the sealing material based on the sealing area image;
[0008] The sealing area is controlled to be in a closed bias state and an open bias state respectively. In each bias state, a first orthogonal encoding excitation and a second encoding excitation are applied simultaneously from the inner boundary of the bag and the outer boundary of the bag, and the dynamic response image of the sealing area is acquired.
[0009] The dynamic response image is demodulated based on the first coding stimulus and the second coding stimulus to obtain a first linear response field, a second linear response field and a cross-coded response field;
[0010] In each bias state, the application boundaries of the first coded excitation and the second coded excitation are swapped, and the coded polarity of the first coded excitation is flipped. Based on the consistent relationship between the cross-coded response fields before and after the swap in the coordinate system of the sealing material, the interface-bound hybrid response field corresponding to the sealing interface is obtained.
[0011] Based on the difference between the interface-bound hybrid response field in the closed bias state and the open bias state, a deep learning model is used to determine the interface opening and closing activation region, and based on the continuity relationship between the interface opening and closing activation region between the inner boundary and the outer boundary of the bag, a sealing defect detection result is generated.
[0012] In a preferred embodiment of the present invention, both the first coded excitation and the second coded excitation are air-coupled ultrasonic excitations. The first coded excitation and the second coded excitation use different coded sequences to modulate the same carrier frequency signal. The normalized cross-correlation value of the two coded sequences within a preset detection time window is not greater than a preset correlation threshold.
[0013] In a preferred embodiment of the present invention, the closed bias state and the open bias state are formed by a first bias modulator and a second bias modulator respectively acting on the first side film and the second side film of the packaging bag;
[0014] In the closed bias state, the first bias modulator and the second bias modulator drive the first side film and the second side film to tend to adhere;
[0015] In the biased state, the first bias modulator and the second bias modulator drive the first side film and the second side film to tend to separate.
[0016] In a preferred embodiment of the present invention, the first bias modulator applies a first force to the first side membrane, and the second bias modulator applies a second force to the second side membrane;
[0017] When switching between the closed bias state and the open bias state, the change in the sum of the first force and the second force is not greater than a preset support threshold, and the direction of the difference between the first force and the second force changes.
[0018] In a preferred embodiment of the present invention, the sealing material coordinate system takes the direction between the inner boundary of the bag and the outer boundary of the bag as the sealing width direction, and the extension direction of the sealing area as the sealing length direction.
[0019] Based on the sealing embossing features and film surface texture features, material coordinate registration is performed on the dynamic response images under different offset states and before and after code exchange. The signed displacement response field and vibration phase response field of the sealing area are then calculated based on the registered dynamic response images.
[0020] In a preferred embodiment of the present invention, the step of obtaining the cross-coded response field includes:
[0021] Based on the first coding sequence corresponding to the first coding stimulus and the second coding sequence corresponding to the second coding stimulus, a first matching demodulation sequence, a second matching demodulation sequence, and a cross-demodulation sequence are constructed respectively.
[0022] The first linear response field and the second linear response field are extracted from the dynamic response image using the first matched demodulation sequence and the second matched demodulation sequence.
[0023] Reconstruct a linear superimposed response field based on the first linear response field and the second linear response field, and subtract the linear superimposed response field from the measured response field corresponding to the dynamic response image to obtain the response residual field;
[0024] The response residual field is demodulated using the cross-demodulation sequence to obtain the cross-coded response field.
[0025] In a preferred embodiment of the present invention, a bypass reference response that does not pass through the sealed region is acquired synchronously, and the amplitude normalization and phase correction of the cross-coded response fields before and after the coding exchange are performed based on the bypass reference response.
[0026] The cross-coding response that changes with encoding allocation and encoding polarity is determined as the excitation background response, and the cross-coding response that remains at the same sealing material coordinate position before and after encoding exchange and is enhanced in the open bias state is determined as the interface-bound hybrid response field.
[0027] In a preferred embodiment of the present invention, the enabled bias state includes at least three enabled bias levels with the bias degree increasing sequentially.
[0028] The deep learning model includes a response feature encoding module, a bias sequence fusion module, and a channel topology discrimination module. The response feature encoding module is used to extract interface binding hybrid response features under each opening bias level. The bias sequence fusion module is used to determine the activation front formed by the interface opening and closing activation region as the opening bias level increases. The channel topology discrimination module is used to determine local weak bonding regions, non-penetrating delamination regions, and permeable risk regions based on the connection relationship between the activation front and the inner boundary and outer boundary of the bag.
[0029] An online detection system for packaging bag sealing defects based on machine vision and deep learning includes:
[0030] Conveying module, used to convey packaging bags along the conveying path;
[0031] The visual positioning module is used to acquire an image of the sealing area of the packaging bag and determine the inner boundary, outer boundary, and sealing material coordinate system of the bag based on the sealing area image.
[0032] The bias modulation module is used to control the sealing area to be in a closed bias state and an open bias state, respectively;
[0033] The first excitation module and the second excitation module are respectively disposed on the inner boundary of the bag and the outer boundary of the bag, and are used to simultaneously apply the first coding excitation and the second coding excitation that are orthogonal to each other.
[0034] The dynamic visual acquisition module is used to acquire dynamic response images of the sealing area under various bias states;
[0035] The encoding control module is used to exchange the application boundaries of the first encoding stimulus and the second encoding stimulus, and to flip the encoding polarity of the first encoding stimulus;
[0036] The response processing module is used to demodulate the dynamic response image to obtain a first linear response field, a second linear response field, and a cross-coded response field, and to obtain an interface-bound hybrid response field based on the cross-coded response fields before and after the encoding exchange.
[0037] The deep learning discrimination module is used to determine the interface opening and closing activation region based on the difference of the interface-bound hybrid response field under different bias states, and to generate sealing defect detection results based on the continuity relationship between the interface opening and closing activation region and the inner boundary and outer boundary of the bag.
[0038] In a preferred embodiment of the present invention, the bias modulation module includes a first air film modulator and a second air film modulator respectively disposed on the outer sides of the first side film and the second side film of the packaging bag;
[0039] Both the first excitation module and the second excitation module include an air-coupled ultrasonic excitation array;
[0040] The dynamic visual acquisition module includes a synchronous stroboscopic light source and a high-speed camera. The high-speed camera is used to acquire dynamic image sequences of the sealing area. The response processing module is used to calculate the signed displacement response field and the vibration phase response field based on the dynamic image sequence.
[0041] The online detection system also includes a bypass reference channel, which is used to obtain a bypass reference response that does not pass through the sealed area.
[0042] This invention addresses the shortcomings of the prior art and has the following beneficial effects:
[0043] (1) This invention enables the hidden opening and closing behavior of the sealing interface to be activated and identified within the same detection cycle through orthogonal coding synchronous excitation of the inner and outer boundaries of the seal, closing and opening bias modulation, cross-coding response extraction, and deep learning discrimination. This allows for the simultaneous separation of background interference from the equipment and the judgment of the through-risk path. Compared with existing technologies that rely solely on static appearance, unidirectional response, or absolute amplitude for detection, this invention can obtain detection results related to the interface state and spatial connectivity, further improving the reliability and adaptability of online detection of flexible packaging bag sealing.
[0044] (2) This invention acquires cross-coded responses when the sealing area is in a closed bias state and an open bias state, respectively. Through code exchange, polarity reversal, and bypass reference correction, it extracts the interface-bound hybrid response that remains at the same sealing material coordinate position and changes with the interface bias, thereby reducing the background influence of the excitation source, driving circuit, propagation medium, and packaging bag movement. Compared with the prior art that directly uses harmonics, phase difference, or image grayscale anomalies to judge defects, this invention can more accurately locate the real anomalies caused by the opening and closing of the sealing interface, further reducing false detections caused by material differences and equipment nonlinearity.
[0045] (3) This invention sets multiple opening bias levels with progressively increasing bias, and uses a deep learning model to track the activation front formed by the interface opening and closing activation region as the bias increases. Based on the connection relationship between the activation front and the inner and outer boundaries of the bag, it determines the areas of local weak bonding, non-penetrating delamination, and permeable risk regions. Compared with the prior art that only determines the existence of local anomalies, this invention can further characterize the expansion trend and connectivity of defects under stress, thereby improving the ability to identify temporarily closed microchannels and potential leakage paths.
[0046] (4) This invention coordinates the inter-code mixing generated by orthogonal coding synchronous excitation, the interface opening and closing response under bias state, the material coordinate registration, and the channel topology discrimination, transforming the nonlinear crosstalk that originally affected the separation of multi-source signals into effective characterization information of sealing defects, and using deep learning to complete the correlation analysis between multi-level responses. Compared with the existing technology that simply superimposes sensor results or classifies them using a single model, the various technical means in this invention form a closed-loop data chain that depends on each other, further taking into account detection speed, defect location, and penetration risk judgment. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart of a preferred embodiment of the present invention;
[0049] Figure 2 This is a system structure diagram of a preferred embodiment of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein. Therefore, the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0052] This invention is applicable to continuous flexible packaging production lines, particularly to food bags, daily chemical product bags, medical consumable bags, and industrial material bags formed by heat sealing of a first side film and a second side film to create a transverse seal. The packaging bag can be empty or filled with liquids, powders, granules, or gaseous fillers. Preferably, the packaging bag is made of polyethylene composite film, polypropylene composite film, polyester composite film, or multilayer film with a barrier layer, with an effective sealing width of 3mm to 25mm. The packaging bag moves continuously along the conveyor path. This invention applies controlled bias and dual-boundary orthogonal coding excitation to the sealing interface without stopping the production line, causing a measurable nonlinear hybrid response to be generated at the temporarily closed weakly bonded interface. Then, machine vision, material coordinate registration, and deep learning are used to identify the spatial expansion relationship of the response.
[0053] Among them, the inner boundary of the bag refers to the side boundary of the sealing area close to the bag cavity, and the outer boundary of the bag refers to the side boundary of the sealing area away from the bag cavity and close to the free edge of the seal; the sealing interface refers to the interlayer region formed by the first side film and the second side film under the heat sealing action; the interface opening and closing refers to the periodic adhesion, separation, micro-slippage and collision behavior of the weakly bonded area under the action of external bias and dynamic excitation; the interface binding hybrid response refers to the nonlinear response that remains in the same sealing material position after the coding allocation changes and is enhanced by the interface opening bias.
[0054] Example 1:
[0055] This embodiment takes composite film packaging bags on a high-speed horizontal sealing packaging line as the application object; after the packaging bag is sealed by the heat sealing mechanism, it enters the inspection station. The inspection station is equipped with a visual positioning unit, an offset modulation unit, a dual boundary coding excitation unit, a dynamic visual acquisition unit, a bypass reference unit, and a processing unit; the inspection station can be fixedly set on both sides of the conveying path, or it can be set as a follow-up inspection chamber that moves synchronously with the packaging bag within the inspection time window.
[0056] like Figure 1 As shown in the figure, the online detection method for packaging bag sealing defects based on machine vision and deep learning provided in this embodiment includes the following steps:
[0057] S1. Obtain an image of the sealing area of the packaging bag moving along the conveying path, and determine the inner boundary of the sealing area near the bag cavity, the outer boundary of the bag away from the bag cavity, and the coordinate system of the sealing material based on the sealing area image.
[0058] S2. Control the sealing area to be in a closed bias state and an open bias state respectively. In each bias state, apply a first orthogonal encoding excitation and a second encoding excitation from the inner boundary of the bag and the outer boundary of the bag at the same time, and obtain the dynamic response image of the sealing area.
[0059] S3. Demodulate the dynamic response image based on the first coding stimulus and the second coding stimulus to obtain a first linear response field, a second linear response field and a cross-coded response field.
[0060] S4. In each bias state, the application boundaries of the first coded excitation and the second coded excitation are swapped, and the coded polarity of the first coded excitation is flipped. Based on the consistent relationship between the cross-coded response fields before and after the swap in the coordinate system of the sealing material, the interface-bound hybrid response field corresponding to the sealing interface is obtained.
[0061] S5. Based on the difference between the interface-bound hybrid response field in the closed bias state and the open bias state, a deep learning model is used to determine the interface opening and closing activation region, and based on the continuity relationship between the interface opening and closing activation region between the inner boundary of the bag and the outer boundary of the bag, a sealing defect detection result is generated.
[0062] Specifically, within the same detection cycle, the first encoding stimulus and the second encoding stimulus are input from both sides of the sealing width direction, respectively.
[0063] For a sealed region that is fully bonded and exhibits an approximately linear response within the excitation range, the responses corresponding to the two excitations can be demodulated separately. For sealed regions with material clamping, weak bonding, or microchannels, the sealing interface undergoes periodic bonding, separation, micro-slippage, or collision under the open bias state, resulting in product terms, intermodulation terms, and response residuals that cannot be explained by the linear superposition response in the dynamic response. The processing unit distinguishes the sources of the response residuals based on the consistency of material coordinates before and after code exchange, the relationship between code polarity changes, and the bypass reference response, and uses the mixed response corresponding to the material position of the sealing interface as a characterization of sealing defects.
[0064] Furthermore, the processing unit compares the responses in the closed bias state with those in the open bias state, and combines the code allocation interchange, code polarity reversal, and the expansion relationship of the interface opening and closing activation area from the inner boundary of the bag to the outer boundary of the bag to distinguish the background response and sealing interface response caused by packaging film geometric nonlinearity, packaging film viscoelasticity, content movement, conveying vibration, airflow disturbance, excitation source nonlinearity, drive circuit distortion, or air propagation path, and distinguishes non-penetrating delamination and microchannels with the risk of penetration based on the expansion relationship.
[0065] The present invention faces the following interrelated technical difficulties when implementing the above-mentioned core methods: During continuous conveying, the packaging bag undergoes translation, swaying, and local expansion and contraction, resulting in the inability to directly compare pixel positions under different bias states and different coding assignments; the flexible film, contents, airflow, transducer, and driving circuit may all generate nonlinear mixed responses, which are easily confused with the opening and closing responses of the sealing interface; microchannels and weakly bonded areas may temporarily close under residual stress, and if the bias is too small, the defects cannot be activated, while if the bias is too large, the qualified seal may be damaged; at the same time, the detection time is limited by the production cycle, so it is necessary to establish a sequentially dependent execution relationship between unified material coordinates, controlled bias, complementary coding detection, and bypass reference correction.
[0066] Example 2:
[0067] In step S1, the visual positioning unit acquires images of the packaging bag and its sealing area moving along the conveying path, determines the inner boundary of the bag near the bag cavity, the outer boundary of the bag near the free edge of the seal, and the position reference along the length of the seal, so that the dynamic response obtained under different offset states and different coding assignments can be mapped to the same packaging film material position.
[0068] The sealing area image refers to a static positioning image acquired before the start of dynamic excitation, and may also include a reference image acquired by the dynamic vision acquisition unit under low excitation conditions; the sealing material coordinate system is a two-dimensional coordinate system that moves with the packaging bag, preferably a normalized coordinate system along the sealing extension direction. The seal length position is indicated by normalized coordinates pointing from the inner boundary of the bag to the outer boundary of the bag. Indicates the width of the seal. Corresponding to the inner boundary of the bag, Corresponds to the outer boundary of the bag.
[0069] Specifically, during the transport process, the packaging bag moves and swings relative to the fixed camera. The visual positioning unit determines the moment when the packaging bag arrives at the detection area based on the transport encoder signal or visual trigger mark, and uses short exposure illumination to acquire images of the sealing area to reduce motion blur. The images of the sealing area are used to determine the geometric boundaries, film texture and material anchor points of the sealing area.
[0070] S101. Read the encoder pulse, photoelectric trigger signal and packaging specification information of the conveying mechanism, and determine the entry of the packaging bag into the visual positioning area according to the pre-calibrated trigger position.
[0071] S102. Start the area array camera and pulse light source, acquire at least one frame of the sealed area image, and perform distortion correction, brightness equalization and motion blur evaluation on the image.
[0072] S103. When the motion blur evaluation value exceeds the set threshold, shorten the exposure time, increase the pulse illumination intensity, or delay the dynamic detection to obtain an image of the sealed area that meets the boundary recognition requirements.
[0073] Preferably, the positioning camera is a 2-megapixel to 12-megapixel area array camera with an exposure time of 2μs to 1000μs. The positioning field of view covers at least 30mm in the length direction of the seal and at least 1.5 times the effective seal width in the width direction. The equivalent resolution of the seal edge in the image is preferably not less than 5 pixels per millimeter. Motion blur is evaluated by the edge extension width, Laplacian variance, or the width of the adjacent texture correlation peak, wherein the edge extension width is preferably not greater than 5% of the effective seal width.
[0074] Furthermore, the heat-sealing embossing, film-printed texture, and sealing outline move together with the packaging bag. The processing unit extracts material anchor points from the heat-sealing embossing, film-printed texture, and sealing outline, and establishes a sealing material coordinate system that moves together with the packaging bag based on the material anchor points, so as to reduce the influence of the overall displacement, swaying, and local expansion and contraction of the packaging bag on the response position comparison in different detection cycles.
[0075] S104. Obtain candidate regions for sealing by using a sealing region segmentation network or an edge detection method based on gray-level gradient and geometric constraints.
[0076] S105. In the sealing candidate area, identify the continuous edges close to the bag cavity as the inner boundary of the bag, identify the continuous edges far from the bag cavity as the outer boundary of the bag, and determine the sealing width direction based on the local normal of the two boundaries.
[0077] S106. Calculate the sealing centerline along the inner and outer boundaries of the bag, establish the sealing length coordinates based on the arc length of the centerline, and normalize the position between the two boundaries according to the local width to establish the sealing material coordinate system.
[0078] S107. Extract the intersection of the sealing embossing, the corner points of the printing texture, and the speckle features of the film surface as material anchor points, and save the coordinates and description vectors of the material anchor points in the sealing material coordinate system.
[0079] Preferably, the sealing width is 3mm to 25mm, and the sealing material coordinate grid has 128 to 1024 sampling points in the length direction and 32 to 256 sampling points in the width direction; local spacing outliers of the inner and outer boundaries of the bag are removed by median filtering, and the filtering window is preferably 0.5% to 5% of the sealing length; when there are fewer than 20 available material anchor points, the average registration confidence is less than 0.6, or the continuous gaps at the boundary exceed 15% of the sealing length, the current packaging bag is marked as having insufficient location confidence, and the sealing area image is re-acquired.
[0080] Based on the above processing, the responses under different bias states and different encoding assignments are all mapped to the same sealing material position, thereby reducing the pixel position changes caused by high-speed movement, local bending and bias modulation of the packaging bag, and providing a unified position reference for determining whether the interface opening and closing activation area is connected to the inner boundary and outer boundary of the bag.
[0081] Through the processing of step S1 above, the sealing boundary, material anchor point and sealing material coordinate system are uniformly established. The dynamic images before and after the encoding exchange under different offset states can be mapped to the same packaging film material position, thereby solving the problems of pixel drift, local deformation and boundary mismatch caused by continuous transportation, and providing a stable spatial reference for subsequent judgment of whether the abnormal area extends continuously from the inner boundary of the bag to the outer boundary of the bag.
[0082] Specifically, step S2 includes: controlling the first side film and the second side film to tend to adhere, forming a closed bias state and acquiring the corresponding dynamic response image; while keeping the average support conditions of the sealing area within a preset range, controlling the first side film and the second side film to generate a bias trend that moves away from each other, forming an open bias state and acquiring the corresponding dynamic response image; in each bias state, applying a first coded excitation and a second coded excitation that can be distinguished from each other from the inner boundary and the outer boundary of the bag respectively, and acquiring the dynamic response of the sealing film surface through synchronous stroboscopic vision.
[0083] The closed bias state is formed by applying a force to the first and second side films to make the two side films tend to adhere; the open bias state is formed by applying opposing relative forces to the first and second side films, wherein the relative forces are less than the forces that cause permanent deformation or tearing of the qualified seal; the average support conditions include the resultant force and equivalent support stiffness provided by the first and second bias modulators to the entire packaging bag.
[0084] To make the dynamic response in the closed bias state and the open bias state comparable, the first bias modulator and the second bias modulator adjust the forces acting on the first side membrane and the second side membrane respectively, so that the sum of the forces on both sides is kept within a preset range, and the closed bias state or the open bias state is formed by changing the direction of the difference between the forces on both sides, thereby changing the relative bias of the sealing interface under the condition that the average support conditions are basically the same.
[0085] S108. Control the first and second air film modulators to approach the sides of the packaging bag and establish an air film support that does not rigidly collide with the film surface.
[0086] S109. Adjust the first and second forces according to the feedback from the pressure and displacement sensors on both sides to make the membranes on both sides tend to stick together and form a closed bias state.
[0087] S110. Keep the change in the sum of the first force and the second force from exceeding the preset support threshold, change the direction of the difference between the two forces, and make the membranes on both sides tend to separate, forming an open bias state.
[0088] S111. Set at least three incremental levels for the bias state and perform an unloading test after each level to determine whether the membrane surface has returned to the reference position.
[0089] Preferably, the working gap between the air film modulator and the film surface is 0.1 mm to 5 mm, and the single-sided gauge pressure is 0.05 kPa to 5 kPa; the change in the sum of the forces on both sides between the closed bias state and the open bias state is preferably no more than 10% of the average support force, and more preferably no more than 5%; the open bias state is set to 3 to 8 levels, and the increase in the relative force difference between adjacent levels is 5% to 50%; the force corresponding to the maximum open bias is lower than 20% of the minimum peel load of the corresponding bag type qualified seal, preferably lower than 10%; the minimum peel load is obtained by offline peel test of qualified samples in the same batch.
[0090] Furthermore, the first and second coded excitations use the same or similar carrier frequencies and frequency bands, and are respectively subjected to amplitude modulation or phase modulation using low cross-correlation coded sequences; combined with the complete sealing region, which approximately satisfies linear superposition within the preset excitation amplitude range, the responses corresponding to the first and second coded excitations can be demodulated respectively; when the weak bonding interface undergoes periodic opening and closing, a mixed component corresponding to the product relationship of the two codes is generated in the dynamic response, forming a cross-coded response.
[0091] S112. Select the air-coupled ultrasonic carrier frequency and coding length according to the packaging film material, sealing width and pre-scan response, and generate the first coding sequence and the second coding sequence.
[0092] S113. The first coding sequence and the second coding sequence are loaded onto the inner bag excitation array and the outer bag excitation array, respectively, so that the two coding excitations work synchronously within the same detection time window.
[0093] S114. Simultaneously record the driving voltage, output monitoring signal, and bypass reference channel response of the two excitation arrays as the basis for subsequent amplitude normalization and phase correction.
[0094] Preferably, the air-coupled ultrasonic carrier frequency is 20kHz to 300kHz, the coding length is 16 to 512 chips, and each chip lasts for 1 to 50 carrier frequency cycles; the normalized cross-correlation absolute value between the first coding sequence and the second coding sequence is preferably no greater than 0.15, and more preferably no greater than 0.05; the start time difference between the two excitations is preferably no greater than 10% of the duration of one chip; and the single coding detection time window is preferably 2ms to 100ms.
[0095] Specifically, when the vibration frequency of the dynamic excitation is higher than the continuous sampling frame rate of the camera, the dynamic vision acquisition unit adopts phase-locked stroboscopic sampling; the synchronous stroboscopic light source emits light at multiple preset phase points of the coded carrier, and the high-speed camera acquires the dynamic images corresponding to each phase point in multiple repetitive coding cycles, and reconstructs the signed displacement and vibration phase of the sealing film surface based on the dynamic images; when the dynamic excitation adopts a low-frequency airflow pulse, the dynamic vision acquisition unit can also adopt a high-speed continuous imaging method to acquire dynamic response images.
[0096] S115. In each encoding cycle, trigger the synchronous stroboscopic light source and high-speed camera according to the preset phase to acquire dynamic images of at least four phase points.
[0097] S116. Perform non-rigid registration of dynamic images using material anchor points, and calculate the signed displacement sequence of each material coordinate position through phase correlation, digital image correlation or speckle phase demodulation.
[0098] S117. Calculate the vibration amplitude, vibration phase, and complex response of the corresponding coded chip based on the signed displacement sequence to form measured dynamic response data.
[0099] Preferably, the number of phase sampling points is 4, 8, or 16, the strobe pulse width is 0.5 μs to 50 μs, and the equivalent displacement resolution of dynamic vision is 0.01 μm to 10 μm; the average error of material coordinate registration is preferably no greater than one grid cell in the sealing width direction, and more preferably no greater than 0.3 grid cells; when the local speckle correlation coefficient is less than 0.5, the corresponding material coordinate position is set as an invalid mask, and a missing marker channel is set in the input tensor of the deep learning model.
[0100] Based on the above configuration, the encoded responses input from the inner and outer boundaries of the bag are obtained synchronously within the detection time window of the same packaging bag. Under the condition that the average support conditions are basically the same, the dynamic responses of the closed bias state and the open bias state are compared, thereby reducing the influence of changes in the position, tension and contents of the packaging bag on the response comparison.
[0101] By processing in step S2 above, the relative offset between the first and second side membranes is changed under the condition that the overall support conditions are basically the same, and a double boundary coding excitation is applied within the same detection time window. This can activate the temporarily closed weak bonding interface, avoid mistaking the change in support conditions for a sealing defect, and reduce the risk of permanent damage to qualified seals by using safe load, unloading recovery and synchronous triggering conditions.
[0102] Specifically, step S3 includes: converting the dynamic response image into a signed displacement sequence in the sealing material coordinate system, showing the change of material coordinate positions with the coded chip; matching and demodulating the signed displacement sequence using the first coded sequence and the second coded sequence to obtain the first linear response field and the second linear response field; reconstructing the linear superposition response based on the first linear response field and the second linear response field, and subtracting the linear superposition response from the measured response to obtain the response residual; and demodulating the response residual using a cross-demodulation sequence to obtain the cross-coded response field.
[0103] The first linear response field and the second linear response field represent the equivalent complex transfer response of the seal to the first coded excitation and the second coded excitation, respectively, and contain amplitude and phase information; the cross-coded response field represents the part of the measured response that corresponds to the product relationship or intermodulation relationship between the two codes; each value in the response field corresponds to a position in the coordinate system of the sealing material.
[0104] When the sealing area satisfies the linear superposition relationship within the preset excitation range, the measured response is formed by the superposition of the response corresponding to the first coded excitation and the response corresponding to the second coded excitation. When the sealing interface undergoes periodic bonding, separation, collision, or micro-slippage, a nonlinear response component determined by both excitations is generated in the measured response. The processing unit first reconstructs the linear superposition response and then uses the cross-demodulation sequence to perform correlation calculation on the response residual to reduce the impact of single-path propagation amplitude changes on the cross-coded response.
[0105] S118. Zero-mean normalization and energy normalization are performed on the first coding sequence and the second coding sequence respectively to obtain the first matched demodulation sequence and the second matched demodulation sequence.
[0106] S119. Multiply the first coding sequence and the second coding sequence chip by chip and perform zero-mean and energy normalization to obtain the cross-demodulation sequence.
[0107] S120. At each material coordinate position, the measured complex response sequence is correlated with the first matched demodulation sequence and the second matched demodulation sequence to obtain the first linear response field and the second linear response field.
[0108] S121. Reconstruct the linear superposition response based on the first linear response field, the second linear response field, and the corresponding coding sequence. Subtract the linear superposition response from the measured response to obtain the response residual.
[0109] S122. The response residual is correlated and calculated using the cross-demodulation sequence, and then corrected using the bypass reference phase to obtain the cross-coded response field.
[0110] Preferably, the first and second coded sequences are zero-mean processed before demodulation to reduce the influence of DC bias; when the energies of the two coded sequences are inconsistent, they are normalized according to the corresponding coded energies; the response residual can also retain the carrier frequency, secondary sideband and intermodulation band through bandpass filtering, and the filtering bandwidth is preferably 1% to 20% of the target frequency; the effectiveness of the cross-coded response is determined by the signal-to-noise ratio and phase stability, wherein the signal-to-noise ratio is preferably not less than 3dB, and the phase standard deviation of adjacent repeated detections is preferably not greater than 30 degrees.
[0111] Therefore, the first linear response field and the second linear response field are used to characterize the basic propagation response of the sealing area input by the inner boundary and the outer boundary of the bag, and the cross-coded response field is used to characterize the mixed response that cannot be explained by the superposition of the two linear responses, and serves as input data for subsequent differentiation between the sealing interface response and the equipment background response.
[0112] Through the processing in step S3 above, the measured dynamic response is decomposed into two-path linear response, linear superposition response, and cross-coded response that cannot be explained by linear superposition. This weakens the influence of single-path propagation attenuation, overall vibration, and DC bias on defect characterization and provides a comparable response field for subsequent determination of the source of mixed response through code exchange.
[0113] Specifically, step S4 includes: executing a first complementary detection sub-cycle and a second complementary detection sub-cycle under the same bias state; in the first complementary detection sub-cycle, applying a first coded excitation from the inner boundary of the bag and applying a second coded excitation from the outer boundary of the bag; in the second complementary detection sub-cycle, exchanging the application boundaries of the first coded excitation and the second coded excitation, and performing a coded polarity reversal on the first coded excitation; registering the cross-coded response fields obtained from the two complementary detection sub-cycles to the same sealing material coordinate system, and distinguishing the background response that changes with the excitation array or driving channel and the mixed response that remains at the sealing interface material position based on the consistency of the material coordinates, phase consistency and bypass reference response before and after the coded allocation change.
[0114] Among them, encoding polarity reversal refers to inverting the symbols of each chip in the first encoding sequence so that its total energy and frequency band remain unchanged; the excitation background response includes excitation source nonlinearity, driving circuit distortion, air propagation nonlinearity and fixed optical demodulation bias; the judgment of interface-bound hybrid response not only depends on the unchanged spatial position, but also requires that it be enhanced relative to the closed bias under the open bias and maintain phase consistency after encoding interchange correction.
[0115] When the mixed response originates from the excitation array, drive channel, or air propagation path, the correspondence between the mixed response and the excitation array, drive channel, or coding polarity changes after the application boundaries of the first and second coding excitations are swapped. When the mixed response originates from the opening and closing of the interface at the sealing material location, after completing coding polarity recovery, bypass correction, and material coordinate registration, the mixed response before and after the swap remains at the same sealing material location. The processing unit also verifies the source of the mixed response based on the response change relationship before and after the first coding excitation polarity reversal.
[0116] S123. Execute the first complementary detection sub-cycle in the closed bias state, apply the first coding excitation to the inside of the bag, and apply the second coding excitation to the outside of the bag.
[0117] S124. Keep the closed bias state unchanged, execute the second complementary detection sub-cycle, apply the second coding excitation to the inside of the bag, and apply the first coding excitation after polarity reversal to the outside of the bag.
[0118] S125. Repeat steps S123 and S124 at each level of bias activation, and simultaneously acquire bypass reference responses.
[0119] S126. Based on the bypass reference response, perform amplitude normalization, propagation delay correction and coding polarity recovery on each cross-coded response field, and then use material anchor points to perform material coordinate registration.
[0120] S127. Calculate the material coordinate consistency, phase consistency, and code exchange consistency between complementary detection sub-cycles, and determine the response that meets the preset consistency condition as the interface candidate hybrid response.
[0121] S128. Remove the background component that varies with the excitation array, driving channel and bypass reference from the interface candidate hybrid response to obtain the interface-bound hybrid response field.
[0122] Preferably, the time interval between the two complementary detection sub-cycles is 0.5ms to 100ms, and is less than 30% of the time required for the packaging bag to pass through the detection field of view; the bypass reference response is obtained by reference sensors coupled to the two excitation arrays respectively; amplitude normalization is based on the root mean square value of the driving monitoring signal, and phase correction is based on the bypass propagation delay; material coordinate consistency is evaluated by the local correlation coefficient, preferably not less than 0.7; phase consistency is evaluated by the phase difference cosine value, preferably not less than 0.5.
[0123] Furthermore, to avoid misjudgment caused by a single threshold, a background statistical model can be established based on qualified packaging bags in the same batch. For any material coordinate position, if the cross-coding response exceeds the median of qualified samples plus 3 times the median absolute deviation, and simultaneously meets the conditions of consistent position after coding exchange and enabling bias enhancement, then the position is marked as a candidate point for interface anomaly. The median and median absolute deviation are not sensitive to a small number of abnormal samples and are suitable for updating the background range online.
[0124] The processing unit changes the correspondence between the coding sequence and the excitation array and drive channel by coding exchange and coding polarity reversal, and keeps the material position corresponding to the sealing defect unchanged by material coordinate registration, thereby separating the background component that changes with the equipment channel in the cross-coded response field from the response component that remains at the material position at the sealing interface.
[0125] Through the processing in step S4 above, the correspondence between the encoded sequence and the excitation array and driving channel is actively changed, while the material position corresponding to the sealing defect remains unchanged. Combined with polarity recovery and bypass reference correction, the background component that changes with the device channel can be separated from the interface response that remains consistent at the same material position, thereby solving the problem of pseudo-anomalies caused by device nonlinearity, air propagation crosstalk and fixed optical deviation.
[0126] Specifically, step S5 includes: comparing the interface binding hybrid response of the same sealing material location under closed bias state and multiple open bias levels to determine the interface opening and closing activation region that is enhanced under open bias state and continuously expands with the change of open bias level; inputting the first linear response field, the second linear response field, the interface binding hybrid response field, the bias increment feature and the material coordinate boundary into the deep learning model to obtain the interface opening and closing activation probability field and the defect category probability; and generating detection results of local weak bonding, non-through delamination or through risk based on the connection relationship between the interface opening and closing activation region and the inner boundary and outer boundary of the bag.
[0127] Among them, the interface opening and closing activation region refers to the set of locations where the interface-bound hybrid response is significantly enhanced relative to the closed bias reference and has continuity between adjacent opening bias levels; the activation front refers to the outer boundary of the newly added part of the interface opening and closing activation region as the opening bias level increases; the penetration risk is not the same as macroscopic leakage has occurred, but refers to the interface anomaly forming a continuous or low-cost connection along the sealing width direction, which has the possibility of opening under actual extrusion, transportation and temperature changes.
[0128] Specifically, response anomalies caused by packaging material thickness, printing layers, or fixed embossing generally remain similar in both closed and open bias states; temporarily closed weakly bonded interfaces tend to adhere in the closed bias state, with a relatively weak mixed response, while in the open bias state, periodic opening and closing occurs, and the mixed response is relatively enhanced; the processing unit calculates the standardized response increment of each open bias level relative to the closed bias state to reduce the influence of material differences unrelated to the bias state on the determination of the interface opening and closing activation region.
[0129] S129. Using the interface-bound hybrid response under closed bias as a benchmark, calculate the amplitude difference, phase difference, and growth rate of the interface-bound hybrid response at each open bias level.
[0130] S130. Based on the background range of qualified samples and the response noise of the current packaging bag, generate interface activation candidate maps for each opening bias level, and track the inheritance, expansion and disappearance relationships of candidate regions between adjacent bias levels.
[0131] S131. Input the model into the tensor composed of the first linear response field, the second linear response field, the interface-bound hybrid response field, the bias incremental feature, the material coordinate boundary, and the effective pixel mask. Input the tensor into the deep learning model to obtain the interface opening and closing activation probability field and the defect category probability.
[0132] S132. Construct a connectivity graph in the sealing width direction based on the interface opening and closing activation probability field. Combine the inner boundary of the bag, the outer boundary of the bag, and the expansion direction of the activation front to generate detection results for local weak bonding, non-through delamination, and through risks. Output the results to the production line rejection unit and quality traceability unit.
[0133] Preferably, the opening bias state is set to level 3 to level 8; the interface opening and closing activation probability threshold is 0.4 to 0.8, and is determined according to the receiver operating characteristic curve of the validation set; the inner boundary and outer boundary of the bag are set as boundary bands with normalized coordinates of 0 to 0.1 and 0.9 to 1.0 in the width direction, respectively; when the same connected region simultaneously contacts two boundary bands and exists in at least two consecutive opening bias levels, it is determined to be of high penetration risk; when the abnormal region is located inside the seal and is not connected to the two boundary bands, it is determined to be of non-penetrating delamination; when the area of the abnormal region is less than the preset area threshold and no stable activation front is formed, it is determined to be of local weak bonding.
[0134] Furthermore, the test results can be divided into four levels: qualified, low-risk, re-inspection, and rejection. For qualified packaging bags, the interface binding mixed response is within the background range. For low-risk packaging bags, there are local anomalies but no cross-width connection is formed. For re-inspection packaging bags, the model confidence is low or the material coordinate registration is insufficient. For rejection packaging bags, the activated area forms a connection from the inside to the outside of the bag, or a large-scale activation occurs at a low opening bias level. By using graded output, it is possible to avoid judging all local anomalies as leakage defects.
[0135] Through steps S1 to S5, the visual positioning unit establishes a coordinate system for the sealing material, the bias modulation unit and the dual-boundary encoding excitation unit generate dynamic responses under different bias states, the response processing unit obtains the first linear response field, the second linear response field, the cross-encoded response field and the interface binding hybrid response field, and the deep learning discrimination module generates sealing defect detection results by combining the spatial connection relationship of the interface opening and closing activation areas.
[0136] Through the processing in step S5 above, the model no longer classifies based solely on a single value or a single image. Instead, it uses the topological connectivity relationship in the direction of the sealing width to output the defect type and penetration risk, thereby distinguishing between local weak bonding, non-penetrating delamination, and potential penetration channels. It also performs a re-examination on low-confidence samples instead of making a direct judgment.
[0137] Example 3:
[0138] This embodiment, based on Embodiments 1 and 2, further explains the encoding demodulation, response correction, penetration risk calculation, and deep learning model training. The detection method utilizes the nonlinear hybrid response generated by the weakly bonded sealing interface under dynamic excitation, and determines the correspondence between the nonlinear hybrid response and the opening and closing of the sealing interface through bias state changes, encoding exchange, encoding polarity reversal, and material coordinate registration.
[0139] Specifically, when the first coded excitation and the second coded excitation are simultaneously propagated to the temporarily closed sealing interface, the contact stiffness of the sealing interface changes with the instantaneous force, and the dynamic response is no longer equal to the linear superposition of the response corresponding to the first coded excitation and the response corresponding to the second coded excitation, and a mixed response component containing information of both the first coded sequence and the second coded sequence is generated; the mixed response component is used to characterize the periodic opening and closing state of the sealing interface.
[0140] To reduce the impact of nonlinear responses generated by the excitation device, drive circuit, and air propagation path on the detection results, the encoding control module performs encoding exchange and encoding polarity reversal, changing the correspondence between the excitation device and the encoding sequence. At the same time, it uses the sealing material coordinate system to keep the material position corresponding to the sealing defect unchanged. The bias modulation module changes the contact state of the weakly bonded sealing interface through closed bias state and open bias state, so that the mixed response from the sealing interface maintains a consistent position in the material coordinate system, and is enhanced in the open bias state relative to the closed bias state.
[0141] The above transforms the dual-path nonlinear hybrid response, which is usually regarded as interference, into an interface opening and closing characteristic. Then, the device channel characteristics are changed through encoding and exchange, the defect material position is kept unchanged through material coordinate registration, and the real interface response presents a traceable activation front through multi-level bias. This design links response source discrimination, defect activation, and through-topology judgment into the same data chain, avoiding the deep learning model from only memorizing material texture or device background.
[0142] The first encoded sequence is denoted as The second encoded sequence is denoted as ,in, It is the chip sequence number, and , The encoding length; the first mean of the coded sequence Calculate using the following formula:
[0143] ,
[0144] The mean-free encoded sequence is then energy-normalized to obtain the standardized encoded sequence, as shown in the following expression:
[0145] ,
[0146] in, , For the summation index, A positive number is set to prevent the normalization denominator from being zero; after the above processing, each normalized coding sequence has zero mean and approximately unit energy.
[0147] It should be noted that the stable term in the encoding normalization formula is a dimensionless positive number, preferably between 10⁻¹² and 10⁻. 6 The stable term in the response scale normalization formula has the same dimensions as the background fluctuation scale, preferably 0.01 to 0.1 times the median of the corresponding background fluctuation scale. The stable term in the probability truncation formula is a dimensionless positive number, preferably 10⁻. 6 Up to 10⁻³.
[0148] Normalized cross-correlation index of two coding sequences The formula used to evaluate the orthogonality of two codes within the allowable relative delay range is as follows:
[0149] ,
[0150] in, Indicates relative delay as The set of effective overlap indices of two encoded sequences can be specifically represented as: ; This indicates the maximum relative chip delay that can be considered. This indicates taking the absolute value; since the standardized coding sequence has already undergone energy normalization, The smaller the value, the easier it is for the two codes to be demodulated independently.
[0151] The first and second coding sequences employ low cross-correlation coding to ensure that the sealed region, which exhibits a complete and linear response, has a low cross-coding response baseline. When the sealed interface maintains a linear response, the cross-demodulation result remains in the background range. When the opening and closing of the sealed interface introduces a response component corresponding to the product relationship between the two codes, the cross-coding response increases. Preferably, No greater than 0.15, and further preferred to be no greater than 0.05.
[0152] At the coordinate position of the sealing material At this point, the signed displacement sequence obtained by dynamic vision is denoted as... First linear response Second linear response Obtained using the following formula:
[0153] ,
[0154] The linear superposition sequence reconstructed from the two linear responses is represented as follows:
[0155] ,
[0156] The response residuals between the measured dynamic response and the linearly superimposed sequence are expressed as follows:
[0157] ,
[0158] To explicitly construct the cross-demodulation sequence, the two standardized codes are first multiplied chip by chip to obtain the product sequence. And calculate the mean of the product sequence. :
[0159] ,
[0160] Perform zero-mean and energy normalization on the product sequence to obtain the cross-demodulation sequence. :
[0161] ,
[0162] The cross-coded response is obtained by performing correlation calculations on the response residuals using the cross-demodulation sequence. :
[0163] ,
[0164] In the above calculations, both the standardized coding sequence and the cross-demodulation sequence are dimensionless codes. , , , and The same displacement dimension is used; when the dynamic visual output is phase, the phase can be converted into displacement according to the calibration coefficient, or the same demodulation processing can be performed on the sine and cosine components of the phase respectively.
[0165] Bypass reference channel in the The mixed response obtained from each complementary detection sub-cycle is denoted as The sealing observation response is recorded as According to the pre-calibrated complex gain Perform the correction:
[0166] ,
[0167] in, The results were obtained through least-squares fitting in either the unpackaged state or the intact rigid reference membrane state, and were used to compensate for the bypass amplitude and phase differences between each complementary detection sub-cycle.
[0168] Complex gain can be obtained by the following formula:
[0169] ,
[0170] Where J is the reference calibration time window or the number of reference samples, Mref is the reference mixed response of the sealed observation branch within the corresponding calibration time window, and Bref is the corresponding bypass response; preferably, J is not less than 20, and the fitting is completed in the state without packaging bag and in the state of complete rigid reference film, respectively, so as to reduce the bias of the complex gain by a single working condition.
[0171] For the two complementary detection sub-cycles before and after the encoding swap and After completing the encoding polarity recovery, material coordinate registration, and bypass correction, the interface consistency weight is... Hybrid Response with Interface Binding They are represented as follows:
[0172] ,
[0173] ,
[0174] in, The background fluctuation scale of qualified samples at the corresponding material coordinate positions can be obtained from the median absolute deviation; when the correction responses of two complementary detection sub-cycles are close at the same material position... When the response is close to 1, and there are significant variations depending on the device channel or encoding allocation, The corresponding decrease.
[0175] The background fluctuation scale and the closed-bias repetitive response scale are preferably calculated from the response data of no less than 20 offline-confirmed qualified packaging bags, with no less than 3 repeated tests per bag, and converted using 1.4826 times the median absolute deviation; the scale parameters obtained in this way have the same dimension as the response amplitude and can remain stable when there are a few outliers.
[0176] Interface binding hybrid response under closed bias state is denoted as , No. Interface binding blending responses in the biased state is denoted as Bias-gated incremental It is expressed as follows:
[0177] ,
[0178] in, The closed-loop reference compensation coefficient is preferably between 0.8 and 1.2. The fluctuation scale of the repetitive response under closed bias conditions; It is a dimensionless standardized quantity used to compare the degree of bias activation under different packaging materials and different excitation amplitudes.
[0179] The closed reference compensation coefficient is used to compensate for the unavoidable overall gain difference between the closed bias and the open bias. Its value can be determined based on the amplitude ratio of the open bias response to the closed bias response in the qualified sample. Preferably, the 5th percentile to the 95th percentile of the amplitude ratio is limited to the range of 0.8 to 1.2. If it exceeds this range, the support conditions and bypass reference calibration should be re-executed first.
[0180] To evaluate whether anomalies remain monotonically active as the enable bias level increases, a monotonicity metric is defined. :
[0181] ,
[0182] in, To enable the total number of bias levels, For indicator functions, The allowable noise fall-off amount; The closer the value is to 1, the more the abnormal response at the corresponding material coordinate position conforms to the law of increasing with the onset offset. Preferably, the value is... A value of at least 0.7 is considered a stable activation candidate.
[0183] The allowable noise fall-off amount is applied to the dimensionless bias gating increment, preferably between 0.02 and 0.15. This range can be determined based on the 95th percentile of the absolute value of the increment difference between adjacent open bias levels for qualified samples, so that small falls-offs caused by random noise are not misjudged as non-monotonic, while significant attenuation will still reduce the monotonicity index.
[0184] For interconnected relationships, the material coordinate mesh is constructed as a graph structure, with each mesh point as a node, and edges are set between adjacent nodes. The activation probabilities of interface opening and closing are determined based on the output of the model. Determine the cost of nodes :
[0185] ,
[0186] set up Given the set of all candidate paths connecting the inner boundary band of the bag to the outer boundary band of the bag, the breakthrough cost is... Defined as the minimum cumulative node cost among the candidate paths:
[0187] ,
[0188] in, This represents a candidate path. The lower the cost of the nodes in the path, the higher the overall probability of the interface being opened, closed, or activated on that path.
[0189] Furthermore, risk scores will be integrated. The definition is as follows:
[0190] ,
[0191] in, To obtain the path node number with the minimum connection cost, This represents the average value of the monotonicity index along this path. This represents the average value of the encoding exchange consistency along the path; the normalization form can reduce the impact of different path lengths on the comparison results of connectivity risk.
[0192] The path monotonicity average and the code-switching consistency average can be calculated using the following formulas:
[0193] ,
[0194] Among them, the optimal path is the path that achieves the minimum connection cost, and the average values of both are dimensionless quantities between 0 and 1. When actually calculating the node cost, the activation probability of the interface opening and closing is first truncated to between the probability stable term and 1 minus the stable term, so as to avoid the probability being zero, which would lead to an infinite logarithm, and the probability overflow causing the node cost to be negative.
[0195] The penetration risk score simultaneously reflects the interface opening and closing activation probability of each material coordinate position on the penetration path, the stability of the response as the opening bias level increases, and the source consistency before and after the encoding exchange. When the penetration risk score is used, the number of low-confidence material coordinate positions in the penetration path is allowed to be less than the preset number, and the probability of random high-response positions connecting to form pseudo-penetration paths can be reduced.
[0196] Preferably, the carrier frequency is determined based on the air coupling efficiency, the response wavelength in the packaging film, and the dynamic visual sampling capability. When the carrier frequency is low, the response wavelength in the packaging film increases, and the spatial resolution capability for local defects decreases. When the carrier frequency is high, air attenuation and film surface scattering increase, and the signal-to-noise ratio of the dynamic response decreases. Low-energy pre-scanning can be performed in the range of 20kHz to 300kHz, and a frequency with a linear response signal-to-noise ratio of qualified seals higher than 6dB and a spatial half-wavelength not greater than twice the seal width is selected as the detection carrier frequency.
[0197] Furthermore, the coding length is determined based on the processing gain and detection time; for production lines with a conveying speed of 5 m / min to 60 m / min, the coding length is preferably 16 to 128 chips; for low-speed re-inspection stations, the coding length can be 128 to 512 chips; each chip preferably contains 2 to 20 carrier frequency cycles to enable the transducer to form a stable response before chip switching.
[0198] The opening bias level is used to generate a measurable opening and closing response at a temporarily closed sealing interface, and the maximum opening bias is less than the bias that would cause permanent damage to a qualified seal; preferably, the lower confidence limit of the lowest peel load is obtained based on no less than 30 qualified samples in the same batch, and the maximum online relative bias load is limited to 5% to 20% of the lower confidence limit; when the residual displacement after unloading exceeds 5% of the reference displacement, the cross-coded response continues to increase after unloading, or the bias actuator detects a sudden change in force, the application of subsequent opening bias levels is stopped, and the corresponding packaging bag is transported to the re-inspection channel.
[0199] By changing the relative offset between the two membranes while keeping the average support force within a preset range, the impact of changes in the overall support state of the sealing area on the dynamic response can be reduced. By comparing the responses under different offset states after completing the coding exchange correction and bypass reference correction, the impact of the nonlinear response of the equipment on the interface opening and closing response extraction results can be reduced.
[0200] Furthermore, the deep learning model includes a response feature encoding module, a bias sequence fusion module, a channel topology discrimination module, and an uncertainty output module connected in sequence; the deep learning model receives a multi-channel response field with a coordinate correspondence of sealing materials, and generates an interface opening and closing activation probability field and sealing defect detection results based on the amplitude, phase, bias changes and spatial connection relationships between each response field.
[0201] The response feature encoding module receives a size of 1. The input tensor, where and The material coordinate grids correspond to the length and width directions of the seal, respectively. Each channel includes at least the first linear response amplitude, the first linear response phase sine value, the first linear response phase cosine value, the second linear response amplitude, the second linear response phase sine value, the second linear response phase cosine value, the closed bias interface bound to the mixed response amplitude, the interface bound to each open bias level, the bias gating increment, the coding exchange consistency, the bypass reference confidence, the effective pixel mask, and the bag inner and outer boundary mask.
[0202] Preferably, the response feature encoding module adopts a four-level convolutional encoder, each level including two 3×3 convolutional layers, a normalization layer and a nonlinear activation layer, with the number of channels being 32, 64, 128 and 256 respectively; adjacent layers are downsampled by convolution with a stride of 2 and skip connections are preserved; this module is used to extract the correlation between local response amplitude, phase change, boundary position and spatial texture.
[0203] The bias sequence fusion module processes feature sequences along the bias level dimension, preferably using convolutional gated recurrent units. The encoded features of each bias level are input sequentially in ascending order of bias. The convolutional gated recurrent units use hidden states to record the inheritance and expansion relationships of abnormal regions and output the interface opening and closing activation probabilities of each level. By using bias sequences instead of single-amplitude responses, it is possible to distinguish between weakly sealed interfaces that expand stably with the load and random noise.
[0204] The channel topology discrimination module fuses the activation probabilities of each bias level, the inner boundary mask of the bag, and the outer boundary mask of the bag, and restores them to the coordinate resolution of the raw material through a multi-scale decoder, and outputs a local weak binding probability map, a non-through delamination probability map, and a through risk probability map; furthermore, a differentiable shortest path layer can be added to the back end of the model, with the through cost as an auxiliary training objective.
[0205] The uncertainty output module outputs the prediction variance for each material coordinate position and the detection confidence for the whole bag. When there are many missing pixels in the input, the material coordinate registration error is large, or the training data does not cover the corresponding bag type, the model uncertainty increases. The control system can transfer the packaging bag to re-inspection instead of forcibly giving a qualified result.
[0206] Training data can consist of actual packaging production line samples and controlled defect samples. Actual samples include qualified packaging bags with different packaging film materials, printing patterns, sealing widths, contents types, and conveying speeds. Controlled defect samples can be formed by reducing local heat sealing temperature, shortening local heat sealing time, inserting fibers of a specified diameter, introducing a small amount of droplets, setting local folds, and changing sealing pressure. For each sample, the coded exchange dynamic response under closed bias and at least three open bias levels is collected.
[0207] Defect labels can be determined through cross-testing of pressure decay, dye penetration, bubble leak detection, and seal peeling. For spatial labels, they can be observed by slicing along the seal width after inspection, or by developing the actual channel location with fluorescent dye and then registering the developed image to the coordinates of the seal material. Local weak bonding, non-penetrating delamination, and penetrating channels should be labeled separately to avoid merging all abnormalities into a single non-conforming category.
[0208] In one example, the training set contains 8,000 to 50,000 packaging bag samples, of which qualified samples account for 40% to 70%, weakly bound samples account for 10% to 30%, non-through delamination samples account for 5% to 20%, and through-channel samples account for 5% to 20%. The samples are divided into training set, validation set and test set according to production batch and bag type, with a ratio of 70:15:15. The same production batch cannot be included in the training set and test set at the same time to verify the cross-batch generalization ability.
[0209] The training data used in this embodiment only includes images of sealed packaging bags, dynamic response fields, equipment operating parameters, and results of pressure decay, dye penetration, bubble leak detection, and peeling tests. The data comes from the applicant's own production line, controlled test samples, or legally authorized cooperative production lines. The data does not involve personal identification information, sensitive personal information, or biometric information. The collection, storage, and use processes are carried out in accordance with the corresponding authorized scope and data management system.
[0210] Before inputting the data into the model, robust normalization based on the median and median absolute deviation is applied to the amplitude channel, and sine and cosine values are applied to the phase channel. Neighborhood weighted interpolation is used for missing locations while retaining effective pixel masks. The data to be normalized is denoted as... The standardization result is Its expression is as follows:
[0211] ,
[0212] Median absolute deviation Calculate according to the following formula:
[0213] ,
[0214] in, This represents the median of the response field to be standardized or the corresponding batch response data of the material. The coefficient 1.4826 is used to ensure that the median absolute deviation is comparable to the standard deviation under approximately normal distribution conditions. A positive number is set to prevent the denominator from being zero; this processing can reduce the impact of a small number of strong outliers on the normalization scale.
[0215] For missing locations, distance-weighted neighborhood interpolation is preferred within the same bias level and response channel. The 4 to 16 nearest valid grid points in the material coordinates are selected, with the weights inversely proportional to the square of the distance. The interpolation results are input into the model along with the valid pixel mask. When there are fewer than 4 valid neighboring points or the width of the continuous missing area exceeds 10% of the effective width of the seal, forced interpolation is not performed. Instead, the corresponding sample is marked as low confidence and transferred to a re-examination.
[0216] Model training consists of two stages: pre-training and joint fine-tuning. In the pre-training stage, qualified samples and obviously defective samples are used to train the response feature encoding module, enabling it to complete the reconstruction of the sealing region and coarse segmentation of defects. In the joint fine-tuning stage, a bias sequence fusion module and a channel topology discrimination module are added to train the interface activation frontier and penetration risk with samples of all categories. Forward propagation, loss calculation, backpropagation and parameter update are performed during the training process.
[0217] The total loss function used in joint training of the model It is expressed as follows:
[0218]
[0219] in, The sum of the Dice loss and the binary cross-entropy of the active region of the interface. The cross-entropy of the entire bag's defect categories. The activation probability of the same material coordinate position used for penalty decreases beyond the allowable range as the onset bias increases. This is used to constrain the existence of a low-cost path from the inner boundary band of the bag to the outer boundary band of the bag for samples that pass through it. This is used to ensure that the interface response after constraint encoding exchange remains consistent in material coordinates. Used to calibrate prediction variance These are the weighting coefficients for the corresponding loss terms.
[0220] To enable the direct implementation of each loss term, the interface segmentation loss, whole-bag classification loss, monotonicity loss, topological loss, code exchange consistency loss, and uncertainty loss can be expressed as follows:
[0221] ,
[0222] ,
[0223] ,
[0224] ,
[0225] ,
[0226] ,
[0227] Among them, the effective material coordinate location set is used to limit the grid points participating in training, the interface activation ground truth label and predicted activation probability are used to calculate the segmentation loss, the whole bag category ground truth and predicted probability are used to calculate the classification loss, the smoothing term is used to prevent the Dice denominator from being zero, the monotonicity allowable fallback amount is preferably taken as 0.02 to 0.15, the minimum path cost interval of non-connected samples is determined according to the path cost distribution of connected and non-connected samples in the validation set, and the logarithmic variance of the model output is used to calibrate the prediction uncertainty.
[0228] Each loss weight can be set according to the validation set, preferably, =1, It ranges from 0.5 to 2. It ranges from 0.05 to 0.5. The range is from 0.1 to 1. It ranges from 0.05 to 0.5. The optimization factor is between 0.01 and 0.2; the optimizer can be AdamW with an initial learning rate of 1×10⁻. 5 Up to 5×10⁻ 4 Batch size is 4 to 32, training epochs are 80 to 300, and weight decay is 1×10⁻ 6 Up to 1×10⁻³, and use cosine annealing to adjust the learning rate.
[0229] After the model training is completed, select the interface opening and closing activation probability threshold and the penetration risk threshold on the validation set. The threshold selection is based on the principle of prioritizing the control of the penetration defect false detection rate, while limiting the false detection rate of qualified samples. Preferably, when the penetration defect recall rate is not lower than the preset target value, select the threshold combination with the lowest false detection rate. For new bag types, the response feature encoding module can be frozen first, and only a small number of validated samples can be used to fine-tune the bias sequence fusion module and the channel topology discrimination module.
[0230] Furthermore, the response processing module and the deep learning discrimination module jointly judge the first linear response field, the second linear response field, the cross-coded response field, the consistency of the response before and after the coding exchange, and the response increment under different bias states. When only local attenuation or phase anomaly occurs, but the conditions of consistent material position after coding exchange and enhanced response under the open bias state are not met, the corresponding material coordinate position is not determined as the interface opening and closing activation region. When the cross-coded response meets the conditions but does not form a connection relationship from the inner boundary of the bag to the outer boundary of the bag, the corresponding anomaly is determined as local weak bonding or non-penetrating delamination.
[0231] Specifically, the interface-bound hybrid response simultaneously satisfies the following conditions: it cannot be explained by the linear superposition of the first linear response field and the second linear response field; it remains at the same sealing material position after code exchange and code polarity recovery; it is enhanced relative to the closed bias state in the open bias state, and forms a continuous interface opening and closing activation region as the opening bias level increases; the processing unit obtains the interface opening and closing activation region according to the above conditions, and determines the penetration risk according to the continuity relationship of the interface opening and closing activation region in the sealing width direction.
[0232] Before model deployment, the material coordinate grid, channel arrangement, normalization parameters, and missing value masking rules used in the training phase should be fixed into the detection formula. Each time the response processing module generates model input, it should arrange the response channels in a fixed order to avoid model output distortion due to changes in channel position. Preferably, the model input size is uniformly 256×64, 512×96, or 512×128. For packaging bags with different actual sealing lengths, equal arc length resampling can be performed in the length direction, and the normalization definition of zero inner boundary and one outer boundary should always be maintained in the width direction.
[0233] Online calibration should be performed after the production line is first put into use, after film or bag type changes, and after maintenance of the heat sealing mechanism. Online calibration can use no fewer than 20 packaging bags that have been verified offline to obtain the closed bias background, background of each opening bias level, coded exchange response, and bypass reference response in sequence. The system updates the median, median absolute deviation, bypass complex gain, and registration error range of the response at each material coordinate position based on the samples, while not updating the core weights of the deep learning model. This allows the system to adapt to changes in material batches and equipment assembly status, without directly learning unverified samples as normal states.
[0234] Furthermore, during operation, short-term and long-term background libraries can be set. The long-term background library consists only of samples that have been confirmed as qualified offline, while the short-term background library consists of samples with high recent model confidence, low failure risk, and stable bypass references. The short-term background library is only used to adjust the amplitude normalization scale and noise range, and is not used to change the defect category boundary. When the distance between the short-term and long-term backgrounds continuously exceeds the drift threshold, the system issues an equipment inspection prompt instead of automatically expanding the qualified range.
[0235] The drift distance can be composed of the standardized mean difference of the first linear response, the second linear response, the closed bias cross response, and the bypass reference. Preferably, when the drift distance in 30 to 500 consecutive packaging bags exceeds the long-term background mean plus 3 times the standard deviation, or the bypass reference phase drift exceeds 30 degrees, the automatic pass / fail judgment is suspended and a reference channel check is performed. This method can prevent transducer aging, air film gap changes, and camera focal length drift from being mistaken by the model as normal changes in packaging materials.
[0236] During the model inference stage, a sliding window can be used to handle ultra-long seals along the length of the seal; the overlap ratio of adjacent windows is preferably 10% to 50%, and the activation probability of the overlapping area is weighted by confidence; the risk of the whole bag being connected is determined by the highest connection risk in each window and the continuity of abnormal paths in adjacent windows, so as to avoid a real long channel being divided into two windows and then judged as not connected.
[0237] After system installation, basic calibration can be completed using three types of reference samples. The first type is a uniform and complete sealed sample, used to obtain the linear response and normal cross-response range. The second type is a sample with only local delamination inside the seal and not connected to the inside or outside of the bag, used to train non-penetrating delamination labels. The third type is a channel sample made by using fibers of a specified diameter across the width of the seal, used to calibrate the penetration risk. The reference fiber diameter can be set from 10μm to 300μm, and the channel status is confirmed after detection by staining penetration and pressure attenuation.
[0238] For each type of reference sample, at least three repeated responses are collected under closed bias and multiple open bias levels. If the material coordinate registration error of repeated detection of the same sample is greater than one grid, the coefficient of variation of the interface-bound mixed response amplitude is greater than 30%, or the bypass reference signal-to-noise ratio is less than 6dB, then the camera exposure, excitation incident angle and air film gap are adjusted first, and the detection rate on the surface is not obtained directly by reducing the model threshold.
[0239] In one optional embodiment, the packaging bag uses a polyester / polyethylene composite film with a total thickness of 80μm to 160μm, an effective sealing width of 8mm to 12mm, and a production line speed of 15m / min to 30m / min; the positioning camera has a resolution of 5 megapixels and a sealing width direction resolution of 15 to 30 pixels per millimeter; the dynamic vision uses 8-phase strobe sampling, with an equivalent displacement resolution of no more than 1μm.
[0240] In this example, the first and second excitation modules employ an air-coupled ultrasonic array with a center frequency of 60kHz to 120kHz, a coding length of 64 chips, and each chip containing 8 carrier frequency cycles. The first and second coding sequences can be selected from the two rows with the lowest cross-correlation in a 64-order Walsh matrix, or from two sets of pseudo-random sequences with a normalized cross-correlation of no more than 0.05 after measured propagation delay correction. The root mean square sound pressure levels of the outputs of the two excitation modules are adjusted by a bypass reference to ensure that the difference does not exceed 5%.
[0241] When the bias is closed, the two gas film modulators on both sides provide stable support for the membrane surface and make the sealing interface tend to fit together; the bias can be set to three levels, with the force difference between the two sides corresponding to equivalent pressure differences of 0.2 kPa, 0.4 kPa and 0.6 kPa respectively, while keeping the average pressure change on both sides not exceeding 5%; under each bias level, code allocation A and code allocation B are executed in sequence, and the interval between the two complementary detection sub-cycles is controlled within 20 ms.
[0242] For a fully sealed sample, the cross-coding response under open bias may change to some extent, but after weighting for coding exchange consistency and standardization based on the closure baseline, the interface activation probability usually does not form a continuous region across the width. For local non-penetrating delamination, the abnormal region may be enhanced under open bias, but its activation front remains inside the seal. For microchannels spanning the width of the seal, the anomaly may start near the inner boundary of the bag and extend to the outer side of the bag as the open bias increases. The system outputs different risk categories accordingly. The above parameters are feasible examples and do not constitute a limitation on other membrane materials, frequencies, and bias forms.
[0243] After testing, a certain proportion of packaging bags can be randomly selected from each batch to perform pressure attenuation, dye penetration, and peel tests, and the results can be compared with the online judgment. When the failure rate of through-hole defects, the false detection rate of qualified samples, or the model uncertainty exceeds the upper limit of quality control, background calibration is performed again and the reference channel is checked. Preferably, the upper limit of quality control is determined according to the product risk level and the enterprise quality standards, rather than being arbitrarily modified based on the results of a single sample.
[0244] Based on the above calibration method and operating parameters, the carrier frequency, encoding length, dynamic visual sampling parameters and offset range can be set according to the packaging film thickness, sealing width and production cycle. The defect spatial label and the judgment threshold of the deep learning model can be established using the offline leak detection results.
[0245] Example 4:
[0246] like Figure 2 As shown, this embodiment provides an online detection system for packaging bag sealing defects based on machine vision and deep learning. The system includes a conveying module, a visual positioning module, an offset modulation module, a first excitation module, a second excitation module, a dynamic visual acquisition module, an encoding control module, a bypass reference channel, a response processing module, a deep learning discrimination module, a rejection module, and a quality traceability module. Each module is connected via industrial Ethernet, a real-time bus, and a hardware trigger line.
[0247] The conveying module includes a conveyor belt, a guide assembly, an encoder, and a packaging bag positioning sensor. The encoder is used to output packaging bag displacement pulses, and the packaging bag positioning sensor is used to determine whether the seal has entered the detection area. Preferably, the conveying module maintains a speed fluctuation of no more than 5% of the set speed in the detection area. For production lines with higher speeds and longer detection time windows, a follow-up detection chamber that moves synchronously with the packaging bag can be set up. The visual positioning module, bias modulation module, excitation module, and dynamic visual acquisition module are all installed on the follow-up platform.
[0248] The visual positioning module includes a positioning camera, a positioning light source, and an image processor. The positioning camera is positioned on the front or slightly above the seal, and the positioning light source uses coaxial light, strip light, or pulsed backlight. The image processor establishes a sealing material coordinate system based on the bag outline, sealing embossing, and film texture, and sends the material coordinates and anchor points to the response processing module.
[0249] The bias modulation module includes a first air film modulator and a second air film modulator, which are disposed opposite to each other on the outside of the first and second side films. Each air film modulator includes a porous air film plate, a pressure chamber, a proportional valve, a pressure sensor, and a displacement sensor. The side of the porous air film plate facing the packaging bag forms a uniform air film, avoiding direct contact between the rigid clamp and the film surface, which would cause scratches and additional friction. The controller adjusts the force of the air films on both sides according to the pressure and displacement feedback to form a closed bias, multiple open bias levels, and an unloading state.
[0250] The first excitation module is arranged near the inner boundary of the bag, and the second excitation module is arranged near the outer boundary of the bag. Each excitation module includes at least one air-coupled ultrasonic transducer and driver, and multiple transducers can be arranged in an array along the length of the seal. The incident direction of the sound beam of the excitation module preferably forms an angle of 10 to 70 degrees with the normal of the membrane surface to form a bending response that propagates along the width of the seal in the sealing membrane surface. The encoding control module generates a first encoding sequence and a second encoding sequence, and controls the two excitation modules to complete synchronous output, encoding exchange and polarity reversal.
[0251] The dynamic vision acquisition module includes a high-speed camera, an imaging lens, a synchronous stroboscopic light source, and a hardware trigger. The film surface can use its own printed texture for digital image correlation, and can also project random structured light speckle without affecting packaging hygiene and performance. The hardware trigger receives the carrier phase signal from the encoding control module and triggers the stroboscopic light source and camera at a fixed phase to reconstruct the signed displacement response field and vibration phase response field.
[0252] The bypass reference channel is set on the propagation path that does not pass through the packaging bag seal, and may include a reference transducer, a reference reflective film and a reference receiving sensor; the bypass reference channel monitors the output amplitude, phase and cross distortion of the first excitation module and the second excitation module respectively, and provides a unified calibration benchmark for the response before and after the encoding exchange.
[0253] The response processing module includes a material coordinate registration unit, a linear response demodulation unit, a residual generation unit, a cross-coding demodulation unit, and a response source separation unit. The material coordinate registration unit maps each dynamic image to a unified material coordinate system. The linear response demodulation unit outputs a first linear response field and a second linear response field. The residual generation unit removes the linear superposition response from the measured response. The cross-coding demodulation unit outputs a cross-coded response field. The response source separation unit combines encoding exchange, polarity inversion, and bypass reference extraction interfaces to bind the hybrid response field.
[0254] The deep learning discrimination module can be set up in the industrial computer at the inspection station or in the edge server of the production line. It receives the multi-channel tensor output by the response processing module and outputs the interface opening / closing activation probability field, defect category, penetration risk score and inspection confidence. The rejection module drives the air blowing, push rod or diversion conveyor mechanism to remove high-risk packaging bags from the qualified product conveying path according to the discrimination results. The quality traceability module saves the packaging bag number, inspection time, sealing material coordinate diagram, key response field, model version and inspection results.
[0255] When this system is working, the packaging bag positioning sensor triggers the positioning camera to acquire images of the sealing area. The visual positioning module determines the inner boundary, outer boundary, and material coordinates of the bag. The bias modulation module forms a closed bias, the coding control module completes the first set and the exchanged second set of coding excitations, and the dynamic visual acquisition module acquires the response. Subsequently, the bias modulation module sequentially forms multiple open bias levels and repeats the coding detection. The response processing module generates an interface to bind the mixed response online, the deep learning discrimination module outputs the defect results, and finally the rejection module and the quality traceability module execute the corresponding actions.
[0256] Preferably, the entire detection cycle is 10ms to 500ms. If the detection cycle is longer than the time the packaging bag stays in a fixed field of view, the number of open bias levels can be reduced, parallel multi-frequency coding can be used, or a follow-up detection chamber can be enabled. For different material batches, the system can first use several qualified packaging bags to perform self-calibration and update the material coordinate background response, bypass complex gain, and model normalization parameters.
[0257] In another embodiment, the bias modulation element can be a flexible adsorption plate, an electrostatic adsorption component, or a micro-mechanical follower, as long as it can act on the first and second side membranes respectively and change the relative bias between the two membranes while maintaining the average support conditions basically stable; the dynamic excitation can also be coded acoustic pressure pulses, photothermal elastic pulses, and low-frequency airflow pulses; the dynamic vision can be structured light displacement measurement, speckle interferometry imaging, and event vision; all the above substitutions should maintain the interaction relationship between dual-boundary synchronous encoding, encoding exchange, bias gating, and material coordinate response separation.
[0258] When using this invention, a test formula can be pre-established according to the type of packaging bag. The test formula includes at least the sealing width range, bag inner and outer boundary identification parameters, carrier frequency, coding length, offset level, maximum safe load, model version, and judgment threshold. After changing the bag type, a qualified sample is used to perform formula verification first. When the material coordinate recognition success rate, bypass signal-to-noise ratio, and closed offset background response meet the requirements, online detection is initiated.
[0259] Based on the preferred embodiments of the present invention described above, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. An online detection method for sealing defects in packaging bags based on machine vision and deep learning, characterized in that, Includes the following steps: Acquire an image of the sealing area of a packaging bag moving along the conveying path, and determine the inner boundary of the sealing area near the bag cavity, the outer boundary of the bag away from the bag cavity, and the coordinate system of the sealing material based on the sealing area image; The sealing area is controlled to be in a closed bias state and an open bias state respectively. In each bias state, a first orthogonal encoding excitation and a second encoding excitation are applied simultaneously from the inner boundary of the bag and the outer boundary of the bag, and the dynamic response image of the sealing area is acquired. The dynamic response image is demodulated based on the first coding stimulus and the second coding stimulus to obtain a first linear response field, a second linear response field and a cross-coded response field; In each bias state, the application boundaries of the first coded excitation and the second coded excitation are swapped, and the coded polarity of the first coded excitation is flipped. Based on the consistent relationship between the cross-coded response fields before and after the swap in the coordinate system of the sealing material, the interface-bound hybrid response field corresponding to the sealing interface is obtained. Based on the difference between the interface-bound hybrid response field in the closed bias state and the open bias state, a deep learning model is used to determine the interface opening and closing activation region, and based on the continuity relationship between the interface opening and closing activation region between the inner boundary and the outer boundary of the bag, a sealing defect detection result is generated.
2. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 1, characterized in that, Both the first coded excitation and the second coded excitation are air-coupled ultrasonic excitations. The first coded excitation and the second coded excitation use different coded sequences to modulate the same carrier frequency signal. The normalized cross-correlation value of the two coded sequences within a preset detection time window is not greater than a preset correlation threshold.
3. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 1, characterized in that, The closed bias state and the open bias state are formed by a first bias modulator and a second bias modulator acting on the first side film and the second side film of the packaging bag, respectively. In the closed bias state, the first bias modulator and the second bias modulator drive the first side film and the second side film to tend to adhere; In the biased state, the first bias modulator and the second bias modulator drive the first side film and the second side film to tend to separate.
4. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 3, characterized in that, The first bias modulator applies a first force to the first side membrane, and the second bias modulator applies a second force to the second side membrane; When switching between the closed bias state and the open bias state, the change in the sum of the first force and the second force is not greater than a preset support threshold, and the direction of the difference between the first force and the second force changes.
5. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 1, characterized in that, The sealing material coordinate system uses the direction between the inner boundary of the bag and the outer boundary of the bag as the sealing width direction, and the extension direction of the sealing area as the sealing length direction. Based on the sealing embossing features and film surface texture features, material coordinate registration is performed on the dynamic response images under different offset states and before and after code exchange. The signed displacement response field and vibration phase response field of the sealing area are then calculated based on the registered dynamic response images.
6. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 1, characterized in that, The steps for obtaining the cross-coded response field include: Based on the first coding sequence corresponding to the first coding stimulus and the second coding sequence corresponding to the second coding stimulus, a first matching demodulation sequence, a second matching demodulation sequence, and a cross-demodulation sequence are constructed respectively. The first linear response field and the second linear response field are extracted from the dynamic response image using the first matched demodulation sequence and the second matched demodulation sequence. Reconstruct a linear superimposed response field based on the first linear response field and the second linear response field, and subtract the linear superimposed response field from the measured response field corresponding to the dynamic response image to obtain the response residual field; The response residual field is demodulated using the cross-demodulation sequence to obtain the cross-coded response field.
7. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 6, characterized in that, Synchronously acquire the bypass reference response that does not pass through the sealed area, and perform amplitude normalization and phase correction on the cross-coded response field before and after the coding exchange based on the bypass reference response; The cross-coding response that changes with encoding allocation and encoding polarity is determined as the excitation background response, and the cross-coding response that remains at the same sealing material coordinate position before and after encoding exchange and is enhanced in the open bias state is determined as the interface-bound hybrid response field.
8. The online detection method for packaging bag sealing defects based on machine vision and deep learning according to claim 1, characterized in that, The enabled bias state includes at least three enabled bias levels with the bias degree increasing sequentially; The deep learning model includes a response feature encoding module, a bias sequence fusion module, and a channel topology discrimination module. The response feature encoding module is used to extract interface binding hybrid response features under each opening bias level. The bias sequence fusion module is used to determine the activation front formed by the interface opening and closing activation region as the opening bias level increases. The channel topology discrimination module is used to determine local weak bonding regions, non-penetrating delamination regions, and permeable risk regions based on the connection relationship between the activation front and the inner boundary and outer boundary of the bag.
9. An online detection system for packaging bag sealing defects based on machine vision and deep learning, characterized in that, include: Conveying module, used to convey packaging bags along the conveying path; The visual positioning module is used to acquire an image of the sealing area of the packaging bag and determine the inner boundary, outer boundary, and sealing material coordinate system of the bag based on the sealing area image. The bias modulation module is used to control the sealing area to be in a closed bias state and an open bias state, respectively. The first excitation module and the second excitation module are respectively disposed on the inner boundary of the bag and the outer boundary of the bag, and are used to simultaneously apply mutually orthogonal first and second coding excitations. The dynamic visual acquisition module is used to acquire dynamic response images of the sealing area under various bias states; The encoding control module is used to exchange the application boundaries of the first encoding stimulus and the second encoding stimulus, and to flip the encoding polarity of the first encoding stimulus; The response processing module is used to demodulate the dynamic response image to obtain a first linear response field, a second linear response field, and a cross-coded response field, and to obtain an interface-bound hybrid response field based on the cross-coded response fields before and after the encoding exchange. The deep learning discrimination module is used to determine the interface opening and closing activation region based on the difference of the interface-bound hybrid response field under different bias states, and to generate sealing defect detection results based on the continuity relationship between the interface opening and closing activation region and the inner boundary and outer boundary of the bag.
10. The online detection system for packaging bag sealing defects based on machine vision and deep learning according to claim 9, characterized in that, The bias modulation module includes a first air film modulator and a second air film modulator respectively disposed on the outside of the first side film and the second side film of the packaging bag; Both the first excitation module and the second excitation module include an air-coupled ultrasonic excitation array; The dynamic visual acquisition module includes a synchronous stroboscopic light source and a high-speed camera. The high-speed camera is used to acquire dynamic image sequences of the sealing area. The response processing module is used to calculate the signed displacement response field and the vibration phase response field based on the dynamic image sequence. The online detection system also includes a bypass reference channel, which is used to obtain a bypass reference response that does not pass through the sealed area.