Duplex terrace effective planting area estimation method facing unmanned aerial vehicle remote sensing
By using UAV remote sensing technology and deep learning network models to process images of complex terraced fields, the problems of low calculation efficiency and insufficient accuracy in traditional methods are solved. This enables precise segmentation and area estimation of planting areas in complex terraced fields, adapting to complex terrain and supporting scientific decision-making by agricultural managers.
Patent Information
- Application Number
- CN202511134180.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional methods for predicting the effective planting area of complex terraced fields suffer from low calculation efficiency, insufficient accuracy, and poor adaptability to complex terrain environments.
High-resolution images are acquired using UAV remote sensing technology and combined with a deep learning network model. Image preprocessing and feature extraction are performed through a Swing Transformer structure, a bilinear attention module, and a boundary awareness enhancement module. A feature refinement aggregation module is used to achieve accurate segmentation and area estimation of the planting area.
It enables precise division of the effective planting area of terraced fields and automated calculation of the area, improving the efficiency and accuracy of the calculation, adapting to diverse agricultural environments, possessing scalability, and supporting agricultural managers in making scientific decisions.
Smart Images

Figure CN120976801A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of intelligent agricultural technology, and specifically relates to a compound terrace effective planting area estimation method for unmanned aerial vehicle remote sensing. BACKGROUND
[0002] Terrace is a kind of terraced farmland cultivated on mountain slopes. By building water platforms and retaining walls, steep slopes are transformed into flat land suitable for farming. Due to different characteristics such as terrain, purpose, and water source conditions, terraces are divided into various types. Among them, compound terraces are a special type of terrace structure. Through different height steps or platforms, a multi-level and multi-functional farming system is formed. This type of terrace design not only serves agricultural production, but also may serve multiple functions such as ecological protection and water resource management. Traditionally, the division of terrace planting areas and the prediction of planting areas mainly rely on the experience of local farmers and simple measurement methods. These traditional methods have obvious shortcomings in accuracy and efficiency, and are difficult to meet the fine management needs of modern intelligent agriculture. In order to improve the intelligent level of terrace crop planting, modern information technology, including deep learning models and remote sensing technology, is introduced to identify terrace planting areas and predict planting areas.
[0003] Deep learning model technology, through the analysis and learning of a large number of images and data, provides an efficient and accurate choice for the segmentation of terrace planting areas and the estimation of planting areas. Deep learning technology can combine the convenience of remote sensing technology to automatically identify the effective planting area of the terrace by processing and analyzing the compound terrace remote sensing image data collected by the unmanned aerial vehicle, realize accurate segmentation, and estimate the effective planting area. At the same time, this technology can continuously learn from new data, adapt to different regions and different structures of complex terraces.
[0004] Remote sensing technology uses sensors carried by satellites or unmanned aerial vehicles to obtain high-resolution images and spectral information of compound terraces from the air, providing important data support for the identification of effective planting areas of compound terraces and the estimation of planting areas. Remote sensing technology has high convenience, avoiding the inefficiency of traditional measurement methods, and can cover a wide range of mountain terraces, providing rich data resources for the training and verification of deep learning models.
[0005] The method provided by the application deeply integrates the intelligent analysis and prediction ability of deep learning technology and the efficient data acquisition ability of remote sensing technology. By constructing a deep learning network model, the remote sensing data obtained by the unmanned aerial vehicle is intelligently analyzed, and the method provides an efficient and accurate solution for the segmentation of the effective planting area of the compound terrace and the estimation of the planting area. Thanks to the powerful learning and prediction ability of the deep learning model, the method can provide accurate and rapid analysis results based on remote sensing data for agricultural managers and planters, supporting them to make more scientific and reasonable decisions. At the same time, this technology significantly improves the automation and intelligence level of the planting management of the compound terrace, greatly improves the efficiency of the estimation of the planting area, and provides strong technical support for the development of precision agriculture. SUMMARY
[0006] The application aims to solve the problems of traditional technology in the prediction of the effective planting area of the compound terrace, such as low efficiency, insufficient accuracy, and poor adaptability to complex terrain environment. The application provides a method for estimating the effective planting area of the compound terrace based on unmanned aerial vehicle remote sensing. The method deeply integrates deep learning technology and remote sensing technology, providing an efficient and accurate intelligent solution for the estimation of the effective planting area of the compound terrace, and providing a scientific decision basis for agricultural practitioners. The method first uses unmanned aerial vehicle remote sensing technology to obtain high-resolution images of the compound terrace, and then intelligently processes and analyzes these data through a deep learning network model and algorithm to accurately identify and segment the planting area. On this basis, the effective planting area of the compound terrace is scientifically predicted.
[0007] Technical scheme: To achieve the above-mentioned purpose, the application provides a method for estimating the effective planting area of the compound terrace based on unmanned aerial vehicle remote sensing, including the following steps:
[0008] Step a: Collect the remote sensing image of the compound terrace by the unmanned aerial vehicle, and pre-process the obtained image, including image geometric transformation, denoising and image enhancement;
[0009] Step b: In the encoder, use the Swin Transformer structure to preliminarily extract features of the terrace image at different scales;
[0010] Step c: Use the bilinear attention module (DLAM) to further capture global context information, and use the boundary perception enhancement module to further refine the target outline;
[0011] Step d: In the decoder, use the feature refinement aggregation module to fully integrate the inter-layer information at different scales;
[0012] Step e: Get the final segmentation result through a segmentation head, and predict the effective planting area of the terrace according to the segmentation result.
[0013] Further, the method of pre-processing the image in step a is as follows:
[0014] Step a1: Geometric transformation is performed on the collected complex terrace image. First, the image is rotated according to the following formula:
[0015]
[0016] Next, the rotated terrace image is translated according to the following formula:
[0017]
[0018] Then, the translated terrace image is scaled according to the following formula:
[0019]
[0020] wherein represents the original image, represents the coordinates in the image, is the rotation angle, is the horizontal translation, is the vertical translation, and k is the scaling factor.
[0021] Step a2: Gaussian filtering is performed on the complex terrace image after geometric transformation in step a1 to smooth the image and remove noise. The formula for Gaussian filtering operation is as follows:
[0022]
[0023] wherein is the pixel value in the original image, is the Gaussian kernel function, which is defined as:
[0024]
[0025] wherein is the standard deviation of the Gaussian kernel, which is used to control the degree of smoothing.
[0026] Step a3: Image enhancement is performed on the terrace image after smoothing and denoising in step a2. First, the image brightness is adjusted according to the following formula:
[0027]
[0028] wherein is the brightness increment.
[0029] Then, the image contrast is adjusted according to the following formula:
[0030]
[0031] wherein is a scaling factor.
[0032] Further, in the step b, the specific process of using the Swin Transformer structure as an encoder to perform preliminary feature extraction on the complex terrace image is as follows:
[0033] Step b1: In the encoder, the Swin Transformer structure is used to perform preliminary feature extraction on the terrace image obtained after preprocessing in step a at different scales, and four stages of hierarchical features are obtained, denoted as S1, S2, S3, and S4, wherein S1 is the output of the first stage of the encoder, S2 is the output of the second stage of the encoder, S3 is the output of the third stage of the encoder, and S4 is the output of the fourth stage of the encoder.
[0034] Step b2: After obtaining the feature representations of different scales extracted by the encoder, the high-level feature S4 is input into the bilinear attention module to capture global context information, and S4 is input into the boundary perception enhancement module to further obtain boundary information. In addition, the extracted features S1, S2, and S3 are respectively input into the corresponding stage feature refinement aggregation modules in the decoder.
[0035] Further, in the step c, the specific process of using the bilinear attention module to further capture global context semantic information is as follows:
[0036] Step c1: First, a 1x1 convolution is used to adjust the channel dimension of the input feature S4, and then an asymmetric convolution and a dilated convolution are used in two branches. In the first branch, a 1x3 convolution layer, a 3x1 convolution layer, and a 3x3 dilated convolution layer with a dilated rate of 3 are sequentially used to obtain In the other branch, a 1x5 convolution layer, a 5x1 convolution layer, and a 3x3 dilated convolution layer with a dilated rate of 3 are sequentially used to obtain The results of the two branches are concatenated to obtain The above process can be represented by the following formula:
[0037]
[0038]
[0039]
[0040] wherein, ∈R h×w×c is the input, ∈R h×w×(c / 2) This represents the output of the first branch. ∈R h×w×(c / 2) This indicates the output of the other branch. This represents a 1×1 convolutional layer. This represents a 3×3 voided volume with a void ratio of 3.
[0041] Layering, It is a composite function, consisting of a 1×3 convolutional layer and a 3×1 convolutional layer. It is a composite function that passes through a 1×5 convolutional layer and a 5×1 convolutional layer in sequence. ∈R h×w×c It is the result of concatenating the outputs of the two branches. (·) represents splicing along the channel dimension;
[0042] Step c2: Calculate the multi-scale features obtained in step c1. The input is fed into both the Spatial Linear Attention (SLA) and Channel Linear Attention (CLA) mechanisms for attention enhancement. The results are then summed element-wise, followed by a 3×3 convolution operation, which is then added to the original input. Finally, the input is activated by a ReLU function to obtain the output features. The process can be represented as follows:
[0043]
[0044] in, ∈R h×w×c This represents the output characteristics of DLAM. ∈R h×w×c and ∈R h×w×c These represent the output characteristics of SLA and CLA, respectively. It is a 3×3 convolution. Represents the ReLU activation function. This indicates element-level addition.
[0045] Furthermore, in step c, to alleviate the problem of blurred boundaries in remote sensing images, the specific process of further extracting boundary semantic information using the boundary awareness enhancement module is as follows:
[0046] Step c3: Considering that low-level feature S1 may contain a lot of redundant information and have a small receptive field, while the feature representation extracted by higher-level feature S3 is not sufficient, this module integrates low-level feature S2 and high-level feature S4 as input, and uses the low-level feature... Input a 1×1 convolutional layer to change the dimensions and obtain features At the same time, for high-level characteristics Perform a 1×1 convolution operation to adjust the channels and then upsample the data. The result is shown below. Then, for the obtained features and characteristics The concatenation operation is performed along the channel dimension, followed by convolution and a sigmoid activation function to guide the fusion of high- and low-level features, enhance the dependence between channels, and adaptively learn important feature information between channels to obtain boundary features. The calculation process is shown in the following formula:
[0047]
[0048] in This indicates that the data passes through two consecutive 3×3 convolutional layers and one 1×1 convolutional layer. It is the Sigmoid activation function. This indicates an upsampling operation with a sampling coefficient of 4;
[0049] Step c4: Take the result obtained in step c3 Calculate the binary cross-entropy loss with the boundary labels to achieve boundary supervision, while simultaneously... and Element-wise multiplication, followed by pixel-level addition with the residual branch, yields the result. The above process can be represented as:
[0050]
[0051] in, This represents pixel-level multiplication. This represents pixel-level addition. Indicates downsampling;
[0052] Furthermore, in step d, the specific process of fully fusing semantic information at different scales using the feature refinement aggregation module is as follows:
[0053] Step d1: In the decoder, the input to stage IV is the result from the DLAM module. and results from the BAE module The inputs for the other three stages are the output of the previous FRA module (feature refinement aggregation module) after bilinear interpolation and the output from the corresponding stage of the encoder. The two inputs are concatenated and then passed through a 1×1 convolutional layer to obtain... The specific calculation process can be expressed as follows:
[0054]
[0055]
[0056] in, These are the four stages of the Swing Transformer's output; the four outputs of the feature refinement and aggregation module are available. Define it. and These represent the output characteristics of DLAM and BAE, respectively. Representative to Perform double the bilinear interpolation;
[0057] Step d2: To comprehensively obtain channel dependency information, three different pooling strategies are used, including adaptive average pooling, max pooling, and soft pooling, to process the information obtained in step d1. After passing through the three pooling layers mentioned above, the results from the three branches are fed into a fully connected layer with shared parameters. Then, the results from the first branch and the second branch are added element-wise to obtain the final result. Then The result is multiplied at the pixel level with the result of the third branch, then passed through a fully connected layer, and finally activated by the Sigmoid function to obtain the features. The above process can be represented by the following equation:
[0058]
[0059]
[0060] in, , , These represent adaptive average pooling layer, max pooling layer, and soft pooling layer, respectively. and These represent fully connected layers with a reduced number of layers and fully connected layers with an increased number of layers, respectively.
[0061] Step d3: Apply the features obtained in step d2 Divide into two branches, one branch first with (or ) Multiply each element by the row and then multiply by the row. (or ) Perform element-by-element addition, and the other branch first adds to... (or Perform element-wise multiplication and then multiply. (or ) Perform element-wise addition, and finally add the results of the two branches element-wise to obtain the output feature containing rich information about the feature. The above process can be represented as follows:
[0062]
[0063]
[0064] Furthermore, in step e, the result obtained from the decoder is fed into a segmentation head to obtain the segmentation result. Based on the segmentation result, the specific process of calculating the effective planting area of the terraced fields is as follows:
[0065] Step e1: The final output features obtained from the decoder... The data is input into a segmentation head to obtain the final segmentation result.
[0066] Step e2: Based on the segmentation results obtained in step e1, calculate the effective planting area of the complex terraced fields. The specific calculation process is as follows:
[0067]
[0068]
[0069]
[0070] in, The estimated value representing the effective planting area of the terraced fields. The pixels representing the effective planting area in the result of the complex terraced field segmentation. Represents the estimated actual area of the sampled image. This represents the actual size of the ground corresponding to a single pixel in the width direction. This represents the actual size of the ground corresponding to a single pixel in the height direction. Represents the actual width of the image. Represents the actual height of the image. Represents the width of the sensor. Represents the height of the sensor. Represents the vertical height from the center of the shooting area. This represents the camera's focal length.
[0071] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0072] 1. The method of this invention uses a high-resolution camera mounted on an unmanned aerial vehicle (UAV) to acquire remote sensing image data of complex terraced fields. Combined with advanced deep learning network technology, it can accurately identify the boundaries of terraced fields and planting areas, overcome the limitations of traditional methods in complex terrain and diverse planting patterns, and achieve precise segmentation of the effective planting area of complex terraced fields. Based on the obtained segmentation results, it realizes the automated calculation of the effective planting area of complex terraced fields, providing accurate data support for farmland management.
[0073] 2. This invention is not only applicable to complex terraced field scenarios, but can also be widely applied to various complex agricultural scenarios, such as ordinary farmland and mountainous areas. Thanks to the data-driven nature of deep learning models, it can automatically learn the characteristics of different scenarios through training data, thereby adapting to diverse agricultural environments and exhibiting strong adaptability and generalization.
[0074] 3. This invention possesses high scalability, not only enabling the segmentation of effective planting areas in terraced fields and the estimation of planting area, but also providing a solid foundation for subsequent functional expansion. For example, a crop yield prediction module can be further integrated, combining crop growth characteristics, climatic conditions, and planting scenarios to achieve accurate crop yield prediction. Furthermore, modules such as pest and disease monitoring and soil fertility analysis can be added according to actual needs to construct an integrated agricultural intelligent decision-making system, providing comprehensive support for agricultural production.
[0075] 4. This invention proposes a method for estimating the effective planting area of complex terraced fields based on UAV remote sensing. This provides agricultural practitioners with a novel decision support tool, helping farmers and agricultural managers optimize resource allocation, improve land use efficiency, and reduce production costs. The intelligent and automated characteristics of this method significantly enhance the modernization level of agricultural production, promote the transformation of agriculture from traditional experience-driven to data-driven approaches, and provide technical support for the sustainable development of agriculture. Attached Figure Description
[0076] Figure 1 This is a schematic flowchart of the method of the present invention;
[0077] Figure 2 This is a diagram of the overall network model of the method of the present invention;
[0078] Figure 3 This is a schematic diagram of the bilinear attention module in the method of the present invention;
[0079] Figure 4 This is a schematic diagram of the boundary perception enhancement module in the method of the present invention;
[0080] Figure 5 This is a schematic diagram of the feature refinement aggregation module in the method of the present invention. Detailed Implementation
[0081] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0082] This invention provides a method for predicting the effective area of complex terraced fields based on UAV remote sensing, such as... Figure 1As shown, it includes the following steps:
[0083] Step a: Collect remote sensing images of the terraced fields using drones. Compared to satellite remote sensing, drones offer advantages such as high resolution (centimeter-level), high flexibility, and less susceptibility to weather conditions. They can capture close-up details of the terraced fields (e.g., the width of the ridges and the crop cover), making them particularly suitable for the complex terrain (slopes and multiple levels) of mountain terraces. Preprocess the obtained images to eliminate noise and distortion, enhance terraced features (e.g., ridges and crop boundaries), and ensure that the images input to the model are "clear, regular, and feature-rich." The preprocessing includes image geometric transformation, denoising, and image enhancement. The specific process is as follows:
[0084] Step a1: Perform geometric transformations on the collected terraced field images to eliminate geometric distortions caused by the drone's shooting angle (such as tilt and rotation) and terrain undulations, making the terraced field images more spatially regular and facilitating spatial relationship modeling during subsequent feature extraction. First, rotate the images to make the terraced layer boundaries as horizontal as possible, reducing misjudgments of tilt features by the subsequent model. The rotation formula is as follows:
[0085]
[0086] Next, a translation operation is performed on the rotated terraced field image. Translation is a fine-tuning of the image's position after rotation, ensuring the terraced areas are logically positioned within the image through simple coordinate offsets. This provides a more regular input for subsequent denoising, enhancement, and feature extraction. The formula for the translation operation is as follows:
[0087]
[0088] Then, the translated terraced field image is scaled to fit the size of the terraced field area to the needs of subsequent processing. The scaling formula is as follows:
[0089]
[0090] in Represents the original image. Represents the coordinates in the image. It is the rotation angle. This is the translation in the horizontal direction. is the vertical translation amount, and k is the scaling factor;
[0091] Step a2: Apply Gaussian filtering to the composite terraced field image after geometric transformation in step a1 to smooth the image and remove noise. The formula for Gaussian filtering is as follows:
[0092]
[0093] in These are the pixel values in the original image. The Gaussian kernel function is specifically defined as follows:
[0094]
[0095] in It is the standard deviation of the Gaussian kernel, used to control the degree of smoothing; It is relative to the center The offset;
[0096] Step a3: Perform image enhancement on the terraced field image after smoothing and denoising in step a2. First, adjust the image brightness using the following formula:
[0097]
[0098] in This represents the increase in brightness.
[0099] Next, adjust the image contrast using the following formula:
[0100]
[0101] in It is the scaling factor;
[0102] Step b: Process the overall network model for the image, such as Figure 2 As shown, the encoder utilizes a Swin Transformer structure to perform preliminary feature extraction at different scales on the terraced field image. The specific process is as follows:
[0103] Step b1: In the encoder, the Swin Transformer structure is used to perform preliminary feature extraction at different scales on the terraced field image obtained after preprocessing in step a, resulting in four stages of hierarchical features, denoted as S1, S2, S3, and S4 from low to high. Low-order features S1 to S2 preserve details and are used by the subsequent decoder to repair fine structures such as field ridge edges and small field plots. High-order features S3 to S4 provide semantics and are used by the bilinear attention module to capture global planting area associations and the boundary awareness module to optimize the overall boundary. The hierarchical design adapts to the requirement of "equal emphasis on details and global aspects" in complex terraced fields and avoids the defects of single-scale features that "either blur details or lose semantics".
[0104] Step b2: After obtaining feature representations at different scales extracted by the encoder, the extracted high-level feature S4 is input into the bilinear attention module to capture global contextual information. Simultaneously, S4 is input into the boundary awareness enhancement module to further acquire boundary information. Additionally, the extracted features S1, S2, and S3 serve as inputs to the corresponding stage feature refinement and aggregation modules in the decoder. S4 is the highest-order feature output by the encoder, but its original features may suffer from "global correlation ambiguity" and "loss of boundary details." Therefore, step b2 performs dual processing on S4. S1, S2, and S3 are low- to mid-order features output by the encoder. By allocating these low- to mid-order features in stages, detailed information is supplemented. This design precisely adapts to the structural characteristics of multi-level, complex boundaries, and numerous details in complex terraced fields, providing comprehensive and targeted feature support for subsequent feature fusion and segmentation.
[0105] Step c: Utilize the bilinear attention module to further capture global contextual information, and simultaneously utilize the boundary awareness enhancement module to further refine the target contour. This step is the core of the feature enhancement stage. Through the collaborative work of the bilinear attention module (DLAM) and the boundary awareness enhancement module (BAE), the high-level feature S4 output by the encoder is optimized from two dimensions: "global semantic association" and "local boundary details," providing the subsequent decoder with enhanced features that are "accurately located globally and have clear boundary contours."
[0106] The specific structure of the bilinear attention module is as follows: Figure 3 As shown, the specific process is as follows:
[0107] Step c1: First, adjust the channel dimension of the input feature S4 using a 1×1 convolution. Then, use a two-branch asymmetric convolution and dilated convolution. In the first branch, the convolution passes through a 1×3 convolutional layer, a 3×1 convolutional layer, and a 3×3 dilated convolutional layer with a dilation rate of 3. The other branch is obtained by sequentially passing through a 1×5 convolutional layer, a 5×1 convolutional layer, and a 3×3 dilated convolutional layer with a dilation rate of 3. By concatenating the results of the two branches, we obtain... The above process can be represented by the following formula:
[0108]
[0109]
[0110]
[0111] in, ∈R h×w×cThe input is R, where R is the set of real numbers, h is the feature map height, w is the width, and c is the number of channels. ∈R h×w×(c / 2) This represents the output of the first branch. ∈R h×w×(c / 2) This indicates the output of the other branch. This represents a 1×1 convolutional layer. This represents a 3×3 dilated convolutional layer with a porosity of 3. It is a composite function, consisting of a 1×3 convolutional layer and a 3×1 convolutional layer. It is a composite function that passes through a 1×5 convolutional layer and a 5×1 convolutional layer in sequence. ∈R h×w×c It is the result of concatenating the outputs of the two branches. (·) represents splicing along the channel dimension;
[0112] This step reinforces the high-level features. The ability to express the key structures (ridges and boundaries) of complex terraced fields enables subsequent attention mechanisms to more accurately focus on effective planting areas, which is a prerequisite for the DLAM module to achieve "global context capture".
[0113] Step c2: Calculate the multi-scale features obtained in step c1. The input is fed into both the Spatial Linear Attention (SLA) and Channel Linear Attention (CLA) mechanisms for attention enhancement. The results are then summed element-wise, followed by a 3×3 convolution operation, which is then added to the original input. Finally, the input is activated by a ReLU function to obtain the output features. The process can be represented as follows:
[0114]
[0115] in, ∈R h×w×c This represents the output characteristics of DLAM. ∈R h×w×c and ∈R h×w×c These represent the output characteristics of SLA and CLA, respectively. It is a 3×3 convolution. Represents the ReLU activation function. This indicates element-level addition.
[0116] This step utilizes the synergistic effect of Spatial Linear Attention (SLA) and Channel Linear Attention (CLA) to fuse multi-scale features. By performing a two-dimensional weighted optimization of "space and channel", an enhanced feature with both global relevance and local discriminativeness is ultimately generated. .
[0117] The specific structure of the boundary awareness enhancement module proposed in step c is as follows: Figure 4 As shown, the specific process is as follows:
[0118] Step c3: Considering that low-level feature S1 may contain a lot of redundant information and has a small receptive field, this module integrates low-level feature S2 and high-level feature S4 as input, and uses the low-level feature... Input a 1×1 convolutional layer to change the dimensions and obtain features At the same time, for high-level characteristics Perform a 1×1 convolution operation to adjust the channels and then upsample the data. The result is shown below. Then, for the obtained features and characteristics The concatenation operation is performed along the channel dimension, followed by convolution and a sigmoid activation function to guide the fusion of high- and low-level features, enhance the dependence between channels, and adaptively learn important feature information between channels to obtain boundary features. The calculation process is shown in the following formula:
[0119]
[0120] in This indicates that the data passes through two consecutive 3×3 convolutional layers and one 1×1 convolutional layer. It is the Sigmoid activation function. This indicates an upsampling operation with a sampling coefficient of 4;
[0121] Step c4: Take the result obtained in step c3 Calculate the binary cross-entropy loss with the boundary labels to achieve boundary supervision, while simultaneously... and Element-wise multiplication, followed by pixel-level addition with the residual branch, yields the result. The above process can be represented as:
[0122]
[0123] in, This represents pixel-level multiplication. This represents pixel-level addition. Indicates downsampling;
[0124] Step d: In the decoder, the feature refinement and aggregation module fully fuses inter-layer information at different scales, and then passes it through a segmentation head to obtain the segmentation result. The specific structure of this module is as follows:Figure 5 As shown, the specific process is as follows:
[0125] Step d1: In the decoder, the input to stage IV is the result from the DLAM module. and results from the BAE module The inputs for the other three stages are the output of the previous FRA module (feature refinement aggregation module) after bilinear interpolation and the output from the corresponding stage of the encoder. The two inputs are concatenated and then passed through a 1×1 convolutional layer to obtain... The specific calculation process can be expressed as follows:
[0126]
[0127]
[0128] in, These are the four stages of the Swing Transformer's output; the four outputs of the feature refinement and aggregation module are available. Define it. and These represent the output characteristics of DLAM and BAE, respectively. Representative to Perform double the bilinear interpolation;
[0129] Step d2: To comprehensively obtain channel dependency information, three different pooling strategies are used, including adaptive average pooling, max pooling, and soft pooling, to process the information obtained in step d1. After passing through the three pooling layers mentioned above, the results from the three branches are fed into a fully connected layer with shared parameters. Then, the results from the first branch and the second branch are added element-wise to obtain the final result. Then The result is multiplied at the pixel level with the result of the third branch, then passed through a fully connected layer, and finally activated by the Sigmoid function to obtain the features. The above process can be represented by the following equation:
[0130]
[0131]
[0132] in, , , These represent adaptive average pooling layer, max pooling layer, and soft pooling layer, respectively. and These represent fully connected layers with a reduced number of layers and fully connected layers with an increased number of layers, respectively.
[0133] Step d3: Apply the features obtained in step d2 Divide into two branches, one branch first with (or ) Multiply each element by the row and then multiply by the row. (or ) Perform element-by-element addition, and the other branch first adds to... (or Perform element-wise multiplication and then multiply. (or ) Perform element-wise addition, and finally add the results of the two branches element-wise to obtain the output feature containing rich information about the feature. The above process can be represented as follows:
[0134]
[0135]
[0136] This formula employs a dual mechanism of "weighted enhancement for extracting key information + residual preservation to ensure information integrity" to deeply integrate the encoder's detailed features with the decoder's semantic features, ultimately generating high-quality features adapted to the complex structure of terraced fields, laying the foundation for accurate segmentation of effective planting areas.
[0137] Step e: The result obtained from the decoder is fed into a segmentation head to obtain the segmentation result. Based on the segmentation result, the effective planting area of the terraced fields is calculated. The specific process is as follows:
[0138] Step e1: The final output features obtained from the decoder... The data is input into a segmentation head to obtain the final segmentation result.
[0139] Step e2: Based on the segmentation results obtained in step e1, calculate the effective planting area of the complex terraced fields. The specific calculation process is as follows:
[0140]
[0141]
[0142]
[0143] in, The estimated value representing the effective planting area of the terraced fields. The pixels representing the effective planting area in the result of the complex terraced field segmentation. Represents the estimated actual area of the sampled image. This represents the actual size of the ground corresponding to a single pixel in the width direction. This represents the actual size of the ground corresponding to a single pixel in the height direction. Represents the actual width of the image. Represents the actual height of the image. Represents the width of the sensor. Represents the height of the sensor. Represents the vertical height from the center of the shooting area. This represents the camera's focal length.
[0144] As demonstrated by the examples above, traditional methods for estimating the effective planting area of terraced fields generally suffer from low calculation efficiency, insufficient accuracy, and poor adaptability to complex terrain environments. To address these challenges, this invention innovatively proposes using a drone equipped with a high-resolution camera for real-time image acquisition, combined with a deep learning network model for efficient data processing and analysis. This method provides agricultural producers and managers with a fast and accurate solution, significantly improving the level of intelligence and automation in specific agricultural production areas. Based on the powerful learning capabilities of deep learning models, this invention can dynamically optimize model parameters according to continuously updated data, thereby adapting to different geographical conditions and diverse terraced field structures, providing agricultural personnel with scientific and reliable decision support and management strategies. Furthermore, this method possesses good scalability; through appropriate model adjustments and training, it can be easily extended to other types of planting environments, such as orchards, tea gardens, and ordinary farmland, achieving accurate identification and area prediction of planting areas. In addition, this method can be further integrated with a crop yield prediction module, combining climate data, soil information, and crop growth characteristics to construct an integrated agricultural intelligent decision-making system. This modular design not only enhances the practicality of the method but also provides strong technical support for the development of precision agriculture. Its broad application prospects and practical value will drive agricultural production towards intelligence and automation, injecting new vitality into sustainable agricultural development.
[0145] The foregoing description illustrates and describes several preferred embodiments of the present invention. However, as previously stated, it should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept described herein through the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A method for estimating the effective planting area of complex terraced fields based on UAV remote sensing, characterized in that, Includes the following steps: Step a: Collect remote sensing images of the terraced fields using drones, and preprocess the images, including geometric transformation, Gaussian filtering for noise reduction, and image enhancement. Step b: In the encoder, the Swin Transformer structure is used to perform multi-scale preliminary feature extraction on the preprocessed image, generating four stages of hierarchical features, denoted as S1, S2, S3, and S4 from low to high. Step c: Use the bilinear attention module to capture global contextual information for high-level feature S4, and at the same time use the boundary awareness enhancement module to refine the target contour by combining low-level feature S2 and high-level feature S4. Step d: In the decoder, the feature refinement and aggregation module is used to fuse inter-layer information at different scales to generate fused features; Step e: Input the decoder output features from step d into the segmentation head to obtain the segmentation result, and calculate the effective planting area of the terraced fields based on the segmentation result.
2. The method for estimating the effective planting area of complex terraced fields based on UAV remote sensing according to claim 1, characterized in that, Step a specifically includes: Step a1: Use a drone to collect images at the center of the terraced field area, and perform geometric transformations on the collected images. The geometric transformations include rotation, translation, and scaling. The rotation operation adjusts the image angle, and the formula is as follows: The translation operation involves shifting the rotated image to adjust the terraces to the center region of the image. The formula is as follows: The scaling operation involves scaling the translated image to increase the proportion of the terraced fields. The formula is as follows: in It is the original image. These are the coordinates in the image. It is the rotation angle. This is the horizontal translation amount. The vertical translation is k, and the scaling factor is k. Step a2: Apply Gaussian filtering to the geometrically transformed image to remove noise. The formula for Gaussian filtering is as follows: in These are the pixel values in the original image. It is relative to the center The offset, The Gaussian kernel function is specifically defined as follows: in It is the standard deviation of the Gaussian kernel, used to control the degree of smoothing; Step a3: Perform image enhancement on the denoised terraced field image. First, adjust the image brightness using the following formula: in This represents the increase in brightness. Next, adjust the contrast to improve the segmentation effect, using the following formula: in It is the scaling factor.
3. The method for estimating the effective planting area of complex terraced fields based on UAV remote sensing according to claim 1, characterized in that, Step b specifically involves: Step b1: Use the Swin Transformer as an encoder to extract depth features and model the internal correlation of the preprocessed terraced field image, and generate Swin Transformer hierarchical features in four stages from low to high, denoted as S1, S2, S3, and S4. Step b2: After obtaining the feature representations at different scales extracted by the encoder, the extracted high-level feature S4 is input into the bilinear attention module to capture global context information. At the same time, S4 is input into the boundary awareness enhancement module to further obtain boundary information. In addition, the extracted features S1, S2, and S3 will be used as inputs to the corresponding stage feature refinement and aggregation modules in the decoder.
4. The method for estimating the effective planting area of complex terraced fields based on UAV remote sensing according to claim 1, characterized in that, The workflow of the bilinear attention module (DLAM module) in step c is as follows: Step c1: Adjust the channel dimension of the input feature S4 using a 1×1 convolution. Then, use a two-branch asymmetric convolution and dilated convolution. The first branch passes through a 1×3 convolutional layer, a 3×1 convolutional layer, and a 3×3 dilated convolutional layer with a dilation rate of 3. The other branch passes through a 1×5 convolutional layer, a 5×1 convolutional layer, and a 3×3 dilated convolutional layer with a dilation rate of 3. The results of the two branches are concatenated. The above process can be expressed by the following formula: in ∈R h×w×c Here, R is the input feature, h is the feature map height, w is the width, and c is the number of channels. ∈R h×w×(c / 2) This represents the output of the first branch. ∈R h×w×(c / 2) This indicates the output of the other branch. This represents a 1×1 convolutional layer. This represents a 3×3 dilated convolutional layer with a porosity of 3. This indicates that the data passes through a 1×3 convolutional layer and a 3×1 convolutional layer in sequence. This indicates that the input passes through a 1×5 convolutional layer and then a 5×1 convolutional layer in sequence. ∈R h×w×c It is the result of concatenating the outputs of the two branches. (·) represents splicing along the channel dimension; Step c2: Combine the spliced features After being fed into the Spatial Linear Attention (SLA) and Channel Linear Attention (CLA) mechanisms for attention enhancement, the inputs are added element-wise. This is followed by a 3×3 convolutional layer, then element-wise addition with the residual branch, and finally activation via a ReLU function to obtain the final output DLA. The calculation process can be represented as follows: in, ∈R h×w×c This represents the output characteristics of DLAM. ∈R h×w×c and ∈R h×w×c These represent the output characteristics of SLA and CLA, respectively. It is a 3×3 convolution. Represents the ReLU activation function. This indicates element-level addition.
5. A method for estimating the effective planting area of complex terraced fields based on UAV remote sensing, as described in claim 4, is characterized in that... The specific workflow of the boundary awareness enhancement module (BAE module) in step c is as follows: Step c3: Transfer low-level features Features are obtained by inputting convolutional layers At the same time, for high-level characteristics Channel adjustment and upsampling are performed, as shown below. Next, the features and characteristics Concatenation operations are performed along the channel dimension, followed by convolution and activation to obtain boundary features. The above process is shown in the following formula: in This indicates that the data passes through two consecutive 3×3 convolutional layers and one 1×1 convolutional layer. It is the Sigmoid activation function. This indicates an upsampling operation with a sampling coefficient of 4; Step c4: Use Calculate the binary cross-entropy loss to achieve boundary supervision, and... and Element-wise multiplication, followed by pixel-level addition with the residual branch, yields the result. The calculation process is as follows: in, This represents element-level multiplication. This indicates downsampling.
6. The method for estimating the effective planting area of complex terraced fields based on UAV remote sensing according to claim 5, characterized in that, Step d specifically involves: Step d1: In the decoder, the input in the fourth stage is the result from the DLAM module. and results from the BAE module The inputs for the other three stages are the output of the previous layer's feature refinement and aggregation module after bilinear interpolation and the output from the corresponding stage of the encoder. The two inputs are concatenated and then passed through a 1×1 convolutional layer to obtain intermediate features with high and low information. The above process can be expressed by the following formula: in These are the four stages of the Swing Transformer's output; the four outputs of the feature refinement and aggregation module are available. Define, that is ; and These represent the output characteristics of the DLAM module and the BAE module, respectively. Representative to Perform double the bilinear interpolation; Step d2: To comprehensively obtain channel dependency information, three different pooling strategies are used. Adaptive average pooling and max pooling layers are employed to calculate important features of the channel dimension, and these features are sent to a shared fully connected layer. The two layers are then summed to obtain the final value. Simultaneously, a soft pooling layer is introduced to calculate the global weights, which are then placed into a fully connected layer and then combined with... Element-level multiplication yields This process can be represented as: in, , , These represent adaptive average pooling layer, max pooling layer, and soft pooling layer, respectively. and These represent fully connected layers with a reduced number of layers and fully connected layers with an increased number of layers, respectively. Step d3: Apply the results obtained in step d2 Divided into two branches, one branch successively with ( )and ( Perform pixel-level addition and multiplication; another branch successively connects with... ( )and ( Pixel-level multiplication and addition are performed to optimize the feature representation, and finally the features are stacked to generate output features containing rich information about the features. The above process can be represented as: 。 7. The method for estimating the effective planting area of complex terraced fields based on UAV remote sensing according to claim 6, characterized in that, Step e specifically involves: Step e1: The final output features obtained from the decoder... The data is input into a segmentation head to obtain the final segmentation result; Step e2: Based on the segmentation results obtained in step e1, calculate the effective planting area of the complex terraced fields. The specific calculation process is as follows: in, The estimated value representing the effective planting area of the terraced fields. The pixels representing the effective planting area in the result of the complex terraced field segmentation. Represents the estimated actual area of the sampled image. This represents the actual size of the ground corresponding to a single pixel in the width direction. This represents the actual size of the ground corresponding to a single pixel in the height direction. Represents the actual width of the image. Represents the actual height of the image. Represents the width of the sensor. Represents the height of the sensor. Represents the vertical height from the center of the shooting area. This represents the camera's focal length.