High-speed packaging unit control method and controller based on cigarette box appearance defect detection

By using a neural network model combined with a defect recognition method that takes lighting and imaging factors into consideration in cigarette box defect detection, the problems of false detection and missed detection under template matching are solved, achieving higher detection accuracy and cigarette box quality control.

CN119438228BActive Publication Date: 2025-09-05HEBEI BAISHA TOBACCO

Patent Information

Application Number
CN202411568835.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-09-05
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

The template matching method in the prior art is prone to false detection or missed detection in cigarette box defect detection, and has low detection accuracy.

Method used

A defect recognition method based on a neural network model is adopted, combining illumination uniformity, imaging clarity and imaging resolution. Defects are identified by acquiring the appearance image and imaging information of the cigarette box, and when defects are detected, the high-speed packaging unit is instructed to reject the cigarette box.

Benefits of technology

The accuracy of cigarette box defect detection is improved, false detection and missed detection are reduced, and the effectiveness of cigarette box quality control is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119438228B_ABST
    Figure CN119438228B_ABST
Patent Text Reader

Abstract

The present invention provides a control method and controller for a high-speed packaging machine based on cigarette case appearance defect detection. The method first obtains a cigarette case appearance image and imaging information of the image. The image and imaging information are then input into a pre-established defect recognition model to obtain a cigarette case appearance recognition result. The imaging information includes illumination uniformity, imaging clarity, and imaging resolution. If the current cigarette case appearance recognition result indicates a defect, the high-speed packaging machine is instructed to reject the cigarette case. By setting up a defect recognition model and simultaneously considering the effects of illumination uniformity, imaging clarity, and imaging resolution on defect detection, the method avoids false detections and missed detections caused by imaging factors, thereby effectively rejecting defective cigarette cases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent detection technology, and in particular relates to a high-speed packaging machine control method and a controller based on cigarette box appearance defect detection. Background Art

[0002] Packed cigarette inspection is an essential step in cigarette quality control, and packaging defect detection is a key step in quality control. Common cigarette box defects include dirty, damaged, scratched, wrinkled, peeling, glue spitting, overlapped corners, missing, wrinkled or torn boxes, and irregular shapes.

[0003] Currently, defect detection is typically performed using template matching. This requires the creation of a template library that stores templates tailored to different defects. However, this method can still lead to false detections or missed detections, resulting in low detection accuracy. Summary of the Invention

[0004] In view of this, the present invention provides a high-speed packaging unit control method and controller based on cigarette box appearance defect detection, aiming to solve the problem that the template matching method of the existing technology still has false detection or missed detection and low detection accuracy.

[0005] A first aspect of an embodiment of the present invention provides a high-speed packaging unit control method based on cigarette box appearance defect detection, comprising:

[0006] Acquire a cigarette box appearance image and imaging information of the cigarette box appearance image;

[0007] Inputting the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain the cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution;

[0008] When the appearance recognition result of the current cigarette box is that there is a defect, the high-speed packaging unit is instructed to reject the cigarette box.

[0009] A second aspect of an embodiment of the present invention provides a high-speed packaging unit control device based on cigarette box appearance defect detection, comprising:

[0010] An acquisition module, used for acquiring a cigarette box appearance image and imaging information of the cigarette box appearance image;

[0011] A recognition module is used to input the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution;

[0012] The indication module is used to instruct the high-speed packaging unit to reject the cigarette box when the appearance recognition result of the current cigarette box is that there is a defect.

[0013] The third aspect of an embodiment of the present invention provides a controller, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps of the high-speed packaging machine control method based on cigarette box appearance defect detection as described in the first aspect above are implemented.

[0014] A fourth aspect of an embodiment of the present invention provides an appearance inspection system, comprising the controller according to the third aspect above.

[0015] The fifth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the high-speed packaging machine control method based on cigarette box appearance defect detection as described in the first aspect above.

[0016] The control method and controller for a high-speed packaging machine based on cigarette box appearance defect detection provided by an embodiment of the present invention first obtains a cigarette box appearance image and imaging information of the cigarette box appearance image; then inputs the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity, and imaging resolution; and when the current cigarette box appearance recognition result indicates a defect, the high-speed packaging machine is instructed to reject the cigarette box. By setting a defect recognition model and simultaneously considering the effects of illumination uniformity, imaging clarity, and imaging resolution on defect detection, false detections and missed detections caused by imaging factors are avoided, thereby effectively rejecting defective cigarette boxes. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 This is a partial structural diagram of a high-speed packaging unit provided by an embodiment of the present invention;

[0019] Figure 2 This is a flow chart of an implementation method of a high-speed packaging unit control method based on cigarette box appearance defect detection provided by an embodiment of the present invention;

[0020] Figure 3 Schematic diagram of the structure of a high-speed packaging unit control device based on cigarette box appearance defect detection provided by an embodiment of the present invention;

[0021] Figure 4 It is a schematic structural diagram of a controller provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

[0023] Figure 1 FIG. 1 is a schematic diagram of a portion of the structure of a high-speed packaging machine provided by an embodiment of the present invention. Figure 1 As shown, in some embodiments, an appearance detection system 11 and a rejection actuator 12 are sequentially arranged on the conveyor belt of the high-speed packaging unit. When the appearance detection system 11 detects that there are defects in the appearance of the cigarette box, it sends an indication signal to the rejection actuator 12 to reject the cigarette box at the corresponding position. Figure 1 The figure is only an example of the present invention, and the setting position of the rejection actuator 12 depends on the detection speed of the appearance detection system 11 and the speed of the conveyor belt.

[0024] The appearance inspection system 11 includes at least one inspection camera and a controller. The controller receives images detected by the inspection camera, processes and analyzes them, and determines whether the cigarette box's appearance has defects. The appearance inspection system 11 can detect the appearance of the cigarette box in either a two-dimensional or three-dimensional form. For example, laser projectors and CCD cameras are positioned at different locations within the appearance inspection system, and triangulation is used to determine the three-dimensional point cloud data of the cigarette box.

[0025] Figure 2 This is a flow chart of the implementation of the high-speed packaging unit control method based on cigarette box appearance defect detection provided by the embodiment of the present invention. Figure 2 As shown, in some embodiments, a high-speed packaging machine control method based on cigarette box appearance defect detection includes:

[0026] S210, acquiring a cigarette box appearance image and imaging information of the cigarette box appearance image;

[0027] S220, inputting the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity, and imaging resolution;

[0028] S230: When the appearance recognition result of the current cigarette box indicates that the cigarette box has defects, instruct the high-speed packaging unit to reject the cigarette box.

[0029] In the embodiments of the present invention, image resolution can be directly obtained, and imaging clarity is calculated using the Tenengrad gradient function. The standard deviation of the cigarette pack pixels is divided by the pixel mean to define the illumination uniformity coefficient. A preliminary experiment is conducted to determine the standard illumination uniformity coefficient of an intact cigarette pack under a set illumination. During actual testing, the standard illumination uniformity coefficient is divided by the difference between the measured illumination uniformity coefficient and the standard illumination uniformity coefficient, and then normalized to obtain illumination uniformity. The more uneven the illumination, the greater the standard deviation, the greater the measured illumination uniformity coefficient, and the lower the calculated illumination uniformity.

[0030] In some embodiments, the defect recognition model includes a first encoder, a second encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; S220 includes: inputting the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time inputting the imaging information into the second encoder to obtain an imaging feature vector; inputting the first feature image and the imaging feature vector into the feature fusion module to obtain a fusion feature; inputting the fusion feature into the feature recognition module to obtain a cigarette box appearance recognition result.

[0031] In this embodiment of the present invention, the defect recognition model is specifically a neural network model. A first encoder extracts the cigarette package appearance image as an n×n feature matrix, and a second encoder extracts the imaging information as a 1×3 feature vector. The Euclidean norm of the feature vector is multiplied by the n×n feature matrix to obtain a fused feature. The decoder in the feature recognition module then decodes and classifies the fused feature to determine the cigarette package appearance recognition result.

[0032] In some embodiments, the defect recognition model includes a first encoder, a second encoder and a third encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are respectively connected to the third encoder; the first encoder and the third encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; S220 includes: inputting the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time inputting the imaging information into the second encoder to obtain an imaging feature vector; inputting the first feature image and the imaging feature vector into the third encoder to obtain a second feature image; inputting the first feature image and the second feature image into the feature fusion module to obtain a fusion feature; inputting the fusion feature into the feature recognition module to obtain a cigarette box appearance recognition result.

[0033] In this embodiment of the present invention, the defect recognition model is specifically a neural network model. The first encoder extracts the cigarette box appearance image as an n×n feature matrix, and the second encoder extracts the imaging information as a 1×3 feature vector. The third encoder then multiplies the Euclidean norm of the feature vector by the n×n feature matrix to produce a second feature image. The fusion module fuses the first and second feature images, and the decoder in the feature recognition module decodes and classifies the fused features to determine the cigarette box appearance recognition result.

[0034] In some embodiments, the first feature image and the second feature image are input into a feature fusion module to obtain a fused feature, including: multiplying the first feature image by a first weight matrix to obtain a first feature matrix; multiplying the second feature image by a second weight matrix to obtain a second feature matrix; adding the first feature matrices to obtain a fused feature; wherein the first weight matrix and the second weight matrix are determined based on the average pixel difference of the area where the pixel points in the first feature image are located and the average pixel difference of the area where the corresponding pixel points in the second feature image are located.

[0035] In an embodiment of the present invention, the eight pixels surrounding each pixel are the area of ​​the pixel. The average value of the difference between the pixels of these eight pixels and the pixel of the pixel is the average pixel difference. The first feature image and the second feature image are images of the same scale. The difference is that the second feature image further considers the influence of the imaging conditions. However, after adding the same imaging conditions, the introduced features will cover some of the original features to a certain extent. Therefore, the present invention considers the original features, i.e., the first feature image, and combines the second feature image with the imaging conditions in a weighted manner, so that the fused features can carry richer image information, thereby improving the detection accuracy.

[0036] In some embodiments, the method further includes: sending a stop signal to the high-speed packaging unit when the number of continuously rejected cigarette boxes reaches a preset number.

[0037] In some embodiments, obtaining the cigarette box appearance image includes: obtaining an initial cigarette box appearance image; and performing binarization processing on the initial cigarette box appearance image to obtain the cigarette box appearance image.

[0038] In some embodiments, before acquiring the cigarette box appearance image, the method further includes: extracting the cigarette box edge of the cigarette box appearance image, and filtering the cigarette box appearance image to remove background and interference on the cigarette box.

[0039] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0040] Figure 3 FIG. 1 is a schematic diagram of the structure of a high-speed packaging unit control device based on cigarette box appearance defect detection according to an embodiment of the present invention. Figure 3 As shown, in some embodiments, the high-speed packaging unit control device 3 based on cigarette box appearance defect detection includes:

[0041] An acquisition module 310 is configured to acquire an appearance image of a cigarette box and imaging information of the appearance image of the cigarette box;

[0042] The recognition module 320 is used to input the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity, and imaging resolution;

[0043] The instruction module 330 is used to instruct the high-speed packaging unit to reject the cigarette box when the appearance recognition result of the current cigarette box is that there is a defect.

[0044] Optionally, the defect recognition model includes a first encoder, a second encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; the recognition module 320 is used to: input the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time input the imaging information into the second encoder to obtain an imaging feature vector; input the first feature image and the imaging feature vector into the feature fusion module to obtain a fusion feature; input the fusion feature into the feature recognition module to obtain a cigarette box appearance recognition result.

[0045] Optionally, the defect recognition model includes a first encoder, a second encoder and a third encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are respectively connected to the third encoder; the first encoder and the third encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; the recognition module 320 is used to: input the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time input the imaging information into the second encoder to obtain an imaging feature vector; input the first feature image and the imaging feature vector into the third encoder to obtain a second feature image; input the first feature image and the second feature image into the feature fusion module to obtain a fusion feature; input the fusion feature into the feature recognition module to obtain a cigarette box appearance recognition result.

[0046] Optionally, the recognition module 320 is used to: multiply the first feature image by the first weight matrix to obtain a first feature matrix; multiply the second feature image by the second weight matrix to obtain a second feature matrix; add the first feature matrices to obtain a fusion feature; wherein the first weight matrix and the second weight matrix are determined based on the average pixel difference of the area where the pixel points in the first feature image are located and the average pixel difference of the area where the corresponding pixel points in the second feature image are located.

[0047] Optionally, the device further comprises an alarm module for sending a stop signal to the high-speed packaging unit when the number of continuously rejected cigarette boxes reaches a preset number.

[0048] Optionally, the acquisition module 310 is configured to: acquire an initial cigarette box appearance image; and perform binarization processing on the initial cigarette box appearance image to obtain a cigarette box appearance image.

[0049] Optionally, the device further includes: a processing module for extracting the cigarette box edge of the cigarette box appearance image, and filtering the cigarette box appearance image to remove background and interference on the cigarette box.

[0050] The high-speed packaging machine control device based on cigarette box appearance defect detection provided in this embodiment can be used to execute the above method embodiments. Its implementation principles and technical effects are similar and will not be described in detail in this embodiment.

[0051] Figure 4 Schematic diagram of the structure of the controller provided by the embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides a controller 4, which includes a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned embodiments of the LLC-based output voltage calibration method are implemented, such as Figure 2 Alternatively, when the processor 40 executes the computer program 42, the functions of the modules / units in the above-mentioned system embodiments are realized, for example Figure 3 The functions of each module are shown.

[0052] Exemplarily, the computer program 42 may be divided into one or more modules / units, one or more of which are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the controller 4.

[0053] The controller 4 may be a mobile phone, MCU, ECU, industrial computer, etc., which is not limited here. The controller 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that Figure 4 This is only an example of the controller 4 and does not constitute a limitation on the controller 4. The controller may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the controller may also include input and output devices, network access devices, buses, etc.

[0054] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0055] The memory 41 can be an internal storage unit of the controller 4, such as the hard disk or memory of the controller 4. The memory 41 can also be an external storage device of the controller 4, such as a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the controller 4. Furthermore, the memory 41 can include both the internal storage unit of the controller 4 and an external storage device. The memory 41 is used to store computer programs and other programs and data required by the controller. The memory 41 can also be used to temporarily store data that has been output or is about to be output.

[0056] An embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned LLC-based output voltage calibration method embodiment are implemented.

[0057] The computer-readable storage medium stores a computer program 42, which includes program instructions. When the program instructions are executed by the processor 40, all or part of the process of the method in the above embodiment is implemented. The computer program 42 can also be used to instruct related hardware to complete the process. The computer program 42 can be stored in a computer-readable storage medium. When the computer program 42 is executed by the processor 40, it can implement the steps of each of the above method embodiments. Among them, the computer program 42 includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.

[0058] The computer-readable storage medium may be an internal storage unit of the controller of any of the aforementioned embodiments, such as a hard disk or memory of the controller. The computer-readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk equipped on the controller, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the controller and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the controller. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0059] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0060] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0061] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0062] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0063] In the embodiments provided by the present invention, it should be understood that the disclosed devices / controllers and methods can be implemented in other ways. For example, the device / controller embodiments described above are merely schematic. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0064] Units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0065] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0066] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Computer-readable media may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0067] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A high-speed packaging unit control method based on cigarette box appearance defect detection, characterized in that: include: Acquiring a cigarette box appearance image and imaging information of the cigarette box appearance image; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity, and imaging resolution; When the appearance recognition result of the current cigarette box is that there is a defect, the high-speed packaging unit is instructed to reject the cigarette box; The defect recognition model includes a first encoder, a second encoder, a feature fusion module and a feature recognition module; The first encoder and the second encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result, including: Inputting the cigarette box appearance image into a first encoder to obtain a first feature image, and simultaneously inputting the imaging information into a second encoder to obtain an imaging feature vector; Inputting the first feature image and the imaging feature vector into a feature fusion module to obtain a fusion feature; The fused features are input into a feature recognition module to obtain a cigarette box appearance recognition result.

2. A high-speed packaging unit control method based on cigarette box appearance defect detection, characterized in that: include: Acquiring a cigarette box appearance image and imaging information of the cigarette box appearance image; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity, and imaging resolution; When the appearance recognition result of the current cigarette box is that there is a defect, the high-speed packaging unit is instructed to reject the cigarette box; The defect recognition model includes a first encoder, a second encoder, a third encoder, a feature fusion module and a feature recognition module; The first encoder and the second encoder are respectively connected to the third encoder; the first encoder and the third encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result, including: Inputting the cigarette box appearance image into a first encoder to obtain a first feature image, and simultaneously inputting the imaging information into a second encoder to obtain an imaging feature vector; Inputting the first feature image and the imaging feature vector into the third encoder to obtain a second feature image; Inputting the first feature image and the second feature image into a feature fusion module to obtain a fusion feature; The fused features are input into a feature recognition module to obtain a cigarette box appearance recognition result.

3. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 2 is characterized in that: Inputting the first feature image and the second feature image into a feature fusion module to obtain fusion features includes: Multiplying the first feature image by a first weight matrix to obtain a first feature matrix; Multiplying the second feature image by a second weight matrix to obtain a second feature matrix; Adding the first feature matrix and the second feature matrix to obtain the fusion feature; The first weight matrix and the second weight matrix are determined according to the average pixel difference of the area where the pixel points in the first feature image are located and the average pixel difference of the area where the corresponding pixel points in the second feature image are located.

4. The high-speed packaging machine control method based on cigarette box appearance defect detection according to claim 1 or 2, characterized in that: The method further comprises: When the number of cigarette boxes continuously rejected reaches a preset number, a stop signal is sent to the high-speed packaging unit.

5. The high-speed packaging machine control method based on cigarette box appearance defect detection according to claim 1 or 2, characterized in that: Obtain cigarette box appearance images, including: Obtaining an initial cigarette box appearance image; The initial cigarette box appearance image is binarized to obtain a cigarette box appearance image.

6. The high-speed packaging machine control method based on cigarette box appearance defect detection according to claim 1 or 2, characterized in that: After acquiring the cigarette box appearance image, the method further includes: The cigarette box edge of the cigarette box appearance image is extracted, and the cigarette box appearance image is filtered to remove background and interference on the cigarette box.

7. A controller comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the high-speed packaging machine group control method based on cigarette box appearance defect detection as described in any one of claims 1 to 6 are implemented.

8. An appearance inspection system, characterized in that: Comprising the controller as claimed in claim 7 above.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the high-speed packaging machine group control method based on cigarette box appearance defect detection as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Cigarette case defect detection method, device, equipment and medium

    CN114708214A

Cited By

  • Digital measuring tool library construction method and visual data tracing method and device for cigarette box defect detection equipment

    CN120766063A