An infrared vision self-adaptive defect detection method and system for a packaging production line

By employing multispectral imaging and adaptive scheduling algorithms, the problem of coupling misjudgment between inspection items in automated tool packaging production lines has been solved, enabling accurate detection of tool length, curvature, defects, and dirt. The system possesses high versatility and scalability.

CN122193100APending Publication Date: 2026-06-12JIANGSU YANSHIKANG BIOTECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU YANSHIKANG BIOTECHNOLOGY CO LTD
Filing Date
2026-04-29
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, there are serious coupling misjudgment problems among length, curvature, defect and dirt detection items in automated knife packaging production lines, especially when multiple defects coexist, making it difficult to effectively distinguish and identify them.

Method used

Using multispectral imaging technology combined with an adaptive scheduling algorithm, a multi-task neural network model is used to perform preliminary detection through long-wave infrared cameras, visible light images, and structural laser scanning technology. Combined with a dedicated decoupling algorithm and an adaptive scheduling algorithm, the coexistence of multiple defects is handled in stages.

Benefits of technology

It significantly reduces the false positive rate and achieves accurate detection of tool defects. The system is highly versatile and scalable, and can adapt to different production environments and tool materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122193100A_ABST
    Figure CN122193100A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a packaging production line infrared vision adaptive defect detection method and system. The method comprises the following steps: placing a to-be-detected cutter on a clamp of a production line, collecting a preliminary detection image through a camera arranged beside the production line; if the preliminary confidence of at least two target detection items is less than a set value, and a strong coupling relationship exists, an adaptive scheduling algorithm is executed to determine the camera and hardware configuration of a subsequent precision detection stage, cutter translation and rotation conditions, and a phased processing strategy for a multiple-defect coexistence condition; and based on long-wave infrared images, visible light backlight images and structure laser scanning images collected by multiple sensing devices, a special decoupling algorithm is used to detect the target detection items. The application realizes adaptive comprehensive scheduling for the single-cutter multiple-defect coexistence condition on the production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to an infrared vision adaptive defect detection method and system for packaging production lines. Background Technology

[0002] In automated knife packaging production lines, assembled knives are typically placed on fixtures and transported via conveyor belts. During transport, a vision inspection system is used to assess the quality of the knives. Common inspection items include whether the knife length is within acceptable limits, whether the knife body is bent, whether there are chips or nicks (damage) on the cutting edge or blade surface, and whether the surface is covered with oil or dust (dirt). Traditional methods use a single visible light camera under fixed lighting conditions to complete all inspections at once. However, due to the overlapping characteristics of different defects in the imaging, serious coupling misjudgment problems arise, mainly manifested as follows: For example, the coupling of dirt and defects: oil or dust appears as dark patches in visible light images, and its grayscale characteristics are very similar to metal nicks and chipped edges, making it easy to misjudge dirt as defects, or small nicks as dirt. Coupling when multiple defects coexist: when a tool has multiple defects at the same time, the detection conditions of one defect (such as lighting, motion state) may interfere with the identification of another defect.

[0003] In view of the above, this application is hereby submitted. Summary of the Invention

[0004] The purpose of this application is to provide an infrared vision adaptive defect detection method and system for packaging production lines, so as to solve the problem of misjudgment caused by the mutual coupling among the four detection items of length, curvature, defects and dirt in the prior art, and to realize adaptive comprehensive scheduling on the production line for the coexistence of multiple defects of a single tool.

[0005] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, this application provides an infrared vision adaptive defect detection method for a packaging production line, comprising: The tool to be inspected is placed on a fixture on the production line. The fixture is used to drive the tool to be inspected to move horizontally in one direction, rotate around the tool axis, or remain stationary relative to the tool. Preliminary inspection images are captured using cameras installed next to the production line; The preliminary detection image is input into a multi-task neural network model, which outputs preliminary confidence vectors for four detection items, corresponding to the confidence of length compliance, curvature, no defects, and no dirt, respectively. If the initial confidence of at least two target detection items is less than the set value and there is a strong coupling relationship, then an adaptive scheduling algorithm is executed to determine the camera and hardware configuration, tool translation and rotation, and phased processing strategy for multiple defects coexisting in the subsequent fine inspection stage. During the simplification phase, target detection items are detected using a dedicated decoupling algorithm based on long-wave infrared images, visible light backlight images, and structural laser scan images collected by multiple sensing devices.

[0006] Secondly, this application provides an infrared vision adaptive defect detection system for a packaging production line, comprising: The fixtures on the production line are used to place the cutting tool to be inspected, and to drive the cutting tool to move horizontally in one direction, rotate around the tool axis, or remain stationary relative to the tool. Cameras installed next to the production line are used to capture preliminary inspection images; The processor is used to input the preliminary detection image into a multi-task neural network model and output preliminary confidence vectors for four detection items, corresponding to the confidence of length compliance, curvature confidence, no defects confidence, and no dirt confidence, respectively. If the preliminary confidence of at least two target detection items is less than a set value and there is a strong coupling relationship, an adaptive scheduling algorithm is executed to determine the camera and hardware configuration, tool translation and rotation, and phased processing strategy for the coexistence of multiple defects in the subsequent fine inspection stage. Multiple sensing devices are used to acquire long-wave infrared images, visible light backlight images, and structural laser scanning images; The processor is also used in the simplification stage to detect target items based on long-wave infrared images, visible light backlight images and structural laser scan images collected by multiple sensing devices, using a dedicated decoupling algorithm.

[0007] Compared with the prior art, the beneficial effects of this application are as follows: I. Effectively decouples the inherent interference between detection items, significantly reducing the false judgment rate.

[0008] This application addresses the coupling problem between detection items such as dirt and defects in existing technologies by proposing a system solution based on multispectral imaging and a dedicated decoupling algorithm. Specifically, by introducing a long-wave infrared camera and performing differential processing on visible light images, dirt and defects can be physically separated. Structural laser 3D reconstruction technology is used to directly measure the actual arc length and centerline curvature of the cutting tool, eliminating misjudgments caused by the projected length of a curved tool being less than its actual arc length.

[0009] II. Adaptive scheduling algorithm realizes dynamic matching of detection resources and defect features.

[0010] This application proposes a comprehensive adaptive scheduling algorithm that can automatically determine whether a tool is a simple tool or a complex tool (with multiple defects coexisting and strongly coupled) based on the confidence vector output by the model and a predefined coupling interference matrix. For simple tools, a single-station sequential detection strategy is adopted, allowing for rapid switching of hardware configurations within a single station. For complex tools, the algorithm automatically generates a phased processing strategy, setting independent detection stages for conflicting items (such as dirt and defects) to ensure that each item is processed under optimal imaging conditions.

[0011] Third, the system has high versatility and scalability.

[0012] The hardware configuration and algorithm parameters of this application both support online calibration and dynamic adjustment. The coupling interference matrix can be recalibrated experimentally based on different production lines, different tool materials (such as stainless steel, ceramic, high-speed steel), and different types of contaminants (cutting fluid, rust-preventive oil, dust), enabling the system to quickly adapt to new production environments. In addition, the system supports rapid switching between multiple tool models (length range 5~30 cm, width range 0.5~5 cm). Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1 This is a flowchart of an infrared vision adaptive defect detection method for a packaging production line provided in an embodiment of this application. Detailed Implementation

[0015] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0016] The present application will be further described in detail below with reference to the embodiments.

[0017] Figure 1This is a flowchart illustrating an infrared vision adaptive defect detection method for a packaging production line, provided in an embodiment of this application. This method can be executed by an infrared vision adaptive defect detection system for the packaging production line. This application is applicable to multi-dimensional inspection of complete cutting tools on a production line, primarily including the detection of length, curvature, defects, and dirt.

[0018] like Figure 1 As shown, the method provided in this embodiment includes the following steps: S110. Place the tool to be tested on the fixture of the production line. The fixture is used to drive the tool to be tested to move horizontally in one direction, rotate around the tool axis, or remain stationary relative to the tool.

[0019] The tool to be inspected is placed on a dedicated fixture on the production line. This fixture has three motion modes: first, it can move the tool horizontally in one direction along the production line, with the speed controlled by a servo motor; second, it can rotate around the tool's own axis, with an adjustable speed range of 0 to 60 revolutions per minute; third, it can keep the tool and fixture relatively stationary, i.e., without applying any additional movement. The fixture is equipped with clamps to secure the tool shank and prevent displacement during rotation or movement. The production line is a linear conveyor belt with multiple imaging stations arranged along it.

[0020] S120: Acquire preliminary inspection images using a camera installed next to the production line.

[0021] An infrared camera is installed at the initial inspection station on the production line. This camera, in conjunction with a ring-shaped infrared light source, continuously captures 3 to 5 frames of short-wave infrared images as the cutting tool passes by at a constant speed of 0.2 meters per second. The frame with the best contrast is selected as the initial inspection image. This image is a single-channel grayscale image, containing the overall outline of the cutting tool, the surface grayscale distribution, and any localized grayscale changes caused by possible dirt or defects.

[0022] S130. Input the preliminary detection image into the multi-task neural network model and output the preliminary confidence vectors of four detection items, which correspond to the confidence of length qualification, curvature confidence, no defects confidence and no dirt confidence, respectively.

[0023] The multi-task neural network model adopts a parameter-sharing multi-task learning architecture, consisting of a shared backbone network and four task-specific branches. The four task-specific branches include: length branch, curvature branch, incomplete branch, and dirt branch. Among them, the length branch and curvature branch are regression tasks, and the incomplete branch and dirt branch are binary classification tasks.

[0024] Specifically, the shared backbone network is responsible for extracting common visual features from the initial input detection image. Its structure consists of three convolutional blocks, each containing a convolutional layer, a batch normalization layer, a ReLU activation function, and a max-pooling layer. Then, a global average pooling layer compresses the feature maps output from the convolutional blocks into a 128-dimensional feature vector. This feature vector serves as the shared feature and is simultaneously input into the four task branches.

[0025] The length branch first inputs the 128-dimensional feature vector into the first fully connected layer, which uses ReLU activation; then it inputs it into the second fully connected layer, which also uses ReLU activation. Finally, it outputs a scalar value, denoted as L_pred, representing the tool length predicted by the model, in millimeters.

[0026] The curvature branch is also a regression task, and its network structure is exactly the same as that of the length branch. Finally, it outputs a scalar k_pred, which represents the predicted maximum curvature.

[0027] The defect branch is a binary classification task to determine whether a tool has a nick or chip. The 128-dimensional feature vector is passed through two fully connected layers, each followed by a ReLU activation, and finally by a Sigmoid activation function, outputting a scalar p_Q, representing the probability of no defects.

[0028] Dirt detection is also a binary classification task, and the network structure is the same as the incomplete branch: two fully connected layers plus a sigmoid output, which outputs a scalar p_D, representing the probability of no dirt.

[0029] The training process of a multi-task neural network model includes: The multi-task neural network model was trained on an offline dataset containing 5000 infrared images, each labeled with its true length, true curvature, presence of defects, and presence of dirt. The Adam optimizer was used, with initial learning rate, batch size, and training epochs set. The joint loss function was a weighted sum of the losses from each task (i.e., the deviations between the output of each branch and the labels), with all weights set to 1.0.

[0030] The preliminary detection images are then input into a pre-trained multi-task neural network model. This model employs a parameter-sharing architecture and outputs a four-dimensional confidence vector, denoted as: C = [c_L, c_B, c_Q, c_D]; Wherein, c_L represents the confidence level of length compliance, with a value ranging from 0 to 1. The closer the value is to 1, the higher the probability that the tool length meets the standard tolerance; c_B represents the confidence level of curvature, with a value closer to 1, the higher the probability that the tool curvature is below the threshold (i.e., basically straight); c_Q represents the confidence level of no defects, with a value closer to 1, the higher the probability that the tool surface is free of defects such as notches and chipping; c_D represents the confidence level of no dirt, with a value closer to 1, the higher the probability that the tool surface is free of dirt such as oil and dust.

[0031] S140. If the initial confidence of at least two target detection items is less than the set value and there is a strong coupling relationship, then execute the adaptive scheduling algorithm to determine the camera and hardware configuration, tool translation and rotation, and phased processing strategy for the coexistence of multiple defects in the subsequent fine inspection stage. S150. In the simplification stage, based on long-wave infrared images, visible light backlight images, and structural laser scanning images collected by multiple sensing devices, the target detection items are detected through a dedicated decoupling algorithm.

[0032] The system reads four confidence levels and compares them with corresponding preset thresholds, including length trigger threshold, curvature trigger threshold, no dirt threshold, and no defect threshold. For example, the length trigger threshold θ_L is set to 0.70, the curvature trigger threshold θ_B is set to 0.65, the defect threshold θ_Q is set to 0.60, and the dirt threshold θ_D is set to 0.55.

[0033] For each inspection item, the preliminary confidence level is compared with the corresponding preset threshold. If the preliminary confidence level of all inspection items is greater than or equal to the corresponding preset threshold, the tool is deemed to have passed all inspection items and can be released directly without entering the fine inspection stage.

[0034] If the initial confidence of at least two target detection items (the detection items with an initial confidence level less than the corresponding preset threshold are called target detection items) is less than the corresponding preset threshold, it indicates that the tool may be unqualified. Then, it is necessary to further determine whether there is a strong coupling relationship between the target detection items.

[0035] Optionally, it can be determined whether the preliminary confidence levels of at least two target detection items are less than a set value, indicating the existence of a strong coupling relationship. Specifically, based on a predefined coupling interference matrix, it is determined whether a strong coupling relationship exists between at least two target detection items. The coupling interference matrix is ​​a 4x4 square matrix. The rows represent interference source conditions, such as tool rotation, backlight occlusion, high-speed tool translation, and a ring infrared light source. The columns represent detection items, namely length, curvature, dirt, and defects. The elements in the matrix represent interference coefficients, indicating the expected decrease in the detection accuracy of detection item j when performing detection item j under interference source condition i. This value is determined experimentally and normalized to between 0 and 1. The closer the interference coefficient is to 1, the more severe the interference from the interference source on the detection item.

[0036] The measurement process is illustrated using the interference of tool rotation on contamination as an example. Rotation is a necessary motion state for defect detection; therefore, this element represents the interference of "tool rotation" on "contamination detection." The measurement steps are as follows: 1. Prepare 100 knives with their surfaces evenly coated with standard oil stains.

[0037] 2. Under optimal contamination detection conditions (long-wave infrared + lateral shielding) without rotation, perform contamination detection on each tool and record the accuracy rate, for example, 96%.

[0038] 3. On the same cutting tool, rotate for 5 seconds, and then immediately after the rotation stops, test for dirt under the same conditions. Record the accuracy rate, which is 27%.

[0039] 4. Calculate the interference coefficient 1 minus the ratio of the two accuracy rates: 1 - 0.27 / 0.96 ≈ 0.72.

[0040] Similarly, other interference coefficients were measured. The matrix is ​​as follows:

[0041] Because the rotational motion of the cutting tool has a relatively large interference coefficient on dirt and defects (based on a value greater than 0.5), and the rotational motion of the cutting tool is a necessary condition for defect detection, there is a strong coupling relationship between defects and dirt. Similarly, backlight occlusion has a relatively large interference coefficient on defects and curvature, and backlight occlusion is a necessary condition for curvature detection, thus there is a strong coupling relationship between defects and curvature. This embodiment only considers the cases where dirt and defects are strongly coupled, and where curvature is strongly coupled with defects.

[0042] If the initial confidence scores of at least two target detection items are less than a set value and there is no strong coupling relationship, then the normal scheduling algorithm is executed, and each target detection item is re-detected. For example, any target detection item can be detected sequentially: first length / curvature, then dirt, and finally defects.

[0043] For example, when performing length detection alone, the hardware configuration includes a backlight panel and dual-sided motorized baffles, with the tool's translational speed set to, for example, 0.1 m / s, and no rotation. When performing curvature detection alone, the hardware configuration, in addition to length detection, involves tool rotation. A high-resolution visible light camera is used to acquire visible light backlit images of the tool. These images are binarized to obtain a tool contour point set. The curvature of each point on the contour is calculated, or the minimum bounding rectangle method is used to locate the two endpoints of the tool (e.g., the upper and lower endpoints). The tool length is determined based on the distance between the upper and lower endpoints. During tool rotation, visible light backlit images of the tool are acquired at different angles, and the length is calculated at each angle. If the lengths differ, curvature is indicated. Optionally, a line laser generator can be used to acquire structural laser scan images of the tool. The center point of the laser line in each frame is extracted, converted to three-dimensional coordinates using calibration parameters, and the tool surface point cloud is reconstructed. The center line is extracted along the axial direction of the tool surface point cloud. The maximum curvature of the center line is calculated. If the maximum curvature is greater than a threshold, curvature is determined.

[0044] When performing contamination detection alone, the hardware configuration is as follows: a long-wave infrared light source with a side shield, and a tool that moves horizontally without rotation. For example, long-wave infrared images are acquired. Non-uniformity correction and histogram normalization are performed on the long-wave infrared images, and pixels with grayscale values ​​greater than a set value in the long-wave infrared images are marked as contamination areas.

[0045] For standalone defect detection, the hardware configuration is as follows: a ring-shaped infrared light source, unobstructed, with a cutting tool that simultaneously translates and rotates. The tool's rotational speed and translational speed can be set according to actual conditions. During the tool's rotation, multiple long-wave infrared images are continuously acquired at different rotation angles. Non-uniformity correction and histogram normalization are performed on the long-wave infrared images. If the grayscale value of a pixel in the long-wave infrared image is lower than the environmental background threshold (indicating a metal deficiency at that location and a radiation temperature close to the environment), it is confirmed as a defect.

[0046] If the initial confidence scores of at least two object detection items are less than a set value and there is a strong coupling relationship, then an adaptive scheduling algorithm is executed, including: Scenario 1: If the initial confidence levels for both dirt and defect detection are lower than the set values ​​and a strong coupling exists, then the first stage will use a coaxial combination of a long-wave infrared camera and a visible light camera, along with side shields and a long-wave infrared light source as the hardware configuration. The tool will move horizontally without rotating, performing dirt detection. Because the long-wave infrared camera is extremely sensitive to temperature, environmental heat sources (such as production line lighting, motor heating, human body heat radiation, and even the heat radiation from the passing tool itself) will create background noise in the image. The side shields are installed on both sides of the tool and use highly reflective or low-emissivity metal materials (such as polished aluminum plates) to effectively block ambient heat radiation from the sides and above from directly illuminating the tool surface or entering the camera's field of view. Based on the long-wave infrared image and the visible light backlight image, an infrared-visible light differential algorithm is used to detect whether dirt is present. The specific process is as follows: threshold segmentation is performed on the long-wave infrared image, and pixels with gray values ​​higher than the threshold (e.g., 80 / 255) are marked as candidate dirty regions to obtain a dirty mask; at the same time, the texture features (gray mean, variance, edge density) of the candidate regions are verified using visible light images. If the candidate regions are determined to be dark (based on gray value), smooth (based on variance), and have blurred edges (based on edge density) under visible light based on texture features, they are confirmed as dirty.

[0047] The second stage employs a ring-shaped infrared light source in an unobstructed configuration, combined with long-wave infrared and visible light cameras. The cutting tool moves both horizontally and vertically to perform defect detection. Edge detection and morphological analysis are performed on the visible light backlit image to extract candidate defect regions. These regions are then compared with a dirt mask to eliminate dirt interference, ultimately outputting the defect detection results. Specifically, Canny edge detection and morphological analysis are performed on the visible light image (e.g., using a 3×3 circular structuring element, with two iterations) to extract candidate defect regions. Each candidate region is then compared with the dirt mask obtained in the first stage. If the overlap area exceeds 50% of the candidate region area, it is determined to be an artifact caused by dirt; otherwise, it is determined to be a genuine defect.

[0048] The second scenario: If the initial confidence levels for both bending and defect detection are less than the set values, and a strong coupling relationship exists, then the first stage uses a backlight panel, double-sided shields, and a line laser generator as the hardware configuration. The tool moves translationally without rotation, and bending detection is performed. The backlight panel consists of a highly uniform white LED array, placed directly behind the tool. Since the tool is an opaque object, it appears as a completely black silhouette under backlighting, against a bright white background. Based on the structural laser scanning images acquired by the line laser generator, a structural laser 3D reconstruction algorithm is used to detect bending. The specific process is as follows: extract the center point of the laser line in each frame of the image, and reconstruct the 3D point cloud of the tool surface using calibration parameters; perform principal component analysis on the point cloud to obtain the tool axis direction, and fit a center curve; calculate the maximum curvature of the center curve, and if the curvature is greater than a threshold, it is determined to be bending.

[0049] The second stage uses a ring infrared light source, an unobstructed configuration, and long-wave infrared and visible light cameras. The tool translates and rotates to perform defect detection. Under the ring infrared light source, for notches or chipped areas, light undergoes strong diffuse scattering at the fracture edge, and some light is reflected into the long-wave infrared and visible light cameras, making the notch appear in the image with features significantly different from the tool itself (higher grayscale). Based on the long-wave infrared and visible light images under the ring infrared light source, an infrared-visible light differential algorithm is used to detect whether there is a defect. Specifically, during the continuous rotation of the tool, the system uses a set interval as a trigger signal to control the simultaneous exposure of the long-wave infrared and visible light cameras, acquiring multiple sets of image pairs. Canny edge detection and morphological analysis are performed on the visible light images to extract candidate defect regions. For each pixel in the candidate region, its corresponding grayscale value in the long-wave infrared image is extracted. The proportion of pixels with grayscale values ​​below the global background threshold, p_bg, is calculated. The global background threshold is obtained by statistically analyzing the grayscale distribution of the area outside the tool outline in the long-wave infrared image. If p_bg > 0.6 (meaning more than 60% of the pixels are at low temperature), then the candidate region is determined to be a true defect.

[0050] It should be noted that a certain amount of time should be allowed between different stages to allow for hardware configuration changes.

[0051] This application provides an infrared vision adaptive defect detection system for a packaging production line, comprising: The fixtures on the production line are used to place the cutting tool to be inspected, and to drive the cutting tool to move horizontally in one direction, rotate around the tool axis, or remain stationary relative to the tool. Cameras installed next to the production line are used to collect preliminary inspection images; these can be acquired using short-wave infrared cameras.

[0052] The processor is used to input the preliminary detection image into a multi-task neural network model and output preliminary confidence vectors for four detection items, corresponding to the confidence of length compliance, curvature confidence, no defects confidence, and no dirt confidence, respectively. If the preliminary confidence of at least two target detection items is less than a set value and there is a strong coupling relationship, an adaptive scheduling algorithm is executed to determine the camera and hardware configuration, tool translation and rotation, and phased processing strategy for the coexistence of multiple defects in the subsequent fine inspection stage. Multiple sensing devices include: a line laser generator, a visible light camera, and a long-wave infrared camera, used to acquire long-wave infrared images, visible light backlight images, and structure laser scanning images; The processor is also used in the simplification stage to detect target items based on long-wave infrared images, visible light backlight images and structural laser scan images collected by multiple sensing devices, using a dedicated decoupling algorithm.

[0053] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.

[0054] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for infrared vision adaptive defect detection in a packaging production line, characterized in that, Includes the following steps: The tool to be inspected is placed on a fixture on the production line. The fixture is used to drive the tool to be inspected to move horizontally in one direction, rotate around the tool axis, or remain stationary relative to the tool. Preliminary inspection images are captured using cameras installed next to the production line; The preliminary detection image is input into a multi-task neural network model, which outputs preliminary confidence vectors for four detection items, corresponding to the confidence of length compliance, curvature, no defects, and no dirt, respectively. If the initial confidence of at least two target detection items is less than the set value and there is a strong coupling relationship, then an adaptive scheduling algorithm is executed to determine the camera and hardware configuration, tool translation and rotation, and phased processing strategy for multiple defects coexisting in the subsequent fine inspection stage. During the simplification phase, target detection items are detected using a dedicated decoupling algorithm based on long-wave infrared images, visible light backlight images, and structural laser scan images collected by multiple sensing devices.

2. The method according to claim 1, characterized in that, The initial images were captured by a short-wave infrared camera.

3. The method according to claim 2, characterized in that, The multi-task neural network model adopts a parameter-sharing multi-task learning architecture, consisting of a shared backbone network and four task-specific branches; The four task-specific branches include: length branch, curvature branch, incomplete branch, and dirt branch; Among them, the length branch and curvature branch are regression tasks, while the incomplete branch and dirt branch are binary classification tasks.

4. The method according to claim 3, characterized in that, If the initial confidence levels of at least two target detection items are less than a set value, and a strong coupling relationship exists, the following steps are also included: Determine whether the initial confidence scores of at least two target detection items are less than a set value, and whether there is a strong coupling relationship; If the initial confidence of at least two target detection items is less than the set value and there is no strong coupling relationship, then the normal scheduling algorithm is executed to re-detect each target detection item; The normal scheduling algorithm includes: the detection order corresponding to the target detection item, the camera and hardware configuration, and the translation and rotation of the tool.

5. The method according to claim 4, characterized in that, Determine whether at least two object detection items have a strong coupling relationship, including: Based on a predefined coupling interference matrix, determine whether at least two target detection items have a strong coupling relationship: The rows of the coupling interference matrix represent interference source conditions, the columns represent detection items, and the elements in the matrix represent interference coefficients.

6. The method according to claim 5, characterized in that, An adaptive scheduling algorithm is executed to determine the camera and hardware configuration, tool movement speed, and phased processing strategy for multiple coexisting defects in the subsequent fine inspection stage, including: If the initial confidence levels for both dirt and defect detection items are less than the set values ​​and there is a strong coupling relationship, then the first stage will use a coaxial combination of a long-wave infrared camera and a visible light camera, along with a side shield and a long-wave infrared light source as the hardware configuration, with the tool moving translationally without rotating, to perform dirt detection; the second stage will use a ring infrared light source with an unobstructed configuration, along with a coaxial long-wave infrared and visible light camera, with the tool moving translationally and rotating, to perform defect detection. If the initial confidence levels for both bending and defect detection are less than the set values ​​and there is a strong coupling relationship, then the first stage will use a backlight, double-sided shields, and a line laser generator as the hardware configuration, with the tool moving in translational motion and not rotating, to perform bending detection; the second stage will use a ring infrared light source, an unobstructed configuration, and a long-wave infrared and visible light coaxial camera, with the tool moving in translational motion and rotating, to perform defect detection.

7. The method according to claim 6, characterized in that, During the simplification phase, based on long-wave infrared images, visible light backlight images, and structural laser scan images acquired by multiple sensing devices, a dedicated decoupling algorithm is used to detect target items, including: In the simplification stage, when dirt and defects are strongly coupled, the first stage uses an infrared-visible light difference algorithm to detect whether there is dirt based on long-wave infrared images and visible light backlight images. In the second stage, edge detection and morphological analysis are performed on the visible light backlight images to extract candidate defect areas and compare them with the dirt mask to eliminate dirt interference. Finally, the defect detection results are output. When bending and incompleteness are strongly coupled, in the first stage, a structural laser 3D reconstruction algorithm is used to detect whether bending occurs based on the structural laser scanning image; in the second stage, an infrared-visible light differential algorithm is used to detect whether incompleteness occurs based on long-wave infrared and visible light images under a ring infrared light source.

8. An infrared vision adaptive defect detection system for a packaging production line, characterized in that, include: The fixtures on the production line are used to place the cutting tool to be inspected, and to drive the cutting tool to move horizontally in one direction, rotate around the tool axis, or remain stationary relative to the tool. Cameras installed next to the production line are used to capture preliminary inspection images; The processor is used to input the preliminary detection image into a multi-task neural network model and output preliminary confidence vectors for four detection items, corresponding to the confidence of length compliance, curvature confidence, no defects confidence, and no dirt confidence, respectively. If the preliminary confidence of at least two target detection items is less than a set value and there is a strong coupling relationship, an adaptive scheduling algorithm is executed to determine the camera and hardware configuration, tool translation and rotation, and phased processing strategy for the coexistence of multiple defects in the subsequent fine inspection stage. Multiple sensing devices are used to acquire long-wave infrared images, visible light backlight images, and structural laser scanning images; The processor is also used in the simplification stage to detect target items based on long-wave infrared images, visible light backlight images and structural laser scan images collected by multiple sensing devices, using a dedicated decoupling algorithm.