Straw fire point detection method based on local pixel enhancement of unmanned aerial vehicle thermal infrared image

By constructing a local pixel-enhanced UAV thermal infrared image detection method, the feature extraction capability is enhanced and multi-scale changes are adapted, solving the problems of insufficient detection accuracy and reliability in existing technologies, and realizing efficient identification and accurate detection of tiny fire points.

CN121213563BActive Publication Date: 2026-03-31NORTHEAST INST OF GEOGRAPHY & AGRIECOLOGY C A S
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing UAV thermal infrared image fire detection methods suffer from insufficient feature extraction capabilities and serious issues of missed detection at multiple scales, resulting in insufficient detection accuracy and reliability, especially poor sensitivity to small fire points and scale changes.

Method used

A method for detecting UAV thermal infrared images based on local pixel enhancement is constructed. By using a scale-consistent local pixel activation module and a UAV distance-scale adaptive pixel perception module, the feature extraction capability is enhanced and robust cross-scale detection is achieved. Data augmentation techniques are used to generate a training dataset, and a target detection model is constructed and trained.

Benefits of technology

It improves the recognition effect and detection accuracy of small fire points, reduces the false alarm rate, and realizes rapid and accurate identification of fire points in UAV thermal infrared images, thereby improving the real-time performance and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213563B_ABST
    Figure CN121213563B_ABST
Patent Text Reader

Abstract

The unmanned aerial vehicle thermal infrared image straw fire point detection method based on local pixel enhancement belongs to the technical field of image recognition.The present application solves the problem of high false alarm rate and high missed detection rate of the existing detection method.The present application can more effectively capture the subtle features of small straw fire points and improve the identification effect of small targets through the constructed unmanned aerial vehicle distance scale adaptive pixel perception module;Through the constructed scale consistent local pixel activation module, the cooperative expression of channel and space information can be strengthened on the basis of multi-level feature representation, so as to improve the adaptability to inconsistent feature scales and achieve the purpose of reducing the false alarm rate.A target detection model is constructed based on the unmanned aerial vehicle distance scale adaptive pixel perception module and the scale consistent local pixel activation module, so as to realize the rapid and accurate identification of the fire points in the unmanned aerial vehicle thermal infrared image, greatly improve the detection rate of small fire points and avoid missed detection.The present application can be applied to fire point detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image recognition technology, specifically relating to a method for detecting straw fire points based on local pixel enhancement of UAV thermal infrared images. Background Technology

[0002] Straw burning causes air pollution, ecological damage, and serious harm to residents' health. Therefore, effective control of straw burning is of paramount importance. Due to the small area affected and rapid combustion characteristics of straw burning, if rapid and accurate monitoring is not achieved in its early stages, it can easily spread and cause greater harm. Compared to manual inspections and ground monitoring, drones, with their advantages of maneuverability and rapid response, have become an important technological means in the field of straw burning monitoring.

[0003] However, existing fire detection methods based on UAV thermal infrared imagery still have two core problems:

[0004] I. Insufficient Feature Extraction Capability. Tiny fire spots often have only a few pixels of highlighted area, lacking clear discriminative features such as texture, shape, and edges. Traditional machine learning methods that rely on manual feature extraction are difficult to effectively represent this weak information. While current mainstream deep learning detection methods (such as Faster R-CNN, YOLO, etc.) can automatically learn features, the multiple convolutions and downsampling of deep networks weaken or lose the features of small fire spots in shallow layers. Deep feature maps are unable to capture weak shape and structural information, resulting in poor recognition of small targets.

[0005] Second, the problem of missed detections at multiple scales is widespread. In actual operations, the flight altitude and distance of UAVs are constantly changing, resulting in huge differences in the scale of the same fire point in the image. Existing methods have limited adaptability to this scale inconsistency, and are prone to problems such as missed detection of small fire points, oversensitivity to normal high-temperature points, and high false alarm rate, which seriously affect the reliability and practicality of the detection methods.

[0006] Therefore, enhancing the feature extraction capability of weak fire points and achieving robust detection across scales is essential to solving the problems of high false alarm rate and high false alarm rate of existing UAV thermal infrared image fire point detection methods. Summary of the Invention

[0007] The purpose of this invention is to solve the problems of high false alarm rate and high missed detection rate of existing detection methods, and to propose a method for detecting straw fire points based on local pixel enhancement of UAV thermal infrared images.

[0008] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0009] A method for detecting straw fire spots based on UAV thermal infrared imagery using local pixel enhancement, the method specifically includes the following steps:

[0010] Step 1: Obtain the original UAV thermal infrared image dataset of straw, and obtain the enhanced image dataset based on the original UAV thermal infrared image dataset;

[0011] Step 2: Construct a scale-consistent local pixel activation module, and construct a UAV distance-scale adaptive pixel perception module based on the scale-consistent local pixel activation module. The UAV distance-scale adaptive pixel perception module is used to output enhanced feature variables and fused features at each scale.

[0012] Step 3: Based on the scale-consistent local pixel activation module and the UAV distance-scale adaptive pixel perception module, construct a model for detecting straw fire points in UAV thermal infrared images;

[0013] The model is trained using a dataset of enhanced images to obtain a well-trained model.

[0014] Step 4: Input the thermal infrared image of the straw to be detected by the drone into the trained model to obtain the fire detection results.

[0015] The beneficial effects of this invention are:

[0016] This invention utilizes a drone distance-scale adaptive pixel perception module to more effectively capture subtle features of small fire spots in straw burning, improving the recognition of small targets. Furthermore, a scale-consistent local pixel activation module enhances the collaborative expression of channel and spatial information based on multi-level feature representation, improving adaptability to feature scale inconsistencies and reducing false alarm rates. This invention further constructs a target detection model based on the drone distance-scale adaptive pixel perception module and the scale-consistent local pixel activation module to achieve rapid and accurate identification of fire spots in drone thermal infrared images, effectively improving the detection accuracy and real-time performance of drones in straw burning monitoring scenarios. In particular, compared to existing methods, this invention significantly improves the detection rate of small fire spots, avoiding missed detections. Attached Figure Description

[0017] Figure 1 This is a flowchart of a method for detecting straw fire points based on local pixel enhancement using UAV thermal infrared imaging, according to the present invention. Detailed Implementation

[0018] Specific implementation method one: Combining Figure 1 This embodiment describes a method for detecting straw fire spots in UAV thermal infrared images based on local pixel enhancement. The method specifically includes the following steps:

[0019] Step 1: Obtain the original UAV thermal infrared image dataset of straw, and obtain the enhanced image dataset based on the original UAV thermal infrared image dataset;

[0020] Step 2: Construct a scale-consistent local pixel activation module, and construct a UAV distance-scale adaptive pixel perception module based on the scale-consistent local pixel activation module. The UAV distance-scale adaptive pixel perception module is used to output enhanced feature variables and fused features at each scale.

[0021] Step 3: Based on the scale-consistent local pixel activation module and the UAV distance-scale adaptive pixel perception module, construct a model for detecting straw fire points in UAV thermal infrared images;

[0022] The model is trained using a dataset of enhanced images to obtain a well-trained model.

[0023] Step 4: Input the thermal infrared image of the straw to be detected by the drone into the trained model to obtain the fire detection results.

[0024] The method of this invention can overcome the problems of insufficient feature extraction capability and missed detection at multiple scales in the existing technology, and achieve high-precision and low-cost identification of the location and state of straw burning, thereby providing strong technical support for the effective supervision of straw burning.

[0025] Specific Implementation Method Two: This implementation method is a further limitation of Specific Implementation Method One. The specific process of step one is as follows:

[0026] Step S101: Input the original UAV thermal infrared image dataset StrawDataset;

[0027] Step S102: Obtain the total number of image data TotalCount = the number of images in the original UAV thermal infrared image dataset StrawDataset;

[0028] Step S103: Establish the enhanced image storage variable EnhancedDataset = original UAV thermal infrared image dataset StrawDataset;

[0029] Step S104: Establish image processing counter ImageCounter = 1;

[0030] Step S105: Temporarily store the single original image variable TempImage = Read the ImageCounter image from the original UAV thermal infrared image dataset StrawDataset;

[0031] Step S106: Calculate the random scaling variable ScaleImage = the result of performing a random scaling operation on TempImage, with a scaling ratio between 0.5 and 1.5;

[0032] Step S107: Calculate the random cropping variable CropImage = the result of performing a random cropping operation on the random scaling variable ScaleImage, ensuring that the size of the cropped image is the same as the model input size;

[0033] Step S108: Calculate the result of horizontally flipping the random flip variable FlipImage with a probability of 0.5 on the random crop variable CropImage;

[0034] Step S109: Calculate the color perturbation variable ColorImage = the result of performing random perturbations on the brightness, contrast and saturation of the random flip variable FlipImage, with the perturbation amplitude within ±20%;

[0035] Step S110: Calculate the affine transformation variable AffineImage = the result of performing translation and rotation operations on the color perturbation variable ColorImage, with a translation range of ±10% and a rotation angle range of ±15°;

[0036] Step S111: Calculate the mosaic enhancement variable MosaicImage = a new composite image;

[0037] The new composite image is obtained by randomly selecting three original images from the original UAV thermal infrared image dataset StrawDataset, and then stitching the three selected images with the affine transformation variable AffineImage using a mosaic enhancement method to form a new composite image.

[0038] Mosaic enhancement involves randomly scaling, cropping, and stitching together three selected images with the affine transformation variable AffineImage, and using the stitched result as a new composite image.

[0039] Step S112: Temporarily store the original annotation variable TempLabel = Read the annotation corresponding to the ImageCounter image in the original UAV thermal infrared image dataset StrawDataset and the annotations corresponding to the 3 images selected in step S111;

[0040] Step S113: Establish the label variable AugLabel = Perform coordinate transformation on the label read in step S112 based on the spatial changes of the mosaic enhancement variable MosaicImage;

[0041] Step S114: Combine the mosaic enhancement variable MosaicImage and the labeling variable AugLabel and store them in the enhanced image storage variable EnhancedDataset;

[0042] Step S115: Set the image processing counter ImageCounter = ImageCounter + 1;

[0043] Step S116: If ImageCounter > TotalCount, proceed to step S117; otherwise, proceed to step S105.

[0044] Step S117: Output the enhanced image dataset StrawEnhancedDataset;

[0045] Step S118: Divide the enhanced image dataset StrawEnhancedDataset into three parts: training set, validation set, and test set in a ratio of 7:2:1. Use the training set, validation set, and test set to train, validate, and test the UAV thermal infrared image fire detection model.

[0046] The other steps and parameters are the same as in Specific Implementation Method 1.

[0047] After completing data preparation and data augmentation in step one, the resulting training set, validation set, and test set are used for model training, optimization, and evaluation, respectively.

[0048] Specific Implementation Method Three: This implementation method further defines Specific Implementation Method One. The working process of the scale-consistent local pixel activation module is as follows:

[0049] Step S201: Input the feature mapping variable InputFeature;

[0050] Step S202: Calculate the downsampled feature variable DownSampleFeature = Perform a convolution operation with a stride of 2 and a kernel size of 3×3 on the feature mapping variable InputFeature;

[0051] Step S203: Calculate the channel average pooling variable AvgPoolFeature = Perform global average pooling along the spatial dimension on the downsampled feature variable DownSampleFeature;

[0052] Step S204: Calculate the channel fully connected compression variable FcCompress = channel average pooling variable AvgPoolFeature. The output result after passing through the fully connected layer is the channel dimension reduced by linear transformation and non-linear activation.

[0053] Step S205: Calculate the channel fully connected expansion variable FcExpand = channel fully connected compression variable FcCompress. The output result after passing through the fully connected layer is used to restore the original channel dimension through linear transformation.

[0054] Step S206: Calculate the channel weight variable ChannelWeight = the result of applying Sigmoid activation to the channel fully connected expansion variable FcExpand;

[0055] Step S207: Calculate the channel enhancement feature variable SeOutput:

[0056] SeOutput = InputFeature × ChannelWeight

[0057] Where “×” represents element-wise multiplication in the channel dimension;

[0058] Step S208: Calculate the spatial convolution feature variable SpatialConv = Perform a large kernel convolution operation with a stride of 1 and a kernel size of 7×7 on the downsampled feature variable DownSampleFeature;

[0059] Step S209: Calculate the spatial weight variable SpatialWeight = the result of applying Sigmoid activation to the spatial convolution feature variable SpatialConv;

[0060] Step S210: Calculate the spatial augmentation feature variable LskaOutput:

[0061] LskaOutput = InputFeature×SpatialWeight

[0062] Where “×” represents element-wise multiplication in the channel dimension;

[0063] Step S211: Concatenate the outputs of the two attention branches to obtain the concatenated result ConcatOutput:

[0064] ConcatOutput=Concat(SeOutput, LskaOutput)

[0065] Wherein, Concat is the concatenation operation;

[0066] Step S212: Perform residual connections on the feature mapping variable InputFeature and the concatenation result ConcatOutput to obtain residual connection-enhanced features:

[0067] EnhanceOutput = InputFeature + ConcatOutput

[0068] Wherein, EnhanceOutput represents the residual connection enhancement feature;

[0069] Step S213: Perform tanh activation on EnhanceOutput to obtain the activation result tanhEnhanceOutput:

[0070] tanhEnhanceOutput = α • tanh(EnhanceOutput)

[0071] Where tanh represents the tanh activation function, and α is the coefficient;

[0072] Step S214: Perform residual connection between the activation result tanhEnhanceOutput and the residual connection enhancement feature EnhanceOutput;

[0073] FinalOutput = EnhanceOutput + tanhEnhanceOutput;

[0074] Where FinalOutput represents the enhanced feature variable;

[0075] Step S215: Output the enhanced feature variable FinalOutput to complete the construction of the scale-consistent local pixel activation module.

[0076] The other steps and parameters are the same as in Specific Implementation Method 1.

[0077] The scale-consistent local pixel activation module in this embodiment can detect and enhance local high-response (high-temperature) pixels.

[0078] Specific Implementation Method Four: This implementation method is a further limitation of Specific Implementation Method Three, wherein the value of the coefficient α is 0.2.

[0079] The other steps and parameters are the same as in Specific Implementation Method 3.

[0080] Specific Implementation Method 5: This implementation method is a further limitation of Specific Implementation Method 1. The input of the UAV distance scale adaptive pixel perception module is features of 4 different scales.

[0081] The other steps and parameters are the same as in Specific Implementation Method 1.

[0082] The UAV distance scale adaptive pixel perception module can detect and adaptively perceive the target scale changes and local high temperature pixels at different flight altitudes, and has cross-scale dynamic reweighting and channel and spatial enhancement characteristics.

[0083] Specific Implementation Method Six: This implementation method further defines Specific Implementation Method Five. The working process of the UAV distance scale adaptive pixel perception module is as follows:

[0084] Step S301: Input the feature mapping BackboneFeatures = [P2, P3, P4, EnhancedP5] at 4 scales, where P2, P3, P4 and EnhancedP5 are features at 4 different scales;

[0085] Step S302: Calculate the cross-layer dynamic fusion weights wP5 and wP4:

[0086] [wP5, wP4] = Softmax([GAP(Upsample(EnhancedP5)), GAP(P4)])

[0087] Wherein, GAP represents global average pooling, used to extract channel statistics; Upsample represents a 2x upsampling operation; and Softmax represents the activation function.

[0088] Step S303, Dynamic Weighted Fusion:

[0089] FusedP4 = C3k2(wP5 • Upsample(EnhancedP5)+wP4 • P4)

[0090] Wherein, FusedP4 represents the fused feature, and C3k2 represents the residual convolution based on the CSP structure;

[0091] It should be noted that C3k2 consists of two consecutive residual convolutional units based on the CSP structure. C3k2 is used for feature extraction and feature fusion.

[0092] Step S304: Upsample the fusion feature FusedP4 and calculate the fusion weights based on the upsampling results.

[0093] FusedP4up = Upsample(FusedP4)

[0094] [wF4, wP3] = [Softmax([GAP(FusedP4up), GAP(P3)])]

[0095] Where FusedP4up represents the upsampling result of FusedP4, and wF4 and wP3 are both fusion weights;

[0096] Step S305: Obtain the fusion result FusedP3 through dynamic weighted fusion.

[0097] FusedP3 = C3k2(wF4 • FusedP4up+wP3 • P3)

[0098] Step S306: Upsample the fusion result FusedP3 and calculate the fusion weights based on the upsampling result:

[0099] FusedP3up = Upsample(FusedP3)

[0100] [wF3, wP2] = [Softmax([GAP(FusedP3up), GAP(P2)])]

[0101] Where FusedP3up represents the upsampling result of FusedP3, and wF3 and wP2 are both fusion weights;

[0102] Step S307: Obtain the fusion result FusedP2 through dynamic weighted fusion:

[0103] FusedP2 = C3k2(wF3 • FusedP3up+wP2 • P2)

[0104] Step S308: Input the fusion result FusedP2 into the scale-consistent local pixel activation module to obtain the output TinyEnhanced from the scale-consistent local pixel activation module.

[0105] TinyEnhanced = CDYZJBGWXYJHBlock (FusedP2)

[0106] CDYZJBGWXYJHBlock represents the scale-consistent local pixel activation module;

[0107] Step S309: Output the enhanced feature variable TinyEnhanced, feature EnhancedP5, and fused feature variables FusedP4 and FusedP3 to complete the construction of the UAV distance scale adaptive pixel perception module.

[0108] The other steps and parameters are the same as in Specific Implementation Method 5.

[0109] Specific Implementation Method Seven: This implementation method further defines Specific Implementation Method One. The working process of the model used for detecting straw fire points in UAV thermal infrared images is as follows:

[0110] Step S401: Input any image from the enhanced image dataset StrawEnhancedDataset, StrawInputImage;

[0111] Step S402: Use the image StrawInputImage as input to the backbone network, and extract the multi-scale feature mapping BackboneFeatureImages = [P2, P3, P4, P5] of the image StrawInputImage through the backbone network;

[0112] Among them, P2, P3, P4 and P5 are feature maps output by the backbone network; feature map P2 has 64 channels, feature map P3 has 128 channels, feature map P4 has 128 channels and feature map P5 has 256 channels.

[0113] Step S403: Input the feature map P5 into the scale-consistent local pixel activation module to obtain the output EnhancedP5:

[0114] EnhancedP5 = CDYZJBGWXYJHBlockl(P5)

[0115] Step S404: Define a multi-scale feature map BackboneFeatureImages = [P2, P3, P4, EnhancedP5]. Input the multi-scale feature map BackboneFeatureImages into the UAV range-scale adaptive pixel perception module to obtain the output of the range-scale adaptive pixel perception module.

[0116] [TinyEnhanced, FusedP3, FusedP4, EnhancedP5]=UAVJLCDZXYTYXYGZBlock(BackboneFeatureImages)

[0117] Among them, UAVJLCDZXYTYXYGZBlock represents the UAV distance scale adaptive pixel perception module;

[0118] Step S405: Perform feature fusion on TinyEnhanced and FusedP3 to obtain the 128-channel fused feature SmallInput:

[0119] SmallInput = C3k2(Concat(Downsample(TinyEnhanced), FusedP3))

[0120] Downsample is a 2x downsampling operation;

[0121] Step S406: Perform feature fusion on SmallInput and FusedP4 to obtain the 128-channel fused feature MediumInput.

[0122] MediumInput = C3k2(Concat(Downsample(SmallInput), FusedP4))

[0123] Step S407: Perform feature fusion on MediumInput and EnhancedP5 to obtain the 256-channel fused feature LargeInput:

[0124] LargeInput = C3k2(Concat(Downsample(MediumInput), EnhancedP5))

[0125] Step S408: Construct the input variables NeckOutputFeatures for the detection head:

[0126] NeckOutputFeatures = [TinyEnhance, SmallInput, MediumInput,LargeInput]

[0127] Step S409: Input the input variable NeckOutputFeatures into the detection head, and output the detection result StrawDetectResult through the detection head:

[0128] StrawDetectResult = detect(NeckOutputFeatures)

[0129] Where, detect represents the detection head;

[0130] Step S410: Use StrawDetectResult as the detection result of the image StrawInputImage.

[0131] The other steps and parameters are the same as in Specific Implementation Method 1.

[0132] The model constructed in this invention for fire detection in UAV thermal infrared images can adaptively enhance the saliency features of local high-temperature pixel regions in the image. It features cross-scale fusion, adaptive channel spatial enhancement, and residual feature enhancement, and can output accurate multi-scale straw fire detection results. The detection head can perform bounding box regression, class prediction, channel stitching, and bounding box decoding and non-maximum suppression (NMS) on the features of each detection layer, and finally output the detection results including target bounding boxes, class labels, and confidence scores.

[0133] During the model training process of this invention, the training parameters first need to be set: input image size is 640×512, batch size is 32, training epochs are 500, data loading threads are 16, the optimizer is SGD (Stochastic Gradient Descent), the initial learning rate is 0.01, the momentum is 0.937, and the weight decay is 0.0005. The loss function during training includes bounding box regression loss, class prediction loss, and distribution focus loss, which allows the model to simultaneously consider localization accuracy and robustness in small object detection. The best model is saved after training to prepare for subsequent practical deployment applications.

[0134] Specific Implementation Method Eight: This implementation method is a further limitation of Specific Implementation Method Seven, wherein the backbone network in step S402 is the YOLO11 backbone network.

[0135] The other steps and parameters are the same as in Specific Implementation Method Seven.

[0136] Specific Implementation Method Nine: This implementation method is a further limitation of Specific Implementation Method One. The specific process of step four is as follows:

[0137] Step S501: Create the result image variable FireResultImage = Create a two-dimensional array with width Width and height Height, and initialize all elements in the array to 0;

[0138] Step S502: Input the thermal infrared image (TestInputImage) of the UAV to be detected into the trained model:

[0139] DetectionOutput = ZSYJBGWXYModel (TestInputImage)

[0140] Wherein, DetectionOutput represents the detection result, which includes a list of detected fire point bounding boxes and the probability of a fire point appearing in each bounding box; ZSYJBGWXYModel represents the trained model;

[0141] Step S503: Set the detection box counter BoxCounter = 1;

[0142] Step S504: Obtain the detection result CurrentBox of the detection box.

[0143] CurrentBox = DetectionOutput[BoxCounter]

[0144] Wherein, DetectionOutput[BoxCounter] represents the BoxCounter-th detection box extracted from the detection result DetectionOutput;

[0145] Step S505: Obtain the position (BoxCoords) of the BoxCounter-th detection box.

[0146] BoxCoords = CurrentBox[position coordinates]

[0147] Where CurrentBox[position coordinates] represents the position coordinates extracted from the CurrentBox of the detection result;

[0148] Step S506: Obtain the confidence score (BoxScore) of the BoxCounter-th detection box.

[0149] BoxScore = CurrentBox[Confidence Level]

[0150] Where CurrentBox[confidence] represents the probability of a fire point appearing in the CurrentBox of the detection results;

[0151] Step S507: Set the confidence threshold (Threshold) and compare the BoxScore with the confidence threshold.

[0152] If BoxScore is greater than or equal to Threshold, proceed to step S508; otherwise, proceed to step S509.

[0153] Step S508: Set the initial screening threshold InitialThreshold = 70 and the confirmation threshold ConfirmThreshold = 120;

[0154] The BoxCounter detection box region is determined to be a fire point based on the initial screening threshold InitialThreshold. Specifically, it is determined whether the temperature value PixelTemp at the center point of the BoxCounter detection box region is greater than the initial screening threshold InitialThreshold. The temperature value is in degrees Celsius.

[0155] If the temperature value PixelTemp is less than the initial screening threshold InitialThreshold, then the BoxCounter detection box area is not a fire point, and continue to execute step S509.

[0156] If the temperature value PixelTemp is greater than or equal to the initial screening threshold InitialThreshold, then the BoxCounter-th detection box region is marked as a fire point in the result image variable FireResultImage, and the BoxCounter-th detection box region is output as a red or yellow warning (the level is determined by the temperature value of the pixel at the center of the detection box). The pixel value of the BoxCoords region in the result image variable FireResultImage is set to BoxScore, i.e.:

[0157] FireResultImage[BoxCoords area] = BoxScore

[0158] The method for determining whether the BoxCounter-th detection box region is a red or yellow warning is as follows:

[0159] If InitialThreshold ≤ PixelTemp < ConfirmThreshold, then the warning level of the detection box is "Yellow Warning";

[0160] If PixelTemp ≥ ConfirmThreshold, then the warning level of the detection box = "Red Warning";

[0161] Then proceed to step S509;

[0162] Step S509: Increment the counter BoxCounter = BoxCounter + 1;

[0163] Step S510: Determine whether all detection boxes have been processed: If BoxCounter > the number of bounding boxes contained in DetectionOutput, then proceed to step S511; otherwise, proceed to step S504.

[0164] Step S511: Output detection results: Output the result image variable FireResultImage as the straw burning fire point detection result of the entire image.

[0165] The other steps and parameters are the same as in Specific Implementation Method 1.

[0166] Specific Implementation Method 10: This implementation method is a further limitation of Specific Implementation Method 9, wherein the confidence threshold Threshold is 0.45.

[0167] The other steps and parameters are the same as in Specific Implementation Method Nine.

[0168] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for detecting straw fire points in UAV thermal infrared images based on local pixel enhancement, characterized in that, The method specifically comprises the following steps: Step one, obtaining an original unmanned aerial vehicle thermal infrared image data set of the straw, and obtaining an enhanced image data set based on the original unmanned aerial vehicle thermal infrared image data set; Step two, constructing a scale-consistent local pixel activation module, and constructing an unmanned aerial vehicle distance scale adaptive pixel perception module based on the scale-consistent local pixel activation module, the unmanned aerial vehicle distance scale adaptive pixel perception module being used for outputting an enhanced feature variable and a fusion feature of each scale; The working process of the scale-consistent local pixel activation module is as follows: Step S201, inputting a feature mapping variable InputFeature; Step S202, calculating a down-sampled feature variable DownSampleFeature = performing a convolution operation with a step size of 2 and a convolution kernel size of 3x3 on the feature mapping variable InputFeature; Step S203, calculating a channel average pooling variable AvgPoolFeature = performing global average pooling on the down-sampled feature variable DownSampleFeature along the spatial dimension; Step S204, calculating a channel fully connected compression variable FcCompress = an output result of the channel average pooling variable AvgPoolFeature after passing through a fully connected layer; Step S205, calculating a channel fully connected expansion variable FcExpand = an output result of the channel fully connected compression variable FcCompress after passing through a fully connected layer; Step S206, calculating a channel weight variable ChannelWeight = a result of performing Sigmoid activation on the channel fully connected expansion variable FcExpand; Step S207, calculating a channel enhanced feature variable SeOutput: SeOutput = InputFeature × ChannelWeight Wherein, "×" represents element-wise multiplication in the channel dimension; Step S208, calculating a spatial convolution feature variable SpatialConv = performing a convolution operation with a step size of 1 and a convolution kernel size of 7x7 on the down-sampled feature variable DownSampleFeature; Step S209, calculating a spatial weight variable SpatialWeight = a result of performing Sigmoid activation on the spatial convolution feature variable SpatialConv; Step S210, calculating a spatial enhanced feature variable LskaOutput: LskaOutput = InputFeature × SpatialWeight Step S211, splicing the outputs of the two attention branches to obtain a splicing result ConcatOutput: ConcatOutput = Concat(SeOutput, LskaOutput) Wherein, Concat is a splicing operation; Step S212, performing residual connection on the feature mapping variable InputFeature and the splicing result ConcatOutput to obtain a residual connection enhanced feature: EnhanceOutput = InputFeature + ConcatOutput wherein, EnhanceOutput represents a residual connection enhanced feature; Step S213, performing tanh activation on the EnhanceOutput to obtain an activation result tanhEnhanceOutput: tanhEnhanceOutput = a ⋅ tanh(EnhanceOutput) wherein, tanh represents a tanh activation function, and a is a coefficient; Step S214, performing residual connection on the activation result tanhEnhanceOutput and the residual connection enhanced feature EnhanceOutput; FinalOutput = EnhanceOutput + tanhEnhanceOutput wherein, FinalOutput represents an enhanced feature variable; Step S215, outputting the enhanced feature variable FinalOutput; The working process of the unmanned aerial vehicle distance scale adaptive pixel perception module is as follows: Step S301, inputting four scale feature mappings BackboneFeatures = [P2, P3, P4, EnhancedP5], wherein P2, P3, P4, and EnhancedP5 are features of four different scales; Step S302, calculating cross-layer dynamic fusion weights wP5 and wP4: [wP5, wP4] = Softmax([GAP(Upsample(EnhancedP5)), GAP(P4)]) wherein, GAP represents a global average pooling operation; Upsample represents a 2-fold up-sampling operation; and Softmax represents an activation function; Step S303, dynamic weighted fusion: FusedP4 = C3k2(wP5⋅Upsample(EnhancedP5) + wP4 P4) wherein, FusedP4 represents a fused feature, and C3k2 represents a residual convolution; Step S304, up-sampling the fused feature FusedP4 and calculating a fusion weight according to the up-sampling result: FusedP4up = Upsample(FusedP4) [wF4, wP3] = [Softmax([GAP(FusedP4up), GAP(P3)])] wherein, FusedP4up represents an up-sampling result of FusedP4, and wF4 and wP3 are both fusion weights; Step S305, obtaining a fusion result FusedP3 through dynamic weighted fusion: FusedP3 = C3k2(wF4⋅FusedP4up+wP3 P3) Step S306, up-sampling the fusion result FusedP3 and calculating a fusion weight according to the up-sampling result: FusedP3up = Upsample(FusedP3) [wF3, wP2] = [Softmax([GAP(FusedP3up), GAP(P2)])] wherein, FusedP3up represents an up-sampling result of FusedP3, and wF3 and wP2 are both fusion weights; Step S307, a fusion result FusedP2 is obtained by dynamically weighting fusion: FusedP2 = C3k2(wF3⋅FusedP3up+wP2 P2) Step S308, the fusion result FusedP2 is input into the scale-consistent local pixel activation module to obtain an output TinyEnhanced of the scale-consistent local pixel activation module: TinyEnhanced = CDYZJBGWXYJHBlock (FusedP2) Wherein, CDYZJBGWXYJHBlock represents the scale-consistent local pixel activation module; Step S309, output the enhanced feature variable TinyEnhanced, the feature EnhancedP5, and the fusion feature variables FusedP4 and FusedP3; Step three, based on the scale-consistent local pixel activation module and the unmanned aerial vehicle distance scale adaptive pixel perception module, a model for detecting straw fire points in unmanned aerial vehicle thermal infrared images is constructed; And the data set of the enhanced image is used to train the model to obtain a trained model; Step four, input the straw unmanned aerial vehicle thermal infrared image to be detected into the trained model to obtain a fire point detection result.

2. The unmanned aerial vehicle thermal infrared imagery straw fire point detection method based on local pixel enhancement according to claim 1, characterized in that, The specific process of step one is: Step S101, input the original unmanned aerial vehicle thermal infrared image data set StrawDataset; Step S102, obtain the total number of image data TotalCount = the number of images in the original unmanned aerial vehicle thermal infrared image data set StrawDataset; Step S103, establish an enhanced image storage variable EnhancedDataset = the original unmanned aerial vehicle thermal infrared image data set StrawDataset; Step S104, establish an image processing counter ImageCounter = 1; Step S105, temporarily store a single original image variable TempImage = read the ImageCounter-th image in the original unmanned aerial vehicle thermal infrared image data set StrawDataset; Step S106, calculate a random scaling variable ScaleImage = the result of performing a random scaling operation on TempImage; Step S107, calculate a random cropping variable CropImage = the result of performing a random cropping operation on the random scaling variable ScaleImage; Step S108, calculate a random flip variable FlipImage = the result of performing a horizontal flip on the random cropping variable CropImage with a probability of 0.5; Step S109, calculate a color disturbance variable ColorImage = the result of performing random disturbances on brightness, contrast, and saturation on the random flip variable FlipImage; Step S110, calculate an affine transformation variable AffineImage = the result of performing translation and rotation operations on the color disturbance variable ColorImage; Step S111, calculate a mosaic enhancement variable MosaicImage = a new composite image; The new composite image is obtained in the following manner: three original images are randomly selected from the original unmanned aerial vehicle thermal infrared image dataset StrawDataset, the selected three images are spliced with the affine transformation variable AffineImage through the mosaic enhancement method, and a new composite image is formed; Step S112, temporarily store the original label variable TempLabel = read the label corresponding to the ImageCounter image in the original unmanned aerial vehicle thermal infrared image dataset StrawDataset and the label corresponding to the three images selected in step S111; Step S113, establish the label variable AugLabel = coordinate transformation is performed on the label read in step S112 according to the spatial change of the mosaic enhancement variable MosaicImage; Step S114, store the combination of the mosaic enhancement variable MosaicImage and the label variable AugLabel in the enhanced image storage variable EnhancedDataset; Step S115, let the image processing counter ImageCounter = ImageCounter + 1; Step S116, if ImageCounter > TotalCount, go to step S117, otherwise go to step S105; Step S117, output the enhanced image dataset StrawEnhancedDataset; Step S118, divide the enhanced image dataset StrawEnhancedDataset into a training set, a validation set and a test set in a ratio of 7:2:1, and use the training set, the validation set and the test set to train, verify and test the unmanned aerial vehicle thermal infrared image fire point detection model.

3. The unmanned aerial vehicle thermal infrared imagery straw fire point detection method based on local pixel enhancement according to claim 1, characterized in that, The coefficient α is 0.

2.

4. The unmanned aerial vehicle thermal infrared imagery straw fire point detection method based on local pixel enhancement according to claim 1, characterized in that, The input of the unmanned aerial vehicle distance scale adaptive pixel perception module is four features of different scales.

5. The UAV thermal infrared imagery straw fire point detection method based on local pixel augmentation according to claim 1, wherein, The working process of the model for unmanned aerial vehicle thermal infrared image straw fire point detection is: Step S401, input any image StrawInputImage in the enhanced image dataset StrawEnhancedDataset; Step S402, input the image StrawInputImage as the input of the backbone network, and extract the multi-scale feature mapping BackboneFeatureImages = [P2, P3, P4, P5] of the image StrawInputImage through the backbone network; Wherein, P2, P3, P4 and P5 are feature maps output by the backbone network; Step S403, input the feature map P5 into the scale-consistent local pixel activation module to obtain the output EnhancedP5: EnhancedP5 = CDYZJBGWXYJHBlockl(P5) Step S404, define a multi-scale feature map BackboneFeatureImages= [P2, P3, P4, EnhancedP5], input the multi-scale feature map BackboneFeatureImages into the UAV distance scale adaptive pixel perception module to obtain the output of the UAV distance scale adaptive pixel perception module: [TinyEnhanced, FusedP3, FusedP4, EnhancedP5]=UAVJLCDZXYTYXYGZBlock(BackboneFeatureImages) Wherein, UAVJLCDZXYTYXYGZBlock represents the UAV distance scale adaptive pixel perception module; Step S405, perform feature fusion on TinyEnhanced and FusedP3 to obtain fused feature SmallInput: SmallInput = C3k2(Concat(Downsample(TinyEnhanced), FusedP3)) Wherein, Downsample is a 2-fold downsampling operation; Step S406, perform feature fusion on SmallInput and FusedP4 to obtain fused feature MediumInput: MediumInput = C3k2(Concat(Downsample(SmallInput), FusedP4)) Step S407, perform feature fusion on MediumInput and EnhancedP5 to obtain fused feature LargeInput: LargeInput = C3k2(Concat(Downsample(MediumInput), EnhancedP5)) Step S408, construct the input variable NeckOutputFeatures of the detection head: NeckOutputFeatures = [ TinyEnhance, SmallInput, MediumInput, LargeInput] Step S409, input the input variable NeckOutputFeatures into the detection head, and output the detection result StrawDetectResult through the detection head: StrawDetectResult = detect(NeckOutputFeatures) Wherein, detect represents the detection head; Step S410, take StrawDetectResult as the detection result of the image StrawInputImage.

6. The UAV thermal infrared imagery straw fire point detection method based on local pixel enhancement according to claim 5, characterized in that, The backbone network in step S402 is the backbone network of YOLO11.

7. The unmanned aerial vehicle thermal infrared imagery straw fire point detection method based on local pixel augmentation of claim 1, wherein, The specific process of step four is: Step S501, a result image variable FireResultImage is established, a two-dimensional array with a width of Width and a height of Height is established, and all elements in the array are initialized to 0; Step S502, input the trained model with the unmanned aerial vehicle thermal infrared image to be detected TestInputImage: DetectionOutput = ZSYJBGWXYModel (TestInputImage) Where, DetectionOutput represents the detection result, which contains the detected fire point bounding box list and the probability of fire point appearing in each bounding box; ZSYJBGWXYModel represents the trained model; Step S503, establish a detection box counter BoxCounter = 1; Step S504, get the detection result of the detection box CurrentBox: CurrentBox = DetectionOutput[BoxCounter] Where, DetectionOutput[BoxCounter] represents the extraction of the BoxCounterth detection box in the detection result DetectionOutput; Step S505, get the position BoxCoords of the BoxCounterth detection box: BoxCoords = CurrentBox[location coordinates] Where, CurrentBox[location coordinates] represents the extraction of the location coordinates in the detection result CurrentBox; Step S506, get the confidence BoxScore of the BoxCounterth detection box: BoxScore = CurrentBox[confidence] Where, CurrentBox[confidence] represents the extraction of the fire point appearance probability in the detection result CurrentBox; Step S507, set the confidence threshold Threshold, and determine the size of BoxScore and the confidence threshold: If BoxScore is greater than or equal to Threshold, execute step S508, otherwise jump to step S509; Step S508, set the initial screening threshold InitialThreshold = 70, and set the confirmation threshold ConfirmThreshold = 120; Determine whether the BoxCounterth detection box region is a fire point according to the initial screening threshold InitialThreshold, that is, judge whether the temperature value PixelTemp of the center point position of the BoxCounterth detection box region is greater than the initial screening threshold InitialThreshold; If the temperature value PixelTemp is less than the initial screening threshold InitialThreshold, the BoxCounterth detection box region is not a fire point, continue to execute step S509; If the temperature value PixelTemp is greater than or equal to the initial threshold value InitialThreshold, the BoxCounterth detection frame region is marked as a fire point in the result image variable FireResultImage, the BoxCounterth detection frame region is output as a red warning or a yellow warning, and the pixel value of the BoxCoords region in the result image variable FireResultImage is BoxScore, that is: FireResultImage[BoxCoords region] = BoxScore The determination method of the BoxCounterth detection frame region being a red warning or a yellow warning is as follows: If InitialThreshold ≤ PixelTemp < ConfirmThreshold, the warning level of the detection frame = "yellow warning"; If PixelTemp ≥ ConfirmThreshold, the warning level of the detection frame = "red warning"; Then, step S509 is executed again; Step S509, the counter is incremented, BoxCounter = BoxCounter + 1; Step S510, it is judged whether all detection frames are processed: if BoxCounter > the number of bounding boxes contained in DetectionOutput, step S511 is entered, otherwise, step S504 is entered; Step S511, the detection result is output: the result image variable FireResultImage is output as the detection result of the straw burning fire point of the whole image.

8. The UAV thermal infrared imagery straw fire point detection method based on local pixel enhancement according to claim 7, characterized in that, The confidence threshold Threshold is 0.45.

Citation Information

Patent Citations

  • YOLOv8 improved model training method and ship detection method

    CN119131580A

  • Aluminum profile surface defect detection method based on YOLOv8

    CN120598933A