Farmland protection forest fine identification method, device, medium and system
By constructing a prototype network model and integrating a convolutional attention module, combining data augmentation and transfer learning technology, the problem of inefficient inspection of farmland shelter forests is solved, and high-precision and high-speed identification of farmland shelter forests is achieved.
Patent Information
- Application Number
- CN202411478702.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, artificial survey of farmland shelter forests consumes huge manpower, material resources and financial resources, and the extraction efficiency is inefficient on a large scale.
By acquiring the prototype network model, using data augmentation algorithm to process the original samples, integrating the convolutional attention module, and using fine-tuning transfer learning methods to build a farmland shelter forest recognition model to achieve fine recognition of remote sensing image data.
Accurate identification of farmland shelter forests based on remote sensing image data is realized, and the recognition accuracy and efficiency are improved, which is conducive to agricultural development to provide data support.
Smart Images

Figure CN119559522A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, medium and system for fine identification of farmland shelterbelts. Background Art
[0002] With the rapid development of science and technology in recent years, the development of science and technology agriculture and smart agriculture has received more and more attention. In the process of agricultural production, farmland shelterbelts in farmland play a vital role. Farmland shelterbelts are forests composed of strips or nets of trees created in farmland or along the edge of farmland. They are an artificial forest ecosystem that can provide multiple benefits. Farmland shelterbelts improve the microclimate environment of farmland through the influence of forest belts on environmental factors such as air flow, temperature, moisture, and soil, reduce the adverse effects of natural disasters on farmland, and create an environment conducive to the growth and development of crops to ensure stable and high yields of crops. The distribution form, area and structure of farmland shelterbelts have different effects and functions on farmland, which are the main factors affecting crop yields. Therefore, quickly and accurately obtaining farmland shelterbelts with different distribution forms is a prerequisite for exploring and analyzing the laws of their influence on crop yields, which is of great significance for evaluating the protective effect of farmland shelterbelts and increasing grain yields.
[0003] At present, field survey is the most accurate method to extract farmland shelterbelts, but it consumes huge manpower, material and financial resources, especially when extracting farmland shelterbelts over a large area. Therefore, how to use resources to conduct large-scale and high-precision detection of widely distributed farmland shelterbelts has become an important issue. Summary of the invention
[0004] The embodiment of the present application provides a method, device, medium and system for fine identification of farmland shelterbelts. This solution can solve the problems of high labor cost, high consumption and low efficiency caused by manual survey of farmland shelterbelts in the prior art. The present invention obtains a prototype network model; uses a data enhancement algorithm to enhance the original sample to obtain a training sample; integrates a convolutional attention module into the prototype network model, and uses the training sample for training to obtain a farmland shelterbelt identification model; uses a fine-tuning transfer learning method to migrate the farmland shelterbelt identification model to the target domain to obtain a fine identification model for farmland shelterbelt identification in the target domain; inputs the remote sensing image data of the target domain into the fine identification model, so as to finely identify the farmland shelterbelt according to the output result of the fine identification model. By adopting this solution, it is possible to realize accurate identification of farmland shelterbelts based on remote sensing image data, improve the identification accuracy, and significantly improve the identification efficiency of farmland shelterbelts, which is conducive to providing favorable data support for agricultural development.
[0005] The present application provides a method for finely identifying farmland shelterbelts, the method comprising: Obtain a prototype network model; The data enhancement algorithm is used to enhance the original samples to obtain training samples; Integrating the convolutional attention module into the prototype network model, and using the training samples for training to obtain a farmland shelterbelt recognition model; The farmland shelterbelt identification model is transferred to the target domain by using a fine-tuning transfer learning method to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The remote sensing image data of the target domain is input into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0006] The present application provides a device for finely identifying farmland shelterbelts, the device comprising: A prototype network model acquisition module is used to acquire a prototype network model; The data enhancement module is used to enhance the original samples using the data enhancement algorithm to obtain training samples; A model training module, used to integrate the convolutional attention module into the prototype network model, and use the training samples for training to obtain a farmland shelterbelt recognition model; A migration module, used to migrate the farmland shelterbelt identification model to a target domain by using a fine-tuning migration learning method, so as to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The fine recognition module is used to input the remote sensing image data of the target domain into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0007] The embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the fine identification method of farmland shelterbelts as described in the embodiment of the present application.
[0008] The embodiment of the present application also provides a fine identification system for farmland shelterbelts, and the fine identification system for farmland shelterbelts is used to execute the fine identification method for farmland shelterbelts as described in the embodiment of the present application.
[0009] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a fine identification method for farmland shelterbelts as provided in the embodiment of the present application is implemented.
[0010] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: The technical solution provided by the present application can be based on the constructed improved prototype network model, and only a small number of samples are needed to complete the model training. It is not necessary to collect a large amount of sample data, and the farmland shelterbelt extraction effect is good, realizing end-to-end farmland shelterbelt fine extraction; by adding data enhancement methods, the richness of sample data is increased, the overfitting problem is reduced, and the stability and generalization ability of the model are improved; after transfer learning analysis, the proposed method performs well when migrated to the target domain, and the fine extraction of farmland shelterbelts in the target domain can be achieved after fine-tuning with only a very small number of samples, and has the production potential for large-scale farmland shelterbelt fine identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a flow chart of a fine identification method of farmland shelterbelt provided in Example 1 of the present application; Figure 2 It is a schematic diagram of the fine extraction process of farmland shelterbelt provided in Example 1 of the present application; Figure 3 is the distribution map of the study area provided in Example 1 of the present application; Figure 4 This is a schematic diagram of the structure of a fine identification device for farmland shelterbelts provided in Example 2 of the present application; Figure 5 It is a structural schematic diagram of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0013] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0014] Embodiment 1 Figure 1It is a flow chart of the fine identification method of farmland shelterbelt provided in Example 1 of the present application. This embodiment is applicable to the situation of farmland shelterbelt identification. The method can be executed by the fine identification device of farmland shelterbelt provided in the embodiment of the present application. The device can be implemented by software and / or hardware, and can be integrated into the electronic device used for fine identification of farmland shelterbelt.
[0015] like Figure 1 As shown, the method includes: S110, obtaining a prototype network model; Prototypical Networks is a few-shot learning method. In the prototypical network model, each category has a prototype representation. This prototype is the mean vector calculated by feature extraction of the support set samples in the category. When classifying, for a sample in the query set, the distance between it and the prototype of each category is calculated, usually using Euclidean distance or cosine distance. Then the sample is classified into the category corresponding to the prototype that is closest to it.
[0016] The prototype network model can quickly learn new categories in few-sample learning tasks and only requires a small number of support set samples for effective classification. It is applicable to a variety of different tasks and fields, such as image classification, text classification, etc. The principle of the model is relatively simple and easy to understand and implement.
[0017] The training process of the prototype network model includes: Data preparation, divide the dataset into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the model parameters, and the test set is used to evaluate the model performance. In few-shot learning, each task usually contains a support set and a query set.
[0018] Feature extraction: Use a pre-trained feature extractor (such as a convolutional neural network) to extract features from samples in the support set and query set to obtain feature vectors.
[0019] Calculate the prototype. For each category, calculate the category prototype based on the sample feature vector of the category in the support set.
[0020] Classification prediction: For each sample in the query set, calculate its distance from each category prototype and classify it into the category corresponding to the prototype with the closest distance.
[0021] Model evaluation uses the test set to evaluate the performance of the model, usually using indicators such as accuracy and recall.
[0022] S120, using a data enhancement algorithm to enhance the original sample to obtain a training sample; Image data enhancement includes: flipping, including horizontal flipping, vertical flipping and random flipping, which can increase the diversity of samples. Rotation, rotating the image at a certain angle, such as 90 degrees, 180 degrees, etc. Scaling, zooming in or out of the image, which can change the size of the image. Cropping, randomly cropping part of the image, can increase the diversity of samples. Brightness adjustment, changing the brightness of the image to make it brighter or dimmer. Contrast adjustment, increasing or decreasing the contrast of the image. Noise addition, adding random noise to the image, such as Gaussian noise, salt and pepper noise, etc.
[0023] For image data, you can use image processing libraries (such as OpenCV, PIL, etc.) to implement various data augmentation methods. For example, using OpenCV, you can easily implement operations such as flipping, rotating, and scaling images.
[0024] After the original samples are processed by data enhancement, the new samples obtained together with the original samples form a training sample set. This can increase the number and diversity of training samples and improve the training effect of the model.
[0025] In one embodiment, the original samples are enhanced using a data enhancement algorithm to obtain training samples, including: The original samples are enhanced using the MixUp algorithm and / or the CutMix algorithm to obtain training samples.
[0026] In this scheme, the data augmentation algorithm can use the mixup and improved cutmix methods. The order of mixup and improved cutmix is random, and all data augmentation methods are only applicable to the query set but not to the support set.
[0027] Models trained with small sample learning are particularly prone to overfitting. Solving the overfitting problem to improve the generalization potential of the model is a central theme of small sample models. Data augmentation directly uses the important invariance of the data to improve model performance. Commonly used data augmentation methods include SamplePairing, CutOut, RandomErasing, GridMask, MixUp, and CutMix. To analyze the distribution characteristics of farmland shelterbelts, this scheme uses MixUp and improved CutMix methods to perform data augmentation. The purpose is to enrich the farmland scenes around the forest network targets, improve the representativeness and richness of the sample data of the strip forest network and the sheet forest network, and obtain a model with good generalization performance.
[0028] Mixup is a data-independent and simple data augmentation method that randomly selects two training sample vectors and their corresponding labels, and uses linear interpolation to generate a new vector and corresponding label 1 as augmented data, that is, constructs a virtual sample. The specific formula is as follows: ,where , are raw input vectors; ,where , are one-hot label encodings; Among them, (x i ,y i ) and (x j ,y j ) are two samples randomly drawn from the training data, and λ∈[0,1].
[0029] MixUp can be used between samples of the same category or between samples of different categories. In this scheme, MixUp is only used between samples of the same category to ensure that the generated new samples retain the original labels. In addition, the value of λ is set to 0.5.
[0030] The CutMix method directly mixes two samples at the pixel level of the image, randomly selects two pictures and randomly cuts a rectangular area from each picture, exchanges the two cut areas to synthesize a new image, and the new image label is calculated by weighted average of the area of the cut areas of the two original image labels. CutMix randomly cuts rectangular areas for exchange synthesis, but the samples in this scheme are marked at the center point, so this scheme adopts the improved CutMix method. This method retains the center pixel and sets the cropped rectangular area with it as the center.
[0031] This scheme is set up in this way to increase the richness of samples and help improve the stability and generalization ability of the model. This scheme sets the size of the rectangular area to (z-2)×(z-2), where z is the size of the sample window.
[0032] S130, integrating the convolutional attention module into the prototype network model, and using the training samples for training to obtain a farmland shelterbelt recognition model; Among them, the convolutional block attention module (CBAM) can be applied to any convolutional neural network. CBAM can simultaneously focus on the channel and spatial dimensions of the deep feature map, and achieve adaptive feature refinement by multiplying the input features with the attention map inferred in two dimensions in turn. CBAM can be seamlessly integrated into other convolutional neural networks to achieve efficient feature extraction and end-to-end model training, and due to its lightweight characteristics, the model inference overhead brought by module integration is negligible. CBAM divides the attention process into two independent parts, the order is the channel attention submodule first and the spatial attention submodule later.
[0033] In this embodiment, optionally, after obtaining the prototype network model, a convolutional attention module consisting of a channel attention submodule and a spatial attention submodule is integrated into the prototype network model to obtain a prototype network model with channel dimension and spatial dimension.
[0034] Among them, CBAM consists of a channel attention sub-module (Channel Attention Module) and a spatial attention sub-module (Spatial Attention Module).
[0035] The channel attention submodule focuses on the importance between different channels of the input feature map. It first compresses the input feature map in the spatial dimension through global average pooling and global maximum pooling operations to obtain two different one-dimensional feature vectors. Then, these two feature vectors are respectively sent to a shared multi-layer perceptron (MLP) to obtain two output feature vectors. Finally, the two output feature vectors are added element by element, and the channel attention weight is obtained through a sigmoid function. The input feature map is multiplied element by element with the channel attention weight to obtain the feature map adjusted by the channel attention.
[0036] The spatial attention submodule focuses on the importance between different spatial positions of the input feature map. It first compresses the input feature map in the channel dimension by performing global average pooling and global maximum pooling operations in the channel dimension to obtain two different two-dimensional feature maps. Then, the two feature maps are concatenated and passed through a convolutional layer to obtain an output feature map. Finally, the output feature map is passed through a sigmoid function to obtain the spatial attention weight. The input feature map is element-wise multiplied with the spatial attention weight to obtain the feature map adjusted by the spatial attention.
[0037] This solution uses CBAM to first adjust the channel dimension of the input feature map through the channel attention module, so that the model pays more attention to important channel information. Then, the spatial dimension of the input feature map is adjusted through the spatial attention module, so that the model pays more attention to important spatial position information. In this way, the model's ability to represent the input feature map can be effectively improved, thereby improving the performance of the model.
[0038] In one embodiment, the farmland shelterbelt includes strip shelterbelts and sheet shelterbelts.
[0039] Among them, belt shelterbelts are long strips of shelterbelts. They are usually set up along the edge of farmland, roads, rivers and other linear features. They can effectively reduce wind speed, reduce direct wind impact on crops, prevent soil erosion, and protect the surface soil of farmland. They can regulate the microclimate of farmland, alleviate local temperature changes, and create a relatively stable environment for crop growth. The layout is flexible and can be reasonably planned according to the terrain and farmland distribution. They occupy a relatively small area and occupy less farmland, while providing protection for a larger area of farmland.
[0040] Sheet-shaped shelterbelts are a shelterbelt system distributed in large blocks. They are generally composed of multiple rows of trees forming dense forest blocks. They provide more comprehensive protection, have a stronger wind blocking effect, and can effectively reduce the impact of strong winds on surrounding farmland. They can form relatively independent ecological small areas, provide habitats for birds and other creatures, and are conducive to the balance of farmland ecosystems.
[0041] The protection effect is remarkable, but the construction cost is relatively high and it requires more land resources. It can form an organic whole with the surrounding farmland and jointly build a good ecological environment.
[0042] In one embodiment, after integrating the convolutional attention module into the prototype network model and using the training samples for training to obtain a farmland shelterbelt recognition model, the method further includes: The output result of the farmland shelterbelt identification model is evaluated for accuracy using at least one evaluation algorithm selected from the group consisting of overall accuracy, Kappa coefficient, producer accuracy and average accuracy.
[0043] Among them, in order to evaluate the accuracy of the model in extracting strip forest networks and sheet forest networks, indicators such as OA, Kappa coefficient[Kappa], producer accuracy [PA], and average accuracy[AA] are used as evaluation indicators.
[0044]
[0045]
[0046]
[0047]
[0048] Where M and n represent the total number of samples and categories in the dataset, respectively. For the i-th class of objects, N+i, Nii, and Ni+ represent the number of reference samples, TP samples, and total classification samples (including TP and FP samples), respectively.
[0049] Through precision evaluation, this scheme can ensure the accuracy of the obtained farmland shelterbelt identification network model and improve the recognition accuracy of the model so that it can meet the use requirements in subsequent use.
[0050] S140, using a fine-tuning transfer learning method to migrate the farmland shelterbelt identification model to a target domain, thereby obtaining a fine recognition model for identifying the farmland shelterbelt in the target domain; There are two ways to train a model: learning from scratch and transfer learning. Transfer learning is to transfer the parameters of a trained model to a new model to help train the new model. Its advantage is that you don't need to design and train a new network from scratch. Instead, you can transfer parameters and knowledge based on the trained network model. Only a small amount of computing resources and training time are required to support new tasks. Methods for implementing transfer learning include Transfer learning, Extract Feature Vector and Fine-tuning.
[0051] In this solution, the farmland shelterbelt recognition model is transferred to the target domain by a fine-tuning transfer learning method, so as to obtain a fine recognition model for farmland shelterbelt recognition in the target domain, including: A fine-tuning transfer learning algorithm is used to migrate the farmland shelterbelt identification model from a source domain to one or more target domains, so as to identify and fine-tune the farmland shelterbelt in the target domains and obtain a fine recognition model.
[0052] This scheme adopts the fine-tuning transfer learning method to migrate the farmland shelterbelt fine identification model trained in Fujin City as the source domain to the other four target areas of Hailun, Yian, Youyi and Fuyu.
[0053] In this solution, optionally, the target domain is identified and fine-tuned for farmland shelterbelts to obtain a refined identification model, including: Construct a target domain sample set, wherein the sample set is divided into a training set and a validation set in a ratio of 1:2; Using the training set of the target domain to fine-tune the farmland shelterbelt recognition model, a refined recognition model is obtained; The precision of the fine recognition model is evaluated using the validation set of the target domain to obtain a distribution map of the farmland shelterbelt in the target domain.
[0054] In this solution, the specific implementation method of transfer learning is as follows: The target area sample set was constructed. Based on the optimal window size s obtained by training in the source domain Fujin City, the images of the four migration target areas were cropped according to the s×s window to construct the sample set. The sample set was divided into a training set and a validation set in a 1:2 ratio.
[0055] Model fine-tuning: Use the training set of the target area to fine-tune the optimal model obtained by training in the source domain.
[0056] Precision evaluation: The validation set of the target area is used to evaluate the precision of the fine-tuned model in the area, and the distribution map of the farmland shelterbelt in the target area is obtained.
[0057] Through transfer learning, this solution can achieve the purpose of efficient model training and model use, improve the pan-model performance, and ensure the accuracy of farmland shelterbelt identification.
[0058] S150, inputting the remote sensing image data of the target domain into the fine recognition model, so as to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0059] Remote sensing image data is image information of the earth's surface or atmosphere obtained through remote sensing technology. It mainly includes: satellite remote sensing, which uses various sensors carried by artificial satellites, such as optical sensors, radar sensors, etc., to observe the earth and obtain remote sensing image data of a large area. Different types of satellites can provide image data with different resolutions, spectral ranges and time frequencies. Aerial remote sensing, which uses aircraft and other aircraft equipped with sensors to conduct low-altitude flight observations to obtain high-resolution remote sensing image data. Aerial remote sensing is usually used for detailed investigation and monitoring of specific areas. UAV remote sensing, which uses unmanned aerial vehicles equipped with small sensors, can conduct flexible observations at low altitudes and obtain high-resolution remote sensing image data of local areas.
[0060] The result of the fine recognition model output can be to add the semantics of farmland shelterbelts to the remote sensing image data, and specifically, the semantic information of the patch farmland shelterbelts or the strip farmland shelterbelts can be added.
[0061] This scheme uses the improved prototype network to extract farmland shelterbelts in detail. It mainly includes two aspects: First, the improved prototype network is used to train the model of the source domain study area under different sample windows to analyze the optimal sample window size and optimal model for extracting strip forest networks and sheet forest networks. On this basis, the optimal model is transferred to the target domain through a fine-tuned transfer learning method to explore the migration ability of the constructed network model.
[0062] Figure 2 Schematic diagram of the fine extraction process of farmland shelterbelt provided in Example 1 of the present application, such as Figure 2 As shown, the specific method flow includes: Improved prototype network model construction: The network model constructed by this scheme consists of three parts: data enhancement, image encoder and loss function. Among them, the data enhancement part uses mixup and improved cutmix methods. The order of mixup and improved cutmix is random. All data enhancement methods are only applicable to the query set, not the support set. The image encoder part is composed of multiple convolution blocks. The number of convolution blocks (Layer 1...Layer N, Layer last) depends on the window size of the input data. Each convolution block consists of 2 3*3 window convolution layers (Conv2d), 2 batch normalization layers (Batch_norm), 2 nonlinear activation functions (Relu), 1 maximum pooling layer (Max_pool2d) and 1 CBAM module. The fully connected layer (Flatten) takes the output (1*1*F) of the last convolution block as input and converts it into F eigenvalues through the fully connected layer (Flatten). Calculate the Euclidean distance from the query set to each class prototype in the projection space, and use the Softmax activation function to calculate the probability of belonging to each category as the basis for classification. Taking a 5×5 input sample window as an example, the model network structure is shown in the following table:
[0063] The prototype network is a simple and efficient small sample classification method based on metrics, based on the idea of embedding, where 'points' represent clusters around a single prototype of each class. The prototype network simulates multiple single tasks by subsampling classes and data points, which can be considered as an N-way K-shot classification problem, where N represents the category and K represents the number of samples in each category. In the prototype network, the sample data is divided into a support set and a query set. The support set is used to update the parameters of the prototype, that is, to calculate the prototype; the query set is used to verify the quality of the algorithm and determine the best algorithm, that is, to optimize the prototype.
[0064] The basic principle is to map the data to a representation space by learning an encoder, and then use a non-parameter decoder for classification. Specifically, the encoder is used to extract information from each image in the support set, and the embedded vector representation of each image is learned. Then, the embedded vectors under each category of the support set are averaged to obtain the prototype representation of each category; the same encoder is used to encode the query set images to obtain the embedded vector representation of the image, and then the similarity between this embedded vector representation and the category prototype is calculated, which is the non-parameter decoding process; Softmax is used to activate the similarity into a probability distribution, and the category corresponding to the higher similarity is predicted as the category of the query set.
[0065] Among them, the data enhancement method, convolutional attention module and accuracy evaluation have been introduced before and will not be repeated here.
[0066] Transfer Learning: There are two ways to train a model: learning from scratch and transfer learning. As the name suggests, transfer learning is to transfer the parameters of a learned and trained model to a new model to help train the new model. Its advantage is that you don't need to design and train a new network from scratch. Instead, you can transfer parameters and knowledge based on the trained network model, which only requires a small amount of computing resources and training time to support new tasks. Methods for implementing transfer learning include Transfer learning, Extract Feature Vector and Fine-tuning.
[0067] Experiments and results: Overview of the study area: The study areas are Fujin, Youyi, Yian, Hailun in Heilongjiang Province and Fuyu in Jilin Province. Figure 3 This is the distribution map of the research area provided in Example 1 of this application. Figure 3 As shown in the figure, the source domain research area for model training is Fujin, and the target domain research area for transfer learning is Youyi, Yian, Hailun and Fuyu. The complexity of farmland scenarios in different research areas is different, the farmland environment is highly differentiated, and the distribution of farmland shelterbelts has certain similarities, but each has its own characteristics.
[0068] Extraction results of source domain strip forest network and sheet forest network: The constructed prototype network is trained in the source domain to evaluate the effectiveness of the constructed prototype network for fine forest network extraction. The window size starts from 3×3 and increases in steps of 2 pixels until 30×30. The effects of different window samples on the extraction accuracy are compared to find the optimal window for extracting strip forest networks and sheet forest networks.
[0069] The results of using the improved prototype network for farmland shelterbelts are shown in the following table:
[0070] Regardless of the window size, the classification accuracy is good, with OA and kappa greater than 90% and 0.85, respectively. In the classification results, the classification accuracy of strip forest network, sheet forest network, etc. varies with the window size. Considering that the purpose of this scheme is to achieve fine classification of farmland shelterbelts, that is, to extract farmland shelterbelts of different forms, this scheme takes the accuracy of strip forest network and sheet forest network as the main criterion, while also taking into account the accuracy of other land types, so 5×5 is determined as the optimal sample window size for fine extraction of farmland shelterbelts. The model obtained under this sample window size is the optimal extraction model for strip forest network and sheet forest network.
[0071] The extraction results of the target domain transfer learning strip forest network and sheet forest network are as follows: Based on the analysis that the optimal sample window size is 5×5, sample data sets of four target areas were constructed respectively. On this basis, the optimal extraction model obtained by source domain training was used for fine-tuning transfer learning, and training was started directly from scratch. The results of the two methods for extracting farmland shelterbelts are shown in the following table:
[0072] The obtained model was fine-tuned in four target areas using a small number of samples to extract farmland shelterbelts. The overall classification accuracy was still high, and the extraction accuracy of the strip forest network and the sheet forest network was high. Except for the strip forest network in the Youyi study area, the accuracy of the strip forest network and the sheet forest network extracted by the transfer learning method was significantly higher than the accuracy of the target area learned from scratch, indicating that the transfer learning method can effectively identify the strip forest network and the sheet forest network through fine-tuning. More can be learned by fine-tuning the transfer learning method, which helps to improve the fine extraction of farmland shelterbelts.
[0073] This application proposes a method for fine extraction of farmland shelterbelts based on an improved prototype network model, which incorporates data enhancement and attention mechanism methods to increase the richness of sample data and improve the generalization ability of the model, and achieves fine extraction accuracy of strip forest networks and sheet forest networks. At the same time, this method has short training time and strong migration ability, which is helpful for the production of large-scale farmland shelterbelt fine products.
[0074] The technical advantage of the present application is that the constructed improved prototype network model is small sample learning, which only requires a small number (dozens) of samples to complete model training, and does not require the collection of a large amount of sample data. The farmland shelterbelt extraction effect is good, and end-to-end farmland shelterbelt fine extraction is achieved; by adding data enhancement methods, the richness of sample data is increased, the overfitting problem is reduced, and the stability and generalization ability of the model are improved; after transfer learning analysis, the proposed method performs well when migrated to the target domain, and the fine extraction of farmland shelterbelts in the target domain can be achieved after fine-tuning with only a very small number of samples, and it has the production potential for large-scale farmland shelterbelt fine products.
[0075] Embodiment 2 Figure 4 Schematic diagram of the structure of the fine identification device for farmland shelterbelt provided in Example 2 of the present application. Figure 4 As shown, the device comprises: A prototype network model acquisition module 410 is used to acquire a prototype network model; The data enhancement module 420 is used to enhance the original samples using a data enhancement algorithm to obtain training samples; A model training module 430 is used to integrate the convolutional attention module into the prototype network model, and use the training samples for training to obtain a farmland shelterbelt recognition model; A migration module 440 is used to migrate the farmland shelterbelt identification model to a target domain by using a fine-tuning migration learning method to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The fine recognition module 450 is used to input the remote sensing image data of the target domain into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0076] This device can execute the fine identification method of farmland shelterbelt provided by the above embodiments, and has corresponding functional units and beneficial effects, which will not be described in detail here.
[0077] Embodiment 3 The embodiment of the present application further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a fine identification method of farmland shelterbelts when executed by a computer processor, the method comprising: Obtain a prototype network model; The data enhancement algorithm is used to enhance the original samples to obtain training samples; Integrating the convolutional attention module into the prototype network model, and using the training samples for training to obtain a farmland shelterbelt recognition model; The farmland shelterbelt identification model is transferred to the target domain by using a fine-tuning transfer learning method to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The remote sensing image data of the target domain is input into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0078] Storage medium - any of various types of memory electronic devices or storage electronic devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system, which is connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0079] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the fine identification operations of farmland shelterbelts as described above, can also execute related operations in the fine identification method of farmland shelterbelts provided in any embodiment of the present application.
[0080] Embodiment 4 The embodiment of the present application further provides a fine identification system for farmland shelterbelts, wherein the fine identification system for farmland shelterbelts is used to execute a fine identification method for farmland shelterbelts, the method comprising: Obtain a prototype network model; The data enhancement algorithm is used to enhance the original samples to obtain training samples; Integrating the convolutional attention module into the prototype network model, and using the training samples for training to obtain a farmland shelterbelt recognition model; The farmland shelterbelt identification model is transferred to the target domain by using a fine-tuning transfer learning method to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The remote sensing image data of the target domain is input into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0081] The technical solution provided in this embodiment is to obtain a prototype network model; use a data enhancement algorithm to enhance the original samples to obtain training samples; integrate a convolutional attention module into the prototype network model, and use the training samples for training to obtain a farmland shelterbelt recognition model; use a fine-tuning transfer learning method to migrate the farmland shelterbelt recognition model to the target domain to obtain a fine recognition model for farmland shelterbelt recognition in the target domain; input the remote sensing image data of the target domain into the fine recognition model to perform fine recognition of the farmland shelterbelt based on the output results of the fine recognition model. By adopting this solution, it is possible to achieve accurate recognition of farmland shelterbelts based on remote sensing image data, which improves the recognition accuracy while significantly improving the recognition efficiency of farmland shelterbelts, which is conducive to providing favorable data support for agricultural development.
[0082] Embodiment 5 An embodiment of the present application provides an electronic device. Figure 5 Schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application. Figure 5 As shown, this embodiment provides an electronic device 500, which includes: one or more processors 520; a storage device 510, which is used to store one or more programs. When the one or more programs are run by the one or more processors 520, the one or more processors 520 implement the fine identification method of farmland shelterbelt provided in the embodiment of the present application, and the method includes: Obtain a prototype network model; The data enhancement algorithm is used to enhance the original samples to obtain training samples; Integrating the convolutional attention module into the prototype network model, and using the training samples for training to obtain a farmland shelterbelt recognition model; The farmland shelterbelt identification model is transferred to the target domain by using a fine-tuning transfer learning method to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The remote sensing image data of the target domain is input into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
[0083] Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0084] like Figure 5As shown, the electronic device 500 includes a processor 520, a storage device 510, an input device 530, and an output device 540; the number of the processor 520 in the electronic device can be one or more. Figure 5 A processor 520 is taken as an example; the processor 520, the storage device 510, the input device 530 and the output device 540 in the electronic device can be connected via a bus or other means. Figure 5 The connection via bus 550 is taken as an example.
[0085] The storage device 510, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and module units, such as program instructions corresponding to the fine identification method of farmland shelterbelts in the embodiment of the present application.
[0086] The storage device 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 510 may further include a memory remotely arranged relative to the processor 520, and these remote memories may be connected via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0087] The input device 530 may be used to receive input numbers, character information or voice information, and generate key signal input related to user settings and function control of the electronic device. The output device 540 may include electronic devices such as a display screen and a speaker.
[0088] The electronic device provided in this embodiment obtains the sales logic of the salesperson by receiving and recognizing the salesperson's rehearsal voice data or rehearsal text input data, and gives a reasonable sales logic score and sales logic suggestion information based on the sales product information, thereby improving the user's ability improvement speed. It can also be used for salesperson training, saving response labor costs, and the evaluation criteria are relatively objective, which can bring a better user experience.
[0089] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0090] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0091] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0093] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0094] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0095] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0096] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0097] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A fine identification method for farmland shelterbelts, characterized in that: The method comprises: Obtain a prototype network model; The data enhancement algorithm is used to enhance the original samples to obtain training samples; Integrating the convolutional attention module into the prototype network model, and using the training samples for training to obtain a farmland shelterbelt recognition model; The farmland shelterbelt identification model is transferred to the target domain by using a fine-tuning transfer learning method to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The remote sensing image data of the target domain is input into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
2. The method according to claim 1, characterized in that: The data enhancement algorithm is used to enhance the original samples to obtain training samples, including: The original samples are enhanced using the MixUp algorithm and / or the CutMix algorithm to obtain training samples.
3. The method according to claim 1, characterized in that Integrate the convolutional attention module into the prototype network model, including: After the prototype network model is obtained, a convolutional attention module consisting of a channel attention submodule and a spatial attention submodule is integrated into the prototype network model to obtain a prototype network model with channel dimension and spatial dimension.
4. The method according to claim 1, characterized in that: After the convolutional attention module is integrated into the prototype network model and the training sample is used for training to obtain a farmland shelterbelt recognition model, the method further includes: The output result of the farmland shelterbelt identification model is evaluated for accuracy using at least one evaluation algorithm selected from the group consisting of overall accuracy, Kappa coefficient, producer accuracy and average accuracy.
5. The method according to claim 1, characterized in that The farmland shelterbelt identification model is transferred to the target domain by using a fine-tuning transfer learning method, so as to obtain a fine recognition model for farmland shelterbelt identification in the target domain, including: A fine-tuning transfer learning algorithm is used to migrate the farmland shelterbelt identification model from a source domain to one or more target domains, so as to identify and fine-tune the farmland shelterbelt in the target domains and obtain a fine recognition model.
6. The method according to claim 5, characterized in that The target domain is identified and fine-tuned for farmland shelterbelts to obtain a refined identification model, including: Construct a target domain sample set, wherein the sample set is divided into a training set and a validation set in a ratio of 1:2; Using the training set of the target domain to fine-tune the farmland shelterbelt recognition model, a refined recognition model is obtained; The precision of the fine recognition model is evaluated using the validation set of the target domain to obtain a distribution map of the farmland shelterbelt in the target domain.
7. The method according to claim 1, characterized in that The farmland shelterbelts include belt shelterbelts and sheet shelterbelts.
8. A fine identification device for farmland shelterbelts, characterized in that: The device comprises: A prototype network model acquisition module is used to acquire a prototype network model; The data enhancement module is used to enhance the original samples using the data enhancement algorithm to obtain training samples; A model training module, used to integrate the convolutional attention module into the prototype network model, and use the training samples for training to obtain a farmland shelterbelt recognition model; A migration module, used to migrate the farmland shelterbelt identification model to a target domain by using a fine-tuning migration learning method, so as to obtain a fine recognition model for farmland shelterbelt identification in the target domain; The fine recognition module is used to input the remote sensing image data of the target domain into the fine recognition model to perform fine recognition of the farmland shelterbelt according to the output result of the fine recognition model.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the fine identification method of farmland shelterbelt as described in any one of claims 1-7 is implemented.
10. A fine identification system for farmland shelterbelts, characterized in that: The fine identification system for farmland shelterbelts is used to execute the fine identification method for farmland shelterbelts as described in any one of claims 1-7.
Citation Information
Cited By
Method for assessing the state of field protective forest belts for subsequent restoration
RU2846386C1