Method and system for inspecting packages for packaging defects
Systems and methods are disclosed for detecting package defects in a target package transported on a conveyance. The expected shape and volume of the target package is predefined and represented as a reference package polyhedron. Imaging data is gathered for the target package. The imaging data is converted into a target package polyhedron and compared with the reference package polyhedron. The target package is flagged as potentially defective when the target package polyhedron is unable to fit within the reference package polyhedron.
1 . A method for detecting package defects in a three-dimensional (3D) target package, the method comprising:
receiving data representing one or more dimensions of a 3D reference package,
determining, from the data representing one or more dimensions of the 3D reference package, a reference package polyhedron,
moving the target package along a conveyor,
receiving two or more two-dimensional (2D) slices of the target package as the target package moves along the conveyor,
assembling the 2D slices into 3D imaging data representing one or more dimensions of the target package,
receiving the 3D imaging data representing one or more dimensions of the target package,
determining, from the 3D imaging data representing one or more dimensions of the target package, a target package polyhedron, wherein the target package polyhedron is sufficient to enclose the target package,
comparing the reference package polyhedron to the target package polyhedron, issuing a pass/fail designation for the target package, wherein
a pass designation is issued if the reference package polyhedron is large enough to enclose the target package polyhedron, and
a fail designation is issued if the reference package polyhedron is not large enough to enclose the target package polyhedron.
2 . The method of claim 1 , wherein receiving data representing one or more dimensions of a 3D reference package further comprises the step of manually entering the one or more dimensions of the 3D reference package.
3 . The method of claim 1 , wherein receiving data representing one or more dimensions of a 3D reference package further comprises the step of scanning a reference package with a 3D camera.
4 . The method of claim 1 , wherein determining, from the data representing one or more dimensions of the 3D reference package, a reference package polyhedron further comprises the step of adding a length to one or more dimensions of the reference package polyhedron.
5 . The method of claim 4 , wherein the length is manually selected.
6 . The method of claim 4 , wherein the length is calculated from prior measurements of one or more target packages.
7 . The method of claim 6 , wherein the length is a threshold multiple of the absolute average deviation of prior measurements of two or more target packages.
8 . The method of claim 1 , wherein the 3D imaging data representing one or more dimensions of the target package is collected by one or more 3D cameras.
9 . The method of claim 8 , wherein the 3D imaging data representing one or more dimensions of the target package is collected by at least two 3D cameras positioned on opposite sides of the target package, and above the target package.
10 . The method of claim 8 , wherein the 3D imaging data representing one or more dimensions of the target package is collected by at least three 3D cameras, wherein at least one camera is positioned above the target package, and two cameras are positioned on opposite sides of the target package.
11 . The method of claim 8 , wherein the 3D imaging data representing one or more dimensions of the target package is collected by at least four 3D cameras, wherein at least two cameras are positioned on opposite sides of the target package, and at least two cameras are positioned above the target package.
12 . The method of claim 1 , wherein receiving the 3D imaging data representing one or more dimensions of the target package occurs while the target package is in a static position.
13 . The method of claim 1 , wherein receiving the 3D imaging data representing one or more dimensions of the target package occurs while the target package is in translation across a conveyor.
14 . The method of claim 13 , wherein the target package is comprised of at least one side, and the at least one side is oriented parallel to the direction of the conveyor.
15 . The method of claim 13 , wherein the target package is comprised of at least one side, and the at least one side is oriented at an angle to the direction of the conveyor.
16 . The method of claim 13 , wherein the receiving 3D imaging data representing one or more dimensions of the target package occurs when the target package is in any position across the width of the conveyor.
17 . The method of claim 1 , wherein the target package polyhedron is the minimum-sized polyhedron that can envelope the target package.
18 . The method of claim 1 , wherein the target package is a cuboid, and the reference package polyhedron is a cuboid.
19 . The method of claim 1 , wherein the target package is a cylinder, and the reference package polyhedron is comprised of multiple faces approximating the 3D shape of the cylinder.
20 . The method of claim 1 , wherein the target package is an irregular 3D shape, and the reference package polyhedron is comprised of multiple faces approximating the irregular 3D shape.
21 . The method of claim 1 , further comprising the steps:
comparing at least one of the two or more 2D slices of the target package to the reference package polyhedron,
issuing a pass/fail designation for the target package, wherein
a pass designation is issued if the reference package polyhedron is large enough to enclose at least one of the two or more 2D slices of the target package, and
a fail designation is issued if the reference package polyhedron is not large enough enclose the at least one of the two or more 2D slices of the target package.
22 . The method of claim 1 , further comprising the steps:
receiving at least one 2D reference package polygon, representing a 2D slice of the reference package polyhedron,
comparing at least one of the two or more 2D slices of the target package to the reference package polygon,
issuing a pass/fail designation for the target package, wherein
a pass designation is issued if the 2D reference package polygon is large enough to enclose the at least one of the two or more 2D slices of the target package, and
a fail designation is issued if the 2D reference package polygon is not large enough to enclose the at least one of the two or more 2D slices of the target package.
23 . The method of claim1 , further comprising the steps:
training a first AI model of a plurality of AI models to extract feature vectors from one or more images of packages,
extracting, via the first AI model of the plurality of AI modes, at least one feature vector from at least one image of the reference package,
training a second AI model of the plurality of AI models to extract feature vectors from one or more images of packages,
extracting, via the second AI model of the plurality of AI models, at least one feature vector from at least one image of the target package,
defining a threshold value based on a deviation from the at least one feature vector from the at least one image of the reference package,
comparing the at least one feature vector from the at least one image of the target package to the at least one feature vector from the at least one image of the reference package, and
determining, via a third AI model of the plurality of AI models, whether the at least one feature vector from the at least one image of the target package deviates beyond the threshold from the at least one feature vector from the at least one image of the reference package,
issuing a pass/fail designation for the target package, wherein
a pass designation is issued if the at least one feature vector from the at least one image of the target package does not deviate beyond the threshold from the at least one feature vector from the at least one image of the reference package, and
a fail designation is issued if the at least one feature vector from the at least one image of the target package does deviate beyond the threshold from the at least one feature vector from the at least one image of the reference package.
24 . The method of claim 23 , wherein the first AI model of the plurality of AI models is trained with ground-truth labels corresponding to detect-free packages.
25 . The method of claim 23 , wherein the at least one feature vector from the at least one image of the reference package represents a surface characteristic.
26 . The method of claim 23 , wherein the at least one feature vector from the at least one image of the reference package represents a geometric attribute.
27 . The method of claim 23 , wherein the at least one feature vector from the at least one image of the reference package represents a color.
28 . The method of claim 23 , wherein the one or more images of packages, the at least one image of the reference package, and the at least one image of the target package are 2D images.
29 . The method of claim 23 , wherein the one or more images of packages, the at least one image of the reference package, and the at least one image of the target package are 3D images.