CN117876348A - Automatic pre-detection method and device for paper cup design defects - Google Patents

Automatic pre-detection method and device for paper cup design defects Download PDF

Info

Publication number
CN117876348A
CN117876348A CN202410062554.8A CN202410062554A CN117876348A CN 117876348 A CN117876348 A CN 117876348A CN 202410062554 A CN202410062554 A CN 202410062554A CN 117876348 A CN117876348 A CN 117876348A
Authority
CN
China
Prior art keywords
design
sector
mask
detection
design drawing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410062554.8A
Other languages
Chinese (zh)
Other versions
CN117876348B (en
Inventor
黄明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiwai Technology Co ltd
Original Assignee
Shenzhen Saiwai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Saiwai Technology Co ltd filed Critical Shenzhen Saiwai Technology Co ltd
Priority to CN202410062554.8A priority Critical patent/CN117876348B/en
Publication of CN117876348A publication Critical patent/CN117876348A/en
Application granted granted Critical
Publication of CN117876348B publication Critical patent/CN117876348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses an automatic pre-detection method and device for paper cup design defects, comprising the following steps: receiving an imported design drawing to be detected, and acquiring a corresponding sector mask through a trained image segmentation model; converting the sector mask into a real sector frame; calculating and corresponding to a target model design drawing according to the real fan-shaped frame, so as to map to specification data of a corresponding model; and partitioning the real sector frame according to the mapped specification data, and detecting corresponding defects of each partition through a preset detection module, so as to output a defect detection result. The invention can find out the existing design defects only through the planar design manuscript, reduces the cost, improves the flexible production capacity, fills the industry blank, and is the basis and premise for realizing automatic and unmanned imposition. The defect detection function is pluggable, a detection module with poor effect can be replaced, a new detection item can be added, and the basic module does not need to be changed.

Description

Automatic pre-detection method and device for paper cup design defects
[ field of technology ]
The invention relates to the technical field of paper cup detection, in particular to an automatic pre-detection method and device for paper cup design defects.
[ background Art ]
The production of a paper cup requires a plurality of links, and needs to be subjected to planar design, typesetting, manuscript fixing, plate making (makeup or special edition), publishing, printing, die cutting, forming and the like. The paper cup has the characteristics of rich design content and complex expression, so that the following design or printing defects frequently occur in actual production:
1) Designing another model cup on the wrong model template: the result is that the design of the small cup is used for the large cup or the design of the large cup is used for the small cup, and the printed design is completely waste;
2) Rectangular area does not fit into sector arc (no arc drawn): causing the design content in the rectangular area on the cup to skew after molding;
3) Intermediate steps such as design auxiliary lines, frames, prompt to clients in the design process are not deleted: the result is that these legacy information is printed on the customer's finished product, resulting in complete rejection;
4) The design does not meet the national standard: new edition GB/T27590-2022 paper cup is implemented on 1 day of 2 months in 2023, requiring: the cup mouth is 15mm (without 15 mm) away from the cup body and should not be printed; capacity markings with a total length of no more than 10mm may be printed in a region 15mm (excluding 15 mm) from the cup opening.
5) No bleeding site: the cup is subjected to die cutting and forming, and then the cup is leaked or the content is cut off;
6) Layer loss after design drawing export;
7) Manually inputting characters to cause wrongly written characters during design;
8) Information errors such as important numbers, websites and the like;
in summary, all of these drawbacks, combined with other possible drawbacks, are that the industry is currently aware of what problems are present only after the paper cup is completely manufactured, thereby causing a great deal of quality and quality problems and huge losses.
Especially in the background of the flexible production, customization and small form quick-reversing production modes promoted by the state in recent years, the problems become more and more prominent, and the promotion and development of the flexible and customization production modes in the paper cup industry are promoted and developed by the stopper: since the number of orders is not large, the possible hidden defects are so large, and if the repeated proofing is needed to avoid the defects, the whole production process is repeatedly carried out, so that the small order quick-reverse mode can hardly be carried out.
There is a great need in the industry for a system or solution that can effectively detect these problems prior to printing, and because of the infinite number of errors in the actual design, it is desirable that such a system be capable of adding new detection functions, updating or disabling existing detection functions at any time. However, currently, the industry basically relies on manual inspection, and no related technical scheme exists.
In view of the foregoing, it is desirable to provide an automatic pre-detection method and apparatus for paper cup design defects to overcome the above-mentioned defects.
[ invention ]
The invention aims to provide an automatic pre-detection method and device for paper cup design defects, which aim to solve the problem that the defects cannot be effectively detected before paper cup printing in the prior art, and the existing design defects can be found only through a planar design draft, so that the cost is reduced, the flexible production capacity is improved, and the blank of the industry is filled.
In order to achieve the above object, a first aspect of the present invention provides an automatic pre-detection method for paper cup design defects, comprising:
step S10: acquiring an accurate mask which is generated to cover the whole fan-shaped frame and a design drawing set which is generated to be sympt or marked; the design atlas comprises a non-defective design drawing, a defective design drawing and a design drawing constructed according to specification data;
step S20: acquiring an image segmentation model constructed based on a neural network technology and used for detecting a sector segmentation mask, and importing the design atlas into the image segmentation model for training;
step S30: receiving an imported design drawing to be detected, and acquiring a corresponding sector mask through a trained image segmentation model;
step S40: converting the sector mask into a real sector frame;
step S50: calculating and corresponding to a target model design drawing according to the real fan-shaped frame, so as to map to specification data of a corresponding model;
step S60: and partitioning the real sector frame according to the mapped specification data, and detecting corresponding defects of each partition through a preset detection module, so as to output a defect detection result.
In a preferred embodiment, the step S10 includes the steps of:
acquiring an imported design drawing set which is used in production and has no error, generating an accurate mask covering the whole fan-shaped frame through a preset automatic labeling module, and generating a prompt or label; or alternatively, the first and second heat exchangers may be,
and acquiring an imported design drawing set containing design errors, assisting in manually generating an accurate mask covering the whole fan-shaped frame through a preset auxiliary labeling module, and generating a prompt or label.
In a preferred embodiment, the step S10 includes:
step S11: obtaining a preset fan blade design template;
step S12: manually acquiring sector specification data through a preset software UI interaction module; the fan specification data comprise left sides, right sides, included angles of two sides, lengths of two sides, an upper arc vertex, a lower arc vertex, a circle center and a radius of a concentric circle in a printing area;
step S13: automatically constructing a sector design drawing according to the sector design template and the sector specification data; wherein, the content of the printing area of the sector design drawing can be left blank or randomly generated;
step S14: adding interference information to the sector design diagram;
step S15: based on the sector specification data, a preset automatic labeling module is used for generating an accurate mask covering the whole sector frame, and a prompt or label is generated.
In a preferred embodiment, the step S10 further includes:
one or more of the following combinations are performed on the design drawings of the design atlas: image rotation, scaling, cropping, color shifting, and noise addition.
In a preferred embodiment, the step S20 includes:
the design atlas is imported into the image segmentation model to carry out preset round training, and an image segmentation model with the primary round training completed is obtained;
inputting a preset test set into an image segmentation model after primary wheel training to test the generation effect of a paper cup fan mask;
if the test result does not reach the expected condition, the selected marking data is adjusted, added, partially deleted or completely deleted, and then new marking data is continuously input into the image segmentation model for training;
and circularly executing the steps for a preset period until an image segmentation model capable of meeting the test effect is obtained.
In a preferred embodiment, the step S30 includes:
inputting the design drawing to be detected into the trained image segmentation model, and judging whether the sector mask is successfully obtained or not;
if the acquisition fails, detecting the sector graph by using a target detection module built in the image segmentation model, so as to obtain a detection frame of the sector graph;
transmitting the detection frame to a segmentation module built in the image segmentation model, and attempting to acquire a sector mask again;
and if the image segmentation model still does not acquire the sector mask after trying for the preset times, confirming acquisition failure and outputting detection failure information.
In a preferred embodiment, the step S30 includes:
converting the mask into a binary image to obtain a mask image in a picture file format;
acquiring a minimum box of the mask map;
and cutting and normalizing the mask map into the size of the picture corresponding to the actual sector.
In a preferred embodiment, the step S40 includes:
step S41: a window with the size being preset is set;
step S42: traversing a target pixel of the mask frame;
step S43: storing the obtained pixels on the design drawing in a region with a fixed size of the target pixels and a region of the corresponding region on the design drawing to be detected;
step S44: and (4) circularly executing the steps S42-S43 until the mask frame pixels are traversed, and obtaining the outline of the whole fan-shaped frame.
In a preferred embodiment, the step S60 includes:
detecting whether the models are matched according to the included angle of straight lines at two sides of the fan-shaped frame, the side length and the positions of top points of upper and lower arcs; and/or the number of the groups of groups,
traversing pixels outside a sector area of the picture, and checking whether non-0 pixels exist or not so as to judge whether contents exist outside the sector area or not; and/or the number of the groups of groups,
traversing pixels in the sector area and outside the printing area, and checking whether non-0 pixels exist or not to judge whether contents exist outside the printing area or not; and/or the number of the groups of groups,
detecting whether the margin of the upper part outside the printing area meets the national standard.
The second aspect of the present invention provides an automatic paper cup design defect pre-detection device, comprising:
the atlas acquisition module is used for acquiring an accurate mask which is generated to cover the whole fan-shaped frame and generating a design atlas with a prompt or label; the design atlas comprises a non-defective design drawing, a defective design drawing and a design drawing constructed according to specification data;
the model acquisition module is used for acquiring an image segmentation model constructed based on a neural network technology and used for detecting a sector segmentation mask, and importing the design atlas into the image segmentation model for training;
the mask segmentation module receives the imported design drawing to be detected, and acquires a corresponding sector mask through the trained image segmentation model;
the mask conversion module is used for converting the sector mask into a real sector frame;
the model mapping module is used for calculating and corresponding to a target model design drawing according to the real fan-shaped frame so as to map to specification data of a corresponding model;
the partition detection module is used for partitioning the real sector frame according to the mapped specification data, and detecting corresponding defects of each partition through the preset detection module, so that a defect detection result is output.
A third aspect of the present invention provides a terminal comprising a memory, a processor and a computer program stored in the memory, which when executed by the processor, implements the steps of the paper cup design defect automatic pre-detection method according to any one of the above embodiments.
A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the paper cup design defect automatic pre-detection method according to any one of the above embodiments.
A fifth aspect of the present invention provides a computer program product comprising a computer program or instructions which, when processed for execution, implement the steps of the paper cup design defect automatic pre-detection method as described in any one of the above embodiments.
According to the automatic pre-detection method and device for the paper cup design defects, the image segmentation model for accurately obtaining the sector segmentation mask is constructed and trained, the obtained segmentation mask is analyzed and mapped to the sector with the corresponding model, so that the corresponding model specification data are obtained, then the sector specification data are input to the design picture to be detected, the line is partitioned, finally, different defect detection modules can be called to carry out corresponding defect detection in different areas, the existing design defects can be found only through plane design manuscripts, the cost is reduced, the flexible production capacity is improved, the industry blank is filled, and the basis and the premise of automatic unmanned makeup are realized. The defect detection function is pluggable, namely, a detection module with poor effect can be replaced, a new detection item can be added, and the basic module does not need to be changed.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an automatic pre-detection method for paper cup design defects;
FIG. 2 is a sub-flowchart of step S10 in the automatic pre-detection method of paper cup design defects shown in FIG. 1;
FIG. 3 is a sub-flowchart of step S20 in the automatic pre-detection method for paper cup design defects shown in FIG. 1;
FIG. 4 is a sub-flowchart of step S30 in the automatic pre-detection method of paper cup design defects shown in FIG. 1;
FIG. 5 is a sub-flowchart of step S40 in the automatic pre-detection method of paper cup design defects shown in FIG. 1;
FIG. 6 is a diagram of a design to be tested in an exemplary embodiment;
FIG. 7 is a complete segment of the design to be tested identified and segmented by the image segmentation model shown in FIG. 6;
FIG. 8 is a view showing a defect identified for the segmented pie slice of FIG. 7 as "not deleted yet design assistance information" and labeled with Bbox;
fig. 9 is a frame diagram of an automatic paper cup design defect pre-detection device provided by the invention.
[ detailed description ] of the invention
In order to make the objects, technical solutions and advantageous technical effects of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and detailed description. It should be understood that the detailed description is intended to illustrate the invention, and not to limit the invention.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
It should be noted that before describing the technical solution of the present invention in detail, some terms that may be involved are explained so as to facilitate the reader's understanding of the present invention.
(1) Mask/split Mask/Mask: is a technique in computer vision for accurately separating objects in an image from the background. The fine granularity division of the image area is realized by classifying and marking each pixel. Each pixel is assigned a label to indicate whether it belongs to the foreground or the background or to a different class of objects. Such label information forms a two-dimensional matrix, i.e. a segmentation mask or a segmentation mask.
(2) Prompt: the hint of image segmentation may be a set of foreground/background points, a rough box or a mask free-form text, or any information indicating the segmented image.
(3) Promptable segmentation task/hintable segmentation task: refers to returning a valid segmentation mask given any hint. Where a valid mask refers to a reasonable mask in which the output should be at least one of the objects even though the hint is ambiguous and may involve multiple objects.
(4) Bbox/boundingbox: the Bbox is a rectangular box for wrapping around a target object, also called a detection box. This rectangular box defines the size, position and orientation of the object. Bbox is usually represented by four corner points, which are commonly referred to as the upper left corner, upper right corner, lower right corner and lower left corner. In computer vision algorithms, a Bbox is typically associated with a target detection task. Object detection is a computer vision task whose purpose is to automatically detect the presence and location of an object in an image or video.
(5) Labeling/data labeling: data annotation is a key link by which most artificial intelligence algorithms can operate effectively. In short, the data annotation is a process of processing data such as unprocessed voice, pictures, text, video, etc., so as to convert the data into machine-recognizable information. The types of data labels are mainly image labels, voice labels, 3D point cloud labels and text labels. The image annotation is to process the unprocessed picture data, convert the processed picture data into machine-identifiable information, and then transmit the machine-identifiable information into an artificial intelligence algorithm and a model to complete calling. Common image labeling methods include semantic segmentation, rectangular frame labeling, polygon labeling, key point labeling, point cloud labeling, 3D cube labeling, 2D/3D fusion labeling, target tracking and the like.
(6) Image segmentation model: a neural network model that implements semantic segmentation or instance segmentation.
(7) Target positioning model: and a neural network model for realizing target positioning.
(8) Data enhancement: in order to improve the generalization capability of the neural network and avoid over-fitting, operations such as image rotation, scaling, cutting, color changing, noise adding and the like are needed to be performed on the image, and input data is increased so as to enrich the data volume of the training set.
(9) Fine tuning/fine tune: large scale pre-training of general domain data, adaptation to specific tasks or domains.
(10) Paper cup fan/fan frame/fan area/fan border: the sector cut out after paper cup printing is a sector frame surrounding area in the design stage.
(11) Sector specification data: the left side, the right side, the included angles of two sides, the lengths of two sides, the top point of the lower arc, the top point of the upper arc and the center and the radius of concentric circles of the printing area of each specific type cup.
(12) Paper cup national standard: national standard GB/T27590-2022 paper cup.
(13) Bleeding site: refers to a convenient cut part reserved for reserving effective contents of a picture during printing, and is a common printing term. Bleeding in printing refers to enlarging the pattern of the outer dimension of the product, adding some pattern extension at the cutting position, and specially using the pattern in the process tolerance range for each production procedure so as to avoid the cut finished product from exposing white edges or cutting the content. When the printing is performed, the printing is divided into a design size and a finished size, the design size is always larger than the finished size, the large edge is cut off after printing, and the part to be printed out and cut off is called bleeding or bleeding position.
(14) Pluggable and pluggable: an architecture that can be added and removed at any time, while other modules or functions are unaffected.
Example 1
In the embodiment of the invention, the automatic pre-detection method for the design defects of the paper cup is provided, and the automatic pre-detection method is used for finding out the existing design defects only through a planar design manuscript, so that the defects of the design diagram can be detected before paper cup printing, no proofing is needed, the automatic pre-detection method can be well adapted to flexible production, customization and small form quick-reflection production modes, is greatly beneficial to quality control of paper cup manufacturing, improves flexible production capacity, fills up industry blank, and finally can realize automatic and unmanned makeup of paper cups.
As shown in FIG. 1, the automatic pre-detection method for paper cup design defects comprises steps S10-S60.
Step S10: acquiring an accurate mask which is generated to cover the whole fan-shaped frame and a design drawing set which is generated to be sympt or marked; the design drawing set comprises a non-defective design drawing, a defective design drawing and a design drawing constructed according to specification data.
Specifically, for the existing design atlas composed of a plurality of design drawings, step S10 includes the following steps:
acquiring an imported design drawing set which is used in production and has no error, generating an accurate mask covering the whole fan-shaped frame through a preset automatic labeling module, and generating a prompt or label; or alternatively, the first and second heat exchangers may be,
and acquiring an imported design drawing set containing design errors, assisting in manually generating an accurate mask covering the whole fan-shaped frame through a preset auxiliary labeling module, and generating a prompt or label.
As shown in fig. 2, step S10 includes:
step S11: and obtaining a preset fan blade design template.
Step S12: manually acquiring sector specification data through a preset software UI interaction module; the sector specification data comprise left side, right side, included angles of two sides, lengths of two sides, an upper arc vertex, a lower arc vertex, a circle center and a radius of a concentric circle in a printing area.
Step S13: automatically constructing and drawing a sector design drawing according to the sector design template and sector specification data; wherein, the content of the printing area of the sector design chart can be left blank or randomly generated. It should be noted that, the method for automatically constructing the corresponding design diagram according to the design template and the corresponding specification data belongs to the conventional technical means in the design field and is also the same principle applied to the fan blade design sub-field, so the invention is not repeated here.
Step S14: adding interference information to the sector design. That is, various defects are artificially produced for the fan-shaped design drawing, for example: auxiliary lines, prompt content (random) and the like are added to simulate the conditions possibly encountered in the actual production process as far as possible, so that the universality of the neural network model is improved.
Step S15: based on the sector specification data, a preset automatic labeling module is used for generating an accurate mask covering the whole sector frame, and a prompt or label is generated.
In addition, the steps S13-S15 may be performed in a loop for a predetermined number of cycles to generate a final design atlas and mask, template or annotation.
It should be noted that, in step S10, whether the auxiliary labeling module or the automatic labeling module has a labeling function that is already mature in the application of the neural network model, and the implementation principle and the specific implementation manner can refer to the prior art, which is not described herein.
Further, step S10 further includes: one or more of the following combinations are performed on the design drawings of the design atlas: image rotation, scaling, cropping, color shifting, and noise addition. That is, the data enhancement is performed on the initial design atlas, the random combination is performed on the operations, and the generalization capability in the subsequent model training is improved.
Step S20: and acquiring an image segmentation model constructed based on the neural network technology and used for detecting the segment segmentation mask, and importing a design atlas into the image segmentation model for training.
Specifically, as shown in FIG. 3, step S20 includes steps S21-S24.
Step S21: and importing the design atlas into an image segmentation model to perform preset round training to obtain the image segmentation model with the primary round training completed.
Step S22: inputting a preset test set into an image segmentation model after primary training to test the generation effect of the paper cup fan mask.
Step S23: and if the test result does not reach the expected condition, adjusting, adding, partially deleting or completely deleting the selected annotation data, and then continuously inputting the new annotation data into the image segmentation model for training.
Step S24: and circularly executing the steps for a preset period until an image segmentation model capable of meeting the test effect is obtained.
In the first embodiment, step S30: and receiving the imported design drawing to be detected, and acquiring a corresponding sector mask through the trained image segmentation model.
Specifically, as shown in FIG. 4, step S30 includes steps S31-S34.
Step S31: inputting the design drawing to be detected into the trained image segmentation model, and judging whether the sector mask is successfully obtained or not;
step S32: if the acquisition fails, detecting the sector graph by using a target detection module built in the image segmentation model, so as to obtain a detection frame (namely Bbox) of the sector graph;
step S33: transmitting the detection frame to a segmentation module built in the image segmentation model, and trying to acquire the sector mask again;
step S34: if the image segmentation model does not acquire the sector mask after the preset times of attempts, the acquisition is determined to be failed, and detection failure information is output.
Further, step S30 further includes: converting the mask into a binary image to obtain a mask image in a picture file format; acquiring a minimum box (boundingbox) of the mask map; and cutting and normalizing the mask image into the size of the image corresponding to the actual sector.
Step S40: and converting the sector mask into a real sector frame.
Specifically, as shown in FIG. 5, step S40 includes steps S41-S44.
Step S41: a window with a size being set to a preset size (size);
step S42: traversing a target pixel of the mask frame;
step S43: acquiring a corresponding region on a design drawing to be detected in a region with a fixed size of a target pixel, and storing the acquired pixels on the design drawing;
step S44: and (4) circularly executing the steps S42-S43 until the mask frame pixels are traversed, and obtaining the outline of the whole fan-shaped frame. That is, the region edge contour corresponding to the original design drawing is obtained by identifying the pixels of the region edge of the sector mask from the design drawing.
Step S50: and calculating and corresponding to a target model design drawing according to the real fan-shaped frame, so that the target model design drawing is mapped to specification data of a corresponding model. If the mapping specification data fails, returning error prompt information.
It can be appreciated that the specification data of all the paper cup models that may be used may be pre-stored in the system for subsequent comparison mapping. And the linear equation on two sides of the frame can be calculated through the outline of the fan-shaped frame, the length of two sides, the vertex of an upper arc and the vertex of a lower arc and other data are calculated, and a specific model design drawing is correspondingly obtained according to the data, so that the specific model design drawing is mapped to the specification data of the corresponding model.
The determination of the sector frame is the basis of error detection, and the sector frame of the cup sheet cannot be determined, so that error detection is not started. If the fan-shaped frame is obtained by adopting the traditional image algorithm, the result is easily interfered by factors such as picture quality, content change and the like, the parameter adaptation capability is extremely poor, the output is unstable, the post-processing is very complex, and the method is difficult to apply in actual production. Under the condition of higher data quality, the neural network has excellent and stable effect on target detection, image segmentation and edge detection, and has good generalization capability, so that the neural network is trained to acquire the sector frame, and the method can be completely used in actual production. The time of I month, after obtaining the accurate sector frame, different defect detection processes can be performed in a partitioning mode.
Step S60: and partitioning the real sector frame according to the mapped specification data, and detecting corresponding defects of each partition through a preset detection module, so as to output a defect detection result. For example, the sector frame is divided into a straight line edge, an upper arc, a lower arc, a sector area outside, a white part, a bleeding position and the like according to a preset national standard.
Specifically, step S60 includes one or more of the following detection steps, and each detection is performed by a corresponding defect detection module, and each detection module is not affected by each other, that is, each detection module is configured to be pluggable, so that different defect detection modules can be called to perform corresponding defect detection in different areas according to specific requirements, a detection module with poor effect can be replaced, a new detection item can be added, and the basic module does not need to be changed. The defect detection modules can be detection heads built in the image segmentation model, or can be detection models which are independently built and trained based on the neural network technology, can be obtained by specific training through corresponding training sets, have the property of being capable of being inserted and pulled out at any time, and specific building and training processes can refer to the prior art, so that the invention is not repeated here.
The detection method specifically comprises the following steps: detecting whether the models are matched according to the included angle of straight lines at two sides of the fan-shaped frame, the side length and the positions of top points of upper and lower arcs; and/or traversing pixels outside the picture sector, checking whether there are non-0 pixels to determine whether there are contents outside the sector (typically including auxiliary lines, hint contents); and/or traversing pixels inside the sector area and outside the printing area, and checking whether non-0 pixels exist or not to judge whether contents exist outside the printing area or not; and/or detecting whether the upper part outside the printing area is left white or not according with national standard regulations.
In an exemplary embodiment, as shown in fig. 6, a design diagram to be tested includes a defect of "prompt content at design time is not deleted"; FIG. 7 is a diagram showing a training image segmentation model for identifying and segmenting the complete segment of the frame to be detected; fig. 8 shows the defect identified by the defect detection module, and is marked by a detection box (Bbox). Note that, the text in fig. 6 to 8 is only an example of the defect that the "prompt content at the time of design is not deleted", and the text content and the clarity are not specific limitations of the present invention, and do not affect the full disclosure of the present technical solution.
Example two
The invention provides an automatic paper cup design defect pre-detection device 100, which is used for detecting the existing design defects only through a planar design draft, so that the defects of a design drawing can be detected before paper cup printing. It should be noted that, the implementation principle and the specific implementation manner of the automatic paper cup design defect pre-detection device 100 are consistent with the automatic paper cup design defect pre-detection method, and therefore will not be described in detail below.
As shown in fig. 9, the automatic paper cup design defect pre-detection device 100 includes:
an atlas acquisition module 10 for acquiring a design atlas generated with an exact mask covering the entire fan-shaped frame and generated with a template or label; the design drawing set comprises a non-defective design drawing, a defective design drawing and a design drawing constructed according to specification data;
the model acquisition module 20 is used for acquiring an image segmentation model constructed based on a neural network technology and used for detecting a segment segmentation mask, and importing a design atlas into the image segmentation model for training;
the mask segmentation module 30 receives the imported design drawing to be detected and acquires a corresponding sector mask through the trained image segmentation model;
a mask conversion module 40, configured to convert the sector mask into a real sector frame;
the model mapping module 50 is configured to calculate and correspond to a target model design drawing according to the real fan-shaped frame, so as to map to specification data of a corresponding model;
the partition detection module 60 is configured to partition the real sector frame according to the mapped specification data, and detect a corresponding defect of each partition through a preset detection module, so as to output a defect detection result.
Example III
The invention provides a terminal, which comprises a memory, a processor and a computer program stored in the memory, wherein the computer program realizes each step of the automatic paper cup design defect pre-detection method according to any one of the above embodiments when being executed by the processor.
Example IV
The present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the paper cup design defect automatic pre-detection method according to any one of the above embodiments.
Example five
The present invention provides a computer program product comprising a computer program or instructions which, when processed for execution, implement the steps of the paper cup design defect automatic pre-detection method as described in any one of the above embodiments.
In summary, the method and the device for automatically pre-detecting the paper cup design defects, provided by the invention, are used for constructing and training the image segmentation model for accurately obtaining the segmented mask of the fan-shaped piece, analyzing and mapping the obtained segmented mask to the fan-shaped piece of the corresponding model, so as to obtain the specification data of the corresponding model, then dividing the input design picture to be detected according to the specification data of the fan-shaped piece, finally calling different defect detection modules to detect the corresponding defects in different areas, and finding out the existing design defects only through a planar design draft, thereby reducing the cost, improving the flexible production capacity, filling the industry blank, and realizing the basis and premise of automatic and unmanned makeup. The defect detection function is pluggable, namely, a detection module with poor effect can be replaced, a new detection item can be added, and the basic module does not need to be changed.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the system is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system or apparatus/terminal device and method may be implemented in other manners. For example, the system or apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, systems or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The present invention is not limited to the details and embodiments described herein, and thus additional advantages and modifications may readily be made by those skilled in the art, without departing from the spirit and scope of the general concepts defined in the claims and the equivalents thereof, and the invention is not limited to the specific details, representative apparatus and illustrative examples shown and described herein.

Claims (10)

1. An automatic pre-detection method for paper cup design defects is characterized by comprising the following steps:
step S10: acquiring an accurate mask which is generated to cover the whole fan-shaped frame and a design drawing set which is generated to be sympt or marked; the design atlas comprises a non-defective design drawing, a defective design drawing and a design drawing constructed according to specification data;
step S20: acquiring an image segmentation model constructed based on a neural network technology and used for detecting a sector segmentation mask, and importing the design atlas into the image segmentation model for training;
step S30: receiving an imported design drawing to be detected, and acquiring a corresponding sector mask through a trained image segmentation model;
step S40: converting the sector mask into a real sector frame;
step S50: calculating and corresponding to a target model design drawing according to the real fan-shaped frame, so as to map to specification data of a corresponding model;
step S60: and partitioning the real sector frame according to the mapped specification data, and detecting corresponding defects of each partition through a preset detection module, so as to output a defect detection result.
2. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S10 comprises the steps of:
acquiring an imported design drawing set which is used in production and has no error, generating an accurate mask covering the whole fan-shaped frame through a preset automatic labeling module, and generating a prompt or label; or alternatively, the first and second heat exchangers may be,
and acquiring an imported design drawing set containing design errors, assisting in manually generating an accurate mask covering the whole fan-shaped frame through a preset auxiliary labeling module, and generating a prompt or label.
3. The method for automatically pre-detecting defects in paper cup design according to claim 1, wherein the method comprises the steps of
The step S10 includes:
step S11: obtaining a preset fan blade design template;
step S12: manually acquiring sector specification data through a preset software UI interaction module; the fan specification data comprise left sides, right sides, included angles of two sides, lengths of two sides, an upper arc vertex, a lower arc vertex, a circle center and a radius of a concentric circle in a printing area;
step S13: automatically constructing a sector design drawing according to the sector design template and the sector specification data; wherein, the content of the printing area of the sector design drawing can be left blank or randomly generated;
step S14: adding interference information to the sector design diagram;
step S15: based on the sector specification data, a preset automatic labeling module is used for generating an accurate mask covering the whole sector frame, and a prompt or label is generated.
4. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S10 further comprises:
one or more of the following combinations are performed on the design drawings of the design atlas: image rotation, scaling, cropping, color shifting, and noise addition.
5. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S20 comprises:
the design atlas is imported into the image segmentation model to carry out preset round training, and an image segmentation model with the primary round training completed is obtained;
inputting a preset test set into an image segmentation model after primary wheel training to test the generation effect of a paper cup fan mask;
if the test result does not reach the expected condition, the selected marking data is adjusted, added, partially deleted or completely deleted, and then new marking data is continuously input into the image segmentation model for training;
and circularly executing the steps for a preset period until an image segmentation model capable of meeting the test effect is obtained.
6. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S30 comprises:
inputting the design drawing to be detected into the trained image segmentation model, and judging whether the sector mask is successfully obtained or not;
if the acquisition fails, detecting the sector graph by using a target detection module built in the image segmentation model, so as to obtain a detection frame of the sector graph;
transmitting the detection frame to a segmentation module built in the image segmentation model, and attempting to acquire a sector mask again;
and if the image segmentation model still does not acquire the sector mask after trying for the preset times, confirming acquisition failure and outputting detection failure information.
7. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S30 comprises:
converting the mask into a binary image to obtain a mask image in a picture file format;
acquiring a minimum box of the mask map;
and cutting and normalizing the mask map into the size of the picture corresponding to the actual sector.
8. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S40 comprises:
step S41: a window with the size being preset is set;
step S42: traversing a target pixel of the mask frame;
step S43: storing the obtained pixels on the design drawing in a region with a fixed size of the target pixels and a region of the corresponding region on the design drawing to be detected;
step S44: and (4) circularly executing the steps S42-S43 until the mask frame pixels are traversed, and obtaining the outline of the whole fan-shaped frame.
9. The automatic paper cup design defect pre-detection method according to claim 1, wherein the step S60 comprises:
detecting whether the models are matched according to the included angle of straight lines at two sides of the fan-shaped frame, the side length and the positions of top points of upper and lower arcs; and/or the number of the groups of groups,
traversing pixels outside a sector area of the picture, and checking whether non-0 pixels exist or not so as to judge whether contents exist outside the sector area or not; and/or the number of the groups of groups,
traversing pixels in the sector area and outside the printing area, and checking whether non-0 pixels exist or not to judge whether contents exist outside the printing area or not; and/or the number of the groups of groups,
detecting whether the margin of the upper part outside the printing area meets the national standard.
10. An automatic pre-detection device for paper cup design defects is characterized by comprising:
the atlas acquisition module is used for acquiring an accurate mask which is generated to cover the whole fan-shaped frame and generating a design atlas with a prompt or label; the design atlas comprises a non-defective design drawing, a defective design drawing and a design drawing constructed according to specification data;
the model acquisition module is used for acquiring an image segmentation model constructed based on a neural network technology and used for detecting a sector segmentation mask, and importing the design atlas into the image segmentation model for training;
the mask segmentation module receives the imported design drawing to be detected, and acquires a corresponding sector mask through the trained image segmentation model;
the mask conversion module is used for converting the sector mask into a real sector frame;
the model mapping module is used for calculating and corresponding to a target model design drawing according to the real fan-shaped frame so as to map to specification data of a corresponding model;
the partition detection module is used for partitioning the real sector frame according to the mapped specification data, and detecting corresponding defects of each partition through the preset detection module, so that a defect detection result is output.
CN202410062554.8A 2024-01-16 2024-01-16 Automatic pre-detection method and device for paper cup design defects Active CN117876348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410062554.8A CN117876348B (en) 2024-01-16 2024-01-16 Automatic pre-detection method and device for paper cup design defects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410062554.8A CN117876348B (en) 2024-01-16 2024-01-16 Automatic pre-detection method and device for paper cup design defects

Publications (2)

Publication Number Publication Date
CN117876348A true CN117876348A (en) 2024-04-12
CN117876348B CN117876348B (en) 2024-07-05

Family

ID=90592916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410062554.8A Active CN117876348B (en) 2024-01-16 2024-01-16 Automatic pre-detection method and device for paper cup design defects

Country Status (1)

Country Link
CN (1) CN117876348B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060226865A1 (en) * 2005-01-21 2006-10-12 Photon Dynamics, Inc. Automatic defect repair system
CN102928438A (en) * 2012-10-16 2013-02-13 四川索牌科技股份有限公司 Rapid paper cup bottom detecting system with function of automatic negative pressure cup turning
CN115239719A (en) * 2022-09-22 2022-10-25 南昌昂坤半导体设备有限公司 Defect detection method, system, electronic device and storage medium
CN115249237A (en) * 2022-06-21 2022-10-28 奥蒂玛光学科技(深圳)有限公司 Defect detection method, defect detection apparatus, and computer-readable storage medium
CN115994882A (en) * 2021-10-18 2023-04-21 长鑫存储技术有限公司 Defect detection method, device, equipment and storage medium
CN117036243A (en) * 2023-06-26 2023-11-10 北京建筑材料科学研究总院有限公司 Method, device, equipment and storage medium for detecting surface defects of shaving board
CN117348357A (en) * 2023-10-08 2024-01-05 深圳晶源信息技术有限公司 Design layout modification method, system and storage medium
CN117541698A (en) * 2023-11-13 2024-02-09 深圳市塞外科技有限公司 Method, device, terminal and medium for adaptively rendering sector diagram to 3D model

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060226865A1 (en) * 2005-01-21 2006-10-12 Photon Dynamics, Inc. Automatic defect repair system
CN102928438A (en) * 2012-10-16 2013-02-13 四川索牌科技股份有限公司 Rapid paper cup bottom detecting system with function of automatic negative pressure cup turning
CN115994882A (en) * 2021-10-18 2023-04-21 长鑫存储技术有限公司 Defect detection method, device, equipment and storage medium
CN115249237A (en) * 2022-06-21 2022-10-28 奥蒂玛光学科技(深圳)有限公司 Defect detection method, defect detection apparatus, and computer-readable storage medium
CN115239719A (en) * 2022-09-22 2022-10-25 南昌昂坤半导体设备有限公司 Defect detection method, system, electronic device and storage medium
CN117036243A (en) * 2023-06-26 2023-11-10 北京建筑材料科学研究总院有限公司 Method, device, equipment and storage medium for detecting surface defects of shaving board
CN117348357A (en) * 2023-10-08 2024-01-05 深圳晶源信息技术有限公司 Design layout modification method, system and storage medium
CN117541698A (en) * 2023-11-13 2024-02-09 深圳市塞外科技有限公司 Method, device, terminal and medium for adaptively rendering sector diagram to 3D model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高雅: "纸杯缺陷快速检测技术研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 2019, 15 January 2019 (2019-01-15), pages 138 - 3626 *

Also Published As

Publication number Publication date
CN117876348B (en) 2024-07-05

Similar Documents

Publication Publication Date Title
CN109409374B (en) Joint-based same-batch test paper answer area cutting method
US12014258B2 (en) Method and device for optimizing simulation data, and computer-readable storage medium
CN110443250A (en) A kind of classification recognition methods of contract seal, device and calculate equipment
CN110211048B (en) Complex archive image tilt correction method based on convolutional neural network
CN112037077B (en) Seal identification method, device, equipment and storage medium based on artificial intelligence
CN107679024B (en) Method, system, computer device and readable storage medium for identifying table
CN109740515B (en) Evaluation method and device
CN110874618A (en) OCR template learning method and device based on small sample, electronic equipment and medium
CN109886257B (en) Method for correcting invoice image segmentation result by adopting deep learning in OCR system
CN110765995A (en) Answer sheet generation method, answer sheet identification device and storage medium
WO2024055530A1 (en) Target detection method, system and device for image, and storage medium
CN114862861B (en) Lung lobe segmentation method and device based on few-sample learning
CN113920038A (en) Cut contour extraction method, device system and medium
CN110991520A (en) Method and device for generating training sample
CN115546809A (en) Table structure identification method based on cell constraint and application thereof
Najgebauer et al. Inertia‐based Fast Vectorization of Line Drawings
CN114820679A (en) Image annotation method and device, electronic equipment and storage medium
CN114758341A (en) Intelligent contract image identification and contract element extraction method and device
CN117876348B (en) Automatic pre-detection method and device for paper cup design defects
CN113159035A (en) Image processing method, device, equipment and storage medium
CN115249362B (en) OCR table recognition method and system based on connectivity of pixels in stable direction
CN115147858A (en) Method, device, equipment and medium for generating image data of handwritten form
CN112861861B (en) Method and device for recognizing nixie tube text and electronic equipment
CN114842492A (en) Key information extraction method and device, storage medium and electronic equipment
CN116844058B (en) Pointer instrument indication recognition method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant