Oil and gas exploration road image segmentation model training method and device, equipment and medium
By employing feature extraction and fusion techniques in an oil and gas exploration road image segmentation model, the challenge of road identification in remote sensing images has been solved, improving model training accuracy and recognition precision, and supporting path planning for oil and gas exploration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA NAT PETROLEUM CORP
- Filing Date
- 2024-12-23
- Publication Date
- 2026-06-23
AI Technical Summary
In oil and gas exploration, road identification in remote sensing images presents challenges, especially in complex background areas such as mountains and jungles, where road features are not obvious and vegetation and buildings obscure the road, making it difficult to extract the road and affecting the efficiency of path planning and data collection.
An image segmentation model for oil and gas exploration roads is adopted. Feature extraction and fusion are performed by combining convolutional modules, encoding modules, residual attention space pyramid modules, and decoding modules. Deformable convolution and multilayer perceptron networks are used to improve the accuracy of feature extraction. The residual attention space pyramid module is combined with feature fusion and decoding to improve the accuracy of model training.
It improves the training accuracy of the oil and gas exploration road image segmentation model, enhances the accuracy of road segmentation in oil and gas exploration scenarios, and supports efficient identification and planning of exploration paths.
Smart Images

Figure CN122264004A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, equipment and medium for training an image segmentation model for oil and gas exploration roads. Background Technology
[0002] In oil and gas exploration missions, field data acquisition is a crucial step in geophysical exploration and a prerequisite for subsequent intelligent data analysis. Therefore, high-precision and efficient identification of remote sensing image data is of great significance for field data acquisition, physical point deployment, obstacle avoidance, and data collection operations. It is the foundation for realizing path planning and intelligent oil and gas exploration.
[0003] Roads, as basic landforms, are the fundamental units connecting different areas. Therefore, for multi-class recognition tasks, accurate road identification can guide the identification of other landforms. However, extracting roads from actual exploration areas using remote sensing images faces significant challenges, mainly due to complex backgrounds such as mountainous and jungle areas, unclear road features, and obstructions from vegetation and buildings. These challenges make road extraction a difficult problem. Summary of the Invention
[0004] This invention provides a method, apparatus, equipment, storage medium, and product for training an image segmentation model for oil and gas exploration roads, in order to improve the recognition accuracy of oil and gas exploration road images.
[0005] According to one aspect of the present invention, a method for training an image segmentation model for oil and gas exploration routes is provided, comprising:
[0006] Acquire sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with actual road segmentation areas.
[0007] The sample images of oil and gas exploration roads are input into a pre-built image segmentation model. The convolution module in the image segmentation model performs a convolution operation on the sample images of oil and gas exploration roads to obtain a convolutional road feature map.
[0008] The convolutional road feature map is input into the encoding module of the image segmentation model, and the encoding module performs feature encoding on the convolutional road feature map to obtain the encoded road feature map.
[0009] The encoded road feature map is input into the residual attention space pyramid module in the image segmentation model. The residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain the fused road feature map.
[0010] The fused road feature map is input into the decoding module of the image segmentation model. The decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image.
[0011] Based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image, the image segmentation model is trained until the model training termination condition is met, and the oil and gas exploration road image segmentation model is obtained. The oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images in oil and gas exploration scenarios.
[0012] According to another aspect of the present invention, an oil and gas exploration road image segmentation model training device is provided, the device comprising:
[0013] The road sample image acquisition module is used to acquire sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with images of actual road segmentation areas;
[0014] The convolutional road feature map acquisition module is used to input the oil and gas exploration road sample image into a pre-constructed image segmentation model, and the convolution module in the image segmentation model performs a convolution operation on the oil and gas exploration road sample image to obtain a convolutional road feature map.
[0015] The coded road feature map acquisition module is used to input the convolutional road feature map into the encoding module in the image segmentation model, and the encoding module performs feature encoding on the convolutional road feature map to obtain the coded road feature map.
[0016] The road feature map fusion module is used to input the encoded road feature map into the residual attention space pyramid module in the image segmentation model, and the residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain the fused road feature map.
[0017] The predicted road segmentation region image acquisition module is used to input the fused road feature map into the decoding module in the image segmentation model, and the decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image.
[0018] The image segmentation model training module is used to train the image segmentation model based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image until the model training termination condition is met, thereby obtaining the oil and gas exploration road image segmentation model; the oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images under oil and gas exploration scenarios.
[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0020] At least one processor; and
[0021] A memory communicatively connected to the at least one processor; wherein,
[0022] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the oil and gas exploration road image segmentation model training method according to any embodiment of the present invention.
[0023] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the oil and gas exploration road image segmentation model training method according to any embodiment of the present invention.
[0024] The technical solution of this invention involves inputting sample images of oil and gas exploration roads into a convolution module of a pre-built image segmentation model for convolution to obtain a convolutional road feature map; inputting the convolutional road feature map into an encoding module for feature encoding to obtain an encoded road feature map; inputting the encoded road feature map into a residual attention space pyramid module for feature fusion to obtain a fused road feature map; inputting the fused road feature map into a decoding module for feature decoding to obtain a predicted road segmentation region image; and training the image segmentation model based on the actual road segmentation region image and the predicted road segmentation region image to obtain an oil and gas exploration road image segmentation model. This technical solution improves the training accuracy of the oil and gas exploration road image segmentation model by introducing a residual attention space pyramid module for feature fusion during model training, thereby improving the road segmentation accuracy in oil and gas exploration road image recognition scenarios.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of a method for training an oil and gas exploration road image segmentation model according to Embodiment 1 of the present invention;
[0028] Figure 2 This is a schematic diagram of the structure of an oil and gas exploration road image segmentation model provided in Embodiment 2 of the present invention;
[0029] Figure 3 This is a schematic diagram of the structure of a multilayer sensor fusion submodule provided in Embodiment 2 of the present invention;
[0030] Figure 4 This is a flowchart of a method for training an oil and gas exploration road image segmentation model according to Embodiment 2 of the present invention;
[0031] Figure 5 This is a schematic diagram of the structure of a residual attention spatial pyramid module according to Embodiment 3 of the present invention;
[0032] Figure 6 This is a schematic diagram of the structure of a spatial pyramid pooling submodule provided in Embodiment 3 of the present invention;
[0033] Figure 7 This is a schematic diagram of the structure of an oil and gas exploration road image segmentation model training device provided in Embodiment 4 of the present invention;
[0034] Figure 8 This is a schematic diagram of the structure of an electronic device for implementing the oil and gas exploration road image segmentation model training method of the present invention. Detailed Implementation
[0035] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0037] It should be noted that most existing encoders use convolutional neural networks, such as ResNet (Residual Network) or MobileNet, but the effectiveness of these two networks in extracting features from the original image limits the accuracy of semantic segmentation results for remote sensing images. Therefore, this invention uses a wavering multilayer perceptron as the feature extraction network and modifies the wavering multilayer perceptron using deformable convolution.
[0038] The core idea of existing wave multilayer perceptrons is to crop an image into multiple small image patches, where each image patch is considered as a wave containing amplitude and phase. The amplitude represents the real-valued feature of the information corresponding to each image patch, and the phase term is used to adjust the complex number between the image patch and the weights of the multilayer perceptron. Its specific form is as follows:
[0039]
[0040] In the formula For a patch (local region) in the image, |Z j | represents the amplitude of the wave, θ j If the phase of the wave is given, then... It is a periodic function. Expanding equation (1) using Euler's formula yields:
[0041]
[0042] All physical quantities in the formula remain consistent with those in formula (1). Therefore, the phase and amplitude of the wave resulting from the fusion of two waves expressed using phase and amplitude are:
[0043]
[0044] θ m =θ i +atan2(|Z j |⊙sin(θ j -θ i ),|Z i |+ |Z j |⊙sin(θ j -θ i (4)
[0045] (3) Where: |Z m | represents the amplitude of the merged wave, |Z i |and|Z j | represents the amplitude of the wave to be merged, θ i With θ j θ represents the phase of the waves to be merged, where θ is the phase of the waves to be merged in equation (4). mThe phase of the fused wave is represented by , and atan represents the two-parameter arctangent function. The amplitude and phase of the wave to be fused are calculated using a two-parameter learnable MLP (Multilayer Perceptron). The overall structure of the Wave MLP is a superposition of multiple MLP blocks.
[0046] As can be seen from formula (3), when two waves are close in phase, they exhibit a superposition and enhancement effect, and when they are opposite in phase, they exhibit a cancellation effect. By adjusting the phase, the spatial context information in the original image can be extracted more completely.
[0047] Example 1
[0048] Figure 1 This is a flowchart of a road image segmentation model training method for oil and gas exploration provided in Embodiment 1 of the present invention. This embodiment is applicable to the accurate segmentation of road images in oil and gas exploration scenarios. The method can be executed by an oil and gas exploration road image segmentation model training device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0049] S110. Obtain sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with images of actual road segmentation areas.
[0050] S120. Input the sample image of the oil and gas exploration road into the pre-built image segmentation model. The convolution module in the image segmentation model performs a convolution operation on the sample image of the oil and gas exploration road to obtain the convolution road feature map.
[0051] S130. Input the convolutional road feature map into the encoding module in the image segmentation model. The encoding module performs feature encoding on the convolutional road feature map to obtain the encoded road feature map.
[0052] S140. Input the encoded road feature map into the residual attention space pyramid module in the image segmentation model. The residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain the fused road feature map.
[0053] S150. Input the fused road feature map into the decoding module of the image segmentation model. The decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image.
[0054] S160. Based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image, train the image segmentation model until the model training termination condition is met to obtain the oil and gas exploration road image segmentation model; the oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images under oil and gas exploration scenarios.
[0055] Specifically, in oil and gas exploration operations, in order to plan exploration routes, it is necessary to identify roads within the exploration area. Therefore, it is necessary to first obtain sample images of oil and gas exploration roads, and these sample images should be marked with images of actual road segmentation areas. Then, the oil and gas exploration road image segmentation model can be trained using the sample images of oil and gas exploration roads marked with images of actual road segmentation areas.
[0056] The image segmentation model can be pre-built. The image segmentation model may include a convolutional module, an encoding module, a residual attention space pyramid module, and a decoding module.
[0057] The input of the convolution module is used to receive the input sample image of oil and gas exploration roads, and the output is connected to the encoding module. The convolution module is used to perform convolution operations (downsampling) on the input sample image of oil and gas exploration roads. For example, after the sample image of oil and gas exploration roads is input into a pre-built image segmentation model, the convolution module in the image segmentation model performs the first convolution, changing the input of the original image H×W×3 to H / 4×W / 4×64, thus obtaining the convolutional road feature map.
[0058] The input of the encoding module is connected to the output of the convolution module, and the output of the encoding module is connected to the input of the residual attention space pyramid module. The encoding module is used to perform feature encoding processing on the convolutional road feature map output by the convolution module to obtain the encoded road feature map.
[0059] The input of the residual attention spatial pyramid module is connected to the output of the encoding module to receive the encoded road feature map output by the encoding module; the output of the residual attention spatial pyramid module is connected to the input of the decoding module. The residual attention spatial pyramid module is used to extract and fuse features from the encoded road feature map to obtain a fused road feature map.
[0060] The connection between the input of the decoding module and the output of the residual attention space pyramid module is used to receive the fused road feature map output by the residual attention space pyramid module, and to perform feature decoding (upsampling) on the fused road feature map to obtain the predicted road segmentation region image.
[0061] Based on the actual and predicted road segmentation regions of the sample images of oil and gas exploration roads, a target loss value is determined. The image segmentation model is then trained using this target loss value until a training termination condition is met, resulting in the oil and gas exploration road image segmentation model. The training termination condition can be that the target loss value stabilizes, the target loss value reaches a preset loss threshold, or the number of model iterations reaches a preset iteration threshold; this embodiment does not impose any restrictions on these conditions.
[0062] The oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images of oil and gas exploration scenarios. In a specific application scenario, an oil and gas exploration road image segmentation model is used to acquire the image of the road to be segmented and input it into the model to obtain the road segmentation image predicted by the model.
[0063] The technical solution of this invention involves inputting sample images of oil and gas exploration roads into a convolution module of a pre-built image segmentation model for convolution to obtain a convolutional road feature map; inputting the convolutional road feature map into an encoding module for feature encoding to obtain an encoded road feature map; inputting the encoded road feature map into a residual attention space pyramid module for feature fusion to obtain a fused road feature map; inputting the fused road feature map into a decoding module for feature decoding to obtain a predicted road segmentation region image; and training the image segmentation model based on the actual road segmentation region image and the predicted road segmentation region image to obtain an oil and gas exploration road image segmentation model. This technical solution improves the training accuracy of the oil and gas exploration road image segmentation model by introducing a residual attention space pyramid module for feature fusion during model training, thereby improving the road segmentation accuracy in oil and gas exploration road image recognition scenarios.
[0064] Example 2
[0065] Figure 2 This is a schematic diagram of the structure of an oil and gas exploration road image segmentation model provided in Embodiment 2 of the present invention. Figure 2As shown, the encoding module includes several multilayer perceptron fusion sub-modules (MLP Stage); the residual attention spatial pyramid module includes several residual attention spatial pyramid sub-modules (RVCA Pyramid Pooling); and the decoding module includes several decoding sub-modules (Decoder Block). The number of sub-modules in the MLP fusion sub-module, residual attention spatial pyramid sub-module, and decoding sub-module is the same. The output of any MLP fusion sub-module is connected to the input of a residual attention spatial pyramid sub-module; the output of any residual attention spatial pyramid sub-module is connected to the input of a decoding sub-module. The MLP fusion sub-modules are sequentially connected, with the input of the first MLP fusion sub-module connected to the output of the convolution module. The Input Image represents a sample image of an oil and gas exploration road; the Output Image represents an image of the predicted road segmentation region.
[0066] Figure 3 This is a schematic diagram of the structure of a multilayer sensor fusion submodule provided in Embodiment 2 of the present invention, with reference to... Figure 3 The multilayer perceptron fusion submodule comprises several multilayer perceptron structural units (Blocks), specifically three: deformable convolutional units (Deform Conv) and convolutional units (Conv). These multilayer perceptron structural units are connected sequentially. The output of the last multilayer perceptron structural unit is connected to the input of the residual attention space pyramid submodule and the input of the deformable convolutional unit, respectively. The output of the deformable convolutional unit is connected to the input of the convolutional unit. The output of the convolutional unit in a non-last multilayer perceptron fusion submodule is connected to the input of the first multilayer perceptron structural unit of the next sequentially connected multilayer perceptron fusion submodule.
[0067] Figure 4 This is a flowchart illustrating a method for training an oil and gas exploration road image segmentation model according to Embodiment 2 of the present invention. This embodiment provides a preferred example based on the above embodiments. Figure 4 As shown, the method includes the following specific steps:
[0068] S210. Obtain sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with images of actual road segmentation areas.
[0069] S220. Input the sample image of the oil and gas exploration road into the pre-built image segmentation model. The convolution module in the image segmentation model performs a convolution operation on the sample image of the oil and gas exploration road to obtain the convolution road feature map.
[0070] S230. The convolutional road feature map is input into the encoding module in the image segmentation model. After the first multilayer perceptron structure unit in the first multilayer perceptron fusion submodule of the encoding module performs feature extraction, the feature extraction result is input into the next multilayer perceptron fusion submodule until the feature fusion result of the last multilayer perceptron fusion submodule is obtained.
[0071] Specifically, the Multilayer Perceptron Fusion Submodule (MLP Stage) consists of multiple MLP Blocks connected sequentially. Each MLP Block comprises two Norm (normalization) layers, one Token Mixing (image region mixing) layer, and one Channel Mixing (feature channel mixing) layer. Each Token Mixing layer consists of two PATM (Position-Aware Token Mixing) modules and a fully connected layer that preserves the original information. The Channel Mixing layer is a multilayer perceptron. The Norm layers normalize the input data; the Token Mixing layers mix small patches or areas in the input image; and the Channel Mixing layers mix each feature channel of the Token Mixing layer's output. The PATM enhances the visual model's ability to perceive positional information when processing images and effectively utilizes this positional information during token mixing.
[0072] Feature extraction at this scale is achieved through repeated stacking of MLP Blocks. Since the channel mixing does not change the dimension of the feature map, the feature map obtained from the last channel mixing block is still H / 4×W / 4×64. In the original fluctuating multilayer perceptron, the output of the last channel mixing block is directly downsampled through convolution and then sent to the next MLP stage, without fully utilizing the information at this scale. Therefore, in this embodiment, the feature map of the output of the last channel mixing block is retained as a side output, and the feature map of the side output is sent to the residual attention space pyramid pooling module for feature fusion at this scale. The output of the last channel mixing block in the backbone network is subjected to deformable convolution (Deform Conv) to extract features, and then the length and width are halved by convolutional units (Conv) before being sent to the next MLP stage.
[0073] S240. The feature fusion results of the multilayer perceptron fusion submodule at the end are input into the deformable convolutional unit and the residual attention space pyramid submodule connected to it, respectively. The deformable convolutional unit performs feature extraction operation on the feature fusion results to obtain deformable feature extraction results.
[0074] Specifically, road targets in remote sensing images often rotate and transform, and due to the different sensors, the spatial resolution of the data is inconsistent. That is, the geographic spatial scale covered by the same pixel point in different datasets is different, so the pixel width occupied by the road is also inconsistent in different datasets. Using ordinary convolution kernels for feature extraction is not ideal when dealing with road targets with these two characteristics. Therefore, this application uses deformable convolution to process the output of the last fusion block in each stage. Deformable convolution means that the shape of the convolution kernel is variable, and it is not convolution in the traditional N×N grid. Its advantage is that it can extract target features more accurately. Compared with ordinary convolution, the receptive field of deformable convolution is closer to the object outline and size, and the recognition results are more robust. Ordinary convolution is not ideal when dealing with objects with varying shapes and sizes. In practice, deformable convolution does not use dynamic convolution kernels to convolve the image. Taking a 3×3 convolution kernel as an example, when an ordinary convolution kernel samples point p0, it first needs to search for an eight-neighborhood S centered on p0 in the image. Then it sums the values according to weights:
[0075] S={(-1,-1),(-1,0),…,(1,0),(1,1)} (5)
[0076]
[0077] In the formula, f(p0) is the convolution output at p0, and w(p n ) represents p in the convolution kernel n The weight coefficient corresponding to the point.
[0078] Deformable convolution actually involves adding a learnable offset Δp from the network to each convolution sampling point. n Calculate the coordinates of the point after the offset, and then perform a convolution using the values at these coordinates, i.e.:
[0079]
[0080] In the formula Δp n For p n The offset corresponding to the point. Since this offset may be a decimal, bilinear interpolation of the coordinate values is required to obtain p. nThe coordinates of the convolution point after the point offset in the image. From formula (7), it can be seen that the deformable convolution process does not deform the convolution kernel, but learns the offset for each sampling point in the convolution kernel, finds the coordinates of the sampling point after the offset, and uses the image features corresponding to the coordinate point to perform convolution operation. The structure of deformable convolution enables it to achieve basic coverage of road targets at different spatial scales when extracting road features. It better extracts the complete object features of the region to be identified from the image. The deformable convolution operation on the image is the last operation at this scale. Next, the feature map is convolved to make the feature width and height half of the current width and height, and used as the input of the next MLP stage.
[0081] S250. Input the variable feature extraction results into the convolutional unit for downsampling to obtain the coded road feature map.
[0082] S260. Input the encoded road feature map into the residual attention space pyramid module in the image segmentation model. The residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain the fused road feature map.
[0083] S270. Input the fused road feature map into the decoding module of the image segmentation model. The decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image.
[0084] S280. Based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image, train the image segmentation model until the model training termination condition is met to obtain the oil and gas exploration road image segmentation model; the oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images under oil and gas exploration scenarios.
[0085] The technical solution in this embodiment uses deformable convolution to process the output of the last fusion block in each stage, instead of performing convolution in the traditional N×N grid. This achieves more accurate extraction of target features, resulting in higher accuracy of the encoded road feature map extracted by the encoding module, and thus improving the model training accuracy.
[0086] Example 3
[0087] Figure 5 This is a schematic diagram of the structure of a residual attention spatial pyramid module provided in Embodiment 3 of the present invention, with reference to... Figure 5The residual attention spatial pyramid module includes a spatial pyramid pooling submodule (Pyramid Pooling), a dynamic attention mechanism submodule (VM Attention), and a coordinate attention mechanism submodule (Coordinate Attention). Here, Input Feature represents the output of ChannelMixing in the last fusion block (Block 3) of the encoding module's MLP stage. Input Feature represents the fused output of Input Feature and the output of the Coordinate Attention submodule.
[0088] The encoded road feature map is input into the residual attention spatial pyramid module in the image segmentation model. The residual attention spatial pyramid module performs feature fusion on the encoded road feature map to obtain a fused road feature map. This includes: inputting the encoded road feature map into the spatial pyramid pooling submodule, which performs feature map pooling on the encoded road feature map to obtain an initial pooled road feature map; inputting the initial pooled road feature map into the dynamic attention mechanism submodule, which performs feature map pooling on the initial pooled road feature map to obtain a dynamic pooled road feature map; and inputting the dynamic pooled road feature map into the coordinate attention mechanism submodule, which performs feature fusion on the dynamic pooled road feature map to obtain a fused road feature map.
[0089] Figure 6 This is a schematic diagram of the structure of a spatial pyramid pooling submodule provided in Embodiment 3 of the present invention, as shown below. Figure 6 As shown, the spatial pyramid pooling submodule includes a multi-scale pooling unit, a bilinear interpolation upsampling unit, and a feature fusion unit.
[0090] The encoded road feature map is input into the spatial pyramid pooling submodule, which performs feature map pooling on the encoded road feature map to obtain an initial pooled road feature map. This includes: inputting the encoded road feature map into a multi-scale pooling unit (POOL), which performs multi-scale pooling (CONV) on the encoded road feature map to obtain a multi-scale pooled feature map; inputting the multi-scale pooled feature map into a bilinear interpolation upsampling unit (Upsample), which performs upsampling on the multi-scale pooled feature map to obtain a multi-scale upsampled feature map; and inputting the multi-scale upsampled feature map into a feature fusion unit (Concat), which performs feature fusion on the multi-scale upsampled feature map to obtain the initial pooled road feature map.
[0091] Specifically, the spatial pyramid pooling submodule first pools the feature fusion results extracted from the encoder to the end of the multilayer perceptron fusion submodule at k different scales, and ensures that each part does not overlap during the pooling process.
[0092] F i =Pooling i (F), i = 1, 2, ..., k (8)
[0093] Where F represents the feature fusion result extracted from the multilayer perceptron fusion submodule at the end of the encoder, F i This represents the i-th multi-scale pooling feature map. A 1×1 convolution kernel is used to adjust the number of channels in each multi-scale pooling feature map, so that the number of channels in each feature map is 1 / k of the original input channel number.
[0094] F i ′ =Conv 2D (F i ,1×1),i=1,2,…,k (9)
[0095] F i ′ This represents the i-th initial pooled road feature map after channel adjustment. Subsequently, these k features with C / k channels at different scales are bilinearly interpolated and upsampled to the original feature map's length and width, resulting in k features of H×W×C / k dimensions. Let i represent the i-th multi-scale upsampled feature map.
[0096]
[0097] These k features are concatenated to obtain features of dimension H×W×k.
[0098]
[0099] Among them, F SPP This represents the initial pooled road feature map.
[0100] In an optional embodiment, an initial pooled road feature map is input to a dynamic attention mechanism submodule, which performs feature map pooling on the initial pooled road feature map to obtain a dynamic pooled road feature map. This includes: performing channel-level median pooling on the initial pooled road feature map to obtain a first pooled feature map; performing channel-level variance pooling on the initial pooled road feature map to obtain a second pooled feature map; and performing channel-level 99th percentile pooling on the initial pooled road feature map to obtain a third pooled feature map; superimposing the first and third pooled feature maps to obtain a superimposed feature map; and determining the dynamic pooled road feature map based on the second pooled feature map and the superimposed feature map.
[0101] This embodiment designs a dynamic attention mechanism submodule as a channel-level attention mechanism. This module distinguishes features between different channels and assigns a corresponding attention weight to each channel, thereby enhancing the neural network's selective attention to different channels in the input features and improving the model's segmentation results for the input image. For the input H×W×C dimensional feature map, the VM (Vision-Module) feature attention mechanism (dynamic attention mechanism submodule) performs channel-level median pooling, variance pooling, and 99th percentile pooling, respectively, resulting in three 1×1×C dimensional features.
[0102] M1(x) = MLP(MedianPool) H×W (x)) (12)
[0103] M2(x) = MLP(99PercentPool) H×W (x)) (13)
[0104] V(x) = MLP(VarPool) H×W (x))) (14)
[0105] Where x is the initial pooled road feature map.
[0106] The pooling result is then adjusted for channel count using a 1×1 convolution, reducing it to C / r. This step aims to reduce the module's computational load, allowing it to be used as a plug-and-play attention mechanism in different semantic segmentation networks to improve recognition results without excessively increasing computational complexity. After activating the convolutional features using the non-linear ReLU function, a 1×1 convolution kernel is used to restore the channel count to C.
[0107] M1 ′ (x)=ReLU (BatchNorm(Conv 2D(M1(x),1×1))) (15)
[0108] M2 ′ (x)=ReLU (BatchNorm(Conv 2D (M2(x),1×1))) (16)
[0109] V ′ (x)=ReLU (BatchNorm(Conv 2D (V(x),1×1))) (17)
[0110] Next, the feature maps corresponding to median pooling and 99th percentile pooling are superimposed, and then normalized using the Sigmoid function to become attention weights. Simultaneously, the feature maps corresponding to variance pooling are also normalized using the Sigmoid function to become attention weights.
[0111] MA=Sigmoid(σM1(x)+M2(x)) (18)
[0112] VA = Sigmoid(V(x)) (19)
[0113] Then, the mean of the two attention weight maps is calculated to obtain the final attention weights. These attention weights are then used to weight the original features, resulting in a dynamically pooled road feature map after passing through the VM attention mechanism module.
[0114] VM = x * (mean(VA, MA)) (20)
[0115] In the formula: MedianPool H×W This indicates that median pooling is performed on each channel, 99PercentPool H×W This indicates that each channel is subjected to 99th percentile pooling, VarPool H×W This indicates variance pooling for each channel. MLP stands for Multilayer Perceptron. ReLU indicates activation of features using the ReLU function. BatchNorm indicates batch normalization. Sigmoid indicates adjusting the channel weights to a probability form that sums to 1 using the Sigmoid function. mean indicates calculating the average of the two attention weight maps.
[0116] Next, the extracted features are processed using a residual coordinate attention mechanism. The coordinate attention mechanism is a spatial attention mechanism module. Essentially, the attention mechanism constructs an attention weight matrix, assigning higher weights to regions in the image that require attention, and then multiplies this matrix by the input features, effectively weighting them.
[0117] In an optional embodiment, the dynamically pooled road feature map is input to the coordinate attention mechanism submodule, which performs feature fusion on the dynamically pooled road feature map to obtain a fused road feature map. This includes: performing horizontal average pooling on the dynamically pooled road feature map to obtain a horizontal feature map; and performing vertical average pooling on the dynamically pooled road feature map to obtain a vertical feature map; concatenating the horizontal and vertical feature maps to obtain a hybrid concatenated feature map; performing feature separation on the hybrid concatenated feature map to obtain a horizontally separated feature map and a vertically separated feature map; and determining the fused road feature map based on the horizontally separated feature map and the vertically separated feature map.
[0118] The basic idea is to perform precise position encoding on the image based on the horizontal and vertical coordinate information. First, the input H×W×C dimensional features are averaged along the horizontal and vertical directions to obtain H×1×C horizontal features and 1×W×C vertical features.
[0119]
[0120] Where F(i,j,k) represents the feature map of the dynamic pooling path; F x Represents the horizontal feature map; F y This represents the feature map in the vertical direction.
[0121] This step compresses the inputs in the horizontal and vertical directions into a feature map F containing information about that direction. x With F y The two features are then concatenated along the channel dimension to form a 1×(W+H)×C feature, and then the dimensions are adjusted by a 1×1 convolution to reduce the computational load of the attention module.
[0122] F concat =Concat (F x ,F y ) (twenty three)
[0123] F conv =Conv 2D (F concat ,1×1) (24)
[0124] Then, nonlinear functions such as ReLU are used to activate it:
[0125] F bn_relu =ReLU (BatchNorm(F conv (25)
[0126] The reduced number of channels is then restored to the number of channels in the input feature map, resulting in a 1×(W+H)×C dimensional feature. The mixed features are then separated, restoring them to H×1×C and 1×W×C dimensions.
[0127]
[0128] F conv_x =SwapAxes(F conv_x ,0,1) (27)
[0129] For the separated feature F conv_x With F conv_y The two feature maps are normalized to attention weights using the Sigmoid function, and then encoded into two attention weight maps F that encompass long-range information in the corresponding directions. out .
[0130] S x =Sigmoid (F conv_x (28)
[0131] S y =Sigmoid (F conv_y (29)
[0132] F out =F×(S) x +S y (30)
[0133] Among them, F out This represents the fused road feature map.
[0134] Finally, this invention employs a multi-scale fusion decoder to decode the encoded features, fusing features from different layers. Specifically, for the output features of the last MLP Stage, the residual attention space pyramid module is first used to weight the features, obtaining an output containing attention mechanism information. This is then upsampled to the output scale of the previous MLP Stage. Since each MLP Stage ends with a convolutional layer performing a downsampling operation that halves the length and width, we need to upsample the higher-level features to twice the length and width during decoding. For feature maps with the same length and width scale as the feature map during downsampling, the residual attention space pyramid module is also used for feature encoding. Due to the presence of residual connections, the residual attention space pyramid module can retain some of the original MLP Stage's encoding information while fusing attention information. After concatenating two feature maps with the same length and width scale, a 1×1 convolution is used to adjust the number of channels, ensuring that the fusion of higher-level and lower-level features does not result in any one level of feature dominating due to uneven channel counts. The feature map is then upsampled again and concatenated with the result of the corresponding scale features in the encoder processed by the residual attention space pyramid module. The upsampling and feature fusion processes are performed alternately to obtain a feature map with the same length and width scale as the image input model after the first convolution. Since road recognition is a foreground-background binary classification semantic segmentation task, the number of channels of the feature map is adjusted to 2 through 1×1 convolution and restored to the original length and width size of the input image. Then, the obtained H×W×2 feature map is fed into the Softmax classifier to complete the model decoding part.
[0135] Example 4
[0136] Figure 7 This is a schematic diagram of the structure of an oil and gas exploration road image segmentation model training device provided in Embodiment 4 of the present invention. Figure 7 As shown, the device includes:
[0137] The road sample image acquisition module 710 is used to acquire sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with images of actual road segmentation areas;
[0138] The convolutional road feature map acquisition module 720 is used to input the sample image of oil and gas exploration road into the pre-built image segmentation model. The convolution module in the image segmentation model performs a convolution operation on the sample image of oil and gas exploration road to obtain the convolutional road feature map.
[0139] The road feature map acquisition module 730 is used to input the convolutional road feature map into the encoding module in the image segmentation model, and the encoding module performs feature encoding on the convolutional road feature map to obtain the coded road feature map.
[0140] The road feature map fusion module 740 is used to input the encoded road feature map into the residual attention space pyramid module in the image segmentation model, and the residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain the fused road feature map.
[0141] The predicted road segmentation region image acquisition module 750 is used to input the fused road feature map into the decoding module in the image segmentation model, and the decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image.
[0142] The image segmentation model training module 760 is used to train the image segmentation model based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image until the model training termination condition is met, thus obtaining the oil and gas exploration road image segmentation model; the oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images under oil and gas exploration scenarios.
[0143] The technical solution of this invention involves inputting sample images of oil and gas exploration roads into a convolution module of a pre-built image segmentation model for convolution to obtain a convolutional road feature map; inputting the convolutional road feature map into an encoding module for feature encoding to obtain an encoded road feature map; inputting the encoded road feature map into a residual attention space pyramid module for feature fusion to obtain a fused road feature map; inputting the fused road feature map into a decoding module for feature decoding to obtain a predicted road segmentation region image; and training the image segmentation model based on the actual road segmentation region image and the predicted road segmentation region image to obtain an oil and gas exploration road image segmentation model. This technical solution improves the training accuracy of the oil and gas exploration road image segmentation model by introducing a residual attention space pyramid module for feature fusion during model training, thereby improving the road segmentation accuracy in oil and gas exploration road image recognition scenarios.
[0144] Optionally, the coded road feature map acquisition module 530 includes:
[0145] The feature fusion result acquisition unit is used to input the convolutional road feature map into the encoding module in the image segmentation model. After the first multilayer perceptron structure unit in the first multilayer perceptron fusion submodule of the encoding module performs feature extraction, the feature extraction result is input into the next multilayer perceptron fusion submodule until the feature fusion result of the last multilayer perceptron fusion submodule is obtained.
[0146] The deformable feature extraction result acquisition unit is used to input the feature fusion result of the end multilayer perceptron fusion submodule into the deformable convolution unit and the residual attention space pyramid submodule connected to it, respectively. The deformable convolution unit performs feature extraction operation on the feature fusion result to obtain the deformable feature extraction result.
[0147] The coded road feature map acquisition unit is used to input the results of variable feature extraction into the convolution unit for downsampling to obtain the coded road feature map.
[0148] Optionally, the road feature map fusion module 540 includes:
[0149] The initial pooled road feature map acquisition unit is used to input the encoded road feature map into the spatial pyramid pooling submodule, and the spatial pyramid pooling submodule performs feature map pooling operation on the encoded road feature map to obtain the initial pooled road feature map.
[0150] The dynamic pooling road feature map acquisition unit is used to input the initial pooling road feature map into the dynamic attention mechanism submodule, which then performs feature map pooling on the initial pooling road feature map to obtain the dynamic pooling road feature map.
[0151] The road feature map fusion acquisition unit is used to input the dynamically pooled road feature map into the coordinate attention mechanism submodule, which then performs feature fusion operation on the dynamically pooled road feature map to obtain the fused road feature map.
[0152] Optionally, the initial pooling road feature map acquisition unit includes:
[0153] The multi-scale pooling feature map acquisition sub-unit is used to input the encoded road feature map into the multi-scale pooling unit, which performs multi-scale pooling operation on the encoded road feature map to obtain the multi-scale pooling feature map.
[0154] The multi-scale upsampling feature map acquisition sub-unit is used to input the multi-scale pooling feature map into the bilinear interpolation upsampling unit, which performs upsampling operation on the multi-scale pooling feature map to obtain the multi-scale upsampling feature map.
[0155] The initial pooled road feature map acquisition subunit is used to input the multi-scale upsampled feature map into the feature fusion unit, which performs feature fusion operation on the multi-scale upsampled feature map to obtain the initial pooled road feature map.
[0156] Optionally, the dynamic pooling road feature map acquisition unit includes:
[0157] The third pooling feature map acquisition subunit is used to perform median pooling based on the channel level on the initial pooling road feature map to obtain the first pooling feature map; and to perform variance pooling based on the channel level on the initial pooling road feature map to obtain the second pooling feature map; and to perform 99 percentile pooling based on the channel level on the initial pooling road feature map to obtain the third pooling feature map.
[0158] The superimposed feature map acquisition sub-unit is used to superimpose the first pooling feature map and the third pooling feature map to obtain the superimposed feature map;
[0159] The dynamic pooling road feature map acquisition sub-unit is used to determine the dynamic pooling road feature map based on the second pooling feature map and the superimposed feature map.
[0160] Optionally, the road feature map acquisition unit includes:
[0161] The vertical feature map acquisition sub-unit is used to perform horizontal average pooling on the dynamically pooled road feature map to obtain a horizontal feature map, and to perform vertical average pooling on the dynamically pooled road feature map to obtain a vertical feature map.
[0162] The hybrid stitching feature map acquisition sub-unit is used to stitch together the horizontal and vertical feature maps to obtain a hybrid stitching feature map;
[0163] The horizontal and vertical feature map acquisition sub-units are used to perform feature separation operations on the hybrid spliced feature map to obtain the horizontal and vertical feature maps;
[0164] The road feature map fusion acquisition sub-unit is used to determine the fused road feature map based on the horizontal and vertical separation feature maps.
[0165] The oil and gas exploration road image segmentation model training device provided in this embodiment of the invention can execute the oil and gas exploration road image segmentation model training method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0166] Example 5
[0167] Figure 8A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0168] like Figure 8 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0169] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0170] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the oil and gas exploration road image segmentation model training method.
[0171] In some embodiments, the oil and gas exploration road image segmentation model training method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the oil and gas exploration road image segmentation model training method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the oil and gas exploration road image segmentation model training method by any other suitable means (e.g., by means of firmware).
[0172] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0173] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0174] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0175] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0176] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0177] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0178] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0179] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for training an image segmentation model for oil and gas exploration routes, characterized in that, include: Obtain sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with images of actual road segmentation areas; The sample images of the oil and gas exploration roads are input into a pre-built image segmentation model, and the convolution module in the image segmentation model performs a convolution operation on the sample images of the oil and gas exploration roads to obtain a convolutional road feature map. The convolutional road feature map is input into the encoding module of the image segmentation model, and the encoding module performs feature encoding on the convolutional road feature map to obtain the encoded road feature map. The encoded road feature map is input into the residual attention space pyramid module in the image segmentation model, and the residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain a fused road feature map. The fused road feature map is input into the decoding module of the image segmentation model, and the decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image. Based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image, the image segmentation model is trained until the model training termination condition is met, thus obtaining the oil and gas exploration road image segmentation model; the oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images under oil and gas exploration scenarios.
2. The method according to claim 1, characterized in that, The encoding module includes several multilayer perceptron fusion sub-modules; the residual attention space pyramid module includes several residual attention space pyramid sub-modules; the decoding module includes several decoding sub-modules; the number of sub-modules in the multilayer perceptron fusion sub-module, the residual attention space pyramid sub-module, and the decoding sub-module is the same; the output of any multilayer perceptron fusion sub-module is connected to the input of a residual attention space pyramid sub-module; the output of any residual attention space pyramid sub-module is connected to the input of a decoding sub-module; the multiple multilayer perceptron fusion sub-modules are connected sequentially, and the input of the first multilayer perceptron fusion sub-module is connected to the output of the convolution module.
3. The method according to claim 2, characterized in that, The multilayer perceptron fusion submodule includes several multilayer perceptron structural units, deformable convolutional units, and convolutional units; each of the multilayer perceptron structural units is connected sequentially; the output of the end multilayer perceptron structural unit is connected to the input of the residual attention space pyramid submodule and the input of the deformable convolutional unit, respectively; the output of the deformable convolutional unit is connected to the input of the convolutional unit; the output of the convolutional unit of the non-end multilayer perceptron fusion submodule is connected to the input of the multilayer perceptron structural unit at the beginning of the next sequentially connected multilayer perceptron fusion submodule; Accordingly, the step of inputting the convolutional road feature map into the encoding module of the image segmentation model, and having the encoding module perform feature encoding on the convolutional road feature map to obtain an encoded road feature map, includes: The convolutional road feature map is input into the encoding module of the image segmentation model. After feature extraction is performed by the first multilayer perceptron structure unit in the first multilayer perceptron fusion submodule of the encoding module, the feature extraction result is input into the next multilayer perceptron fusion submodule until the feature fusion result of the last multilayer perceptron fusion submodule is obtained. The feature fusion results of the multilayer perceptron fusion submodule at the end are input to the deformable convolutional unit and the residual attention space pyramid submodule connected to it, respectively. The deformable convolutional unit performs feature extraction operation on the feature fusion results to obtain deformable feature extraction results. The results of the variable feature extraction are input into the convolutional unit for downsampling to obtain the encoded road feature map.
4. The method according to claim 1, characterized in that, The residual attention spatial pyramid module includes a spatial pyramid pooling submodule, a dynamic attention mechanism submodule, and a coordinate attention mechanism submodule; Accordingly, the step of inputting the encoded road feature map into the residual attention space pyramid module in the image segmentation model, and having the residual attention space pyramid module perform feature fusion on the encoded road feature map to obtain a fused road feature map, includes: The encoded road feature map is input into the spatial pyramid pooling submodule, which performs feature map pooling on the encoded road feature map to obtain an initial pooled road feature map. The initial pooled road feature map is input into the dynamic attention mechanism submodule, which performs feature map pooling on the initial pooled road feature map to obtain the dynamic pooled road feature map. The dynamically pooled road feature map is input into the coordinate attention mechanism submodule, which then performs feature fusion on the dynamically pooled road feature map to obtain a fused road feature map.
5. The method according to claim 4, characterized in that, The spatial pyramid pooling submodule includes a multi-scale pooling unit, a bilinear interpolation upsampling unit, and a feature fusion unit. Accordingly, the encoded road feature map is input to the spatial pyramid pooling submodule, which performs feature map pooling on the encoded road feature map to obtain an initial pooled road feature map, including: The encoded road feature map is input into the multi-scale pooling unit, which performs multi-scale pooling operation on the encoded road feature map to obtain a multi-scale pooled feature map. The multi-scale pooling feature map is input into the bilinear interpolation upsampling unit, which performs an upsampling operation on the multi-scale pooling feature map to obtain a multi-scale upsampled feature map. The multi-scale upsampled feature map is input into the feature fusion unit, which performs feature fusion on the multi-scale upsampled feature map to obtain an initial pooled road feature map.
6. The method according to claim 4, characterized in that, The step of inputting the initial pooled road feature map into the dynamic attention mechanism submodule, and having the dynamic attention mechanism submodule perform feature map pooling on the initial pooled road feature map to obtain a dynamic pooled road feature map, includes: The initial pooled road feature map is subjected to median pooling based on the channel level to obtain a first pooled feature map; and the initial pooled road feature map is subjected to variance pooling based on the channel level to obtain a second pooled feature map; and the initial pooled road feature map is subjected to 99th percentile pooling based on the channel level to obtain a third pooled feature map. The first pooling feature map and the third pooling feature map are superimposed to obtain a superimposed feature map; Based on the second pooling feature map and the superimposed feature map, a dynamic pooling road feature map is determined.
7. The method according to claim 4, characterized in that, The step of inputting the dynamically pooled road feature map into the coordinate attention mechanism submodule, and having the coordinate attention mechanism submodule perform feature fusion on the dynamically pooled road feature map to obtain a fused road feature map, includes: The dynamic pooled road feature map is subjected to horizontal average pooling to obtain a horizontal feature map, and the dynamic pooled road feature map is subjected to vertical average pooling to obtain a vertical feature map. The horizontal and vertical feature maps are concatenated to obtain a hybrid concatenated feature map. Perform feature separation operation on the hybrid spliced feature map to obtain a horizontally separated feature map and a vertically separated feature map; Based on the horizontal separation feature map and the vertical separation feature map, a fused road feature map is determined.
8. A training device for an image segmentation model of oil and gas exploration routes, characterized in that, include: The road sample image acquisition module is used to acquire sample images of oil and gas exploration roads; the sample images of oil and gas exploration roads are marked with images of actual road segmentation areas; The convolutional road feature map acquisition module is used to input the oil and gas exploration road sample image into a pre-constructed image segmentation model, and the convolution module in the image segmentation model performs a convolution operation on the oil and gas exploration road sample image to obtain a convolutional road feature map. The coded road feature map acquisition module is used to input the convolutional road feature map into the encoding module in the image segmentation model, and the encoding module performs feature encoding on the convolutional road feature map to obtain the coded road feature map. The road feature map fusion module is used to input the encoded road feature map into the residual attention space pyramid module in the image segmentation model, and the residual attention space pyramid module performs feature fusion on the encoded road feature map to obtain the fused road feature map. The predicted road segmentation region image acquisition module is used to input the fused road feature map into the decoding module in the image segmentation model, and the decoding module performs feature decoding on the fused road feature map to obtain the predicted road segmentation region image. The image segmentation model training module is used to train the image segmentation model based on the actual road segmentation region image and the predicted road segmentation region image of the oil and gas exploration road sample image until the model training termination condition is met, thereby obtaining the oil and gas exploration road image segmentation model; the oil and gas exploration road image segmentation model is used to predict road areas in remote sensing images under oil and gas exploration scenarios.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the oil and gas exploration road image segmentation model training method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the oil and gas exploration road image segmentation model training method according to any one of claims 1-7.