| CPC G06T 7/0008 (2013.01) [G06T 3/40 (2013.01); G06T 3/60 (2013.01); G06T 7/10 (2017.01); G06T 2207/20084 (2013.01); G06T 2207/30144 (2013.01)] | 8 Claims |

|
1. A method for automatically pre-detecting paper cup design defects, comprising the following steps:
S10: obtaining a design drawing set with a preset precise mask covering an entire fan-shaped frame and also a prompt or annotation, wherein the design drawing set comprises a defect-free design drawing, a defective design drawing, and a design drawing constructed according to specification data;
S20: obtaining an image segmentation model for detecting an image segmentation mask constructed based on a neural network technology, and importing the design drawing set into the image segmentation model for training;
S30: receiving an imported design drawing to be detected, and obtaining a corresponding fan-shaped image mask through the trained image segmentation model;
S40: converting the fan-shaped image mask into a real fan-shaped frame;
S50: calculating and obtaining a corresponding target model design drawing according to the real fan-shaped frame, and mapping to the specification data of a corresponding model; and
S60: partitioning the real fan-shaped frame according to the mapped specification data, detecting corresponding defects in each partition through a preset detection module, and outputting defect detection results;
the S10 comprises the following sub-steps:
S11: obtaining a preset fan-shaped image design template;
S12: assisting to manually acquire fan-shaped image specification data through a preset software UI interaction module, wherein the fan-shaped image specification data comprises a left side line, a right side line, an angle between the two side lines, lengths of the two side lines, an upper arc vertex, a lower arc vertex, and a center and a radius of a concentric circle in a printing area;
S13: automatically constructing a fan-shaped image design drawing according to the image design template and the fan-shaped image specification data, wherein content in the printing area of the fan-shaped image design drawing can be left blank or randomly generated;
S14: adding interference information to the fan-shaped image design drawing; and
S15: based on the fan-shaped image specification data, generating a precise mask covering the entire fan-shaped frame through a preset automatic annotation module, and generating a prompt or annotation;
the S60 comprises the following sub-steps:
detecting whether a model matches according to an angle between straight lines on both sides of the fan-shaped frame, lengths of the two sides, and positions of an upper arc vertex and a lower arc vertex; and/or,
traversing pixels beyond a fan-shaped area of an image and checking existence of any non-zero pixels to determine whether there is any content beyond the fan-shaped area; and/or,
traversing pixels within the fan-shaped area and beyond a printing area, and checking existence of any non-zero pixels to determine whether there is any content beyond the printing area; and/or,
checking whether a white space left in an upper part of paper cup beyond the printing area complies with relevant national standards.
|