Building fire point identification and detection method and system based on unmanned aerial vehicle carrier
By integrating edge service detectors into drone carriers, planning flight trajectories, and using an improved YOLOv11-n-MobileNetV3 algorithm model, the problem of insufficient fire monitoring capabilities in buildings was solved, achieving early and accurate fire point and smoke identification, and reducing fire hazards.
Patent Information
- Application Number
- CN202510681036.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-23
AI Technical Summary
Existing fire monitoring methods for buildings have problems such as false alarms, limited coverage areas, delayed alarms for slow smoldering fires, no monitoring systems in old buildings, and insufficient monitoring capabilities.
A fire point identification and detection method based on drone carriers is adopted. By integrating edge service detectors with drones, planning flight trajectories, building training datasets, and using the improved YOLOv11-n-MobileNetV3 algorithm model to identify fire points and smoke, and provide real-time monitoring and early warning.
It achieves early and accurate identification of fire points and smoke, covers a wide area, reduces fire hazards, and provides better urban safety solutions.
Smart Images

Figure CN120689775A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for identifying and detecting fire points in buildings based on an unmanned aerial vehicle (UAV) carrier. Background Art
[0002] Fires in urban buildings pose a serious threat to life, safety, and property, and should be detected and addressed as quickly as possible. Currently, there are two common automatic detection methods: visual recognition and automatic smoke alarm monitoring systems. By the time the human eye detects a fire, it has often already spread and intensified, preventing early warning. Automatic smoke alarm monitoring systems have certain shortcomings. First, they are susceptible to false alarms due to non-fire causes such as steam and dust. Second, their coverage area is limited. Third, alarms are delayed for slowly smoldering fires. Fourth, poor maintenance reduces sensitivity. Fifth, some older buildings lack automatic smoke alarm systems.
[0003] Insufficient monitoring capabilities after a fire in a building is a technical problem that needs to be solved. Summary of the Invention
[0004] The technical task of the present invention is to address the above shortcomings and provide a fire point identification and detection method and system for buildings based on drone carriers to solve the technical problem of insufficient monitoring capabilities after a fire occurs in a building.
[0005] The present invention provides a fire point identification and detection method for a building based on an unmanned aerial vehicle (UAV) carrier, comprising the following steps:
[0006] Detection equipment configuration: Integrate the edge service detector with the drone to obtain the drone detection equipment;
[0007] Drone cruise configuration: Configure the drone's flight trajectory planning, field of view, and deflection angle based on the building environment, and determine the frame rate and clarity of the drone's video according to the video streaming situation;
[0008] Dataset construction: Collect historical images taken by drones, perform background processing, image rotation, image scaling, and image stitching on the historical images to obtain processed images, and construct a training dataset based on the processed images;
[0009] Data labeling: For the images in the training dataset, two labels, fire point and smoke, are set, and the images in the training dataset are labeled to obtain label information. The label information includes label type and marking box information;
[0010] Model construction: The MobileNetV3 module is embedded in the improved YOLOv11-n algorithm model, and a new YOLOv11-n-MobileNetV3 algorithm model is constructed as a fire point recognition model. The fire point recognition model is used to identify fire points and smoke based on the input image and predict and generate recognition types, including fire points and smoke.
[0011] Model training: The constructed fire point recognition model is trained based on the training data set to obtain the final trained fire point recognition model;
[0012] Model deployment: The final trained fire point recognition model is deployed in a lightweight manner on the edge service detector;
[0013] Real-time monitoring: Based on the UAV flight trajectory planning and setting of the UAV cruise route, the UAV detection equipment cruises along the UAV cruise route and collects images as the images to be tested and records the position coordinates of the points. The images to be tested are used as input and the fire point and smoke are identified through the final trained fire point recognition model, and the prediction results are output, and an early warning is issued based on the prediction results.
[0014] Preferably, the dataset construction includes the following steps:
[0015] Collect historical videos and images of the target building, analyze and filter the historical videos and images to obtain effective images;
[0016] Collect online images and public images, analyze and filter them to obtain valid images;
[0017] For each valid image, keep the image with fire smoke as the initial image;
[0018] Perform image cropping on the initial image, extract the target with the fire point and smoke as the target, and obtain an image with the target object;
[0019] Performing image operations on the image with the target object, mosaicing the background in the image to block the background, and obtaining a background-processed image;
[0020] Performing a rotation operation on the background processed image to obtain a rotated image;
[0021] For the rotated image, the image whose pixels are within a predetermined range is subjected to target scaling, and the image whose pixels are smaller than a predetermined value is deleted to obtain a scaled image;
[0022] Perform image stitching on the scaled images to obtain the final processed image.
[0023] Preferably, when annotating images in the training data set, rectangular boxes are used as drawing rules. Correspondingly, the marking box information includes the horizontal axis coordinates of the marking box center point, the vertical axis coordinates of the marking box center point, the marking box width, and the marking box length.
[0024] As a preference, for the fire point recognition model, on the basis of YOLOv11-n, a MobileNetV3 network structure with HSwish nonlinear activation function, NAS search global structure, NetAdapt search layer structure, and SE structure is added. The fire point recognition model has the following operations:
[0025] Input stage: The input image first passes through the C3K2 module of YOLOv11-n for feature extraction and outputs a feature map;
[0026] Feature enhancement stage: The feature map extracted from the input node is input into the C2PSA module, and the feature map is weighted through the point-wise spatial attention mechanism to obtain the feature map after feature enhancement;
[0027] Detection stage: The enhanced feature map is input into the DW module, which uses depthwise separable convolution to design the detection head and output detection frames of different scales to achieve multi-scale detection of fire points and smoke.
[0028] Among them, the expression of HSwish nonlinear activation function is as follows:
[0029]
[0030] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0031]
[0032] Where m represents the model, ACC(m) is the accuracy of the model, LAT(m) is the latency of the model, and TAR is the target
[0033] Target delay, w = -0.15 is the weight factor;
[0034] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0035] Among them, Score is the score value for the minimum performance loss in exchange for the maximum resource saving, L current For the current model
[0036] The loss on the validation set, L proposed The loss of the modified model, L current is the resource usage of the current layer, R proposed is the modified resource usage;
[0037]
[0038] Input feature map After global average pooling, the spatial dimension H*W is compressed to 1*1, and the channel statistics are obtained. Among them, x c (i, j) is the value of the Cth channel of the input feature map at position (i, j), z c Represents the global information of the Cth channel;
[0039] s=σ(W2δ(W1z)),
[0040] Generate channel attention weights by learning the nonlinear relationship between channels through two fully connected layers in, It is the first fully connected layer, used for dimensionality reduction, r is the reduction ratio value of 16, δ is the ReLU activation function, is the second fully connected layer, used to restore the dimension, σ is the Sigmoid function, which normalizes the weights to the range of [0, 1];
[0041]
[0042] s c is the attention weight of the Cth channel, is the adjusted eigenvalue.
[0043] As a preference, during model training, the training data set is divided into a training set, a validation set, and a test set. During model training, the loss function is calculated and the weights are updated by backpropagation. The loss functions include classification loss BCE Loss, regression loss CIoULoss, and DFL Loss.
[0044] The expression of classification loss BCE Loss is as follows:
[0045] l(x,y)=L={l1,…,l n} T ,
[0046] l n =-w n [y n ·logx n +(1-y n )·log(1-x n )],
[0047] Among them, x is the predicted value, y is the label value, n is the input batch, and w n The weight for each label category, x n is the probability value of the label type, y n is the true value of the label category;
[0048] The expression of regression loss CIoU Loss is:
[0049]
[0050] Among them, IOU is the size of the intersection-over-union ratio, p(c,c ′ ) is the distance between the center of the real box and the predicted box, d is the diagonal distance of the smallest rectangle containing the two boxes, a is the weight, v is used to measure the consistency of length and width, w gt Indicates the width of the real annotation box, h gt Represents the height of the true annotation box, w represents the width of the predicted annotation box, and h represents the height of the predicted annotation box;
[0051] The expression of DFL Loss is as follows:
[0052] DFL(y i ,y i+1 )=-(i+1-y)log(y i )+(yi)log(y i+1 ),
[0053] Among them, y is the actual label value, y i 、y i+1 are two predicted values near y, and i≤y≤i+1,
[0054] In a second aspect, the present invention provides a building fire point identification and detection system based on an unmanned aerial vehicle carrier, comprising a detection equipment configuration module, an unmanned aerial vehicle cruise configuration module, a data set construction module, a data annotation module, a model construction module, a model training module, a model deployment module, and a real-time monitoring module;
[0055] The detection device configuration module is used to perform the following: integrate the edge service detector with the drone to obtain a drone detection device;
[0056] The drone cruise configuration module is used to perform the following operations: configure the drone's flight trajectory planning, field of view angle, and deflection angle based on the building environment, and determine the frame rate and clarity of the drone's video according to the video streaming situation;
[0057] The dataset construction module is used to perform the following operations: collect historical images taken by drones, perform background processing, image rotation, image scaling, and image stitching operations on the historical images to obtain processed images, and construct a training dataset based on the processed images;
[0058] The data annotation module is used to perform the following operations: for the images in the training dataset, two labels are set: fire point and smoke, and the images in the training dataset are annotated to obtain the annotation information, which includes the label type and the marking box information;
[0059] The model construction module is used to perform the following: embed the MobileNetV3 module into the improved YOLOv11-n algorithm model, and build a new YOLOv11-n-MobileNetV3 algorithm model as a fire point recognition model. The fire point recognition model is used to identify fire points and smoke based on the input image and predict and generate recognition types, including fire points and smoke.
[0060] The model training module is used to perform the following: training the constructed fire point recognition model based on the training data set to obtain the final trained fire point recognition model;
[0061] The model deployment module is used to perform the following: deploy the final trained fire point recognition model in a lightweight manner on the edge service detector;
[0062] The real-time monitoring module is used to perform the following: based on the UAV flight trajectory planning and setting of the UAV cruise route, the UAV detection equipment cruises along the UAV cruise route and collects images as the images to be tested and records the position coordinates of the points, uses the images to be tested as input, and uses the finally trained fire point recognition model to identify fire points and smoke, outputs the prediction results, and issues early warnings based on the prediction results.
[0063] Preferably, the dataset construction module is used to perform the following operations:
[0064] Collect historical videos and images of the target building, analyze and filter them to obtain valid images;
[0065] Collect online images and public images, analyze and filter them to obtain valid images;
[0066] For each valid image, keep the image with fire smoke as the initial image;
[0067] Perform image cropping on the initial image, extract the target with the fire point and smoke as the target, and obtain an image with the target object;
[0068] Performing image operations on the image with the target object, mosaicing the background in the image to block the background, and obtaining a background-processed image;
[0069] Performing a rotation operation on the background processed image to obtain a rotated image;
[0070] For the rotated image, the image whose pixels are within a predetermined range is subjected to target scaling, and the image whose pixels are smaller than a predetermined value is deleted to obtain a scaled image;
[0071] Perform image stitching on the scaled images to obtain the final processed image.
[0072] Preferably, when annotating images in a training data set, the data annotation module is used to use a rectangular frame as a drawing rule. Correspondingly, the marking frame information includes the horizontal axis coordinates of the center point of the marking frame, the vertical axis coordinates of the center point of the marking frame, the width of the marking frame, and the length of the marking frame.
[0073] As a preference, for the fire point recognition model, on the basis of YOLOv11-n, a MobileNetV3 network structure with HSwish nonlinear activation function, NAS search global structure, NetAdapt search layer structure, and SE structure is added. The fire point recognition model has the following operations:
[0074] Input stage: The input image first passes through the C3K2 module of YOLOv11-n for feature extraction and outputs a feature map;
[0075] Feature enhancement stage: The feature map extracted from the input node is input into the C2PSA module, and the feature map is weighted through the point-wise spatial attention mechanism to obtain the feature map after feature enhancement;
[0076] Detection stage: The enhanced feature map is input into the DW module, which uses depthwise separable convolution to design the detection head and output detection frames of different scales to achieve multi-scale detection of fire points and smoke.
[0077] Among them, the expression of HSwish nonlinear activation function is as follows:
[0078]
[0079] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0080]
[0081] Where m represents the model, ACC(m) is the accuracy of the model, LAT(m) is the latency of the model, and TAR is the target
[0082] Target delay, w = -0.15 is the weight factor;
[0083] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0084] Among them, Score is the score value for the minimum performance loss in exchange for the maximum resource saving, Lcurrent For the current model
[0085] The loss on the validation set, L proposed The loss of the modified model, L current is the resource usage of the current layer, R proposed is the modified resource usage;
[0086]
[0087] Input feature map After global average pooling, the spatial dimension H*W is compressed to 1*1, and the channel statistics are obtained. Among them, x c (i, j) is the value of the Cth channel of the input feature map at position (i, j), z c Represents the global information of the Cth channel;
[0088] s=σ(W2δ(W1z)),
[0089] Generate channel attention weights by learning the nonlinear relationship between channels through two fully connected layers in, It is the first fully connected layer, used for dimensionality reduction, r is the reduction ratio value of 16, δ is the ReLU activation function, is the second fully connected layer, used to restore the dimension, σ is the Sigmoid function, which normalizes the weights to the range of [0, 1];
[0090]
[0091] s c is the attention weight of the Cth channel, is the adjusted eigenvalue.
[0092] Preferably, the model training module is used to divide the training data set into a training set, a validation set, and a test set. During model training, the loss function is calculated and the weights are updated through backpropagation. The loss functions include classification loss BCE Loss, regression loss CIoU Loss, and DFL Loss.
[0093] The expression of classification loss BCE Loss is as follows:
[0094] l(x,y)=L={l1,…,l n} T ,
[0095] l n =-w n [y n ·logx n +(1-y n)·log(1-x n )],
[0096] Among them, x is the predicted value, y is the label value, n is the input batch, and w n The weight for each label category, x n is the probability value of the label type, y n is the true value of the label category;
[0097] The expression of regression loss CIoU Loss is:
[0098]
[0099]
[0100] Among them, IOU is the size of the intersection-over-union ratio, p(c,c ′ ) is the distance between the center of the real box and the predicted box, d is the diagonal distance of the smallest rectangle containing the two boxes, a is the weight, v is used to measure the consistency of length and width, w gt Indicates the width of the real annotation box, h gt Represents the height of the true annotation box, w represents the width of the predicted annotation box, and h represents the height of the predicted annotation box;
[0101] The expression of DFL Loss is as follows:
[0102] DFL(y i ,y i+1 )=-(i+1-y)log(y i )+(yi)log(y i+1 ),
[0103] Among them, y is the actual label value, y i 、y i+1 are two predicted values near y, and i≤y≤i+1,
[0104] The method and system for identifying and detecting fire points in buildings based on drone carriers of the present invention have the following advantages:
[0105] 1. In terms of data validity, the data comes from historical videos, pictures and other data provided by the local area, public data sets, self-collected data, etc., and the data expansion process meets the algorithm requirements to ensure the accuracy of the algorithm detection results;
[0106] 2. In terms of model accuracy and performance, the algorithm selected a self-improved version of the YOLOv11-n-MobileNetV3 lightweight algorithm based on the actual situation of drones. Based on its depthwise separable convolution and flip residual design, the inference speed of each image frame is reduced by 5.5ms-11ms. In combination with the C3K2 and C2PSA structural designs, the algorithm accuracy is ensured through the multi-head attention mechanism.
[0107] 3. In terms of efficiency, the combination of drones and the Jetson AGX Orin board avoids the process of first collecting data locally and then processing it, enabling on-site processing during border inspections and ensuring the timeliness of algorithms and on-site operations.
[0108] 4. In terms of practicality, drones combined with algorithms can detect fire smoke earlier, faster and better in areas that ordinary equipment and human eyes cannot reach, and detect and save alarms, effectively reducing the harm after the fire occurs and providing a better solution for urban safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0109] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.
[0110] The present invention will be further described below with reference to the accompanying drawings.
[0111] Figure 1 This is a flowchart of a method for identifying and detecting fire points in buildings based on an unmanned aerial vehicle (UAV) carrier in Example 1. DETAILED DESCRIPTION
[0112] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments given are not intended to limit the present invention. Unless there is a conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0113] The embodiments of the present invention provide a method and system for identifying and detecting fire points in buildings based on an unmanned aerial vehicle (UAV) carrier, which is used to solve the technical problem of insufficient monitoring capabilities after a fire occurs in a building.
[0114] Example 1:
[0115] The present invention provides a fire point identification and detection method for a building based on an unmanned aerial vehicle (UAV) carrier, which includes eight steps: detection equipment configuration, UAV cruise configuration, data set construction, data labeling, model construction, model training, model deployment and real-time monitoring.
[0116] Step S100: Detection device configuration: Integrate the edge service detector with the drone to obtain a drone detection device.
[0117] This step integrates the Jetson AGX Orin edge service detector with the drone. First, based on the drone's architectural characteristics and the edge device's outdoor lifespan, an edge server measuring 196.7mm long, 196.7mm wide, 74mm high, and weighing 2.26kg was selected and placed in the lower left corner of the drone and secured.
[0118] Step S200: UAV cruise configuration: configure the UAV flight trajectory planning, field of view angle, and deflection angle based on the building environment, and determine the frame rate and clarity of the UAV video according to the video streaming situation.
[0119] This embodiment implements the determination of the cruise trajectory and the detection position of the drone. First, based on the principle of one building, one strategy, the building height is analyzed, and the location of the fire line and the direction and location of the fire point that is easy to spread are determined through visits and surveys. Combined with the monitoring of nearby buildings, the current drone flight trajectory, field of view angle and deflection angle are determined within the allowable range; secondly, the video streaming situation is analyzed to determine its optimal frame rate and clarity. In this article, the drone flies within 30m of the vertical distance of the building. During the monitoring process, the drone first scans horizontally at 2m / s, circles the building once, and then moves vertically at 2m / s to scan. After scanning for 1 second, it scans the building again horizontally, and so on, scanning the entire building; the video clarity is 1080p and the fps is 12.
[0120] Step S300: Dataset construction: historical images taken by drones are collected, and background processing, image rotation, image scaling, and image stitching operations are performed on the historical images to obtain processed images, and a training dataset is constructed based on the processed images.
[0121] As a specific implementation of dataset construction, this step includes the following operations:
[0122] (1) Collect historical videos and images of the target building, analyze and filter the historical videos and images to obtain valid images;
[0123] (2) Collect online and public images, analyze and filter them, and obtain valid images;
[0124] (3) For each valid image, keep the image with fire smoke as the initial image;
[0125] (4) cropping the initial image, extracting the target with the fire point and smoke as the target, and obtaining an image with the target;
[0126] (5) performing image operation on the image with the target object, mosaicing the background in the image to block the background, and obtaining a background-processed image;
[0127] (6) performing a rotation operation on the background processed image to obtain a rotated image;
[0128] (7) For the rotated image, the image whose pixels are within a predetermined range is subjected to target scaling, and the image whose pixels are smaller than a predetermined value is deleted to obtain the scaled image;
[0129] (8) Perform image stitching on the scaled image to obtain the final processed image.
[0130] In terms of data collection, first, we collect historical videos, pictures and other data provided by local areas, analyze and filter them, and retain valid data; second, we collect network data and public data sets, analyze and filter them, and retain valid data. In terms of data augmentation, we targeted the available data to adapt it to the scenario and improve generalization. First, based on the monitoring characteristics of drones, we optimized the received data. Images with obvious fire smoke were retained, while images with less obvious fire smoke and smaller pixel size were cropped to extract the target. Images with more obvious fires and complex backgrounds were mosaicked to achieve background occlusion and highlight the target. Second, we rotated the images 10° at a time for a total of 36 rotations. We also used target scaling: target pixels larger than 200*200 were scaled by 0.5x and 0.25x, target pixels smaller than 50*50 and larger than 30*30 were scaled by 2x, 2.5x, and 3x, and pixels smaller than 30*30 were filtered out. Finally, we used data splicing: we randomly sampled 12,000 images, stitching every four frames into one. In this paper, a total of 98,238 valid and usable data were obtained.
[0131] Step S400: Data labeling: For the images in the training data set, two labels, namely, fire point and smoke, are set, and the images in the training data set are labeled to obtain labeling information, which includes label type and marking box information.
[0132] When annotating images in the training dataset, rectangular boxes are used as the drawing rule. Correspondingly, the marking box information includes the horizontal axis coordinates of the center point of the marking box, the vertical axis coordinates of the center point of the marking box, the width of the marking box, and the length of the marking box.
[0133] Step S500: Model construction: embed the MobileNetV3 module into the improved YOLOv11-n algorithm model, and construct a new YOLOv11-n-MobileNetV3 algorithm model as a fire point recognition model. The fire point recognition model is used to identify fire points and smoke based on the input image, and predict and generate recognition types, which include fire points and smoke.
[0134] For the fire point recognition model, based on YOLOv11-n, a MobileNetV3 network structure with HSwish nonlinear activation function, NAS search global structure, NetAdapt search layer structure, and SE structure is added. The fire point recognition model has the following operations:
[0135] Input stage: The input image first passes through the C3K2 module of YOLOv11-n for feature extraction and outputs a feature map;
[0136] Feature enhancement stage: The feature map extracted from the input node is input into the C2PSA module, and the feature map is weighted through the point-wise spatial attention mechanism to obtain the feature map after feature enhancement;
[0137] Detection stage: The enhanced feature map is input into the DW module, which uses depthwise separable convolution to design the detection head and output detection frames of different scales to achieve multi-scale detection of fire points and smoke.
[0138] Among them, the expression of HSwish nonlinear activation function is as follows:
[0139]
[0140] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0141]
[0142] Where m represents the model, ACC(m) is the accuracy of the model, LAT(m) is the latency of the model, and TAR is the target
[0143] Target delay, w = -0.15 is the weight factor;
[0144] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0145] Among them, Score is the score value for the minimum performance loss in exchange for the maximum resource saving, L current For the current model
[0146] The loss on the validation set, L proposed The loss of the modified model, L currentis the resource usage of the current layer, R proposed is the modified resource usage;
[0147]
[0148] Input feature map After global average pooling, the spatial dimension H*W is compressed to 1*1, and the channel statistics are obtained. Among them, x c (i, j) is the value of the Cth channel of the input feature map at position (i, j), z c Represents the global information of the Cth channel;
[0149] s=σ(W2δ(W1z)),
[0150] Generate channel attention weights by learning the nonlinear relationship between channels through two fully connected layers in, It is the first fully connected layer, used for dimensionality reduction, r is the reduction ratio value of 16, δ is the ReLU activation function, is the second fully connected layer, used to restore the dimension, σ is the Sigmoid function, which normalizes the weights to the range of [0, 1];
[0151]
[0152] s c is the attention weight of the Cth channel, is the adjusted eigenvalue.
[0153] Currently, suitable algorithms for building fire detection include classification, detection, and segmentation. Combining accuracy and timeliness, this paper selects detection algorithms, including two-stage RCNN and SSD algorithms, cascade RCNN, and the end-to-end YOLO family. Based on the computing power and memory capabilities of edge device hardware, while ensuring detection accuracy meets requirements and maximizing timeliness, this paper selects the YOLO family of algorithms. In the actual training and deployment phases, considering the characteristics of fires and smoke, as well as the real-time requirements of drone streaming, this paper selects the C3K2 module for efficient feature extraction, C2PSA for point-wise spatial attention (PSA) for focused features, and YOLOv11-n, featuring a depthwise separable convolution (DW) module in the detection phase, as the foundational algorithm. Furthermore, the MobileNetV3 network architecture with the HSwish nonlinear activation function, NAS global search architecture, NetAdapt search layer architecture, and SE architecture is added to YOLOv11-n. This architecture reduces 30 million multiplication-add operations and approximately 7ms latency while maintaining accuracy.
[0154] Step S600: Model training: performing model training on the constructed fire point recognition model based on the training data set to obtain the final trained fire point recognition model.
[0155] During model training, the training dataset is divided into training set, validation set and test set. During model training, the loss function is calculated and the weights are updated through backpropagation. The loss functions include classification loss BCE Loss, regression loss CIoU Loss and DFLLoss.
[0156] The expression of classification loss BCE Loss is as follows:
[0157] l(x,y)=L={l1,…,l n} T ,
[0158] l n =-w n [y n ·logx n +(1-y n )·log(1-x n )],
[0159] Among them, x is the predicted value, y is the label value, n is the input batch, and w n The weight for each label category, x n is the probability value of the label type, y n is the true value of the label category;
[0160] The expression of regression loss CIoU Loss is:
[0161]
[0162] Among them, IOU is the size of the intersection-over-union ratio, p(c,c ′ ) is the distance between the center of the real box and the predicted box, d is the diagonal distance of the smallest rectangle containing the two boxes, a is the weight, v is used to measure the consistency of length and width, w gt Indicates the width of the real annotation box, h gt Represents the height of the true annotation box, w represents the width of the predicted annotation box, and h represents the height of the predicted annotation box;
[0163] The expression of DFL Loss is as follows:
[0164] DFL(y i ,y i+1 )=-(i+1-y)log(y i )+(yi)log(y i+1 ),
[0165] Among them, y is the actual label value, yi 、y i+1 are two predicted values near y, and i≤y≤i+1,
[0166] During the model training operation of this embodiment, the number of labeled data is divided into training set, validation set, and test set in a ratio of 3:1:1, and their path locations are specified in fireSmog.yaml for algorithm loading; secondly, GPU, epoch, batch, imgsz, loss function, etc. are selected for initializing the training process; thirdly, based on the training algorithm of four T4 graphics cards, after downsampling SPPF, C2PSA, Upsample, DWConv and other network structures, the loss function is calculated and the weights are updated through backpropagation.
[0167] In the comprehensive test comparison, we selected epoch = 400, batch-size = 16, img-size = 384*640, optimizer = SGD and other related basic designs.
[0168] Step S700: Model deployment: The finally trained fire point recognition model is deployed in a lightweight manner on the edge service detector.
[0169] To implement the model deployment, we first configured a Jetson AGX Orin and flashed the edge device, optimizing the system version to Jetpack 5.1.2, Ubuntu version 20.04, and Docker version 27.0.3. We also installed plugins such as jtop, torch, and tensorrt. Next, we ported the detection algorithm's engine weights, using the TensorRT lightweight INT8 version, to the corresponding folders and ran the algorithm. Third, we conducted stress tests on the drone's flight stability and the clarity, real-time performance, and stability of the video stream. For comprehensive considerations, the drone's video stream input source was 1080p at 12 fps.
[0170] Step S800 real-time monitoring: based on the UAV flight trajectory planning and setting of the UAV cruise route, the UAV detection equipment cruises along the UAV cruise route and collects images as test images and records the position coordinates of the points. The test images are used as input and the fire point and smoke are identified through the finally trained fire point recognition model, and the prediction results are output, and an early warning is issued based on the prediction results.
[0171] In the overall planning of the drone's flight route, a drone cruise route is set. After the drone reaches the predetermined initial position, the drone is 30 meters vertically away from the building and moves horizontally at a constant speed of 2m / s to collect images. After flying around in the horizontal direction for one circle, the drone moves 2m upward in the vertical direction and moves horizontally at a constant speed of 2m / s to collect images. This process is repeated for one building, and the same applies to other buildings. In the real-time acquisition algorithm processing, the video stream will extract one frame for every two frames for algorithm detection. 12 frames of images can be detected in 1 second. When the detection confidence of 8 frames or more in the 12 frames is lower than 0.45, it is determined that there is no fire point or smoke target. At this time, the UAV moves and collects images according to the established plan; when the detection confidence of 4 frames or more in the 12 frames is greater than 0.45, it is preliminarily determined that there is a 10% probability of the existence of a fire point or smoke target. At this time, the UAV moves 15 meters in the direction perpendicular to the building and stays at this position for 3 seconds. Among the 36 frames of images at this position, if the detection confidence of 24 frames or more is less than 0.65, it is determined that there is no fire point or smoke target. The UAV moves back 15 meters and maintains a vertical distance of 30 meters from the building for cruise monitoring. Otherwise, it is determined that there is a 40% probability of a fire point at this position. , smoke target, the UAV moves 9 meters in the direction perpendicular to the building and 6 meters away from the building, and stays at this position for 3 seconds. Among the 36 frames of images at this position, 18 frames or more have a detection confidence less than 0.81, then it is determined that there is no fire point or smoke target, and the UAV moves back 24 meters. Otherwise, it is determined that there is a 75% probability of a fire point or smoke detection target, and the UAV's latitude and longitude, camera ID, target label label, camera IP, detection time and other records are sent and stored through Kafka and Minio. After 120 seconds, if no staff command information is received, the UAV moves back 24 meters and cruises according to established rules. After receiving the staff's command, the UAV movement is converted to manual command operation, and the automatic cruise function is turned off. When the manual command function is turned off, the UAV continues to cruise automatically.
[0172] The method in this embodiment integrates edge device and drone hardware integration, drone path planning, data collection, video streaming, and algorithmic detection and analysis. It not only outputs real-time on-site images but also indicates whether there is fire or smoke. If so, it generates an alert for personnel to handle. This system design, to a certain extent, addresses the issue of delayed fire alarms in buildings. This is particularly true for dynamic perception and rescue operations on high floors. It addresses the inability of conventional cameras to cover high-rise areas, providing more accurate and comprehensive dynamic image information, effectively reducing the risk of further fire escalation.
[0173] Example 2:
[0174] The present invention provides a building fire point identification and detection system based on an unmanned aerial vehicle (UAV) carrier, comprising a detection equipment configuration module, an unmanned aerial vehicle (UAV) cruise configuration module, a data set construction module, a data annotation module, a model construction module, a model training module, a model deployment module, and a real-time monitoring module.
[0175] The detection device configuration module is used to perform the following: integrate the edge service detector with the drone to obtain a drone detection device.
[0176] This detection device configuration module is used to integrate the Jetson AGX Orin edge service detector with the drone. First, based on the drone's architectural characteristics and the edge device's outdoor service life, an edge server with a length of 196.7mm, a width of 196.7mm, a height of 74mm, and a weight of 2.26kg was selected and placed in the lower left corner of the drone and secured.
[0177] The drone cruise configuration module is used to perform the following: configure the drone's flight trajectory planning, field of view angle, and deflection angle based on the building environment, and determine the frame rate and clarity of the drone's video according to the video streaming situation.
[0178] The drone cruise configuration module implements the cruise trajectory and drone detection location determination method. First, based on the principle of "one building, one strategy", the building height is analyzed, and visits and surveys are conducted to determine the location of fire lines that are prone to occur and the direction and location of fire spread. Combined with the monitoring of nearby buildings, the current drone flight trajectory, field of view angle, and deflection angle are determined within the allowable range. Secondly, the video streaming situation is analyzed to determine its optimal frame rate and clarity. In this article, the drone flies within 30m vertically of the building. The monitoring process first scans horizontally at 2m / s, circles the building, and then moves vertically at 2m / s to scan. After scanning for 1 second, it scans the building again horizontally, and so on, scanning the entire building. The video resolution is 1080p and the fps is 12.
[0179] The dataset construction module is used to perform the following: collect historical images taken by drones, and perform background processing, image rotation, image scaling, and image stitching operations on the historical images to obtain processed images, and construct a training dataset based on the processed images.
[0180] As a concrete implementation of the dataset building module, this module is used to perform the following operations:
[0181] (1) Collect historical videos and images of the target building, analyze and filter the historical videos and images to obtain valid images;
[0182] (2) Collect online and public images, analyze and filter them, and obtain valid images;
[0183] (3) For each valid image, keep the image with fire smoke as the initial image;
[0184] (4) cropping the initial image, extracting the target with the fire point and smoke as the target, and obtaining an image with the target;
[0185] (5) performing image operation on the image with the target object, mosaicing the background in the image to block the background, and obtaining a background-processed image;
[0186] (6) performing a rotation operation on the background processed image to obtain a rotated image;
[0187] (7) For the rotated image, the image whose pixels are within a predetermined range is subjected to target scaling, and the image whose pixels are smaller than a predetermined value is deleted to obtain the scaled image;
[0188] (8) Perform image stitching on the scaled image to obtain the final processed image.
[0189] In terms of data collection, first, we collect historical videos, pictures and other data provided by local areas, analyze and filter them, and retain valid data; second, we collect network data and public data sets, analyze and filter them, and retain valid data. In terms of data augmentation, we targeted the available data to adapt it to the scenario and improve generalization. First, based on the monitoring characteristics of drones, we optimized the received data. Images with obvious fire smoke were retained, while images with less obvious fire smoke and smaller pixel size were cropped to extract the target. Images with more obvious fires and complex backgrounds were mosaicked to achieve background occlusion and highlight the target. Second, we rotated the images 10° at a time for a total of 36 rotations. We also used target scaling: target pixels larger than 200*200 were scaled by 0.5x and 0.25x, target pixels smaller than 50*50 and larger than 30*30 were scaled by 2x, 2.5x, and 3x, and pixels smaller than 30*30 were filtered out. Finally, we used data splicing: we randomly sampled 12,000 images, stitching every four frames into one. In this paper, a total of 98,238 valid and usable data were obtained.
[0190] The data labeling module is used to perform the following: for the images in the training data set, two labels, fire point and smoke, are set, and the images in the training data set are labeled to obtain labeling information, which includes label type and marking box information.
[0191] When annotating images in the training dataset, rectangular boxes are used as the drawing rule. Correspondingly, the marking box information includes the horizontal axis coordinates of the center point of the marking box, the vertical axis coordinates of the center point of the marking box, the width of the marking box, and the length of the marking box.
[0192] The model construction module is used to perform the following: embedding the MobileNetV3 module into the improved YOLOv11-n algorithm model, building a new YOLOv11-n-MobileNetV3 algorithm model as a fire point recognition model, and the fire point recognition model is used to identify fire points and smoke based on the input image, and predict and generate recognition types, which include fire points and smoke.
[0193] For the fire point recognition model, based on YOLOv11-n, a MobileNetV3 network structure with HSwish nonlinear activation function, NAS search global structure, NetAdapt search layer structure, and SE structure is added. The fire point recognition model has the following operations:
[0194] Input stage: The input image first passes through the C3K2 module of YOLOv11-n for feature extraction and outputs a feature map;
[0195] Feature enhancement stage: The feature map extracted from the input node is input into the C2PSA module, and the feature map is weighted through the point-wise spatial attention mechanism to obtain the feature map after feature enhancement;
[0196] Detection stage: The enhanced feature map is input into the DW module, which uses depthwise separable convolution to design the detection head and output detection frames of different scales to achieve multi-scale detection of fire points and smoke.
[0197] Among them, the expression of HSwish nonlinear activation function is as follows:
[0198]
[0199] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0200]
[0201] Where m represents the model, ACC(m) is the accuracy of the model, LAT(m) is the latency of the model, and TAR is the target
[0202] Target delay, w = -0.15 is the weight factor;
[0203] The expression of NetAdapt search layer structure resource optimization function is as follows:
[0204] Among them, Score is the score value for the minimum performance loss in exchange for the maximum resource saving, L current For the current model
[0205] The loss on the validation set, L proposed The loss of the modified model, Lcurrent is the resource usage of the current layer, R proposed is the modified resource usage;
[0206]
[0207] Input feature map After global average pooling, the spatial dimension H*W is compressed to 1*1, and the channel statistics are obtained. Among them, x c (i, j) is the value of the Cth channel of the input feature map at position (i, j), z c Represents the global information of the Cth channel;
[0208] s=σ(W2δ(W1z)),
[0209] Generate channel attention weights by learning the nonlinear relationship between channels through two fully connected layers in, It is the first fully connected layer, used for dimensionality reduction, r is the reduction ratio value of 16, δ is the ReLU activation function, is the second fully connected layer, used to restore the dimension, σ is the Sigmoid function, which normalizes the weights to the range of [0, 1];
[0210]
[0211] s c is the attention weight of the Cth channel, is the adjusted eigenvalue.
[0212] Currently, suitable algorithms for building fire detection include classification, detection, and segmentation. Combining accuracy and timeliness, this paper selects detection algorithms, including two-stage RCNN and SSD algorithms, cascade RCNN, and the end-to-end YOLO family. Based on the computing power and memory capabilities of edge device hardware, while ensuring detection accuracy meets requirements and maximizing timeliness, this paper selects the YOLO family of algorithms. In the actual training and deployment phases, considering the characteristics of fires and smoke, as well as the real-time requirements of drone streaming, this paper selects the C3K2 module for efficient feature extraction, C2PSA for point-wise spatial attention (PSA) for focused features, and YOLOv11-n, featuring a depthwise separable convolution (DW) module in the detection phase, as the foundational algorithm. Furthermore, the MobileNetV3 network architecture with the HSwish nonlinear activation function, NAS global search architecture, NetAdapt search layer architecture, and SE architecture is added to YOLOv11-n. This architecture reduces 30 million multiplication-add operations and approximately 7ms latency while maintaining accuracy.
[0213] The model training module is used to perform the following: perform model training on the constructed fire point recognition model based on the training data set to obtain the final trained fire point recognition model.
[0214] During model training, the training dataset is divided into training set, validation set and test set. During model training, the loss function is calculated and the weights are updated through backpropagation. The loss functions include classification loss BCE Loss, regression loss CIoU Loss and DFLLoss.
[0215] The expression of classification loss BCE Loss is as follows:
[0216] l(x,y)=L={l1,…,l n} T ,
[0217] l n =-w n [y n ·logx n +(1-y n )·log(1-x n )],
[0218] Among them, x is the predicted value, y is the label value, n is the input batch, and w n The weight for each label category, x n is the probability value of the label type, y n is the true value of the label category;
[0219] The expression of regression loss CIoU Loss is:
[0220]
[0221] Among them, IOU is the size of the intersection-over-union ratio, p(c,c ′ ) is the distance between the center of the real box and the predicted box, d is the diagonal distance of the smallest rectangle containing the two boxes, a is the weight, v is used to measure the consistency of length and width, w gt Indicates the width of the real annotation box, h gt Represents the height of the true annotation box, w represents the width of the predicted annotation box, and h represents the height of the predicted annotation box;
[0222] The expression of DFL Loss is as follows:
[0223] DFL(y i ,y i+1 )=-(i+1-y)log(y i )+(yi)log(y i+1 ),
[0224] Among them, y is the actual label value, y i 、y i+1 are two predicted values near y, and i≤y≤i+1,
[0225] During the model training operation of this embodiment, the number of labeled data is divided into training set, validation set, and test set in a ratio of 3:1:1, and their path locations are specified in fireSmog.yaml for algorithm loading; secondly, GPU, epoch, batch, imgsz, loss function, etc. are selected for initializing the training process; thirdly, based on the training algorithm of four T4 graphics cards, after downsampling SPPF, C2PSA, Upsample, DWConv and other network structures, the loss function is calculated and the weights are updated through backpropagation.
[0226] In the comprehensive test comparison, we selected epoch = 400, batch-size = 16, img-size = 384*640, optimizer = SGD and other related basic designs.
[0227] When annotating images in the training dataset, rectangular boxes are used as the drawing rule. Correspondingly, the marking box information includes the horizontal axis coordinates of the center point of the marking box, the vertical axis coordinates of the center point of the marking box, the width of the marking box, and the length of the marking box.
[0228] The model deployment module is used to perform the following: deploy the final trained fire point recognition model in a lightweight manner on the edge service detector.
[0229] To implement the model deployment, we first configured a Jetson AGX Orin and flashed the edge device, optimizing the system version to Jetpack 5.1.2, Ubuntu version 20.04, and Docker version 27.0.3. We also installed plugins such as jtop, torch, and tensorrt. Next, we ported the detection algorithm's engine weights, using the TensorRT lightweight INT8 version, to the corresponding folders and ran the algorithm. Third, we conducted stress tests on the drone's flight stability and the clarity, real-time performance, and stability of the video stream. For comprehensive considerations, the drone's video stream input source was 1080p at 12 fps.
[0230] The real-time monitoring module is used to perform the following: based on the UAV flight trajectory planning and setting of the UAV cruise route, the UAV detection equipment cruises along the UAV cruise route and collects images as the images to be tested and records the position coordinates of the points, uses the images to be tested as input, and uses the finally trained fire point recognition model to identify fire points and smoke, outputs the prediction results, and issues early warnings based on the prediction results.
[0231] In the overall planning of the drone's flight route, a drone cruise route is set. After the drone reaches the predetermined initial position, the drone is 30 meters vertically away from the building and moves horizontally at a constant speed of 2m / s to collect images. After flying around in the horizontal direction for one circle, the drone moves 2m upward in the vertical direction and moves horizontally at a constant speed of 2m / s to collect images. This process is repeated for one building, and the same applies to other buildings. In the real-time acquisition algorithm processing, the video stream will extract one frame for every two frames for algorithm detection. 12 frames of images can be detected in 1 second. When the detection confidence of 8 frames or more in the 12 frames is lower than 0.45, it is determined that there is no fire point or smoke target. At this time, the UAV moves and collects images according to the established plan; when the detection confidence of 4 frames or more in the 12 frames is greater than 0.45, it is preliminarily determined that there is a 10% probability of the existence of a fire point or smoke target. At this time, the UAV moves 15 meters in the direction perpendicular to the building and stays at this position for 3 seconds. Among the 36 frames of images at this position, if the detection confidence of 24 frames or more is less than 0.65, it is determined that there is no fire point or smoke target. The UAV moves back 15 meters and maintains a vertical distance of 30 meters from the building for cruise monitoring. Otherwise, it is determined that there is a 40% probability of a fire point at this position. , smoke target, the UAV moves 9 meters in the direction perpendicular to the building and 6 meters away from the building, and stays at this position for 3 seconds. Among the 36 frames of images at this position, 18 frames or more have a detection confidence less than 0.81, then it is determined that there is no fire point or smoke target, and the UAV moves back 24 meters. Otherwise, it is determined that there is a 75% probability of a fire point or smoke detection target, and the UAV's latitude and longitude, camera ID, target label label, camera IP, detection time and other records are sent and stored through Kafka and Minio. After 120 seconds, if no staff command information is received, the UAV moves back 24 meters and cruises according to established rules. After receiving the staff's command, the UAV movement is converted to manual command operation, and the automatic cruise function is turned off. When the manual command function is turned off, the UAV continues to cruise automatically.
[0232] The system of this embodiment can execute the method disclosed in Example 1 to realize fire point identification in a building.
[0233] The above is a detailed introduction to the fire point identification and detection method and system for buildings based on drone carriers provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A fire point identification and detection method for buildings based on an unmanned aerial vehicle carrier, characterized in that: The steps include: Detection equipment configuration: Integrate the edge service detector with the drone to obtain the drone detection equipment; Drone cruise configuration: Configure the drone's flight trajectory planning, field of view, and deflection angle based on the building environment, and determine the frame rate and clarity of the drone's video according to the video streaming situation; Dataset construction: Collect historical images taken by drones, perform background processing, image rotation, image scaling, and image stitching on the historical images to obtain processed images, and construct a training dataset based on the processed images; Data labeling: For the images in the training dataset, two labels, fire point and smoke, are set, and the images in the training dataset are labeled to obtain label information. The label information includes label type and marking box information; Model construction: The MobileNetV3 module is embedded in the improved YOLOv11-n algorithm model, and a new YOLOv11-n-MobileNetV3 algorithm model is constructed as a fire point recognition model. The fire point recognition model is used to identify fire points and smoke based on the input image and predict and generate recognition types, including fire points and smoke. Model training: The constructed fire point recognition model is trained based on the training data set to obtain the final trained fire point recognition model; Model deployment: The final trained fire point recognition model is deployed in a lightweight manner on the edge service detector; Real-time monitoring: Based on the UAV flight trajectory planning and setting of the UAV cruise route, the UAV detection equipment cruises along the UAV cruise route and collects images as the images to be tested and records the position coordinates of the points. The images to be tested are used as input and the fire point and smoke are identified through the final trained fire point recognition model, and the prediction results are output, and an early warning is issued based on the prediction results.
2. The method for identifying and detecting fire points in buildings based on an unmanned aerial vehicle carrier according to claim 1 is characterized in that: The dataset construction includes the following steps: Collect historical videos and images of the target building, analyze and filter the historical videos and images to obtain effective images; Collect online images and public images, analyze and filter them to obtain valid images; For each valid image, keep the image with fire smoke as the initial image; Perform image cropping on the initial image, extract the target with the fire point and smoke as the target, and obtain an image with the target object; Performing image operations on the image with the target object, mosaicing the background in the image to block the background, and obtaining a background-processed image; Performing a rotation operation on the background processed image to obtain a rotated image; For the rotated image, the image whose pixels are within a predetermined range is subjected to target scaling, and the image whose pixels are smaller than a predetermined value is deleted to obtain a scaled image; Perform image stitching on the scaled images to obtain the final processed image.
3. The fire point identification and detection method for buildings based on drone carriers according to claim 1 is characterized in that: When annotating images in the training dataset, rectangular boxes are used as the drawing rule. Correspondingly, the marking box information includes the horizontal axis coordinates of the center point of the marking box, the vertical axis coordinates of the center point of the marking box, the width of the marking box, and the length of the marking box.
4. The method for identifying and detecting fire points in buildings based on an unmanned aerial vehicle carrier according to claim 1, characterized in that: For the fire point recognition model, based on YOLOv11-n, a MobileNetV3 network structure with HSwish nonlinear activation function, NAS search global structure, NetAdapt search layer structure, and SE structure is added. The fire point recognition model has the following operations: Input stage: The input image first passes through the C3K2 module of YOLOv11-n for feature extraction and outputs a feature map; Feature enhancement stage: The feature map extracted from the input node is input into the C2PSA module, and the feature map is weighted through the point-wise spatial attention mechanism to obtain the feature map after feature enhancement; Detection stage: The enhanced feature map is input into the DW module, which uses depthwise separable convolution to design the detection head and output detection frames of different scales to achieve multi-scale detection of fire points and smoke. Among them, the expression of HSwish nonlinear activation function is as follows: The expression of NetAdapt search layer structure resource optimization function is as follows: Where m represents the model, ACC(m) is the accuracy of the model, LAT(m) is the latency of the model, and TAR is the target Target delay, w = -0.15 is the weight factor; The expression of NetAdapt search layer structure resource optimization function is as follows: Among them, Score is the score value for the minimum performance loss in exchange for the maximum resource saving, L current For the current model The loss on the validation set, L proposed The loss of the modified model, L current is the resource usage of the current layer, R proposed is the modified resource usage; Input feature map After global average pooling, the spatial dimension H*W is compressed to 1*1, and the channel statistics are obtained. Among them, x c (i, j) is the value of the Cth channel of the input feature map at position (i, j), z c Represents the global information of the Cth channel; s=σ(W2δ(W1z)), Generate channel attention weights by learning the nonlinear relationship between channels through two fully connected layers in, It is the first fully connected layer, used for dimensionality reduction, r is the reduction ratio value of 16, δ is the ReLU activation function, is the second fully connected layer, used to restore the dimension, σ is the Sigmoid function, which normalizes the weights to the range of [0, 1]; s c is the attention weight of the Cth channel, is the adjusted eigenvalue.
5. The method for identifying and detecting fire points in buildings based on an unmanned aerial vehicle carrier according to claim 1, characterized in that: During model training, the training dataset is divided into training set, validation set and test set. During model training, the loss function is calculated and the weights are updated through backpropagation. The loss functions include classification loss BCE Loss, regression loss CIoU Loss and DFL Loss. The expression of classification loss BCE Loss is as follows: l(x,y)=L={l1,…,l n } T , l n =-w n [y n ·logx n +(1-y n )·log(1-x n )], Among them, x is the predicted value, y is the label value, n is the input batch, and w n The weight for each label category, x n is the probability value of the label type, y n is the true value of the label category; The expression of regression loss CIoU Loss is: Among them, IOU is the size of the intersection-over-union ratio, p(c,c ′ ) is the distance between the center of the real box and the predicted box, d is the diagonal distance of the smallest rectangle containing the two boxes, a is the weight, v is used to measure the consistency of length and width, w gt Indicates the width of the real annotation box, h gt Represents the height of the true annotation box, w represents the width of the predicted annotation box, and h represents the height of the predicted annotation box; The expression of DFL Loss is as follows: DFL(and i ,and i+1 )=-(i+1-y)log(y i )+(yi)log(y i+1 ), Among them, y is the actual label value, y i 、y i+1 are two predicted values near y, and 6. A building fire point identification and detection system based on an unmanned aerial vehicle carrier, characterized in that: It includes detection equipment configuration module, drone cruise configuration module, data set construction module, data annotation module, model construction module, model training module, model deployment module and real-time monitoring module; The detection device configuration module is used to perform the following: integrate the edge service detector with the drone to obtain a drone detection device; The drone cruise configuration module is used to perform the following operations: configure the drone's flight trajectory planning, field of view angle, and deflection angle based on the building environment, and determine the frame rate and clarity of the drone's video according to the video streaming situation; The dataset construction module is used to perform the following operations: collect historical images taken by drones, perform background processing, image rotation, image scaling, and image stitching operations on the historical images to obtain processed images, and construct a training dataset based on the processed images; The data annotation module is used to perform the following operations: for the images in the training dataset, two labels are set: fire point and smoke, and the images in the training dataset are annotated to obtain the annotation information, which includes the label type and the marking box information; The model construction module is used to perform the following: embed the MobileNetV3 module into the improved YOLOv11-n algorithm model, and build a new YOLOv11-n-MobileNetV3 algorithm model as a fire point recognition model. The fire point recognition model is used to identify fire points and smoke based on the input image and predict and generate recognition types, including fire points and smoke. The model training module is used to perform the following: training the constructed fire point recognition model based on the training data set to obtain the final trained fire point recognition model; The model deployment module is used to perform the following: deploy the final trained fire point recognition model in a lightweight manner on the edge service detector; The real-time monitoring module is used to perform the following: based on the UAV flight trajectory planning and setting of the UAV cruise route, the UAV detection equipment cruises along the UAV cruise route and collects images as the images to be tested and records the position coordinates of the points, uses the images to be tested as input, and uses the finally trained fire point recognition model to identify fire points and smoke, outputs the prediction results, and issues early warnings based on the prediction results.
7. The fire point identification and detection system for buildings based on an unmanned aerial vehicle carrier according to claim 6 is characterized in that: The dataset building module is used to perform the following operations: Collect historical videos and images of the target building, analyze and filter them to obtain valid images; Collect online images and public images, analyze and filter them to obtain valid images; For each valid image, keep the image with fire smoke as the initial image; Perform image cropping on the initial image, extract the target with the fire point and smoke as the target, and obtain an image with the target object; Performing image operations on the image with the target object, mosaicing the background in the image to block the background, and obtaining a background-processed image; Performing a rotation operation on the background processed image to obtain a rotated image; For the rotated image, the image whose pixels are within a predetermined range is subjected to target scaling, and the image whose pixels are smaller than a predetermined value is deleted to obtain a scaled image; Perform image stitching on the scaled images to obtain the final processed image.
8. The building fire point identification and detection system based on an unmanned aerial vehicle carrier according to claim 6 is characterized in that: When annotating images in the training data set, the data annotation module is used to use rectangular boxes as drawing rules. Correspondingly, the marking box information includes the horizontal axis coordinates of the center point of the marking box, the vertical axis coordinates of the center point of the marking box, the width of the marking box, and the length of the marking box.
9. The building fire point identification and detection system based on an unmanned aerial vehicle carrier according to claim 6 is characterized in that: For the fire point recognition model, based on YOLOv11-n, a MobileNetV3 network structure with HSwish nonlinear activation function, NAS search global structure, NetAdapt search layer structure, and SE structure is added. The fire point recognition model has the following operations: Input stage: The input image first passes through the C3K2 module of YOLOv11-n for feature extraction and outputs a feature map; Feature enhancement stage: The feature map extracted from the input node is input into the C2PSA module, and the feature map is weighted through the point-wise spatial attention mechanism to obtain the feature map after feature enhancement; Detection stage: The enhanced feature map is input into the DW module, which uses depthwise separable convolution to design the detection head and output detection frames of different scales to achieve multi-scale detection of fire points and smoke. Among them, the expression of HSwish nonlinear activation function is as follows: The expression of NetAdapt search layer structure resource optimization function is as follows: Where m represents the model, ACC(m) is the accuracy of the model, LAT(m) is the latency of the model, and TAR is the target Target delay, w = -0.15 is the weight factor; The expression of NetAdapt search layer structure resource optimization function is as follows: Among them, Score is the score value for the minimum performance loss in exchange for the maximum resource saving, L current For the current model The loss on the validation set, L proposed The loss of the modified model, L current is the resource usage of the current layer, R proposed is the modified resource usage; Input feature map After global average pooling, the spatial dimension H*W is compressed to 1*1, and the channel statistics are obtained. Among them, x c (i, j) is the value of the Cth channel of the input feature map at position (i, j), z c Represents the global information of the Cth channel; s=σ(W2δ(W1z)), Generate channel attention weights by learning the nonlinear relationship between channels through two fully connected layers in, It is the first fully connected layer, used for dimensionality reduction, r is the reduction ratio value of 16, δ is the ReLU activation function, is the second fully connected layer, used to restore the dimension, σ is the Sigmoid function, which normalizes the weights to the range of [0, 1]; s c is the attention weight of the Cth channel, is the adjusted eigenvalue.
10. The building fire point identification and detection system based on an unmanned aerial vehicle carrier according to claim 6 is characterized in that: The model training module is used to divide the training data set into training set, validation set and test set. During model training, the loss function is calculated and the weights are updated through backpropagation. The loss functions include classification loss BCE Loss, regression loss CIoU Loss and DFLLoss. The expression of classification loss BCE Loss is as follows: l(x,y)=L={l1,…,l n } T , l n =-w n [y n ·logx n +(1-y n )·log(1-x n )], Among them, x is the predicted value, y is the label value, n is the input batch, and w n The weight for each label category, x n is the probability value of the label type, y n is the true value of the label category; The expression of regression loss CIoU Loss is: Among them, IOU is the size of the intersection-over-union ratio, p(c,c ′ ) is the distance between the center of the real box and the predicted box, d is the diagonal distance of the smallest rectangle containing the two boxes, a is the weight, v is used to measure the consistency of length and width, w gt Indicates the width of the actual annotation box, H gt Represents the height of the true annotation box, w represents the width of the predicted annotation box, and H represents the height of the predicted annotation box; The expression of DFL Loss is as follows: DFL(and i ,and i+1 )=-(i+1-y)log(y i )+(yi)log(y i+1 ), Among them, y is the actual label value, y i 、y i+1 are two predicted values near y, and
Citation Information
Patent Citations
Method for detecting smoking behavior based on improved yolov7
CN117095386A
Power transmission line icing detection method based on PWL-Det detection algorithm model
CN119445332A
Oil level gauge reading recognition method and system and computer equipment
CN119723013A
Forest fire smoke detection and analysis method, system, equipment and medium
CN119832451A