Method and device for detecting appearance of cigarette packet and computer readable storage medium

By calculating image feature scores and filtering out abnormal features during cigarette pack appearance inspection, the use of machine learning models is reduced, solving the problem of low inspection efficiency and achieving efficient inspection and improved production quality.

CN115861634BActive Publication Date: 2026-05-08LONGYAN CIGARETTE FACTORY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LONGYAN CIGARETTE FACTORY
Filing Date
2022-12-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in inspecting the appearance of cigarette packs, resulting in a waste of inspection resources. Furthermore, even when the proportion of defective cigarette packs is low, full inspection is still required, which affects efficiency.

Method used

By acquiring features such as color, shape, and size of cigarette pack images, a score is calculated based on the difference between the features and reference features. If the score is higher than a threshold, it is considered normal; otherwise, it is input into a machine learning model to detect the defect type.

Benefits of technology

This improved the efficiency of cigarette pack appearance inspection, avoided resource waste, and enhanced production quality through real-time statistics and alert mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861634B_ABST
    Figure CN115861634B_ABST
Patent Text Reader

Abstract

The disclosure provides a method and device for detecting the appearance of a cigarette package and a computer readable storage medium, and relates to the technical field of cigarette package detection. The method comprises: acquiring one or more types of image features of an image of the cigarette package; determining a score corresponding to each type of image feature according to the difference between each type of image feature and a corresponding reference feature; if the score is greater than or equal to a corresponding threshold, determining that the type of image feature corresponding to the score is normal; if the score is less than the corresponding threshold, determining that the type of image feature corresponding to the score is abnormal; if each type of image feature of the image is normal, determining that the image has no defects; and if at least one type of image feature of the image is abnormal, inputting the image into a machine learning model to obtain a defect type of the cigarette package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of cigarette pack testing technology, and in particular to a method, apparatus, and computer-readable storage medium for testing the appearance of cigarette packs. Background Technology

[0002] Inspecting the appearance of cigarette packs is crucial to preventing packs with cosmetic defects from entering the market. Machine learning algorithms can be used for this inspection. Summary of the Invention

[0003] The inventors noted that the detection efficiency of cigarette pack appearance in related technologies is low. Through analysis, the inventors found that using machine learning algorithms to detect cigarette pack appearance in related technologies is time-consuming, resulting in low detection efficiency. Furthermore, the proportion of defective cigarette packs in the actual production process is low; therefore, using machine learning algorithms to detect the appearance of every cigarette pack would lead to unnecessary waste of detection resources.

[0004] To address the aforementioned problems, the present disclosure proposes the following solutions.

[0005] According to one aspect of the present disclosure, a method for detecting the appearance of a cigarette pack is provided, comprising: acquiring one or more types of image features of an image of the cigarette pack; determining a score corresponding to each type of image feature based on the difference between each type of image feature and a corresponding reference feature; determining that a type of image feature corresponding to the score is normal if the score is greater than or equal to a corresponding threshold; determining that a type of image feature corresponding to the score is abnormal if the score is less than the corresponding threshold; determining that the image is not defective if each type of image feature of the image is normal; and inputting the image into a machine learning model to obtain the defect type of the cigarette pack if at least one type of image feature of the image is abnormal.

[0006] In some embodiments, the image features include color, shape, and size.

[0007] In some embodiments, if the number of first defect types exceeds a preset number within a preset time period in the current production cycle, a first notification is issued.

[0008] In some embodiments, the first prompt includes checking whether the mechanical components associated with the first defect type are functioning properly.

[0009] In some embodiments, a second defect type that has a greater than a preset number in the current production cycle is counted to assist in the operation of the next production cycle.

[0010] In some embodiments, the third defect type with the largest quantity produced by each of the multiple work groups in the current production cycle and the proportion of each defect type produced by each work group are statistically analyzed to assist the operation of each work group in the next production cycle.

[0011] In some embodiments, the defect type includes at least one of the following: cigarette pack wrinkling, misaligned printing, missing printing, misaligned label paper, and glue overflow.

[0012] In some embodiments, the machine learning model is a neural network model.

[0013] According to another aspect of the present disclosure, an apparatus for detecting the appearance of a cigarette pack is provided, comprising: an acquisition module configured to acquire one or more types of image features of an image of the cigarette pack; a determination module configured to determine a score corresponding to each type of image feature based on the difference between each type of image feature and a corresponding reference feature; if the score is greater than or equal to a corresponding threshold, then determining that the type of image feature corresponding to the score is normal; if the score is less than the corresponding threshold, then determining that the type of image feature corresponding to the score is abnormal; if all types of image features of the image are normal, then determining that the image is not defective; and an input module configured to input the image into a machine learning model to obtain the defect type of the cigarette pack if at least one type of image feature of the image is abnormal.

[0014] According to another aspect of the present disclosure, an apparatus for detecting the appearance of a cigarette pack is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the method described in any of the above embodiments based on instructions stored in the memory.

[0015] According to another aspect of the present disclosure, a computer-readable storage medium is provided, including computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method described in any of the above embodiments.

[0016] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements the method described in any of the above embodiments.

[0017] In this embodiment of the disclosure, by determining the score corresponding to each type of image feature based on the difference between each type of image feature and the corresponding reference feature, and then inputting the image features with scores below the threshold into the machine learning model to obtain the defect type of the cigarette pack, the excessive consumption of time and detection resources caused by inputting all cigarette packs to be detected into the machine learning model is avoided, thereby improving the detection efficiency of the appearance of the cigarette pack without affecting the accuracy.

[0018] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic flowchart of a method for detecting the appearance of cigarette packs according to some embodiments of the present disclosure;

[0021] Figure 2 This is a schematic diagram of the structure of a device for detecting the appearance of cigarette packs according to some embodiments of the present disclosure;

[0022] Figure 3 This is a schematic diagram of the structure of a device for detecting the appearance of a cigarette pack according to other embodiments of this disclosure;

[0023] Figure 4 This is a schematic diagram of the structure of an apparatus for acquiring images of cigarette packs according to some embodiments of the present disclosure;

[0024] Figure 5 This is a schematic flowchart of a method for detecting the appearance of a cigarette pack according to other embodiments of the present disclosure. Detailed Implementation

[0025] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0026] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0027] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0028] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0029] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0030] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0031] Figure 1 This is a schematic flowchart of a method for detecting the appearance of cigarette packs according to some embodiments of the present disclosure.

[0032] In step 102, one or more types of image features of the cigarette pack are acquired.

[0033] In some embodiments, image features include color, shape, and size. It should be understood that color, shape, and size are different types of image features.

[0034] For example, color refers to the brand color of the cigarette pack, such as red. Shape refers to the shape of each side of the cigarette pack. Size refers to the length or width of the cigarette pack.

[0035] In step 104, a score is determined for each type of image feature based on the difference between each type of image feature and the corresponding reference feature.

[0036] Taking size as an example, the reference feature is the width of the cigarette pack, which is 8.8 cm, while the image feature size is 4.4 cm. The maximum score is 100 points. Therefore, the image feature of the size type corresponds to a score of 4.4 / 8.8*100 = 50 points.

[0037] In step 106, it is determined whether the score is greater than or equal to the corresponding threshold. If yes, the image feature corresponding to the score is determined to be normal. If no, that is, the score is less than the corresponding threshold, the image feature corresponding to the score is determined to be abnormal.

[0038] In step 108, if all types of image features of the image are normal, it is determined that the image is not defective.

[0039] In step 110, if at least one type of image feature of the image is abnormal, the image is input into a machine learning model to obtain the defect type of the cigarette pack.

[0040] In some embodiments, the defect type includes at least one of the following: cigarette pack wrinkling, misaligned printing, missing printing, misaligned label paper, and glue overflow.

[0041] In some embodiments, the machine learning model is a neural network model.

[0042] In the above embodiments, by determining the score corresponding to each type of image feature based on the difference between each type of image feature and the corresponding reference feature, and then inputting the image features with scores below the threshold into the machine learning model to obtain the defect type of the cigarette pack, the excessive consumption of time and detection resources caused by inputting all the cigarette packs to be detected into the machine learning model is avoided, thereby improving the detection efficiency of the appearance of the cigarette pack without affecting the accuracy.

[0043] In some embodiments, the method for detecting the appearance of cigarette packs further includes inputting an image into a machine learning model to obtain the defect type of the cigarette pack, and then, if the number of the first defect type is greater than a preset number within a preset time period in the current production cycle, issuing a first prompt.

[0044] For example, the number of cigarette packs with skewed label paper defects can be counted every 30 minutes on a given day, and staff can be alerted to pay close attention to this phenomenon when the number exceeds a preset limit.

[0045] In the above embodiments, by statistically analyzing the number of first defect types within a preset time period and providing prompts based on the statistical results, staff can adjust the production process accordingly, thereby improving the quality of cigarette pack production.

[0046] In some embodiments, if the number of first defect types exceeds a preset number within a preset time period in the current production cycle, a first prompt is issued, which includes checking whether the mechanical components related to the first defect type are functioning properly.

[0047] For example, the first prompt is: "The label paper on machine #60 of shift A [10:00-10:30] is frequently crooked. Please check whether the turntable and other mechanical parts of the packaging machine are normal in time."

[0048] In the above embodiments, by checking whether the mechanical parts related to the first defect type are normal, the staff checks and adjusts the relevant mechanical parts, thereby further improving the quality of cigarette pack production.

[0049] In some embodiments, the method for detecting the appearance of cigarette packs further includes: counting a second defect type that has a greater than a preset number in the current production cycle, in order to assist in the operation of the next production cycle.

[0050] For example, if the number of cigarette packs with missing prints on a single day or shift exceeds the preset number, staff should be reminded to pay close attention to this phenomenon during the next day or shift.

[0051] In the above embodiments, the number of defective cigarette packs in the current production cycle is counted, and the staff checks and adjusts the production process based on the statistical results, thereby improving the quality of cigarette pack production.

[0052] In some embodiments, the method for inspecting the appearance of cigarette packs further includes: statistically analyzing the largest number of third defect types in each production shift within the current production cycle and the percentage of each defect type in the cigarette packs produced by each production shift, in order to assist the operation of each production shift in the next production cycle.

[0053] For example, among production teams A, B, and C, team A produces the largest number of cigarette packs with glue overflow on that day. As a possible solution, we can suggest that if team A is the production team for the following day, special attention should be paid to the glue overflow issue.

[0054] For example, in the cigarette packs produced by shift B that day, misaligned printing accounted for the highest percentage of all defect types. As a possible solution, we can suggest that if shift B is the production shift the following day, special attention should be paid to misaligned printing.

[0055] In the above embodiments, by statistically analyzing the defective cigarette packs from multiple production shifts within the current production cycle, staff can inspect and adjust the production process based on the statistical results, thereby improving the quality of cigarette pack production.

[0056] In some embodiments, the system automatically generates a bar chart of the distribution of defective cigarette packs per shift / day for each work group and a line graph of the occurrence of defective cigarette packs over time. The graphs include useful information such as machine number, defective cigarette pack type, percentage of each defective cigarette pack type, and peak defect time, providing visualized, targeted, efficient prevention, and timely early warning for the appearance quality control of cigarette packs.

[0057] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus embodiments, since they largely correspond to the method embodiments, the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0058] Figure 2This is a schematic diagram of the structure of a device for detecting the appearance of cigarette packs according to some embodiments of the present disclosure.

[0059] like Figure 2 As shown, the device for detecting the appearance of cigarette packs includes an acquisition module 201, a determination module 202, and an input module 203.

[0060] The acquisition module 201 is configured to acquire one or more types of image features of the cigarette pack image.

[0061] The determining module 202 is configured to determine a score corresponding to each type of image feature based on the difference between each type of image feature and the corresponding reference feature; if the score is greater than or equal to the corresponding threshold, the image feature of the corresponding type of score is determined to be normal; if the score is less than the corresponding threshold, the image feature of the corresponding type of score is determined to be abnormal; if the image features of each type of image feature are normal, the image is determined to be without defects.

[0062] The input module 203 is configured to input the image into a machine learning model to obtain the defect type of the cigarette pack when at least one type of image feature of the image is abnormal.

[0063] In some embodiments, the cigarette pack appearance detection device further includes other modules to perform the cigarette pack appearance detection method of any of the above embodiments.

[0064] Figure 3 This is a schematic diagram of the structure of a device for detecting the appearance of a cigarette pack according to some embodiments of the present disclosure.

[0065] like Figure 3 As shown, the cigarette pack appearance detection device 300 includes a memory 301 and a processor 302 coupled to the memory 301. The processor 302 is configured to execute the method of any of the foregoing embodiments based on instructions stored in the memory 301.

[0066] The memory 301 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory may store, for example, an operating system, application programs, a boot loader, and other programs.

[0067] The cigarette pack appearance detection device 300 may also include an input / output interface 303, a network interface 304, and a storage interface 305. These interfaces 303, 304, and 305, as well as the memory 301 and processor 302, can be connected, for example, via a connector 306. The input / output interface 303 provides a connection interface for input / output devices such as monitors, mice, keyboards, and touchscreens. The network interface 304 provides a connection interface for various networked devices. The storage interface 305 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0068] Figure 4 This is a schematic diagram of the structure of an apparatus for acquiring images of cigarette packs according to some embodiments of the present disclosure.

[0069] like Figure 4 As shown, the device for acquiring images of cigarette packs includes camera 1, camera 2, and camera 3, used to capture images of various sides of the cigarette pack. As one implementation method, a cloud service platform can be built to transmit the acquired (e.g., all) exterior images of the cigarette pack to the cloud service platform in real time, enabling the direct viewing of cigarette pack images on the cloud service platform.

[0070] In some embodiments, the method for detecting the appearance of the cigarette pack includes steps 502-516.

[0071] In step 502, one or more types of image features are obtained for each of one or more images of the cigarette pack.

[0072] In step 504, a score is determined for each type of image feature based on the difference between each type of image feature and the corresponding reference feature.

[0073] In step 506, if the score is greater than or equal to the corresponding threshold, then the image feature of the type corresponding to the score is determined to be normal.

[0074] In step 508, if the score is less than the corresponding threshold, it is determined that the image feature corresponding to the score is abnormal.

[0075] In step 510, if each type of image feature in each image is normal, it is determined that the appearance of the cigarette pack is not defective.

[0076] In step 512, if at least one type of image feature of at least one image is abnormal, at least one image is input into a machine learning model to obtain one of a first result and a second result of the cigarette pack, wherein the first result is the type of defect in appearance and the second result is that the appearance is not defective.

[0077] In step 514, the maximum value of the scores of multiple image features of the first type that are abnormal within a preset time period before at least a preset time is determined. For each of the multiple image features, the result obtained after inputting the image to which the image feature belongs into the machine learning model is the first result of the cigarette pack corresponding to the image to which the image feature belongs.

[0078] For example, if the scores of abnormal image feature colors within a preset time period are 50, 40, 43, 38, and 52, then the maximum value is 52.

[0079] In step 516, the threshold corresponding to the first type of image feature is adjusted according to the maximum value. After adjustment, the difference between the threshold corresponding to the first type of image feature and the maximum value is greater than the first preset value.

[0080] For example, if the first preset value is 20, the adjusted threshold is 82. It should be understood that the first type can be any type.

[0081] In some embodiments, the threshold corresponding to the first type of image feature is less than the upper limit of the score of the first type of image feature. For example, if the upper limit of the score of the image feature color is 100, then the threshold of the image feature color should be less than 100. For example, the scores of abnormal image feature colors are 0, 55, 51, 54, 60, 59, 81, 58, 55, 52, with a maximum value of 81. A preset value of 20 is added to this maximum value. If adding 20 results in a score exceeding the upper limit of 100, the preset value is changed to 10. If adding 10 still results in a score exceeding the upper limit, 5 is added, and so on. 81 + 20 = 101 > 100, 81 + 10 = 91 < 100, so the threshold of the image feature color is adjusted to 91.

[0082] In the above embodiment, the threshold corresponding to the first type of image feature is adjusted based on the maximum score of multiple abnormal first-type image features. Furthermore, after the image to which the multiple image features belong is input into the machine learning model, the result indicates that the cigarette pack corresponding to the image to which the image feature belongs has an appearance defect. This approach fully considers the impact of various factors on the score fluctuations of image features, preventing missed detections and improving the accuracy of cigarette pack appearance detection.

[0083] In some embodiments, at least one preset time in the method for detecting the appearance of the cigarette pack includes a plurality of preset times spaced apart from each other.

[0084] For example, the threshold corresponding to the first type of image feature is adjusted at 8:00, 9:00, and 11:00.

[0085] In the above embodiments, by adjusting the threshold corresponding to the first type of image feature based on the maximum value of the scores of multiple abnormal first type image features within multiple preset time intervals, the influence of various factors on the score fluctuation of image features is fully considered, further preventing missed detections and further improving the accuracy of cigarette pack appearance detection.

[0086] In some embodiments, the time interval between any two adjacent preset times is the same.

[0087] For example, the threshold corresponding to the first type of image feature is adjusted every 30 minutes.

[0088] In the above embodiments, by adjusting the threshold corresponding to the first type of image feature based on the maximum value of the score of multiple image features of the first type of abnormality within multiple preset time intervals of the same duration between any two adjacent preset time intervals, the situation that various factors may affect the score of image features and cause score fluctuations is more fully considered, further preventing the occurrence of missed detections and further improving the accuracy of detecting the appearance of cigarette packs.

[0089] In some embodiments, in step 502, multiple types of image features are acquired for each image of the cigarette pack, with each type being the first type. In other words, the threshold corresponding to each type of image feature is adjusted in the manner described above. This more fully considers the impact of various factors on the score fluctuations of each type of image feature, further preventing missed detections and improving the accuracy of cigarette pack appearance detection.

[0090] This disclosure also provides a computer-readable storage medium including computer program instructions that, when executed by a processor, implement the method of any of the above embodiments.

[0091] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the above embodiments.

[0092] The embodiments of this disclosure have now been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.

[0093] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0094] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that the functions specified in one or more flowchart illustrations and / or one or more blocks in a block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate functions for implementing the functions in the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0097] While specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments or equivalent substitutions can be made to some technical features without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.

Claims

1. A method for detecting the appearance of a cigarette pack, comprising: Obtain multiple types of image features for each image in one or more images of the cigarette pack, the image features including color, shape, and size; The score for each type of image feature is determined based on the difference between each type of image feature and its corresponding reference feature; If the score is greater than or equal to the corresponding threshold, then the image feature corresponding to the score is determined to be normal. If the score is less than the corresponding threshold, then it is determined that the image feature corresponding to the score is abnormal. If each type of image feature in each image is normal, it is determined that each image is free of defects, thus determining that the appearance of the cigarette pack is free of defects; In the case that at least one image has at least one type of abnormal image feature, the at least one image is input into a machine learning model to obtain one of a first result and a second result for the cigarette pack, wherein the first result is the type of appearance defect and the second result is that the appearance has no defect; Determine the maximum value of the scores of multiple abnormal first-type image features within a preset time period before each preset time in a plurality of preset time intervals. For each of the plurality of image features, the image to which the image feature belongs is input into the machine learning model and the result obtained is the first result of the cigarette pack corresponding to the image to which the image feature belongs. Each of the plurality of types is the first type, and the time interval between any two adjacent preset time intervals is the same. The threshold corresponding to the first type of image feature is adjusted according to the maximum value. After the adjustment, the difference between the threshold corresponding to the first type of image feature and the maximum value is greater than a first preset value.

2. The method according to claim 1, further comprising: If the number of first-type defects exceeds the preset number within a preset time period in the current production cycle, a first warning will be issued.

3. The method according to claim 2, wherein, The first prompt includes checking whether the mechanical components associated with the first defect type are functioning properly.

4. The method according to claim 1, further comprising: The system identifies the second type of defect that is present in greater numbers than a preset quantity during the current production cycle, in order to assist in the operation of the next production cycle.

5. The method according to claim 1, further comprising: The statistics are compiled to determine the third largest defect type produced by each shift in the current production cycle and the percentage of each defect type produced by each shift, in order to assist the operation of each shift in the next production cycle.

6. The method according to claim 1, wherein, The defect types include at least one of the following: cigarette pack wrinkles, misaligned printing, missing printing, misaligned label paper, and glue overflow.

7. The method according to claim 1, wherein, The machine learning model is a neural network model.

8. A device for detecting the appearance of cigarette packs, comprising: The acquisition module is configured to acquire multiple types of image features for each of one or more images of the cigarette pack, the image features including color, shape, and size; The determination module is configured to determine a score for each type of image feature based on the difference between each type of image feature and its corresponding reference feature; if the score is greater than or equal to a corresponding threshold, the image feature of the type corresponding to the score is determined to be normal; if the score is less than the corresponding threshold, the image feature of the type corresponding to the score is determined to be abnormal. If each type of image feature in each image is normal, it is determined that each image is free of defects, thus determining that the appearance of the cigarette pack is free of defects; The input module is configured to input the at least one image into a machine learning model when at least one type of image feature is abnormal, to obtain one of a first result and a second result of the cigarette pack, wherein the first result is a defect type of appearance and the second result is no defect in appearance; The detection device is also configured to: Determine the maximum value of the scores of multiple abnormal first-type image features within a preset time period before each preset time in a plurality of preset time intervals. For each of the plurality of image features, the image to which the image feature belongs is input into the machine learning model and the result obtained is the first result of the cigarette pack corresponding to the image to which the image feature belongs. Each of the plurality of types is the first type, and the time interval between any two adjacent preset time intervals is the same. The threshold corresponding to the first type of image feature is adjusted according to the maximum value. After the adjustment, the difference between the threshold corresponding to the first type of image feature and the maximum value is greater than a first preset value.

9. A device for detecting the appearance of cigarette packs, comprising: Memory; as well as A processor coupled to the memory is configured to execute the method of any one of claims 1-7 based on instructions stored in the memory.

10. A computer-readable storage medium comprising computer program instructions, wherein, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1-7.

11. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Multi-type material surface defect detection method based on machine vision

    CN104458755A

  • Cigarette packet appearance quality detection method, device and system

    CN115424010A