Ground disaster remote sensing detection method and device based on YOLOv8 model and medium
Through the remote sensing detection method of earthquake disasters based on the YOLOv8 model, combined with adaptive feature fusion and loss function design, the problems of low detection accuracy and long time consumption in remote sensing identification of earthquake disasters are solved, and high-accuracy earthquake detection in complex geological environments is achieved. Target detection.
Patent Information
- Application Number
- CN202410961455.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-08-30
AI Technical Summary
Existing remote sensing identification technology for earthquake disasters has problems such as low detection accuracy, long time consumption, and lack of large-scale public data sets. Especially when dealing with complex geological elements, deep learning methods are difficult to effectively overcome the concealment and complexity of geological elements of earthquake disasters. Leading to insufficient levels of automation and intelligence.
A remote sensing detection method for earthquake disasters based on the YOLOv8 model is adopted. By constructing a classification label earthquake data set and an adaptive feature fusion strategy, combined with a difficult sample enhancer and a target detection network, the difficult sample enhancer and target detection network are trained, using adjacent scales. Feature fusion module and multi-scale receptive field fusion module design a loss function to enhance the network's ability to identify occluded areas.
It improves the accuracy and efficiency of earthquake target detection, can effectively identify small and medium-scale targets and occluded targets in complex geological environments, improves the detection performance of the algorithm model, and maintains high accuracy even under occlusion.
Smart Images

Figure CN118570663A
Abstract
Description
Technical Field
[0001] The present application relates to the field of remote sensing imaging technology, and in particular to a method, device and medium for detecting geological disasters by remote sensing based on a YOLOv8 model. Background Art
[0002] Remote sensing target detection technology for geological disasters is an important part of the field of geological monitoring. Its core lies in obtaining the characteristics of geological disasters such as landslides, debris flows, and collapses through remote sensing images, and identifying and classifying potential geological disasters. Remote sensing target detection technology plays a vital role in many fields such as geological disaster monitoring, environmental protection, and military strategic planning. With the continuous advancement of remote sensing technology, its integration with geological disciplines has deepened, making the types of remote sensing image data richer and the amount of data larger.
[0003] At present, the interpretation of geological disaster remote sensing mainly relies on the traditional manual visual interpretation method. This method relies on the rich experience and knowledge of professionals, and through visual interpretation of images, combined with the knowledge of experts in geology, geography, etc., comprehensive analysis and logical reasoning are carried out to achieve high-precision geological disaster information extraction. However, manual interpretation has obvious limitations, including high dependence on professional knowledge, low work efficiency, and greater subjectivity, which limit its application in the integrated investigation and monitoring of natural resources with full elements, full processes, and full coverage.
[0004] Traditional machine learning methods face challenges in dealing with complex scenes in remote sensing interpretation of geological disasters. With the significant improvement in computing power, deep learning, as a representative technology of artificial intelligence, has become the main driving force for the development of remote sensing image interpretation. However, geological elements of geological disasters are often covered by vegetation or affected by geological structures, resulting in poor observability of remote sensing data, "invisible" geological disaster characteristics, and complex and variable spatial distribution of geological elements, with high inter-class similarity and intra-class dissimilarity. These factors together lead to major challenges in improving the accuracy of deep learning methods in remote sensing interpretation of geological disasters.
[0005] Researchers in this field have been exploring how to use intelligent interpretation methods to improve the accuracy and efficiency of geological disaster remote sensing technology to meet the needs of rapid and accurate monitoring in practical applications. Although some progress has been made in existing research, how to effectively overcome the concealment and complexity of geological elements of geological disasters and improve the automation and intelligence level of remote sensing image interpretation are still key scientific issues that need to be solved urgently. Summary of the invention
[0006] The purpose of the present invention is to provide a method, device and medium for remote sensing detection of geological disasters based on the YOLOv8 model in order to solve the problems of low detection accuracy, long time consumption and lack of large-scale public data sets in the existing geological disaster remote sensing identification technology.
[0007] The above-mentioned purpose of the present application is achieved through the following technical solutions: S1: Based on the remote sensing data and geological data of the study area, a classified label geological disaster dataset is constructed and preprocessed; S2: Based on the YOLOv8 model and the adaptive feature fusion strategy, a geological disaster detection model based on adaptive fusion features is constructed; the geological disaster detection model includes: difficult sample enhancer and target detection network; S3: Train the target detection network using the preprocessed classified label disaster dataset; S4: Input the classified label geological disaster dataset into the geological disaster detection model, train the difficult sample enhancer, and obtain difficult samples; S5: Retrain the target detection network through difficult samples; S6: Obtain the geological disaster remote sensing image to be classified; classify the geological disaster remote sensing image to be classified through the geological disaster detection model after secondary training to obtain the geological disaster remote sensing intelligent recognition result.
[0008] Optionally, step S1 includes: S11: Convert the acquired remote sensing data and geological data into image labels; S12: Obtain a classified labeled geological disaster dataset based on image labels and the geological disaster risk classification system; S13: Perform data cleaning, standardization, and data enhancement on the classified label geological disaster dataset; the data enhancement includes: rotation, scaling, cropping, and color transformation.
[0009] Optionally, step S4 includes: S41: inputting the original feature map of the classified label geological disaster data set into the difficult sample enhancer to obtain the occlusion feature map; S42: classify the occluded feature map, quantify the classification error of the difficult sample enhancer on the occluded sample through the loss function in the difficult sample enhancer, and calculate the loss value; S43: Selecting the occlusion feature map with the highest loss value and the adaptive occlusion mask corresponding to the occlusion feature map with the highest loss value as the difficult sample; S44: Adjust the weight of the difficult sample enhancer through the loss value.
[0010] Optionally, step S41 includes: S41a: After the original feature map is input into the difficult sample enhancer, it passes through the fully connected layer and the binary mask adaptively generated by the target detection network; the binary mask is updated with the grayscale image to obtain the adaptive occlusion mask; S41b: Dynamically occlude the original feature map through the adaptive occlusion mask, and perform element-by-element multiplication operation on the occlusion mask and the original feature map to obtain the occlusion feature map, as follows:
[0011] in represents the original feature map, represents the adaptive occlusion mask, represents element-wise multiplication, is the occlusion feature map.
[0012] Optionally, the loss function of the difficult sample enhancer is as follows:
[0013] in, Represents the total number of training sample pairs; Indicates the depth or number of channels of the feature map; and Represent the height and width of the feature map respectively; Refers to The original feature map; represents the first Image at position Occlusion feature map of Represents the corresponding position A binary mask value whose value is either 0 or 1.
[0014] Optionally, the classification loss function in the target detection network is as follows:
[0015] in represents the classification loss, represents the positioning loss, , are the balance coefficients corresponding to the losses of each part; The classification loss The cross entropy loss is used to calculate the classification loss of positive samples. In the intelligent identification of geological disasters remote sensing, there are four categories: landslide, debris flow, collapse, and background. In the case of positive sample categories:
[0016] in, is the number of grid cells where the target exists, is the total number of grid cells in the feature map, It is The true class of the grid cell Tags, is the category predicted by the model The probability of three positive samples being landslide, debris flow and collapse, then ; Combining the quality focus loss function and the bounding box loss function to construct the positioning loss ,as follows:
[0017] in, The loss value of the bounding box loss function is used to measure the difference between the predicted bounding box and the true bounding box; Indicates that the weight coefficient is between 0 and 1; represents the quality focus loss function, which is used to combine classification confidence and localization quality; Indicates the confidence of the model prediction; Represents the true label, indicating the quality of the target existence, with a value range of 0 to 1. If the target exists, then , otherwise the target does not exist ; The specific definition of the quality focus loss function is as follows:
[0018] in, is a hyperparameter used to control the sensitivity of the loss function to difficult and easy samples. .
[0019] Optionally, the target detection network includes: an adjacent scale feature fusion module and a multi-scale receptive field fusion module: The adjacent scale feature fusion module uses the feature fusion factor To balance the fusion of features at different levels, the feature fusion factor is dynamically calculated based on the number of positive and negative samples. The formula is as follows:
[0020] in is the feature fusion factor is the number of positive samples is the number of negative samples.
[0021] The adjacent scale feature fusion module combines spatial attention and channel attention to perform and Perform weighted fusion, the fused feature map Obtained by the following formula:
[0022] in is the fused feature map, is the feature fusion factor, It is Layer feature map, is the spatial attention module, It is The layer feature map is the upsampled feature map, is the channel attention module, Represents matrix multiplication; Spatial Attention Map The calculation formula is as follows:
[0023] in express Activation function, Indicates the number of compressible channels convolution, Indicates that the void rate is 4 and the convolution kernel is The dilated convolution, The convolution kernel is The convolution operation, is the activation function; The channel attention module includes: global average pooling and multi-layer perceptron; channel attention map The calculation formula is as follows:
[0024] in is the channel attention map, It is Layer feature map, It is The feature map of the layer is upsampled by 2 times. It is a multilayer perceptron, a neural network consisting of at least one hidden layer and one output layer; is the global average pooling operation; The multi-scale receptive field fusion module includes: standard convolution, dilated convolution and batch normalization layers.
[0025] An electronic device includes a processor, a memory, a user interface and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes a geological disaster remote sensing detection method based on a YOLOv8 model.
[0026] A computer-readable storage medium stores instructions. When the instructions are executed, a geological disaster remote sensing detection method based on a YOLOv8 model is executed.
[0027] The beneficial effects of the technical solution provided by this application are: 1. Obtain the characteristics of geographic data and geological data in the study area, and build a geological disaster detection model through a difficult sample enhancer. The geological disaster detection model based on adaptive fusion features mixes the adjacent scale features of different geographic data and geological data to obtain the mixed features of geographic data and geological data of targets of different scales, and fuses the multi-scale receptive field to expand the effective receptive field of the model, thereby improving the accuracy of the algorithm model in the task of geological disaster target detection. This method provides scientific support for solving the research on geological disaster detection in complex geological environments.
[0028] 2. Through loss value screening, select the samples with the highest loss value and their corresponding occlusion masks as training samples. These samples are most likely to cause classifier errors in the case of occlusion, thereby increasing the diversity and difficulty of training samples.
[0029] 3. Loss Function The design philosophy of the network is to strengthen the network's ability to identify occluded areas and train the network to more accurately simulate and handle occlusions by minimizing losses. In this way, the model learned by the network can more effectively analyze geological disaster images and maintain high-accuracy detection performance even in the presence of occlusions.
[0030] 4. A specific loss function optimization strategy is combined in the back-propagation stage. WIoU Loss is used to calculate the positioning loss of the target box, Focal Loss is used to calculate the confidence loss, and Quality Focal Loss loss function is used for classification loss. The combination of these loss functions enables the target detection network to perform well in dealing with occluded targets and multi-scale targets.
[0031] 5. The adjacent scale feature fusion module is used to replace the C2f feature fusion module in the PANet structure composed of FPN and PAN; the performance of remote sensing intelligent identification of geological disasters is significantly improved through a sophisticated feature fusion strategy. The pyramid pooling layer structure of the last layer in the Backbone extraction network of the YOLOv8 model is replaced with a multi-scale receptive field fusion module (MSRFFM), which aims to improve the accuracy of target detection in the remote sensing intelligent identification system of geological disasters, especially the recognition of small and medium-scale targets and occluded targets in scenes with complex geological element distribution. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present application will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1It is a step diagram of a method for remote sensing detection of geological disasters based on a YOLOv8 model in an embodiment of the present application; Figure 2 Schematic diagram of the electronic device structure of the geological disaster remote sensing detection method based on the YOLOv8 model in the embodiment of the present application; Figure 3 is a schematic diagram of the difficult sample enhancer structure of the geological disaster remote sensing detection method based on the YOLOv8 model in an embodiment of the present application; Figure 4 It is a backbone extraction network structure diagram of a geological disaster remote sensing detection method based on a YOLOv8 model in an embodiment of the present application; Figure 5 It is a structural diagram of an adjacent scale feature fusion module of a geological disaster remote sensing detection method based on a YOLOv8 model in an embodiment of the present application; Figure 6 It is a structural diagram of the attention module of the geological disaster remote sensing detection method based on the YOLOv8 model in the embodiment of the present application; Figure 7 It is a structural diagram of a spatial attention module of a geological disaster remote sensing detection method based on a YOLOv8 model in an embodiment of the present application; Figure 8 It is a structural diagram of a multi-scale receptive field fusion module of a geological disaster remote sensing detection method based on a YOLOv8 model in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.
[0034] The embodiments of the present application provide a method for remote sensing detection of geological disasters based on the YOLOv8 model.
[0035] Please refer to Figure 1 , Figure 1 It is a step diagram of a method for remote sensing detection of geological disasters based on the YOLOv8 model in an embodiment of the present application, including: S1: Based on the remote sensing data and geological data of the study area, a classified label geological disaster dataset is constructed and preprocessed; S2: Based on the YOLOv8 model and the adaptive feature fusion strategy, a geological disaster detection model based on adaptive fusion features is constructed; the geological disaster detection model includes: difficult sample enhancer and target detection network; S3: Train the target detection network using the preprocessed classified label disaster dataset; S4: Input the classified label geological disaster dataset into the geological disaster detection model, train the difficult sample enhancer, and obtain difficult samples; S5: Retrain the target detection network through difficult samples; Specifically, in the disaster detection model, the weights of the difficult sample enhancer should be frozen first, and the fixed parameters of the target detection network should be pre-trained. Then, the weights of the difficult sample enhancer should be unfrozen, and the weights of the backbone network should be frozen. The difficult sample selector should be trained separately for 8K~10K times. To quantify the model's classification error for occluded samples, back-propagate and update the weights of the difficult sample enhancer. The trained network automatically generates a binary mask for the input feature map for optimal occlusion, maps the generated occluded feature map back to the sample generated by the original image, and finally freezes the weights of the difficult sample enhancer again, and trains the target detection network again.
[0036] Specifically, the YOLOv8 model is used as the basic network architecture. The model uses its Backbone for feature extraction, Neck for feature fusion, and Predictor for final target detection. In the Backbone of the YOLOv8 model, the feature map first passes through the CSPDarknet53 network structure, which is composed of multiple CSP units. Each CSP unit integrates a convolutional layer, a batch normalization layer, and a SiLU activation function to efficiently extract features and reduce the amount of calculation. The feature map then passes through the SPPF (Spatial Pyramid Pooling Module) and CIS (Cross-scale Interaction Module) modules, which are part of the Neck and are used to enhance the model's ability to fuse features of different scales.
[0037] S6: Obtain the geological disaster remote sensing image to be classified; classify the geological disaster remote sensing image to be classified through the geological disaster detection model after secondary training to obtain the geological disaster remote sensing intelligent recognition result.
[0038] Specifically, a geological image to be detected is obtained; the geological image to be detected is processed by a geological disaster detection model to obtain an optimal occlusion mask grayscale image; the pixel values in the optimal occlusion mask grayscale image are converted into a binary occlusion mask to generate a final occluded geological disaster image; the occluded geological disaster image is used as a difficult sample to expand the existing class-labeled geological disaster dataset.
[0039] Step S1 includes: S11: Convert the acquired remote sensing data and geological data into image labels; S12: Obtain a classified labeled geological disaster dataset based on image labels and the geological disaster risk classification system; S13: Perform data cleaning, standardization, and data enhancement on the classified label geological disaster dataset; the data enhancement includes: rotation, scaling, cropping, and color transformation.
[0040] Specifically, remote sensing data and geological data, including: high-resolution satellite images, terrain elevation, and geological disaster boundaries. The classified labeled geological disaster dataset consists of high-resolution TripleSat satellite optical images, shapefiles of geological disaster boundaries, and digital elevation models (DEMs). Download TripleSat Disaster Monitoring Constellation 3 (DMC3) image data, which can provide 0.8-meter panchromatic and 3.2-meter RGB and NIR (near infrared) multispectral high-resolution satellite images. The dataset contains geological disaster samples cropped from TripleSat satellite images taken from May to August 2018. Sample screening and boundary delineation: Geologists preliminarily locate geological disasters in satellite images based on field surveys and historical geological disaster inventory data, and carefully delineate the boundaries of each geological disaster instance to ensure the accuracy of the dataset. Polygonal mask modification: Since the target detection model only supports rectangular anchor boxes, the polygonal masks in the dataset need to be modified to the corresponding minimum enclosing rectangle to form a classified labeled geological disaster dataset.
[0041] Specifically, the classified labeled geological disaster dataset includes positive samples (geological disaster areas such as landslides, mudslides, collapses, etc.) and negative samples (non-geological disaster areas), and data enhancement is performed to increase the generalization ability of the model.
[0042] Step S4 includes: S41: inputting the original feature map of the classified label geological disaster data set into the difficult sample enhancer to obtain the occlusion feature map; S42: classify the occluded feature map, quantify the classification error of the difficult sample enhancer on the occluded sample through the loss function in the difficult sample enhancer, and calculate the loss value; Specifically, according to the classification loss function of the pre-trained target detection network, the loss value is calculated for samples with different degrees of occlusion. Generally, the occlusion with the highest loss value, that is, the sample with the most serious occlusion of the target and the most obvious misjudgment of the classifier, is selected as the training sample.
[0043] S43: Selecting the occlusion feature map with the highest loss value and the adaptive occlusion mask corresponding to the occlusion feature map with the highest loss value as the difficult sample; S44: Adjust the weight of the difficult sample enhancer through the loss value.
[0044] Step S41 includes: S41a: After the original feature map is input into the difficult sample enhancer, it passes through the fully connected layer and the binary mask adaptively generated by the target detection network; the binary mask is updated with the grayscale image to obtain the adaptive occlusion mask; S41b: Dynamically occlude the original feature map through the adaptive occlusion mask, and perform element-by-element multiplication operation on the occlusion mask and the original feature map to obtain the occlusion feature map, as follows:
[0045] in represents the original feature map, represents the adaptive occlusion mask, represents element-wise multiplication, is the occlusion feature map.
[0046] Specifically, dynamic occlusion is used to simulate the occlusion of images by natural disasters, including landslides, mudslides, and collapses. Figure 3 The figure shows the structure of the difficult sample enhancer. The original feature map is occluded by a binary occlusion mask to simulate the occlusion of geological disaster elements in real scene vegetation, and the occlusion feature map is obtained. Then the full connection operation is performed to obtain classification and bounding box regression. The classification branch performs threshold sampling on the occlusion mask grayscale map to generate a binary mask map, and after mapping the occlusion mask back to the original feature map, the occluded geological disaster image is generated.
[0047] The loss function of the hard sample enhancer as follows:
[0048] in, Represents the total number of training sample pairs; Indicates the depth or number of channels of the feature map; and Represent the height and width of the feature map respectively; Refers to The original feature map; represents the first Image at position Occlusion feature map of Represents the corresponding position A binary mask value whose value is either 0 or 1.
[0049] Specifically, in order to improve the efficiency and accuracy of the training process, a novel loss function is introduced ; It aims to optimize the network's learning ability for image occlusion by treating the optimal binary mask map as the ground truth and using it to train the network to recognize and process occluded feature maps. The design philosophy of this loss function is to strengthen the ability of the geological disaster detection model to recognize occluded areas and to train the geological disaster detection model to more accurately simulate and process occlusion by minimizing the loss. In this way, the geological disaster detection model can analyze geological disaster images more effectively and maintain high-accuracy detection performance even in the presence of occlusion.
[0050] Specifically, the technical solution of the present application pays special attention to samples that are prone to cause classifier errors under occlusion conditions. Through the loss value screening mechanism, the most challenging samples and their corresponding occlusion masks are selected as samples for training the network to achieve adaptive optimal occlusion.
[0051] The classification loss function in the target detection network is as follows:
[0052] in represents the classification loss, represents the positioning loss, , are the balance coefficients corresponding to the losses of each part; The classification loss The cross entropy loss is used to calculate the classification loss of positive samples. In the intelligent identification of geological disasters remote sensing, there are four categories: landslide, debris flow, collapse, and background. In the case of positive sample categories:
[0053] in, is the number of grid cells where the target exists, is the total number of grid cells in the feature map, It is The true class of the grid cell Tags, is the category predicted by the model The probability of three positive samples being landslide, debris flow and collapse, then ; Combining the quality focus loss function and the bounding box loss function to construct the positioning loss ,as follows:
[0054] in, The loss value of the bounding box loss function is used to measure the difference between the predicted bounding box and the true bounding box; Indicates that the weight coefficient is between 0 and 1 and is used for balancing and relative importance in the overall loss; represents the quality focus loss function, which is used to combine classification confidence and positioning quality; the quality focus loss function can better handle the conflict between classification and positioning tasks; Indicates the confidence of the model prediction (i.e., the probability of the target existing); in YOLOv8, the confidence is used to indicate the probability that the detection box contains the target; Represents the true label, indicating the quality of the target existence, with a value range of 0 to 1. Usually, if the target exists, ,otherwise ; The specific definition of the quality focus loss function (QFL) is as follows:
[0055] in, is a hyperparameter used to control the sensitivity of the loss function to difficult and easy samples. .
[0056] Specifically, the bounding box loss function ensures the positioning accuracy of the bounding box by introducing the distance attention mechanism to adjust the weights of samples of different quality. The QFL part combines the classification confidence with the positioning quality, and optimizes the classification and positioning tasks through soft labels and weight adjustment mechanisms. The parameters allow weight adjustment between wIoU loss and QFL loss to balance the impact of both on the final loss and jointly optimize the prediction accuracy and robustness of the model.
[0057] Specifically, the Quality Focal Loss (QFL) function is used with the complete intersection-over-union bounding box regression loss algorithm to solve the problem of imbalanced categories of geological disaster samples and improve the detection accuracy of the model. The Quality Focal Loss loss function is a novel loss function designed to improve the classification accuracy of geological disasters. QFL takes into account the difference between the predicted value and the true label, and introduces the quality label to adjust the calculation of the loss value.
[0058] The target detection network includes: an adjacent scale feature fusion module and a multi-scale receptive field fusion module: Adjacent scale feature fusion network uses feature fusion factor To balance the fusion of features at different levels. This factor is dynamically calculated based on the number of positive and negative samples, and the formula is as follows:
[0059] in is the feature fusion factor is the number of positive samples is the number of negative samples.
[0060] The Adjacent Scale Feature Fusion Network (ASFFN) combines spatial attention and channel attention to perform and Perform weighted fusion. The fused feature map Obtained by the following formula:
[0061] in is the fused feature map, is the feature fusion factor, It is Layer feature map, is the spatial attention module, It is The layer feature map is the upsampled feature map, is the channel attention module, Represents matrix multiplication.
[0062] like Figure 7 As shown in the figure, the spatial attention module focuses on identifying and enhancing important spatial information in the feature map. It calculates the spatial attention map by the following formula :
[0063] in express Activation function, Indicates the number of compressible channels convolution, Indicates that the void rate is 4 and the convolution kernel is The dilated convolution, Represents the convolution kernel as The convolution operation, It is a commonly used activation function, usually used in classification tasks to convert real numbers into probability distributions.
[0064] like Figure 6 As shown in Figure 1, the channel attention module evaluates and adjusts the importance of channels through global average pooling (GAP) and multi-layer perceptron (MLP). Channel attention diagram The calculation formula is as follows:
[0065] in is the channel attention map, It is Layer feature map, It is The feature map of the layer is upsampled by 2 times. It is a multi-layer perceptron, a neural network consisting of at least one hidden layer and one output layer, usually used for classification, regression and feature extraction tasks. Each layer of MLP consists of multiple neurons, each neuron is connected to all neurons in the previous layer, forming a fully connected network structure, compressing the number of channels to 1 / 16 of the original number of channels, and then expanding it to the original number of channels. is the global average pooling operation.
[0066] Specifically, in the Neck feature aggregation network: the adjacent scale feature fusion module is used to replace the C2f feature fusion module in the PANet structure composed of FPN and PAN; the performance of remote sensing intelligent identification of geological disasters is significantly improved through a refined feature fusion strategy. The structural design of the adjacent scale feature fusion module allows it to be effectively integrated into the existing deep learning architecture. The adjacent scale feature fusion module adapts to feature maps of different scales through 1×1 convolution and upsampling operations, and optimizes feature fusion through spatial attention and channel attention mechanisms.
[0067] Specifically, the pyramid pooling layer structure of the last layer in the Backbone extraction network of the YOLOv8 model is replaced with a Multi-Scale Receptive Field Fusion Module (MSRFFM), which aims to improve the accuracy of target detection in the geological disaster remote sensing intelligent recognition system, especially the recognition of small and medium-scale targets and occluded targets in complex geological element distribution scenes. The design of this module draws on the idea of the perceptual field block network structure, and expands the effective receptive field of the model by optimizing the model's extraction and utilization of contextual information, thereby improving the detection accuracy of the algorithm model in target detection tasks.
[0068] Specifically, the target detection network includes: backbone extraction network (such as Figure 4 As shown), Neck feature aggregation network and head detection network.
[0069] In the backbone feature extraction part, the Focus and CSP structures are used; the Neck feature aggregation network part adopts the PANet structure composed of FPN and PAN to enhance the feature fusion effect. The YOLOv8 model is divided into four versions: YOLOv8s, YOLOv8m, YOLOv8l and YOLOv8x. Each version differs in the depth of the CSP structure and the number of convolution kernels at each stage, and the number of parameters gradually increases. For this instance, YOLOv8s can meet the requirements. The detection head of the YOLOv8s version generates three feature maps, and each pixel on each feature map predicts 3 bounding boxes. For a data set containing k target categories, each pixel will predict 3×(5+k) values, where 5 represents the position coordinates and confidence of each bounding box.
[0070] like Figure 5 As shown in Figure 2, the Adjacent Scale Feature Fusion Network (ASFFN) combines spatial attention and channel attention to perform and Perform weighted fusion. The fused feature map Obtained by the following formula:
[0071] in is the fused feature map, is the feature fusion factor, It is Layer feature map, is the spatial attention module, It is The layer feature map is the upsampled feature map, is the channel attention module, Represents matrix multiplication.
[0072] like Figure 8 As shown in the figure, the multi-scale receptive field fusion module consists of multiple parallel convolution branches, each with a convolution kernel of different sizes to capture feature information of different scales. In addition, the dilated convolution is introduced in the module to further expand the receptive field without increasing the number of parameters or the amount of calculation. Figure 8 In, Relu: activation function, used to introduce nonlinearity. ADD: represents the addition operation of two tensors. Adaptive Fusion: adaptive feature fusion algorithm. 1x1 Conv: convolution layer of size 1x1, used for dimensionality reduction or dimension increase. 3x3Conv: convolution layer of size 3x3, used to extract local features. Rate=1, Rate=3, Rate=5: these numbers represent the hole ratio of the dilated convolution. For example, Rate=1 means no hole, that is, ordinary 3x3 convolution; Rate=3 means inserting two zeros every other element in the convolution kernel, thereby increasing the receptive field without increasing the size of the convolution kernel. 3x3Conv: represents a convolution layer of size 3x3, followed by the hole ratio. 3×1, 1×3: these represent the size of the convolution kernel, used to extract features in different directions. Conv: represents the convolution operation. Previous Layer: represents the connection between the module and the previous layer.
[0073] The multi-scale receptive field fusion module contains multiple branches. Each feature extraction branch consists of a series of convolutional layers, including standard convolution, dilated convolution, and batch normalization layers. is the input feature map, For the The feature map output by each branch, its calculation process can be expressed as:
[0074] in, Indicates The convolution operation in each branch can be a standard convolution or a dilated convolution.
[0075] In the leftmost branch, the input feature map first passes through a 1×1 convolution layer to increase (or reduce) the dimension and adjust the number of channels. Then, it passes through a 3×3 dilated convolution with a dilation rate of 1. This convolution operation is equivalent to a normal 3×3 convolution, because a dilation rate of 1 means that no holes are inserted.
[0076] In the second branch, the input feature map first passes through a 1×1 convolution layer for dimensionality increase. Then, it passes through a 1×3 convolution layer, and then a 3×1 convolution layer. These two convolution layers combined are equivalent to a 3×3 convolution, but decomposed into two steps to reduce computational complexity. Finally, it passes through a 3×3 dilated convolution with a dilation rate of 3. This means that the receptive field of the convolution kernel is expanded, which is equivalent to inserting two holes between the original 3×3 convolution kernels.
[0077] In the third branch, the input feature map first passes through a 1×1 convolution layer for dimension increase. Then, it passes through a 3×1 convolution layer, and then a 1×3 convolution layer, which is equivalent to a 3×3 convolution. Finally, it passes through a 3×3 dilated convolution with a dilation rate of 3.
[0078] In the fourth branch, the input feature map first passes through a 1×1 convolution layer for dimension increase. Then, it passes through a 1×3 convolution layer, and then a 3×1 convolution layer. Finally, it passes through a 3×3 dilated convolution with a dilation rate of 5. This means that the receptive field of the convolution kernel is further expanded, which is equivalent to inserting four holes between the original 3×3 convolution kernels.
[0079] In the fifth branch, the input feature map first passes through a 1×1 convolution layer for dimension increase, then passes through a 3×1 convolution layer, and then passes through a 1×3 convolution layer. Finally, it passes through a 3×3 dilated convolution with a dilation rate of 5.
[0080] In the rightmost branch, the input feature map first passes through a 1×1 convolution layer for dimension increase. Then, it passes through a 3×1 convolution layer, and then a 1×3 convolution layer. Finally, it passes through a 3×3 dilated convolution with a dilation rate of 7. This means that the receptive field of the convolution kernel is further expanded, which is equivalent to inserting six holes between the original 3×3 convolution kernels.
[0081] The feature maps output by the first branch, the second branch, the third branch, the fourth branch, the fifth branch, and the sixth branch are processed by a 1×1 convolution layer after adaptive fusion.
[0082] The adaptive fusion strategy adaptively selects the best receptive field for feature extraction based on the target’s features. For the fused feature map, the adaptive fusion strategy can be expressed as:
[0083] in, For the The weight coefficient of each branch, is the total number of branches; Indicates that it is The feature map output by each branch.
[0084] Weight coefficient It is calculated through an adaptive mechanism that takes into account the contribution of each branch to the final object detection task. The weight coefficient is calculated as follows:
[0085] in, Represents the mean square error, which is used to evaluate the matching degree between each branch output feature map and the target feature. Represents any branch Output feature map.
[0086] Subsequently, an addition operation (ADD) is performed with the input feature map that has not been processed to achieve a residual connection. Finally, the final feature map is output after the ReLU activation function.
[0087] Specifically, mean Average Precision (mAP) is used as the evaluation indicator.
[0088] The present application also discloses an electronic device. Figure 2 , Figure 2The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0089] The communication bus 502 is used to realize the connection and communication between these components.
[0090] The user interface 503 may include a display screen and a camera, and the optional user interface 503 may also include a standard wired interface and a wireless interface.
[0091] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0092] The present application also discloses a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the above-mentioned geological disaster remote sensing detection method based on the YOLOv8 model.
[0093] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0094] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A geological disaster remote sensing detection method based on the YOLOv8 model, characterized in that: The method comprises the following steps: S1: Based on the remote sensing data and geological data of the study area, a classified label geological disaster dataset is constructed and preprocessed; S2: Based on the YOLOv8 model and the adaptive feature fusion strategy, a geological disaster detection model based on adaptive fusion features is constructed; The geological disaster detection model includes: difficult sample enhancer, target detection network; S3: Train the target detection network using the preprocessed classified label disaster dataset; S4: Input the classified label geological disaster dataset into the geological disaster detection model, train the difficult sample enhancer, and obtain difficult samples; S5: Retrain the target detection network through difficult samples; S6: Obtain the geological disaster remote sensing image to be classified; classify the geological disaster remote sensing image to be classified through the geological disaster detection model after secondary training to obtain the geological disaster remote sensing intelligent recognition result.
2. A method for detecting geological disasters by remote sensing based on the YOLOv8 model as claimed in claim 1, characterized in that: Step S1 includes: S11: Convert the acquired remote sensing data and geological data into image labels; S12: Obtain a classified labeled geological disaster dataset based on image labels and the geological disaster risk classification system; S13: Perform data cleaning, standardization, and data enhancement on the classified label geological disaster dataset; the data enhancement includes: rotation, scaling, cropping, and color transformation.
3. A method for detecting geological disasters by remote sensing based on the YOLOv8 model as claimed in claim 1, characterized in that: Step S4 includes: S41: inputting the original feature map of the classified label geological disaster data set into the difficult sample enhancer to obtain the occlusion feature map; S42: classify the occluded feature map, quantify the classification error of the difficult sample enhancer on the occluded sample through the loss function in the difficult sample enhancer, and calculate the loss value; S43: Selecting the occlusion feature map with the highest loss value and the adaptive occlusion mask corresponding to the occlusion feature map with the highest loss value as the difficult sample; S44: Adjust the weight of the difficult sample enhancer through the loss value.
4. A method for detecting geological disasters by remote sensing based on a YOLOv8 model as claimed in claim 3, characterized in that: Step S41 includes: S41a: After the original feature map is input into the difficult sample enhancer, it passes through the fully connected layer and the binary mask adaptively generated by the target detection network; the binary mask is updated with the grayscale image to obtain the adaptive occlusion mask; S41b: Dynamically occlude the original feature map through the adaptive occlusion mask, and perform element-by-element multiplication operation on the occlusion mask and the original feature map to obtain the occlusion feature map, as follows: in represents the original feature map, represents the adaptive occlusion mask, represents element-wise multiplication, is the occlusion feature map.
5. A method for detecting geological disasters by remote sensing based on the YOLOv8 model as claimed in claim 1, characterized in that: The loss function of the hard sample enhancer as follows: in, Represents the total number of training sample pairs; Indicates the depth or number of channels of the feature map; and Represent the height and width of the feature map respectively; Refers to The original feature map; represents the first Image at position Occlusion feature map of Represents the corresponding position A binary mask value of , whose value is either 0 or 1.
6. A method for detecting geological disasters by remote sensing based on a YOLOv8 model as claimed in claim 3, characterized in that: The classification loss function in the target detection network is as follows: in represents the classification loss, represents the positioning loss, , are the balance coefficients corresponding to the losses of each part; The classification loss The cross entropy loss is used to calculate the classification loss of positive samples. In the intelligent identification of geological disasters remote sensing, there are four categories: landslide, debris flow, collapse, and background. In the case of positive sample categories: in, is the number of grid cells where the target exists, is the total number of grid cells in the feature map, It is The true class of the grid cell Tags, is the category predicted by the model The probability of three positive samples being landslide, debris flow and collapse, then ; Combining the quality focus loss function and the bounding box loss function to construct the positioning loss ,as follows: in, The loss value of the bounding box loss function is used to measure the difference between the predicted bounding box and the true bounding box; Indicates that the weight coefficient is between 0 and 1; represents the quality focus loss function, which is used to combine classification confidence and localization quality; Indicates the confidence of the model prediction; Represents the true label, indicating the quality of the target existence, with a value range of 0 to 1. If the target exists, then , otherwise the target does not exist ; The specific definition of the quality focus loss function is as follows: in, is a hyperparameter, .
7. A method for detecting geological disasters by remote sensing based on the YOLOv8 model as claimed in claim 1, characterized in that: The target detection network includes: an adjacent scale feature fusion module and a multi-scale receptive field fusion module: The adjacent scale feature fusion module uses the feature fusion factor To balance the fusion of features at different levels, the feature fusion factor is dynamically calculated based on the number of positive and negative samples. The formula is as follows: in is the feature fusion factor is the number of positive samples is the number of negative samples; The adjacent scale feature fusion module combines spatial attention and channel attention to perform and Perform weighted fusion, the fused feature map Obtained by the following formula: in is the fused feature map, is the feature fusion factor, It is Layer feature map, is the spatial attention module, It is The layer feature map is the upsampled feature map, is the channel attention module, Represents matrix multiplication; Spatial Attention Map The calculation formula is as follows: in express Activation function, Indicates the number of compressible channels convolution, Indicates that the void rate is 4 and the convolution kernel is The dilated convolution, The convolution kernel is The convolution operation, is the activation function; The channel attention module includes: global average pooling and multi-layer perceptron; channel attention map The calculation formula is as follows: in is the channel attention map, It is Layer feature map, It is The feature map of the layer is upsampled by 2 times. It is a multilayer perceptron, a neural network consisting of at least one hidden layer and one output layer; is the global average pooling operation; The multi-scale receptive field fusion module includes: standard convolution, dilated convolution and batch normalization layers.
8. An electronic device, characterized in that: The electronic device comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device executes the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Landslide hidden danger remote sensing detection method and system fusing spectrum and topographic information
CN119091307A
Target monitoring method, medium and system for high-resolution satellite remote sensing image
CN119131614A
Remote sensing small target detection method and device
CN119229098A
Remote sensing weak and dense target detection method based on feature imitation learning
CN119850934A
A Remote Sensing Weak and Dense Target Detection Method Based on Feature Imitation Learning
CN119850934B
