Early fire rapid detection system and method based on VMama and YOLO
By adopting the EfficientMamba-YOLO model based on VMamba and YOLO in the fire detection system, combined with EVSSBlock and Atrous-based selective scanning technology, the existing fire detection system is solved, and the problem of unstable performance and difficulty in providing early warning in complex environments is achieved. Efficient and accurate fire detection.
Patent Information
- Application Number
- CN202411559135.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing fire detection systems perform unstable in complex environments, and are difficult to provide early warnings, and cannot respond to fire events quickly.
The early fire rapid detection system based on VMamba and YOLO is adopted. The system includes acquisition module, construction module, training module and detection module. Through the EfficientMamba-YOLO model combined with EVSSBlock and Atrous-based selective scanning technology, efficient fire detection is achieved.
Achieve higher detection accuracy with lower computing complexity, improve the automation level and efficiency of fire detection, reduce labor and time costs, and provide innovative technical solutions for fire prevention and control.
Smart Images

Figure CN119516468A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer vision and deep learning, and in particular to an early fire rapid detection system and method based on VMamba and YOLO. Background Art
[0002] Fire is one of the major disasters that causes loss of life and property. Timely detection and handling of fire can significantly reduce losses. Traditional fire detection methods mainly rely on smoke detectors and heat detectors, which usually can only sound an alarm within a period of time after the fire occurs and are difficult to provide early warning. Therefore, it is particularly important to develop an efficient and real-time fire detection system.
[0003] In recent years, computer vision technology has developed rapidly, especially driven by deep learning, the accuracy and efficiency of target detection and image recognition have been significantly improved. By analyzing the image data in the video stream, computer vision technology can identify fire characteristics such as flames and smoke in real time, providing more accurate detection and early warning. Although fire detection technology based on deep learning has made some progress, there are still some shortcomings: the performance of existing models may be unstable in complex environments (such as thick smoke, light changes, etc.); the fire detection system needs to have a rapid response capability to ensure that fire incidents can be handled in a timely manner.
[0004] Object detection is an important task in computer vision, which involves identifying and locating specific objects in an image. YOLO (You Only Look Once) series of algorithms are widely used in various scenarios due to their high efficiency and real-time performance. EfficientMamba-YOLO is an improved version of YOLO, focusing on improving the speed and accuracy of object detection, and is particularly suitable for fire detection in complex scenes.
[0005] Compared with the traditional YOLO model, EfficientMamba-YOLO has the following advantages: By optimizing the network structure, Efficient Mamba-YOLO can achieve real-time detection with lower computing resources, and is suitable for use in resource-limited environments; by introducing more advanced feature extraction methods, Efficient Mamba-YOLO has stronger recognition capabilities in fire detection scenarios and can effectively distinguish flames from other interference factors; Efficient Mamba-YOLO can quickly adapt to different detection tasks through transfer learning, especially in fire scenarios, and can identify a variety of fire characteristics.
[0006] PyQt5 is a framework for creating graphical user interfaces that helps developers quickly build feature-rich and beautiful applications. In the real-time fire detection system, PyQt5 can be used to implement the user interface, allowing users to easily monitor real-time video streams, view detection results, and receive alarm information. Its ease of use and flexibility make the system easier to operate and maintain. Summary of the invention
[0007] In order to solve the technical problems in the above background, the present invention provides the following technical solutions:
[0008] An early fire rapid detection system based on VMamba and YOLO, comprising: an acquisition module, a construction module, a training module and a detection module;
[0009] The acquisition module is used to acquire and process image data of fire to obtain a training set and a test set;
[0010] The building module is used to build a fire detection model based on VMamba and YOLO;
[0011] The training module is used to train the fire detection model using the training set to obtain a final model;
[0012] The detection module is used to perform rapid detection of early fire using the final model.
[0013] Preferably, the acquisition module performs target detection data annotation and preprocessing based on the acquired image data to obtain a training set and a test set; the images in the training set and the test set are both labeled with "flame" and "smoke".
[0014] Preferably, the constructed fire detection model uses YOLOv8 as the baseline network, and uses EVSSBlock improved based on VMamba and atrous-based selective scanning as a new feature extraction module to replace the original convolution module of YOLOv8 to perform global feature extraction, so as to achieve higher detection accuracy with lower computational complexity.
[0015] Preferably, the fire detection model includes: Backbone, Neck and Head;
[0016] Backbone consists of simple EVSSBlock, Stem, and Downsample Block;
[0017] Neck uses the EVSSBlock module to capture more gradient-rich information flows;
[0018] Head is used for the final detection task, including bounding box regression and category classification.
[0019] Preferably, the feature processing process of the EVSSBlock includes:
[0020]
[0021] Z l-1 =ES2D(LN(CB(Z l-2 )))+Z l-2
[0022] Z l =MLP(LN(Z l-1 ))+Z l-1
[0023] in, represents the activation function; Z l-3 and Z l Represents input and output features respectively; CB and MLP represent ConvBlock and Multi-LayerPerception respectively; Z l-1 It indicates the intermediate state after ES2D scans and then SSM calculates the scanned sequence; Z l-2 Represents the input features processed by convolution and batch normalization; BN represents batch normalization, LN represents layer normalization; Conv 1×1 Represents a 1×1 convolution.
[0024] Preferably, the Mamba architecture is integrated with ConvBlock to enhance the capture of local features, and the process includes: for a given input feature, first operate each channel individually through a depth-wise separable convolution, and then perform batch normalization to obtain an intermediate state; the intermediate state mixes channel information through a 1×1 convolution, and retains the distribution of information through an activation function; finally, the original input is fused with the processed features through a residual connection; wherein the activation function of ConvBlock uses a nonlinear GELU, which is used to change the number of channels of the feature without changing the spatial dimension, thereby enhancing the feature representation.
[0025] Preferably, it also includes: a visual user interface for performing data analysis and subsequent fire handling decisions based on user configuration.
[0026] Preferably, it also includes: a real-time monitoring module, including a K210 development board with an external camera, a power module, a gyroscope or accelerometer, a heat dissipation device and other components, the power module provides the required power for the servo and the K210 development board to ensure the normal operation of the system; the gyroscope or accelerometer is used to obtain the attitude information of the device, so as to achieve more accurate tracking; the heat dissipation device maintains the normal operating temperature of the K210 development board and the servo during operation; the No. 1 servo drives the development board to move up and down, and the No. 2 servo drives the development board to move left and right, and the two servos can freely and synchronously adjust the position and direction of the camera.
[0027] The present invention also provides an early fire rapid detection method based on VMamba and YOLO, the method is applied to the above system, and the steps include:
[0028] Collect and process fire image data to obtain training sets and test sets;
[0029] Build a fire detection model based on VMamba and YOLO;
[0030] Using the training set to train the fire detection model to obtain a final model;
[0031] The final model is used for rapid detection of early-stage fires.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] The present invention collects image and video data through a cloud database and a drone monitoring module, and combines the EfficientMamba-YOLO model to achieve efficient fire detection. In addition, the present invention achieves higher detection accuracy with lower computational complexity, which not only improves the automation level and efficiency of fire detection, reduces manpower and time costs, but also provides an innovative technical solution for fire prevention and control. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 A schematic diagram of the system structure of an embodiment of the present invention;
[0036] Figure 2 It is a schematic diagram of the EVSSBlock structure of an embodiment of the present invention;
[0037] Figure 3Schematic diagram of the fire detection model structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] EVSSBlock: The feature extraction module based on Vision Mamba is called Visual State Space Block (VSSBlock). The present invention is modified based on VSSBlock, and the efficiency is improved, so it is called EfficientVSSBlock (EVSSBlock).
[0041] ES2D: The image scanning method originally used in Vision Mamba is 2D-Selective-Scan (SS2D). The present invention applies the more efficient Efficient 2D-Selective-Scan in Vision Mamba and is therefore called ES2D.
[0042] SSM: State Space Model (SSM), which is very popular recently.
[0043] ConvBlock: The present invention is based on the convolution module used in VSSBlock to improve its local information extraction capability, which is called ConvBlock.
[0044] Embodiment 1
[0045] like Figure 1 The system structure diagram of the present invention is shown in FIG. 1 , which includes: an acquisition module, a construction module, a training module and a detection module; the acquisition module is used to acquire and process the image data of the fire to obtain a training set and a test set; the construction module is used to build a fire detection model based on VMamba and YOLO; the training module is used to train the fire detection model using the training set to obtain a final model; the detection module is used to use the final model to quickly detect early fires. In addition, it also includes: a visual user interface for data analysis and subsequent fire handling decisions based on user configuration.
[0046] The following describes in detail how the present invention solves the technical problems in practical work in conjunction with the present embodiment.
[0047] In this embodiment, the acquisition module uses the D-Fire fire detection data set to construct a fire training set and a test set; wherein the images in the training set and the test set are both labeled with "flame" and "smoke".
[0048] Thus, multiple labeled fire detection datasets are obtained: The input image data is xi, and the corresponding TXT format truth label y i .
[0049] After that, the construction module builds a fire detection model based on VMamba and YOLO. Specifically, YOLOv8 is used as the baseline network, and EVSSBlock (such as Figure 2 As shown in the figure, YOLOv8 is used as a new feature extraction module to replace the original convolution module of YOLOv8, so that it can have a global feature extraction capability similar to Transformer while maintaining linear complexity, thereby achieving higher detection accuracy with lower computational complexity.
[0050] (1) Fire detection model based on VMamba and YOLO
[0051] Specifically, based on YOLOv8, the convolutional modules composed of CNN in the trunk and neck are replaced with EVSSBlock composed of VisionMamba to improve the global feature extraction capability of the network without increasing the computational complexity, thereby improving the detection accuracy of the YOLO model. The convolutional module (ConvBlock) is added to solve the problem of insufficient local feature extraction of VisionMamba to further improve the model detection accuracy. In addition, the ES2D scanning method is used to further reduce the computational complexity of the YOLO model, so that the network can meet the needs of practical applications.
[0052] The architecture overview of EfficientMamba-YOLO is as follows Figure 3As shown. The fire detection model of this embodiment is divided into Backbone (backbone network), Neck (neck network) and Head (head network). Backbone is composed of simple EVSSBlock, Stem, and Downsample Block. In the neck, this embodiment follows the use of EVSSBlock modules instead of C2f to design the neck part to capture more gradient-rich information flows. Backbone first downsamples through the Stem module to obtain a 2D feature map with a resolution of H / 4 and W / 4. Then in Backbone, feature extraction is performed through EVSSBlock and further downsampling is performed through DownsampleBlock. Then, features are further processed and fused through Neck. By integrating feature maps of different scales, rich contextual information is provided to the detection head. Head is responsible for the final detection task, including bounding box regression and category classification. It receives the features processed by Neck and outputs the final prediction results.
[0053] (2) EVSSBlock improved based on VMamba and atrous-based selective scanning
[0054] The above-mentioned EVSSBlock, which is improved based on VMamba and Atrous-based selective scanning, aims to build a new backbone network. This architecture applies the SSM-based state space transition model to YOLO to effectively capture global dependencies and leverage the strength of local convolutions to improve detection accuracy and the model's understanding of complex scenes while maintaining real-time performance:
[0055] The feature processing process of EVSSBlock can be expressed as:
[0056]
[0057] Z l-1 =ES2D(LN(CB(Z l-2 )))+Z l-2
[0058] Z l =MLP(LN(Z l-1 ))+Z l-1
[0059] in, represents the activation function; Z l-3 and Z l Represents input and output features respectively; CB and MLP represent ConvBlock and Multi-LayerPerception respectively; Zl-1 It indicates the intermediate state after ES2D scans and then SSM calculates the scanned sequence; Z l-2 Represents the input features processed by convolution and batch normalization; BN represents batch normalization, LN represents layer normalization; Conv 1×1 Represents a 1×1 convolution.
[0060] The ES2D module improved by atrous-based selective scanning skips scanning all image blocks with a step size of p, reducing the calculated sequence length from 4N in the SS2D method to N, effectively reducing unnecessary calculations, thereby significantly improving the overall calculation efficiency. Specifically, given an input feature map x∈R C×H×W , unlike cross-scanning all image blocks, the ES2D scanning method skips scanning all image blocks with a step size p and divides them into a selected spatial dimension feature set
[0061]
[0062] In the formula, [:,m::p,n::p] means slicing the matrix of each channel, starting from index m on the height (H) and index n on the width (W), skipping once every p steps, and then sampling on the obtained (C,H / p,W / p) image blocks with an interval of p. This method greatly improves the feature extraction efficiency without losing the receptive field.
[0063] The Mamba architecture has been shown to be effective in capturing long-range ground dependencies. However, it faces some challenges in extracting local features when dealing with tasks involving complex scale variations. To compensate for this shortcoming, this paper enhances the capture of local features by integrating ConvBlock. For a given input feature X l-2 First, we use the depthwise separable convolution to operate each channel separately to effectively extract the local spatial information of the input features, and then perform batch normalization to reduce overfitting while providing a certain regularization effect to obtain the intermediate state X l-1 :
[0064] X l-1 =BN(DWConv 3×3 (X l-2 ))
[0065] Intermediate state X l-1Mixing channel information through 1×1 convolution and better preserving the distribution of information through activation functions enables the model to learn more complex feature representations that can extract rich multi-scale contextual information from the input feature map. In ConvBlock, the activation function uses nonlinear GELU to change the number of channels of the feature without changing the spatial dimension, thereby enhancing the feature representation. Finally, the original input is fused with the processed features through residual connections. Allowing the model to understand and integrate features of different dimensions in the image, thereby enhancing robustness to scale changes.
[0066] X l =Conv 1×1 (Φ(Conv 1×1 (X l-1 )))+X l-2
[0067] Where, X l is the output feature; Φ represents the activation function.
[0068] ConvBlock can effectively capture and represent the local spatial information of the input feature map, and fuse it with the original input to enhance the feature representation, so that the fire detection model of this embodiment has a powerful ability to process scale changes and contextual information in visual data.
[0069] After the model is built, the fire detection model is trained using the training set to obtain the final model. The detection module deploys the final model on the terminal, obtains the real-time video or image data of the drone at the required detection location based on the back-end program, and inputs the video stream or image data of the fire to be detected into the final model to complete the early detection of the fire.
[0070] The specific steps of training include: The image data obtained by the acquisition module is used to train the YOLO fire detection model. First, the data set is divided into a training set and a validation set. Among them, the training set images have two labels, "fire" and "smoke". Multiple labeled data sets are Input image data is x i And the corresponding TXT format truth label y i . Then, the YOLO garbage fire detection model is trained using the constructed garbage overflow training set to obtain the trained garbage overflow detection model. During the training process, EfficientMamba-YOLO is selected as the pre-training model, which not only ensures the lightweight of the model but also the real-time performance of the model detection. After the trained YOLO fire detection model is packaged into an executable program and deployed to the local terminal, the real-time video data of the drone at the required detection location is obtained based on the back-end program to perform real-time fire monitoring.
[0071] The calculation formula for the positive and negative sample allocation strategy is:
[0072] t=s α +u β
[0073] Where t represents the measure of the degree of alignment between each anchor box and the groundtruth (GT); s is the prediction score corresponding to the labeled category, u is the IOU of the predicted box and the target box, and α / β are weight hyperparameters.
[0074] The loss function is calculated as:
[0075] L total =L bce +L cls +L dfl ;
[0076] L bce = -ylog(p)-(1-y)log(1-p);
[0077]
[0078] L dfl =-(i+1-y)log(y i )-(yi)log(y i+1 );
[0079]
[0080] Where, L bce is the standard binary cross entropy loss, L cls To calculate the intersection-over-union ratio between the predicted box and the target real box, L dfl is the distribution focus loss, y is the real target category, p is the predicted target category, c is the diagonal length of the minimum enclosing rectangular box, ρ is the Euclidean distance between the two, b is the coordinate of the center point of the predicted box, and b gt is the coordinate of the center point of the target real box, αν is the aspect ratio hyperparameter of the predicted box and the target real box, IoU is the intersection over union ratio of the predicted box and the target real box, y i is the predicted sequence value, (w gt ,h gt ), (w,h) are the width and height of the target real box and the predicted box respectively.
[0081] In addition, the system also records and displays the history of detected images, including the image name, upload time, number of targets, recognition results, save path and processing time, which is convenient for users to compare and analyze and trace events. The user interface provides flexible setting options, allowing users to select the source of video data. The system also includes a confidence display bar to show the credibility of the detection results, helping users quickly judge the reliability of the results.
[0082] In this embodiment, a visual user interface is also provided for data analysis and subsequent fire handling decisions based on user configuration. The interface can display video frames in real time, and users can understand the current fire situation through these video streams. Specifically, PyQt5 is a Python language implementation of the Qt framework, developed by Riverbank Computing, and is one of the most powerful GUI libraries. PyQt5 provides a well-designed window control set that can run cross-platform on Linux, Windows, and Mac OS systems, using IDE for interface design and automatically generating executable Python code; PyQt5 consists of a series of Python modules, with more than 620 classes, 6,000 functions and methods, and the main modules are Qt Core, Qt GUI, and QtWidgets.
[0083] In addition, the system also records and displays the history of detected images, including the image name, upload time, number of targets, recognition results, save path and processing time, which is convenient for users to compare and analyze and trace events. The user interface provides flexible setting options, allowing users to select the source of video data. The system also includes a confidence display bar to show the credibility of the detection results, helping users quickly judge the reliability of the results.
[0084] After the model is built, trained, and deployed, the system tracks the regional situation through the real-time monitoring module to achieve early warning of fire. The real-time monitoring module consists of components such as the K210 development board with an external camera, a power module, a gyroscope or accelerometer, and a heat sink. The power module provides the required power for the servo and the K210 development board to ensure the normal operation of the system; the gyroscope or accelerometer is used to obtain the attitude information of the device to achieve more accurate tracking; the heat sink maintains the normal operating temperature of the K210 development board and the servo; the No. 1 servo drives the development board up and down, and the No. 2 servo drives the development board left and right. The two servos can freely and synchronously adjust the position and direction of the camera.
[0085] K210 is a system-level chip that integrates machine vision and machine hearing capabilities. The KPU (Knowledge Processing Unit) inside it is a neural network processor that can speed up the reasoning process on previously trained models. KPU has built-in convolution, batch normalization, activation and pooling operation units. The maximum fixed-point model size for real-time operation is 5.0~5.9MiB, and supports 1×1 and 3×3 convolution kernels. Using the OV2640 camera to obtain images, KPU detects each frame of the video stream. After obtaining the position of the fire target in the image, the distance parameter between the fire frame selection center and the image center is passed to the PID process. The PID controls the pan-tilt to move in real time to keep the fire frame selection center in the center of the video to achieve the purpose of automatically tracking the fire. After many tests, when the PID parameters KP is 0.23, KI is 0, and KD is 0.015, the pan-tilt can track fires quickly, stably and accurately.
[0086] Embodiment 2
[0087] This embodiment also provides a method for rapid early fire detection based on VMamba and YOLO, the steps comprising:
[0088] S1. Collect and process fire image data to obtain training sets and test sets.
[0089] The D-Fire fire detection dataset is used, and the image data in it is processed to construct a fire training set and a test set; both the training set and the test set images have two labels: "flame" and "smoke".
[0090] Thus, multiple labeled fire detection datasets are obtained: The input image data is xi, and the corresponding TXT format truth label yi.
[0091] S2. Build a fire detection model based on VMamba and YOLO.
[0092] Specifically, YOLOv8 is used as the baseline network, and EVSSBlock, which is improved based on VMamba and Atrous-based selective scanning, is used as a new feature extraction module to replace the original convolution module of YOLOv8, so that it can have a global feature extraction capability similar to Transformer while maintaining linear complexity, thereby achieving higher detection accuracy with lower computational complexity.
[0093] EVSSBlock, which is improved based on VMamba and Atrous-based selective scanning, aims to build a new backbone network. This architecture applies the SSM-based state space transition model to YOLO to effectively capture global dependencies and leverage the strength of local convolutions to improve detection accuracy and the model's understanding of complex scenes while maintaining real-time performance:
[0094] The feature processing process of EVSSBlock can be expressed as:
[0095]
[0096] Z l-1 =ES2D(LN(CB(Z l-2 )))+Z l-2
[0097] Z l =MLP(LN(Z l-1 ))+Z l-1
[0098] in, represents the activation function; Z l-3 and Z l Represents input and output features respectively; CB and MLP represent ConvBlock and Multi-LayerPerception respectively; Z l-1 It indicates the intermediate state after ES2D scans and then SSM calculates the scanned sequence; Z l-2 Represents the input features processed by convolution and batch normalization; BN represents batch normalization, LN represents layer normalization; Conv 1×1 Represents a 1×1 convolution.
[0099] The ES2D module improved by atrous-based selective scanning skips scanning all image blocks with a step size of p, reducing the calculated sequence length from 4N in the SS2D method to N, effectively reducing unnecessary calculations, thereby significantly improving the overall calculation efficiency. Specifically, given an input feature map x∈R C×H×W , unlike cross-scanning all image blocks, the ES2D scanning method skips scanning all image blocks with a step size p and divides them into a selected spatial dimension feature set
[0100]
[0101] In the formula, [:,m::p,n::p] means slicing the matrix of each channel, starting from index m on the height (H) and index n on the width (W), skipping once every p steps, and then sampling on the obtained (C,H / p,W / p) image blocks with an interval of p. This method greatly improves the feature extraction efficiency without losing the receptive field.
[0102] The Mamba architecture has been shown to be effective in capturing long-range ground dependencies. However, it faces some challenges in extracting local features when dealing with tasks involving complex scale variations. To compensate for this shortcoming, this paper enhances the capture of local features by integrating ConvBlock. For a given input feature X l-2 First, we use the depthwise separable convolution to operate each channel separately to effectively extract the local spatial information of the input features, and then perform batch normalization to reduce overfitting while providing a certain regularization effect to obtain the intermediate state X l-1 :
[0103] X l-1 =BN(DWConv 3×3 (X l-2 ))
[0104] Intermediate state X l-1 Mixing channel information through 1×1 convolution and better preserving the distribution of information through activation functions enables the model to learn more complex feature representations that can extract rich multi-scale contextual information from the input feature map. In ConvBlock, the activation function uses nonlinear GELU to change the number of channels of the feature without changing the spatial dimension, thereby enhancing the feature representation. Finally, the original input is fused with the processed features through residual connections. Allowing the model to understand and integrate features of different dimensions in the image, thereby enhancing robustness to scale changes.
[0105] X l =Conv 1×1 (Φ(Conv 1×1 (X l-1 )))+X l-2
[0106] Where, X l is the output feature; Φ represents the activation function.
[0107] ConvBlock can effectively capture and represent the local spatial information of the input feature map, and fuse it with the original input to enhance the feature representation, so that the fire detection model of this embodiment has a powerful ability to process scale changes and contextual information in visual data.
[0108] S3. Use the training set to train the fire detection model to obtain the final model.
[0109] S4. Use the final model to quickly detect early-stage fires.
[0110] The final model is deployed on the terminal, and the real-time video or image data of the drone at the required detection location is obtained based on the back-end program. The video stream or image data of the fire to be detected is input into the final model to complete the early detection of the fire.
[0111] In this embodiment, a visual user interface is also provided for data analysis and subsequent fire handling decisions based on user configuration. The interface can display video frames in real time, and users can understand the current fire situation through these video streams. In addition, the system also records and displays the historical records of detected images, which include the image name, upload time, number of targets, recognition results, save path and processing time, so that users can compare and analyze and trace events. The user interface provides flexible setting options, allowing users to select the source of video data. The system also includes a confidence display bar that shows the credibility of the detection results and helps users quickly judge the reliability of the results.
[0112] After the model is built, trained, and deployed, the pan-tilt tracking device is used to track the regional situation in real time, thereby achieving early warning of fires.
[0113] K210 is a system-level chip that integrates machine vision and machine hearing capabilities. The KPU (Knowledge Processing Unit) inside it is a neural network processor that can speed up the reasoning process on previously trained models. KPU has built-in convolution, batch normalization, activation and pooling operation units. The maximum fixed-point model size for real-time operation is 5.0~5.9MiB, and supports 1×1 and 3×3 convolution kernels. Using the OV2640 camera to obtain images, KPU detects each frame of the video stream. After obtaining the position of the fire target in the image, the distance parameter between the fire frame selection center and the image center is passed to the PID process. The PID controls the pan-tilt to move in real time to keep the fire frame selection center in the center of the video to achieve the purpose of automatically tracking the fire. After many tests, when the PID parameters KP is 0.23, KI is 0, and KD is 0.015, the pan-tilt can track fires quickly, stably and accurately.
[0114] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. An early fire rapid detection system based on VMamba and YOLO, characterized in that: include: Acquisition module, construction module, training module and detection module; The acquisition module is used to acquire and process image data of fire to obtain a training set and a test set; The building module is used to build a fire detection model based on VMamba and YOLO; The training module is used to train the fire detection model using the training set to obtain a final model; The detection module is used to perform rapid detection of early fire using the final model.
2. The early fire rapid detection system based on VMamba and YOLO according to claim 1 is characterized in that: The acquisition module performs target detection data annotation and preprocessing based on the acquired image data to obtain a training set and a test set; the images in the training set and the test set are both labeled with "flame" and "smoke".
3. The early fire rapid detection system based on VMamba and YOLO according to claim 1 is characterized in that: The constructed fire detection model uses YOLOv8 as the baseline network, and uses EVSSBlock improved based on VMamba and atrous-based selective scanning as a new feature extraction module to replace the original convolution module of YOLOv8 to perform global feature extraction, so as to achieve higher detection accuracy with lower computational complexity.
4. The early fire rapid detection system based on VMamba and YOLO according to claim 3 is characterized in that: The fire detection model includes: Backbone, Neck and Head; Backbone consists of simple EVSSBlock, Stem, and Downsample Block; Neck uses the EVSSBlock module to capture more gradient-rich information flows; Head is used for the final detection task, including bounding box regression and category classification.
5. The early fire rapid detection system based on VMamba and YOLO according to claim 3 is characterized in that: The processing process of the feature by the EVSSBlock includes: WITH l-1 =ES2D(LN(CB(Z l-2 )))+Z l-2 WITH l =MLP(LN(Z l-1 ))+Z l-1 in, represents the activation function; Z l-3 and Z l Represents input and output features respectively; CB and MLP represent ConvBlock and Multi-LayerPerception respectively; Z l-1 It indicates the intermediate state after ES2D scans and then SSM calculates the scanned sequence; Z l-2 Represents the input features processed by convolution and batch normalization; BN represents batch normalization, LN represents layer normalization; Conv 1×1 Represents a 1×1 convolution.
6. The early fire rapid detection system based on VMamba and YOLO according to claim 5 is characterized in that: The Mamba architecture is integrated with ConvBlock to enhance the capture of local features. The process includes: for a given input feature, each channel is operated separately through depthwise separable convolution, and then batch normalization is performed to obtain an intermediate state; the intermediate state mixes channel information through 1×1 convolution, and the distribution of information is preserved through the activation function; finally, the original input is fused with the processed features through residual connection; among them, the activation function of ConvBlock uses nonlinear GELU to change the number of channels of the feature without changing the spatial dimension, thereby enhancing the feature representation.
7. The early fire rapid detection system based on VMamba and YOLO according to claim 1 is characterized in that: Also includes: Visual user interface for data analysis and subsequent fire handling decisions based on user configuration.
8. The early fire rapid detection system based on VMamba and YOLO according to claim 1 is characterized in that: Also includes: The real-time monitoring module includes a K210 development board with an external camera, a power module, a gyroscope or accelerometer, a heat sink and other components. The power module provides the required power for the servo and the K210 development board to ensure the normal operation of the system; the gyroscope or accelerometer is used to obtain the attitude information of the device to achieve more accurate tracking; the heat sink maintains the normal operating temperature of the K210 development board and the servo during operation; the No. 1 servo drives the development board to move up and down, and the No. 2 servo drives the development board to move left and right. The two servos can freely and synchronously adjust the position and direction of the camera.
9. A method for rapid early fire detection based on VMamba and YOLO, the method being applied to the system according to any one of claims 1 to 8, characterized in that the steps include: Collect and process fire image data to obtain training sets and test sets; Build a fire detection model based on VMamba and YOLO; Using the training set to train the fire detection model to obtain a final model; The final model is used for rapid detection of early-stage fires.
Citation Information
Patent Citations
Fire smoke detection method based on lightweight YOLOv8
CN118196489A
Forest fire detection method based on improved YOLOv5 network
CN118537757A