Power transmission line channel forest fire detection method based on improved YOLO detection model
By improving the YOLO detection model and using the ContMix and MobileMamba modules to enhance feature extraction and detection capabilities, the accuracy and efficiency issues of wildfire and smoke detection in the complex environment of transmission line channels were solved, and high-precision, real-time wildfire identification was achieved.
Patent Information
- Application Number
- CN202510803204.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-10-17
AI Technical Summary
Existing wildfire monitoring technologies have low detection efficiency and insufficient accuracy in complex terrain and vegetation-obstructed environments, especially in the identification of wildfires and smoke near transmission line corridors.
An improved YOLO detection model is adopted, which improves the robustness and accuracy of the model in complex scenes by introducing context-dynamic hybrid convolution ContMix into the backbone network, embedding MobileMamba module and P2 small target detection head into the detection head, and combining data augmentation techniques.
It significantly improves the detection accuracy and generalization capability of wildfires and smoke near transmission line channels, enhances the feature representation quality of small targets and occluded targets, and meets real-time requirements.
Smart Images

Figure CN120807871A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mountain fire and smoke image detection, and particularly relates to a mountain fire detection method for a power transmission line channel based on an improved YOLO detection model. BACKGROUND
[0002] Mountain fire, as one of the serious natural disasters, causes great threat to ecological environment, public safety and social economy. Timely and accurate mountain fire identification is of great importance to early warning and emergency response, which can effectively curb the spread of fire and reduce losses. Traditional mountain fire monitoring methods rely on satellite remote sensing, infrared sensors and other equipment, but there are problems such as high response delay and missed detection of small-scale fires, especially in complex terrain and vegetation sheltered environment, the reliability is significantly reduced. In recent years, the visual detection technology based on deep learning provides a new way for real-time monitoring of mountain fires, which automatically extracts flame and smoke features through convolutional neural network, greatly improving the detection efficiency and accuracy.
[0003] Based on the difference of candidate frame generation mechanism, modern target detection algorithm can be divided into two-stage framework and single-stage framework. The two-stage algorithm adopts a cascade processing mode, the first stage generates candidate regions through the region proposal network, and the second stage implements fine feature learning and target identification. The single-stage architecture adopts an end-to-end design, which integrates feature representation learning, boundary box coordinate regression and target class determination into a unified network architecture and completes them simultaneously.
[0004] The classic two-stage detection framework Faster R-CNN uses region of interest pooling operation (ROI-Pooling) to realize feature space standardization, projects candidate regions of different scales to a unified dimension feature tensor, and significantly optimizes the feature representation ability by integrating the multi-scale feature fusion idea of spatial pyramid pooling (SPP). The core improvement is to introduce the region generation network (RPN), which realizes end-to-end prediction of candidate frames through the preset anchor mechanism, which is suitable for scenarios with high accuracy requirements and low real-time requirements.
[0005] YOLO, as the current mainstream one-stage detection framework, adopts the detection architecture of backbone network (Backbone) + feature fusion network (Neck) + detection head (Head), which significantly improves the detection accuracy and generalization ability while maintaining real-time, and is suitable for efficient target identification tasks in complex scenarios. SUMMARY
[0006] The purpose of the present application is to provide a mountain fire detection method for a power transmission line channel based on an improved YOLO detection model, which can effectively improve the detection of mountain fires and smoke near the power transmission line channel, and obtain accurate and rapid identification through image detection method.
[0007] The technical scheme adopted by the present application is:
[0008] A power line channel mountain fire detection method based on an improved YOLO detection model, comprising the following steps:
[0009] Step 1: Use the image acquisition device of the power line channel monitoring system to extract the power line mountain fire detection image and construct the detection dataset;
[0010] Step 2: Select detection images from the detection dataset for mountain fire and smoke area labeling, and after data enhancement, divide the detection dataset into a training set and a test set;
[0011] Step 3: Improve the YOLO detection model, use context dynamic hybrid convolution ContMix in the feature extraction module of the backbone network; embed MobileMamba module and P2 small target detection head in the detection head module;
[0012] Step 4: Input the training set into the improved YOLO detection model for training, test the performance of the trained YOLO detection model through the test set, and evaluate the performance of the trained YOLO detection model using various evaluation indexes;
[0013] Step 5: Use the trained YOLO detection model to detect the detection images obtained by the image acquisition device to obtain information about whether mountain fire occurs in the power line channel.
[0014] Further, in step 1, the mountain fire detection image is obtained by the image acquisition device of the power line channel monitoring system, and the size of the image is 1280x1280; the maximum inter-class variance of the image RGB average value is greater than 80.
[0015] Further, in step 2, the mountain fire target and smoke target in the image are labeled using an artificial method; the pixel edge of the mountain fire target and smoke target is found in the region; and the class of the detection target is stored in the annotation file.
[0016] Further, in step 2, the data enhancement includes: after random flipping, vertical flipping and random noise data augmentation of the detection dataset, the dataset is further expanded by a Poisson fusion method.
[0017] Further, in step 3, the feature extraction module of the backbone network of the YOLO detection model adopts a context dynamic hybrid convolution ContMix, ContMix first converts the input feature into a query vector and a region center key vector, calculates the affinity value of each position with multiple region centers, and dynamically generates a group of convolution kernels related to the input content by using the affinity value; then through the grouping convolution strategy, different groups use different scale dynamic convolution kernels, and the global context information and local features are mixed in the convolution process.
[0018] Further, in step 3, the MobileMamba module is added in the detection head module of the YOLO detection model, the MobileMamba module enhances the perception ability of the model to global and multi-scale local information through multi-receptive field feature interaction (MRFFI); the MobileMamba module divides the input feature into three parts along the channel dimension: the first part uses the Mamba enhanced by long-range wavelet transform (WTE-Mamba) to extract global features and enhance high-frequency detail extraction; the second part uses the multi-kernel depth convolution (MK-DeConv) operation to capture multi-scale receptive field information; and the third part reduces feature redundancy in high-dimensional space through identity mapping to eliminate redundancy, thereby improving the calculation efficiency.
[0019] Further, in step 3, the P2 small target detection head is added in the detection head of the YOLO detection model, after the 2 times CBS convolution module operation in the backbone network, the C2f feature extraction module is fused with the neck network to obtain the detection head containing bottom layer information.
[0020] Further, in step 4, the performance of the P2 small target detection head is evaluated by using the smoke contact ratio; the smoke contact ratio is obtained by calculating the ratio of the edge length of the mutual approach of the mountain fire edge and the smoke edge to the length of the mountain fire edge.
[0021] The advantages of the present application are:
[0022] 1. The present application collects data in the power line channel, and after data augmentation of random flipping, vertical flipping and random noise on the data set, the data set is further expanded by the Poisson fusion method, which significantly improves the robustness of the model to multi-direction, noise interference and complex background, and the precision and generalization ability in the complex scene of the power line channel.
[0023] 2. The present application proposes to use a context dynamic hybrid convolution ContMix in the feature extraction module of the backbone network of the YOLO detection model, which realizes dynamic feature fusion of multi-scale context perception, while maintaining real-time inference speed, and significantly improves the target detection accuracy in complex scenes.
[0024] 3、The application proposes to increase the MobileMamba module in the detection head of the YOLO detection model, utilize the dynamic state space modeling capability to enhance the feature long-range dependence capture, while maintaining the real-time inference efficiency, significantly improve the feature representation quality of small targets and occluded targets.
[0025] 4、The application proposes to increase the small target detection head in the detection head of the YOLO detection model, by introducing a high-resolution feature layer in the detection head of the YOLO detection model, constructing a fine-grained multi-scale detection system, significantly enhancing the semantic representation ability of the sensitive area of the small target, while maintaining the lightweight characteristics of the model, effectively improving the recall rate and positioning accuracy of the micro target in complex scenes.
[0026] 5、The application proposes to use the fire contact ratio in the detection performance evaluation, improve the accuracy of the detection result, and be closer to the actual forest fire occurrence scene. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A flow chart of a power line channel forest fire detection method based on an improved YOLO detection model is provided.
[0028] Figure 2 A whole structure diagram of the improved YOLO detection model is provided.
[0029] Figure 3 A structure diagram of the ContMix convolution introduced by the application is provided.
[0030] Figure 4 A structure diagram of the MobileMamba module introduced by the application is provided. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0032] As shown in Figure 1 The embodiments of the application provide a power line channel forest fire detection method based on an improved YOLO detection model, which comprises the following steps:
[0033] Step 1: Use the image acquisition device of the power line channel monitoring system to extract the power line forest fire detection image and construct the detection data set;
[0034] Step 2: Select detection images from the detection dataset for wildfire and smoke region annotation, and after data augmentation, divide the detection dataset into a training set and a test set;
[0035] Step 3: Improve the YOLO detection model, use ContMix in the feature extraction module of the backbone network; embed MobileMamba module and P2 small target detection head in the detection head module;
[0036] Step 4: Input the training set into the improved YOLO detection model for training, test the performance of the trained YOLO detection model through the test set, and evaluate the performance of the trained YOLO detection model using various evaluation indicators;
[0037] Step 5: Use the trained YOLO detection model to detect wildfires using images obtained by the image acquisition device, and obtain information about whether wildfires occur in the power line channel.
[0038] In step 1, the wildfire detection image is obtained by the image acquisition device of the power line channel monitoring system, and the image size is 1280x1280; the maximum inter-class variance of the image RGB average value is greater than 80. Collect wildfire scene pictures containing different seasons, vegetation types and smoke concentrations, and the original dataset size reaches 800.
[0039] In step 2, the wildfire target and smoke target in the image are labeled using artificial methods; the region of the wildfire target and smoke target finds its pixel edge; the class of the detection target is stored in the annotation file.
[0040] After data augmentation of random flipping, vertical flipping and random noise on the dataset, the dataset is further expanded by the Poisson fusion method.
[0041] Use the Labelme annotation tool for pixel-level annotation and establish two labels "fire" and "smoke". After annotation, run the format conversion script to convert the polygon coordinates in the JSON file to single-channel PNG format masks, where pixel value 0 represents the background, 1 represents the wildfire area, and 2 corresponds to the smoke area.
[0042] Random horizontal flipping (probability 0.5), vertical flipping (probability 0.3) are used with Albumentations library, and random rotation of ±15 degrees and scale of 0.9-1.1 are set. Add perceptual noise: apply salt and pepper noise (noise density 0.02) and Gaussian noise (μ=0, σ²=0.01) to simulate sensor noise. A material library containing 2000 non-fire backgrounds is established, and the augmented fire / smoke area is fused into the random background by the seamlessClone function of OpenCV, and the mixed gradient threshold λ=50 is set to generate 5000 synthetic images with different lighting conditions. The original data and augmented data are divided into training set (21,000), validation set (6,000) and test set (3,000) in the ratio of 7:2:1.
[0043] In step 3, the improved YOLO detection model structure is as shown in Figure 2 The present application adopts context dynamic mixed convolution ContMix in the feature extraction module in the YOLO detection model backbone network, and for the input feature map , first, it is split into Q and K two parts through 1×1 convolution. Among them, K is aggregated into S×S region center representation through adaptive average pooling, forming the key node of global context. Q and K are evenly divided into G groups (similar to multi-head attention mechanism), and the affinity matrix A g of each token in Q with all region centers in K is calculated. , wherein represents the association strength of the i-th token with all region centers. The affinity matrix A g is converted through a learnable linear layer , which maps the affinity value of each token to the weight of the K×K dynamic convolution kernel. This process is implemented through matrix multiplication Figure 3 , where softmax is used to normalize the weights, ensuring that each kernel weight contains global context information. The generated dynamic kernel adaptively adjusts the weights according to the different positions of the input features in the convolution operation, so that each token can fuse global context guided local calculation during convolution, thereby capturing long-distance dependencies under fixed kernel size. The ContMix convolution structure is as shown in .
[0044] The present application adds a MobileMamba module to the detection head of the YOLO detection model, and the structure of the MobileMamba module is as shown inFigure 4 Feature maps from the backbone network or neck network of the YOLO detection model As the input of the MobileMamba module, the features are first divided into three parts by the channel dimension division strategy: the global feature branch (proportion ξc) is used to extract long-distance dependencies and high-frequency details; the multi-scale local feature branch (proportion μc) is used to capture local receptive fields of different scales; the redundancy elimination branch (proportion (1−ξ−μ)c) directly retains the basic information through the Identity mapping, reducing the computational redundancy. The global branch feature is first processed by linear transformation and activation function (σ), and then input into the bidirectional scanning Mamba module to learn the global context information, and output ; at the same time, the other part of the global feature is linearly transformed and activated to obtain , and the two are fused by tensor product and linear transformation to generate global modeling feature . The same global feature is Haar wavelet transformed to decompose into low-frequency (LL) and high-frequency (LH, HL, HH) subbands, and the high-frequency information such as edges is enhanced by convolution operation, and then the original size is restored by inverse wavelet transform to obtain wavelet enhanced feature . The final global branch output is , which fuses global dependencies and high-frequency details. The local branch feature is evenly divided into n subsets, and each subset uses deep convolution (DWConv) with different kernel sizes to extract multi-scale local features, and finally the features are spliced along the channel dimension to generate multi-scale local features . Through the cooperation of wavelet transform and convolution, the receptive field is actually equivalent to expansion. The redundancy elimination branch feature directly passes through the Identity mapping to avoid redundant calculation in high-dimensional space, and the output is x I [ ( 1 − ξ − μ ) c ] . The global branch output , the multi-scale local branch output , and the redundancy elimination branch output are spliced along the channel dimension to obtain the fused feature x O = Concat ( x G O , x L O , x I [ ( 1 − ξ − μ ) c : ] ) , which integrates global long-distance dependencies, multi-scale local details, and basic feature information. The fused feature is input into the FFN, which is nonlinearly transformed by convolution (such as 3×3 convolution) and activation function to further enhance the feature expression ability. The processed feature map is used as the input of the detection head to generate the classification and regression predictions required for target detection.
[0045] The application proposes to add a P2 small target detection head to the detection head of a YOLO detection model. The basic network architecture of the YOLO detection model adopts a multi-scale feature fusion mechanism, and its original structure includes three hierarchical detection modules P3-P5, which can receive three feature maps of different sizes, forming an identification system covering targets of different sizes. In the feature extraction stage, after the backbone network is processed by the two-stage CBS convolution module, the C2f module and the feature fusion mechanism of the neck network, a P2 prediction layer integrating low-level features is added, which significantly improves the positioning accuracy of small targets. To maintain the adaptability of the model to conventional detection scenarios, the original P3-P5 three-order detection modules are completely retained to ensure stable detection performance for medium and long distance targets, forming a four-level composite detection system.
[0046] In step 3, the improved YOLO detection model uses Adam as the core training strategy, dynamically adjusts the gradient update direction, and combines the parameter-wise normalization technique to effectively balance the update amplitude of each weight coefficient. This design not only alleviates the gradient shock problem existing in the traditional SGD optimizer, but also continuously corrects the parameter distribution through the exponential weighted moving average algorithm, so that the model gradually approaches the probability density function of the real data space. Training settings of 300 training cycles (epochs) ensure that the model converges fully, and a learning rate of 0.01 is used as the initial step size for parameter updates, combined with a peak cycle learning rate scheduling strategy of 0.1 to realize dynamic exploration, while maintaining a batch size of 16 to balance the memory usage and gradient estimation stability. The remaining hyperparameters strictly follow the preset benchmark values of the PyTorch framework.
[0047] To further illustrate the technical solutions of the application, the following embodiments are described in detail:
[0048] This embodiment realizes the performance breakthrough of the YOLO detection model through three-stage technology upgrading: ContMix context dynamic mixed convolution is used in the backbone network instead of the conventional 3x3 convolution to realize dynamic feature fusion of multi-scale context perception; the MobileMamba module is embedded in front of the detection head to strengthen the long-range dependence capture ability through dynamic state space modeling; a P2 high-resolution small target detection layer is added to construct a fine-grained multi-level detection system. The three innovations significantly improve the detection accuracy in complex scenarios while maintaining the lightweight and real-time inference characteristics of the model, especially enhancing the feature representation quality and recall rate of small and occluded targets.
[0049] The embodiment adopts smoke-fire contact ratio (RCBSF), average precision mean mAP, frame per second (FPS) and model parameter quantity (Params) in the evaluation index to perform systematic verification. Among them, mAP comprehensively reflects the robust detection capability of the model when the IoU threshold dynamically changes; FPS reflects the processing speed of the image, quantifies the real-time performance of the algorithm; the parameter quantity is represented by calculating the total amount of trainable weights to represent the resource occupation level of the model. The calculation formulas of smoke-fire contact ratio (RCBSF), average precision mean (mAP), precision P and recall R are as follows:
[0050]
[0051]
[0052]
[0053]
[0054]
[0055] In the formula, is the true contact ratio value, is the detected contact ratio value, TP is the number of correctly predicted positive samples, FP is the number of incorrectly predicted positive samples, FN is the number of positive samples predicted as negative samples, represents that the PR curve is smoothed, and then the integral is calculated, that is, the area surrounded by the curve.
[0056] To prove the effectiveness of the present application, the present application and the initial version YOLOv8 are tested on the same test set, and the comparison results of various evaluation indexes are shown in Table 1.
[0057] Table 1 Comparison results of various evaluation indexes
[0058]
[0059] As can be seen from Table 1, the improved YOLO detection model proposed in the application realizes a significant performance breakthrough in the flame smoke detection task. Compared with the original YOLO detection model, the PRCBSF value of the improved model reaches 64.3%, which is increased by 203%; the mAP value reaches 89.6%, which is increased by 6.5%; the precision P and recall rate R of flame detection are increased by 3.1% and 4.8% respectively, and the precision P and recall rate R of smoke detection are increased by 2.7% and 4.3% respectively; the frame number per second (FPS) of the detected picture is reduced by 62 frames, and the parameter amount is increased by 5.5M. Although the improved YOLO detection model has a small decrease in detection speed and model parameter amount, it does not affect the real-time monitoring requirement, and has a great improvement in the average precision mean (mAP), precision P and recall rate R.
[0060] As can be seen from the experimental results, on the basis of the initial YOLO detection method, the backbone network and the detection head are improved respectively, which effectively improves the detection precision of the YOLO detection model for the forest fire and smoke near the transmission line channel, and can meet the real-time requirement while improving the detection precision.
[0061] The above describes only a specific embodiment of the application, but the protection scope of the application is not limited thereto, any change or replacement within the technical range disclosed by the application can be easily thought by any person skilled in the art, which should be covered within the protection scope of the application.
Claims
1. A method for detecting wildfires in power transmission line channels based on an improved YOLO detection model, characterized in that The following steps are involved: Step 1: Use the image acquisition device of the transmission line channel monitoring system to extract transmission line wildfire detection images and construct a detection dataset; Step 2: Select detection images from the detection dataset to mark wildfire and smoke areas, and after data enhancement, divide the detection dataset into a training set and a test set; Step 3: Improve the YOLO detection model by using the contextual dynamic mixed convolution ContMix in the feature extraction module of the backbone network; embed the MobileMamba module and the P2 small target detection head in the detection head module; Step 4: Input the training set into the improved YOLO detection model for training, test the performance of the trained YOLO detection model using the test set, and evaluate the performance of the trained YOLO detection model using various evaluation indicators; Step 5: Use the trained YOLO detection model image acquisition device to detect wildfires and obtain information on whether a wildfire has occurred in the transmission line channel.
2. The method for detecting wildfires based on the improved YOLO detection model according to claim 1, characterized in that: In step 1, the wildfire detection image is obtained by an image acquisition device of a power transmission line channel monitoring system, and the image size is 1280×1280; the maximum inter-class variance of the image RGB average value is greater than 80.
3. The wildfire detection method based on the improved YOLO detection model according to claim 1, characterized in that: In step 2, the wildfire target and the smoke target in the image are manually marked; the pixel edges of the wildfire target and the smoke target are found in the area; The categories of the detected targets are stored in the annotation files.
4. The method for detecting wildfires based on the improved YOLO detection model according to claim 1, characterized in that: The data enhancement in step 2 includes: performing random flipping, vertical flipping and random noise data augmentation on the detection data set, and then further expanding the data set through the Poisson fusion method.
5. The method for detecting wildfires based on the improved YOLO detection model according to claim 1, characterized in that: In step 3, the feature extraction module of the backbone network of the YOLO detection model adopts context dynamic mixed convolution ContMix. ContMix first converts the input features into a query vector and a region center key vector, calculates the affinity value of each position with multiple region centers, and uses the affinity value to dynamically generate a set of convolution kernels related to the input content; then, through the group convolution strategy, different groups use dynamic convolution kernels of different scales to mix global context information with local features during the convolution process.
6. The method for detecting wildfires based on the improved YOLO detection model according to claim 1, characterized in that: In step 3, a MobileMamba module is added to the detection head module of the YOLO detection model. The MobileMamba module enhances the model's perception of global and multi-scale local information through multi-receptive field feature interaction (MRFFI). The MobileMamba module divides the input features into three parts along the channel dimension: the first part extracts global features and enhances high-frequency detail extraction through long-range wavelet transform enhanced Mamba (WTE-Mamba); the second part captures multi-scale receptive field information using multi-kernel deep convolution (MK-DeConv) operations; and the third part reduces feature redundancy in high-dimensional space by eliminating redundant identity mappings, thereby improving computational efficiency.
7. The method for detecting wildfires based on the improved YOLO detection model according to claim 1, characterized in that: In step 3, a P2 small target detection head is added to the detection head of the YOLO detection model. After performing two CBS convolution module operations in the backbone network, the C2f feature extraction module is fused with the neck network to obtain a detection head containing underlying information.
8. The method for detecting wildfires based on the improved YOLO detection model according to claim 1, characterized in that: In step 4, the performance of the P2 small target detection head is evaluated using the fire contact ratio. The fire contact ratio is obtained by calculating the ratio of the edge lengths of the fire edge and the smoke edge that are close to each other to the fire edge length.