A cigarette identification and quantity counting method and system based on computer vision

By identifying and correlating the smoke surface, end face and special quadrilateral areas, the problem of lack of correlation mechanism in the identification and quantity statistics of smoke in the prior art is solved, and the identification and statistical effect of high accuracy and stability is achieved.

CN119048744BActive Publication Date: 2025-03-28SHENZHEN AIMALL TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411521052.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-28
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

Existing computer vision technology lacks an effective correlation mechanism when identifying and counting multifaceted objects such as smoke, resulting in repeated statistics or misjudgment of quantity, especially in complex environments that are inaccurate or missed in identification.

Method used

By identifying the smoke surface, end face and special quadrilateral area, and establishing a correlation mechanism for the special quadrilateral area, we can determine whether there are special quadrilateral areas related to the smoke surface and end face, and realize the unique relationship between the smoke surface and the end face.

Benefits of technology

It significantly improves the accuracy and stability of cigarette recognition, avoids repeated identification and missed identification, and improves the overall identification performance and accuracy of quantitative statistics of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048744B_ABST
    Figure CN119048744B_ABST
Patent Text Reader

Abstract

The present invention provides a method for cigarette identification and quantity counting based on computer vision, comprising the following steps: Step 1: Acquire and identify three types of target detection areas, distinguish different surfaces of cigarette cartons, including cigarette cartons, end surfaces and special quadrilateral areas; Step 2: Establish an association mechanism for special quadrilateral areas, and determine whether there are special quadrilateral areas related to cigarette cartons and end surfaces. The present invention automatically identifies cigarette cartons, end surfaces and special quadrilateral areas during the detection phase, and directly associates cigarette cartons with end surfaces based on quadrilateral areas, thereby avoiding repeated identification and missed identification. Through this association mechanism, the accuracy of cigarette cartons identification is significantly improved, and the overall recognition performance of the system is greatly improved; the present invention automatically associates cigarette cartons with end surfaces, and combines a scoring mechanism to screen product specifications. The present invention can accurately determine the uniqueness of each cigarette, improve the accuracy of quantity counting, and ensure the accuracy and reliability of the statistical results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a statistical method and a system thereof, in particular to a cigarette identification and quantity statistical method and a system thereof based on computer vision, belonging to the technical field of computer vision. Background Art

[0002] Computer vision is a field of artificial intelligence that aims to enable computers to observe and understand the world through vision, just like humans. It uses various imaging devices as input means and uses computers to replace the brain to complete processing and interpretation, thereby achieving a multi-dimensional understanding of images and videos.

[0003] In the field of cigarette carton identification and quantity counting, most of the current mainstream methods rely on image recognition of the carton surface and the end surface separately. Although such methods can accurately detect the features of a single surface, they often lack an effective association mechanism when dealing with multi-faceted objects such as cigarette cars, causing the system to identify multiple surfaces of the same cigarette carton as different cigarette cars, resulting in duplicate counting or misjudgment of quantity. Especially in large-scale statistical scenarios, such misidentification will significantly reduce the efficiency and accuracy of the system.

[0004] In addition, existing recognition methods show certain limitations when facing complex real-world environments. For example, in images taken at different angles, the cigarette strips and end faces are prone to inaccurate recognition or missed detection due to factors such as perspective, occlusion, and light reflection. This not only increases the difficulty of subsequent processing, but may also lead to insufficient robustness of the overall recognition system and inability to cope with diverse application scenarios. To this end, a cigarette recognition and quantity counting method based on computer vision and its system are proposed. Summary of the invention

[0005] In view of this, the present invention provides a cigarette identification and quantity counting method and system based on computer vision to solve or alleviate the technical problems existing in the prior art and at least provide a beneficial option.

[0006] The technical solution of the embodiment of the present invention is implemented as follows: A method for cigarette recognition and quantity counting based on computer vision comprises the following steps:

[0007] Step 1: Obtain and identify three types of target detection areas to distinguish different sides of the cigarette carton, including the cigarette carton side, the end side, and the special quadrilateral area;

[0008] Step 2: Establish an association mechanism for special quadrilateral regions to determine whether there are special quadrilateral regions related to the cigarette strip surface and the end surface;

[0009] Step 3: Establish a selection mechanism based on the product specification recognition score, score each face through the preset product specification recognition model, and select the face with the highest score as the final statistical result for the statistics of the number of cigarette cartons;

[0010] Step 4: Outputting the deduplicated cigarette carton quantity statistical result, wherein the cigarette carton quantity statistical result is based on the unique association between the cigarette carton surface and the end surface.

[0011] Further preferably, in step 1, the three types of target detection areas are the cigarette strip surface, the end surface and the special quadrilateral area;

[0012] The cigarette carton surface is the front or back of the cigarette carton package, the end surface is the top or bottom of the cigarette carton package, and the special quadrilateral area is a geometric area generated by marking the center points and vertices of the common edges of the cigarette carton surface and the end surface during training.

[0013] Further preferably, in step 1, the method for identifying the three types of target detection areas comprises the following steps:

[0014] Collecting cigarette image data, wherein the cigarette image data includes images of cigarette cartons of different brands, different angles, and different lighting conditions;

[0015] Accurately mark the cigarette strip surface, end surface and special quadrilateral area in each image;

[0016] Build an object detection model and train it using a deep learning algorithm;

[0017] Adjust learning rate, batch size, and optimizer parameters based on performance during training;

[0018] Use the validation set to evaluate the object detection model and calculate the accuracy, recall and F1 score;

[0019] After the model training is completed, it is deployed to the actual application scenario. The target detection model automatically identifies the cigarette strip surface, end surface and special quadrilateral area.

[0020] Further preferably, when detecting the special quadrilateral region, geometric information of the special quadrilateral region is generated by marking the center point and the vertices of the common sides;

[0021] During the model training process, the geometric information of special quadrilateral regions is used as an additional supervisory signal to guide the model to learn to identify special quadrilateral regions.

[0022] Further preferably, in step 2, the association mechanism of the special quadrilateral area ensures accurate inter-face association by training the marked vertices and center points. If the special quadrilateral area exists, the corresponding cigarette rod surface and the end surface are automatically associated into a complete cigarette rod.

[0023] Further preferably, in step three, a selection mechanism based on product specification recognition scores is established. On the basis of product specification recognition, scores are given to the cigarette carton surface and the end surface respectively. By comparing the recognition scores of the two surfaces, the surface with a higher score is selected as the final recognition result for counting the number of cigarette carton quantities.

[0024] Further preferably, the product specification recognition model is used to identify the brand, specification and related information of the cigarette cartons.

[0025] A cigarette recognition and quantity counting system based on computer vision, including an image acquisition module, a preprocessing module, a recognition and detection module, a judgment module, a product specification recognition module, a deduplication and counting module and a user interface;

[0026] The signal end of the image acquisition module is connected to the signal end of the preprocessing module, the signal end of the identification and detection module is respectively connected to the signal end of the preprocessing module and the signal end of the judgment module, the signal end of the product specification identification module is respectively connected to the signal end of the judgment module and the signal end of the deduplication and statistics module, and the signal end of the user interface is connected to the signal end of the deduplication and statistics module.

[0027] Further preferably, the image acquisition module is used to obtain image data of the cigarette;

[0028] The preprocessing module is used to preprocess the image acquired by the image acquisition module, including denoising, contrast enhancement and grayscale conversion;

[0029] The identification and detection module is used to identify the cigarette surface, end surface and special quadrilateral area of ​​the cigarette;

[0030] The judgment module is provided with a special quadrilateral region association mechanism for judging whether there is a special quadrilateral region associated with the cigarette rod surface and the end surface.

[0031] Further preferably, the deduplication and statistics module is used to output the statistical result of the number of cigarette cartons after deduplication according to the unique association between the cigarette cartons surface and the end surface;

[0032] The user interface is used to provide a user interaction interface and display image acquisition, processing results and statistical information.

[0033] The embodiment of the present invention has the following advantages due to the adoption of the above technical solution:

[0034] The present invention automatically identifies the cigarette carton surface, the end surface and the special quadrilateral area during the detection stage, and directly associates the cigarette carton surface with the end surface according to the quadrilateral area, thereby avoiding repeated identification and missed identification. Through this association mechanism, the cigarette carton identification accuracy is significantly improved, and the overall identification performance of the system is greatly improved;

[0035] The present invention automatically associates the cigarette carton surface with the end surface and combines the scoring mechanism to screen the specifications. The present invention can accurately determine the uniqueness of each cigarette carton, improve the accuracy of quantity statistics, and ensure the accuracy and reliability of the statistical results.

[0036] The present invention uses a deep learning target detection model combined with image enhancement and data expansion technology to enable the system to maintain a recognition accuracy of 93%-96% in complex environments, showing extremely strong robustness;

[0037] The present invention directly identifies the special quadrilateral area and realizes the automatic association between the face and the end face during the detection stage, thereby reducing the subsequent calculation steps, improving the overall processing speed, and ensuring efficient real-time recognition and statistics.

[0038] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A flowchart of the steps of the cigarette recognition and quantity counting method based on computer vision of the present invention;

[0041] Figure 2 The flowchart of the cigarette identification and quantity counting method based on computer vision of the present invention is as follows;

[0042] Figure 3 This is a flow chart of the product specification identification and scoring mechanism of the present invention;

[0043] Figure 4 This is a structural diagram of the cigarette recognition and quantity counting system based on computer vision of the present invention. DETAILED DESCRIPTION

[0044] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0045] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0046] In the prior art, in the identification and quantity counting of cigarette cartons, there are problems such as the inability to effectively associate the cigarette cartons with the end surfaces, repeated identification, and statistical errors; the cigarette cartons and the end surfaces of cigarette cartons are often identified independently, and there is a lack of an effective association mechanism for these two parts, which makes the system prone to false detection, missed detection, and repeated counting in complex scenarios;

[0047] For this reason, Figure 1-Figure 2 As shown, the embodiment of the present invention provides a method for cigarette recognition and quantity counting based on computer vision, comprising the following steps:

[0048] Step 1: Obtain and identify three types of target detection areas to distinguish different sides of the cigarette carton, including the cigarette carton side, the end side, and the special quadrilateral area;

[0049] Step 2: Establish an association mechanism for special quadrilateral regions to determine whether there are special quadrilateral regions related to the cigarette strip surface and the end surface;

[0050] Step 3: Establish a selection mechanism based on the product specification recognition score, score each face through the preset product specification recognition model, and select the face with the highest score as the final statistical result for the statistics of the number of cigarette cartons;

[0051] Step 4: Output the deduplicated cigarette carton count results. The cigarette carton count results are based on the unique association between the cigarette carton surface and the end surface. After the final identification result is confirmed through the product specification identification and scoring mechanism, the system will output the deduplicated cigarette carton count results. The statistical results are based on the unique association between the cigarette carton surface and the end surface, ensuring that each cigarette is only identified and counted once, avoiding the problems of duplicate counting and missing statistics.

[0052] In order to solve the problems existing in the prior art, the embodiment of the present invention provides a method for cigarette recognition and quantity counting based on computer vision and solves the problems through the above technical solution:

[0053] The present invention divides the cigarette carton recognition targets into three categories during the detection stage: the cigarette carton surface, the end surface and the special quadrilateral area. The special quadrilateral area is formed by marking the center points and common edge vertices of the cigarette carton surface and the end surface during training, and is automatically recognized during detection to ensure the direct association between the cigarette carton surface and the end surface. At the same time, the present invention also selects the side with a higher score as the final statistical result through the product specification recognition scoring mechanism, thereby improving the accuracy and stability of cigarette carton recognition. Through this improvement, the present invention can realize accurate and robust cigarette carton recognition and quantity statistics in complex environments, avoiding multiple recognitions of the same cigarette carton and recognition errors, and is suitable for automated detection and statistical scenarios in the tobacco industry.

[0054] In one embodiment, in step 1, the three types of target detection areas are the cigarette strip surface, the end surface and the special quadrilateral area;

[0055] The cigarette carton face is the front or back of the cigarette carton package, the end face is the top or bottom of the cigarette carton package, and the special quadrilateral region is a geometric region generated by marking the center points and vertices of the common edges of the cigarette carton face and the end face during training;

[0056] The method for identifying three types of target detection areas includes the following steps:

[0057] Collect cigarette image data, which includes cigarette images of different brands, different angles, and different lighting conditions;

[0058] Accurately mark the cigarette strip surface, end surface and special quadrilateral area in each image;

[0059] Build an object detection model and train it using a deep learning algorithm;

[0060] Adjust learning rate, batch size, and optimizer parameters based on performance during training;

[0061] Use the validation set to evaluate the object detection model and calculate the accuracy, recall and F1 score;

[0062] After the model training is completed, it is deployed to the actual application scenario. The target detection model automatically identifies the cigarette strip surface, end surface and special quadrilateral area;

[0063] When detecting a special quadrilateral region, the geometric information of the special quadrilateral region is generated by marking the center point and the vertices of the common sides;

[0064] During the model training process, the geometric information of the special quadrilateral region is used as an additional supervisory signal to guide the model to learn to identify the special quadrilateral region;

[0065] The target detection model is trained through a deep learning algorithm, which enables the system to automatically identify the cigarette carton surface, the end surface, and the special quadrilateral area between these surfaces during detection. This method can effectively distinguish the different surfaces of the cigarette carton and provide accurate input for subsequent association and statistics.

[0066] The present invention takes into account the application requirements in complex scenarios. For example, the recognition accuracy of cigarettes may be affected in poor lighting conditions, partial occlusion of cigarettes, or different shooting angles. To meet these challenges, the system uses a multi-layer neural network for training, combined with image enhancement and data expansion technology, so that the system can still maintain a high recognition accuracy in various complex scenarios.

[0067] In one embodiment, in step 2, the association mechanism of the special quadrilateral region ensures accurate association between faces by training the marked vertices and center points, and if the special quadrilateral region exists, the corresponding cigarette rod face and the end face are automatically associated into a complete cigarette rod;

[0068] This association mechanism based on special quadrilateral regions eliminates the complex steps of matching the cigarette strip surface and the end surface through post-geometric calculations in traditional methods, achieving more efficient and accurate association.

[0069] In one embodiment, in step three, a selection mechanism based on product specification recognition scores is established. On the basis of product specification recognition, scores are given to the cigarette carton surface and the end surface respectively. By comparing the recognition scores of the two surfaces, the surface with a higher score is selected as the final recognition result for counting the number of cigarette carton pieces. This can avoid misidentification caused by factors such as recognition angle and occlusion, thereby improving the accuracy and robustness of the system.

[0070] In one embodiment, the product specification recognition model is used to identify the brand, specification and related information of cigarette cartons. The product specification recognition model is a trained deep learning model that can recognize cigarettes of different brands and specifications.

[0071] A cigarette recognition and quantity counting system based on computer vision, including an image acquisition module, a preprocessing module, a recognition and detection module, a judgment module, a product specification recognition module, a deduplication and counting module and a user interface;

[0072] The signal end of the image acquisition module is connected to the signal end of the preprocessing module, the signal end of the recognition and detection module is respectively connected to the signal end of the preprocessing module and the signal end of the judgment module, the signal end of the product specification recognition module is respectively connected to the signal end of the judgment module and the signal end of the deduplication and statistics module, and the signal end of the user interface is connected to the signal end of the deduplication and statistics module.

[0073] The image acquisition module is used to obtain the image data of the cigarette to ensure that the image is clear and has sufficient resolution for subsequent image processing and analysis;

[0074] The preprocessing module is used to preprocess the images collected by the image acquisition module, including denoising, contrast enhancement and grayscale conversion, so as to improve the accuracy and efficiency of subsequent processing. It may also be necessary to perform operations such as image cropping and scaling to adapt to different image input formats.

[0075] The identification and detection module is used to identify the cigarette surface, end surface and special quadrilateral area of ​​the cigarette;

[0076] A special quadrilateral region association mechanism is provided in the judgment module, which is used to judge whether there is a special quadrilateral region associated with the cigarette strip surface and the end surface;

[0077] The deduplication and statistics module is used to output the statistical results of the number of cigarette strips after deduplication based on the unique association between the cigarette strip surface and the end surface;

[0078] The user interface is used to provide a user interaction interface and display image acquisition, processing results and statistical information.

[0079] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for cigarette identification and quantity counting based on computer vision, characterized in that: The following steps are involved: Step 1: Obtain and identify three types of target detection areas to distinguish different sides of the cigarette carton, including the cigarette carton side, the end side, and the special quadrilateral area; Step 2: Establish an association mechanism for special quadrilateral regions to determine whether there are special quadrilateral regions related to the cigarette strip surface and the end surface; Step 3: Establish a selection mechanism based on the product specification recognition score, score each face through the preset product specification recognition model, and select the face with the highest score as the final statistical result for the statistics of the number of cigarette cartons; Step 4: Outputting the deduplicated cigarette carton quantity statistical result, wherein the cigarette carton quantity statistical result is based on the unique association between the cigarette carton surface and the end surface; In step 1, the method for identifying the three types of target detection areas includes the following steps: Collecting cigarette image data, wherein the cigarette image data includes images of cigarette cartons of different brands, different angles, and different lighting conditions; Accurately mark the cigarette strip surface, end surface and special quadrilateral area in each image; Build an object detection model and train it using a deep learning algorithm; Adjust learning rate, batch size, and optimizer parameters based on performance during training; Use the validation set to evaluate the object detection model and calculate the accuracy, recall and F1 score; After the model training is completed, it is deployed to the actual application scenario. The target detection model automatically identifies the cigarette strip surface, end surface and special quadrilateral area; When detecting the special quadrilateral region, the geometric information of the special quadrilateral region is generated by marking the center point and the vertices of the common sides; During the model training process, the geometric information of special quadrilateral regions is used as an additional supervisory signal to guide the model to learn to identify special quadrilateral regions.

2. The method for cigarette identification and quantity counting based on computer vision according to claim 1, characterized in that: In step 1, the three types of target detection areas are the cigarette strip surface, the end surface and the special quadrilateral area; The cigarette carton surface is the front or back of the cigarette carton package, the end surface is the top or bottom of the cigarette carton package, and the special quadrilateral area is a geometric area generated by marking the center points and vertices of the common edges of the cigarette carton surface and the end surface during training.

3. The method for cigarette identification and quantity counting based on computer vision according to claim 1, characterized in that: In step 2, the association mechanism of the special quadrilateral area ensures accurate inter-face association by training the marked vertices and center points. If the special quadrilateral area exists, the corresponding cigarette rod surface and the end surface are automatically associated into a complete cigarette rod.

4. The method for cigarette identification and quantity counting based on computer vision according to claim 1, characterized in that: In step three, a selection mechanism based on product specification recognition scores is established. On the basis of product specification recognition, scores are given to the cigarette carton surface and the end surface respectively. By comparing the recognition scores of the two surfaces, the surface with a higher score is selected as the final recognition result for counting the number of cigarette carton quantities.

5. The method for cigarette identification and quantity counting based on computer vision according to claim 1, characterized in that: The product specification recognition model is used to identify the brand, specification and related information of the cigarette cartons.

6. A computer vision-based cigarette recognition and quantity counting system, applied to the computer vision-based cigarette recognition and quantity counting method as claimed in any one of claims 1 to 5, characterized in that: It includes image acquisition module, preprocessing module, recognition and detection module, judgment module, product specification recognition module, deduplication and statistics module and user interface; The signal end of the image acquisition module is connected to the signal end of the preprocessing module, the signal end of the identification and detection module is respectively connected to the signal end of the preprocessing module and the signal end of the judgment module, the signal end of the product specification identification module is respectively connected to the signal end of the judgment module and the signal end of the deduplication and statistics module, and the signal end of the user interface is connected to the signal end of the deduplication and statistics module.

7. The computer vision-based cigarette identification and quantity counting system according to claim 6, characterized in that: The image acquisition module is used to obtain image data of cigarettes; The preprocessing module is used to preprocess the image acquired by the image acquisition module, including denoising, contrast enhancement and grayscale conversion; The identification and detection module is used to identify the cigarette surface, end surface and special quadrilateral area of ​​the cigarette; The judgment module is provided with a special quadrilateral region association mechanism for judging whether there is a special quadrilateral region associated with the cigarette rod surface and the end surface.

8. The computer vision-based cigarette identification and quantity counting system according to claim 7, characterized in that: The deduplication and statistics module is used to output the statistical result of the number of cigarette cartons after deduplication according to the unique association between the cigarette cartons surface and the end surface; The user interface is used to provide a user interaction interface and display image acquisition, processing results and statistical information.

Citation Information

Patent Citations

  • Cigarette carton multi-surface detection and identification method and system in inventory or display scene

    CN114359172A