Smoke detection model construction method, device, equipment, medium and detection method
By combining the model fusion of Faster R-CNN and MR(2+1)D network, the problems of difficult smoke feature representation and three-dimensional convolution training in forest fire detection are solved, and smoke detection with high recall rate, low false alarm rate and efficient operation is achieved.
Patent Information
- Application Number
- CN202210646289.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-06-08
AI Technical Summary
In existing technologies, traditional sensor monitoring methods have a limited scope of application in forest fire detection and high hardware deployment costs. Image-based smoke detection methods are difficult to effectively characterize smoke characteristics, and three-dimensional convolutional models are difficult and complex to train, resulting in poor detection recall and accuracy.
The Faster R-CNN network is used to build a basic smoke detection model, and the MR(2+1)D network is combined to build a smoke false detection model. The model fusion module is used to perform temporal and spatial fusion to construct the final smoke detection model, which is trained using a synthetic dataset.
The recall rate and accuracy of smoke detection are improved, the false alarm rate is reduced, the spatial complexity of the model is reduced, and the running speed is improved.
Smart Images

Figure CN114998686B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smoke detection technology, and in particular to a smoke detection model construction method, device, equipment, medium and detection method. Background Art
[0002] In recent years, wildfires have occurred frequently in my country, resulting in significant casualties and loss of forest resources. Forest fires are characterized by suddenness, randomness, high risk, and rapid spread. Once a fire breaks out, it spreads rapidly. Therefore, timely detection and effective extinguishing of fires are crucial for forest fire prevention.
[0003] Currently, forest fire detection typically relies on sensor monitoring. However, traditional sensor-based monitoring methods have a limited scope of application, being more suitable for locations like homes and factory buildings. my country's vast forest areas make deploying sensors prohibitively expensive and impractical. Furthermore, sensors in the field face significant challenges with power supply, waterproofing, and obstruction by dead branches. Similar technologies to sensor monitoring include the use of fixed-point cameras for surveillance and detection, which have a shorter observation range. Drone inspections, however, are costly, and drone endurance in mountainous areas poses significant challenges. Furthermore, tracking and returning to the target requires further refinement in practice.
[0004] To address the limited applicability of sensor-based monitoring systems and the high cost of hardware deployment, existing technologies have developed smoke monitoring methods based on remotely captured images. These methods use ultra-long-range cameras to monitor forest scenes and then perform target detection on these images, thereby enabling forest fire detection. However, in the process of using existing technologies, the inventors discovered that these technologies have at least the following problems:
[0005] 1) Features designed using traditional methods are inadequate for representing most smoke. Smoke features differ significantly from those of other objects. Statistical analysis of features in existing datasets can generally yield good features for representing these objects. However, smoke is a fluid with extremely diverse shapes and contours, and its color varies depending on the material of the burning object and the degree of combustion. Traditional manually designed features are unable to fully represent all smoke, resulting in suboptimal recall and accuracy.
[0006] 2) 3D convolution models that incorporate temporal information are difficult to train. Models that perform 2D convolution on multiple frames of images incorporate less temporal information. Optical flow methods, however, perform poorly due to the blurriness of distant images and the slow movement of smoke. Using a fully 3D convolutional architecture results in large parameters, slow gradient updates, and difficulty in training. Furthermore, in practice, 3D convolutions often fail to achieve the desired results. Summary of the Invention
[0007] The present invention aims to solve the above technical problems at least to a certain extent. The present invention provides a smoke detection model construction method, device, equipment, medium and detection method.
[0008] The technical solution adopted in the present invention is:
[0009] In a first aspect, the present invention provides a method for constructing a smoke detection model, comprising:
[0010] Obtain a Faster R-CNN network model and build a basic smoke detection model based on the Faster R-CNN network model;
[0011] Obtaining an MR(2+1)D network model, and building a smoke false detection removal model based on the MR(2+1)D network model;
[0012] Obtaining a model fusion module, and fusing the basic smoke detection model with the smoke false detection removal model through the model fusion module to obtain an initial smoke detection model;
[0013] Acquire a data set, wherein the data set includes a plurality of synthetic smoke data and smoke label information corresponding to the plurality of synthetic smoke data respectively;
[0014] The initial smoke detection model is trained according to the data set to obtain a final smoke detection model.
[0015] The beneficial effects of the present invention are as follows:
[0016] 1) High recall and accuracy for smoke detection. Specifically, during implementation, the present invention uses a smoke-based detection model built based on the Faster R-CNN network model to perform conventional target detection on the data to be detected, thereby improving the recall rate of smoke image detection. However, due to the high level of real-world interference in the data to be detected, the increased recall rate can easily lead to an increase in the false alarm rate. Therefore, the present invention builds a smoke false alarm removal model based on the MR(2+1)D network model with spatiotemporal separable convolution to further detect the detection box output by the smoke-based detection model, thereby further reducing the false alarm rate while maintaining a high recall rate. During this process, due to the differences in the characteristics of the Faster R-CNN network model and the MR(2+1)D network model, the detection box output by the smoke-based detection model and the detection box required as input to the smoke false alarm removal model are inconsistent in size. Therefore, the present invention fuses the smoke-based detection model with the smoke false alarm removal model through a model fusion module to achieve temporal and spatial fusion of the smoke-based detection model and the smoke false alarm removal model, thereby reducing time complexity.
[0017] 2) The smoke detection model has low spatial complexity and fast operation speed. Specifically, because the smoke basic detection model in the final smoke detection model of the present invention is built based on the Faster R-CNN network model, and the smoke false detection removal model is built based on the MR(2+1)D network model, when performing smoke detection using the final smoke detection model, the data to be detected can first be processed by the smoke basic detection model related to two-dimensional convolution. The detection frame output by the smoke basic detection model is then fused through a model fusion module into a fused detection frame that matches the input detection frame requirements of the smoke false detection removal model. This allows the smoke false detection removal model to perform three-dimensional convolution-related processing on the fused detection frame, ultimately obtaining a result indicating whether smoke is present in the data to be detected. As a result, the overall spatial complexity of the final smoke detection model of the present invention is lower than that of a network structure that fully utilizes three-dimensional convolution, and its operation speed is improved.
[0018] In one possible design, the basic smoke detection model includes a ResNet50 convolutional layer, an FPN feature fusion layer, an RPN layer, a ROI pooling layer, and a fully connected layer, wherein the ResNet50 convolutional layer, the FPN feature fusion layer, the ROI pooling layer, and the fully connected layer are connected in sequence, and the FPN feature fusion layer is also connected to the ROI pooling layer through the RPN layer.
[0019] In one possible design, obtaining the MR(2+1)D network model includes:
[0020] Obtaining an R(2+1)D module, and using the R(2+1)D module as a basic module of an MR(2+1)D network model;
[0021] Get the MCx module;
[0022] The R(2+1)D module and the MCx module are fused to obtain the MR(2+1)D network model.
[0023] In a possible design, the model fusion module adopts a MergeBox candidate box fusion module.
[0024] In one possible design, when obtaining any synthetic smoke data in the dataset, it includes:
[0025] Get the background image;
[0026] Generate simulated smoke images based on C4D software;
[0027] processing the simulated smoke image according to imaging parameters of the background image to obtain a processed simulated smoke image;
[0028] inserting the processed simulated smoke image into a designated position of the background image, so as to synthesize the processed simulated smoke image and the background image to obtain synthesized smoke data;
[0029] The position information of the processed simulated smoke image in the synthetic smoke data is obtained, and smoke label information is generated according to the position information.
[0030] In a possible design, the imaging parameters of the background image include a brightness parameter and a transparency parameter, and the processing of the simulated smoke image is implemented based on Python.
[0031] In a second aspect, the present invention provides a smoke detection model construction device for implementing any of the above-mentioned smoke detection model construction methods; the smoke detection model construction device comprises:
[0032] A first model building unit is used to obtain a Faster R-CNN network model and build a basic smoke detection model based on the Faster R-CNN network model;
[0033] A second model building unit is used to obtain an MR(2+1)D network model and build a smoke false detection removal model based on the MR(2+1)D network model;
[0034] an association unit, communicatively connected to the first model building unit and the second model building unit, for obtaining a model fusion module, and fusing the basic smoke detection model with the smoke false detection removal model through the model fusion module to obtain an initial smoke detection model;
[0035] A model training unit is communicatively connected to the association unit and is used to obtain a data set, wherein the data set includes multiple synthetic smoke data and smoke label information corresponding to the multiple synthetic smoke data; and is also used to train the initial smoke detection model according to the data set to obtain a final smoke detection model.
[0036] In a third aspect, the present invention provides an electronic device, comprising:
[0037] a memory for storing computer program instructions; and
[0038] A processor is configured to execute the computer program instructions to complete the operations of any of the above-mentioned methods for constructing a smoke detection model.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer program instructions readable by a computer, wherein the computer program instructions are configured to execute the operations of any of the above-mentioned methods for constructing a smoke detection model when run.
[0040] In a fifth aspect, the present invention provides a smoke detection method, comprising:
[0041] Obtain the data to be tested;
[0042] The data to be detected is input into the final smoke detection model generated by the smoke detection model construction method for processing to obtain a smoke detection result.
[0043] In a sixth aspect, the present invention provides a smoke detection system, comprising:
[0044] A data acquisition unit, used for acquiring data to be detected;
[0045] a data detection unit, communicatively connected to the data acquisition unit, for receiving the data to be detected, and detecting the data to be detected to obtain a smoke detection result;
[0046] The smoke alarm unit is in communication with the data detection unit and is used for generating a smoke alarm according to the smoke detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a structural diagram of the basic smoke detection model in the present invention;
[0048] Figure 2 It is a schematic diagram of obtaining the MR(2+1)D network model in the present invention;
[0049] Figure 3 Schematic diagram of the principle of spatiotemporal separable convolution of the MR(2+1)D network model in the present invention;
[0050] Figure 4 It is a schematic diagram of processing the data to be detected based on the final smoke detection model in the present invention;
[0051] Figure 5 It is a structural diagram of the smoke detection model building device of the present invention;
[0052] Figure 6 is a flow chart of the smoke detection method of the present invention;
[0053] Figure 7 It is a module block diagram of the smoke detection system in the present invention. DETAILED DESCRIPTION
[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0055] It should be understood that it should also be noted that in some alternative embodiments, the functions / acts that appear may be different from the order in which the figures appear. For example, depending on the functions / acts involved, they may actually be performed substantially concurrently, or two figures shown in succession may sometimes be performed in the reverse order.
[0056] Example 1:
[0057] A first aspect of this embodiment provides a method for constructing a smoke detection model, which can be executed by, but is not limited to, a computer device or a virtual machine with certain computing resources, such as a personal computer, a smart phone, a personal digital assistant, or a wearable device, or by a virtual machine, so as to improve the recall rate, accuracy, and running speed of the smoke detection model for smoke detection, while reducing the spatial complexity of the smoke detection model.
[0058] A method for constructing a smoke detection model may include, but is not limited to, the following steps:
[0059] S1. Obtain a Faster R-CNN network model and build a basic smoke detection model based on the Faster R-CNN network model. It should be noted that a network model capable of target detection, such as YOLO (You Only Look Once), can also be used to build the basic smoke detection model.
[0060] Specifically, if Figure 1As shown, the basic smoke detection model includes a ResNet50 convolutional layer (where ResNet stands for Residual Network), an FPN (Feature Pyramid Network) feature fusion layer, an RPN (Region Proposal Network) layer, an ROI (Region of Interest) pooling layer, and a fully connected layer. The ResNet50 convolutional layer, FPN feature fusion layer, ROI pooling layer, and fully connected layer are sequentially connected, and the FPN feature fusion layer is also connected to the ROI pooling layer through the RPN layer. It should be noted that the existing Faster R-CNN network model uses the VGG16 (Visual Geometry Group, super-resolution test sequence) model as the backbone network, which has a relatively high time complexity. As an improvement, in this embodiment, the basic smoke detection model uses ResNet50+FPN as the backbone network, wherein the time complexity of the ResNet50 model is less than that of the VGG16 model. At the same time, since the ResNet50 model uses a special bottleneck residual module, compared with the existing VGG16 model, it has the advantages of deep network, fast speed, and good accuracy. At the same time, in order to avoid the problem that the ResNet50 convolution layer has poor detection effect on small targets, in this embodiment, the FPN model is used to perform multi-scale feature fusion on the data output by the ResNet50 convolution layer, so as to enhance the detection ability of the basic smoke detection model for small targets, so that the smoke detection model can finally better detect smoke of different sizes.
[0061] S2. Obtain an MR(2+1)D network model and build a smoke false detection removal model based on the MR(2+1)D network model. It should be noted that a video detection model such as a C3D (Convolutional 3D) network model, an R(2+1)D (a spatiotemporal convolution module) network model, or an I3D (Interactive three dimensions) network model may also be used to build the smoke false detection removal model.
[0062] In this embodiment, the MR(2+1)D network model is obtained, such as Figure 2 Shown, including:
[0063] S201. Obtain an R(2+1)D module and use the R(2+1)D module as a basic module of the MR(2+1)D network model; specifically, the R(2+1)D module is a spatiotemporal separation convolution structure that splits the three-dimensional convolution into spatial convolution and temporal convolution;
[0064] S202. Obtain an MCx module (where MC stands for Mixed Convolution). Specifically, the MCx module is a network model that performs three-dimensional convolution followed by two-dimensional convolution.
[0065] S203. The R(2+1)D module and the MCx module are fused to obtain an MR(2+1)D network model. Specifically, the MR(2+1)D network model is a structure that fuses the R(2+1)D module and the MCx module, first performing spatiotemporal separation convolution and then performing two-dimensional convolution. In this embodiment, to ensure that the MR(2+1)D network model can load the training weights of the ResNet50 convolution layer so that it can be further trained on the basis of the basic smoke detection model, the MR(2+1)D network model can also be combined with the bottleneck module of the ResNet50 convolution layer, and the two-dimensional convolution in the bottleneck module is expanded to a three-dimensional convolution, so that a final MR(2+1)D network model with the same number of network layers as the ResNet50 convolution layer in the basic smoke detection model can be obtained.
[0066] It should be noted that MR(2+1)D combines the advantages of both the MCx network model and the R(2+1)D network model. Specifically, the R(2+1)D module is combined with the bottleneck module of the ResNet50 convolutional layer. That is, the weights of the R(2+1)D module are inflated using the pre-trained weights of the ResNet50 convolutional layer to obtain the initial weights of MR(2+1)D. This is used to determine the specific parameters and implementation structure of the MR(2+1)D network model.
[0067] It should be noted that there are two 1×1 convolution kernels in the bottleneck module of the ResNet50 convolution layer, which are used for dimensionality reduction and dimensionality increase respectively. On this basis, the time dimension is added to form the MR(2+1)D network model with spatiotemporal separable convolution. The principle of spatiotemporal separable convolution of the MR(2+1)D network model is as follows Figure 3 As shown, the 3D convolution kernel can still be used to separate the 3D convolution kernel in space and time. By setting the time t in the 3D convolution kernel to 1, the kernel's temporal size is 1, so the 3D convolution can be considered a 2D convolution. Then, by setting the kernel size d to 1, a convolution kernel that only convolves over time can be obtained. Combining the R(2+1)D module with the bottleneck module of the ResNet50 convolution layer significantly reduces the number of parameters and makes the smoke de-detection model based on the MR(2+1)D network model easier to train.
[0068] Specifically, in this embodiment, the structural parameters of the MR(2+1)D network model are shown in Table 1 below:
[0069]
[0070] Table 1
[0071] S3. Obtain a model fusion module, and fuse the basic smoke detection model with the smoke false detection removal model through the model fusion module to obtain an initial smoke detection model. Specifically, the output of the basic smoke detection model built based on the Faster R-CNN network model is a number of detection frames on each frame of the image, while the input of the smoke false detection removal model built based on the MR(2+1)D network model is 8 frames of images of the same size. If the basic smoke detection model is directly combined with the smoke false detection removal model, the problem of too many detection frames output by the basic smoke detection model and inconsistent sizes of the detection frames of the previous and next frames will occur. Therefore, it is necessary to use a model fusion module to fuse the detection frames in time and space to reduce time complexity.
[0072] In this embodiment, the model fusion module uses a MergeBox (a merge-sort algorithm) candidate frame fusion module. Specifically, in this embodiment, the MergeBox candidate frame fusion module can temporally fuse overlapping detection frames within the same frame. If any two detection frames output by the smoke basic detection model overlap, they are replaced with a larger detection frame encompassing both. It can also temporally fuse overlapping detection frames from different frames. Since the smoke de-false detection model requires 8 pictures of the same size as input, 8 frames of smoke should be cut out for each smoke in the 8 frames of images output by the smoke basic detection model. The size and position of a smoke should be consistent in the 8 images. The MergeBox candidate frame fusion module can calculate the IoU (Intersection over Union) of the detection frames of the 8 frames. If the IoU of the smoke detection frames of different frames is greater than the preset threshold k (in this embodiment, when the detection frames of different frames with overlapping positions are temporally fused, k is 0.8), these detection frames are considered to be the detection frames of the same smoke, and the fusion frame of these detection frames is taken as the input image of the smoke de-false detection model. Specifically, the IoU between the smoke detection frames corresponding to the first and second frames is first calculated. If the IoU > k, the smoke detection frame corresponding to the second frame is considered to be the same smoke detection frame as the smoke detection frame corresponding to the first frame, and the smoke detection frames corresponding to the first and second frames are fused to obtain the corresponding fused frame. Then, the IoU between the smoke detection frames corresponding to the second and third frames is calculated. If the IoU > k, the smoke detection frames corresponding to the second and third frames are fused to obtain the corresponding fused frame. This process is repeated until the calculation of the last frame is completed, or when the IoU between the smoke detection frames corresponding to any frame and the subsequent frame is ≤ k, the previously obtained fused frame is used as the input image of the smoke false detection model. It should also be noted that if overlapping detection frames in the same frame need to be spatially fused, k is set to 0.
[0073] S4. Acquire a data set, the data set including a plurality of synthetic smoke data and smoke label information corresponding to the plurality of synthetic smoke data, the smoke label information is used to mark the simulated smoke image in the synthetic smoke data;
[0074] In the existing technology, deep learning-related methods face the problem of lack of data sets. Since existing wildfire smoke data is scarce, and most of it is captured at close range in the later stages of the fire, the shape is clear and cannot be applied to actual detection by long-range cameras. In addition, because wildfire smoke is similar in shape to clouds, water vapor, fog, etc., it has many interferences and the number of target recognition false positives in a single frame image is high. To solve this technical problem, this embodiment further makes the following improvements: When obtaining any synthetic smoke data in the data set, it includes:
[0075] S401. Obtain a background image; specifically, in this embodiment, a video of a designated area may be captured by a telephoto and variable-focus camera as a background video, and then the background video may be cropped to obtain multiple background images.
[0076] S402. Generate a simulated smoke image using C4D software (Cinema 4D, a 3D production software developed by Maxon).
[0077] S403. Processing the simulated smoke image according to the imaging parameters of the background image to obtain a processed simulated smoke image;
[0078] In this embodiment, the imaging parameters of the background image include brightness and transparency. Processing of the simulated smoke image is performed using Python (a computer programming language) to enhance the integration of the simulated smoke image with the background image. During dataset generation, this embodiment adjusts smoke position, size, brightness, and transparency to create more realistic synthetic smoke data.
[0079] S404. Inserting the processed simulated smoke image into a designated position of the background image so as to synthesize the processed simulated smoke image with the background image to obtain synthesized smoke data;
[0080] S405. Obtain the position information of the processed simulated smoke image in the synthetic smoke data, and generate smoke tag information based on the position information. In this embodiment, the smoke tag information is the minimum rectangular frame drawn in the synthetic smoke data that contains the processed simulated smoke image, and the position information is the upper left corner coordinate information and the lower right corner coordinate information of the corresponding minimum rectangular frame.
[0081] The data set in this embodiment includes an image data set and / or a video data set. When obtaining a video data set, multiple frames of continuous simulated smoke images can be generated based on C4D software, so that the multiple frames of continuous simulated smoke images can be inserted into corresponding multiple identical background images respectively, thereby generating synthetic smoke data in video format, wherein the organizational format of the synthetic smoke data in video format can adopt the organizational format of the existing UCF101 video data set (an action recognition data set for realistic action videos).
[0082] During the implementation of this embodiment, C4D fluid simulation software is first used to generate several simulated smoke images, and then the simulated smoke images are fused with background images to construct image datasets and video datasets. In this process, since the dataset is synthesized based on the simulation software, it is easy to label the dataset, solving the problem of difficulty in collecting and labeling the dataset.
[0083] S5. Train the initial smoke detection model according to the data set to obtain a final smoke detection model.
[0084] In this embodiment, a schematic diagram of processing the data to be detected based on the final smoke detection model is shown in FIG. Figure 4 shown.
[0085] The beneficial effects of this embodiment are as follows:
[0086] 1) High recall and accuracy for smoke detection. Specifically, during implementation, this embodiment uses a smoke basic detection model built based on the Faster R-CNN network model to perform conventional target detection on the data to be detected, thereby improving the recall rate of smoke image detection. However, due to the high level of real-world interference in the data to be detected, the increased recall rate can easily lead to an increase in the false alarm rate. Therefore, this embodiment builds a smoke false alarm removal model based on the MR(2+1)D network model with spatiotemporal separable convolution to further detect the detection boxes output by the smoke basic detection model, thereby further reducing the false alarm rate while maintaining a high recall rate. During this process, due to the differences in the characteristics of the Faster R-CNN network model and the MR(2+1)D network model, the detection boxes output by the smoke basic detection model and the detection boxes required as input to the smoke false alarm removal model are inconsistent in size. Therefore, this embodiment fuses the smoke basic detection model with the smoke false alarm removal model through a model fusion module to achieve temporal and spatial fusion of the two models, reducing time complexity.
[0087] 2) The smoke detection model has low spatial complexity and fast operation speed. Specifically, because the smoke basic detection model in the final smoke detection model of this embodiment is built based on the Faster R-CNN network model, and the smoke false detection removal model is built based on the MR(2+1)D network model, when performing smoke detection using the final smoke detection model, the data to be detected can first be processed by the smoke basic detection model related to two-dimensional convolution. The detection frame output by the smoke basic detection model is then fused through the model fusion module into a fused detection frame that matches the input detection frame requirements of the smoke false detection removal model. This allows the smoke false detection removal model to perform three-dimensional convolution-related processing on the fused detection frame, ultimately obtaining a result indicating whether smoke is present in the data to be detected. As a result, the overall spatial complexity of the final smoke detection model of this embodiment is lower than that of a network structure that utilizes only three-dimensional convolution, and its operation speed is improved.
[0088] Example 2:
[0089] This embodiment provides a smoke detection model construction device for implementing the smoke detection model construction method in Example 1; Figure 5 As shown, the smoke detection model building device includes:
[0090] A first model building unit is used to obtain a Faster R-CNN network model and build a basic smoke detection model based on the Faster R-CNN network model;
[0091] A second model building unit is used to obtain an MR(2+1)D network model and build a smoke false detection removal model based on the MR(2+1)D network model;
[0092] an association unit, communicatively connected to the first model building unit and the second model building unit, for obtaining a model fusion module, and fusing the basic smoke detection model with the smoke false detection removal model through the model fusion module to obtain an initial smoke detection model;
[0093] A model training unit is communicatively connected to the association unit and is used to obtain a data set, wherein the data set includes multiple synthetic smoke data and smoke label information corresponding to the multiple synthetic smoke data; and is also used to train the initial smoke detection model according to the data set to obtain a final smoke detection model.
[0094] Example 3:
[0095] Based on Embodiment 1 or 2, this embodiment discloses an electronic device, which may be a smartphone, tablet computer, laptop computer, or desktop computer. The electronic device may be referred to as a terminal, portable terminal, desktop terminal, etc. The electronic device includes:
[0096] a memory for storing computer program instructions; and
[0097] A processor is configured to execute the computer program instructions to complete the operations of the smoke detection model construction method as described in any one of the embodiments 1.
[0098] Example 4:
[0099] Based on any one of Examples 1 to 3, this embodiment discloses a computer-readable storage medium for storing computer-readable computer program instructions, wherein the computer program instructions are configured to execute the operations of the smoke detection model construction method as described in Example 1 when run.
[0100] It should be noted that if the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or 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 various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0101] Example 5:
[0102] Based on Example 1, this embodiment discloses a smoke detection method, such as Figure 6 Shown, including:
[0103] Obtain the data to be tested;
[0104] The data to be detected is input into the final smoke detection model generated by the smoke detection model construction method for processing to obtain a smoke detection result, so as to perform a smoke alarm according to the smoke detection result.
[0105] Specifically, in this embodiment, the data to be detected is acquired from a camera. In the final smoke detection model, a basic smoke detection model based on the Faster R-CNN network model performs frame-by-frame detection on the video frames captured by the camera. The camera captures 24 frames per second. In this embodiment, a 2-second segment of background video is considered a segment, each segment having 48 frames. One frame is taken every 6 frames, resulting in 8 frames per 2-second segment. The detection results are then fused through a model fusion module, fusing the connected detection frames within each frame. Detection frames with an IoU (Interference over Union) greater than 0.8 between frames are then fused, resulting in a maximum frame for each smoke event. The size and position information of the maximum frame are then used to extract the smoke from the image, resulting in 8 frames. These frames are then fed into a smoke false detection model based on the MR(2+1)D network model for false detection. The output of the smoke false detection model is either smoke or not smoke. If the smoke false detection model determines that the 8 frames are smoke, the maximum frame information is output. If the smoke false detection model determines that the 8 frames are not smoke, the images are considered false detections and not output.
[0106] Example 6:
[0107] Based on Example 5, this embodiment discloses a smoke detection system, such as Figure 7 Shown, including:
[0108] A data acquisition unit, used for acquiring data to be detected;
[0109] a data detection unit, communicatively connected to the data acquisition unit, for receiving the data to be detected, and detecting the data to be detected to obtain a smoke detection result;
[0110] The smoke alarm unit is in communication with the data detection unit and is used for generating a smoke alarm according to the smoke detection result.
[0111] Obviously, those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0112] The above embodiments are intended only to illustrate the technical solutions of the present invention and are not intended to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art will appreciate that modifications may be made to the technical solutions described in the above embodiments, or that some of the technical features may be replaced with equivalents. Such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
[0113] Finally, it should be noted that the present invention is not limited to the aforementioned optional embodiments. Anyone can derive various other product forms based on the teachings of this invention. The aforementioned specific embodiments should not be construed as limiting the scope of protection of the present invention. The scope of protection of the present invention shall be determined by the claims, and the specification may be used to interpret the claims.
Claims
1. A smoke detection model construction method, characterized by: include: Obtain a Faster R-CNN network model and build a basic smoke detection model based on the Faster R-CNN network model; Obtaining an MR(2+1)D network model, and building a smoke false detection removal model based on the MR(2+1)D network model; Obtaining a model fusion module, and fusing the basic smoke detection model with the smoke false detection removal model through the model fusion module to obtain an initial smoke detection model; Acquire a data set, wherein the data set includes a plurality of synthetic smoke data and smoke label information corresponding to the plurality of synthetic smoke data respectively; Training the initial smoke detection model according to the data set to obtain a final smoke detection model; Obtain the MR(2+1)D network model, including: Obtaining an R(2+1)D module, and using the R(2+1)D module as a basic module of an MR(2+1)D network model; Get the MCx module; The R(2+1)D module and the MCx module are fused to obtain the MR(2+1)D network model.
2. The smoke detection model construction method according to claim 1, characterized in that: The basic smoke detection model includes a ResNet50 convolutional layer, an FPN feature fusion layer, an RPN layer, a ROI pooling layer, and a fully connected layer, wherein the ResNet50 convolutional layer, the FPN feature fusion layer, the ROI pooling layer, and the fully connected layer are connected in sequence, and the FPN feature fusion layer is also connected to the ROI pooling layer through the RPN layer.
3. The smoke detection model construction method according to claim 1, characterized in that: The model fusion module adopts the MergeBox candidate box fusion module.
4. The smoke detection model construction method according to claim 1, characterized in that: When obtaining any synthetic smoke data in the dataset, including: Get the background image; Generate simulated smoke images based on C4D software; processing the simulated smoke image according to imaging parameters of the background image to obtain a processed simulated smoke image; inserting the processed simulated smoke image into a designated position of the background image, so as to synthesize the processed simulated smoke image and the background image to obtain synthesized smoke data; The position information of the processed simulated smoke image in the synthetic smoke data is obtained, and smoke label information is generated according to the position information.
5. The smoke detection model construction method according to claim 4, characterized in that: The imaging parameters of the background image include a brightness parameter and a transparency parameter. When the simulated smoke image is processed, it is implemented based on Python.
6. A smoke detection model construction device, characterized by: Used to implement the smoke detection model construction method according to any one of claims 1 to 5; the smoke detection model construction device comprises: A first model building unit is used to obtain a Faster R-CNN network model and build a basic smoke detection model based on the Faster R-CNN network model; A second model building unit is used to obtain an MR(2+1)D network model and build a smoke false detection removal model based on the MR(2+1)D network model; an association unit, communicatively connected to the first model building unit and the second model building unit, for obtaining a model fusion module, and fusing the basic smoke detection model with the smoke false detection removal model through the model fusion module to obtain an initial smoke detection model; A model training unit is communicatively connected to the association unit and is used to obtain a data set, wherein the data set includes multiple synthetic smoke data and smoke label information corresponding to the multiple synthetic smoke data; and is also used to train the initial smoke detection model according to the data set to obtain a final smoke detection model.
7. An electronic device, characterized in that: include: a memory for storing computer program instructions; as well as, A processor is configured to execute the computer program instructions to complete the operation of the smoke detection model construction method according to any one of claims 1 to 5.
8. A computer-readable storage medium for storing computer program instructions readable by a computer, characterized in that: The computer program instructions are configured to execute the operations of the smoke detection model building method according to any one of claims 1 to 5 when executed.
9. A smoke detection method, characterized in that: include: Obtain the data to be tested; The data to be detected is input into a final smoke detection model generated according to the smoke detection model construction method according to any one of claims 1 to 5 for processing to obtain a smoke detection result.
Citation Information
Patent Citations
Straw combustion detection method based on feature pyramid network
CN111046728A
Faster RCNN fire smoke detection method based on improved deformable convolution
CN112749644A