Steel seal detection method, system and equipment based on deep learning and medium
By using a deep learning-based method to acquire and process cigarette images, and employing a segmented image detection model to calculate the predicted value of the stamp offset, the problem of low accuracy in traditional manual inspection is solved, achieving efficient and accurate stamp defect detection and real-time monitoring of the production line.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN LIANJUN TECH CO LTD
- Filing Date
- 2023-12-08
- Publication Date
- 2026-04-24
AI Technical Summary
Traditional cigarette stamp inspection methods rely on manual visual inspection, which is prone to missing detections and has low accuracy, making it difficult to effectively detect defects in cigarette stamps.
A deep learning-based approach is used to obtain images of cigarettes, determine the stamped area images at different angles, and use a pre-defined segmented image detection model to calculate the offset prediction values of the stamped pattern, text, and characters respectively. The defect type is then determined by combining the deep learning algorithm.
It improves the accuracy and efficiency of cigarette stamp inspection, enabling timely detection of problems on the production line, reducing cost losses and waste, and ensuring production quality.
Smart Images

Figure CN121921236A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image detection technology, specifically to a deep learning-based method, system, device, and medium for detecting steel stamps. Background Technology
[0002] With the rapid development of modern industry, automated production has become a key technology in various fields. In the tobacco industry, embossing is an important process in cigarette production and packaging. Embossing is typically used to print brand logos, warning labels, and other information on cigarette packaging paper. However, due to factors in the production process, such as equipment wear and tear or improper operation, embossing may become damaged, blurred, or incomplete.
[0003] Currently, traditional cigarette stamp inspection methods mainly rely on manual visual inspection combined with manually setting inspection areas, and then using inspection tools to examine the stamp image in those areas.
[0004] However, in practical applications, traditional cigarette stamp inspection methods are prone to missing defects due to manual inspection, and their accuracy in detecting cigarette stamp defects is relatively low. Therefore, the current methods for detecting cigarette stamps urgently need improvement. Summary of the Invention
[0005] This application provides a deep learning-based method, system, device, and medium for detecting cigarette stamps, which improves the accuracy of cigarette stamp detection.
[0006] Firstly, this application provides a deep learning-based method for detecting steel stamps, including: Acquire images of cigarettes; Based on the cigarette image, determine several stamped area images at different angles; According to a preset division standard, each image of the stamped area at different angles is divided into multiple segmented images. The multiple segmented images include a first segmented image, a second segmented image, and a third segmented image. The first segmented image includes stamped pattern information, the second segmented image includes stamped text information, and the third segmented image includes stamped character information. Based on the preset image detection model, the predicted value of the steel stamp pattern offset corresponding to the first segment image, the predicted value of the steel stamp text offset corresponding to the second segment image, and the predicted value of the steel stamp character offset corresponding to the third segment image are determined. The steel stamp defect type information is determined based on the predicted values of the steel stamp pattern offset, the steel stamp text offset, and the steel stamp character offset.
[0007] By employing the above technical solution, the system acquires images of cigarettes, then determines the stamped area images from different angles. Based on a deep learning algorithm, this stamped area image is input into a pre-trained segmented image detection model to determine the predicted values for the stamped pattern offset, the stamped text offset, and the stamped character offset. The system then calculates the corresponding stamped defect type information according to the preset algorithm. By combining the deep learning algorithm model, which exhibits growth potential, and with a more comprehensive sample size, accurate and efficient detection of stamped defects is achieved, improving the accuracy of cigarette stamp detection.
[0008] Optionally, the original image of the cigarette from all angles is acquired using a preset camera device; invalid images in the original image of the cigarette from all angles are removed according to a preset filtering algorithm to obtain the cigarette image.
[0009] By employing the above technical solution, the system acquires original images of the cigarette from all angles using a pre-set camera device. Then, based on a pre-set filtering algorithm, it automatically identifies and removes invalid images to obtain a complete cigarette image. This method not only improves the quality and accuracy of image acquisition but also effectively removes noise and blur, providing high-quality cigarette images. This solution innovatively improves upon traditional image acquisition equipment, which suffers from environmental influences and low imaging clarity, making it more reliable and practical.
[0010] Optionally, the cigarette image can be cropped according to a preset threshold for the image range of the stamped area to obtain several stamped area images at different angles.
[0011] By employing the above technical solution, the system crops the cigarette image according to a preset threshold for the stamped area image range, obtaining several stamped area images from different angles. This method can accurately determine the range of the stamped area, improving the accuracy and efficiency of detection. Furthermore, processing the stamped area images from different angles separately allows for more targeted analysis of the stamped features at each angle, further improving the accuracy of defect detection.
[0012] Optionally, obtain a first coefficient corresponding to the predicted value of the stamped pattern offset, a second coefficient corresponding to the predicted value of the stamped text offset, and a third coefficient corresponding to the predicted value of the stamped character offset; calculate the defect assessment level of the predicted value of the stamped pattern offset, the predicted value of the stamped text offset, and the predicted value of the stamped character offset based on the first coefficient, the second coefficient, and the third coefficient; and determine the stamped defect type corresponding to the defect assessment level based on the defect mapping table.
[0013] By employing the above technical solution, the first coefficient corresponding to the predicted value of the stamped pattern offset, the second coefficient corresponding to the predicted value of the stamped text offset, and the third coefficient corresponding to the predicted value of the stamped character offset are obtained respectively. Based on these three coefficients, the defect assessment level of the predicted values of the stamped pattern offset, stamped text offset, and stamped character offset can be calculated. The calculation method here can be set according to actual needs, such as using a weighted average algorithm. According to a pre-established defect mapping table, the stamped defect type corresponding to the calculated defect assessment level is determined. This method of introducing coefficients and calculating assessment levels can more precisely reflect the different contributions of each predicted value to the determination of the stamped defect type, making the final stamped defect type determination result more accurate and reliable. Compared with directly using predicted values to determine the defect type, the technical solution of calculating assessment levels can improve the effect of stamped stamp inspection.
[0014] Optionally, several standard stamped images and actual image offset values are obtained; pixel distribution information of the several standard stamped images is extracted; the pixel distribution information and the actual image offset values are divided into a training dataset and a validation dataset according to a preset ratio; an initial neural network model is trained based on the training dataset until a preset iteration termination condition is reached, wherein the preset iteration termination condition is that the number of iterations reaches a preset threshold or the loss function of the initial neural network model converges; the initial neural network model that reaches the preset iteration termination condition is determined as the preset image detection model; and the preset image detection model is validated based on the validation dataset.
[0015] By employing the above technical solution, the system acquires standard stamped images and actual image offset values, extracts their pixel distribution information, and divides the pixel distribution information and actual image offset values into training and validation datasets according to a preset ratio. Then, the initial neural network model is trained using the training and validation datasets to obtain image offset prediction values. If the image offset prediction values converge to the actual image offset values, the initial neural network model is used as the preset image detection model. This method can accurately predict image offset values, improving the accuracy and efficiency of stamped defect detection. Furthermore, this method can adjust model parameters based on actual image offset values, making the model more adaptable to real-world application scenarios.
[0016] Optionally, the first segmented image is input into the stamped pattern recognition model to obtain the stamped pattern offset prediction value; the second segmented image is input into the stamped text recognition model to obtain the stamped text offset prediction value; and the third segmented image is input into the stamped character recognition model to obtain the stamped character offset prediction value.
[0017] By employing the above technical solution, a pre-defined first segment image is input into a stamped pattern recognition model to obtain a predicted stamped pattern offset; a pre-defined second segment image is input into a stamped text recognition model to obtain a predicted stamped text offset; and a pre-defined third segment image is input into a stamped character recognition model to obtain a predicted stamped character offset. Using these three offset prediction values as image detection results allows for accurate and comprehensive detection of defects in the stamped area, improving the accuracy and efficiency of defect detection. Furthermore, this method allows for independent analysis and comprehensive utilization of information from different stamped types, further enhancing the accuracy of defect detection.
[0018] Optionally, the number of cigarettes with stamped defects is recorded in real time; it is determined whether the number of cigarettes with stamped defects has reached a preset cigarette quantity threshold; if so, a production line maintenance prompt is generated and sent to the maintenance personnel's terminal to prompt the maintenance personnel to carry out maintenance work.
[0019] By adopting the above technical solution, the system records the number of cigarettes with stamped defects in real time. When the number of cigarettes with stamped defects reaches a preset threshold, a production line maintenance alert is generated and sent to the maintenance personnel's terminal. This method helps maintenance personnel to promptly identify problems on the production line, avoid an excessive number of defective products, and improve production efficiency and quality. Simultaneously, this method can also promptly identify and address problems that arise during production, reducing unnecessary cost losses and waste.
[0020] In a second aspect of this application, a deep learning-based stamp detection system is provided.
[0021] The image acquisition module is used to acquire images of cigarettes; The image segmentation module is used to divide each of the different angles of the stamped area image into multiple segmented images according to a preset segmentation standard. The multiple segmented images include a first segmented image, a second segmented image, and a third segmented image. The first segmented image includes stamped pattern information, the second segmented image includes stamped text information, and the third segmented image includes stamped character information. The image detection module is used to determine the predicted offset values of the stamped pattern corresponding to the first segmented image, the predicted offset values of the stamped text corresponding to the second segmented image, and the predicted offset values of the stamped characters corresponding to the third segmented image, based on a preset image detection model. The defect identification module is used to determine the defect type information of the stamped pattern based on the predicted value of the stamped pattern offset, the predicted value of the stamped text offset, and the predicted value of the stamped character offset.
[0022] A third aspect of this application provides an electronic device.
[0023] A deep learning-based stamp detection system includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is loaded and executed by the processor, it implements a deep learning-based stamp detection method.
[0024] A fourth aspect of this application provides a computer-readable storage medium.
[0025] A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement a deep learning-based stamp detection method.
[0026] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. This application's system acquires images of cigarettes, then determines the stamped area images from different angles. Based on a deep learning algorithm, this stamped area image is input into a pre-trained, segmented image detection model to obtain image detection results. The system then queries a database based on the image detection results to obtain the corresponding stamped defect type information and sends this information to the employee's terminal. By combining a deep learning algorithm model, which exhibits growth potential, and with the comprehensiveness of the sample size, it achieves accurate and efficient detection of stamped defects, providing timely and accurate defect type information to staff. This effectively reduces debugging difficulty and improves the accuracy of cigarette stamped defect detection.
[0027] 2. This application obtains three types of offset prediction values by inputting three types of segmented images into corresponding preset image detection models, and uses these three types of offset prediction values as image detection results. By independently analyzing and comprehensively utilizing information on different types of stamps, defects in the stamp area can be accurately and comprehensively detected, improving the accuracy and efficiency of defect detection.
[0028] 3. This application records the number of cigarettes with stamped defects in real time. When the number of cigarettes with stamped defects reaches a preset threshold, a production line maintenance alert is generated and sent to the maintenance personnel's terminal. This method helps maintenance personnel to promptly identify problems on the production line, avoid an excessive number of defective products, and improve production efficiency and quality. Simultaneously, this method can also promptly identify and address problems that arise during production, reducing unnecessary cost losses and waste. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating a deep learning-based stamp detection method provided in an embodiment of this application. Figure 2 This is a schematic diagram of an image detection process for a deep learning-based stamp detection method provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of a deep learning-based stamp detection system disclosed in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.
[0030] Explanation of reference numerals in the attached figures: 301, Image acquisition module; 302, Image segmentation module; 303, Image detection module; 304, Defect recognition module; 400, Electronic device; 401, Processor; 402, Communication bus; 403, User interface; 404, Network interface; 405, Memory. Detailed Implementation
[0031] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0032] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0033] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0034] To facilitate understanding of the methods and systems provided in the embodiments of this application, the background of the embodiments of this application will be introduced before introducing the embodiments of this application.
[0035] This application discloses a deep learning-based method for detecting steel stamps. During the cigarette manufacturing process, some brands print steel stamps on the cigarettes to enhance brand characteristics. However, due to ink continuity or paper misalignment, defective steel stamps such as missing or misaligned patterns may randomly appear, requiring detection and removal. Traditional detection methods require manual pre-setting of the detection area, tool parameters, and thresholds, and are difficult to detect random defects, easily leading to missed detections and reducing the accuracy of steel stamp detection.
[0036] Having read the background information above, those skilled in the art can understand the problems existing in the prior art. The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings. The described embodiments are only some embodiments of this application, and not all embodiments.
[0037] The following description uses a cigarette stamp detection system to illustrate the deep learning-based stamp detection method of this application. This system can be a server or a service unit within a server, and is not specifically limited thereto.
[0038] Reference Figure 1 A deep learning-based method for detecting steel stamps, comprising steps S10 to S40, specifically including the following steps: S10: Acquire the image of the cigarette.
[0039] Specifically, the cigarette production line is equipped with multi-angle high-definition industrial cameras, which can acquire original images of cigarettes from all angles. However, these original images contain invalid images at some angles, failing to fully reflect the cigarette's appearance. The system calls a preset filtering algorithm to detect and fill in the blank angles in the original images, obtaining a complete, uninterrupted image of the cigarette from all angles. This complete image reflects the full information about the cigarette's appearance. The image serves as input for the system's detection and analysis, used to determine the printing quality on the cigarette surface. The system achieves comprehensive image acquisition and processing of cigarettes from all directions, providing reliable image support for automated appearance inspection.
[0040] S20: Based on the cigarette image, determine several stamped area images at different angles; according to the preset division standard, divide each stamped area image at different angles into multiple segmented images, including a first segmented image, a second segmented image, and a third segmented image. The first segmented image includes stamped pattern information, the second segmented image includes stamped text information, and the third segmented image includes stamped character information.
[0041] Specifically, after acquiring a complete, full-angle image of the cigarette, the system locates the stamped area based on preset parameter thresholds. The image is then cropped to extract image segments containing the stamped area, resulting in stamped area images from multiple angles. For detailed detection, the system divides the acquired stamped area images from multiple angles according to preset segmentation algorithms and standards, such as circumferential and vertical segmentation based on the cigarette. Each angle's stamped area image is divided into multiple circumferential and vertical image blocks. Each image block corresponds to a local area of the cigarette's appearance. This image segmentation process includes: the system subdivides the stamped area image into three types of segmented images according to preset segmentation standards: a preset first segmented image, a preset second segmented image, and a preset third segmented image. The preset first segmented image mainly contains the pattern information of the stamped area. The preset second segmented image mainly contains the text information of the stamped area. The preset third segmented image mainly contains the character information of the stamped area. The three types of segmented images differentiate the graphic and textual regions of the stamped seal according to their functions. The graphic image focuses on reflecting the quality of the pattern, the text image focuses on reflecting the clarity of the text, and the character image focuses on reflecting information such as the serial number. The system achieves intelligent image segmentation for the details of the stamped seal, providing image support for subsequent regional quality inspection. The segmented images are more conducive to the model learning local features.
[0042] S30: Based on the preset image detection model, determine the predicted value of the stamped pattern offset corresponding to the first segment image, the predicted value of the stamped text offset corresponding to the second segment image, and the predicted value of the stamped character offset corresponding to the third segment image.
[0043] Reference Figure 2 Specifically, the system inputs the acquired first, second, and third segmented images into their respective preset segmented image detection models for processing. This processing involves three steps: the preset segmented image detection models include a stamped pattern recognition model, a stamped text recognition model, and a stamped character recognition model. When inputting the cigarette stamped image to be detected into the preset segmented image detection models, the system inputs the first segmented image into the stamped pattern recognition model, the second segmented image into the stamped text recognition model, and the third segmented image into the stamped character recognition model. The stamped pattern recognition model can identify features such as the shape and size of the stamped pattern, thus obtaining a predicted stamped pattern offset value; the stamped text recognition model can identify features such as the font and size of the stamped text, thus obtaining a predicted stamped text offset value; and the stamped character recognition model can identify features such as the shape and size of the stamped characters, thus obtaining a predicted stamped character offset value. The system then uses these predicted stamped pattern, stamped text, and stamped character offset values as the image detection results.
[0044] In a preferred embodiment of this application, the training process of the preset segmented image detection model specifically includes: wherein the initial neural network model used by the deep learning algorithm is a convolutional neural network or other neural network structure suitable for image processing.
[0045] During training, to develop an accurate stamp detection model, several training images of standard, complete stamps, along with potential actual image offsets, were acquired. The training images were preprocessed to extract pixel distribution information, which reflects the key features of the standard stamp. Simultaneously, the processed images and offset data were divided into training and validation datasets based on the potential actual image offsets. A neural network model was trained using the training dataset. The network parameters were iteratively adjusted to minimize the loss function. When the number of iterations reached a preset termination threshold or the loss function converged, the trained neural network model was determined as the stamp detection model. The validation dataset was then used to validate the detection model and complete its training. This method of training based on standard images and datasets yields a stamp detection model with good detection performance against various stamp defects.
[0046] S40: Determine the stamp defect type information based on the predicted values of stamp pattern offset, stamp text offset, and stamp character offset.
[0047] Specifically, after the preset segmented image detection model detects the collected cigarette image samples, it outputs the recognition results and sample locations. The system then matches the recognition results with standards in the database to determine the type of defect, such as overlapping color stamps, ink dots in the stamp, ink trailing, blurring, incomplete stamping, inconsistent ink density, excessively thick or thin ink, etc. The system sends the defect type to the employee terminals in the corresponding area of the production line, so that the relevant employees are aware of the cigarette inspection status and the parts that need compensation or replacement.
[0048] In one optional embodiment of this application, the system monitors the cigarette stamp images on the production line in real time using a preset image detection model. When a stamp defect is detected, the system records the number of cigarettes with the defect in real time. Then, it determines whether the number of cigarettes with the defect reaches a preset cigarette quantity threshold. If the number of cigarettes with the defect reaches the preset cigarette quantity threshold, a production line maintenance alarm is generated and sent to the maintenance personnel's terminal to prompt the maintenance personnel to understand the defect detection situation and go to the production line to check and troubleshoot the problem in a timely manner, preventing the cigarette production quality from continuing to decline. For example, the maintenance personnel's terminal can be a mobile phone, computer, tablet computer, or other device used to receive production line maintenance prompts and perform corresponding maintenance work.
[0049] In another optional embodiment of this application, the system periodically collects and statistically analyzes data from the production line over a preset period, such as one month or one quarter, generating production line maintenance alarm counts and fault records. By analyzing historical data and using time series forecasting methods, the system assesses the risk level of potential problems for each piece of equipment on the production line within the next week or month. When the risk level assessment of a piece of equipment on a production line reaches a preset threshold, such as high risk, the system automatically sends a text message or email to the relevant equipment's maintenance personnel, notifying them one or two days in advance that routine maintenance or repair work may be necessary. This effectively prevents production line shutdowns due to comprehensive equipment failures during high-risk periods, significantly benefiting enterprise capacity management and assurance. Maintenance personnel can also schedule maintenance in advance, avoiding the impact of delayed work. This embodiment, through equipment predictive analysis and early alarms, effectively prevents capacity losses caused by equipment failures on the production line and maintains stable production quality.
[0050] The following are system embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the platform embodiments of this application, please refer to the method embodiments of this application.
[0051] Reference Figure 3 This application provides a deep learning-based stamp inspection system, which includes: an image acquisition module 301, an image segmentation module 302, an image detection module 303, and a defect recognition module 304, wherein: Image acquisition module 301 is used to acquire images of cigarettes; The image segmentation module 302 is used to divide the image of the stamped area at each different angle into multiple segmented images according to a preset segmentation standard. The multiple segmented images include a first segmented image, a second segmented image, and a third segmented image. The first segmented image includes stamped pattern information, the second segmented image includes stamped text information, and the third segmented image includes stamped character information. The image detection module 303 is used to determine the predicted offset values of the stamped pattern corresponding to the first segment image, the predicted offset values of the stamped text corresponding to the second segment image, and the predicted offset values of the stamped characters corresponding to the third segment image according to the preset image detection model. The defect identification module 304 is used to determine the defect type information of the stamp based on the predicted values of the stamp pattern offset, the stamp text offset, and the stamp character offset.
[0052] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0053] This application also discloses an electronic device. (See reference...) Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 400 may include: at least one processor 401, at least one network interface 404, a user interface 403, a memory 405, and at least one communication bus 402.
[0054] The communication bus 402 is used to enable communication between these components.
[0055] The user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0056] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0057] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 405, and by calling data stored in memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface graphics, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 401 and may be implemented as a separate chip.
[0058] The memory 405 may include random access memory (RAM) or read-only memory. Optionally, the memory 405 may include a non-transitory computer-readable storage medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned processor 401. (Refer to...) Figure 4 The memory 405, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a deep learning-based stamp detection method.
[0059] exist Figure 4In the illustrated electronic device 400, the user interface 403 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 401 can be used to call an application program stored in the memory 405 for detecting the appearance of a strip package. When executed by one or more processors 401, the electronic device 400 performs one or more methods as described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0060] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0061] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0062] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0063] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0064] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0065] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will readily conceive of those skilled in the art upon consideration of the specification and the disclosure of practical truths.
[0066] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A deep learning-based method for detecting steel stamps, characterized in that, include: Acquire images of cigarettes; Based on the cigarette image, determine several stamped area images at different angles; According to a preset division standard, each of the steel stamp area images at different angles is divided into multiple segmented images. The multiple segmented images include a first segmented image, a second segmented image, and a third segmented image. The first segmented image includes steel stamp pattern information, the second segmented image includes steel stamp text information, and the third segmented image includes steel stamp character information. Based on the preset image detection model, the predicted value of the steel stamp pattern offset corresponding to the first segment image, the predicted value of the steel stamp text offset corresponding to the second segment image, and the predicted value of the steel stamp character offset corresponding to the third segment image are determined. The steel stamp defect type information is determined based on the predicted values of the steel stamp pattern offset, the steel stamp text offset, and the steel stamp character offset.
2. The deep learning-based stamp detection method according to claim 1, characterized in that, The acquisition of cigarette images includes: Obtain original images of the cigarette from all angles using a pre-set camera device; According to a preset filtering algorithm, invalid images are removed from the original image of the cigarette from all angles to obtain the cigarette image.
3. The deep learning-based stamp detection method according to claim 1, characterized in that, The step of determining several stamped area images at different angles based on the cigarette image includes: The cigarette image is cropped according to a preset threshold for the image range of the stamped area to obtain several stamped area images at different angles.
4. The deep learning-based stamp detection method according to claim 1, characterized in that, The step of determining the stamped defect type information based on the predicted values of the stamped pattern offset, the stamped text offset, and the stamped character offset includes: Obtain the first coefficient corresponding to the predicted value of the stamped pattern offset, the second coefficient corresponding to the predicted value of the stamped text offset, and the third coefficient corresponding to the predicted value of the stamped character offset; Based on the first coefficient, the second coefficient, and the third coefficient, calculate the defect assessment level of the predicted value of the stamped pattern offset, the predicted value of the stamped text offset, and the predicted value of the stamped character offset; Based on the defect mapping table, determine the stamp defect type corresponding to the defect assessment level.
5. The deep learning-based stamp detection method according to claim 1, characterized in that, Before determining the predicted offset values of the stamped pattern corresponding to the first segmented image, the predicted offset values of the stamped text corresponding to the second segmented image, and the predicted offset values of the stamped characters corresponding to the third segmented image based on a preset image detection model, the method further includes: Obtain several standard stamped images and actual image offset values; Extract the pixel distribution information of the aforementioned standard stamp images; The pixel distribution information and the actual image offset value are divided into a training dataset and a validation dataset according to a preset ratio. The initial neural network model is trained based on the training dataset until a preset iteration termination condition is reached. The preset iteration termination condition is that the number of iterations reaches a preset threshold or the loss function of the initial neural network model converges. The initial neural network model that reaches the preset iteration termination condition is determined as the preset image detection model; The preset image detection model is validated based on the validation dataset.
6. The deep learning-based stamp detection method according to claim 1, characterized in that, The preset image detection model includes a stamped pattern recognition model, a stamped text recognition model, and a stamped character recognition model. Based on the preset image detection model, the predicted offset values for the stamped pattern corresponding to the first segmented image, the predicted offset values for the stamped text corresponding to the second segmented image, and the predicted offset values for the stamped characters corresponding to the third segmented image are determined, including: The first segmented image is input into the stamp pattern recognition model to obtain the stamp pattern offset prediction value; The second segmented image is input into the stamped text recognition model to obtain the predicted value of the stamped text offset; The third segment image is input into the stamped character recognition model to obtain the stamped character offset prediction value.
7. The deep learning-based stamp detection method according to claim 1, characterized in that, After determining the stamped defect type information based on the stamped pattern offset prediction value, the stamped text offset prediction value, and the stamped character offset prediction value, the process further includes: Record the number of cigarettes with stamped defects in real time; Determine whether the number of cigarettes with stamped defects has reached a preset cigarette quantity threshold; If so, a production line maintenance prompt message is generated and sent to the maintenance personnel's terminal to prompt the maintenance personnel to perform maintenance work.
8. A deep learning-based stamp detection system, characterized in that, The system includes: Image acquisition module (301) is used to acquire images of cigarettes; The image segmentation module (302) is used to divide each of the steel stamp area images at different angles into multiple segmented images according to a preset segmentation standard. The multiple segmented images include a first segmented image, a second segmented image, and a third segmented image. The first segmented image includes steel stamp pattern information, the second segmented image includes steel stamp text information, and the third segmented image includes steel stamp character information. The image detection module (303) is used to determine the predicted value of the stamped pattern offset corresponding to the first segmented image, the predicted value of the stamped text offset corresponding to the second segmented image, and the predicted value of the stamped character offset corresponding to the third segmented image according to a preset image detection model. The defect identification module (304) is used to determine the defect type information of the stamp based on the stamp pattern offset prediction value, the stamp text offset prediction value and the stamp character offset prediction value.
9. An electronic device, characterized in that, The device includes a processor (401), a memory (405), a user interface (403), and a network interface (404). The memory (405) is used to store instructions. The user interface (403) and the network interface (404) are used to communicate with other devices. The processor (401) is used to execute the instructions stored in the memory (405) to cause the electronic device (400) to perform the deep learning-based stamp detection method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the steps of the deep learning-based stamp detection method as described in any one of claims 1-7.