Image-based packaging box processing detection method, device and equipment and storage medium
By using an image-based packaging box processing inspection method and deep learning technology for contextual feature extraction and feature fusion, high-precision packaging box printing quality inspection and process optimization are achieved. This solves the problems of human dependence and subjective interference in traditional inspection methods, and improves production efficiency and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN SENQI PRINTING CO LTD
- Filing Date
- 2024-07-31
- Publication Date
- 2026-06-02
Smart Images

Figure CN118691599B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and in particular to an image-based method, apparatus, device, and storage medium for inspecting and processing packaging boxes. Background Technology
[0002] With the continuous development of industrial automation, the manufacturing industry's demand for automated and intelligent production processes is also increasing. As an important production link, the quality control and printing process optimization of packaging box processing are crucial to product quality and efficiency.
[0003] As the outer packaging of a product, the printing quality of the packaging box directly affects the product's appearance and texture. However, traditional packaging box quality inspection methods usually require a lot of manpower and are easily affected by subjective factors, thus necessitating more reliable and automated quality control methods. Summary of the Invention
[0004] This invention provides an image-based method, apparatus, equipment, and storage medium for inspecting packaging box processing, which improves the accuracy of packaging box printing and processing.
[0005] The first aspect of this invention provides an image-based method for detecting packaging box processing, the image-based method for detecting packaging box processing includes:
[0006] Packaging box printing images of multiple printed surfaces in the target packaging box are collected from the packaging box processing production line, and the packaging box printing images are input into a preset two-layer residual context network for context feature extraction to obtain the printing area context feature map of each printing surface.
[0007] The printing area context feature map of each printing surface is input into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion, so as to obtain the printing area fusion feature map of each printing surface.
[0008] For each printed surface, the feature map of the fused printing area and the packaging box printing image are aggregated to obtain the target printed aggregate image of each printed surface;
[0009] The target printed aggregate image of each printed surface is input into the preset packaging box printing detection model to perform packaging box printing detection, and the packaging box printing detection result of each printed surface is obtained.
[0010] The printing process parameters of the multiple printing surfaces are encoded to obtain the printing process encoding data of each printing surface, and a target process encoding matrix is constructed based on the packaging box printing inspection results of each printing surface and the printing process encoding data.
[0011] The target process coding matrix is input into a preset packaging box printing process analysis model to optimize the packaging box printing process and obtain the target packaging box printing process data.
[0012] In conjunction with the first aspect, in a first implementation of the first aspect of the present invention, the step of acquiring packaging box printing images of multiple printed surfaces of a target packaging box from a packaging box processing production line, and inputting the packaging box printing images into a preset two-layer residual context network for context feature extraction to obtain a printing area context feature map for each printed surface, includes:
[0013] Multiple image acquisition terminals are installed on the packaging box processing production line, and multiple calibration images are acquired based on the multiple image acquisition terminals;
[0014] Coordinates are extracted from the multiple calibration images to obtain a coordinate dataset corresponding to each calibration image, and parameters of the multiple image acquisition terminals are calibrated based on the coordinate dataset.
[0015] Multiple image acquisition terminals, after parameter calibration, acquire initial printed images of multiple printed surfaces in the target packaging box.
[0016] The initial printed image is corrected to obtain a packaging box printed image, and the packaging box printed image is input into a preset two-layer residual context network, wherein each layer of the residual context network includes a convolutional layer, a residual block, a batch normalization layer and an activation function;
[0017] The packaging box printing image is subjected to contextual feature extraction through the first layer of the two-layer residual context network to obtain shallow contextual information;
[0018] The shallow context information and the printed image of the packaging box are input into the second layer of the two-layer residual context network for context feature extraction, resulting in a context feature map of the printing area for each printed surface.
[0019] In conjunction with the first aspect, in a second implementation of the first aspect of the present invention, the step of inputting the printing area context feature map of each printed surface into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion to obtain the printing area fusion feature map of each printed surface includes:
[0020] The context feature map of the printing area of each printing surface is input into the coordinate attention mechanism layer for attention region segmentation, resulting in multiple coordinate attention regions for each printing surface.
[0021] The coordinate attention mechanism layer performs weight analysis on the multiple coordinate attention regions to obtain the attention weight of each coordinate attention region;
[0022] Based on the attention weights, the multiple coordinate attention regions are fused using an attention mechanism to generate a printing region coordinate attention feature map for each printing surface;
[0023] The printed area coordinate attention feature map is input into the residual context network for deep feature extraction to obtain the printed area fusion feature map of each printed surface.
[0024] In conjunction with the first aspect, in a third implementation of the first aspect of the present invention, the step of performing feature image aggregation on the fused feature map of the printing area of each printing surface and the packaging box printing image to obtain a target printing aggregated image for each printing surface includes:
[0025] For each printed area, the feature map of the fused area and the packaging box printing image are matched in terms of feature map size and resolution to obtain the target matching result;
[0026] Based on the target matching result, pixel extraction is performed on the fused feature map of the printing area to obtain a first pixel set, and pixel extraction is performed on the printed image of the packaging box to obtain a second pixel set;
[0027] Pixel matching is performed on the first pixel set and the second pixel set to obtain multiple pixel pairs;
[0028] Based on the multiple pixels, the fusion feature map of the printing area and the printing image of the packaging box are pixel-aggregated to obtain the target printing aggregated image of each printing surface.
[0029] In conjunction with the first aspect, in the fourth implementation of the first aspect of the present invention, the step of inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model for packaging box printing detection, and obtaining the packaging box printing detection result for each printed surface, includes:
[0030] The target printed aggregate image of each printed surface is input into a preset packaging box printing detection model, wherein the packaging box printing detection model includes a first convolutional long short-time network, a second convolutional long short-time network, and two fully connected networks.
[0031] The first convolutional long short-time network is used to perform convolutional feature operations on the target printed aggregate image to obtain the first convolutional feature map;
[0032] The first convolutional feature map is input into the second convolutional short-time network for high-dimensional feature mapping to obtain the second convolutional feature map;
[0033] The second convolutional feature map is processed by the two-layer fully connected network to detect the printing quality of the packaging box, and the printing detection results of each printed surface are obtained. The printing detection results include the printing problem type and location information of each printed surface.
[0034] In conjunction with the first aspect, in a fifth implementation of the first aspect of the present invention, the step of encoding the printing process parameters of the plurality of printing surfaces to obtain printing process encoding data for each printing surface, and constructing a target process encoding matrix based on the packaging box printing inspection results of each printing surface and the printing process encoding data, includes:
[0035] Obtain the printing process parameters for the multiple printing surfaces, wherein the printing process parameters include: color configuration, printing speed, temperature setting, and printing pressure;
[0036] The printing process parameters of the multiple printing surfaces are encoded respectively to obtain the printing process encoding data of each printing surface;
[0037] The inspection results of the packaging box printing on each printed surface are encoded to obtain the inspection result code data for each printed surface;
[0038] The printing process coding data and the detection result coding data of each printed surface are discretized to obtain the discrete coding sequence of the printing process and the discrete coding sequence of the detection result.
[0039] The discrete coding sequence of the printing process and the discrete coding sequence of the detection result are matrix transformed to obtain the target process coding matrix.
[0040] In conjunction with the first aspect, in the sixth implementation of the first aspect of the present invention, the step of inputting the target process coding matrix into a preset packaging box printing process analysis model to optimize the packaging box printing process and obtain target packaging box printing process data includes:
[0041] The target process coding matrix is input into a preset packaging box printing process analysis model, wherein the packaging box printing process analysis model includes: an encoding network and a decoding network, the encoding network includes a bidirectional threshold loop network, and the decoding network includes a unidirectional threshold loop network and a prediction layer;
[0042] The target process feature matrix is obtained by performing process feature operations on the target process coding matrix through a bidirectional threshold cyclic network in the coding network.
[0043] The target process feature matrix is reduced in dimensionality by using a one-way threshold recurrent network in the decoding network to obtain a low-dimensional process feature matrix.
[0044] The low-dimensional process feature matrix is used to predict the packaging box printing process through the prediction layer in the decoding network to obtain the target packaging box printing process data.
[0045] A second aspect of the present invention provides an image-based packaging box processing and inspection device, the image-based packaging box processing and inspection device comprising:
[0046] The acquisition module is used to acquire packaging box printing images of multiple printing surfaces in the target packaging box from the packaging box processing production line, and input the packaging box printing images into a preset two-layer residual context network for context feature extraction to obtain the printing area context feature map of each printing surface.
[0047] The fusion module is used to input the printing area context feature map of each printing surface into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion, so as to obtain the printing area fusion feature map of each printing surface.
[0048] The aggregation module is used to aggregate the feature maps of the printing areas of each printing surface and the packaging box printing image to obtain the target printing aggregated image of each printing surface.
[0049] The detection module is used to input the target printed aggregate image of each printed surface into the preset packaging box printing detection model to perform packaging box printing detection and obtain the packaging box printing detection result for each printed surface.
[0050] The encoding module is used to encode the printing process parameters of the multiple printing surfaces respectively, to obtain the printing process encoding data of each printing surface, and to construct a target process encoding matrix based on the packaging box printing inspection results of each printing surface and the printing process encoding data.
[0051] The optimization module is used to input the target process coding matrix into a preset packaging box printing process analysis model to optimize the packaging box printing process and obtain target packaging box printing process data.
[0052] A third aspect of the present invention provides an image-based packaging box processing and inspection device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the image-based packaging box processing and inspection device to perform the above-described image-based packaging box processing and inspection method.
[0053] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described image-based packaging box processing and inspection method.
[0054] The technical solution provided by this invention involves inputting a pre-set two-layer residual context network into a packaging box printing image for context feature extraction, resulting in a printing area context feature map; performing coordinate attention feature extraction and feature fusion to obtain a printing area fusion feature map; performing feature image aggregation to obtain a target printing aggregated image; performing packaging box printing detection through a packaging box printing detection model to obtain packaging box printing detection results; performing encoding to obtain printing process encoding data, and constructing a target process encoding matrix based on the packaging box printing detection results and printing process encoding data; inputting the target process encoding matrix into a packaging box printing process analysis model for packaging box printing process optimization to obtain target packaging box printing process data. This invention utilizes deep learning technology and context feature extraction to achieve high-precision detection of packaging box printing quality. Through models such as convolutional neural networks, the problem types and locations on the printing surface can be accurately identified, thereby reducing false alarm rates and false negative rates. Real-time monitoring of packaging box printing quality requires no manual intervention. This allows for timely detection of problems during production and the implementation of corrective measures, thereby reducing the defect rate and the generation of non-conforming products. Its automation features make it suitable for high-volume production lines. Automated detection and real-time feedback can improve the automation level of the production line, reduce reliance on manual operation, and lower production costs. It also allows for the analysis of printing process parameters. By coding and analyzing these parameters, strong support can be provided for optimizing the printing process, improving the accuracy of packaging box printing, and ultimately enhancing printing efficiency and quality. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of an embodiment of the image-based packaging box processing and detection method of the present invention;
[0056] Figure 2 This is a flowchart of coordinate attention feature extraction and feature fusion in an embodiment of the present invention;
[0057] Figure 3 This is a flowchart of feature image aggregation in an embodiment of the present invention;
[0058] Figure 4 This is a flowchart of the packaging box printing inspection process in an embodiment of the present invention;
[0059] Figure 5 This is a schematic diagram of one embodiment of the image-based packaging box processing and inspection device of the present invention;
[0060] Figure 6 This is a schematic diagram of one embodiment of the image-based packaging box processing and inspection equipment of the present invention. Detailed Implementation
[0061] This invention provides an image-based method, apparatus, device, and storage medium for inspecting packaging box processing, aimed at improving the accuracy of packaging box printing and processing. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0062] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the image-based packaging box processing detection method of the present invention includes:
[0063] S101. Collect packaging box printing images of multiple printing surfaces in the target packaging box from the packaging box processing production line, and input the packaging box printing images into a pre-set two-layer residual context network for context feature extraction to obtain the printing area context feature map of each printing surface.
[0064] It is understood that the executing entity of this invention can be an image-based packaging box processing and inspection device, or it can be a terminal or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0065] Specifically, multiple image acquisition terminals are installed on the packaging box processing production line to capture printed images of multiple printed surfaces of the target packaging box. These image acquisition terminals can be cameras or other image capture devices. Multiple calibration images need to be acquired to calibrate the image acquisition terminals and ensure that the acquired images have accurate spatial coordinate information. For example, suppose five cameras capture images of different printed surfaces. The server acquires 10 calibration images to calibrate these five cameras. By extracting coordinates from these calibration images, the server obtains a coordinate dataset corresponding to each calibration image. These coordinate datasets contain the coordinate information of specific points in the calibration images. The server uses these coordinate datasets to calibrate the parameters of each image acquisition terminal to ensure that their image acquisition is accurate. The server uses the multiple parameter-calibrated image acquisition terminals to acquire initial printed images of multiple printed surfaces of the target packaging box. These initial printed images include images from different angles and positions, thus requiring subsequent image correction steps. During the image correction stage, the server processes the initial printed images to obtain accurate printed images of the packaging box. This may include correcting perspective transformations, removing image distortion, and other operations. The server then obtains printed images of the packaging box for each printed surface. The server inputs these packaging box printing images into a pre-built two-layer residual context network. This network has two main parts: a first-layer residual context network and a second-layer residual context network. Each residual context network includes convolutional layers, residual blocks, batch normalization layers, and activation functions for extracting contextual features. The server extracts contextual features from the packaging box printing images using the first-layer residual context network. This step yields shallow contextual information containing the basic features of the image. This shallow contextual information, along with the original packaging box printing image, is input into the second-layer residual context network for further extraction of contextual features. This stage yields a printing area contextual feature map for each printed surface, containing higher-level feature representations that aid in subsequent processing. For example, for a packaging box printing image, the first-layer residual context network can capture features such as edges, colors, and basic textures. The second-layer residual context network can further analyze these features and capture more complex patterns and structures, thus obtaining the printing area contextual feature map.
[0066] S102. Input the printing area context feature map of each printing surface into the coordinate attention mechanism layer and the residual context network to extract coordinate attention features and fuse features, so as to obtain the printing area fused feature map of each printing surface.
[0067] Specifically, the contextual feature map of the printing area for each printed surface is input into the coordinate attention mechanism layer. The main function of the coordinate attention mechanism layer is to segment the image into multiple coordinate attention regions. These regions can be different parts of the image, automatically determined based on the image content. For example, suppose a printed image of a packaging box includes the front, back, and sides. The coordinate attention mechanism layer can segment the image into three distinct coordinate attention regions, each corresponding to a different printing surface. Weight analysis is performed on each coordinate attention region through the coordinate attention mechanism layer. A weight is calculated for each region, representing its importance within the entire image. These weights can be determined based on the features and contextual information within the region. For example, for the front printed surface, the coordinate attention mechanism can analyze features related to the front in the image, such as the density and color of text and patterns. Based on these features, the attention weight for the front region can be calculated. Based on the obtained attention weights, multiple coordinate attention regions are fused using the attention mechanism. The features of different regions are weighted and combined according to their weights to generate a coordinate attention feature map of the printing area for each printed surface. This step emphasizes the features of important regions while weakening the features of less important regions. For example, if the foreground printed area dominates the entire image, then features from that area will have higher weights in the print area coordinate attention feature map, while features from other areas will have lower weights. The print area coordinate attention feature map is then input into a residual context network for deep feature extraction. The residual context network further analyzes and extracts the print area features of each printed surface, resulting in a fused print area feature map for each surface. This feature map contains high-level, feature-fused, and deeply processed information for subsequent packaging box printing inspection and process optimization.
[0068] S103. Perform feature image aggregation on the fused feature map of the printing area of each printing surface and the packaging box printing image to obtain the target printing aggregated image of each printing surface;
[0069] It's important to note that the size and resolution of the printed area fusion feature map and the packaging box printed image must match. This is because these two images come from different sources or have undergone different processing, so they need to be resized to the same size and resolution for subsequent pixel matching and aggregation. For example, assuming the printed area fusion feature map is 500x500 pixels and the packaging box printed image is 800x600 pixels, they need to be resized to the same size, such as 500x500 pixels, to ensure matching accuracy. Before feature image aggregation, the printed area fusion feature map and the packaging box printed image are aligned based on the target matching result. This can be achieved by calculating the transformation or offset between them. The target matching result typically includes translation, rotation, and scaling information required for image alignment. For example, if the target matching result determines that the printed area fusion feature map needs to be translated 20 pixels to the left and rotated 10 degrees counterclockwise to align with the packaging box printed image, then these transformations will be applied to the printed area fusion feature map. Based on the target matching result, pixel extraction can be performed on the printed area fusion feature map and the packaging box printed image. Pixel values are extracted from each image for subsequent pixel matching. Pixel matching involves mapping pixels in a fused feature map of printed areas to pixels in a printed packaging image. This can be achieved using various matching algorithms and techniques, such as nearest neighbor matching, feature-based matching, or deep learning methods. For example, suppose a server wants to match similar text regions in two images. The server finds pixel pairs between them by calculating the similarity of the text pixels in the two images. Based on the obtained pixel pairs, pixel aggregation can be performed to generate a target printed aggregate image for each printed surface. This step involves merging or fusing the matched pixel values from the fused feature map of printed areas and the printed packaging image to obtain the final printed surface image. For example, if the server has successfully matched similar text regions in two images, then the server extracts the pixel values of these regions from the two images and merges them into a single target printed aggregate image according to certain rules. This target printed aggregate image will contain information from both images to aid in subsequent printed packaging detection.
[0070] S104. Input the target printing aggregated image of each printing surface into the preset packaging box printing detection model to perform packaging box printing detection, and obtain the packaging box printing detection result of each printing surface.
[0071] Specifically, a pre-built packaging box printing detection model is prepared. This model can be a deep learning model, such as a convolutional neural network (CNN), for printing quality detection. The model can include multiple layers for extracting features from the image and performing detection. The packaging box printing detection model includes the following parts: a first convolutional long short-term network, a second convolutional long short-term network, and two fully connected networks. The target printed aggregate image for each printed surface is input into the pre-built packaging box printing detection model. These images were generated in the previous steps and contain comprehensive information for each printed surface. Convolutional feature operations are performed on the target printed aggregate image through the first convolutional long short-term network. Convolutional layers can capture various features in the image, such as edges, textures, and shapes. These features help the model understand the content of the printed surface. For example, the first convolutional long short-term network extracts features from the target printed aggregate image of the printed surface, such as detecting text, patterns, and colors. The first convolutional feature map is input into the second convolutional long short-term network for high-dimensional feature mapping. This step further extracts abstract features from the image, helping to more accurately understand the content and structure of the printed surface. For example, the second convolutional short-time network maps abstract features from the first convolutional feature map, such as recognizing text arrangement and pattern complexity. The second convolutional feature map is then processed by a two-layer fully connected network for packaging box printing quality inspection. This step involves mapping abstract features to a space of problem type and location information, generating the final packaging box printing inspection result. For example, the two-layer fully connected network can transform abstract features into problem type (such as blurred text, color deviation, etc.) and location information (such as where the problem occurs in the image).
[0072] S105. Encode the printing process parameters of multiple printing surfaces to obtain the printing process coding data of each printing surface, and construct the target process coding matrix based on the packaging box printing inspection results and printing process coding data of each printing surface.
[0073] Specifically, the printing process parameters for multiple printing surfaces are acquired. These parameters typically include various settings and configurations during the printing process, such as color configuration, printing speed, temperature setting, and printing pressure. The printing process parameters for each printing surface are then encoded. The purpose of encoding is to convert continuous process parameters into discrete numbers or symbols for subsequent data processing. Encoding can employ different methods, such as mapping parameter values to a finite discrete set. For example, for color configuration parameters, different color configurations can be mapped to numerical codes, such as 1 for red, 2 for blue, 3 for green, etc. Similar encoding can be applied to parameters such as printing speed, temperature setting, and printing pressure. Simultaneously, the packaging box printing inspection results for each printing surface are encoded. The purpose of encoding the inspection results is to convert the type and location information of printing quality problems into discrete numbers or symbols for subsequent data processing and analysis. For example, a detected blurry text problem can be encoded as 1; a color deviation problem can be encoded as 2. Location information can be represented using coordinate encoding; for example, a problem appearing in the upper left corner of the image can be encoded as 3, and one appearing in the middle can be encoded as 4, etc. The coded data of printing process parameters and inspection results are discretized. Continuous coded values are mapped to a finite discrete coded sequence to reduce data complexity. For example, if the coding range of printing speed is 0 to 100, it can be divided into several discrete intervals, such as 0-20, 21-40, 41-60, etc. Similarly, a similar process can be performed on the coded data of inspection results. A target process coding matrix is constructed by performing matrix transformation on the discrete coding sequences of printing process and inspection results. This matrix integrates the printing process parameters and inspection result codes for each printed surface for further analysis and decision-making. For example, suppose there are two printed surfaces, each with color configuration, printing speed, and inspection result coding data. When constructing the target process coding matrix, this data can be arranged into a matrix where each row represents a printed surface and the columns represent different parameters and inspection results. Through this target process coding matrix, correlation analysis between printing quality problems and process parameters can be performed to help improve the printing process and quality control.
[0074] S106. Input the target process coding matrix into the preset packaging box printing process analysis model to optimize the packaging box printing process and obtain the target packaging box printing process data.
[0075] Specifically, a pre-built packaging box printing process analysis model is prepared. This model is a deep learning model, typically including an encoding network and a decoding network. The packaging box printing process analysis model includes a bidirectional gated recurrent network (Bi-GRU) as the encoding network, and a unidirectional gated recurrent network (Uni-GRU) and a prediction layer as the decoding network. The target process encoding matrix is input into the pre-built packaging box printing process analysis model. The target process encoding matrix contains encoded data of printing process parameters and detection results for multiple printing surfaces, used for process optimization. Process feature operations are performed on the target process encoding matrix through the bidirectional gated recurrent network (Bi-GRU) in the encoding network. The bidirectional gated recurrent network has the ability to capture contextual information in sequential data and extract process features. For example, the bidirectional gated recurrent network can learn the correlation between different printing process parameters and the relationship between these parameters and printing detection results, thereby generating the target process feature matrix. Feature dimensionality reduction of the target process feature matrix is performed through the unidirectional gated recurrent network (Uni-GRU) in the decoding network. One-way threshold recurrent networks (TNRs) help reduce the dimensionality of process features, thereby extracting more informative features. For example, a TNR can map a high-dimensional target process feature matrix to a low-dimensional process feature matrix, reducing data complexity and computational cost. The low-dimensional process feature matrix is then used to predict the packaging box printing process through a prediction layer in the decoding network. The prediction layer is a neural network layer used to map process features to target packaging box printing process data, including optimal configurations of various process parameters. For example, the prediction layer can transform low-dimensional process features into specific process parameter values, such as optimal color configuration, printing speed, temperature setting, and printing pressure, to optimize the printing process. For example, suppose the encoding matrix contains encoded data of printing process parameters and detection results for multiple printing surfaces. The model first performs process feature operations on the encoding matrix through a two-way threshold recurrent network to extract the relationship between process parameters and detection results. The dimensionality of the process features is then reduced through a one-way threshold recurrent network. The prediction layer maps the low-dimensional process features to the optimal packaging box printing process configuration to achieve process optimization.
[0076] In this embodiment of the invention, the printed image of the packaging box is input into a pre-set two-layer residual context network for context feature extraction to obtain a context feature map of the printing area; coordinate attention feature extraction and feature fusion are performed to obtain a fused feature map of the printing area; feature image aggregation is performed to obtain a target printed aggregate image; packaging box printing is detected through a packaging box printing detection model to obtain packaging box printing detection results; encoding is performed to obtain printing process encoding data, and a target process encoding matrix is constructed based on the packaging box printing detection results and printing process encoding data; the target process encoding matrix is input into a packaging box printing process analysis model for packaging box printing process optimization to obtain target packaging box printing process data. This invention utilizes deep learning technology and context feature extraction to achieve high-precision detection of packaging box printing quality. Through models such as convolutional neural networks, the problem type and location of the printing surface can be accurately identified, thereby reducing the false alarm rate and false negative rate. Real-time monitoring of the printing quality of the packaging box is achieved without manual intervention. This allows for timely detection of problems during the production process and the implementation of corrective measures, thereby reducing the defect rate and the generation of non-conforming products. Its automation features make it suitable for high-volume production lines. Automated detection and real-time feedback can improve the automation level of the production line, reduce reliance on manual operation, and lower production costs. It also allows for the analysis of printing process parameters. By coding and analyzing these parameters, strong support can be provided for optimizing the printing process, improving the accuracy of packaging box printing, and ultimately enhancing printing efficiency and quality.
[0077] In one specific embodiment, the process of performing step S101 may specifically include the following steps:
[0078] (1) Install multiple image acquisition terminals on the packaging box processing production line, and acquire multiple calibration images based on the multiple image acquisition terminals;
[0079] (2) Extract coordinates from multiple calibration images to obtain the coordinate dataset corresponding to each calibration image, and calibrate the parameters of multiple image acquisition terminals based on the coordinate dataset;
[0080] (3) Multiple image acquisition terminals, after parameter calibration, acquire initial printed images of multiple printed surfaces in the target packaging box respectively;
[0081] (4) Perform image correction on the initial printed image to obtain the printed image of the packaging box, and input the printed image of the packaging box into a preset two-layer residual context network, wherein each layer of the residual context network includes a convolutional layer, a residual block, a batch normalization layer and an activation function;
[0082] (5) Contextual features are extracted from the packaging box printing image through the first layer of the two-layer residual context network to obtain shallow contextual information;
[0083] (6) Input the shallow context information and the packaging box printing image into the second layer of the two-layer residual context network to extract context features and obtain the printing area context feature map of each printing surface.
[0084] Specifically, multiple image acquisition terminals are installed on the packaging box processing production line. These terminals can be cameras or other image acquisition devices. These terminals are used to capture printed images of the target packaging box. Multiple calibration images are acquired using these terminals. Calibration images are typically pre-calibrated images used for subsequent image processing and coordinate extraction. These images may contain known reference objects or markers for coordinate calibration. Coordinate extraction is performed on the multiple calibration images to obtain a coordinate dataset corresponding to each calibration image. These coordinate datasets may contain coordinate information of reference points or feature points on the calibration images. Based on these coordinate datasets, the parameters of the multiple image acquisition terminals are calibrated to adjust their position and viewing angle. Using the calibrated multiple image acquisition terminals, initial printed images of multiple printed surfaces in the target packaging box are acquired. These images are the raw images to be processed, containing distortion and noise. Image correction is performed on the initial printed images to correct any distortion and noise. Image correction may include steps such as geometric correction, distortion correction, and noise reduction to ensure high-quality printed images of the packaging box. The corrected packaging box printing image is input into a pre-defined two-layer residual context network, where each layer includes a convolutional layer, a residual block, a batch normalization layer, and an activation function. The first layer of the two-layer residual context network extracts context features from the packaging box printing image, obtaining shallow context information. This shallow context information and the packaging box printing image are then input into the second layer of the two-layer residual context network for further context feature extraction, resulting in a context feature map of the printing area for each printed surface.
[0085] In one specific embodiment, such as Figure 2 As shown, the process of executing step S102 can specifically include the following steps:
[0086] S201. Input the context feature map of the printing area of each printing surface into the coordinate attention mechanism layer to perform attention region segmentation, and obtain multiple coordinate attention regions for each printing surface.
[0087] S202. Perform weight analysis on multiple coordinate attention regions through the coordinate attention mechanism layer to obtain the attention weight of each coordinate attention region;
[0088] S203. Based on attention weights, multiple coordinate attention regions are fused using an attention mechanism to generate a coordinate attention feature map of the printing area for each printing surface.
[0089] S204. Input the printing area coordinate attention feature map into the residual context network for deep feature extraction to obtain the printing area fusion feature map of each printing surface.
[0090] Specifically, the server inputs the printing region context feature map of each printed surface into the coordinate attention mechanism layer. These feature maps are generated by the residual context network mentioned above and reflect the contextual information of the printing region. The coordinate attention mechanism layer is used to segment the printing region context feature map into multiple coordinate attention regions. These regions can be regions at different locations so that the system can focus on different local features in the image. Weight analysis is performed on the multiple coordinate attention regions through the coordinate attention mechanism layer. The goal of this step is to determine which regions are more important in a specific task. This typically involves calculating the attention weight of each coordinate attention region to reflect its contribution to feature extraction. Based on the attention weights, attention mechanism fusion is performed on the multiple coordinate attention regions. The goal of this step is to generate a printing region coordinate attention feature map for each printed surface, which emphasizes important regions for subsequent feature extraction. The printing region coordinate attention feature map is input into the residual context network for deep feature extraction. This network can include convolutional layers, residual blocks, batch normalization layers, and activation functions to further extract high-level feature information. For example, suppose the printed image contains different printing problems, such as uneven color, blurred text, etc. The server inputs the printing region context feature map of each printed surface into the coordinate attention mechanism layer. This layer segments the image into multiple coordinate attention regions and calculates an attention weight for each region. For example, a region containing uneven color distribution receives a higher attention weight. Through this attention weight-based mechanism, the server fuses features from different regions to generate a print area coordinate attention feature map. This feature map highlights regions in the printed image that contain important information. The print area coordinate attention feature map is then fed into a residual context network, which applies deep learning techniques to feature extraction for further analysis and identification of printing problems. For example, the network can identify regions of uneven color distribution; further detection and analysis include determining the specific type of problem (e.g., the cause of the color mismatch) and its location (on which printed surface).
[0091] In one specific embodiment, such as Figure 3 As shown, the process of executing step S103 can specifically include the following steps:
[0092] S301. For each printed surface, the feature map of the fused printing area and the packaging box printing image are matched in terms of feature map size and resolution to obtain the target matching result;
[0093] S302. Based on the target matching results, perform pixel extraction on the fused feature map of the printing area to obtain the first pixel set, and perform pixel extraction on the packaging box printing image to obtain the second pixel set.
[0094] S303. Perform pixel matching on the first pixel set and the second pixel set to obtain multiple pixel pairs;
[0095] S304. Perform pixel aggregation on the fusion feature map of the printing area and the packaging box printing image based on multiple pixels to obtain the target printing aggregated image for each printing surface.
[0096] Specifically, the server ensures that the size and resolution of the fused feature map of the printed area and the printed image of the packaging box match. This is to ensure that both have the same image size and sharpness for subsequent pixel matching and aggregation. Based on the matching results of the feature maps, it determines how to extract pixels from the fused feature map of the printed area and the printed image of the packaging box. This matching result includes the position and orientation information of each printed surface in the image. Based on the target matching results, pixel extraction is performed on the fused feature map of the printed area to obtain a first pixel set. Simultaneously, pixel extraction is performed on the printed image of the packaging box to obtain a second pixel set. These pixel sets contain pixel values in the image, which can represent different features. Pixel matching is performed on the first pixel set and the second pixel set. The goal of this step is to find corresponding pixels between the two images to establish a relationship between them. Matching can be based on the similarity of pixel values, distance metrics, or other features. Based on multiple pixel pairs, pixel aggregation is performed on the fused feature map of the printed area and the printed image of the packaging box. This step fuses the information of the two images together to generate a target printed aggregated image for each printed surface. Aggregation can employ different methods, such as pixel-weighted averaging or other image fusion techniques, to obtain the final target printed aggregated image. For example, suppose the printed area fusion feature map contains text features, and the packaging box print image is the original packaging box image. Ensure that both have matching resolutions and sizes for pixel-level matching. The server determines the position of each printed surface in the packaging box print image based on the target matching results. Based on this positional information, the server extracts pixels from the printed area fusion feature map and the packaging box print image. The server matches the extracted pixels to establish pixel correspondences between them. For example, the server determines the matching relationship by comparing the similarity of pixel values. Based on the matched pixel pairs, the server performs pixel aggregation on the printed area fusion feature map and the packaging box print image. This aggregation process combines text features with the original image to generate a target printed aggregate image for each printed surface, where the text has already been mapped to the packaging box image.
[0097] In one specific embodiment, such as Figure 4 As shown, the process of executing step S104 can specifically include the following steps:
[0098] S401. Input the target printing aggregated image of each printing surface into the preset packaging box printing detection model, wherein the packaging box printing detection model includes a first convolutional long short-time network, a second convolutional long short-time network and two fully connected networks.
[0099] S402. Perform convolution feature operations on the target printed aggregate image through the first convolutional long short-time network to obtain the first convolutional feature map;
[0100] S403. Input the first convolutional feature map into the second convolutional long short-time network to perform high-dimensional feature mapping, and obtain the second convolutional feature map;
[0101] S404. The second convolutional feature map is processed by a two-layer fully connected network to detect the printing quality of the packaging box, and the printing detection results of each printed surface are obtained. The printing detection results include the printing problem type and location information of each printed surface.
[0102] Specifically, the server inputs the target printed aggregate image for each printed surface into a pre-built packaging box printing detection model. This model is a deep learning model designed to detect printing problems and determine their locations. Convolutional feature operations are performed on the target printed aggregate image through a first convolutional long short-term memory (LSTM) network. CNN-LSTM is a deep learning network that combines convolutional layers and long short-term memory (LSTM) layers to extract spatial and temporal features from the image. Convolutional layers are used to extract static features, while LSTM layers are used to model temporal information in the image. For example, suppose the target printed aggregate image is a packaging box image containing printing problems. The CNN-LSTM network can detect specific problem regions in the image, such as blurred text or uneven color. The first convolutional feature map is then input into a second convolutional LSTM network for high-dimensional feature mapping. The goal of the second CNN-LSTM network is to further extract high-level features and gain a deeper understanding of the problems in the image. For example, after the first convolutional LSTM network, the second convolutional LSTM network can learn more abstract features, such as the shape and texture of the printing problems, to more accurately identify the problems. Packaging box printing quality detection is performed on the second convolutional feature map using a two-layer fully connected network. The fully connected network maps abstract features to problem type and location information to obtain packaging box printing detection results for each printed surface. For example, the fully connected network can output the problem type (e.g., color mismatch) and the problem location information (where in the image it is), thus providing detailed printing problem diagnosis.
[0103] In one specific embodiment, the process of executing step S105 may specifically include the following steps:
[0104] (1) Obtain the printing process parameters for multiple printing surfaces, including: color configuration, printing speed, temperature setting and printing pressure;
[0105] (2) The printing process parameters of multiple printing surfaces are encoded respectively to obtain the printing process code data of each printing surface;
[0106] (3) Code the inspection results of the packaging box printing on each printed surface to obtain the inspection result code data for each printed surface;
[0107] (4) Discretize the printing process coding data and the detection result coding data of each printing surface to obtain the discrete coding sequence of the printing process and the discrete coding sequence of the detection result;
[0108] (5) Perform matrix transformation on the discrete coding sequence of printing process and the discrete coding sequence of detection result to obtain the target process coding matrix.
[0109] Specifically, process parameters are obtained from the printing process across multiple printing surfaces. These parameters include color configuration, printing speed, temperature setting, and printing pressure. Each printing surface has its corresponding set of process parameters. For example, suppose there are three printing surfaces (surface 1, surface 2, and surface 3). The server records the color configuration, printing speed, temperature setting, and printing pressure for each printing surface. The process parameters for each printing surface are encoded to convert them into digital form. Encoding can be done in different ways, such as using one-hot encoding or other encoding methods. For example, for color configuration, one-hot encoding can be used to convert different color options into numbers, such as "red" encoded as [1, 0, 0], "green" encoded as [0, 1, 0], and "blue" encoded as [0, 0, 1]. Similar encoding methods can be used for parameters such as printing speed, temperature setting, and printing pressure. The packaging box printing inspection results for each printing surface are encoded and converted into digital form for subsequent processing. The encoding method can vary depending on the type of inspection results; for example, different encoding methods can be used if there are different types of printing problems. For example, suppose the server's detection results include issues such as "blurred text," "color mismatch," and "image shift." The server uses numerical codes to represent these issues; for example, "blurred text" is encoded as 1, "color mismatch" as 2, and "image shift" as 3. The printing process coding data and the detection result coding data are discretized. This step can be done using a suitable method depending on the specific needs, such as dividing a continuous numerical range into discrete intervals or converting the labels of multi-category issues into binary codes. For example, if the printing speed parameter varies continuously between 0 and 100, the server divides it into several discrete speed ranges, such as "slow," "medium," and "fast." Similarly, for the detection result coding data, the server converts it into binary codes to represent the presence or absence of each issue. A matrix transformation is then performed on the discretized printing process coding data and the detection result coding data to construct the target process coding matrix. Each row of this matrix represents a printing surface, and each column represents a process parameter or detection result. For example, suppose the server has three printing surfaces (surface 1, face 2, face 3), three process parameters (color configuration, printing speed, temperature setting), and three detection results ("blurred text", "color mismatch", "image offset"). The server constructs a 3x6 target process coding matrix, where each row contains the process parameter code and detection result code for each printing surface.
[0110] In one specific embodiment, the process of executing step S106 may specifically include the following steps:
[0111] (1) Input the target process coding matrix into the preset packaging box printing process analysis model, wherein the packaging box printing process analysis model includes: coding network and decoding network, the coding network includes a bidirectional threshold loop network, and the decoding network includes a unidirectional threshold loop network and a prediction layer;
[0112] (2) Perform process feature operations on the target process coding matrix through a bidirectional threshold cyclic network in the coding network to obtain the target process feature matrix;
[0113] (3) The target process feature matrix is reduced in dimension by using a one-way threshold recurrent network in the decoding network to obtain a low-dimensional process feature matrix;
[0114] (4) The low-dimensional process feature matrix is predicted by the prediction layer in the decoding network to obtain the target packaging box printing process data.
[0115] Specifically, the target process encoding matrix is input into a pre-built packaging box printing process analysis model. This model includes an encoding network and a decoding network for learning and predicting printing process parameters. The encoding network's task is to extract process features from the target process encoding matrix. To better capture contextual information in the sequence data, a bidirectional gated recurrent network (Bi-LSTM) is used. This network can simultaneously consider forward and backward sequence information. For example, if each row of the target process encoding matrix represents a printing surface, then Bi-LSTM can learn the relationships between different printing surfaces and their trends in process parameters. For example, it can capture the synergistic effect of process parameters between adjacent printing surfaces. The decoding network's task is to reduce the dimensionality of the process features obtained from the encoding network and make printing process predictions. The decoding network includes a unidirectional gated recurrent network (LSTM) and a prediction layer. The LSTM layer is used to reduce the dimensionality of the process feature matrix, transforming it into a low-dimensional process feature matrix. The LSTM layer helps the model capture more abstract process features. The prediction layer is used to predict printing process parameters from the low-dimensional process feature matrix. This can be a fully connected neural network, with the structure of the output layer determined according to the specific problem. For example, suppose the server's goal is to predict the printing speed for each printed surface. An LSTM layer can reduce the dimensionality of the process features obtained from a Bi-LSTM, and then the prediction layer can output the printing speed for each printed surface. The decoding network obtains the target packaging box printing process data. This data includes the predicted printing process parameters, such as printing speed, temperature settings, and other relevant information. For instance, if the model successfully predicts the printing speed, the server obtains the printing speed for each printed surface from the decoding network, which becomes part of the target packaging box printing process data. This data can be used to optimize the printing process to ensure optimal control over the printing quality and efficiency of each printed surface.
[0116] The above describes the image-based packaging box processing and inspection method in the embodiments of the present invention. The following describes the image-based packaging box processing and inspection device in the embodiments of the present invention. Please refer to [link / reference]. Figure 5 One embodiment of the image-based packaging box processing and inspection device of the present invention includes:
[0117] The acquisition module 501 is used to acquire packaging box printing images of multiple printing surfaces in the target packaging box from the packaging box processing production line, and input the packaging box printing images into a preset two-layer residual context network for context feature extraction to obtain the printing area context feature map of each printing surface.
[0118] The fusion module 502 is used to input the printing area context feature map of each printing surface into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion, so as to obtain the printing area fusion feature map of each printing surface.
[0119] The aggregation module 503 is used to perform feature image aggregation on the fusion feature map of the printing area of each printing surface and the packaging box printing image to obtain the target printing aggregation image of each printing surface.
[0120] The detection module 504 is used to input the target printing aggregate image of each printing surface into the preset packaging box printing detection model to perform packaging box printing detection and obtain the packaging box printing detection result of each printing surface.
[0121] The encoding module 505 is used to encode the printing process parameters of the multiple printing surfaces respectively, to obtain the printing process encoding data of each printing surface, and to construct a target process encoding matrix based on the packaging box printing inspection results of each printing surface and the printing process encoding data.
[0122] The optimization module 506 is used to input the target process coding matrix into a preset packaging box printing process analysis model to optimize the packaging box printing process and obtain target packaging box printing process data.
[0123] Through the collaborative efforts of the aforementioned components, the printed image of the packaging box is input into a pre-set two-layer residual context network for context feature extraction, resulting in a context feature map of the printing area; coordinate attention feature extraction and feature fusion are performed to obtain a fused feature map of the printing area; feature image aggregation is performed to obtain a target printed aggregate image; packaging box printing detection is performed through a packaging box printing detection model to obtain packaging box printing detection results; encoding is performed to obtain printing process encoding data, and a target process encoding matrix is constructed based on the packaging box printing detection results and printing process encoding data; the target process encoding matrix is input into a packaging box printing process analysis model for packaging box printing process optimization to obtain target packaging box printing process data. This invention utilizes deep learning technology and context feature extraction to achieve high-precision detection of packaging box printing quality. Through models such as convolutional neural networks, the problem types and locations on the printing surface can be accurately identified, thereby reducing false alarm rates and false negative rates. Real-time monitoring of packaging box printing quality requires no manual intervention. This allows for timely detection of problems during the production process and the implementation of corrective measures, thereby reducing the defect rate and the generation of non-conforming products. Its automation features make it suitable for high-volume production lines. Automated detection and real-time feedback can improve the automation level of the production line, reduce reliance on manual operation, and lower production costs. It also allows for the analysis of printing process parameters. By coding and analyzing these parameters, strong support can be provided for optimizing the printing process, improving the accuracy of packaging box printing, and ultimately enhancing printing efficiency and quality.
[0124] above Figure 5 The image-based packaging box processing and inspection device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The image-based packaging box processing and inspection equipment in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0125] Figure 6This is a schematic diagram of the structure of an image-based packaging box processing and inspection device 600 provided in an embodiment of the present invention. The image-based packaging box processing and inspection device 600 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) for storing application programs 633 or data 632. The memory 620 and storage media 630 can be temporary or persistent storage. The program stored in the storage media 630 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the image-based packaging box processing and inspection device 600. Furthermore, the processor 610 may be configured to communicate with the storage media 630 and execute the series of instruction operations in the storage media 630 on the image-based packaging box processing and inspection device 600.
[0126] The image-based packaging box processing and inspection equipment 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input / output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 6 The illustrated structure of the image-based packaging box processing and inspection equipment does not constitute a limitation on the image-based packaging box processing and inspection equipment. It may include more or fewer parts than illustrated, or combine certain parts, or have different part arrangements.
[0127] The present invention also provides an image-based packaging box processing and inspection device, the image-based packaging box processing and inspection device including a memory and a processor, the memory storing computer-readable instructions, when the computer-readable instructions are executed by the processor, causing the processor to perform the steps of the image-based packaging box processing and inspection method in the above embodiments.
[0128] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the image-based packaging box processing and inspection method.
[0129] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0130] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0131] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image-based method for detecting the processing of packaging boxes, characterized in that, The image-based packaging box processing detection method includes: The process involves acquiring printing images of multiple printed surfaces of a target packaging box from a packaging box processing production line, and inputting these images into a pre-set two-layer residual context network for context feature extraction to obtain a context feature map of the printing area for each printed surface. Specifically, this includes: installing multiple image acquisition terminals on the packaging box processing production line and acquiring multiple calibration images using these terminals; extracting coordinates from the calibration images to obtain a coordinate dataset corresponding to each calibration image, and calibrating the parameters of the multiple image acquisition terminals based on the coordinate dataset; and then using the calibrated image acquisition terminals to acquire multiple printed surfaces of the target packaging box. An initial printed image of the printing surface is obtained; image correction is performed on the initial printed image to obtain a printed image of the packaging box, and the printed image of the packaging box is input into a preset two-layer residual context network, wherein each layer of the residual context network includes a convolutional layer, a residual block, a batch normalization layer, and an activation function; context features are extracted from the printed image of the packaging box through the first layer of the two-layer residual context network to obtain shallow context information; the shallow context information and the printed image of the packaging box are input into the second layer of the two-layer residual context network for context feature extraction to obtain a printing area context feature map for each printed surface; The printing area context feature map of each printing surface is input into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion, so as to obtain the printing area fusion feature map of each printing surface. For each printed surface, the feature map of the fused printing area and the packaging box printing image are aggregated to obtain the target printed aggregate image of each printed surface; The target printed aggregate image of each printed surface is input into the preset packaging box printing detection model to perform packaging box printing detection, and the packaging box printing detection result of each printed surface is obtained. The printing process parameters of the multiple printing surfaces are encoded to obtain the printing process encoding data of each printing surface, and a target process encoding matrix is constructed based on the packaging box printing inspection results of each printing surface and the printing process encoding data. The target process encoding matrix is input into a pre-set packaging box printing process analysis model for packaging box printing process optimization to obtain target packaging box printing process data. Specifically, this includes: inputting the target process encoding matrix into a pre-set packaging box printing process analysis model, wherein the packaging box printing process analysis model includes an encoding network and a decoding network. The encoding network includes a bidirectional threshold recurrent network, and the decoding network includes a unidirectional threshold recurrent network and a prediction layer. The bidirectional threshold recurrent network in the encoding network performs process feature calculations on the target process encoding matrix to obtain a target process feature matrix. The unidirectional threshold recurrent network in the decoding network performs feature dimensionality reduction on the target process feature matrix to obtain a low-dimensional process feature matrix. The prediction layer in the decoding network predicts the packaging box printing process of the low-dimensional process feature matrix to obtain the target packaging box printing process data.
2. The image-based packaging box processing inspection method according to claim 1, characterized in that, The step involves inputting the printing area context feature map of each printed surface into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion, resulting in a fused printing area feature map for each printed surface, including: The context feature map of the printing area of each printing surface is input into the coordinate attention mechanism layer for attention region segmentation, resulting in multiple coordinate attention regions for each printing surface. The coordinate attention mechanism layer performs weight analysis on the multiple coordinate attention regions to obtain the attention weight of each coordinate attention region; Based on the attention weights, the multiple coordinate attention regions are fused using an attention mechanism to generate a printing region coordinate attention feature map for each printing surface; The printed area coordinate attention feature map is input into the residual context network for deep feature extraction to obtain the printed area fusion feature map of each printed surface.
3. The image-based packaging box processing inspection method according to claim 1, characterized in that, The process of aggregating the feature maps of the printing areas of each printed surface with the printed image of the packaging box to obtain the target printed aggregated image for each printed surface includes: For each printed area, the feature map of the fused area and the packaging box printing image are matched in terms of feature map size and resolution to obtain the target matching result; Based on the target matching result, pixel extraction is performed on the fused feature map of the printing area to obtain a first pixel set, and pixel extraction is performed on the printed image of the packaging box to obtain a second pixel set; Pixel matching is performed on the first pixel set and the second pixel set to obtain multiple pixel pairs; Based on the multiple pixels, the fusion feature map of the printing area and the printing image of the packaging box are pixel-aggregated to obtain the target printing aggregated image of each printing surface.
4. The image-based packaging box processing inspection method according to claim 1, characterized in that, The process involves inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model for packaging box printing detection, thereby obtaining the packaging box printing detection results for each printed surface, including: The target printed aggregate image of each printed surface is input into a preset packaging box printing detection model, wherein the packaging box printing detection model includes a first convolutional long short-time network, a second convolutional long short-time network, and two fully connected networks. The first convolutional long short-time network is used to perform convolutional feature operations on the target printed aggregate image to obtain the first convolutional feature map; The first convolutional feature map is input into the second convolutional short-time network for high-dimensional feature mapping to obtain the second convolutional feature map; The second convolutional feature map is processed by the two-layer fully connected network to detect the printing quality of the packaging box, and the printing detection results of each printed surface are obtained. The printing detection results include the printing problem type and location information of each printed surface.
5. The image-based packaging box processing inspection method according to claim 1, characterized in that, The process involves encoding the printing process parameters of the multiple printing surfaces to obtain printing process encoding data for each printing surface, and constructing a target process encoding matrix based on the packaging box printing inspection results of each printing surface and the printing process encoding data, including: Obtain the printing process parameters for the multiple printing surfaces, wherein the printing process parameters include: color configuration, printing speed, temperature setting, and printing pressure; The printing process parameters of the multiple printing surfaces are encoded respectively to obtain the printing process encoding data of each printing surface; The inspection results of the packaging box printing on each printed surface are encoded to obtain the inspection result code data for each printed surface; The printing process coding data and the detection result coding data of each printed surface are discretized to obtain the discrete coding sequence of the printing process and the discrete coding sequence of the detection result. The discrete coding sequence of the printing process and the discrete coding sequence of the detection result are matrix transformed to obtain the target process coding matrix.
6. An image-based packaging box processing and inspection device, characterized in that, The image-based packaging box processing and inspection device includes: The acquisition module is used to acquire printing images of multiple printed surfaces of a target packaging box from the packaging box processing production line, and input the printing images into a pre-set two-layer residual context network for context feature extraction to obtain a context feature map of the printing area for each printed surface; specifically, it includes: installing multiple image acquisition terminals on the packaging box processing production line, and acquiring multiple calibration images based on the multiple image acquisition terminals; extracting coordinates from the multiple calibration images to obtain a coordinate dataset corresponding to each calibration image, and calibrating the parameters of the multiple image acquisition terminals based on the coordinate dataset; and acquiring images of the target packaging box from the multiple image acquisition terminals after parameter calibration. An initial printed image of multiple printed surfaces is obtained; the initial printed image is image-corrected to obtain a printed image of the packaging box, and the printed image of the packaging box is input into a preset two-layer residual context network, wherein each layer of the residual context network includes a convolutional layer, a residual block, a batch normalization layer, and an activation function; the first layer of the two-layer residual context network is used to extract context features from the printed image of the packaging box to obtain shallow context information; the shallow context information and the printed image of the packaging box are input into the second layer of the two-layer residual context network to extract context features, thereby obtaining a context feature map of the printing area of each printed surface; The fusion module is used to input the printing area context feature map of each printing surface into the coordinate attention mechanism layer and the residual context network for coordinate attention feature extraction and feature fusion, so as to obtain the printing area fusion feature map of each printing surface. The aggregation module is used to aggregate the feature maps of the printing areas of each printing surface and the packaging box printing image to obtain the target printing aggregated image of each printing surface. The detection module is used to input the target printed aggregate image of each printed surface into the preset packaging box printing detection model to perform packaging box printing detection and obtain the packaging box printing detection result for each printed surface. The encoding module is used to encode the printing process parameters of the multiple printing surfaces respectively, to obtain the printing process encoding data of each printing surface, and to construct a target process encoding matrix based on the packaging box printing inspection results of each printing surface and the printing process encoding data. An optimization module is used to input the target process encoding matrix into a preset packaging box printing process analysis model to optimize the packaging box printing process and obtain target packaging box printing process data. Specifically, this includes: inputting the target process encoding matrix into a preset packaging box printing process analysis model, wherein the packaging box printing process analysis model includes an encoding network and a decoding network. The encoding network includes a bidirectional threshold recurrent network, and the decoding network includes a unidirectional threshold recurrent network and a prediction layer. The bidirectional threshold recurrent network in the encoding network performs process feature calculations on the target process encoding matrix to obtain a target process feature matrix. The unidirectional threshold recurrent network in the decoding network performs feature dimensionality reduction on the target process feature matrix to obtain a low-dimensional process feature matrix. The prediction layer in the decoding network performs packaging box printing process prediction on the low-dimensional process feature matrix to obtain the target packaging box printing process data.
7. An image-based packaging box processing and inspection device, characterized in that, The image-based packaging box processing and inspection device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the image-based packaging box processing and inspection device to perform the image-based packaging box processing and inspection method as described in any one of claims 1-5.
8. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the image-based packaging box processing and inspection method as described in any one of claims 1-5.