CN-115861634-B - Method and device for detecting appearance of tobacco package and computer-readable storage medium
Abstract
The present disclosure provides a method, an apparatus, and a computer-readable storage medium for detecting an appearance of a tobacco packet, and relates to the technical field of tobacco packet detection, where the method includes acquiring one or more types of image features of an image of the tobacco packet; determining the score corresponding to each type of image feature according to the difference between each type of image feature and the corresponding reference feature, determining that one type of image feature corresponding to the score is normal if the score is larger than or equal to the corresponding threshold value, determining that one type of image feature corresponding to the score is abnormal if the score is smaller than the corresponding threshold value, determining that the image does not have defects if each type of image feature of the image is normal, and inputting the image into a machine learning model if at least one type of image feature of the image is abnormal, so as to obtain the defect type of the tobacco packet.
Inventors
- JIANG JINGQIANG
- RAO RONGHUA
- Luo Dunhui
- CHEN XIANGRONG
- WEN MAORONG
- LEI ZHENYU
- ZHONG XIAOLIN
- ZHANG MEILING
- ZHENG YADAN
- HOU YONGCHAO
Assignees
- 龙岩烟草工业有限责任公司
Dates
- Publication Date
- 20260508
- Application Date
- 20221229
Claims (11)
- 1. A method of detecting the appearance of a tobacco packet, comprising: acquiring multiple types of image features of each of one or more images of the tobacco bale, wherein the image features comprise colors, shapes and sizes; determining a score corresponding to each type of image feature according to the difference between each type of image feature and the corresponding reference feature; If the score is greater than or equal to a corresponding threshold value, determining that one type of image features corresponding to the score is normal; if the score is smaller than the corresponding threshold value, determining that one type of image features corresponding to the score is abnormal; Determining that each image is not defective in the event that each type of image characteristic of each image is normal, to determine that the appearance of the pack is not defective; Inputting at least one image into a machine learning model to obtain one of a first result and a second result of the tobacco package, wherein the first result is a defect type of appearance, and the second result is that the appearance is not defective; Determining the maximum value of scores of a plurality of abnormal first types of image features in a preset time period before each preset time point in a plurality of preset time points which are spaced apart from each other, wherein the result obtained after an image which belongs to each image feature is input into the machine learning model is the first result of a tobacco bale corresponding to the image which belongs to the image feature, each type of the plurality of types is the first type, and the time length of the interval between any two adjacent preset time points is the same; And adjusting the threshold value corresponding to the first type of image features according to the maximum value, wherein after the adjustment, the difference value between the threshold value corresponding to the first type of image features and the maximum value is larger than a first preset value.
- 2. The method of claim 1, further comprising: and carrying out first prompt when the number of the first defect types in the preset part time period in the current production period is larger than the preset number.
- 3. The method of claim 2, wherein the first prompt includes checking whether a mechanical component associated with the first defect type is normal.
- 4. The method of claim 1, further comprising: And counting the second defect types with the number larger than the preset number in the current production period so as to assist the operation of the next production period.
- 5. The method of claim 1, further comprising: The third defect type having the largest number of each of the plurality of teams produced during the current production cycle and the duty ratio of the respective defect types produced by each team are counted to assist the operation of each team during the next production cycle.
- 6. The method of claim 1, wherein the defect type comprises at least one of a cigarette packet crumple, a print skew, a print miss, a label skew, and a glue spill.
- 7. The method of claim 1, wherein the machine learning model is a neural network model.
- 8. A device for detecting the appearance of a tobacco packet, comprising: An acquisition module configured to acquire a plurality of types of image features for each of one or more images of the tobacco bale, the image features including color, shape, and size; The system comprises a determining module, a judging module and a judging module, wherein the determining module is configured to determine a score corresponding to each type of image feature according to the difference between the image feature of each type and a corresponding reference feature, determine that one type of image feature corresponding to the score is normal if the score is greater than or equal to a corresponding threshold value, determine that one type of image feature corresponding to the score is abnormal if the score is less than the corresponding threshold value, and determine that each image has no defect under the condition that each type of image feature of each image is normal so as to determine that the appearance of the cigarette packet has no defect; an input module configured to input at least one image into a machine learning model to obtain one of a first result and a second result of the tobacco bale, the first result being a defect type of the appearance and the second result being that the appearance is not defective, in the event that at least one type of image feature of the at least one image is abnormal; The detection device is further configured to: Determining the maximum value of scores of a plurality of abnormal first types of image features in a preset time period before each preset time point in a plurality of preset time points which are spaced apart from each other, wherein the result obtained after an image which belongs to each image feature is input into the machine learning model is the first result of a tobacco bale corresponding to the image which belongs to the image feature, each type of the plurality of types is the first type, and the time length of the interval between any two adjacent preset time points is the same; And adjusting the threshold value corresponding to the first type of image features according to the maximum value, wherein after the adjustment, the difference value between the threshold value corresponding to the first type of image features and the maximum value is larger than a first preset value.
- 9. A device for detecting the appearance of a tobacco packet, comprising: Memory, and A processor coupled to the memory and configured to perform the method of any of claims 1-7 based on instructions stored in the memory.
- 10. A computer readable storage medium comprising computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1-7.
- 11. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-7.
Description
Method and device for detecting appearance of tobacco package and computer-readable storage medium Technical Field The disclosure relates to the technical field of cigarette packet detection, in particular to a method and a device for detecting the appearance of a cigarette packet and a computer-readable storage medium. Background Detecting the appearance of a packet is critical to avoid the appearance of a defective packet from flowing into the market. In the related art, the detection may be performed using a machine learning algorithm. Disclosure of Invention The inventors noted that the detection efficiency of the appearance of the pack in the related art is low. Through analysis, the inventor finds that the time consumption for detecting the appearance of the tobacco bale by using the machine learning algorithm in the related technology is long, so that the detection efficiency of the appearance of the tobacco bale is low, and the occupation of the quantity of defective tobacco bales in the actual production process in the tobacco bale to be detected is low, so that the detection of the appearance of each tobacco bale by using the machine learning algorithm can cause unnecessary consumption of detection resources. In order to solve the above-described problems, the embodiments of the present disclosure propose the following solutions. According to an aspect of the embodiment of the disclosure, a detection method for appearance of a tobacco bale is provided, and the detection method comprises the steps of obtaining one or more types of image features of an image of the tobacco bale, determining a score corresponding to each type of image features according to differences between each type of image features and corresponding reference features, determining that one type of image features corresponding to the score are normal if the score is greater than or equal to a corresponding threshold value, determining that one type of image features corresponding to the score are abnormal if the score is smaller than the corresponding threshold value, determining that the image has no defects if each type of image features of the image are normal, and inputting the image into a machine learning model to obtain defect types of the tobacco bale if at least one type of image features of the image are abnormal. In some embodiments, the image features include color, shape, and size. In some embodiments, the first cue is performed if the number of first defect types is greater than a preset number for a preset portion of the time period within the current production cycle. In some embodiments, the first prompt includes checking whether the mechanical component associated with the first defect type is normal. In some embodiments, a number of second defect types greater than a preset number in the current production cycle is counted to assist in the operation of the next production cycle. In some embodiments, the largest number of third defect types produced by each of the plurality of teams during the current production cycle and the respective defect types produced by each team are counted to assist in the operation of each team during the next production cycle. In some embodiments, the defect type includes at least one of a pack crumple, a print skew, a print miss, a label skew, and a glue spill. In some embodiments, the machine learning model is a neural network model. According to still another aspect of the embodiment of the present disclosure, there is provided a detection apparatus for an appearance of a tobacco packet, including an acquisition module configured to acquire one or more types of image features of an image of the tobacco packet, a determination module configured to determine a score corresponding to each type of image feature according to a difference between each type of image feature and a corresponding reference feature, determine that one type of image feature corresponding to the score is normal if the score is equal to or greater than a corresponding threshold, determine that one type of image feature corresponding to the score is abnormal if the score is less than the corresponding threshold, determine that the image does not have a defect if each type of image feature of the image is normal, and input the image into a machine learning model to obtain a defect type of the tobacco packet if at least one type of image feature of the image is abnormal. According to a further aspect of the disclosed embodiments there is provided a device for detecting the appearance of a tobacco packet comprising a memory, and a processor coupled to the memory, the processor being configured to perform the method of any of the above embodiments based on instructions stored in the memory. According to a further aspect of the disclosed embodiments, a computer readable storage medium is provided, comprising computer program instructions, wherein the computer program instructions, when executed by a processor, implem