Packing box processing detection method, device and equipment based on image and storage medium
Through image processing technology, the characteristics of the packaging box printing area are extracted and process analysis is performed, which solves the problems of human dependence and subjective interference of traditional detection methods, achieves high-precision packaging box printing quality detection and process optimization, and improves production efficiency and automation. .
Patent Information
- Application Number
- CN202411043894.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Traditional packaging box quality inspection methods require a lot of manpower and are easily interfered by subjective factors, making it impossible to achieve efficient and reliable automated quality control.
An image-based detection method is used to extract printing area features through a two-layer residual context network, and the coordinate attention mechanism is combined for feature fusion and aggregation. A convolutional neural network is used for packaging box printing detection and process optimization, and a target process encoding matrix is constructed. Process analysis.
It achieves high-precision detection of the printing quality of packaging boxes, reduces the false alarm rate and false negative rate, monitors the printing quality in real time, reduces the defective rate, and improves the automation level and printing efficiency of the production line.
Smart Images

Figure CN118691599A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to an image-based packaging box processing detection method, device, equipment and storage medium. Background Art
[0002] With the continuous development of industrial automation, the manufacturing industry has an increasing demand for automation and intelligence in production processes. As an important production link, packaging box processing, its quality control and printing process optimization are crucial to product quality and efficiency.
[0003] As the outer packaging of the product, the printing quality of the packaging box is directly related to the appearance and texture of the product. However, traditional packaging box quality inspection methods usually require a lot of manpower and are easily interfered by subjective factors, so a more reliable and automated quality control method is needed. Summary of the invention
[0004] The present invention provides an image-based packaging box processing detection method, device, equipment and storage medium, which are used to improve the accuracy of packaging box printing processing.
[0005] A first aspect of the present invention provides an image-based packaging box processing detection method, the image-based packaging box processing detection method comprising: Collecting packaging box printing images of multiple printing surfaces in 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 of each printing surface; Input the printed 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 printed area fusion feature map of each printed surface; Perform feature image aggregation on the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface; Inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model to perform packaging box printing detection, and obtaining packaging box printing detection results for each printed surface; Encode the printing process parameters of the multiple printing surfaces respectively to obtain printing process coding data of each printing surface, and construct a target process coding matrix based on the packaging box printing detection result of each printing surface and the printing process coding data; The target process coding matrix is input into a preset packaging box printing process analysis model to optimize the packaging box printing process to obtain target packaging box printing process data.
[0006] In combination with the first aspect, in a first implementation of the first aspect of the present invention, the packaging box printing images of multiple printing 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 a printing area context feature map of each printing surface, including: Installing multiple image acquisition terminals based on the packaging box processing production line, and acquiring multiple calibration images based on the multiple image acquisition terminals; Extracting coordinates of the multiple calibration images to obtain a coordinate data set corresponding to each calibration image, and calibrating parameters of the multiple image acquisition terminals according to the coordinate data set; The initial printed images of multiple printed surfaces in the target packaging box are respectively collected by multiple image acquisition terminals after parameter calibration; Performing image correction on the initial printed image to obtain a packaging box printed image, and inputting the packaging box printed image 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; Extracting context features of the packaging box printing image 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 residual context network in the two layers of the residual context network to extract context features, so as to obtain a context feature map of the printed area of each printed surface.
[0007] In combination with the first aspect, in a second implementation of the first aspect of the present invention, the printing area context feature map of each printing surface is input into the coordinate attention mechanism layer and the residual context network to perform coordinate attention feature extraction and feature fusion to obtain the printing area fusion feature map of each printing surface, including: Input the printed area context feature map of each printed surface into the coordinate attention mechanism layer to segment the attention area, and obtain multiple coordinate attention areas for each printed surface; Performing weight analysis on the multiple coordinate attention regions through the coordinate attention mechanism layer to obtain an attention weight for each coordinate attention region; Performing an attention mechanism fusion on the multiple coordinate attention areas based on the attention weights to generate a printed area coordinate attention feature map of each printed surface; The printed area coordinate attention feature map is input into the residual context network for deep feature extraction to obtain a printed area fusion feature map of each printed surface.
[0008] In combination 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 printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface includes: The feature map size and resolution of the printed area fusion feature map of each printed surface and the printed image of the packaging box are matched to obtain the target matching result; According to the target matching result, pixel extraction is performed on the printed area fusion feature map to obtain a first pixel set, and pixel extraction is performed on the packaging box printed image to obtain a second pixel set; Performing pixel matching on the first pixel set and the second pixel set to obtain a plurality of pixel pairs; The printing area fusion feature map and the packaging box printing image are pixel aggregated according to the multiple pixels to obtain a target printing aggregate image for each printing surface.
[0009] In combination with the first aspect, in a 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 to perform packaging box printing detection to obtain packaging box printing detection results of each printed surface includes: Inputting the target printed aggregate image of each printed surface 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 a two-layer fully connected network; Performing convolution feature operation on the target printed aggregate image through the first convolutional long-short time network to obtain a first convolution feature map; Inputting the first convolution feature map into the second convolution long short time network for high dimensional feature mapping to obtain a second convolution feature map; The second convolutional feature map is used to detect the printing quality of the packaging box through the two-layer fully connected network to obtain the packaging box printing detection result of each printing surface, wherein the packaging box printing detection result includes the printing problem type and location information of each printing surface.
[0010] In combination with the first aspect, in a fifth implementation of the first aspect of the present invention, the printing process parameters of the multiple printing surfaces are respectively encoded to obtain printing process coding data of each printing surface, and a target process coding matrix is constructed based on the packaging box printing detection result of each printing surface and the printing process coding data, including: Acquire printing process parameters of the plurality of printing surfaces, wherein the printing process parameters include: color configuration, printing speed, temperature setting and printing pressure; Encoding the printing process parameters of the plurality of printing surfaces respectively to obtain printing process coding data of each printing surface; Encoding the packaging box printing detection result of each printed surface to obtain the detection result encoding data of each printed surface; Discretizing the printing process coding data and the detection result coding data of each printing surface respectively to obtain a printing process discrete coding sequence and a detection result discrete coding sequence; The printing process discrete coding sequence and the detection result discrete coding sequence are subjected to matrix conversion to obtain a target process coding matrix.
[0011] In combination with the first aspect, in a 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 to obtain target packaging box printing process data includes: Input the target process coding 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; Performing process characteristic operation on the target process encoding matrix through a bidirectional threshold cyclic network in the encoding network to obtain a target process characteristic matrix; Performing feature dimension reduction on the target process feature matrix through a unidirectional threshold recurrent network in the decoding network to obtain a low-dimensional process feature matrix; The packaging box printing process is predicted for the low-latitude process feature matrix through the prediction layer in the decoding network to obtain target packaging box printing process data.
[0012] A second aspect of the present invention provides an image-based packaging box processing detection device, the image-based packaging box processing detection device comprising: An acquisition module is used to acquire packaging box printing images of multiple printing surfaces in a target packaging box from a 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 a printing area context feature map of each printing surface; A 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 to perform coordinate attention feature extraction and feature fusion to obtain the printing area fusion feature map of each printing surface; An aggregation module is used to aggregate the feature images of the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface; A detection module, used for inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model to perform packaging box printing detection, and obtaining packaging box printing detection results of each printed surface; An encoding module, used for encoding the printing process parameters of the plurality of printing surfaces respectively, obtaining printing process encoding data of each printing surface, and constructing a target process encoding matrix based on the packaging box printing detection result of each printing surface and the printing process encoding data; 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.
[0013] The third aspect of the present invention provides an image-based packaging box processing detection device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the image-based packaging box processing detection device executes the above-mentioned image-based packaging box processing detection method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned image-based packaging box processing detection method.
[0015] In the technical solution provided by the present invention, the packaging box printing image is input into a preset two-layer residual context network for context feature extraction to obtain a printing area context feature map; coordinate attention feature extraction and feature fusion are performed to obtain a printing area fusion feature map; feature image aggregation is performed to obtain a target printing aggregation image; packaging box printing detection is performed through a packaging box printing detection model to obtain a packaging box printing detection result; encoding is performed to obtain printing process coding data, and a target process coding matrix is constructed based on the packaging box printing detection result and the printing process coding data; the target process coding matrix is input into a packaging box printing process analysis model to optimize the packaging box printing process to obtain the target packaging box printing process data. The present 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 printed surface can be accurately identified, thereby reducing the false alarm rate and the missed alarm rate. The printing quality of the packaging box is monitored in real time without manual intervention. Problems are discovered in time during the production process, and corrective measures are taken, thereby reducing the defective rate and the generation of unqualified products. The automation feature makes it suitable for high-yield production lines. Through automatic detection and real-time feedback, the automation level of the production line can be improved, the reliance on manual operation can be reduced, and the production cost can be reduced. Printing process parameters can also be analyzed. Through the coding and analysis of process parameters, it can provide strong support for the optimization of printing process, improve the accuracy of packaging box printing processing, and thus improve printing efficiency and quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 Schematic diagram of an embodiment of a packaging box processing detection method based on an image in an embodiment of the present invention; Figure 2 Flow chart of coordinate attention feature extraction and feature fusion in an embodiment of the present invention; Figure 3 This is a flow chart of feature image aggregation in an embodiment of the present invention; Figure 4 This is a flow chart of packaging box printing detection in an embodiment of the present invention; Figure 5 Schematic diagram of an embodiment of an image-based packaging box processing detection device in an embodiment of the present invention; Figure 6 It is a schematic diagram of an embodiment of an image-based packaging box processing detection device in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] Embodiments of the present invention provide an image-based packaging box processing detection method, device, equipment and storage medium for improving the accuracy of packaging box printing processing. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0018] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the packaging box processing detection method based on an image in an embodiment of the present invention includes: S101, collecting packaging box printing images of multiple printing surfaces in 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 of each printing surface; It is understandable that the execution subject of the present invention may be an image-based packaging box processing detection device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0019] Specifically, multiple image acquisition terminals are installed on the packaging box processing production line to collect packaging box printing images of multiple printing surfaces in the target packaging box. These image acquisition terminals can be cameras or other image capture devices. It is necessary to collect multiple calibration images, which are used to calibrate the image acquisition terminals to ensure that the collected images have accurate spatial coordinate information. For example, assume that 5 cameras collect images of different printing surfaces respectively. The server collects 10 calibration images for calibrating the 5 cameras. By extracting the coordinates of these calibration images, the server obtains the coordinate data set corresponding to each calibration image. These coordinate data sets contain the coordinate information of specific points in the calibration images. The server uses these coordinate data sets to perform parameter calibration on each image acquisition terminal to ensure that their image acquisition is accurate. The server uses multiple image acquisition terminals that have completed parameter calibration to collect initial printing images of multiple printing surfaces in the target packaging box respectively. These initial printing images include images at different angles and positions, so subsequent image correction steps are required. In the image correction stage, the server processes the initial printing images to obtain accurate packaging box printing images. This can include operations such as perspective transformation of the correction image and removal of image distortion. The server obtains the packaging box printing image of each printing surface. The server inputs these packaging box printing images into a preset two-layer residual context network. This network has two main parts: the first layer residual context network and the second layer residual context network. Each residual context network includes a convolution layer, a residual block, a batch normalization layer, and an activation function to extract context features. The server extracts context features from the packaging box printing images through the first layer residual context network. This step obtains shallow context information, which contains the basic features of the image. The shallow context information is input into the second layer residual context network together with the original packaging box printing image to further extract context features. This stage obtains the printing area context feature map of each printed surface, which contains a higher-level feature representation, which is helpful for 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 to obtain the printing area context feature map.
[0020] S102, inputting the printing area context feature map of each printing surface into the coordinate attention mechanism layer and the residual context network to perform coordinate attention feature extraction and feature fusion, so as to obtain the printing area fusion feature map of each printing surface; Specifically, the printed area context feature map of each printed surface is input into the coordinate attention mechanism layer. The main function of the coordinate attention mechanism layer is to divide the image into multiple coordinate attention regions. These regions can be different parts of the image, which are automatically determined according to the image content. For example, suppose a printed image of a packaging box includes printing on the front, back and side. The coordinate attention mechanism layer can divide the image into three different coordinate attention regions, each corresponding to a printed surface. The coordinate attention mechanism layer performs weight analysis on each coordinate attention region. A weight is calculated for each region, which represents the importance of the region in the entire image. These weights can be determined based on the features and context information in the region. For example, for the front printed surface, the coordinate attention mechanism can analyze the 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 of the front region can be calculated. Based on the obtained attention weights, multiple coordinate attention regions are fused by the attention mechanism. The features of different regions are weighted and combined according to the weights to generate the printed area coordinate attention feature map of each printed surface. This step will emphasize the features of important areas while weakening the features of unimportant areas. For example, if the front printed surface dominates the entire image, the features of the front area will have a higher weight in the printed area coordinate attention feature map, while the features of other areas will have a lower weight. The printed area coordinate attention feature map is input into the residual context network for deep feature extraction. The residual context network will further analyze and extract the printed area features of each printed surface to obtain the printed area fused feature map of each printed surface. This feature map contains high-level, feature-fused and deeply processed information for subsequent packaging box printing detection and process optimization.
[0021] S103, performing feature image aggregation on the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface; It should be noted that the size and resolution of the printed area fusion feature map and the box printing image must match. This is because the two images come from different sources or are processed differently, so they need to be adjusted to the same size and resolution for subsequent pixel matching and aggregation. For example, assuming that the size of the printed area fusion feature map is 500x500 pixels, and the size of the box printing image is 800x600 pixels, they need to be adjusted to the same size, such as 500x500 pixels, to ensure the accuracy of the matching. Before the feature image is aggregated, the printed area fusion feature map and the box printing image are aligned according to the target matching results. This can be achieved by calculating the transformation or offset between the two. The target matching results usually include the translation, rotation, and scaling information required for image alignment. For example, if the target matching results determine 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 box printing image, then these transformations will be applied to the printed area fusion feature map. Based on the target matching results, pixel extraction can be performed on the printed area fusion feature map and the box printing image. Pixel values are extracted from each image for subsequent pixel matching. Pixel matching involves matching pixels in the printed area fusion feature map with pixels in the printed image of the packaging box. This can be achieved through various matching algorithms and techniques, such as nearest neighbor matching, feature-based matching, or deep learning methods. For example, suppose the server wants to match similar text areas 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 multiple pixel pairs obtained, 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 printed area fusion feature map and the printed image of the packaging box to obtain the final printed surface image. For example, if the server has successfully matched similar text areas in the two images, the server extracts the pixel values of these areas from the two images and merges them into a target printed aggregate image according to certain rules. This target printed aggregate image will contain information from both images to help with subsequent packaging box printing detection.
[0022] S104, inputting the target printing aggregate image of each printing surface into a preset packaging box printing detection model to perform packaging box printing detection, and obtaining packaging box printing detection results of each printing surface; Specifically, a preset 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 in the image and performing detection. The packaging box printing detection model includes the following parts: a first convolutional long and short time network, a second convolutional long and short time network, and a two-layer fully connected network. The target printing aggregate image of each printing surface is input into the preset packaging box printing detection model. These images are generated in the previous steps, and they contain comprehensive information of each printing surface. The target printing aggregate image is convolutionally operated on through the first convolutional long and short time network. The convolution layer can capture various features in the image, such as edges, textures, shapes, etc. These features help the model understand the content of the printing surface. For example, the first convolutional long and short time network extracts features from the target printing aggregate image of the printing surface, such as detecting text, patterns, and colors. The first convolutional feature map is input into the second convolutional long and short time network for high-dimensional feature mapping. This step will further extract abstract features in the image, which will help to more accurately understand the content and structure of the printing surface. For example, the second convolutional long short time network maps the abstract features in the first convolutional feature map, such as recognizing the arrangement of text and the complexity of patterns. The second convolutional feature map is processed by a two-layer fully connected network to perform packaging box printing quality inspection. This step involves mapping the abstract features to the space of problem type and location information and generating the final packaging box printing inspection results. For example, a two-layer fully connected network can convert abstract features into problem types (such as blurred text, color deviation, etc.) and location information (such as where the problem appears in the image).
[0023] S105, respectively encode the printing process parameters of the multiple printing surfaces to obtain the printing process coding data of each printing surface, and construct a target process coding matrix based on the packaging box printing detection result and the printing process coding data of each printing surface; Specifically, the printing process parameters of multiple printing surfaces are obtained. These parameters usually include various settings and configurations in the printing process, such as color configuration, printing speed, temperature setting and printing pressure. The printing process parameters of each printing surface are encoded. The purpose of encoding is to convert continuous process parameters into discrete numbers or symbols for subsequent data processing. Encoding can be performed in different ways, such as mapping parameter values to a finite discrete set. For example, for color configuration parameters, different color configurations can be mapped to digital codes, such as 1 for red, 2 for blue, 3 for green, etc. Similar encoding can also be performed for parameters such as printing speed, temperature setting and printing pressure. At the same time, the packaging box printing test results of each printing surface are encoded. The purpose of encoding the test results is to convert the type and location information of the printing quality problem into discrete numbers or symbols for subsequent data processing and analysis. For example, for the detected text blur problem, it can be encoded as 1; for the color deviation problem, it can be encoded as 2. The location information can be represented by coordinate encoding, for example, if the problem appears in the upper left corner of the image, it can be encoded as 3, if it appears in the middle, it can be encoded as 4, etc. Discretize the coded data of printing process parameters and test results. Map the continuous coded values to a finite discrete coded sequence to reduce the complexity of the data. 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, similar processing can be performed for the coded data of the test results. The target process coding matrix is constructed by matrix conversion of the discrete coding sequence of printing process and the discrete coding sequence of test results. This matrix integrates the printing process parameters and test result codes of each printing surface for further analysis and decision making. For example, suppose there are two printing surfaces, each with color configuration, printing speed and test result coded data. When constructing the target process coding matrix, these data can be arranged into a matrix in which each row represents a printing surface and the columns represent different parameters and test results. Through this target process coding matrix, the correlation analysis between printing quality problems and process parameters can be performed to help improve the printing process and quality control.
[0024] S106: 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.
[0025] Specifically, a preset packaging box printing process analysis model is prepared. This model is a deep learning model, which usually includes an encoding network and a decoding network. The packaging box printing process analysis model includes a bidirectional gated recurrent network (Bi-GRU) as an encoding network, and a unidirectional gated recurrent network (Uni-GRU) and a prediction layer as a decoding network. The target process encoding matrix is input into the preset packaging box printing process analysis model. The target process encoding matrix contains the encoding data of the printing process parameters and detection results of multiple printing surfaces for process optimization. The target process encoding matrix is processed by the bidirectional gated recurrent network (Bi-GRU) in the encoding network. The bidirectional gated recurrent network has the ability to capture contextual information in sequence 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 a target process feature matrix. The target process feature matrix is subjected to feature dimension reduction by the unidirectional gated recurrent network (Uni-GRU) in the decoding network. The unidirectional threshold recurrent network helps to reduce the dimension of process features, thereby extracting more informative features. For example, the unidirectional threshold recurrent network can map a high-dimensional target process feature matrix to a low-dimensional process feature matrix, reducing data complexity and computational cost. The prediction layer in the decoding network predicts the packaging box printing process for the low-dimensional process feature matrix. The prediction layer is a neural network layer that maps process features to target packaging box printing process data, including the optimal configuration of various process parameters. For example, the prediction layer can convert low-dimensional process features into specific process parameter values, such as the optimal color configuration, printing speed, temperature setting, and printing pressure, to achieve printing process optimization. For example, assume that the encoding matrix contains encoding data of printing process parameters and test results for multiple printing surfaces. The model first performs process feature operations on the encoding matrix through a bidirectional threshold recurrent network to extract the relationship between process parameters and test results. The process features are reduced in dimension through a unidirectional threshold recurrent network to reduce the dimension of the data. The prediction layer maps low-dimensional process features to the optimal packaging box printing process configuration to achieve process optimization.
[0026] In the embodiment of the present invention, the packaging box printing image is input into the preset two-layer residual context network for context feature extraction to obtain the printing area context feature map; coordinate attention feature extraction and feature fusion are performed to obtain the printing area fusion feature map; feature image aggregation is performed to obtain the target printing aggregation image; packaging box printing detection is performed through the packaging box printing detection model to obtain the packaging box printing detection result; encoding is performed to obtain printing process coding data, and a target process coding matrix is constructed based on the packaging box printing detection result and the printing process coding data; the target process coding matrix is input into the packaging box printing process analysis model to optimize the packaging box printing process to obtain the target packaging box printing process data. The present 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 printed surface can be accurately identified, thereby reducing the false alarm rate and the missed alarm rate. The printing quality of the packaging box is monitored in real time without manual intervention. Problems are discovered in time during the production process, and corrective measures are taken, thereby reducing the defective rate and the generation of unqualified products. The automation feature makes it suitable for high-yield production lines. Through automatic detection and real-time feedback, the automation level of the production line can be improved, the reliance on manual operation can be reduced, and the production cost can be reduced. Printing process parameters can also be analyzed. Through the coding and analysis of process parameters, it can provide strong support for the optimization of printing process, improve the accuracy of packaging box printing processing, and thus improve printing efficiency and quality.
[0027] In a specific embodiment, the process of executing step S101 may specifically include the following steps: (1) Install multiple image acquisition terminals based on the packaging box processing production line, and collect multiple calibration images based on the multiple image acquisition terminals; (2) Extracting coordinates of multiple calibration images to obtain a coordinate data set corresponding to each calibration image, and calibrating parameters of multiple image acquisition terminals based on the coordinate data set; (3) Using multiple image acquisition terminals that have completed parameter calibration, respectively acquire initial printed images of multiple printed surfaces in the target packaging box; (4) performing image correction on the initial printed image to obtain a packaging box printed image, and inputting the packaging box printed image 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; (5) The first layer of the two-layer residual context network is used to extract context features of the printed image of the packaging box to obtain shallow context information; (6) 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 and obtain a context feature map of the printed area of each printed surface.
[0028] Specifically, multiple image acquisition terminals are installed based on the packaging box processing production line. These terminals can be cameras or other image acquisition devices. These terminals are used to capture the printed images of the target packaging box. Multiple calibration images are collected using multiple image acquisition terminals. Calibration images are usually pre-calibrated images for subsequent image processing and coordinate extraction. These images may contain known reference objects or signs for coordinate calibration. Coordinates are extracted from multiple calibration images to obtain a coordinate data set corresponding to each calibration image. These coordinate data sets may contain coordinate information of reference points or feature points on the calibration images. According to these coordinate data sets, multiple image acquisition terminals are parameter calibrated to calibrate their positions and viewing angles. Using multiple calibrated image acquisition terminals, the initial printed images of multiple printed surfaces in the target packaging box are collected respectively. These images are the original images to be processed, which contain 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 packaging box printing images. The corrected packaging box printing image is input into a preset two-layer residual context network, where each layer of the residual context network includes a convolution 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 of the packaging box printing image to obtain shallow context information. The shallow context information and the packaging box printing image are input into the second layer of the two-layer residual context network to extract context features, and a context feature map of the printing area of each printing surface is obtained.
[0029] In a specific embodiment, if Figure 2 As shown, the process of executing step S102 may specifically include the following steps: S201, inputting the printed area context feature map of each printed surface into the coordinate attention mechanism layer to perform attention area segmentation, and obtaining multiple coordinate attention areas of each printed surface; S202, performing weight analysis on multiple coordinate attention regions through a coordinate attention mechanism layer to obtain an attention weight for each coordinate attention region; S203, performing attention mechanism fusion on multiple coordinate attention areas based on the attention weights to generate a printed area coordinate attention feature map of each printed surface; S204, input the printed area coordinate attention feature map into the residual context network for deep feature extraction to obtain a printed area fusion feature map of each printed surface.
[0030] Specifically, the server inputs the printed area 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 context information of the printed area. The coordinate attention mechanism layer is used to split the printed area 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. The coordinate attention mechanism layer performs weight analysis on multiple coordinate attention regions. The goal of this step is to determine which regions are more important in a specific task. This usually involves calculating the attention weight of each coordinate attention region to reflect its contribution in feature extraction. Based on the attention weight, the attention mechanism is fused for multiple coordinate attention regions. The goal of this step is to generate a printed area coordinate attention feature map for each printed surface, in which important regions are emphasized for subsequent feature extraction. The printed area coordinate attention feature map is input into the residual context network for deep feature extraction. In this network, convolutional layers, residual blocks, batch normalization layers, and activation functions can be included to further extract high-level feature information. For example, assume that the printed image contains different printing problems, such as uneven color, blurred text, etc. The server inputs the printed area context feature map of each printed surface into the coordinate attention mechanism layer. This layer divides the image into multiple coordinate attention regions and calculates the attention weight of each region. For example, if a region contains uneven color parts, then its attention weight is higher. Through a mechanism based on attention weights, the server fuses the features of different regions to generate a printed area coordinate attention feature map. This feature map emphasizes the areas with important information in the printed image. The printed area coordinate attention feature map is input into the residual context network, which applies deep learning technology to feature extraction for further analysis and identification of printing problems. For example, the network can identify areas with uneven color, and further detection and analysis include determining the specific type of problem (for example, the cause of the color mismatch) and location (on which printed surface).
[0031] In a specific embodiment, if Figure 3 As shown, the process of executing step S103 may specifically include the following steps: S301, matching the feature map size and resolution of the printed area fusion feature map of each printed surface with the printed image of the packaging box to obtain a target matching result; S302, according to the target matching result, performing pixel extraction on the printed area fusion feature map to obtain a first pixel set, and performing pixel extraction on the packaging box printed image to obtain a second pixel set; S303, performing pixel matching on the first pixel set and the second pixel set to obtain a plurality of pixel pairs; S304, performing pixel aggregation on the printing area fusion feature map and the packaging box printing image according to multiple pixels to obtain a target printing aggregated image for each printing surface.
[0032] Specifically, the server ensures that the size and resolution of the printed area fusion feature map and the packaging box printing image match. This is to ensure that the two have the same image size and clarity for subsequent pixel matching and aggregation. According to the matching results of the feature maps, determine how to perform pixel extraction on the printed area fusion feature map and the packaging box printing image. This matching result includes the position and direction information of each printed surface in the image. Based on the target matching result, the printed area fusion feature map is pixel extracted to obtain a first pixel set. At the same time, the packaging box printing image is pixel extracted to obtain a second pixel set. These pixel sets contain pixel values in the image and 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 an association between them. The 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 printed area fusion feature map and the packaging box printing image. This step fuses the information of the two images together to generate a target printed aggregate image for each printed surface. Aggregation can use different methods, such as pixel weighted averaging or other image fusion techniques, to obtain the final target printed aggregate image. For example, assume that the printed area fusion feature map contains text features, and the packaging box printing image is the original packaging box image. Ensure that the resolution and size of the two match so that pixel-level matching can be performed. The server determines the position of each printed surface in the packaging box printing image through the target matching results. Based on this position information, the server extracts pixels from the printed area fusion feature map and the packaging box printing image. The server matches the extracted pixels to establish a pixel correspondence between the two. For example, the server determines the matching relationship by comparing the similarity of pixel values. Based on the matched pixel pairs, the server pixel-aggregates the printed area fusion feature map and the packaging box printing image. This aggregation process combines the text features with the original image to generate a target printed aggregate image for each printed surface, in which the text has been corresponded to the packaging box image.
[0033] In a specific embodiment, if Figure 4 As shown, the process of executing step S104 may specifically include the following steps: S401, inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model, wherein the packaging box printing detection model includes a first convolutional long short-term network, a second convolutional long short-term network and a two-layer fully connected network; S402, performing convolution feature operation on the target printed aggregate image through a first convolutional long-short time network to obtain a first convolution feature map; S403, inputting the first convolution feature map into the second convolution long short time network for high dimensional feature mapping to obtain a second convolution feature map; S404. Perform packaging box printing quality detection on the second convolutional feature map through a two-layer fully connected network to obtain packaging box printing detection results for each printed surface, wherein the packaging box printing detection results include the type and location information of printing problems on each printed surface.
[0034] Specifically, the server inputs the target printed aggregate image of each printed surface into a preset 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 the first convolutional long short-term 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 in images. The convolutional layer is used to extract static features, while the LSTM layer is used to model temporal information in the image. For example, assume that the target printed aggregate image is an image of a packaging box containing printing problems. The CNN-LSTM network can detect specific problem areas in the image, such as blurred text or uneven color. The first convolutional feature map is input into the second convolutional long short-term network for high-dimensional feature mapping. The goal of the second CNN-LSTM network is to further extract high-level features and understand the problems in the image more deeply. For example, after the first convolutional long short-term network, the second convolutional long short-term network can learn more abstract features, such as the shape and texture of the printing problem, so as to more accurately identify the problem. The second convolutional feature map is used to detect the printing quality of the packaging box through a two-layer fully connected network. The fully connected network maps the abstract features to the type and location information of the problem to obtain the packaging box printing detection results for each printed surface. For example, the fully connected network can output the type of problem (for example, color mismatch) and the location information of the problem (where in the image it is), thereby providing detailed printing problem diagnosis.
[0035] In a specific embodiment, the process of executing step S105 may specifically include the following steps: (1) obtaining printing process parameters of multiple printing surfaces, wherein the printing process parameters include: color configuration, printing speed, temperature setting and printing pressure; (2) respectively encoding the printing process parameters of the plurality of printing surfaces to obtain the printing process coding data of each printing surface; (3) Encoding the inspection result of the packaging box printing on each printed surface to obtain the inspection result encoding data of each printed surface; (4) discretizing the printing process coding data and the detection result coding data of each printing surface to obtain a printing process discrete coding sequence and a detection result discrete coding sequence; (5) Perform matrix conversion on the discrete coding sequence of the printing process and the discrete coding sequence of the detection result to obtain the target process coding matrix.
[0036] Specifically, process parameters are obtained from the printing process of multiple printing surfaces, including color configuration, printing speed, temperature setting, printing pressure, etc. Each printing surface has its corresponding process parameter set. For example, assume that there are three printing surfaces (Surface 1, Surface 2, Surface 3). The server records the color configuration, printing speed, temperature setting, and printing pressure of each printing surface. The printing process process parameters of each printing surface are encoded to convert them into digital form. The encoding can be performed 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" is encoded as [1, 0, 0], "green" is encoded as [0, 1, 0], and "blue" is encoded as [0, 0, 1]. Similar encoding methods can also be used for parameters such as printing speed, temperature setting, and printing pressure. The packaging box printing detection results of each printing surface are encoded and converted into digital form for subsequent processing. The encoding method can vary depending on the type of detection result. For example, if there are different types of printing problems, different encoding methods can be used. For example, suppose the server's detection results include problems such as "blurred text", "color mismatch" and "image offset". The server uses digital codes to represent these problems, such as "blurred text" is encoded as 1, "color mismatch" is encoded as 2, and "image offset" is encoded as 3. Discretize the printing process encoding data and the detection result encoding data. This step can select a suitable method according to specific needs, such as dividing the continuous value range into discrete intervals, or converting the labels of multi-category problems into binary codes. For example, if the printing speed parameter changes 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 encoding data, the server converts it into binary codes to indicate the presence or absence of each problem. The discretized printing process encoding data and the detection result encoding data are matrix-converted to construct the target process encoding 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, Surface 2, Surface 3) and 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 code matrix, where each row contains the process parameter code and detection result code for each printing surface.
[0037] In a specific embodiment, the process of executing step S106 may specifically include the following steps: (1) Inputting the target process coding 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; (2) Performing process feature operations on the target process encoding matrix through the bidirectional threshold recurrent network in the encoding network to obtain the target process feature matrix; (3) The target process feature matrix is reduced in dimension through the unidirectional threshold recurrent network in the decoding network to obtain a low-dimensional process feature matrix; (4) The prediction layer in the decoding network is used to predict the packaging box printing process based on the low-dimensional process feature matrix to obtain the target packaging box printing process data.
[0038] Specifically, the target process coding matrix is input into the preset packaging box printing process analysis model. This model includes an encoding network and a decoding network for learning and predicting printing process parameters. The task of the encoding network is to extract process features from the target process coding matrix. In order to better capture the contextual information in the sequence data, a bidirectional gated loop network (Bi-LSTM) is used. This network can consider both forward and backward sequence information. For example, if each row of the target process coding matrix represents a printing surface, the Bi-LSTM can learn the relationship between different printing surfaces and their changing trends in process parameters. For example, the synergy of process parameters between adjacent printing surfaces can be captured. The task of the decoding network is to reduce the dimension of the process features obtained from the encoding network and predict the printing process. The decoding network includes a unidirectional gated loop network (LSTM) and a prediction layer. The LSTM layer is used to reduce the dimension of the process feature matrix and convert it into a low-dimensional process feature matrix. The LSTM layer can help the model capture more abstract process features. The prediction layer is used to predict printing process parameters from a low-dimensional process feature matrix. This can be a fully connected neural network, and the structure of the output layer is determined according to the specific problem. For example, suppose the server's goal is to predict the printing speed of each printing surface. The LSTM layer can reduce the dimension of the process features obtained from the Bi-LSTM, and then the prediction layer can output the printing speed of each printing surface. Through the decoding network, the target packaging box printing process data can be obtained. This data includes the prediction results of the printing process parameters, such as printing speed, temperature setting, etc., as well as other relevant information. For example, if the model successfully predicts the printing speed, the server obtains the printing speed of each printing surface from the decoding network, which will become part of the target packaging box printing process data. This data can be used to optimize the printing process to ensure that the printing quality and efficiency of each printing surface are optimally controlled.
[0039] The above describes the packaging box processing detection method based on an image in an embodiment of the present invention. The following describes the packaging box processing detection device based on an image in an embodiment of the present invention. Figure 5 In one embodiment of the present invention, an image-based packaging box processing detection device includes: The acquisition module 501 is used to acquire the 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 to extract context features, so as to obtain a printing area context feature map of each printing surface; A 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 to perform coordinate attention feature extraction and feature fusion to obtain a printing area fusion feature map of each printing surface; Aggregation module 503, used to aggregate the feature images of the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface; The detection module 504 is used to input the target printing aggregate image of each printing surface into a preset packaging box printing detection model to perform packaging box printing detection, and obtain the packaging box printing detection result of each printing surface; The encoding module 505 is used to encode the printing process parameters of the multiple printing surfaces respectively, obtain the printing process coding data of each printing surface, and construct a target process coding matrix based on the packaging box printing detection result of each printing surface and the printing process coding data; 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.
[0040] Through the cooperation of the above components, the printing image of the packaging box is input into the preset two-layer residual context network for context feature extraction to obtain the context feature map of the printing area; coordinate attention feature extraction and feature fusion are performed to obtain the fusion feature map of the printing area; feature image aggregation is performed to obtain the target printing aggregation image; packaging box printing detection is performed through the packaging box printing detection model to obtain the packaging box printing detection result; encoding is performed to obtain the printing process coding data, and the target process coding matrix is constructed based on the packaging box printing detection result and the printing process coding data; the target process coding matrix is input into the packaging box printing process analysis model to optimize the packaging box printing process to obtain the target packaging box printing process data. The present invention uses 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 the missed alarm rate. The printing quality of the packaging box is monitored in real time without manual intervention. Problems are discovered in time during the production process, and corrective measures are taken, thereby reducing the defective rate and the generation of unqualified products. The automation feature makes it suitable for high-yield production lines. Through automatic detection and real-time feedback, the automation level of the production line can be improved, the reliance on manual operation can be reduced, and the production cost can be reduced. Printing process parameters can also be analyzed. Through the coding and analysis of process parameters, it can provide strong support for the optimization of printing process, improve the accuracy of packaging box printing processing, and thus improve printing efficiency and quality.
[0041] above Figure 5 The image-based packaging box processing detection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The image-based packaging box processing detection device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0042] Figure 66 is a structural diagram of an image-based packaging box processing detection device provided by an embodiment of the present invention. The image-based packaging box processing detection device 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. Among them, the memory 620 and the storage medium 630 can be short-term storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the image-based packaging box processing detection device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the image-based packaging box processing detection device 600.
[0043] The image-based packaging box processing detection device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 6 The structure of the image-based packaging box processing and detection equipment shown does not constitute a limitation of the image-based packaging box processing and detection equipment, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0044] The present invention also provides an image-based packaging box processing detection device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the image-based packaging box processing detection method in the above-mentioned embodiments.
[0045] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the image-based packaging box processing detection method.
[0046] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0047] If the integrated unit is implemented in the form of 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 is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0048] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image-based packaging box processing detection method, It is characterized in that The image-based packaging box processing detection method includes: Collecting packaging box printing images of multiple printing surfaces in 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 of each printing surface; Input the printed 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 printed area fusion feature map of each printed surface; Perform feature image aggregation on the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface; Inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model to perform packaging box printing detection, and obtaining packaging box printing detection results for each printed surface; Encode the printing process parameters of the multiple printing surfaces respectively to obtain printing process coding data of each printing surface, and construct a target process coding matrix based on the packaging box printing detection result of each printing surface and the printing process coding data; The target process coding matrix is input into a preset packaging box printing process analysis model to optimize the packaging box printing process to obtain target packaging box printing process data.
2. The image-based packaging box processing detection method according to claim 1, It is characterized in that The method collects packaging box printing images of multiple printing surfaces in a target packaging box from a packaging box processing production line, and inputs 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 of each printing surface, including: Installing multiple image acquisition terminals based on the packaging box processing production line, and acquiring multiple calibration images based on the multiple image acquisition terminals; Extracting coordinates of the multiple calibration images to obtain a coordinate data set corresponding to each calibration image, and calibrating parameters of the multiple image acquisition terminals according to the coordinate data set; The initial printed images of multiple printed surfaces in the target packaging box are respectively collected by multiple image acquisition terminals after parameter calibration; Performing image correction on the initial printed image to obtain a packaging box printed image, and inputting the packaging box printed image 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; Extracting context features of the packaging box printing image 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 residual context network in the two layers of the residual context network to extract context features, so as to obtain a context feature map of the printed area of each printed surface.
3. The image-based packaging box processing detection method according to claim 1, It is characterized in that The printing area context feature map of each printing surface is input into the coordinate attention mechanism layer and the residual context network to perform coordinate attention feature extraction and feature fusion to obtain the printing area fusion feature map of each printing surface, including: Input the printed area context feature map of each printed surface into the coordinate attention mechanism layer to segment the attention area, and obtain multiple coordinate attention areas for each printed surface; Performing weight analysis on the multiple coordinate attention regions through the coordinate attention mechanism layer to obtain an attention weight for each coordinate attention region; Performing an attention mechanism fusion on the multiple coordinate attention areas based on the attention weights to generate a printed area coordinate attention feature map of each printed surface; The printed area coordinate attention feature map is input into the residual context network for deep feature extraction to obtain a printed area fusion feature map of each printed surface.
4. The image-based packaging box processing detection method according to claim 1, It is characterized in that The step of performing feature image aggregation on the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface includes: The feature map size and resolution of the printed area fusion feature map of each printed surface and the printed image of the packaging box are matched to obtain the target matching result; According to the target matching result, pixel extraction is performed on the printed area fusion feature map to obtain a first pixel set, and pixel extraction is performed on the packaging box printed image to obtain a second pixel set; Performing pixel matching on the first pixel set and the second pixel set to obtain a plurality of pixel pairs; The printing area fusion feature map and the packaging box printing image are pixel aggregated according to the multiple pixels to obtain a target printing aggregate image for each printing surface.
5. The image-based packaging box processing detection method according to claim 1, It is characterized in that The step of inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model to perform packaging box printing detection to obtain packaging box printing detection results of each printed surface includes: Inputting the target printed aggregate image of each printed surface 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 a two-layer fully connected network; Performing convolution feature operation on the target printed aggregate image through the first convolutional long-short time network to obtain a first convolution feature map; Inputting the first convolution feature map into the second convolution long short time network for high dimensional feature mapping to obtain a second convolution feature map; The second convolutional feature map is used to detect the printing quality of the packaging box through the two-layer fully connected network to obtain the packaging box printing detection result of each printing surface, wherein the packaging box printing detection result includes the type and location information of the printing problem of each printing surface.
6. The image-based packaging box processing detection method according to claim 1, It is characterized in that The printing process parameters of the plurality of printing surfaces are respectively encoded to obtain printing process coding data of each printing surface, and a target process coding matrix is constructed based on the packaging box printing detection result of each printing surface and the printing process coding data, including: Acquire printing process parameters of the plurality of printing surfaces, wherein the printing process parameters include: color configuration, printing speed, temperature setting and printing pressure; Encoding the printing process parameters of the plurality of printing surfaces respectively to obtain printing process coding data of each printing surface; Encoding the packaging box printing detection result of each printed surface to obtain the detection result encoding data of each printed surface; Discretizing the printing process coding data and the detection result coding data of each printing surface respectively to obtain a printing process discrete coding sequence and a detection result discrete coding sequence; The printing process discrete coding sequence and the detection result discrete coding sequence are subjected to matrix conversion to obtain a target process coding matrix.
7. The image-based packaging box processing detection method according to claim 1, It is characterized in that 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 to obtain target packaging box printing process data includes: Input the target process coding 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; Performing process characteristic operation on the target process encoding matrix through a bidirectional threshold cyclic network in the encoding network to obtain a target process characteristic matrix; Performing feature dimension reduction on the target process feature matrix through a unidirectional threshold recurrent network in the decoding network to obtain a low-dimensional process feature matrix; The packaging box printing process is predicted for the low-latitude process feature matrix through the prediction layer in the decoding network to obtain target packaging box printing process data.
8. An image-based packaging box processing detection device, It is characterized in that The image-based packaging box processing detection device comprises: An acquisition module is used to acquire packaging box printing images of multiple printing surfaces in a target packaging box from a 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 a printing area context feature map of each printing surface; A 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 to perform coordinate attention feature extraction and feature fusion to obtain the printing area fusion feature map of each printing surface; An aggregation module is used to aggregate the feature images of the printed area fusion feature map of each printed surface and the printed image of the packaging box to obtain a target printed aggregated image of each printed surface; A detection module, used for inputting the target printed aggregate image of each printed surface into a preset packaging box printing detection model to perform packaging box printing detection, and obtain the packaging box printing detection result of each printed surface; An encoding module, used for encoding the printing process parameters of the plurality of printing surfaces respectively, obtaining printing process encoding data of each printing surface, and constructing a target process encoding matrix based on the packaging box printing detection result of each printing surface and the printing process encoding data; 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.
9. An image-based packaging box processing inspection device, It is characterized in that The image-based packaging box processing detection device includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the image-based packaging box processing detection device to perform the image-based packaging box processing detection method as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, It is characterized in that When the instructions are executed by the processor, an image-based packaging box processing detection method as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Plane matrix variable code giving method and system
CN108016142A
CAD methods and systems for generating a wafer image
CN110763696A
Multilevel semantic fusion cloud and cloud shadow detection method and device, and storage medium
CN114943876A
Feature-guided multi-modal fusion RGB-D saliency target detection based on coordinate attention filtering
CN116246058A
Method, system, equipment and medium for industrial scene image defect detection
CN116342494A
Cited By
Printing image matching method, device and system, storage medium and program product
CN120563513A
Printed image matching method, device, system, storage medium and program product
CN120563513B
