Smoke detection system and method

Through the combination of the YOLOv8 model and the CBAM attention mechanism, the problems of the accuracy and resource consumption of existing smoke detection technologies in complex environments are solved, and efficient smoke detection on resource-constrained devices are achieved, which improves small goals and complexity Inspection accuracy and robustness in scenarios.

CN119274038APending Publication Date: 2025-01-07XINJIANG LEON TELECOM TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411364199.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-28
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing smoke detection technology has insufficient accuracy and response speed in complex environments, especially in small targets and complex scenarios, with limited detection accuracy, and high computational complexity, and difficult to operate in real-time on resource-constrained devices.

Method used

Using the YOLOv8 model combined with the CBAM attention mechanism, through data preprocessing, feature extraction, attention assignment and object detection modules, multi-scale feature fusion and lightweight design are realized, computing resource requirements are reduced, and the space and channel attention mechanisms are improved. Detection capabilities of small targets and complex backgrounds.

Benefits of technology

Real-time smoke detection on resource-constrained devices improves detection accuracy and robustness in complex scenarios, reduces dependence on a large number of training data, adapts to different lighting conditions and environmental interference, and enhances the efficiency and practical value of the model .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274038A_ABST
    Figure CN119274038A_ABST
Patent Text Reader

Abstract

The invention relates to the field of machine vision and image recognition, and particularly discloses a smoke detection system, which comprises a data preprocessing module used for carrying out normalization, data enhancement and clipping and zooming on an input image to obtain preprocessed image information; the feature extraction module is used for performing feature extraction by using a convolutional neural network structure, generating multi-scale feature representation, obtaining a feature extraction image, and obtaining a multi-scale feature fusion image through a multi-scale feature fusion technology in combination with feature maps of different levels; and the CBAM attention mechanism module comprises a space attention sub-module and a channel attention sub-module, and the space attention sub-module is used for enhancing features of an important space region in the multi-scale feature fusion image according to a space attention mechanism. By adopting the technical scheme of the invention, real-time detection can be realized on resource-limited equipment in a lightweight and efficient manner, and the method has high recognition accuracy for small-target and dynamically changing smoke in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision and image recognition, and in particular to a smoke detection system and method. Background Art

[0002] With the rapid development of industrialization and urbanization, fire and air pollution problems are becoming increasingly serious, posing a major threat to human life and environmental safety. Smoke is a direct indicator of fire and pollution, and its detection technology is of great significance for preventing and controlling fires and monitoring air quality. Therefore, the development of efficient and accurate smoke detection technology has become a top priority.

[0003] At present, smoke detection technology mainly relies on optical sensors, ion sensors and other devices. Although these traditional methods are effective in some application scenarios, they have limitations in accuracy and response speed. Especially in complex environments, such as lighting changes, shadows, weather conditions, etc., these methods are easily disturbed, resulting in inaccurate detection results.

[0004] With the development of deep learning and computer vision technology, smoke detection methods based on image processing have gradually become a research hotspot. These methods detect smoke by analyzing the color, texture, motion and other features of the image, but they perform poorly in complex backgrounds and are easily disturbed by factors such as lighting changes and shadows. Specifically, smoke detection methods based on image processing are mainly implemented through the following technical routes: Machine learning-based detection methods, such as support vector machines (SVMs) and random forests, are used for smoke detection. These methods rely on manually designed features (such as color histograms, gradient features, etc.) and then use classifiers for detection. Although they have improved detection accuracy to a certain extent, they are still insufficient when dealing with complex scenes due to the limitations of feature design.

[0005] Based on deep learning detection methods, convolutional neural networks (CNNs) are widely used in target detection tasks. Typical deep learning models such as YOLO, Faster R-CNN, SSD, etc. are used for smoke detection. These models achieve high detection accuracy by automatically learning image features. However, they are usually complex and computationally intensive, making them difficult to run in real time on resource-constrained devices.

[0006] In the existing technology, smoke detection methods based on YOLO (especially YOLOv5 and its subsequent versions) are considered to be the most similar implementation solutions. YOLO is a single-stage target detection model that transforms the target detection problem into a regression problem. It predicts the positions and categories of multiple targets simultaneously through a single forward propagation, achieving high detection speed and accuracy. YOLOv5 improves the detection performance of small targets while maintaining the detection speed by introducing multi-scale feature maps and improving the network architecture. However, YOLOv5 and its subsequent versions still face many challenges in smoke detection tasks: 1. Model complexity and computational complexity: Although the YOLO model is relatively fast, its computational complexity is still high, making it difficult to run efficiently in embedded devices or real-time applications. This is because existing models usually contain a large number of convolutional layers and parameters, and deep neural networks require a lot of computing resources for forward and backward propagation. For example, the YOLOv5 model introduced multi-scale feature maps and improved network architecture, which improved detection performance but also significantly increased the amount of computation.

[0007] 2. The detection accuracy of small targets and complex scenes is limited. In practical applications, smoke often presents sparse and dynamically changing characteristics, and may appear in complex backgrounds, which increases the difficulty of detection. When dealing with small targets and complex scenes, existing models are easily affected by background interference and target ambiguity, resulting in reduced detection accuracy. The specific reason is that the model has limited capabilities in multi-scale feature extraction and feature fusion, and cannot fully capture the detailed features of small targets.

[0008] Therefore, there is an urgent need for a smoke detection system and method that can be lightweight and efficient, realize real-time detection on resource-constrained devices, have high recognition accuracy for small targets and dynamically changing smoke in complex scenarios, adapt to different lighting conditions and environmental interference, and reduce dependence on large amounts of training data. Summary of the invention

[0009] The present invention provides a smoke detection system and method, which can realize real-time detection on resource-constrained equipment in a lightweight and efficient manner, and has a high recognition accuracy rate for small targets and dynamically changing smoke in complex scenarios.

[0010] In order to solve the above technical problems, this application provides the following technical solutions: A smoke detection system, comprising: The data preprocessing module is used to normalize, enhance, crop and scale the input image to obtain preprocessed image information; The feature extraction module is used to extract features using a convolutional neural network structure, generate multi-scale feature representations, obtain feature extraction images, and obtain multi-scale feature fusion images by combining feature maps of different levels through multi-scale feature fusion technology; The CBAM attention mechanism module includes a spatial attention submodule and a channel attention submodule. The spatial attention submodule is used to enhance the features of important spatial regions in the multi-scale feature fusion image according to the spatial attention mechanism to obtain a spatial attention image, and the spatial attention image includes a spatial weight matrix; the channel attention submodule adjusts the weights of each channel in the multi-scale feature fusion image according to the channel attention mechanism to highlight important features to obtain a channel attention image; the CBAM attention mechanism module is also used to multiply the spatial weight matrix by the weights of each channel in the channel attention image to obtain an attention assignment image; The YOLOv8 target detection module is used to generate anchor points on the attention-assigned image, and the anchor points are used to predict the position and size of the smoke target; then the regression network is used to predict the bounding box coordinates of each anchor point, including the center position, width and height of the bounding box; then the regression network is used to predict the category of each bounding box to determine whether it contains smoke, and then the classification network is used to predict the type of smoke, and finally the preliminary detection result information is obtained; The result post-processing module is used to perform non-maximum suppression on the detection result information, remove overlapping detection frames, and then filter the detection results below the threshold according to a preset confidence threshold, retaining the detection results with the highest confidence, and the smoke detection result information, which includes the location, size and category information of the smoke.

[0011] The basic scheme principle and beneficial effects are as follows: The data preprocessing module preprocesses the input image through normalization, data enhancement, cropping and scaling operations to improve the efficiency and robustness of subsequent model processing. The feature extraction module uses the convolutional neural network structure to extract the multi-scale features of the image, and combines the feature maps of different levels through feature fusion technology to enhance the model's detection ability for smoke targets of different sizes. The CBAM attention mechanism module works through the collaboration of the spatial attention submodule and the channel attention submodule. The model can pay more attention to the areas and features in the image that are important for smoke detection, thereby improving the accuracy of detection.

[0012] The YOLOv8 target detection module performs target detection on the feature map enhanced by the attention mechanism, uses anchor points to predict the position and size of smoke targets, and performs category prediction to determine the presence and type of smoke. The result post-processing module optimizes the detection results through non-maximum suppression and confidence threshold filtering, removes overlapping and low-confidence detection boxes, and retains the most reliable detection results.

[0013] Through the CBAM attention mechanism, the model can pay more attention to the features in the image that are important for smoke detection, especially for small targets and dynamically changing smoke in complex scenes, which improves the accuracy of detection. It can adapt to different lighting conditions and environmental interference, maintain high-precision detection in various complex environments, and enhance the robustness of the model. The lightweight design of the YOLOv8 model enables the system to run in real time on resource-constrained devices, reducing the demand for computing resources.

[0014] Through the optimized network structure and attention mechanism, the system can achieve effective learning on limited training data, reducing the dependence on a large amount of labeled data. The high efficiency of the system enables real-time smoke detection, which has important practical application value for fire prevention and air quality monitoring.

[0015] The present invention adopts the YOLOv8 model, which is a lightweight convolutional neural network designed for efficiency. YOLOv8 effectively reduces the complexity of the model by reducing the number of network layers and parameters. Compared with traditional deep learning models, YOLOv8 significantly reduces the amount of calculation and memory usage while maintaining high detection accuracy.

[0016] By using multi-scale feature extraction technology, the model can capture the features of both large and small targets in the image. This makes the model more sensitive and accurate in detecting small targets in complex scenes. By introducing the CBAM attention mechanism, the model can automatically focus on key areas in the image, such as areas where smoke may appear. This mechanism enhances the model's ability to recognize small targets and targets in complex backgrounds. The combined use of spatial attention and channel attention allows the model to focus on important features in both spatial and channel dimensions, further improving the detection accuracy of small targets and complex scenes.

[0017] In summary, the present invention realizes lightweight and efficient real-time detection on resource-constrained devices, and has high recognition accuracy for small targets and dynamically changing smoke in complex scenarios.

[0018] Furthermore, the data preprocessing module is used to perform an image normalization step to normalize the pixel values ​​of the input image to the range of [0, 1]; then perform a data enhancement step to generate diversified training samples through operations such as rotation, scaling, and flipping; and finally perform an image cropping and scaling step to crop and scale the input image to a fixed size to obtain preprocessed image information.

[0019] This step involves linearly mapping all pixel values ​​of the input image from the original [0, 255] integer range to the [0,1] floating point range. This operation is achieved by dividing each pixel value by 255. Normalization not only helps to speed up the convergence of subsequent convolutional layers, but also helps to improve the robustness of the model under different lighting conditions. Increase the diversity of training samples by randomly applying a series of image transformation operations. Data augmentation not only improves the generalization ability of the model, but also helps to reduce overfitting, making the model more stable and reliable in practical applications. The normalized and augmented images are cropped and scaled to the fixed size required for network input. This step ensures that all input images have uniform dimensions for easy network processing.

[0020] Furthermore, the feature extraction module adopts a multi-layer convolutional neural network of the YOLOv8 model.

[0021] The feature extraction module is the core component of the smoke detection system of the present invention, which is responsible for extracting useful feature information from the preprocessed image. The module adopts the YOLOv8 model, which is an advanced convolutional neural network (CNN) designed for real-time target detection tasks. The YOLOv8 model is known for its high efficiency and accuracy, and is particularly suitable for application scenarios that require fast and accurate detection. The YOLOv8 model consists of multiple convolutional layers, each of which is usually followed by one or more pooling layers and activation functions. Shallow convolutional layers are used to capture low-level features in the image, such as edges and textures. These layers usually contain fewer filters to maintain the computational efficiency of the model. Deep convolutional layers As the network level deepens, deep convolutional layers are able to capture more complex features, such as shapes and object parts. These layers contain more filters to extract rich feature representations. Pooling layers are used to reduce the spatial dimension of feature maps while retaining important feature information. Pooling operations help improve the robustness of the model to small targets and image deformations. Activation functions, such as ReLU (Rectified Linear Unit), are used to introduce nonlinearity and enhance the expressiveness of the model. Activation functions help the model learn complex feature combinations. Batch normalization layers are used to standardize the output of the layer, speed up the model training process, and improve the generalization ability of the model. Residual connections are used to alleviate the gradient vanishing problem in deep network training by adding direct connections to help gradient flow and improve training stability. The YOLOv8 model uses multi-scale feature fusion technology, combining feature maps at different levels to improve the detection ability of objects of different sizes.

[0022] Furthermore, the spatial attention submodule includes: One or more convolutional layers to extract spatial features; One or more pooling layers to reduce the spatial dimension of the feature map; One or more activation functions to introduce nonlinearity and enhance feature representation capabilities; One or more fully connected layers to learn the importance weights of spatial locations.

[0023] One or more convolutional layers are used to extract spatial features of the image. These layers capture spatial information related to smoke by learning local connectivity patterns and spatial hierarchical structures in the image. Convolutional layers usually contain learnable weights and biases, which are optimized by back-propagation algorithms. One or more pooling layers are used to reduce the spatial dimensions of the feature map while retaining important spatial features. Pooling operations usually include max pooling or average pooling, which helps reduce the amount of computation and improve the abstraction ability of the model. Pooling layers help make the model robust to small position changes while maintaining sensitivity to smoke characteristics. One or more activation functions, such as ReLU (Rectified Linear Unit), are used to introduce nonlinearity and enhance the feature representation ability of the model. Nonlinear activation functions enable the model to learn complex feature combinations and improve the ability to identify smoke. Activation functions help solve the linear inseparability problem in deep learning models, allowing the model to capture more complex spatial features. One or more fully connected layers are used to learn the importance weights of spatial positions. These layers map spatial features to a weight vector through global connections, representing the importance of each spatial position. Fully connected layers usually contain a large number of parameters and need to be optimized through a large amount of training data. The output of these layers can be viewed as a spatial weight map that adjusts each spatial location of the input feature map.

[0024] Furthermore, the activation function is a sigmoid activation function, which is used to convert the output of the fully connected layer into a spatial weight matrix, in which the value of each element is between 0 and 1, indicating the importance of the corresponding spatial position.

[0025] By using the Sigmoid activation function in the spatial attention submodule, smoke targets can be identified more accurately, especially in complex scenes. The spatial weight matrix generated by the Sigmoid function provides an intuitive way to understand the area that the model focuses on, enhancing the interpretability of the model.

[0026] Furthermore, the channel attention submodule includes: A global average pooling layer to aggregate the features of each channel to generate a channel descriptor; One or more convolutional layers to extract features from the channel descriptors; One or more activation functions to introduce nonlinearity and enhance feature representation capabilities; One or more fully connected layers to learn channel importance weights.

[0027] Furthermore, the activation function is a softmax activation function, which is used to convert the output of the fully connected layer into a channel weight vector, in which the value of each element represents the importance of the corresponding channel.

[0028] Through a carefully designed network structure, it is possible to identify and emphasize channels in the image that are relevant to smoke detection, thereby improving the model's recognition accuracy for smoke targets. The global average pooling layer is used to aggregate the features of each channel to generate a channel descriptor. This step is achieved by calculating the average of all spatial positions within each channel. One or more convolutional layers are used to extract features from the channel descriptors. These layers further enhance the representation of features by learning complex relationships between channels. The Softmax activation function compresses real-valued inputs into the ((0, 1)) interval and makes the sum of all output values ​​1. This property makes it an ideal choice for transforming weight vectors to represent the importance of channels.

[0029] Furthermore, the result subsequent processing module is also used to analyze whether there is a human body's motion trajectory in the pre-processed image information, and identify the human body's gaze direction based on the human body's morphology, and when the human body's gaze direction overlaps with the position of the smoke in the smoke detection result information, and the human body's motion trajectory does not change rapidly, suppress the alarm output; if the human body's gaze direction does not overlap with the position of the smoke in the smoke detection result information, or the human body's gaze direction overlaps with the position of the smoke in the smoke detection result information, but the human body's motion trajectory changes rapidly, an alarm output instruction is generated.

[0030] The functions of human motion trajectory analysis and safety assessment have been added to improve the accuracy of alarms and reduce false alarms.

[0031] A smoke detection method, comprising: S1. Data preprocessing: normalizing, data augmentation, cropping and scaling the input image to obtain preprocessed image information; S2. Feature extraction: use the convolutional neural network structure to extract features, generate multi-scale feature representations, obtain feature extraction images, and use multi-scale feature fusion technology to combine feature maps of different levels to obtain multi-scale feature fusion images; S3. CBAM attention mechanism step: according to the spatial attention mechanism, the features of the important spatial regions in the multi-scale feature fusion image are enhanced to obtain the spatial attention image, which includes the spatial weight matrix; then according to the channel attention mechanism, the weights of each channel in the multi-scale feature fusion image are adjusted to highlight the important features to obtain the channel attention image; then the spatial weight matrix is ​​multiplied by the weights of each channel in the channel attention image to obtain the attention assignment image; S4.YOLOv8 target detection, generating anchor points on the attention-assigned image, which are used to predict the position and size of the smoke target; then using the regression network to predict the bounding box coordinates of each anchor point, including the center position, width and height of the bounding box; then using the regression network to predict the category of each bounding box to determine whether it contains smoke, and then using the classification network to predict the type of smoke, and finally obtain preliminary detection result information; S5. Post-process the results, perform non-maximum suppression on the detection result information, remove overlapping detection frames, and then filter the detection results below the threshold according to the preset confidence threshold, retain the detection results with the highest confidence, and the smoke detection result information, which includes the location, size and category information of the smoke.

[0032] Furthermore, the S1 data preprocessing is to perform an image normalization step to normalize the pixel values ​​of the input image to the range of [0, 1]; then perform a data enhancement step to generate diversified training samples through operations such as rotation, scaling, and flipping; and finally perform an image cropping and scaling step to crop and scale the input image to a fixed size to obtain preprocessed image information.

[0033] Furthermore, S2 adopts a multi-layer convolutional neural network of the YOLOv8 model. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of a smoke detection method; Figure 2 This is the data preprocessing flow chart; Figure 3 This is the YOLOv8 target detection flowchart. DETAILED DESCRIPTION

[0035] The following is further described in detail through specific implementation methods: A smoke detection system, comprising: The data preprocessing module is used to normalize, data enhance, crop and scale the input image to obtain preprocessed image information. Specifically, the data preprocessing module is used to perform the image normalization step to normalize the pixel values ​​of the input image to the range of [0, 1]; then perform the data enhancement step to generate a variety of training samples through operations such as rotation, scaling, and flipping; and finally perform the image cropping and scaling step to crop and scale the input image to a fixed size to obtain preprocessed image information. (such as Figure 2 shown) The feature extraction module is used to extract features using a convolutional neural network structure, generate multi-scale feature representations, obtain feature extraction images, and obtain multi-scale feature fusion images by combining feature maps of different levels through multi-scale feature fusion technology. Specifically, the feature extraction module uses a multi-layer convolutional neural network of the YOLOv8 model.

[0036] The CBAM attention mechanism module includes a spatial attention submodule and a channel attention submodule. The spatial attention submodule is used to enhance the features of important spatial areas in the multi-scale feature fusion image according to the spatial attention mechanism to obtain a spatial attention image, and the spatial attention image includes a spatial weight matrix; the channel attention submodule adjusts the weights of each channel in the multi-scale feature fusion image according to the channel attention mechanism to highlight important features to obtain a channel attention image; the CBAM attention mechanism module is also used to multiply the spatial weight matrix by the weights of each channel in the channel attention image to obtain an attention assignment image.

[0037] Specifically, the spatial attention submodule includes: One or more convolutional layers to extract spatial features; One or more pooling layers to reduce the spatial dimension of the feature map; One or more activation functions to introduce nonlinearity and enhance feature representation capabilities; One or more fully connected layers are used to learn the importance weights of spatial positions. The activation function is a sigmoid activation function, which is used to convert the output of the fully connected layer into a spatial weight matrix, in which the value of each element is between 0 and 1, indicating the importance of the corresponding spatial position.

[0038] The channel attention submodule includes: A global average pooling layer to aggregate the features of each channel to generate a channel descriptor; One or more convolutional layers to extract features from the channel descriptors; One or more activation functions to introduce nonlinearity and enhance feature representation capabilities; One or more fully connected layers to learn channel importance weights.

[0039] The activation function is a softmax activation function, which is used to convert the output of the fully connected layer into a channel weight vector, in which the value of each element represents the importance of the corresponding channel.

[0040] YOLOv8 target detection module (such as Figure 3As shown in the figure, it is used to generate anchor points on the attention assignment image (i.e., the final feature map), and the anchor points are used to predict the position and size of the smoke target; then the regression network is used to predict the bounding box coordinates of each anchor point, including the center position, width and height of the bounding box (bounding box regression); then the regression network is used to predict the category of each bounding box to determine whether it contains smoke, and then the classification network is used to predict the type of smoke (classification prediction), and finally the preliminary detection result information (detection result) is obtained; The result post-processing module is used to perform non-maximum suppression on the detection result information, remove overlapping detection frames, and then filter the detection results below the threshold according to a preset confidence threshold, retaining the detection results with the highest confidence, and the smoke detection result information, which includes the location, size and category information of the smoke.

[0041] When used specifically: The data preprocessing module preprocesses the input image through normalization, data enhancement, cropping and scaling operations to improve the efficiency and robustness of subsequent model processing. The feature extraction module uses the convolutional neural network structure to extract the multi-scale features of the image, and combines feature maps of different levels through feature fusion technology to enhance the model's detection ability for smoke targets of different sizes. The CBAM attention mechanism module works through the collaboration of the spatial attention submodule and the channel attention submodule. The model can pay more attention to the areas and features in the image that are important for smoke detection, thereby improving the accuracy of detection.

[0042] The YOLOv8 target detection module performs target detection on the feature map enhanced by the attention mechanism, uses anchor points to predict the position and size of smoke targets, and performs category prediction to determine the presence and type of smoke. The results post-processing module optimizes the detection results through non-maximum suppression and confidence threshold filtering, removes overlapping and low-confidence detection boxes, and retains the most reliable detection results. Through the CBAM attention mechanism, the model can pay more attention to the features in the image that are important for smoke detection, especially for small targets and dynamically changing smoke in complex scenes, which improves the accuracy of detection. It can adapt to different lighting conditions and environmental interference, maintain high-precision detection in various complex environments, and enhance the robustness of the model. The lightweight design of the YOLOv8 model enables the system to run in real time on resource-constrained devices, reducing the demand for computing resources.

[0043] Through the optimized network structure and attention mechanism, the system can achieve effective learning on limited training data, reducing the dependence on a large amount of labeled data. The high efficiency of the system enables real-time smoke detection, which has important practical application value for fire prevention and air quality monitoring.

[0044] A smoke identification method, comprising: S1. Data preprocessing, receiving the original image to be detected. (e.g. Figure 1 shown) Perform an image normalization step to linearly map the pixel values ​​of the image from [0, 255] to the range [0, 1] for subsequent processing. Perform a data augmentation step to rotate, scale, flip, and other operations on the image to enhance the model's ability to recognize smoke of different postures and sizes. Perform an image cropping and scaling step to crop and scale the image to the fixed size required by the model input, such as 416x416 pixels.

[0045] S2. Feature extraction, the preprocessed image is input into the feature extraction module.

[0046] The multi-layer convolutional neural network of the YOLOv8 model is used to extract image features and generate multi-scale feature representations.

[0047] Through multi-scale feature fusion technology, feature maps at different levels are combined to obtain a multi-scale feature fusion image.

[0048] S3.CBAM attention mechanism, the multi-scale feature fusion image is input into the CBAM attention mechanism module.

[0049] In the spatial attention submodule, spatial features are extracted through convolutional layers, pooling layers, and activation functions, and the importance weights of spatial positions are learned through fully connected layers. The sigmoid activation function is used to generate the spatial weight matrix.

[0050] In the channel attention submodule, the features of each channel are aggregated through the global average pooling layer to generate a channel descriptor. Then the importance weights of the channels are learned through convolutional layers, activation functions, and fully connected layers. The softmax activation function is used to generate the channel weight vector.

[0051] The spatial weight matrix is ​​combined with the channel weight vector to generate an attention assignment image.

[0052] S4.YOLOv8 object detection, input the attention assignment image into the YOLOv8 object detection module.

[0053] Generate anchor points on the feature map to predict the location and size of smoke targets.

[0054] The regression network is used to predict the bounding box coordinates of each anchor point, including the center position, width and height of the bounding box.

[0055] The classification network predicts the category of each bounding box to determine whether it contains smoke and predicts the type of smoke.

[0056] Get preliminary test result information.

[0057] S5. Post-process the results by performing non-maximum suppression on the preliminary detection result information and removing overlapping detection frames.

[0058] The detection results below the preset confidence threshold are filtered out, and the detection results with the highest confidence are retained.

[0059] Output the final smoke detection result information, including the location, size and category information of the smoke.

[0060] The following is a specific embodiment, which shows the performance of the smoke detection system of the present invention in practical application: Assume that an image containing smoke is input, and the image size is 1920x1080 pixels. After being processed by the data preprocessing module, the image is normalized, enhanced, and cropped and scaled to 416x416 pixels. The feature extraction module extracts the multi-scale features of the image and generates a feature fusion image.

[0061] The CBAM attention mechanism module enhances the feature representation of the smoke region in the image. The YOLOv8 object detection module detects the smoke target on the feature map and predicts its position and size. The result post-processing module optimizes the detection results and finally outputs the smoke position at (200, 300), the size is (100, 200) pixels, and the category is "light smoke".

[0062] In other embodiments, the result post-processing module is also used to analyze whether there is a human body's motion trajectory in the pre-processed image information, and identify the human body's gaze direction based on the human body's morphology, and when the human body's gaze direction overlaps with the position of the smoke in the smoke detection result information, and the human body's motion trajectory does not change rapidly, suppress the alarm output; if the human body's gaze direction does not overlap with the position of the smoke in the smoke detection result information, or the human body's gaze direction overlaps with the position of the smoke in the smoke detection result information, but the human body's motion trajectory changes rapidly, an alarm output instruction is generated.

[0063] In specific use, the result post-processing module first analyzes the human motion trajectory detected in the image sequence through the human motion trajectory analysis unit, and uses image processing and computer vision techniques, such as background subtraction and optical flow method, to track the position change of the human body in the image.

[0064] Suppose that in an office, the system detects a small amount of smoke through the YOLOv8 target detection module. Through the human motion trajectory analysis unit of the result post-processing module, the system finds that an employee is near the smoke and his line of sight is consistent with the location of the smoke. Based on this, the safety assessment unit determines that the smoke may be generated by the employee smoking, which is a safe situation. The alarm suppression unit then decides not to output an alarm signal. If there is no one present or the amount of smoke is large at this time, the system will alarm normally.

[0065] By adding the functions of human motion trajectory analysis and safety assessment, the smoke detection system of the present invention can more intelligently determine the source of smoke and environmental background, thereby effectively avoiding false alarms while ensuring the accuracy of the alarm.

[0066] The above are only embodiments of the present invention. The invention is not limited to the fields involved in this implementation case. The common sense such as the known specific structures and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field to which the invention belongs before the application date or the priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to explain the content of the claims.

Claims

1. A smoke detection system, characterized in that: include: The data preprocessing module is used to normalize, enhance, crop and scale the input image to obtain preprocessed image information; The feature extraction module is used to extract features using a convolutional neural network structure, generate multi-scale feature representations, obtain feature extraction images, and obtain multi-scale feature fusion images by combining feature maps of different levels through multi-scale feature fusion technology; The CBAM attention mechanism module includes a spatial attention submodule and a channel attention submodule. The spatial attention submodule is used to enhance the features of important spatial regions in the multi-scale feature fusion image according to the spatial attention mechanism to obtain a spatial attention image, and the spatial attention image includes a spatial weight matrix; the channel attention submodule adjusts the weights of each channel in the multi-scale feature fusion image according to the channel attention mechanism to highlight important features to obtain a channel attention image; the CBAM attention mechanism module is also used to multiply the spatial weight matrix by the weights of each channel in the channel attention image to obtain an attention assignment image; The YOLOv8 target detection module is used to generate anchor points on the attention-assigned image, and the anchor points are used to predict the position and size of the smoke target; then the regression network is used to predict the bounding box coordinates of each anchor point, including the center position, width and height of the bounding box; then the regression network is used to predict the category of each bounding box to determine whether it contains smoke, and then the classification network is used to predict the type of smoke, and finally the preliminary detection result information is obtained; The result post-processing module is used to perform non-maximum suppression on the detection result information, remove overlapping detection frames, and then filter the detection results below the threshold according to a preset confidence threshold, retaining the detection results with the highest confidence, and the smoke detection result information, which includes the location, size and category information of the smoke.

2. A smoke detection system according to claim 1, characterized in that: The data preprocessing module is used to perform an image normalization step to normalize the pixel values ​​of the input image to the range of [0, 1]; then perform a data enhancement step to generate diversified training samples through operations such as rotation, scaling, and flipping; and finally perform an image cropping and scaling step to crop and scale the input image to a fixed size to obtain preprocessed image information.

3. A smoke detection system according to claim 2, characterized in that: The feature extraction module adopts a multi-layer convolutional neural network of the YOLOv8 model.

4. A smoke detection system according to claim 3, characterized in that: The spatial attention submodule includes: One or more convolutional layers to extract spatial features; One or more pooling layers to reduce the spatial dimension of the feature map; One or more activation functions to introduce nonlinearity and enhance feature representation capabilities; One or more fully connected layers to learn the importance weights of spatial locations.

5. A smoke detection system according to claim 4, characterized in that: The activation function is a sigmoid activation function, which is used to convert the output of the fully connected layer into a spatial weight matrix, in which the value of each element is between 0 and 1, indicating the importance of the corresponding spatial position.

6. A smoke detection system according to claim 5, characterized in that: The channel attention submodule includes: A global average pooling layer to aggregate the features of each channel to generate a channel descriptor; One or more convolutional layers to extract features from the channel descriptors; One or more activation functions to introduce nonlinearity and enhance feature representation capabilities; One or more fully connected layers to learn channel importance weights; The activation function is a softmax activation function, which is used to convert the output of the fully connected layer into a channel weight vector, in which the value of each element represents the importance of the corresponding channel.

7. A smoke detection system according to claim 1, characterized in that: The result subsequent processing module is also used to analyze whether there is a human body's motion trajectory in the pre-processed image information, and identify the human body's gaze direction based on the human body's morphology, and when the human body's gaze direction overlaps with the position of the smoke in the smoke detection result information, and the human body's motion trajectory does not change rapidly, suppress the alarm output; If the gaze direction of the human body does not overlap with the position of the smoke in the smoke detection result information, or the gaze direction of the human body overlaps with the position of the smoke in the smoke detection result information but the movement trajectory of the human body changes rapidly, an alarm output instruction is generated.

8. A smoke detection method, comprising: S1. Data preprocessing: normalizing, data augmentation, cropping and scaling the input image to obtain preprocessed image information; S2. Feature extraction: use the convolutional neural network structure to extract features, generate multi-scale feature representations, obtain feature extraction images, and use multi-scale feature fusion technology to combine feature maps of different levels to obtain multi-scale feature fusion images; S3. CBAM attention mechanism step: according to the spatial attention mechanism, the features of the important spatial regions in the multi-scale feature fusion image are enhanced to obtain the spatial attention image, which includes the spatial weight matrix; then according to the channel attention mechanism, the weights of each channel in the multi-scale feature fusion image are adjusted to highlight the important features to obtain the channel attention image; then the spatial weight matrix is ​​multiplied by the weights of each channel in the channel attention image to obtain the attention assignment image; S4.YOLOv8 target detection, generating anchor points on the attention-assigned image, which are used to predict the position and size of the smoke target; then using the regression network to predict the bounding box coordinates of each anchor point, including the center position, width and height of the bounding box; then using the regression network to predict the category of each bounding box to determine whether it contains smoke, and then using the classification network to predict the type of smoke, and finally obtain preliminary detection result information; S5. Post-process the results, perform non-maximum suppression on the detection result information, remove overlapping detection frames, and then filter the detection results below the threshold according to the preset confidence threshold, retain the detection results with the highest confidence, and the smoke detection result information, which includes the location, size and category information of the smoke.

9. A smoke detection method according to claim 8, characterized in that: The S1 data preprocessing is to perform an image normalization step to normalize the pixel values ​​of the input image to the range of [0, 1]; then perform a data enhancement step to generate diversified training samples through operations such as rotation, scaling, and flipping; and finally perform an image cropping and scaling step to crop and scale the input image to a fixed size to obtain preprocessed image information.

10. A smoke detection method according to claim 9, characterized in that: The S2 adopts a multi-layer convolutional neural network of the YOLOv8 model.

Citation Information

Cited By

  • CNN (Convolutional Neural Network) smoke and fire detection method and system based on double attention mechanisms

    CN120088740A

  • A CNN firework detection method and system based on a double attention mechanism

    CN120088740B

  • Smoke detection method, device, equipment and storage medium

    CN120356087A