Grain depot personnel smoking behavior detection method and system

CN119693969APending Publication Date: 2025-03-25DALIAN OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411741404.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the grain warehouse environment, the existing smoking behavior detection system has problems of misjudgment and low detection accuracy, especially in the case of background interference, low resolution and small targets.

Method used

Using a method combining personnel target detection technology and cigarette support target detection technology, the TD-YOLO and SB-YOLO models are introduced by improving the YOLOv8 model, introducing the Triplet attention mechanism and lightweight and efficient dynamic upsampling, and a TD-YOLO and SB-YOLO models are constructed to conduct real-time and accurate detection of the smoking behavior of grain warehouse personnel.

Benefits of technology

It significantly improves the detection accuracy and stability in complex environments, reduces the impact of background interference, and enhances the detection ability of low resolution and small targets, achieving real-time and accurate detection of smoking behavior in grain storage environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693969A_ABST
    Figure CN119693969A_ABST
Patent Text Reader

Abstract

The invention provides a grain depot personnel smoking behavior detection method and system, and aims to improve the detection precision of smoking behaviors in a complex grain depot environment. An existing system faces the problems of background interference, low resolution, small targets and the like, and the detection accuracy is affected. According to the method, a detection system of an improved YOLOv8 algorithm is combined, a personnel target detection model is deployed on edge equipment, a personnel area image is extracted in real time, a cigarette target detection model is deployed on a central server, and the extracted image is analyzed. According to the system, an optimized feature extraction method and an advanced attention mechanism are adopted, the detection precision of a small target under a complex background is remarkably improved, and meanwhile the problems of low resolution and background interference are effectively solved. Through the technical means, the smoking behavior can be accurately detected in real time in a real grain depot environment, and the reliability and practicability of the system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smoking detection, and in particular to a method and system for detecting smoking behavior of grain depot personnel. Background Art

[0002] Food is one of the basic needs of human survival and the cornerstone of social development. In the food system, safe food storage is crucial. However, there are various fire safety hazards in grain depots, including fire accidents that may be caused by smoking behavior of grain depot personnel. Due to the complex operating environment of grain depots, many equipment require personnel to operate and maintain, but some personnel lack safety awareness and have illegal smoking behaviors, which poses a serious hidden danger to fire safety. The ignition and burning of tobacco will produce open flames or sparks. Once it comes into contact with flammable grain, the fire will spread rapidly, threatening the lives of grain depot staff and causing serious impacts on the safety of the grain itself. Therefore, it is crucial to accurately detect the smoking behavior of staff in real time, which can effectively prevent fire accidents and ensure the fire safety of grain depots.

[0003] The current smoking behavior detection system is mainly divided into three categories based on different detection principles: smoke detection, human posture recognition, and target detection. These systems use advanced technologies such as smoke sensors, cameras, and deep learning algorithms to accurately monitor and identify smoking behavior. The smoke detection-based system uses smoke sensors to identify and detect smoke produced by smoking, but it is affected by environmental factors and may affect its accuracy. The human posture recognition-based system detects smoking behavior by identifying human postures, but it is affected by individual movements, angles, and occlusions, and its accuracy may be impaired. The target detection-based system uses image processing and deep learning technologies to identify and locate cigarettes or smoke in the scene. It has a certain degree of robustness and accuracy and can effectively cope with the influence of various environmental factors.

[0004] In recent years, deep learning target detection algorithms have developed rapidly. The YOLO series of algorithms have been widely used as typical one-stage target detection algorithms. The YOLO series of algorithms achieves fast and accurate target detection by integrating the target detection task into the forward propagation process of a single neural network. The algorithm divides the image into grids, each of which is responsible for predicting a fixed number of bounding boxes and target categories, thereby understanding the entire image globally. Compared with the multi-stage processing in traditional methods, the YOLO algorithm uses a joint prediction method, which can simultaneously predict the location and category of all targets in a single inference. This intensive prediction method enables YOLO to achieve a good balance between speed and accuracy. As the latest target detection model in the YOLO series of single-stage detection algorithms, YOLOv8 has higher detection accuracy and a lighter structure while meeting real-time requirements. Therefore, it is more suitable for detecting smoking behavior of grain warehouse personnel. Summary of the invention

[0005] According to the technical problems raised above, a method and system for detecting smoking behavior of grain depot personnel is provided. The present invention deploys a personnel target detection model on the edge device of the grain depot and a cigarette target detection model on the central server of the grain depot, which can detect smoking behavior in real time and accurately in a real grain depot environment.

[0006] The technical means adopted by the present invention are as follows:

[0007] A method for detecting smoking behavior of grain depot personnel, the specific steps comprising:

[0008] S1. Select an input method according to the data input type, obtain an input image, and read the information in the image;

[0009] S2. Use the TD-YOLO personnel target detection network to build a personnel target detection model to detect personnel targets in the image;

[0010] S3. Use CLAHE technology to enhance the extracted personnel area image to improve image quality.

[0011] S4. Use the SB-YOLO cigarette target detection network to build a cigarette target detection model to detect smoking behavior in the image;

[0012] S5. Determine whether there is smoking behavior based on the result of cigarette target detection.

[0013] Furthermore, the step S1 specifically includes:

[0014] The data input types include: image data, video data and real-time camera data. Different input methods are selected according to different data input types. After the image to be detected is input, the input data is read and processed.

[0015] Furthermore, the step S2 specifically includes:

[0016] S21. Build a human target detection model. Based on the YOLOv8 model, introduce the Triplet attention mechanism into the backbone network, introduce lightweight and efficient dynamic upsampling DySample, and perform appropriate pruning on the network.

[0017] S22. Adjust the learning rate, batch size and number of iterations of the personnel target detection model. When an image to be detected is input, detect whether there is a person in the image based on the personnel target monitoring model.

[0018] Furthermore, the step S3 specifically includes:

[0019] CLAHE divides the image into multiple small areas and performs histogram equalization in each small area to enhance the local contrast, while limiting excessive contrast enhancement and reducing noise amplification, effectively improving image quality.

[0020] Furthermore, the step S4 specifically includes:

[0021] S41. Construct a cigarette target detection model. Based on the YOLOv8 model, introduce the SPD-Conv model into the backbone network, add the BiFormer attention mechanism into the neck network, and add a small target detection layer.

[0022] S42. Adjust the learning rate, batch size and number of iterations of the cigarette target detection model. When the extracted personnel area image is input into the cigarette target detection model, detect whether there is a cigarette in the image based on the cigarette target detection model.

[0023] Furthermore, the step S5 specifically includes:

[0024] Whether there is smoking behavior is determined based on the result of cigarette target detection; if a cigarette target is detected, it is determined that there is smoking behavior; if no cigarette target is detected, it is determined that there is no smoking behavior.

[0025] Corresponding to the method for detecting smoking behavior of grain depot personnel in the present application, the present application also provides a system for detecting smoking behavior of grain depot personnel, including: an image reading unit, a target detection unit, an image enhancement unit, a cigarette target detection unit and a smoking behavior judgment unit, wherein:

[0026] The image reading unit is used to select an input mode according to the data input type, obtain an input image, and read information in the image;

[0027] The target detection unit is used to construct a human target detection model using the TD-YOLO human target detection network to detect human targets in the image;

[0028] The image enhancement unit is used to enhance the extracted personnel area image using CLAHE technology to improve the image quality;

[0029] The cigarette target detection unit is used to construct a cigarette target detection model using the SB-YOLO cigarette target detection network to detect smoking behavior in the image;

[0030] The smoking behavior determination unit is used to determine whether there is a smoking behavior according to the result of cigarette target detection.

[0031] Compared with the prior art, the present invention has the following advantages:

[0032] The method and system for detecting smoking behavior of grain depot personnel provided by the present invention address the existing problems in accurately detecting smoking behavior of personnel in a grain depot environment, which can be mainly summarized into two aspects. First, in a real grain depot environment, directly detecting cigarette targets may lead to misjudgment of smoking behavior. It is proposed to combine personnel target detection technology with cigarette target detection technology to detect the smoking behavior of grain depot personnel. Secondly, when performing target detection in a grain depot environment, the target may have low detection accuracy due to background interference, low resolution, and small targets. A personnel target detection model and a cigarette target detection model based on improved YOLOv8 are proposed.

[0033] The present invention provides a method and system for detecting smoking behavior of grain depot personnel. The YOLO series algorithm achieves fast and accurate target detection by integrating the target detection task into the forward propagation process of a single neural network. The algorithm divides the image into grids, each grid is responsible for predicting a fixed number of bounding boxes and target categories, so as to understand the entire image globally. Compared with the multi-stage processing in traditional methods, the YOLO algorithm adopts a joint prediction method, which can simultaneously predict the position and category of all targets in a single reasoning. This intensive prediction method enables YOLO to achieve a good balance between speed and accuracy. As the latest target detection model in the YOLO series of single-stage detection algorithms, YOLOv8 not only meets real-time requirements, but also has higher detection accuracy and a lighter structure.

[0034] The method and system for detecting smoking behavior of grain depot personnel provided by the present invention combine personnel target detection technology with cigarette target detection technology to detect the smoking behavior of grain depot personnel, thereby avoiding the misjudgment of smoking behavior that may result from direct cigarette target detection. In addition, the TD-YOLO personnel target detection network and the SB-YOLO cigarette target detection network improved based on YOLOv8 effectively solve the problems of background interference, low resolution and small targets in the grain depot environment. The optimized algorithm not only significantly improves the detection accuracy of personnel targets and reduces the impact of background interference, but also enhances the detection capability of cigarettes under low resolution and small target conditions. Combining these improvements, the detection performance and stability of the system in complex environments have been significantly improved, and it has high practical value and broad application prospects.

[0035] Based on the above reasons, the present invention can be widely promoted in the field of smoking detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 This is a flow chart of the method for detecting smoking behavior of grain depot personnel in the present invention.

[0038] Figure 2 This is a diagram of the network structure of human target detection in the present invention.

[0039] Figure 3 This is a diagram of the cigarette target detection network structure in the present invention. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] like Figure 1 As shown, the present invention provides a method for detecting smoking behavior of grain depot personnel, comprising:

[0043] S1. Select an input method according to the data input type, obtain an input image, and read the information in the image;

[0044] In specific implementation, as a preferred embodiment of the present invention, the step S1 specifically includes:

[0045] The data input types include: image data, video data and camera data. Different input methods are selected according to different data input types. After inputting the image to be detected, the input data is read and processed. During implementation, different processing methods are designed for different data to improve the versatility of the system.

[0046] S2. Use the TD-YOLO personnel target detection network to build a personnel target detection model to detect personnel targets in the image;

[0047] In specific implementation, as a preferred embodiment of the present invention, step S2 specifically includes:

[0048] S21. Build a human target detection model. Based on the YOLOv8 model, introduce the Triplet attention mechanism into the backbone network, and introduce lightweight and efficient dynamic upsampling DySample. Without adding additional computational burden, the feature extraction capability of the backbone network is enhanced, the detection accuracy of human targets is improved, and the impact of background interference is reduced. This improvement ensures the performance of the model in terms of accuracy and real-time performance.

[0049] The Triplet attention mechanism consists of three parallel branches, two of which are responsible for capturing the cross-dimensional interaction between the channel C and the space H or W, and one branch is used to build spatial attention. The outputs of the three branches are aggregated using the average.

[0050] S22. Adjust the learning rate, batch size, and iteration number of the human target detection model. When an image to be detected is input, detect whether there is a person in the image based on the human target monitoring model to improve the learning performance and effect of the model.

[0051] S3. Use CLAHE technology to enhance the extracted personnel area image to improve image quality.

[0052] In specific implementation, as a preferred embodiment of the present invention, step S3 specifically includes:

[0053] CLAHE divides the image into multiple small areas and performs histogram equalization in each small area to enhance the local contrast, while limiting excessive contrast enhancement and reducing noise amplification, effectively improving image quality.

[0054] S4. Use the SB-YOLO cigarette target detection network to build a cigarette target detection model to detect smoking behavior in the image;

[0055] In specific implementation, as a preferred embodiment of the present invention, step S3 specifically includes:

[0056] S41. Construct a cigarette target detection model. Based on the YOLOv8 model, introduce the SPD-Conv model into the backbone network to improve the retention of fine-grained information and feature learning, and enhance the performance of processing low-resolution and small targets. Add the BiFormer attention mechanism to the neck network to further enhance the network's performance in detecting small targets.

[0057] In the SPD-Conv model, the SPD layer is used to expand the downsampling signal rate and extract deep feature information; it speeds up the convolution operation by reducing the dimension and reduces the computational and memory burden. The strideless convolution layer performs convolution operations on the feature map processed by the SPD layer, extracts features layer by layer, and retains image details and spatial information;

[0058] The BiFormer is built with BRA as the core and uses two-level routing attention as the construction basis. It first applies 3×3 depthwise separable convolution to implicitly encode relative position information and performs normalization through Layer Norm. Then the BRA module captures the bidirectional relative attention. Finally, the most appropriate weights and biases are selected through a two-layer perceptron (MLP) to achieve feature conversion, information reorganization and feature extraction.

[0059] S42. Adjust the learning rate, batch size and number of iterations of the cigarette target detection model. When the extracted personnel area image is input into the cigarette target detection model, detect whether there is a cigarette in the image based on the cigarette target detection model.

[0060] S5. Determine whether there is smoking behavior based on the result of cigarette target detection.

[0061] In specific implementation, as a preferred embodiment of the present invention, step S4 specifically includes:

[0062] Whether there is smoking behavior is determined based on the result of cigarette target detection; if a cigarette target is detected, it is determined that there is smoking behavior; if no cigarette target is detected, it is determined that there is no smoking behavior.

[0063] Corresponding to the method for detecting smoking behavior of grain depot personnel in the present application, the present application also provides a system for detecting smoking behavior of grain depot personnel, including: an image reading unit, a target detection unit, an image enhancement unit, a cigarette target detection unit and a smoking behavior judgment unit, wherein:

[0064] The image reading unit is used to select an input mode according to the data input type, obtain an input image, and read information in the image;

[0065] The target detection unit is used to construct a human target detection model using the TD-YOLO human target detection network to detect human targets in the image;

[0066] The image enhancement unit is used to enhance the extracted personnel area image using CLAHE technology to improve the image quality;

[0067] The cigarette target detection unit is used to construct a cigarette target detection model using the SB-YOLO cigarette target detection network to detect smoking behavior in the image;

[0068] The smoking behavior determination unit is used to determine whether there is a smoking behavior according to the result of cigarette target detection.

[0069] When implementing, Figure 1 As shown, the image reading unit and the target detection unit are connected to the edge device, and the image enhancement unit, the cigarette target detection unit and the smoking behavior judgment unit are connected to the central server.

[0070] As for the embodiments of the present invention, since they correspond to the embodiments above, the description is relatively simple. For the relevant similarities, please refer to the description of the above embodiments, which will not be described in detail here.

[0071] Example

[0072] like Figure 1 As shown, the present invention provides a method and system for detecting smoking behavior of grain warehouse personnel. In this embodiment, personnel target detection and cigarette target detection are combined to construct a grain warehouse personnel smoking behavior detection model.

[0073] like Figure 2 As shown in the figure, for personnel target detection, the present invention improves on the basis of the YOLOv8 model, introduces the Triplet attention mechanism into the backbone network, enhances the feature extraction capability of the backbone network, and makes the network recognize the target more accurately. At the same time, a lightweight and efficient dynamic upsampling operator DySample is introduced, and the network is properly pruned, thereby improving the detection speed of the model while ensuring the detection accuracy. A personnel target detection model TD-YOLO based on improved YOLOv8 is constructed, and the specific steps are as follows:

[0074] Creation of a dataset for human target detection. After collecting images and videos with grain warehouse backgrounds, the employees are screened out and used as a dataset for human target detection. The images are divided into training set, validation set, and test set in a ratio of 8:1:1 for training, validation, and testing of the target detection model. LabelImg is selected as the annotation tool to annotate the human targets in these images, providing accurate annotation data for model training.

[0075] Adjust the learning rate, batch size, and number of iterations of the human target detection model to improve the model's learning performance and effect. In order to accelerate the training of the model, use GPU during training. The models before and after the improvement in the experiment were trained and tested under the same parameter conditions. During training, batch_size was 16, the total number of epochs was set to 300, the optimizer during training was Adam, and the learning rate was 0.0001.

[0076] The TD-YOLO personnel target detection model is obtained through training. First, the attention mechanism is introduced to enable the network to focus more on important information, thereby extracting content related to personnel, reducing interference with irrelevant information, and filtering out unnecessary background elements, thereby improving the accuracy and overall performance of personnel detection. In addition, a lightweight and efficient dynamic upsampling operator is introduced, and the network is properly pruned to reduce the memory usage in the network architecture, increase the calculation speed, and reduce the total calculation amount of the model, thereby ensuring the detection accuracy while speeding up the detection speed. When the image to be detected is input, the model is used to detect whether there is a person in the image.

[0077] The improved YOLOv8 cigarette target detection network is used to detect cigarette targets in the image, judge and output the smoking behavior detection results.

[0078] like Figure 3 As shown, for cigarette target detection, the present invention improves on the basis of the YOLOv8 model and introduces the SPD-Conv model into the backbone network, thereby reducing information loss and improving the network's learning ability for low-resolution images and small targets. The BiFormer attention mechanism is added to the neck network to enhance the network's feature extraction capability, thereby further improving the effect of small target detection. A small target detection layer is added to obtain a smaller feature map, thereby improving the detection accuracy of tiny targets. A cigarette target detection algorithm SB-YOLO based on improved YOLOv8 is constructed, and the specific steps are as follows:

[0079] Cigarette target detection dataset production. From the images and videos with cigarette targets collected, these pictures are batch cropped through image processing technology, and only the images of the personnel area are retained. After manual screening, they are used as the dataset for cigarette target detection. The images are divided into training set, validation set and test set in a ratio of 8:1:1 for training, validation and testing of the target detection model. The size of the cigarette target in the image is relatively small, and the different smoking gestures and smoking postures cause different degrees of occlusion on the cigarette target, which increases the difficulty of cigarette target detection and causes missed detection and false detection. Expand the range of the annotation box and add some hand and facial features. While ensuring the feature information of small targets, the hands and faces are bound to the cigarettes, which increases the uniqueness of the target features. LabelImg is also selected as the annotation tool to annotate the cigarette targets in these images, providing accurate annotation data for model training.

[0080] The learning rate, batch size, and number of iterations of the cigarette target detection model were adjusted to improve the learning performance and effect of the model. In order to accelerate the training of the model, GPU was used during training. The models before and after the improvement were trained and tested under the same parameter conditions. The batch_size was 8 during training, the total number of epochs was set to 200, the optimizer was Adam, and the learning rate was 0.0001.

[0081] The SB-YOLO cigarette target detection model is obtained through training. An improved convolution operation is introduced in the backbone network to reduce information loss and improve the network's ability to detect low-resolution images and small targets. This optimized convolution structure improves the detection performance of small targets by improving the feature extraction process to ensure that key features can be better retained when processing low-resolution images. At the same time, an advanced attention mechanism is integrated in the neck network, which further improves the accuracy of feature extraction and enhances the detection effect of small targets by intelligently focusing on important areas in the image. Adding a small target detection layer to obtain a smaller feature map improves the detection accuracy and recall rate of tiny targets, making the entire network more accurate and comprehensive in multi-scale target detection. Through these improvements, the network shows higher accuracy and stability when dealing with complex scenes and small targets, which significantly improves the overall detection performance. When the image of the personnel area to be detected is input, the model is used to detect whether there is a cigarette in the image.

[0082] Finally, whether there is smoking behavior is determined based on the result of cigarette target detection; if a cigarette target is detected, it is determined that there is smoking behavior; if no cigarette target is detected, it is determined that there is no smoking behavior.

[0083] Experimental results show that the method and system for detecting smoking behavior of grain warehouse personnel provided by the present invention can accurately detect smoking behavior in real time in a real grain warehouse environment.

[0084] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0085] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.

[0087] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0088] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0089] If the integrated 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 technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. 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 replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting smoking behavior of grain depot personnel, characterized in that: The specific steps include: S1. Select an input method according to the data input type, obtain an input image, and read the information in the image; S2. Use the TD-YOLO personnel target detection network to build a personnel target detection model to detect personnel targets in the image; S3. Use CLAHE technology to enhance the extracted personnel area image to improve the image quality; S4. Use the SB-YOLO cigarette target detection network to build a cigarette target detection model to detect smoking behavior in the image; S5. Determine whether there is smoking behavior based on the result of cigarette target detection.

2. The method for detecting smoking behavior of grain depot personnel according to claim 1, characterized in that: The step S1 specifically includes: The data input types include: image data, video data and real-time camera data. Different input methods are selected according to different data input types. After the image to be detected is input, the input data is read and processed.

3. The method for detecting smoking behavior of grain depot personnel according to claim 1, characterized in that: The step S2 specifically includes: S21. Build a human target detection model. Based on the YOLOv8 model, introduce the Triplet attention mechanism into the backbone network, introduce lightweight and efficient dynamic upsampling DySample, and perform appropriate pruning on the network. S22. Adjust the learning rate, batch size and number of iterations of the personnel target detection model. When an image to be detected is input, detect whether there is a person in the image based on the personnel target monitoring model.

4. The method for detecting smoking behavior of grain depot personnel according to claim 1, characterized in that: The step S3 specifically includes: CLAHE divides the image into multiple small areas and performs histogram equalization in each small area to enhance the local contrast, while limiting excessive contrast enhancement and reducing noise amplification, effectively improving image quality.

5. The method for detecting smoking behavior of grain depot personnel according to claim 1, characterized in that: The step S4 specifically includes: S41. Construct a cigarette target detection model. Based on the YOLOv8 model, introduce the SPD-Conv model into the backbone network, add the BiFormer attention mechanism into the neck network, and add a small target detection layer. S42. Adjust the learning rate, batch size and number of iterations of the cigarette target detection model. When the extracted personnel area image is input into the cigarette target detection model, detect whether there is a cigarette in the image based on the cigarette target detection model.

6. The method for detecting smoking behavior of grain depot personnel according to claim 1, characterized in that: The step S5 specifically includes: The presence or absence of smoking behavior is determined based on the result of cigarette target detection; if a cigarette target is detected, it is determined that smoking behavior exists; if no cigarette target is detected, it is determined that smoking behavior does not exist.

7. A system for detecting smoking behavior of grain depot personnel based on the method for detecting smoking behavior of grain depot personnel described in any one of claims 1 to 6, characterized in that: include: Image reading unit, target detection unit, image enhancement unit, cigarette target detection unit and smoking behavior judgment unit, wherein: The image reading unit is used to select an input mode according to the data input type, obtain an input image, and read information in the image; The target detection unit is used to construct a human target detection model using the TD-YOLO human target detection network to detect human targets in the image; The image enhancement unit is used to enhance the extracted personnel area image using CLAHE technology to improve the image quality; The cigarette target detection unit is used to construct a cigarette target detection model using the SB-YOLO cigarette target detection network to detect smoking behavior in the image; The smoking behavior determination unit is used to determine whether there is a smoking behavior according to the result of cigarette target detection.