Intelligent production line packaging box detection system and method

Through the intelligent production line inspection system, three-dimensional data and machine learning models are used to identify product types and evaluate packaging box damage, solving the deficiencies in packaging box inspection and evaluation on the production line, realizing the stability detection of packaging boxes, and reducing transportation damage and resource waste. , improve consumer satisfaction.

CN116935375BActive Publication Date: 2024-09-10CHONGQING DELONG PACKAGING PRODUCTS FACTORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311026343.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2024-09-10
Estimated Expiration
2043-08-15

AI Technical Summary

Technical Problem

The existing technology fails to accurately detect and evaluate the packaging process of different products on the production line, resulting in the packaging box being opened, deformed, or the filling is not tight, causing the product to be easily damaged during transportation.

Method used

An intelligent production line packaging box detection system is used to collect three-dimensional training data, packaging box image training data and post-boxing image data to establish a three-dimensional model library, identify product types and select suitable packaging boxes and fillers, and train machine learning model evaluation The degree of damage to the packaging box, and adjustment instructions are generated to ensure the stability of the packaging box.

Benefits of technology

It achieves real-time detection of damage to packaging boxes and analysis of product stability, reduces manual inspection costs, reduces resource waste, improves consumer satisfaction, and ensures the safety of products during transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935375B
    Figure CN116935375B
Patent Text Reader

Abstract

The present invention belongs to the technical field of packaging box detection, and discloses a packaging box detection system and method for an intelligent production line; the system and method include: collecting three-dimensional training data of goods to be boxed, and establishing a three-dimensional stereoscopic model library of the goods; performing three-dimensional matching on the three-dimensional training data collected in real time and the three-dimensional model of the goods in the three-dimensional stereoscopic model library, identifying the types of goods to be boxed and selecting packaging boxes and packaging box fillers corresponding to the goods; collecting packaging box image training data, and training a first machine learning model for calculating packaging box damage assessment values; setting a packaging box damage assessment threshold and comparing it with the packaging box damage assessment value, and generating different packaging box adjustment instructions; collecting image data after boxing, analyzing the instability of the goods after boxing, and generating filler adjustment instructions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of packaging box detection technology, and more specifically, the present invention relates to a packaging box detection system and method for an intelligent production line. Background Art

[0002] Industrial production packaging refers to the process of placing products into packaging containers such as cartons and plastic boxes using automated equipment or manual operation, and sealing and labeling them in order to protect the safety of the products during transportation and storage.

[0003] The Chinese patent with authorization announcement number CN107547655B discloses a management system for intelligent packaging boxes, through which the packaging boxes can be effectively managed and the status of the packaging boxes can be queried, which is convenient for promotion and application in the industry.

[0004] However, the above invention fails to achieve accurate detection and evaluation of the packaging process of different products on the production line, so as to avoid problems such as box opening, deformation, or loose filling of the box resulting in loose fixation of the product in the box and easy damage during transportation.

[0005] In view of this, the present invention proposes an intelligent production line packaging box detection system and method to solve the above problems. Summary of the invention

[0006] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a system and method for detecting packaging boxes in an intelligent production line.

[0007] To achieve the above object, the present invention provides the following technical solution: a method for detecting packaging boxes on an intelligent production line, the method comprising: collecting three-dimensional training data of the goods to be boxed, packaging box image training data and image data after boxing;

[0008] Based on the 3D training data, a 3D model library of the product is established; based on the 3D training data collected in real time, 3D matching is performed with the 3D model of the product in the 3D model library to identify the type of product to be boxed and select the packaging box and packaging box filler corresponding to the product;

[0009] Training a first machine learning model for calculating a damage assessment value of a packaging box based on the packaging box image training data;

[0010] Set the packaging box damage assessment threshold and compare it with the packaging box damage assessment value to generate different packaging box adjustment instructions;

[0011] Based on the image data after boxing, the instability of the goods after boxing is analyzed and filling adjustment instructions are generated.

[0012] An intelligent production line packaging box detection system, comprising:

[0013] A data acquisition module is used to collect three-dimensional training data of the goods to be boxed, packaging box image training data and image data after boxing;

[0014] The 3D matching module builds a 3D model library of commodities based on the 3D training data; performs 3D matching with the 3D models of commodities in the 3D model library based on the 3D training data collected in real time, identifies the types of commodities to be boxed, and selects the packaging boxes and packaging box fillers corresponding to the commodities;

[0015] A model training module, which trains a first machine learning model for calculating a damage assessment value of a packaging box based on packaging box image training data;

[0016] A control module, which sets a packaging box damage assessment threshold and compares it with the packaging box damage assessment value to generate different packaging box adjustment instructions;

[0017] The data analysis module analyzes the instability of the goods after boxing based on the image data after boxing and generates filling adjustment instructions.

[0018] An electronic device comprises: a processor and a memory, wherein the memory stores a computer program that can be called by the processor; the processor executes the above-mentioned intelligent production line packaging box detection method by calling the computer program stored in the memory.

[0019] A computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the above-mentioned intelligent production line packaging box detection method.

[0020] The technical effects and advantages of the intelligent production line packaging box detection system and method of the present invention are as follows:

[0021] Collect three-dimensional training data of goods to be packed and establish a three-dimensional model library of the goods; perform three-dimensional matching on the three-dimensional training data collected in real time and the three-dimensional models of the goods in the three-dimensional model library, identify the types of goods to be packed and select the packaging boxes and packaging box fillers corresponding to the goods; collect packaging box image training data, train a first machine learning model to calculate the packaging box damage assessment value, and identify the degree of damage of the packaging box; set the packaging box damage assessment threshold and compare it with the packaging box damage assessment value to generate different packaging box adjustment instructions; collect image data after packing, analyze the instability of the goods after packing, and generate filler adjustment instructions. The present invention can identify goods in real time, provide corresponding packaging boxes and fillers, and detect the degree of damage of the packaging boxes. After the goods are packed in the packaging boxes, the stability of the goods is detected, which effectively reduces the cost of manual inspection, reduces resource waste, makes the goods more stable, reduces damage to the goods during transportation, and improves consumer satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a schematic diagram of a packaging box detection system for an intelligent production line of the present invention;

[0023] Figure 2 This is a schematic diagram of a packaging box detection method for an intelligent production line of the present invention;

[0024] Figure 3 The figure is a schematic diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] Example 1

[0027] See also Figure 1 As shown, the intelligent production line packaging box detection system described in this embodiment includes a data acquisition module 1, a data analysis module 2, a model training module 3, a control module 4 and a three-dimensional matching module 5, and each module is connected through a wired and / or wireless network.

[0028] The data acquisition module 1 is used to acquire the three-dimensional training data of the goods to be boxed, the packaging box image training data and the image data after boxing.

[0029] The three-dimensional training data includes three-dimensional point cloud data of the goods to be boxed, which is obtained by setting up multiple laser radars at different angles. For example, four laser radars are set on the workbench, which are four laser radars that look down at 45 degrees and point to the geometric center of the workbench.

[0030] Point cloud refers to data composed of a large number of discrete three-dimensional points. In the fields of 3D modeling, computer vision and robotics, point cloud is usually used to represent information such as the shape, position and posture of an object; 3D point cloud data is usually obtained through 3D laser scanning, camera capture or sensor acquisition; 3D point cloud data consists of a series of points with spatial coordinates, each of which contains the position of the point and possible other attribute information, such as color, normal vector and reflectivity.

[0031] It should be noted that multiple laser radars at different angles are set up to avoid the situation where the three-dimensional point cloud data collected by a single laser radar at a single angle is not comprehensive enough and is easily affected by ambient light. Multiple laser radars at multiple angles make the three-dimensional point cloud data comprehensive and accurate, and the amount of lost three-dimensional point cloud data collected is small.

[0032] The data acquisition module 1 sends the three-dimensional training data to the three-dimensional matching module 5 .

[0033] The packaging box image training data includes image data of six surfaces of the packaging box (a rectangular packaging box), which is specifically acquired by a high-speed line scan camera; the high-speed line scan camera can realize high-speed continuous acquisition of image data, and can capture the movement trajectory of objects, detect defects, measure dimensions, and distinguish colors and shapes in real time.

[0034] The packaging box may be broken, cracked, or have obvious scratches, which may weaken the structure or fail to properly protect the internal products. Therefore, the damage of the packaging box can be observed based on the packaging box image training data.

[0035] The data acquisition module 1 sends the packaging box image training data to the model training module 3.

[0036] The post-boxing image data is the image data of the interior of the packaging box taken from above after the product is boxed. It can be understood that the image data taken from above the interior of the packaging box can observe the product, the filler and the edge of the packaging box. The post-boxing image data is obtained by a high-definition camera set just above the packaging box.

[0037] The filler refers to the material used to fill the internal space of the packaging box during the transportation and storage of the goods. The filler can protect the goods from various external factors such as squeezing, abrasion, vibration, collision, etc., thereby ensuring the integrity and safety of the goods during transportation and storage; there are many types of fillers, such as foam plastics, bubble paper, cardboard, cork, wood chips, plastic particles and textile materials. The filler can not only play a buffering and protective role, but also fill the internal space of the packaging box to prevent the goods from shifting during transportation, thereby ensuring that the goods inside the packaging box are tightly fixed.

[0038] The data acquisition module 1 sends the boxed image data to the data analysis module 2 .

[0039] The three-dimensional matching module 5 is used to identify the type of goods to be packed in real time, and select the packaging box and the packaging box filler corresponding to the goods. The method of identifying the type of goods to be packed in real time and selecting the corresponding packaging box and the filler is as follows:

[0040] Based on the three-dimensional training data, a three-dimensional model library of commodities is established through a big data modeling system, and commodity categories are numbered to generate a commodity category sequence G. The commodity category sequence G contains several categories of commodities, among which the i-th commodity category is marked as G i For each product in the product category sequence G, a packaging box and filler corresponding to each product are set.

[0041] The big data 3D modeling system includes rimble SketchUp and Rhino 3D, etc. The big data 3D modeling system is widely used in product design, industrial design and other fields, and can establish accurate and comprehensive spatial models.

[0042] It should be noted that different products have different sizes and shapes, so it is necessary to select packaging boxes with suitable sizes and shapes so that the products can be effectively protected and fixed to avoid collision, displacement, etc. during transportation;

[0043] Different goods have different weights and characteristics. Some fragile items require particularly sturdy packaging boxes and fillers, while some lightweight items can use relatively simple packaging boxes. In addition, some special goods such as chemicals and food also need to use packaging materials that meet hygiene and safety requirements to ensure their safety and harmlessness.

[0044] Different transportation methods for different goods have different requirements for packaging boxes and fillers. For example, goods transported by sea or road may require stronger and more shock-resistant packaging boxes and fillers, while goods transported by air may require lighter and more space-efficient packaging boxes and fillers.

[0045] Consumers have different demands for product packaging. Some high-end consumer goods may require more exquisite and luxurious packaging boxes to increase their brand value and appeal; while some daily necessities may pay more attention to price and usage effects, so the packaging boxes and fillers can be simplified accordingly;

[0046] Therefore, each product in the product category sequence G is provided with a packaging box and filler corresponding to the product, which is specifically provided by the staff in combination with the size and shape of the product, the weight and characteristics of the product, the mode of transportation of the product and the consumer's demand for product packaging. For example, if the product is small and light, air transportation is selected, and the consumer has high requirements for packaging, a beautiful small gift box can be provided, and foam plastic can be used as filler.

[0047] Based on the three-dimensional training data collected in real time, three-dimensional matching is performed with the three-dimensional models of the goods in the three-dimensional model library to achieve real-time identification of the types of goods to be packed.

[0048] Preferably, the ICP (Iterative Closest Point) algorithm is used for three-dimensional matching, and the process is as follows:

[0049] Step 1, select reference point cloud A; randomly select a 3D point cloud data from the 3D model library as the reference point cloud A, and the point cloud B in the 3D training data collected in real time uses the reference point cloud A as the target point cloud to be matched.

[0050] Step 2: pre-match point cloud B with reference point cloud A; perform feature extraction on reference point cloud A and point cloud B. For example, for a spherical product, feature information such as the Gaussian curvature of the spherical surface can be extracted. Based on the feature information, similar points are found in reference point cloud A and point cloud B, and the position and posture relationship between them is preliminarily determined.

[0051] Posture refers to the rotation and translation state of an object in three-dimensional space. Through the posture relationship, we can understand the exact position and direction of the object in three-dimensional space.

[0052] Step 3, calculate the overall distance error; take each point in the reference point cloud A as a reference, find the nearest neighbor point in the point cloud B that corresponds to each point in the reference point cloud A, and then calculate the distance error between the two points. Add the distance error of each point in the reference point cloud A to get the overall distance error between the reference point cloud A and the point cloud B. Transform each point in the point cloud B by means of a transformation matrix (including displacement, rotation, and scaling). Recalculate the overall distance error between the reference point cloud A and the point cloud B. Iterate step 3 multiple times to converge the overall distance error between the point cloud B and the reference point cloud A.

[0053] Step 4: Output the matching results; when the overall distance error between point cloud B and reference point cloud A converges, the two matched point clouds are combined and the matching results are output. This enables real-time identification of the types of goods to be boxed on the production line, and selection of appropriate packaging boxes and fillers based on the types of goods.

[0054] The transformation matrix is ​​a mathematical tool used to represent geometric transformations in space; the transformation matrix can describe the effects of geometric transformations such as translation, rotation, scaling, and shearing, and apply these geometric transformations through matrix multiplication.

[0055] The model training module 3 trains a first machine learning model for calculating the damage assessment value of the package box based on the package box image training data. The training method of the first machine learning model for calculating the damage assessment value of the package box is as follows:

[0056] It is understandable that before packaging the goods, the packaging box itself may be damaged or have printing problems due to processing problems and may not be suitable for packaging goods. If a damaged packaging box is used to package goods, the goods may be lost or damaged during transportation. Consumers will be less satisfied after receiving the damaged packaging box. Therefore, the first machine learning model is used to calculate the damage assessment value of the packaging box to reduce the risk of using damaged packaging boxes.

[0057] The packaging box image training data is used as the input of the first machine learning model, and the damage of the packaging box is manually evaluated. The packaging box damage assessment value at this time is used as the input label of the packaging box image training data. The packaging box damage assessment value is 0-100. The higher the packaging box damage assessment value, the more serious the damage. For example, when the packaging box is damaged over a large area, the packaging box damage assessment value is set to 95. If the packaging box is only slightly damaged and does not affect the use effect, the packaging box damage assessment value is set to 15. The output of the first machine learning model is the real-time packaging box damage assessment value. The packaging box damage assessment value corresponding to each group of packaging box image training data is used as the prediction target, and minimizing the loss function is used as the training target. When the loss function of the first machine learning model is less than or equal to the target loss value, stop training.

[0058] The first machine learning model loss function may be mean square error (MSE) or cross entropy (CE);

[0059] For example, mean square error (MSE) is calculated by transforming the loss function The model is trained with minimization as the goal, so that the machine learning model can better fit the data, thereby improving the performance and accuracy of the model; in the loss function, mse is the loss function value, i is the group number of the packaging box image training data; u is the number of packaging box image training data groups; y i is the input label corresponding to the i-th group of packaging box image training data, The package damage assessment value calculated in real time for the i-th group of package image training data.

[0060] It should be noted that the first machine learning model is a neural network model; the data set consisting of the packaging box image training data is divided into a training set, a validation set and a test set, wherein the training set accounts for 70% of the data set, and the validation set and the test set each account for 15% of the data set; other model parameters of the first machine learning model, such as the target loss value, the depth of the network model, the number of neurons in each layer, the activation function used by the network model, and the optimization of the loss function, are all obtained through actual engineering implementation and continuous experimental tuning;

[0061] The model training module 3 sends the output results of the first machine learning model to the control module 4.

[0062] The control module 4 sets a packaging box damage assessment threshold value and compares it with the packaging box damage assessment value to generate different packaging box adjustment instructions. The packaging box adjustment instructions are generated as follows:

[0063] The packaging box adjustment instruction is divided into a primary packaging box adjustment instruction and a secondary packaging box adjustment instruction, the packaging box damage assessment threshold is divided into a primary packaging box damage assessment threshold and a secondary packaging box damage assessment threshold, and the primary packaging box damage assessment threshold is less than the secondary packaging box damage assessment threshold;

[0064] When the damage assessment value of a packaging box is less than or equal to the first-level packaging box damage assessment threshold, it is marked as a qualified packaging box; the qualified packaging box is sent to the next production line process;

[0065] When the damage assessment value of the packaging box is greater than the first-level packaging box damage assessment threshold and less than or equal to the second-level packaging box damage assessment threshold, the packaging box is marked as a slightly damaged packaging box, and a first-level packaging box adjustment instruction is generated; the first-level packaging box adjustment instruction includes manually repairing the packaging box;

[0066] When the packaging box damage assessment value is greater than the secondary packaging box damage assessment threshold, the packaging box is marked as a severely damaged packaging box and a secondary packaging box adjustment instruction is generated; the secondary packaging box adjustment instruction includes sending the packaging box to a recycling station for recycling, thereby producing a new packaging box and reducing resource waste.

[0067] The packaging box damage assessment threshold is set according to the different types of goods. For example, when the furniture packaging is slightly damaged, the internal furniture is still intact, and the packaging box damage assessment threshold can be relatively increased. When the luxury product packaging is damaged, consumers have low acceptance, and the packaging box damage assessment threshold is set lower; for example, the first-level furniture packaging box damage assessment threshold is set to 20, and the second-level furniture packaging box damage assessment threshold is set to 50; the first-level luxury product packaging box damage assessment threshold is set to 5, and the second-level furniture packaging box damage assessment threshold is set to 30.

[0068] The data analysis module 2 analyzes the instability of the commodity after packaging based on the image data after packaging.

[0069] It should be noted that the goods will be packed only after the packaging box is judged to be qualified. If the goods are packed in a severely damaged packaging box, the goods will be more likely to shake after packaging, and the goods will not be fastened. Therefore, the first machine learning model is used to first detect the degree of damage to the packaging box, and then detect the stability of the packaging box after packaging.

[0070] The method of analyzing the instability of goods after packaging is as follows:

[0071] Graying the boxed image data, and using Gaussian filtering to smooth the grayed boxed image data;

[0072] Use the Canny algorithm to extract the edge points of the boxed image data;

[0073] Use Hough transform to extract the edge lines of the inner wall of the packaging box and the edge lines of the filler formed by edge points;

[0074] The square of the area enclosed by the straight lines of the inner wall of the packaging box minus the area enclosed by the straight lines of the filler edge is taken as the instability degree;

[0075] The area enclosed by the straight lines of the inner wall edge of the packaging box and the area enclosed by the straight lines of the filler edge are both obtained by the mathematical polygon area calculation formula.

[0076] Set an instability threshold. When the instability of the packaging box is greater than or equal to the instability threshold, the product is marked as unstable in the packaging box and a filling adjustment instruction is generated; when the instability of the packaging box is less than the instability threshold, the product is marked as stable in the packaging box.

[0077] The instability threshold is set according to different types of goods. For example, cotton goods are allowed to shake in the packaging box without affecting the product attributes, so the instability threshold is set higher. If precious metal goods are shaken in the packaging box, it may cause the appearance of the precious metal goods to deform and affect consumer satisfaction, so the instability threshold is set lower.

[0078] It should be noted that the image data after boxing is first grayed out because the core step of the Canny algorithm relies on the change of grayscale values ​​and gradients. In grayscale images, each pixel has only one grayscale value, and the gradient can be accurately calculated. The gradient is the rate of change of the grayscale value. In color images, each pixel has color values ​​of multiple channels, and the gradient cannot be directly calculated.

[0079] Use Gaussian filtering to process grayscale images to smooth the image and reduce noise. If Gaussian filtering is applied to color images, the color information will interfere with the smoothing operation and produce inaccurate results. Therefore, the image data after boxing must be grayscaled first.

[0080] The reason why the Canny algorithm can effectively extract edges is that it uses the special characteristics of edges in images. Edges are areas in the image where the grayscale value changes dramatically. Compared with the surrounding areas, the grayscale value jumps. The grayscale value of pixels at the edge will quickly jump from one value to another; the gradient at the edge is usually larger, and the edge shows obvious gradient changes.

[0081] The process of Canny algorithm includes:

[0082] Step S1, gradient calculation: on the smoothed image, use the Sobel operator to calculate the gradient of each pixel to generate a gradient image for detecting edges in the image;

[0083] Step S2, non-maximum suppression: performing non-maximum suppression on the gradient image, retaining the local maximum values ​​of the gradient that may be edge pixels, and removing the smaller gradient values;

[0084] Step S3, double threshold processing; set the high and low thresholds of the gradient, divide the gradient image into three parts: strong edge, weak edge and non-edge, so as to distinguish edge from noise; the edge in the image usually has a large gradient, while the noise usually has a small gradient; mark the pixels with a gradient greater than the high threshold as strong edges, and mark the pixels with a gradient less than or equal to the high threshold but greater than the low threshold as weak edges; these weak edges may be extensions of real edges or false edges caused by noise; pixels with a gradient less than or equal to the low threshold represent relatively flat areas or noise in the image, marked as non-edges, and non-edges are excluded; the specific values ​​of the high and low thresholds are obtained by the staff through multiple tuning of the actual engineering experiments of the Canny algorithm. Exemplarily, according to the statistical distribution of the image gradient, the top 5% of the gradient size is selected as the high threshold and the top 20% as the low threshold.

[0085] Noise refers to random, meaningless pixels in an image, which may be caused by sensor noise, signal interference, or other environmental factors. Noise can negatively impact image processing tasks and may be mistakenly identified as edges, leading to inaccurate results.

[0086] Step S4, edge connection: retain strong edge pixels and connect the strong edge pixels with adjacent weak edge pixels.

[0087] Hough Transform is an image processing technique used to detect specific shapes (such as lines, circles, etc.) in an image. Hough Transform maps each pixel in the image to a parameter space and finds image features that meet specific shape conditions by voting in the parameter space;

[0088] Taking the pixel point of any corner point in the boxed image data as the coordinate origin and the size of a pixel point as the unit distance, a plane XY rectangular coordinate system is established, and the corner point is the intersection point of the four boundaries of the boxed image data; the X-axis coordinate of each pixel point in the boxed image data is the number of pixels between the pixel point and the Y-axis in the vertical direction, and the Y-axis coordinate is the number of pixels between the pixel point and the X-axis in the vertical direction. The coordinates of the pixel point are the coordinates in the plane XY rectangular coordinate system;

[0089] Hough transform maps the pixel points retained by the Canny algorithm to the slope k-intercept b parameter space. It should be noted that a pixel point in the plane XY rectangular coordinate system is a straight line in the parameter space. Suppose the coordinates of a pixel point are (X1, Y1), which is represented as a straight line b=-kX1+Y1 in the parameter space. Conversely, a point in the parameter space corresponds to a straight line in the plane XY rectangular coordinate system. When a point in the parameter space is passed by a straight line, it is regarded as the number of votes plus 1, and the voting threshold is set. Finally, the points in the parameter space with a number of votes greater than the voting threshold are output. The output points are the edge straight lines in the plane XY rectangular coordinate system.

[0090] The edge straight lines include the edge straight lines of the inner wall of the packaging box and the edge straight lines of the filler. It can be understood that the figure formed by the edge straight lines of the filler is within the figure formed by the edge straight lines of the inner wall of the packaging box.

[0091] The voting threshold needs to be adjusted through experiments and observations; by trying different thresholds, observing the edge detection results, evaluating based on edge coherence, and selecting the best voting threshold.

[0092] The smaller the instability, the smaller the value of the area enclosed by the straight lines of the inner wall edge of the packaging box minus the area enclosed by the straight lines of the filler edge, the tighter the contact between the inner wall of the packaging box and the filler, the more stable the product, and vice versa, the easier it is to loosen.

[0093] Filler adjustment instructions include operations such as adding filler to the packaging box.

[0094] This embodiment realizes real-time identification of goods, provides corresponding packaging boxes and fillers, and can detect the degree of damage of the packaging boxes. After the goods are placed in the packaging boxes, the stability of the goods can be detected, which effectively reduces the cost of manual inspection, reduces the waste of resources, makes the goods more stable, reduces damage to the goods during transportation, and improves consumer satisfaction.

[0095] Example 2

[0096] See also Figure 2 As shown, the part not described in detail in this embodiment is described in the first embodiment, and a system and method for detecting packaging boxes on an intelligent production line are provided, the method comprising:

[0097] Collect 3D training data of the goods to be boxed, box image training data, and boxed image data;

[0098] Based on the 3D training data, a 3D model library of the product is established; based on the 3D training data collected in real time, 3D matching is performed with the 3D model of the product in the 3D model library to identify the type of product to be boxed and select the packaging box and packaging box filler corresponding to the product;

[0099] Training a first machine learning model for calculating a damage assessment value of a packaging box based on the packaging box image training data;

[0100] Set the packaging box damage assessment threshold and compare it with the packaging box damage assessment value to generate different packaging box adjustment instructions;

[0101] Based on the image data after boxing, the instability of the goods after boxing is analyzed and filling adjustment instructions are generated.

[0102] Furthermore, the three-dimensional training data includes three-dimensional point cloud data of the goods to be packed; the packaging box image training data includes image data of six surfaces of the packaging box; and the post-packaging image data is image data of the interior of the packaging box taken from a bird's-eye view after the goods are packed.

[0103] Furthermore, based on the three-dimensional training data, a three-dimensional model library of commodities is established, and commodity categories are numbered to generate a commodity category sequence G. The commodity category sequence G contains i categories of commodities, wherein the i-th commodity category is marked as G i ; For each product in the product category sequence G, set a packaging box and filler corresponding to each product;

[0104] The three-dimensional matching is achieved through the ICP algorithm, and the process is as follows:

[0105] Step 1, select reference point cloud A; randomly select a 3D point cloud data from the 3D model library as the reference point cloud A, and the reference point cloud A is the target point cloud that the point cloud B in the real-time 3D training data needs to match;

[0106] Step 2: pre-matching point cloud B with reference point cloud A; extracting feature information from reference point cloud A and point cloud B, finding similar points in reference point cloud A and point cloud B based on the feature information, and preliminarily determining the position and posture relationship between point cloud B and reference point cloud A;

[0107] Step 3, calculate the overall distance error; take each point in the reference point cloud A as a reference, find the nearest neighbor point in the point cloud B that corresponds to each point in the reference point cloud A one-to-one, and then calculate the distance error between each point in the reference point cloud A and the nearest neighbor point in the point cloud B; add the distance errors to obtain the overall distance error between the reference point cloud A and the point cloud B; transform each point in the point cloud B by means of a transformation matrix; recalculate the overall distance error between the reference point cloud A and the point cloud B; iterate step 3 multiple times to converge the overall distance error between the point cloud B and the reference point cloud A;

[0108] Step 4: Output the matching result; when the overall distance error between point cloud B and reference point cloud A converges, the commodity type corresponding to point cloud B is output as the matching result, and the matching result is the type of commodity to be boxed.

[0109] Furthermore, the training method of the first machine learning model for calculating the damage assessment value of the packaging box based on the packaging box image training data is as follows:

[0110] The packaging box image training data is used as the input of the first machine learning model to evaluate the damage of the packaging box, and the packaging box damage assessment value is used as the input label of the packaging box image training data; the output of the first machine learning model is the real-time packaging box damage assessment value; the packaging box damage assessment value corresponding to each set of packaging box image training data is used as the prediction target to minimize the loss function As the training target; stop training when the loss function of the first machine learning model is less than or equal to the target loss value;

[0111] In the loss function, mse is the loss function value, i is the number of the training data set of the packaging box image; u is the number of the training data set of the packaging box image; y i is the input label corresponding to the i-th group of packaging box image training data, The package damage assessment value calculated in real time for the i-th group of package image training data.

[0112] Further, the packaging box adjustment instruction is divided into a primary packaging box adjustment instruction and a secondary packaging box adjustment instruction, the packaging box damage assessment threshold is divided into a primary packaging box damage assessment threshold and a secondary packaging box damage assessment threshold, and the primary packaging box damage assessment threshold is less than the secondary packaging box damage assessment threshold;

[0113] When the damage assessment value of the packaging box is less than or equal to the first-level packaging box damage assessment threshold, it is marked as a qualified packaging box;

[0114] When the damage assessment value of the packaging box is greater than the first-level packaging box damage assessment threshold and less than or equal to the second-level packaging box damage assessment threshold, the packaging box is marked as a slightly damaged packaging box, and a first-level packaging box adjustment instruction is generated; the first-level packaging box adjustment instruction includes repairing the packaging box;

[0115] When the damage assessment value of the packaging box is greater than the damage assessment threshold of the secondary packaging box, the packaging box is marked as a severely damaged packaging box, and a secondary packaging box adjustment instruction is generated; the secondary packaging box adjustment instruction includes recycling the packaging box.

[0116] Further, the instability of the goods after boxing is analyzed as follows:

[0117] Graying the boxed image data, and using Gaussian filtering to smooth the grayed boxed image data;

[0118] Use the Canny algorithm to extract the edge points of the boxed image data;

[0119] Use Hough transform to extract the edge lines of the inner wall of the packaging box and the edge lines of the filler formed by edge points;

[0120] The square of the area enclosed by the straight lines of the inner wall of the packaging box minus the area enclosed by the straight lines of the filler edge is taken as the instability degree;

[0121] An instability threshold is set. When the instability of the packaging box is greater than or equal to the instability threshold, the product is marked as unstable in the packaging box and a filling adjustment instruction is generated; when the instability of the packaging box is less than the instability threshold, the product is marked as stable in the packaging box; the filling adjustment instruction includes adding fillers to the packaging box.

[0122] Furthermore, the process of the Canny algorithm includes:

[0123] Step S1, gradient calculation: on the smoothed boxed image data, the gradient of each pixel is calculated to generate a gradient image for detecting edges in the boxed image data;

[0124] Step S2, non-maximum suppression: performing non-maximum suppression on the gradient image, retaining the local maximum value of the gradient, and removing the smaller gradient value;

[0125] Step S3, double threshold processing; set the gradient high threshold and low threshold, divide the gradient image into three parts: strong edge, weak edge and non-edge; mark the pixels with gradient greater than the high threshold as strong edge, and mark the pixels with gradient less than or equal to the high threshold but greater than the low threshold as weak edge; mark the pixels with gradient less than or equal to the low threshold as non-edge, and exclude the non-edge;

[0126] Step S4, edge connection: retaining strong edge pixels and connecting the strong edge pixels with adjacent weak edge pixels;

[0127] The process of Hough transform includes:

[0128] Taking the pixel point of any corner point in the boxed image data as the coordinate origin and the size of a pixel point as the unit distance, a plane XY rectangular coordinate system is established. The X-axis coordinate of each pixel point in the boxed image data is the number of pixels between this pixel point and the Y axis in the vertical direction, and the Y-axis coordinate is the number of pixels between this pixel point and the X axis in the vertical direction. The coordinates of the pixel point are the coordinates in the plane XY rectangular coordinate system.

[0129] The pixel points retained by the Canny algorithm are mapped to the slope k-intercept b parameter space. A pixel point in the plane XY rectangular coordinate system is a straight line in the parameter space. Suppose the coordinates of a pixel point are (X1, Y1), which is represented by a straight line b=-kX1+Y1 in the parameter space. A point in the parameter space corresponds to a straight line in the plane XY rectangular coordinate system. When a point in the parameter space is passed by an additional straight line, it is regarded as the number of votes plus 1. The voting threshold is set, and the points in the parameter space whose number of votes is greater than the voting threshold are output. The output points are the inner wall edge straight line of the packaging box and the filler edge straight line in the plane XY rectangular coordinate system. The figure enclosed by the filler edge straight line is within the figure enclosed by the inner wall edge straight line of the packaging box.

[0130] Example 3

[0131] See also Figure 3 As shown, an electronic device according to an exemplary embodiment includes: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;

[0132] The processor executes the above-mentioned intelligent production line packaging box detection method by calling the computer program stored in the memory.

[0133] Example 4

[0134] According to an exemplary embodiment, a computer-readable storage medium is shown, on which a rewritable computer program is stored;

[0135] When the computer program is run on a computer device, the computer device executes the above-mentioned intelligent production line packaging box detection system and method.

[0136] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0137] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0138] 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.

[0139] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only one, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0142] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0143] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting packaging boxes on an intelligent production line, characterized in that: include: Collect 3D training data of the goods to be boxed, box image training data, and boxed image data; Based on the 3D training data, a 3D model library of the product is established; based on the 3D training data collected in real time, 3D matching is performed with the 3D model of the product in the 3D model library to identify the type of product to be boxed and select the packaging box and packaging box filler corresponding to the product; Training a first machine learning model for calculating a damage assessment value of a packaging box based on the packaging box image training data; Set the packaging box damage assessment threshold and compare it with the packaging box damage assessment value to generate different packaging box adjustment instructions; Based on the image data after boxing, analyze the instability of the goods after boxing and generate filling adjustment instructions; The commodity types are numbered based on the three-dimensional model library to generate a commodity type sequence G; the commodity type sequence G contains i types of commodities, and the i-th commodity type is marked as G i ; For each product in the product category sequence G, set a packaging box and filler corresponding to each product; The three-dimensional matching is achieved through the ICP algorithm, and the process is as follows: Step 1, select reference point cloud A; randomly select a 3D point cloud data from the 3D model library as the reference point cloud A, and the reference point cloud A is the target point cloud that the point cloud B in the real-time 3D training data needs to match; Step 2: pre-matching point cloud B with reference point cloud A; Extract feature information from reference point cloud A and point cloud B, find similar points in reference point cloud A and point cloud B based on the feature information, and preliminarily determine the position and posture relationship between point cloud B and reference point cloud A; Step 3, calculate the overall distance error; Taking each point in the reference point cloud A as a reference, find the nearest neighbor point in the point cloud B that corresponds to each point in the reference point cloud A one-to-one, and then calculate the distance error between each point in the reference point cloud A and the nearest neighbor point in the point cloud B; add the distance errors to obtain the overall distance error between the reference point cloud A and the point cloud B; transform each point in the point cloud B by means of a transformation matrix; recalculate the overall distance error between the reference point cloud A and the point cloud B; iterate step 3 multiple times to converge the overall distance error between the point cloud B and the reference point cloud A; Step 4: Output the matching results; When the overall distance error between point cloud B and reference point cloud A converges, the commodity type corresponding to point cloud B is output as the matching result, and the matching result is the type of commodity to be boxed; An instability threshold is set. When the instability of the packaging box is greater than or equal to the instability threshold, the product is marked as unstable in the packaging box, and a filler adjustment instruction is generated; when the instability of the packaging box is less than the instability threshold, the product is marked as stable in the packaging box; the filler adjustment instruction includes adding fillers to the packaging box; The method of analyzing the instability of goods after packaging is as follows: Graying the boxed image data, and using Gaussian filtering to smooth the grayed boxed image data; Use the Canny algorithm to extract the edge points of the boxed image data; Use Hough transform to extract the edge lines of the inner wall of the packaging box and the edge lines of the filler formed by edge points; The square of the area enclosed by the straight lines of the inner wall edge of the packaging box minus the area enclosed by the straight lines of the filler edge is taken as the instability degree.

2. The method for detecting packaging boxes on an intelligent production line according to claim 1, characterized in that: The three-dimensional training data includes three-dimensional point cloud data of the goods to be packed; the packaging box image training data includes image data of six surfaces of the packaging box; and the post-packaging image data is image data of the interior of the packaging box taken from a bird's-eye view after the goods are packed.

3. The method for detecting packaging boxes on an intelligent production line according to claim 2, characterized in that: The training method of the first machine learning model for calculating the damage assessment value of the packaging box based on the packaging box image training data is as follows: The packaging box image training data is used as the input of the first machine learning model to evaluate the damage of the packaging box, and the packaging box damage assessment value is used as the input label of the packaging box image training data; the output of the first machine learning model is the real-time packaging box damage assessment value; the packaging box damage assessment value corresponding to each set of packaging box image training data is used as the prediction target to minimize the loss function As the training target; stop training when the loss function of the first machine learning model is less than or equal to the target loss value; In the loss function, mse is the loss function value, i is the number of the training data set of the packaging box image; u is the number of the training data set of the packaging box image; y i is the input label corresponding to the i-th group of packaging box image training data, The package damage assessment value calculated in real time for the i-th group of package image training data.

4. The method for detecting packaging boxes on an intelligent production line according to claim 3, characterized in that: The packaging box adjustment instruction is divided into a primary packaging box adjustment instruction and a secondary packaging box adjustment instruction, the packaging box damage assessment threshold is divided into a primary packaging box damage assessment threshold and a secondary packaging box damage assessment threshold, and the primary packaging box damage assessment threshold is less than the secondary packaging box damage assessment threshold; When the damage assessment value of the packaging box is less than or equal to the first-level packaging box damage assessment threshold, it is marked as a qualified packaging box; When the damage assessment value of the packaging box is greater than the first-level packaging box damage assessment threshold and less than or equal to the second-level packaging box damage assessment threshold, the packaging box is marked as a slightly damaged packaging box, and a first-level packaging box adjustment instruction is generated; the first-level packaging box adjustment instruction includes repairing the packaging box; When the damage assessment value of the packaging box is greater than the damage assessment threshold of the secondary packaging box, the packaging box is marked as a severely damaged packaging box, and a secondary packaging box adjustment instruction is generated; the secondary packaging box adjustment instruction includes recycling the packaging box.

5. The method for detecting packaging boxes on an intelligent production line according to claim 4, characterized in that: The process of Canny algorithm includes: Step S1, gradient calculation: on the smoothed boxed image data, the gradient of each pixel is calculated to generate a gradient image for detecting edges in the boxed image data; Step S2, non-maximum suppression: performing non-maximum suppression on the gradient image, retaining the local maximum value of the gradient, and removing the smaller gradient value; Step S3, double threshold processing; set the gradient high threshold and low threshold, divide the gradient image into three parts: strong edge, weak edge and non-edge; mark the pixels with gradient greater than the high threshold as strong edge, and mark the pixels with gradient less than or equal to the high threshold but greater than the low threshold as weak edge; mark the pixels with gradient less than or equal to the low threshold as non-edge, and exclude the non-edge; Step S4, edge connection: retaining strong edge pixels and connecting the strong edge pixels with adjacent weak edge pixels; The process of Hough transform includes: Taking the pixel point of any corner point in the boxed image data as the coordinate origin and the size of a pixel point as the unit distance, a plane XY rectangular coordinate system is established. The X-axis coordinate of each pixel point in the boxed image data is the number of pixels between this pixel point and the Y axis in the vertical direction, and the Y-axis coordinate is the number of pixels between this pixel point and the X axis in the vertical direction. The coordinates of the pixel point are the coordinates in the plane XY rectangular coordinate system. The pixel points retained by the Canny algorithm are mapped to the slope k-intercept b parameter space. A pixel point in the plane XY rectangular coordinate system is a straight line in the parameter space. Suppose the coordinates of a pixel point are (X1, Y1), which is represented by a straight line b=-kX1+Y1 in the parameter space. A point in the parameter space corresponds to a straight line in the plane XY rectangular coordinate system. When a point in the parameter space is passed by an additional straight line, it is regarded as the number of votes plus 1. The voting threshold is set, and the points in the parameter space whose number of votes is greater than the voting threshold are output. The output points are the inner wall edge straight line of the packaging box and the filler edge straight line in the plane XY rectangular coordinate system. The figure enclosed by the filler edge straight line is within the figure enclosed by the inner wall edge straight line of the packaging box.

6. An intelligent production line packaging box detection system, characterized in that: include: A data acquisition module (1) is used to acquire three-dimensional training data of the goods to be packed, packaging box image training data and image data after packing; A three-dimensional matching module (5) is used to establish a three-dimensional model library of commodities based on the three-dimensional training data; based on the three-dimensional training data collected in real time, three-dimensional matching is performed with the three-dimensional model of commodities in the three-dimensional model library to identify the type of commodities to be packed and select a packaging box and a packaging box filler corresponding to the commodities; A model training module (3) is used to train a first machine learning model for calculating a damage assessment value of a packaging box based on packaging box image training data; The control module (4) sets a packaging box damage assessment threshold and compares it with the packaging box damage assessment value to generate different packaging box adjustment instructions; The data analysis module (2) analyzes the instability of the product after packaging based on the image data after packaging, and generates a filling adjustment instruction; The commodity types are numbered based on the three-dimensional model library to generate a commodity type sequence G; the commodity type sequence G contains i types of commodities, and the i-th commodity type is marked as G i ; For each product in the product category sequence G, set a packaging box and filler corresponding to each product; The three-dimensional matching is achieved through the ICP algorithm, and the process is as follows: Step 1, select reference point cloud A; randomly select a 3D point cloud data from the 3D model library as the reference point cloud A, and the reference point cloud A is the target point cloud that the point cloud B in the real-time 3D training data needs to match; Step 2: pre-matching point cloud B with reference point cloud A; Extract feature information from reference point cloud A and point cloud B, find similar points in reference point cloud A and point cloud B based on the feature information, and preliminarily determine the position and posture relationship between point cloud B and reference point cloud A; Step 3, calculate the overall distance error; Taking each point in the reference point cloud A as a reference, find the nearest neighbor point in the point cloud B that corresponds to each point in the reference point cloud A one-to-one, and then calculate the distance error between each point in the reference point cloud A and the nearest neighbor point in the point cloud B; add the distance errors to obtain the overall distance error between the reference point cloud A and the point cloud B; transform each point in the point cloud B by means of a transformation matrix; recalculate the overall distance error between the reference point cloud A and the point cloud B; iterate step 3 multiple times to converge the overall distance error between the point cloud B and the reference point cloud A; Step 4: Output the matching results; When the overall distance error between point cloud B and reference point cloud A converges, the commodity type corresponding to point cloud B is output as the matching result, and the matching result is the type of commodity to be boxed; An instability threshold is set. When the instability of the packaging box is greater than or equal to the instability threshold, the product is marked as unstable in the packaging box, and a filler adjustment instruction is generated; when the instability of the packaging box is less than the instability threshold, the product is marked as stable in the packaging box; the filler adjustment instruction includes adding fillers to the packaging box; The method of analyzing the instability of goods after packaging is as follows: Graying the boxed image data, and using Gaussian filtering to smooth the grayed boxed image data; Use the Canny algorithm to extract the edge points of the boxed image data; Use Hough transform to extract the edge lines of the inner wall of the packaging box and the edge lines of the filler formed by edge points; The square of the area enclosed by the straight lines of the inner wall edge of the packaging box minus the area enclosed by the straight lines of the filler edge is taken as the instability degree.

7. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; The processor executes the intelligent production line packaging box detection method according to any one of claims 1 to 5 by calling the computer program stored in the memory.

8. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are run on a computer, the computer is caused to execute the intelligent production line packaging box detection method as described in any one of claims 1 to 5.