Farmland growth anomaly region segmentation method based on unmanned aerial vehicle remote sensing image
Through multi-scale feature fusion and attention mechanism decoder, combined with adaptive weight training, the problem of low accuracy and high resource usage in farmland remote sensing image segmentation is solved, efficient and real-time abnormal area identification of farmland monitoring system is realized, and agricultural improvement is improved. Production efficiency.
Patent Information
- Application Number
- CN202411012200.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-25
AI Technical Summary
Traditional deep learning methods have problems such as low accuracy, unbalanced data categories, and large amounts of calculations in segmenting abnormal areas in farmland remote sensing images, resulting in insufficient segmentation accuracy and high resource usage, making it difficult to achieve an effective balance between accuracy and real-time performance.
Multi-scale feature fusion, attention mechanism decoder and adaptive weight training method are used to obtain farmland remote sensing images through drones, and perform initial feature extraction, feature fusion, global-local attention upsampling and image feature classification, combined with Transformer decoding processor and pixel attention module to reduce computational costs and improve segmentation accuracy.
It achieves an effective balance between accuracy and real-time performance, improves farmland monitoring efficiency, reduces manpower investment, can accurately identify abnormal areas in farmland, and improves segmentation accuracy and efficiency.
Smart Images

Figure CN118840558A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of image semantic segmentation and agricultural informatization, and specifically to a method for segmenting abnormal growth areas of farmland based on unmanned aerial vehicle remote sensing images. Background Art
[0002] However, most agricultural production areas in China still mainly cultivate with traditional agricultural production methods. For the growth status of crops and natural disasters, human field inspections and monitoring are still needed, which not only greatly wastes manpower and material resources, but also lags in the handling of abnormal crop growth in farmland, hindering the trend of precision agricultural development. Agricultural drones are widely used in precision agriculture because they can flexibly and conveniently monitor farmland in real time, such as agricultural resource estimation, crop disaster detection, crop growth monitoring, precision agriculture management, etc. The application of drone aerial images makes farmland monitoring more convenient and efficient, and the cost is relatively low, and it is easy to popularize on a large scale. By timely discovering and locating abnormal growth areas, agricultural practitioners can quickly take corresponding regulatory measures, such as reasonable fertilization, timely irrigation, etc., to maximize farmland yields and optimize resource utilization. In addition, through long-term monitoring and accumulation, it can also provide valuable data support for agricultural scientific research and promote the continuous innovation and progress of agricultural technology.
[0003] UAV remote sensing technology is a key means of monitoring crops in the current field of precision agriculture and smart agriculture. In agricultural applications, multispectral remote sensing is generally configured with 4 to 5 spectral bands, including: blue light (B, 450 nanometers), green light (G, 560 nanometers), red light (R, 650 nanometers), red edge (RE, 730 nanometers), and near infrared (NIR, 840 nanometers). By utilizing the excellent performance of multispectral remote sensing in vegetation analysis, drones equipped with multispectral sensors can achieve refined and customized monitoring of farmland and crops. Compared with traditional satellite remote sensing, drone multispectral remote sensing shows higher flexibility and data resolution, as well as stronger timeliness. Compared with drone remote sensing equipped only with standard cameras, the data obtained by multispectral technology can more thoroughly reveal the growth dynamics and maturity status of crops, while reducing the interference of external environmental factors such as sunlight.
[0004] Detection of abnormal areas in remote sensing images of farmland, such as weeds, waterlogging, crop diseases, obstacles, etc., is a challenging task due to its irregular shape, uncertain size, unclear boundaries and other characteristics. Detecting and locating abnormal areas in these farmlands is of great significance to the improvement of crop yields and the development of refined agriculture. In recent years, with the rapid development of intelligent agriculture, combining drone images and neural networks for real-time segmentation of abnormal growth areas in farmland has become an effective solution. By extracting rich texture information from the images, the neural network can accurately analyze the overall growth of the farmland and detect possible abnormal growth areas. Its role is not only limited to real-time monitoring of the growth status of crops, but also to provide intelligent decision-making support for subsequent agricultural production.
[0005] Agricultural issues have brought new challenges to computer vision. For example, the semantic segmentation of aerial farmland images requires reasoning on very large images with extremely sparse annotations. Some aerial survey images pose huge problems for end-to-end segmentation in terms of computing power and memory consumption. In addition, the semantic segmentation of aerial farmland images is more challenging than typical semantic segmentation tasks on other aerial image datasets. For example, to segment weed patterns in aerial farmland images, the algorithm must be able to recognize sparse weed clusters with very different shapes and coverage.
[0006] At present, traditional deep learning methods have certain limitations in the segmentation of abnormal areas in farmland, as follows:
[0007] 1. Low segmentation accuracy of farmland remote sensing images: Remote sensing images have complex content, including complex textures, variable geometric shapes of objects, intricate distribution of different objects, and easy confusion of object boundaries. Secondly, remote sensing images have rich content of objects, variable scales, and large scale spans. They also have differences in color tendencies, which brings difficulties to segmentation;
[0008] 2. Data category imbalance: The proportion of pixels of different categories of objects in remote sensing images usually varies greatly. The categories with a smaller proportion cannot be fully trained, which affects the recognition accuracy.
[0009] 3. Large amount of computation and high resource usage: When the traditional segmentation network is applied to remote sensing semantic segmentation, the network has a large amount of computation and occupies more resources. At the same time, the U-Net segmentation network splices feature maps of different scales together to make full use of feature information, but this simple splicing will also stack useless information from encoders at each level, resulting in information redundancy, which makes the network unable to pay attention to the segmentation target well.
[0010] In response to the above problems, this application document proposes a method for segmenting abnormal growth areas of farmland based on UAV remote sensing images. Summary of the invention
[0011] The purpose of the present invention is to provide a farmland monitoring system and a method for monitoring farmland, which can achieve an effective balance between accuracy and real-time performance, make full use of the features in UAV remote sensing images, and improve the efficiency of farmland monitoring in large-scale agricultural production.
[0012] To solve the above technical problems, the present invention is achieved through the following technical solutions:
[0013] The real-time semantic segmentation method of abnormal areas in farmland includes the following steps through multi-scale feature fusion, attention mechanism decoder and adaptive weight training method:
[0014] S1. Obtain remote sensing images of farmland by regularly cruising over the farmland with drones;
[0015] S2, extracting initial features from the original image, and obtaining the initial multi-layer feature map of the original image through a shared convolutional layer;
[0016] S3, the extracted initial multi-layer feature map is subjected to feature fusion processing by a feature fusion module, and the output multi-layer feature map is spliced with the feature map in the decoder;
[0017] S4, fusing the extracted spatial detail information and semantic context information of the initial feature map to obtain a fused feature map; upsampling each layer of the fused feature map through global-local attention;
[0018] S5, sending the fused feature map to the image feature classifier to obtain the final feature segmentation image, and sending the agricultural warning situation of the monitored farmland to the monitoring terminal;
[0019] Preferably, in S2, it is fixed to a structure consisting of four Resblocks (N=4), in each resblock, the height and width of the feature map are halved, the number of channels is doubled, and the four outputs of the encoder {F1, F2, F3, F4} are passed to the feature fusion module for further processing.
[0020] Preferably, in S3, F1, F2, F3, and F4 are input to a multi-level feature fusion module, which contains three ascending fusion modules and three descending fusion modules for processing adjacent feature maps. The downward and upward fusion modules respectively process two adjacent connected feature maps and fuse them together. The entire fusion process is divided into two rounds, and each round only performs feature fusion between two adjacent feature maps in one direction, which can be from the top encoder layer to the bottom encoder layer or vice versa. This strategy effectively reduces the semantic gap between the encoder and the decoder, and can capture features of different levels and receptive field sizes, providing richer multi-scale information.
[0021] Inside the feature fusion module, the adjacent shallow feature map is fused with the deep feature map through the downward fusion module to generate a feature map of the same size as the deep feature map. At the pixel level, Fi is divided into 4 sub-maps, whose height and width are 50% of the original height and width. Then, these 4 sub-maps are stacked in the channel dimension, and the feature map of shape (Ci, Hi, Wi) is converted to (4Ci, Hi / 2, Wi / 2). The study strives not to lose information while changing the size of the feature map, while retaining the locality of the previous feature map. The 4 pixels that were originally adjacent in space are still adjacent in the channel, that is, spatial adjacency is converted to channel adjacency, and Fi is converted to shape The shape of the feature map is (2Ci, Hi / 2, Wi / 2), which just matches the shape of Fi+1. It should be noted that the convolution kernel size of each group is 2×4×Kh×Kw (Kh is the kernel height; Kw is the kernel width), ensuring that the channel pixels involved in the convolution are exactly 4 adjacent pixels, so that the locality of the feature map is still well preserved, and compared with ordinary convolution, the computational cost is greatly reduced. The shapes of the two feature maps are adjusted to be consistent, and they are fused into one feature map in a weighted manner. In the upsampling fusion module, the feature map with a smaller spatial size is converted to a larger size by performing the opposite steps to the downsampling fusion module, and the rest of the steps are basically the same.
[0022] Preferably, in S5, the Transformer-based decoder integrates a global-local attention module (GLTB) to achieve feature recovery and fusion. By embedding the GLTB module, an important path for the decoder to transfer key information from deep feature maps to shallow feature maps is constructed. GLTB includes global-local attention, multi-layer perceptron, two batch normalization layers and two additional operations.
[0023] Preferably, the decoder design integrates the global-local attention module (GLTB) to achieve feature recovery and fusion. By embedding the GLTB module, an important path for the decoder to transfer key information from deep feature maps to shallow feature maps is constructed. GLTB includes global-local attention, multi-layer perceptron, two batch normalization layers and two additional operations. Efficient Global-local attention is an attention module designed for semantic segmentation of complex scenes. It constructs two parallel branches, global and local, to capture global and local context information respectively. As a relatively shallow structure, the local branch uses two parallel convolutional layers with kernel sizes of 3 and 1 respectively to effectively extract local context information. Before the summation operation, the feature map undergoes two batch normalization operations to enhance the stability of the feature. At the same time, the global branch adopts a window-based multi-head self-attention mechanism to capture the global context. The process includes converting the feature map into a one-dimensional sequence through a 1x1 convolution, and then dividing it by window to form the attention Query (Q), Key (K) and Value (V). In order to Extract local features more comprehensively. The local branch consists of parallel 1x1 convolution and 3x3 convolution. The global context extracted in the global branch and the local context in the local branch are fused through deep convolution, batch normalization operation and standard 1×1 convolution to construct a fine-grained global-local context representation. The pixel attention module is then used to learn the weights for the importance of features at different pixel positions, and the feature map size is restored through convolutional layers and 4x upsampling. The pixel attention mechanism means that each channel has the same weight, but different pixel positions of the same channel have different weights. Pixel attention pays more attention to the edges and textures of objects in the image. Therefore, adding PA can help restore edge detail information, thereby improving the performance of segmentation. Operation process such as Figure 5 As shown, the formula is as follows:
[0024] y=σ(f 1×1 (X))*X
[0025] Where X is the input feature, σ represents the sigmoid function, and f 1×1 (·) is a convolutional layer with kernel size 1.
[0026] Preferably, because there is an imbalanced distribution of semantic categories in both real farmland and dataset images, the present invention designs an adaptive weight training method in the model training process. In each iterative training, the weights of training samples are automatically selected using the relevant category distribution and network confidence to reflect the real-time importance of each category. In the data preprocessing stage, the experiment is set up in a supervised environment, the number of pixels of each semantic class c∈C is calculated and normalized in the range [0,1] to obtain the dist array. First, for each category c, this paper uses its relative frequency dist in the global pixel distribution. c And the network's current average confidence level conf for category c c , the average confidence of the network for this category conf c It is updated by the exponential moving average (EMA), and the importance score Imp c The formula for network confidence is as follows:
[0027] Imp c =(1-dist c )×(1-conf c )
[0028] conf t =αconf t-1 +(1-α)conf t_avg_t
[0029] Among them, dist c The calculation of is based on the global proportion of pixels of category c in the training set, which can be obtained by counting the total number of pixels of category c in all samples in the training set and dividing it by the total number of pixels;
[0030] conf t_avg_t : At the current training iteration step t, calculate the Softmax average of all pixels labeled as category c in the current batch;
[0031] α is the smoothing factor that controls the weight distribution between the newly calculated confidence value and the previously accumulated EMA value.
[0032] For each sample, a weight W is calculated for each pixel based on the distribution of pixels of each category it contains and the calculated category importance score. ij , assuming that pixel i in the sample belongs to category c, its weight W ij for:
[0033] W ij =Imp c ×y i,c
[0034] Among them, y i,cis the label of pixel i in category c (1 means it belongs to, 0 means it does not belong to), so that pixels in low-frequency and low-confidence categories in the sample will get higher W ij value.
[0035] In order to make the training process fully consider these weights, this study changes the original cross entropy loss function L seg Perform weighted adjustment to obtain a new weighted loss function L w-seg :
[0036]
[0037] in, is the output predicted by the model, and y is the true label w of the sample i,c represents the weight of category c in sample i, yi c is the true label value of category c in sample i, is the probability that the model predicts that sample i is of category c.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. The present invention provides a farmland monitoring system and a method for monitoring farmland, which can achieve an effective balance between accuracy and real-time performance, make full use of the features in the remote sensing images of unmanned aerial vehicles, and improve the efficiency of farmland monitoring in large-scale agricultural production; the remote sensing images of farmland are obtained by regularly cruising the unmanned aerial vehicles above the farmland, and the real-time semantic segmentation algorithm is not accurate enough in the task of segmenting abnormal areas of farmland. A real-time semantic segmentation method based on attention and multi-scale feature fusion is proposed, including a feature extraction stage, a multi-scale feature fusion module (MFF), a decoder based on the attention mechanism, and a model training stage. Compared with the traditional farmland monitoring method, the present invention is based on a brand-new unmanned aerial vehicle remote sensing platform. The images of each area of the farmland include four color channels: near infrared (NIR), red, green and blue. They are taken using a proprietary wide-area multispectral system (WAMS), which captures all four channels simultaneously at a resolution of 10 cm / px. The field area label types used include: background (normal farmland), double plants, dryness, nutrient deficiency, seeding omissions, waterlogged areas, waterways and weeds. The binary labels of each category of areas in each sampling image are fused into the same mask image to ensure that the network model can segment all categories of areas at the same time; the training set data is put into the real-time semantic segmentation model for training until the model gradually fits and a trained semantic segmentation model is obtained;
[0040] The technical solution of the embodiment of the present invention is to use a drone to identify the type of farmland based on the position identification positioning stakes set in the farmland, then monitor the agricultural warning situation of the farmland based on the type of farmland, and send it to the monitoring terminal, which notifies the management personnel, thereby realizing intelligent monitoring and early warning of unmanned farmland over a large area. Monitoring is no longer dependent on manpower, which can reduce the investment in human capital and improve the efficiency of farmland monitoring in large-scale agricultural production.
[0041] 2. This method makes full use of the pixel features of feature maps of different levels of the encoder, and uses the feature fusion jump connection module for multi-level feature maps to fuse the feature maps output by adjacent encoders, and inputs them into the decoder through jump connections. This method can effectively integrate deep and shallow semantic information, minimize the loss of spatial information in the downsampling process through splicing processing, and avoid the use of dense connection methods with high computational complexity.
[0042] 3. This method takes into account the effectiveness of multi-scale feature fusion in semantic segmentation networks. Through this hierarchical and lightweight design, the decoder can capture global and local contextual information at multiple scales while maintaining high efficiency. The design of the decoder enables the model to better understand the irregular shape areas naturally formed in farmland images, and obtain more comprehensive contextual information through the global-local Transformer module, thereby improving the accuracy of real-time segmentation.
[0043] 4. In order to alleviate the sample imbalance phenomenon in the training process, an adaptive weight training method is designed to reduce the impact of sample imbalance in farmland areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 is a flow chart of the present invention;
[0046] Figure 2 A schematic diagram of the overall structure of a neural network used in the present invention;
[0047] Figure 3 Schematic diagram of the structure of the feature fusion jump connection module in the embodiment;
[0048] Figure 4 Schematic diagram of the structure of the pixel attention module in the embodiment;
[0049] Figure 5This is a diagram showing the experimental results of the model in segmenting abnormal farmland areas in the verification experiment of the embodiment. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0051] The specific implementation methods of the method of the present invention are as follows:
[0052] like Figure 1 As shown, this embodiment discloses a method for segmenting abnormal areas of farmland based on UAV remote sensing images. This method uses an artificial neural network as the main body. The structure of the network is as follows Figure 2 As shown in the figure, it mainly includes the following stages: feature extraction stage, multi-layer feature fusion stage, decoding stage based on attention mechanism and adaptive training stage;
[0053] The method in this paper includes the following steps:
[0054] Step 1: Obtain original UAV farmland remote sensing images and preprocess them;
[0055] Step 2: Input the image data into the model of this method. The initial image size is 512*512. First, input the encoder to extract the initial features;
[0056] The images of the wide-area multispectral system contain four spectral bands, namely blue (B, 450nm), green (G, 560nm), red (R, 650nm) and near infrared (NIR, 840nm). In order to facilitate band calculation and information extraction, they will be stored in the farmland spectral database according to the bands.
[0057] Step 3: The encoder uses four consecutive Resblocks to downsample the image four times. After each Resblock, the height and width of the feature map are halved, and the number of channels is doubled. The four outputs of the encoder are defined as {F1, F2, F3, F4}. Specifically, the encoder processes the shape of the input image (H×W×4) and generates a feature map with shape after four stages. Next, the four outputs F1, F2, F3, and F4 of the encoder are further processed by a feature fusion jump connection module, which contains three ascending fusion modules and three descending fusion modules for processing adjacent feature maps and outputs four feature maps with the same shape as the input.
[0058] Step 4, the four outputs are passed to the feature fusion jump connection module. First, the feature map is fused with the adjacent shallow feature map and the deep feature map through the downward fusion module to generate a feature map of the same size as the deep feature map. At the pixel level, Fi is divided into 4 sub-maps, whose height and width are 50% of the original height and width. Subsequently, these 4 sub-maps are stacked in the channel dimension, and the feature map with shape (Ci, Hi, Wi) is converted to (4Ci, Hi / 2, Wi / 2).
[0059] Step 5: The module includes three upsampling fusion modules. In the upsampling fusion module, the feature map with a smaller spatial size is converted to a larger size by performing the opposite steps to the downsampling fusion module. The remaining steps are basically the same.
[0060] Step 6, enter the decoding stage, starting from the fourth-level feature map, upsample the feature maps of other sectors or keep the size of the pooled feature maps consistent, fuse the channel information of these feature maps, and then process them through the pixel attention module to obtain a new feature map. The new feature map is processed by the convolution operation to obtain the prediction results of different sizes.
[0061] The global-local attention module (GLTB) is integrated to achieve feature recovery and fusion. By embedding the GLTB module, an important path for the decoder to transfer key information from deep feature maps to shallow feature maps is constructed. GLTB includes global-local attention, multi-layer perceptron, two batch normalization layers and two additional operations. Global-localattention is an attention module designed for semantic segmentation of complex scenes. It constructs two parallel branches, global and local, to capture global and local context information respectively. As a relatively shallow structure, the local branch uses two parallel convolutional layers with kernel sizes of 3 and 1 to effectively extract local context information. Before the summation operation, the feature map undergoes two batch normalization operations to enhance the stability of the feature. At the same time, the global branch adopts a window-based multi-head self-attention mechanism to capture the global context. The process includes converting the feature map into a one-dimensional sequence through a 1x1 convolution, and then dividing it by window to form the attention Query (Q), Key (K) and Value (V). In order to extract local features more comprehensively, the local branch consists of parallel 1x1 convolution and 3x3 convolution. The global context extracted in the global branch and the local context in the local branch are fused through deep convolution, batch normalization operations and standard 1×1 convolution to construct a fine-grained global-local context representation.
[0062] Step 7, use the pixel attention module to learn the weights based on the importance of features at different pixel positions, and restore the feature map size through convolutional layers and 4x upsampling. The pixel attention mechanism means that each channel has the same weight, but different pixel positions of the same channel have different weights. Pixel attention pays more attention to the edges and textures of objects in the image. Therefore, adding PA can help restore edge detail information, thereby improving segmentation performance. The calculation formula is as follows:
[0063] y=σ(f 1×1 (X))*X
[0064] Where X is the input feature, σ represents the sigmoid function, and f 1×1 (·) is a convolutional layer with kernel size 1.
[0065] Step 8, adaptive weight training method. Before the model is actually applied, it is necessary to train the model based on the existing data set and annotations. In real farmland and data set images, there is also an imbalanced distribution of semantic categories. For example, the observed area of the sowing omission area is very small, and its number and magnitude are quite different from those of the normal cultivated land area. In the training process of the model, this study uses the adaptive weight training method. In each iterative training, the weights of the training samples are automatically selected using the relevant category distribution and network confidence to reflect the real-time importance of each category. In the data preprocessing stage, the experiment is set in a supervised environment. The number of pixels of each semantic class c∈C is calculated and normalized in the range [0,1] to obtain the dist array. First, for each category c, this paper uses its relative frequency dist in the global pixel distribution. c And the network's current average confidence level conf for category c c , the average confidence of the network for this category conf c It is updated by the exponential moving average (EMA), and the importance score Imp c The formula for network confidence is as follows:
[0066] Imp c =(1-dist c )×(1-conf c )
[0067] conf t =αconf t-1 +(1-α)conf t_avg_t
[0068] Among them, dist c The calculation is based on the global proportion of pixels of category c in the training set, which can be obtained by counting the total number of pixels of category c in all samples in the training set and dividing it by the total number of pixels; conft_avg_t : At the current training iteration step t, the Softmax average of all pixels labeled as category c in the current batch is calculated; α is the smoothing factor, which controls the weight distribution between the newly calculated confidence value and the previously accumulated EMA value.
[0069] For each sample, a weight W is calculated for each pixel based on the distribution of pixels of each category it contains and the calculated category importance score. ij , assuming that pixel i in the sample belongs to category c, its weight W ij for:
[0070] W ij =Imp c ×y i,c
[0071] Among them, y i,c is the label of pixel i in category c (1 means it belongs to, 0 means it does not belong to), so that pixels in low-frequency and low-confidence categories in the sample will get higher W ij value.
[0072] In order to make the training process fully consider these weights, this study changes the original cross entropy loss function L seg Perform weighted adjustment to obtain a new weighted loss function L w-seg :
[0073]
[0074] in, is the output predicted by the model, y is the true label of the sample, and w i,c represents the weight of category c in sample i, yi c is the true label value of category c in sample i, is the probability that the model predicts that sample i is of category c.
[0075] This mechanism dynamically updates the class importance score Imp in each training iteration or at a predetermined time interval. c and the corresponding sample weight W ij The update process includes recalculating dist c , use the EMA formula to update conf t , and according to the updated Imp c and pixel label y i,c , recalculate w i,c Through such dynamic adjustment, the model can continuously adapt to changes in category importance during training, and specifically strengthen the learning of the most challenging or most easily overlooked categories, thereby effectively addressing the problem of category imbalance and improving the overall semantic segmentation performance.
[0076] Step 9: Input the newly acquired farmland remote sensing image into the model and output the abnormal area segmentation result.
[0077] In order to verify the effectiveness of the abnormal growth area segmentation model proposed in this study, the experiment selected three network models widely used in the field of remote sensing image segmentation—U-Net, DeepLabV3+, and SegFormer—as controls, and conducted a detailed comparative analysis. The data in Table 1 show that the model proposed in this study has significant advantages in the MIoU indicator. Compared with the reference model based on U-Net, although the number of parameters of this model has increased slightly, the farmland image segmentation effect has been significantly improved, which is manifested in an increase of 4.16 percentage points in the MIoU value. Compared with the SegFormer model that also uses the Transformer encoder, the model in this study has increased the MIoU value by 2.50 percentage points while maintaining a similar number of parameters.
[0078] Table 1 Comparative test results
[0079]
[0080]
[0081] Table 2 lists the intersection over union (IoU) of each model in each region category. In some cases with fewer labeled training samples, DeepLabV3+ has poor network segmentation ability in the double plant and waterway categories. SegFormer has large differences in different categories, and performs outstandingly in the sowing omission category, but performs poorly in the double plant category. By applying an adaptive weight training strategy, the model in this study successfully reduces the phenomenon of significant performance differences on any specific category, thereby ensuring excellent segmentation performance on all categories.
[0082] Table 2 IoU comparison results of abnormal areas (%)
[0083] Model U-Net DeepLabV3+ SegFormer Ours background 73.96 74.26 70.81 73.46 Double Plant 22.60 19.27 14.73 21.42 Dry 56.43 53.5 55.98 55.40 Weeds 19.77 27.83 19.16 28.82 Nutrient deficiency 20.48 21.6 23.92 36.58 Sowing Omissions 25.49 29.28 38.75 30.52 Waterlogged area 23.54 27.77 24.17 30.58 waterway 54.39 8.21 62.42 53.13
[0084] In order to verify the performance of each module of the present invention, this paper conducted an ablation experiment on the composition of each module. The ablation results are shown in Table 3. A total of four different ablation experiment cases are set up: 1. Baseline: U-net network using resnet-18 as the encoder; 2. Baseline+A: Replace the FCN decoder with a Transformer-based decoder; 3. Baseline+A+B: Introduce a feature fusion jump connection module based on the above; 4. Baseline+A+B+C: Introduce an adaptive training scheme based on the above.
[0085] Table 3 Ablation experiment results
[0086] Method MIoU(%) F1(%) OA (%) Baseline 37.08 51.12 76.97 Baseline+A 39.22 54.43 77.15 Baseline+A+B 40.66 55.94 77.38 Baseline+A+B+C 41.24 57.23 77.44
[0087] On the other hand, the present invention also proposes a computer device, including a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to implement the above-mentioned method for segmenting abnormal farmland areas based on drone remote sensing images.
[0088] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or for use in conjunction with such instruction execution systems, apparatuses or devices. For purposes of this specification, "computer-readable medium" may be any device that may contain storage, communication, propagation or transmission of programs for use by an instruction execution system, apparatus or device, or in conjunction with such instruction execution systems, apparatuses or devices.
[0089] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection having one or more wirings (electronic devices), a portable computer disk case (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0090] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logical function on a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0091] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example, and the specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples.
[0092] The above content is a further detailed description of the present invention in combination with specific implementation methods. It cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the scope of protection determined by the claims submitted for the present invention.
Claims
1. A method for segmenting abnormal growth areas of farmland based on UAV remote sensing images, characterized in that: The method uses a wide-area multispectral system for shooting, uses an artificial neural network as the main body, and the network structure includes: a feature extraction stage, a multi-layer feature fusion stage, a decoding stage based on an attention mechanism, and an adaptive training stage. The method includes the following steps: Step 1: Use drones to regularly cruise over farmland to obtain farmland remote sensing images and preprocess them; Step 2: Perform initial feature extraction on the original image and obtain the initial multi-layer feature map of the original image through the shared convolution layer; Step 3: The extracted initial multi-layer feature map is subjected to feature fusion processing through the feature fusion module, and the output multi-layer feature map is spliced with the feature map in the decoder and input into the feature fusion jump connection module; Step 4: Fusing the spatial detail information and semantic context information of the extracted initial feature map to obtain a fused feature map; upsampling each layer of the fused feature map through global-local attention, and sending the fused feature map to the image feature classifier to obtain the final feature segmentation image; Step 5: Use adaptive weights to train the model, input data, and output segmentation results.
2. The method for segmenting abnormal farmland growth areas based on UAV remote sensing images according to claim 1 is characterized by: In step 1, the remote sensing image is input into the U-net model backbone network, and the remote sensing image preprocessing includes the following steps:
1. Input the collected farmland remote sensing images into the encoder for downsampling operation; 2. It is fixed to a structure consisting of four Resblocks (N=4). In each Resblock, the height and width of the feature map are halved, the number of channels is doubled, and the four outputs of the encoder {F1, F2, F3, F4} are passed to the feature fusion module.
3. The method for segmenting abnormal farmland growth areas based on UAV remote sensing images according to claim 2 is characterized by: The F1, F2, F3, and F4 are input to a multi-level feature fusion module, which includes three ascending fusion modules and three descending fusion modules for processing adjacent feature maps. The descending and ascending fusion modules process two adjacent connected feature maps respectively and fuse them together. Inside the feature fusion module, the adjacent shallow feature maps are fused with the deep feature maps through the downward fusion module to generate a feature map of the same size as the deep feature map.
4. The method for segmenting abnormal farmland growth areas based on UAV remote sensing images according to claim 1, characterized in that: In step 3, after the feature graph in the feature fusion jump module passes through the downward fusion module, the step of obtaining the feature input into the upward fusion module includes: In the upward fusion module, the feature maps with smaller spatial size are transformed to larger size by performing the opposite steps to those in the downward fusion module, and the rest of the steps are basically the same.
5. The method for segmenting abnormal farmland growth areas based on UAV remote sensing images according to claim 3 is characterized by: The deepest level features in the deep feature map are input into a multi-scale feature extraction module to obtain deep multi-scale features. The step of obtaining deep multi-scale features includes: The Transformer-based decoder integrates the global-local attention module (GLTB) to achieve feature recovery and fusion. The GLTB module is embedded to build an important path for the decoder to transfer key information from deep feature maps to shallow feature maps. GLTB includes global-local attention, multi-layer perceptron, two batch normalization layers and two additional operations.
6. The method for segmenting abnormal farmland growth areas based on UAV remote sensing images according to claim 1, characterized in that: The feature map uses a pixel attention module to learn weights for the importance of features at different pixel positions, and the steps include: The fused feature map is fused with the original fused feature map through a 1x1 convolution layer and an activation layer, so that each channel has the same weight, but different pixel positions in the same channel have different weights, and the feature map size is restored through a convolution layer and 4x upsampling.
7. The method for segmenting abnormal farmland growth areas based on UAV remote sensing images according to claim 1, characterized in that: The adaptive weight training method of the adaptive weight training model application comprises the following steps: In the data preprocessing stage, the experiment is set up in a supervised environment. The number of pixels of each semantic class c∈C is calculated and normalized in the range [0, 1] to obtain the dist array. For each category c, this paper uses its relative frequency dist in the global pixel distribution c And the network's current average confidence level conf for category c c , the average confidence of the network for this category conf c It is updated by exponential moving average; For each sample, a weight W is calculated for each pixel based on the distribution of pixels of each category it contains and the calculated category importance score. ij ; The original cross entropy loss function L seg Perform weighted adjustment to obtain a new weighted loss function L w-seg .
8. A storage medium, characterized in that: include: The storage medium stores one or more programs, and when the programs are executed by the processor, they implement the method for segmenting abnormal areas of farmland based on drone remote sensing images as described in any one of claims 1 to 8.
9. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory is used to store a computer program; When the processor is used to execute the computer program stored in the memory, it implements a method for segmenting abnormal areas of farmland based on drone remote sensing images and a storage medium as described in any one of claims 1-8.
Citation Information
Patent Citations
Image defogging method and system based on global feature fusion attention network
CN113344806A
Unmanned aerial vehicle hyperspectral remote sensing image farmland utilization change detection method and system based on multi-scale difference depth feature fusion
CN115909112A
Remote sensing image road segmentation method fusing multi-scale features and double attention mechanism
CN117078943A
Remote sensing image road segmentation method combining channel attention mechanism and multilayer axial Transform feature fusion structure
CN118351538A
Scenario semantic parsing method based on global guidance selective context network
WO2021244621A1
Cited By
Stain detection method and device based on spectrum abnormal region perception
CN120375331A
Remote sensing image change detection and change description method based on multi-task learning
CN120411725A
Attention mechanism-based crop suitability dynamic evaluation method
CN120449112A
Dynamic evaluation method of crop suitability based on attention mechanism
CN120449112B
Farmland remote sensing semantic segmentation method and system based on dynamic double-path sparse attention
CN121438101A
