Cigarette detection method, device, storage medium and program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LONGYAN CIGARETTE FACTORY
- Filing Date
- 2026-06-25
- Publication Date
- 2026-08-04
AI Technical Summary
[0003]在相关技术中,在烟支输送及推入模盒的过程中,烟支表面易产生压皱,造成烟包中的烟支质量缺陷,影响成品烟包质量
[0018] In the above embodiments, by detecting substandard cigarettes and binding the detection results with the identification information of the cigarette pack containing the cigarettes, the cigarette pack containing substandard cigarettes can be accurately removed downstream by reading the identification information of the cigarette pack, thereby improving the quality of the finished cigarette pack.
Smart Images

Figure CN122501577A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of cigarette testing technology, and in particular to a cigarette testing method, apparatus, storage medium and program product. Background Technology
[0002] The cigarette packaging mold forming process of the packaging machine is as follows: After the cigarettes produced by the upstream machine are conveyed through the descending channel, the bottom row of cigarettes is pushed into the mold by the pusher mechanism. The mold is a forming mold with multiple parallel grooves on the packaging machine, used to neatly arrange the cigarettes into a multi-layer structure. Subsequently, the mold moves from right to left under the drive of the belt, completing the filling of multiple layers of cigarettes one by one, and then is sent to the next process.
[0003] In related technologies, during the process of cigarette conveying and pushing into the mold box, the surface of the cigarette is prone to wrinkling, which causes quality defects in the cigarette pack and affects the quality of the finished cigarette pack. Summary of the Invention
[0004] One of the technical problems this disclosure aims to solve is: how to improve the quality of finished cigarette packs.
[0005] According to one aspect of this disclosure, a cigarette detection method is proposed, comprising: determining whether a cigarette located at a first position in a conveying line is qualified based on image information of the cigarette; in response to detecting a non-qualified cigarette, storing the identification information of the cigarette pack containing the non-qualified cigarette; at a second position in the conveying line, reading the identification information of the cigarette pack to identify whether the cigarette pack contains a non-qualified cigarette, the second position being downstream of the first position; and in response to identifying that the cigarette pack contains a non-qualified cigarette, removing the cigarette pack containing the non-qualified cigarette from the conveying line.
[0006] In some embodiments, determining whether a cigarette located at a first position in a conveying line is qualified based on the image information of the cigarette includes: performing a first detection on the cigarette based on the image information of the cigarette; identifying the cigarette as a candidate cigarette in response to the cigarette failing the first detection; and performing a second detection on the candidate cigarette based on a machine learning model to determine whether the candidate cigarette is qualified.
[0007] In some embodiments, the machine learning model is trained by: extracting feature information of qualified cigarettes based on image information of qualified cigarettes, wherein qualified cigarettes are those that pass the first detection; and training the machine learning model using the feature information.
[0008] In some embodiments, performing a first detection on a cigarette based on image information includes: determining color information of a designated area of the cigarette based on the image information; and performing a first detection on the cigarette based on whether the color information meets color requirements, wherein different types of cigarettes correspond to different color requirements.
[0009] In some embodiments, the designated area includes the filter end and the body end of the cigarette.
[0010] In some embodiments, the same cigarette pack includes multiple cigarettes. The first detection of the cigarettes based on the image information of the cigarettes includes: extracting the overall contour information of the multiple cigarettes based on the image information of the multiple cigarettes in the same cigarette pack; and performing the first detection of the multiple cigarettes based on the overall contour information and the standard contour information.
[0011] In some embodiments, different types of cigarettes correspond to different standard profile information.
[0012] In some embodiments, performing a first detection on multiple cigarettes based on overall contour information and standard contour information includes: determining that multiple cigarettes have failed the first detection in response to a difference between the overall contour information and the standard contour information being greater than a difference threshold.
[0013] In some embodiments, the identification information includes QR code information.
[0014] According to a second aspect of this disclosure, a cigarette detection device is also provided, comprising: a judgment module configured to determine whether a cigarette located at a first position in a conveying line is qualified based on image information of the cigarette; a storage module configured to store identification information of a cigarette pack containing a non-qualified cigarette in response to the detection of a non-qualified cigarette; a reading module configured to read the identification information of a cigarette pack at a second position in the conveying line to identify whether the cigarette pack contains a non-qualified cigarette; and a removal module configured to remove the cigarette pack containing the non-qualified cigarette from the conveying line in response to the identification that the cigarette pack contains a non-qualified cigarette, wherein the second position is located downstream of the first position.
[0015] According to a third aspect of this disclosure, a cigarette detection device is also proposed, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the above-described cigarette detection method based on instructions stored in the memory.
[0016] According to a fourth aspect of this disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the above-described cigarette detection method.
[0017] According to the fifth aspect of this disclosure, a computer program product is also proposed, including instructions that, when executed by a processor, cause the processor to perform the above-described cigarette detection method.
[0018] In the above embodiments, by detecting substandard cigarettes and binding the detection results with the identification information of the cigarette pack containing the cigarettes, the cigarette pack containing substandard cigarettes can be accurately removed downstream by reading the identification information of the cigarette pack, thereby improving the quality of the finished cigarette pack.
[0019] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0020] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.
[0021] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0022] Figure 1 This is a schematic flowchart of some embodiments of the cigarette detection method disclosed herein;
[0023] Figure 2 The following are schematic flowcharts of some other embodiments of the cigarette detection method disclosed herein;
[0024] Figure 3 Block diagrams of some embodiments of the cigarette detection device disclosed herein;
[0025] Figure 4 Block diagrams showing some embodiments of the electronic devices disclosed herein. Detailed Implementation
[0026] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, 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 the present 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] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0033] As mentioned earlier, the cigarettes produced by the upstream machine are conveyed through the descending channel, and then the bottom row of cigarettes is pushed into the mold box by the pusher mechanism. The mold box is a forming mold with multiple parallel grooves on the packaging machine, used to neatly arrange the cigarettes into a multi-layer structure. The mold box runs under the drive of a belt, completing the filling of multiple layers of cigarettes one by one. However, during the process of cigarette conveying and pushing into the mold box, if the speed of the upstream machine and the packaging machine is mismatched, if the channel is squeezed, or if the pusher mechanism is damaged, it can easily cause wrinkles on the surface of the cigarettes, resulting in quality defects in the cigarette packs and affecting the quality of the finished cigarette packs.
[0034] To address the aforementioned technical issues, this disclosure provides a cigarette detection method that can detect substandard cigarettes and bind the detection results to the labeling information of the cigarette pack containing the cigarette. This allows for the precise removal of cigarette packs containing substandard cigarettes downstream by reading the labeling information, thereby improving the quality of the finished cigarette packs.
[0035] The present disclosure will now be described in conjunction with specific embodiments.
[0036] Figure 1 This is a schematic flowchart of some embodiments of the cigarette detection method disclosed herein.
[0037] like Figure 1 As shown, in step S11, based on the image information of the cigarette, it is determined whether the cigarette located at the first position in the conveying line is qualified.
[0038] For example, the first position can be set in the main unit of the cigarette packaging machine.
[0039] In step S12, in response to the detection of a substandard cigarette, the identification information of the cigarette pack containing the substandard cigarette is stored. For example, the identification information includes QR code information.
[0040] For example, if a substandard cigarette is detected, a substandard signal is sent to the processor of the industrial control computer, which marks the QR code information of the cigarette pack containing the substandard cigarette as substandard and stores it in the industrial control computer's database.
[0041] In step S13, at the second position of the conveying line, the identification information of the cigarette pack is read to identify whether the cigarette pack contains unqualified cigarettes.
[0042] The second position is located downstream of the first position. For example, the second position can be set in an auxiliary machine of a cigarette packaging machine.
[0043] In this way, considering that the detection may take a long time, setting the tag reading position in a more downstream auxiliary machine can ensure that the tag information stored in the database can be fully updated, thereby improving the accuracy of tag recognition and reading, and thus improving the quality of finished cigarette packs.
[0044] In step S14, in response to the detection that the cigarette pack contains defective cigarettes, the cigarette pack containing the defective cigarettes is removed from the conveyor line.
[0045] In the above embodiments, by detecting unqualified cigarettes and binding the detection results with the identification information of the cigarette pack containing the cigarettes, the cigarette pack containing unqualified cigarettes can be accurately removed downstream by reading the identification information of the cigarette pack, thereby improving the quality of the finished cigarette pack.
[0046] The following examples illustrate methods for determining whether a cigarette is qualified.
[0047] In some embodiments, a first detection is performed on the cigarette based on the image information of the cigarette; in response to the cigarette failing the first detection, the cigarette is identified as a candidate cigarette; and a second detection is performed on the candidate cigarette based on a machine learning model to determine whether the candidate cigarette is qualified.
[0048] In this way, by first using image information to initially screen qualified cigarettes, and then using machine learning models to re-inspect potentially unqualified candidate cigarettes, the accuracy and reliability of cigarette detection can be improved, thereby improving the quality of finished cigarette packs.
[0049] In some embodiments, color information of a designated area of the cigarette is determined based on image information; the cigarette is then subjected to a first detection based on whether the color information meets color requirements. For example, the designated area includes the filter end and the body end of the cigarette.
[0050] For example, color area detection areas can be set at both the filter end and the body end of the cigarette. The color of the cigarette after it has been wrinkled can be sampled, and a detection threshold can be set. When the cigarette is wrinkled, the actual detection value in the corresponding detection area will be greater than the set detection threshold. In this way, by detecting the color information of the cigarette, its quality can be determined.
[0051] In some embodiments, a cigarette pack includes multiple cigarettes. Based on image information of the multiple cigarettes in the same pack, overall contour information of the multiple cigarettes is extracted. A first detection is then performed on the multiple cigarettes based on the overall contour information and standard contour information. For example, if the difference between the overall contour information and the standard contour information exceeds a difference threshold, it is determined that the multiple cigarettes have failed the first detection.
[0052] For example, the detection area can be defined for all the cigarettes contained in the entire cigarette mold box. Then, the detection threshold is set according to the detection values of the defined detection areas corresponding to the standard cigarette images. Since in the case of cigarette wrinkling, the overall contour of all the captured cigarettes will change, causing the cigarettes to be misaligned, so that the detection value of the overall contour is greater than the set difference threshold. In this way, by detecting the overall contour information, it can be determined whether the cigarettes are misaligned, and thus whether the cigarettes are qualified.
[0053] In some embodiments, different types of cigarettes correspond to different color requirements and different standard contour information. For example, the same device can produce cigarettes of different brands, and there are differences in the cigarette colors and appearance structures of cigarettes of different brands. Therefore, the corresponding color requirements and corresponding standard contour information can be selected according to the cigarette brand to improve the accuracy of cigarette detection and further improve the quality of the finished cigarette packs.
[0054] Through the detection of the color information and overall contour information of the above-mentioned cigarettes (i.e., the first detection), the surface wrinkling of multiple layers of cigarettes contained in the cigarette pack can be detected. However, since the imaging effect of cigarette wrinkling on the industrial camera is not so obvious, the detection difficulty is relatively large, and it is easily interfered by tobacco dust, resulting in false detection. Therefore, an artificial intelligence self-learning algorithm can be considered to perform a re-inspection on the cigarettes based on the above detection results.
[0055] In some embodiments, the machine learning model is obtained through the following training: according to the image information of qualified cigarettes, the characteristic information of the qualified cigarettes is extracted, where the qualified cigarettes are the cigarettes that pass the first detection; the machine learning model is trained using the characteristic information.
[0056] For example, multiple (e.g., 1000) pictures of qualified cigarettes that pass the first detection can be collected, and image preprocessing techniques such as filtering and noise reduction, equalization, etc. are used to preprocess the pictures of the above-mentioned qualified cigarettes. Then, feature extraction methods such as the HSV (Hue, Saturation, Value) or RGB (Red, Green, Blue) color histograms, gray-level co-occurrence matrices in the industrial vision camera are applied to extract the feature values of the preprocessed pictures. Finally, the feature values extracted from the pictures of the qualified cigarettes are trained using a convolutional neural network to obtain the machine learning model.
[0057] The following uses Figure 2 the embodiments in
[0058] Figure 2 to exemplarily illustrate the above cigarette detection method.
[0059] As Figure 2 As shown, in step S21, routine detection points for the first detection are set. First, the shooting conditions are set, and the internal triggering method is selected according to the hardware installation. For example, the camera is triggered to perform image acquisition based on the shooting signal output by the device at a fixed phase. Then, the camera brightness and focus are adjusted, and the filtering parameters are set to ensure the clarity and recognizability of the captured image. In addition, standard cigarette group images can be acquired and registered as master images to provide a standard reference for the setting of subsequent detection points. Finally, routine detection points are set on the registered master image, including color area detection, misalignment detection, etc.
[0060] The same equipment can produce different brands of cigarettes, and the appearance of cigarette sticks varies between different brands. Therefore, it is necessary to configure the vision inspection software of the industrial camera controller with the program and routine inspection points corresponding to the currently produced brand. That is, based on the brand of cigarettes currently being produced by the equipment, the first inspection program is switched to the inspection program for the corresponding brand.
[0061] In step S22, a first test is performed based on the set routine test points to determine whether the cigarette is qualified.
[0062] In step S23, images of qualified cigarettes that have passed the first inspection are acquired, and a machine learning model for re-inspecting cigarettes is trained using the self-learning training tool of the visual inspection software.
[0063] In step S24, the candidate cigarettes that failed the first test are retested to determine whether they are unqualified cigarettes.
[0064] In step S25, the QR code information of the cigarette pack containing the defective cigarette is stored.
[0065] In step S26, after the cigarettes are packaged into cigarette packs and flow into the auxiliary machine, the QR code scanner of the auxiliary machine reads the QR code information of the cigarette packs to determine whether the cigarette packs contain unqualified cigarettes.
[0066] In step S27, if the QR code information of the cigarette pack is detected to match the stored QR code information of cigarette packs containing substandard cigarettes, a signal is sent to the CPU (Central Processing Unit) of the industrial control computer. For example, by adding a control program to the CPU of the packaging machine, the cigarette pack containing the substandard cigarettes can be removed from the auxiliary machine's small pack rejection port.
[0067] For example, the QR code scanning station and the cigarette pack rejection station are different stations (e.g., the rejection station is three stations downstream of the QR code scanning station). When the QR code scanner identifies a pack containing a defective cigarette, after a three-step delay, the rejection port opens and accurately rejects the pack containing the defective cigarette. That is, the defective signal is accurately located and rejected after a step delay.
[0068] The cigarette detection device of this disclosure will now be described in conjunction with the accompanying drawings.
[0069] like Figure 3 As shown, Figure 3 This is a block diagram of some embodiments of the cigarette detection device disclosed herein.
[0070] The cigarette detection device includes a judgment module 31, a storage module 32, a reading module 33, and a removal module 34.
[0071] The judgment module 31 is configured to determine whether a cigarette located at a first position in the conveying line is qualified based on the image information of the cigarette. The storage module 32 is configured to store the identification information of the cigarette pack containing the unqualified cigarette in response to the detection of an unqualified cigarette. The reading module 33 is configured to read the identification information of the cigarette pack at a second position in the conveying line to identify whether the cigarette pack contains an unqualified cigarette, the second position being downstream of the first position. The removal module 34 is configured to remove the cigarette pack containing the unqualified cigarette from the conveying line in response to the identification that the cigarette pack contains an unqualified cigarette.
[0072] In this embodiment, by detecting substandard cigarettes and binding the detection results with the identification information of the cigarette pack, the cigarette pack containing the substandard cigarettes can be accurately removed downstream by reading the identification information of the cigarette pack, thereby improving the quality of the finished cigarette pack.
[0073] In some embodiments, the judgment module 31 performs a first detection on the cigarette based on the image information of the cigarette; in response to the cigarette failing the first detection, the cigarette is identified as a candidate cigarette; and a second detection is performed on the candidate cigarette based on a machine learning model to determine whether the candidate cigarette is qualified.
[0074] In some embodiments, the machine learning model is trained by: extracting feature information of qualified cigarettes based on image information of qualified cigarettes, wherein qualified cigarettes are those that pass the first detection; and training the machine learning model using the feature information.
[0075] In some embodiments, the judgment module 31 determines the color information of a designated area of the cigarette based on the image information; and performs a first detection on the cigarette based on whether the color information meets the color requirements, with different types of cigarettes corresponding to different color requirements.
[0076] In some embodiments, the designated area includes the filter end and the body end of the cigarette.
[0077] In some embodiments, the same cigarette pack includes multiple cigarettes. The judgment module 31 extracts the overall contour information of the multiple cigarettes based on the image information of the multiple cigarettes in the same cigarette pack; and performs a first detection on the multiple cigarettes based on the overall contour information and the standard contour information.
[0078] In some embodiments, different types of cigarettes correspond to different standard profile information.
[0079] In some embodiments, the determination module 31 determines that multiple cigarettes have failed the first detection in response to the difference between the overall contour information and the standard contour information being greater than a difference threshold.
[0080] In some embodiments, the identification information includes QR code information.
[0081] It should be noted that the above modules are logical modules divided according to their specific functions, and are not used to restrict the specific implementation method. For example, they can be implemented in software, hardware, or a combination of software and hardware. In actual implementation, the above modules can be implemented as independent physical entities, or they can be implemented by a single entity (e.g., a processor (CPU or DSP, etc.), integrated circuit, etc.).
[0082] In some embodiments of this disclosure, the cigarette detection device may be presented as an electronic device. For example... Figure 4 As shown, Figure 4 Block diagrams showing some embodiments of the electronic devices disclosed herein.
[0083] The electronic device 4 includes a memory 41 and a processor 42. The memory 41 is coupled to the processor 42 and is used to store instructions. When the instructions are executed by the processor 42, the processor 42 performs the above-described cigarette detection method.
[0084] Memory 41 is used to store one or more computer-readable instructions. Memory 41 may include any combination of various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory, including but not limited to random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), and flash memory. Memory 41 may, for example, store operating systems, application programs, bootloaders, databases, and other programs, as well as various application programs and various data.
[0085] The processor 42 is configured to execute computer-readable instructions to implement the cigarette detection method of any of the foregoing embodiments. Specific implementations of each step of the method can be found in the above embodiments; repeated details will not be elaborated here.
[0086] Processor 42 can be configured to perform the steps described above. Processor 42 can be various processing devices, such as a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The central processing unit (CPU) can be an x86 or ARM architecture, etc.
[0087] The processor 42 and the memory 41 can communicate with each other directly or indirectly. For example, the processor 42 and the memory 41 can communicate via a network. The network can include a wireless network, a wired network, and / or any combination of wireless and wired networks. The processor 42 and the memory 41 can also communicate with each other via a system bus, which is not limited in this disclosure.
[0088] It should be noted that Figure 4 The components of the electronic device 4 shown are merely exemplary and not limiting. The electronic device 4 may have other components depending on the specific application requirements. The processor 42 can control other components in the electronic device 4 to perform desired functions.
[0089] In some embodiments, the processor 42 is coupled to the memory 41 via a BUS bus 43. The electronic device 4 can also be connected to an external storage device 45 via a storage interface 44 to access external data, and can also be connected to a network or another computer system (not shown) via a network interface 46. Further details are omitted here.
[0090] In other embodiments, a computer-readable storage medium is protected that stores computer program instructions that, when executed by a processor, implement the steps of the methods described above. Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, apparatus, 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.
[0091] In some embodiments, a computer program product is protected, comprising a computer program or instructions that, when executed by a processor, implement the methods described above. The computer program product includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. When the computer program is executed by a CPU, it performs the functions defined in the methods of embodiments of this disclosure.
[0092] In some embodiments, a computer program is protected, the computer program comprising: instructions that, when executed by a processor, cause the processor to perform the methods of any of the foregoing embodiments. For example, the instructions may be embodied in computer program code.
[0093] 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 will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, 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, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0094] 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.
[0095] 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.
[0096] This concludes the detailed description of the present disclosure. To avoid obscuring the concept of the disclosure, some details known in the art have not been described. Those skilled in the art will fully understand how to implement the technical solutions disclosed herein based on the above description.
[0097] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0098] While specific embodiments of this disclosure have been described in detail by way of example, 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 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 cigarettes, comprising: Based on the image information of the cigarette, determine whether the cigarette located at the first position in the conveying line is qualified; In response to the detection of a substandard cigarette, the identification information of the cigarette pack containing the substandard cigarette is stored; At a second position on the conveying line, the identification information of the cigarette pack is read to identify whether the cigarette pack contains the substandard cigarette. The second position is located downstream of the first position. In response to the detection that the cigarette pack contains the defective cigarette, the cigarette pack containing the defective cigarette is removed from the conveyor line.
2. The cigarette detection method according to claim 1, wherein, The step of determining whether a cigarette located at a first position in the conveying line is qualified based on the image information of the cigarette includes: Based on the image information of the cigarette, a first detection is performed on the cigarette; In response to the cigarette failing the first detection, the cigarette is identified as a candidate cigarette; Based on a machine learning model, a second detection is performed on the candidate cigarettes to determine whether the candidate cigarettes are qualified.
3. The cigarette detection method according to claim 2, wherein, The machine learning model was obtained through the following training: Based on the image information of the qualified cigarettes, the feature information of the qualified cigarettes is extracted, wherein the qualified cigarettes are those that have passed the first detection; The machine learning model is trained using the aforementioned feature information.
4. The cigarette detection method according to claim 2, wherein, The first detection of the cigarette based on the image information of the cigarette includes: Based on the image information, determine the color information of a designated area of the cigarette; The first detection is performed on the cigarette based on whether the color information meets the color requirements. Different types of cigarettes correspond to different color requirements.
5. The cigarette detection method according to claim 4, wherein, The designated area includes the filter end and the cigarette body end of the cigarette.
6. The cigarette detection method according to claim 2, wherein, A single pack of cigarettes contains multiple cigarettes. The first detection of the cigarette based on the image information of the cigarette includes: Based on the image information of multiple cigarettes in the same cigarette pack, the overall contour information of the multiple cigarettes is extracted; The first detection is performed on the plurality of cigarettes based on the overall contour information and the standard contour information.
7. The cigarette detection method according to claim 6, wherein, Different types of cigarettes correspond to different standard profile information.
8. The cigarette detection method according to claim 6, wherein, The first detection of the plurality of cigarettes based on the overall contour information and the standard contour information includes: If the difference between the overall contour information and the standard contour information is greater than a difference threshold, it is determined that the plurality of cigarettes have failed the first detection.
9. The cigarette detection method according to any one of claims 1-8, wherein, The identification information includes QR code information.
10. A cigarette detection device, comprising: The judgment module is configured to determine whether a cigarette located at the first position in the conveying line is qualified based on the image information of the cigarette. The storage module is configured to store the identification information of the cigarette pack containing the substandard cigarette in response to the detection of a substandard cigarette; A reading module is configured to read the identification information of a cigarette pack at a second position on the conveying line to identify whether the cigarette pack contains the substandard cigarettes, the second position being downstream of the first position; A removal module is configured to remove the cigarette pack containing the defective cigarette from the conveyor line in response to detecting that the cigarette pack contains the defective cigarette.
11. A cigarette detection device, comprising: Memory; and A processor coupled to the memory, the processor being configured to execute the cigarette detection method according to any one of claims 1-9 based on instructions stored in the memory.
12. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cigarette detection method according to any one of claims 1-9.
13. A computer program product comprising instructions that, when executed by a processor, cause the processor to perform the cigarette detection method according to any one of claims 1-9.