Automatic cigarette recognition system based on image recognition

Through the automatic cigarette recognition system based on image recognition, using YOLOv8 model and three-dimensional modeling, combined with data parallel processing, the problem of insufficient cigarette recognition accuracy and efficiency of customs security inspection equipment is solved, and efficient and accurate cigarette recognition and automatic cigarette recognition are achieved The alarm meets the needs of large-scale security inspections.

CN119206581APending Publication Date: 2024-12-27SHENZHEN MICRO STORAGE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411295923.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing customs security inspection equipment relies on object density judgment in cigarette recognition, resulting in insufficient recognition accuracy and efficiency, prone to false alarms and missed alarms, and manual identification is time-consuming and labor-intensive, making it difficult to meet the needs of large-scale security inspections.

Method used

The cigarette automatic recognition system based on image recognition is adopted, and the cigarette images are trained and logically inferred through the YOLOv8 model, combined with three-dimensional modeling and data parallel processing, to improve the recognition accuracy and efficiency, and automatically trigger the alarm program through the final feedback module.

Benefits of technology

It realizes more accurate cigarette identification, improves security inspection efficiency and response speed, reduces dependence on the experience level of security inspection personnel, meets the needs of large-scale security inspections, and promptly notifies security inspection personnel through automatic alarm procedures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206581A_ABST
    Figure CN119206581A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of security inspection and identification, and discloses an automatic cigarette identification system based on image identification, which comprises an image acquisition module for acquiring video stream information at a DVI interface of security inspection equipment, a data processing module, a logic inference module for constructing a YOLOv8 model to train a cigarette image data set, and an image identification module for identifying a cigarette image. And the constructed YOLOv8 model is used for carrying out logic inference on the image received in the image acquisition module, and finally the result is fed back to the module. The environment simulation module is arranged, three-dimensional information of cigarettes can be input in a three-dimensional modeling scanning mode, whether the cigarettes exist in a current X-ray scanning image or not is judged by taking the input three-dimensional image information as one of confidence identification standards, and meanwhile, according to the test requirement of a YOLOv8 model, the three-dimensional information of the cigarettes can be obtained. According to the technical scheme, the environment simulation module can be used for generating the picture containing the cigarettes randomly, and the YOLOv8 model is trained according to the picture, so that the identification process of the technical scheme for the cigarettes is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of security inspection and identification, and in particular to an automatic cigarette identification system based on image recognition. Background Art

[0002] Security identification generally refers to the use of technology to verify and identify the identity of individuals or items during security checks, which can include ensuring security through scanning ID cards, facial recognition, fingerprint recognition, etc. These technologies help improve security and prevent prohibited items from entering restricted areas.

[0003] For storage spaces such as suitcases or packaging bags that people carry with them, it is often necessary to use an X-ray machine to obtain the original image of the items inside the suitcase, and then determine whether there are prohibited items in the storage space based on the image information.

[0004] However, in actual use, current customs security inspection equipment usually relies on object density to make judgments in cigarette identification, but there are limitations in recognition accuracy and efficiency, resulting in false alarms and missed reports. In addition, opening suitcases or packaging bags separately for further manual identification is time-consuming and labor-intensive, and is easily affected by the experience level of security personnel, making it difficult to meet the needs of large-scale security inspections. In view of this, we propose an automatic cigarette recognition system based on image recognition. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides an automatic cigarette identification system based on image recognition, which solves the problem that the current customs security inspection equipment in the prior art usually relies on the density of objects to make judgments in cigarette identification, and has limitations in recognition accuracy and efficiency.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: an automatic cigarette identification system based on image recognition, comprising the following modules:

[0007] Image acquisition module: obtains the video stream information at the DVI interface of the security inspection equipment, and pre-processes the obtained video information before transmitting it to the data processing module and the logic inference module;

[0008] Data processing module: Build a YOLOv8 model to train the cigarette image dataset, and improve recognition accuracy and speed through performance tuning and processing optimization;

[0009] Logical inference module: Use the constructed YOLOv8 model to perform logical inference on the images received in the image acquisition module, and generate inference results based on confidence information and annotation information;

[0010] Final feedback module: Determines whether to execute the alarm procedure based on the confidence information and annotation information in the logical inference module.

[0011] Preferably, the image acquisition module includes a digital interface module, an image preprocessing module and an image cache module. The digital interface module is responsible for connecting to the DVI interface of the security inspection equipment, acquiring video stream information in real time, and verifying whether there is any abnormality in the interface. The image preprocessing module performs denoising and enhancement preprocessing operations on the acquired video information. The image cache module is used to temporarily store the preprocessed image data so that the data processing module and the logic inference module can access the image data.

[0012] Preferably, the data processing module includes a training optimization module, an environment simulation module and a model storage module. The training optimization module is responsible for constructing, training and performance tuning the YOLOv8 model, and the model storage module is used to save the trained model parameters and related configuration information, and store the independently constructed related configuration information in an independent file.

[0013] Preferably, the environment simulation module is used to simulate different security scanning equipment environments, and input three-dimensional model data of cigarettes in different states through three-dimensional scanning technology.

[0014] Preferably, the environment simulation module can also generate random-style cigarette images at any position in any group of images using a random algorithm according to the constructed YOLOv8 model test requirements, and transmit the image group containing the cigarette images to the training optimization module for model training.

[0015] Preferably, the logic inference module includes a confidence calculation module and a result generation module. The confidence calculation module is responsible for analyzing the confidence output by the YOLOv8 model to determine whether the recognition confidence of the cigarette in the image reaches a preset threshold. The result generation module generates the final inference result based on the analysis result of the confidence calculation module and the annotation information.

[0016] Preferably, the confidence calculation module uses a Softmax function to perform confidence calculation, and the confidence threshold range in the execution calculation module supports manual custom setting and division.

[0017] Preferably, the confidence calculation module adopts a data parallel processing flow, and after obtaining the scanned image, it divides the area according to the image size, and after the parallel partitions have completed the scan confidence judgment, the data is summarized and the division edge line is re-scanned.

[0018] Preferably, the final feedback module includes an alarm control module and a user interaction module. The alarm control module is responsible for determining whether to trigger the alarm program based on the inference results of the logic inference module and a preset threshold. If the recognition confidence reaches the threshold, the alarm program is executed and the corresponding alarm equipment is started, including alarm bells, lights, and voice alarms. The user interaction module provides an operating interface for the system for security personnel to view the inference results, alarm information, and perform system settings and parameter adjustments.

[0019] Preferably, the alarm control module is connected to the alarm system interface of the security inspection equipment, and can receive alarm instructions in real time and execute corresponding alarm procedures. At the same time, the alarm control module also has a self-checking function and supports automatic self-checking according to a set time plan.

[0020] The present invention provides an automatic cigarette identification system based on image recognition, which has the following beneficial effects:

[0021] 1. The present invention can input the three-dimensional information of cigarettes by means of three-dimensional modeling and scanning through the environment simulation module, and judge whether there are cigarettes in the current X-ray scanned image based on the input three-dimensional image information as one of the confidence recognition criteria. At the same time, according to the YOLOv8 model test requirements, the environment simulation module can be used to generate random images containing cigarettes, and the YOLOv8 model can be trained based on this, so that the identification process of cigarettes in this technical solution is more accurate.

[0022] 2. The present invention can greatly improve the image processing speed and reduce the processing time of a single image by adopting data parallel processing in the process of image recognition, thereby improving the response speed and efficiency of the overall system, and performing secondary scanning detection on the image division edge line to avoid the cigarette image being segmented and unrecognizable due to image segmentation. In addition, data parallel processing enables the system to process multiple image areas at the same time, significantly shortening the waiting time and making the security inspection process smoother.

[0023] 3. The final feedback module set in the present invention can automatically trigger the alarm program according to the image recognition results and the preset threshold, and promptly notify the security personnel to conduct further inspections, thereby improving the efficiency and accuracy of security inspections. At the same time, the user interaction module provides an intuitive operation interface for security personnel, which is convenient for them to view the inference results, alarm information, and perform system settings and parameter adjustments, thereby reducing the dependence on the experience level of security personnel and ensuring that large-scale security inspection needs are met. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is the flowchart of the automatic cigarette identification system based on image recognition;

[0025] Figure 2is a schematic diagram of an image acquisition module of the present invention;

[0026] Figure 3 It is a schematic diagram of a data processing module of the present invention;

[0027] Figure 4 It is a schematic diagram of a logic inference module of the present invention;

[0028] Figure 5 It is a schematic diagram of the final feedback module of the present invention;

[0029] Figure 6 It is a schematic diagram of the identification process of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] Example:

[0032] Please see attached Figure 1 -Attached Figure 6 The embodiment of the present invention provides a cigarette automatic identification system based on image recognition, comprising the following modules:

[0033] Image acquisition module: obtains the video stream information at the DVI interface of the security inspection equipment, and pre-processes the obtained video information before transmitting it to the data processing module and the logic inference module;

[0034] Data processing module: Build a YOLOv8 model to train the cigarette image dataset, and improve recognition accuracy and speed through performance tuning and processing optimization;

[0035] Logical inference module: Use the constructed YOLOv8 model to perform logical inference on the images received in the image acquisition module, and generate inference results based on confidence information and annotation information;

[0036] Final feedback module: Determines whether to execute the alarm procedure based on the confidence information and annotation information in the logical inference module.

[0037] The image acquisition module includes a digital interface module, an image preprocessing module and an image cache module. The main responsibility of the digital interface module is to connect to the DVI interface of the security inspection equipment, obtain video stream information in real time, and verify whether there is an abnormality in the interface. This process ensures the stability and reliability of data transmission. The image preprocessing module performs a series of processing operations on the video information obtained from the digital interface module, including but not limited to denoising and enhanced preprocessing. The denoising operation is intended to remove noise in the video information and improve image quality, while the enhanced preprocessing further optimizes the image to make it more suitable for subsequent analysis and processing. The image cache module is used to temporarily store the preprocessed image data and provide a convenient access path for the data processing module and the logic inference module. In this way, the image cache module ensures that the data processing module and the logic inference module can efficiently access and process the image data, thereby improving the processing speed and efficiency of the entire system. At the same time, in order to improve the image recognition accuracy, the system will adopt multi-projection technology, that is, to simultaneously obtain multi-angle projection images for synchronous recognition to increase the final recognition accuracy of the image.

[0038] The data processing module is mainly composed of three sub-modules: training optimization module, environment simulation module and model storage module. The core task of the training optimization module is to build, comprehensively train and carefully tune the performance of the YOLOv8 model. This process involves the design of the model architecture, parameter initialization, loss function selection and application of optimization algorithms. Through this series of steps, the training optimization module can ensure that the YOLOv8 model performs well in various application scenarios and achieves the expected accuracy and speed requirements. In the early stage of YOLOv8 model training, the simulated images simulated in the environment simulation module are first used for model training to perform preliminary optimization and calibration of the model. After the preliminary optimization and calibration is completed, it is necessary to collect data with a real scene confidence of more than 50 to supplement and improve the data set.

[0039] The environment simulation module is responsible for creating a virtual environment that is as similar as possible to the actual application environment, so as to facilitate the simulation and testing of various scenarios during the model training process. In this way, potential problems can be discovered and solved in advance, thereby improving the robustness and adaptability of the model in the real environment. The environment simulation module not only includes data generation and enhancement technology, but may also involve simulating different lighting conditions, occlusion, background noise and other factors to ensure that the model can maintain good performance under various complex conditions.

[0040] The main responsibility of the model storage module is to save the trained model parameters and related configuration information. This module ensures the reproducibility and portability of the model, allowing the model to run seamlessly on different devices and platforms. For ease of management and use, the model storage module also stores the independently constructed related configuration information in the form of independent files. In this way, users can easily call and modify these configuration files as needed, thereby achieving further optimization and customization of the model.

[0041] The main function of the environmental simulation module is to accurately simulate various types of security scanning equipment environments. It uses advanced 3D scanning technology to enter and record in detail the 3D model data of cigarette products in various states. In addition, for different styles of cigarettes, the environmental simulation module will synchronously store their 3D data. The environmental simulation module can also simulate various complex backgrounds and interference factors, such as occlusion by other objects, to ensure that the model has higher accuracy and robustness in actual applications. These data include not only the appearance characteristics of cigarettes, but also their performance in different environments, thereby providing a more accurate reference for security equipment.

[0042] In addition, the environmental simulation module also has powerful image generation capabilities. Based on the needs of the constructed YOLOv5 target detection model, it uses a random algorithm to generate various random styles of cigarette images at any position in any group of images. The generation of these images is highly randomized and can simulate various possible states of cigarettes in different environments and at different angles. The generated image group will then be transmitted to the training optimization module for further model training and optimization process. In this way, the model can better identify and detect cigarettes in various states, thereby improving the accuracy and efficiency of security scanning equipment.

[0043] The logic inference module includes a confidence calculation module and a result generation module. The confidence calculation module is responsible for analyzing the confidence of the output of the YOLOv8 model to determine whether the recognition confidence of the cigarette in the image reaches a preset threshold. The result generation module generates the final inference result based on the analysis result of the confidence calculation module and the annotation information. The optimized model is embedded in the internal system of the X-ray machine, thereby realizing the real-time recognition function of cigarettes. This function enables the X-ray machine to continuously capture images in the monitoring area and analyze the captured images through the YOLOv8 model. When the X-ray machine captures cigarettes in the image, the system automatically identifies the category of the object and marks the cigarette with a highlighted border in real time on the image. More importantly, when the system identifies the object in the image as a cigarette, it will immediately trigger an automated voice alarm prompt, which will issue a clear warning to the monitoring personnel or other relevant personnel, informing them that cigarettes appear in the monitoring area, thereby ensuring that relevant personnel can take appropriate measures in a timely manner. This combination of real-time recognition and automatic alarm greatly improves the efficiency and response speed of the monitoring system, ensuring rapid response and management of specific items such as cigarettes. The verified YOLOv8 model also supports installation in different models of X-ray detection equipment using embedded technology, further improving the intelligence level of security inspection equipment.

[0044] The confidence calculation module uses the Softmax function to perform confidence calculation, and the confidence threshold range in the confidence calculation module supports manual custom setting and division;

[0045] The calculation process is as follows:

[0046] Assume that the output layer of the model has K neurons, each neuron corresponds to the original score z of a category i (e.g., Category 1, Category 2, ... Category K)

[0047] For each raw score z i Apply the exponential function and calculate its exponential value:

[0048]

[0049] Compute the sum of the index values ​​for all categories:

[0050]

[0051] For each category i, calculate its probability P(y i ):

[0052]

[0053] At this time, the maximum probability value of the output can be used as the confidence level:

[0054] Confidence=max(P(y i ))

[0055] Where: z i is the raw score of the i-th class;

[0056] P(y i ) is the corresponding confidence level;

[0057] The confidence calculation module adopts a data parallel processing flow internally. Specifically, after receiving the scanned image, the module will divide the area into fixed sizes according to the size of the image. Each parallel partition will independently complete the scanning confidence judgment of its own area. After the judgment of all partitions is completed, the system will summarize these data to ensure the accuracy of the overall confidence calculation result. In addition, in order to further improve the accuracy of the confidence judgment, the system will also conduct a review scan on the dividing edge line to ensure that there will be no omissions or errors in the confidence judgment of the image dividing edge area. At the same time, for independent areas or continuous areas with abnormalities (located in the dividing edge area), the corresponding confidence information will be reported to the area. Through this detailed area division and review scan, the confidence calculation module can effectively improve the accuracy and reliability of the overall confidence judgment, thereby achieving an image processing capability of up to 60 frames per second, ensuring that cigarettes can still be accurately identified in high-speed passing scenarios.

[0058] In this system, the final feedback module consists of two main parts: the alarm control module and the user interaction module; the main responsibility of the alarm control module is to determine whether the alarm program needs to be triggered based on the inference results of the logical inference module and the preset threshold. Specifically, when the recognition confidence reaches the set threshold, the alarm control module will immediately execute the alarm program and start a series of corresponding alarm devices. These devices include but are not limited to alarm bells, lights, and voice alarm systems to ensure that relevant personnel can be effectively notified at critical moments. At the same time, the user interaction module is responsible for providing an intuitive operation interface for security personnel to view inference results, alarm information, and perform system settings and parameter adjustments. Through this interface, security personnel can easily monitor the system status and make corresponding operations and adjustments in a timely manner.

[0059] In addition, the alarm control module is also connected to the alarm system interface of the security inspection equipment to ensure that it can receive the alarm instructions from the security inspection equipment in real time and quickly execute the corresponding alarm program. This real-time connection ensures the efficient response capability of the system and can respond in the shortest time. In order to further improve the reliability and stability of the system, the alarm control module also has a self-check function, which means that it can perform self-checks regularly to ensure that all components and functions are in normal working condition. In addition, the alarm control module also supports automatic self-checking according to the set time plan, which can further reduce human intervention and improve the automation level of the system. Through this self-check mechanism, the system can perform its alarm function more reliably at critical moments to ensure the smooth progress of security inspection work.

[0060] In addition, the final recognition system can be used as an embedded module and installed in different X-ray machines for use. Its recognition target can also be reset according to specific recognition requirements and retrained according to the above process.

[0061] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An automatic cigarette identification system based on image recognition, characterized in that: Includes the following modules: Image acquisition module: obtains the video stream information at the DVI interface of the security inspection equipment, and pre-processes the obtained video information before transmitting it to the data processing module and the logic inference module; Data processing module: Build a YOLOv8 model to train the cigarette image dataset, and improve recognition accuracy and speed through performance tuning and processing optimization; Logical inference module: Use the constructed YOLOv8 model to perform logical inference on the images received in the image acquisition module, and generate inference results based on confidence information and annotation information; Final feedback module: Determines whether to execute the alarm procedure based on the confidence information and annotation information in the logical inference module.

2. The automatic cigarette identification system based on image recognition according to claim 1, characterized in that: The image acquisition module includes a digital interface module, an image preprocessing module and an image cache module. The digital interface module is responsible for connecting to the DVI interface of the security inspection equipment, acquiring video stream information in real time, and verifying whether there is any abnormality in the interface. The image preprocessing module performs denoising and enhancement preprocessing operations on the acquired video information. The image cache module is used to temporarily store the preprocessed image data so that the data processing module and the logic inference module can access the image data.

3. The automatic cigarette identification system based on image recognition according to claim 1, characterized in that: The data processing module includes a training optimization module, an environment simulation module and a model storage module. The training optimization module is responsible for building, training and performance tuning the YOLOv8 model. The model storage module is used to save the trained model parameters and related configuration information, and store the independently constructed related configuration information in an independent file.

4. The automatic cigarette identification system based on image recognition according to claim 3, characterized in that: The environment simulation module is used to simulate different security inspection scanning equipment environments and input three-dimensional model data of cigarettes in different states through three-dimensional scanning technology.

5. The automatic cigarette identification system based on image recognition according to claim 3, characterized in that: The environment simulation module can also generate random-style cigarette images at any position in any group of images using a random algorithm according to the test requirements of the constructed YOLOv8 model, and transmit the image group containing the cigarette images to the training optimization module for model training.

6. The automatic cigarette identification system based on image recognition according to claim 1, characterized in that: The logic inference module includes a confidence calculation module and a result generation module. The confidence calculation module is responsible for analyzing the confidence output by the YOLOv8 model to determine whether the recognition confidence of the cigarette in the image reaches a preset threshold. The result generation module generates the final inference result based on the analysis result of the confidence calculation module and the annotation information.

7. The automatic cigarette identification system based on image recognition according to claim 6, characterized in that: The confidence calculation module uses the Softmax function to perform confidence calculation, and the confidence threshold range in the execution calculation module supports manual custom setting and division.

8. The automatic cigarette identification system based on image recognition according to claim 6, characterized in that: The confidence calculation module adopts a data parallel processing flow, and after obtaining the scanned image, it divides the area according to the image size. After the parallel partitions complete the scan confidence judgment, the data is summarized and the division edge line is rechecked and scanned.

9. The automatic cigarette identification system based on image recognition according to claim 1, characterized in that: The final feedback module includes an alarm control module and a user interaction module. The alarm control module is responsible for determining whether to trigger the alarm program based on the inference results of the logic inference module and a preset threshold. If the recognition confidence reaches the threshold, the alarm program is executed and the corresponding alarm equipment is started, including alarm bells, lights, and voice alarms. The user interaction module provides an operating interface for the system for security personnel to view the inference results, alarm information, and perform system settings and parameter adjustments.

10. The automatic cigarette identification system based on image recognition according to claim 9, characterized in that: The alarm control module is connected to the alarm system interface of the security inspection equipment, and can receive alarm instructions in real time and execute corresponding alarm procedures. At the same time, the alarm control module also has a self-checking function and supports automatic self-checking according to the set time plan.