Crop planting type identification method based on Transform model
Through the Transformer model-based method, remote sensing images and time series changes are analyzed, and the plot and texture characteristics are combined, the problem of low recognition efficiency in the existing technology is solved, and more accurate and efficient crop planting type recognition is achieved.
Patent Information
- Application Number
- CN202411402156.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-10
AI Technical Summary
The existing crop planting type recognition methods rely on convolutional neural networks and cannot fully capture the complex patterns and long-distance spatial relationships of crops, resulting in low recognition efficiency.
Using a method based on the Transformer model, the planting type identification results are generated by acquiring and correcting remote sensing images, spectral characteristics and time series changes are analyzed, and plot characteristics and texture characteristics are combined.
It improves the accuracy and efficiency of crop planting type identification, can better understand the spatial distribution and growth patterns of crops, and promotes the sustainable development of agriculture.
Smart Images

Figure CN119295939A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of crop type recognition, and in particular to a crop crop type recognition method based on a Transformer model. Background Art
[0002] Crop planting type identification refers to the use of scientific and technical means to identify the type of crops planted in the target plot. With the continuous development of modern agriculture, the market's requirements for agricultural precision are becoming higher and higher. Crop planting type identification at the plot scale, as an effective means to achieve precision agricultural positioning, can better understand the spatial distribution and planting patterns of crops, thereby promoting the sustainable development of agriculture.
[0003] At present, crop planting type identification mainly adopts remote sensing image analysis method. This method uses integrated remote sensing images and GIS to extract and analyze the spectral characteristics of crops, and obtains crop type information at the plot level by associating crop feature identification results with crop geographic spatial location information. However, this method mainly relies on convolutional neural networks to focus on local characteristics of crops. Due to the limited receptive field range, it is impossible to fully capture the complex patterns and long-distance spatial relationships of crops, resulting in low efficiency in crop planting type identification. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a crop planting type recognition method based on the Transformer model, which can realize multimodal data fusion of planted crops and improve the efficiency of planted crop type recognition.
[0005] In a first aspect, the present invention provides a crop planting type identification method based on a Transformer model, comprising:
[0006] Acquire a remote sensing image of a crop-planting plot, perform correction processing on the remote sensing image to obtain a target remote sensing image, collect band factors of the target remote sensing image, calculate a vegetation index of the crop-planting plot based on the band factors, and analyze spectral characteristics of crops planted in the crop-planting plot, and construct a spectral label of the crops according to the spectral characteristics and the vegetation index;
[0007] Analyze the time series changes of the planted crops and identify the phenological characteristics of the planted crops under the time series changes, input the spectral label data into a preset Transformer model, and use the preset Transformer model to evaluate the time dependence of the planted crops in different growth cycles according to the phenological characteristics, and analyze the plot characteristics of the crop planting plots, and evaluate the growth pattern of the planted crops based on the time dependence and the plot characteristics;
[0008] Identifying a crop area in the target remote sensing image, extracting a shape descriptor of the crop in the crop area, evaluating key shape parameters of the shape descriptor, and analyzing texture characteristics of the planted crop based on the key shape parameters;
[0009] The growth pattern and the texture characteristics are combined to generate a planting type identification result of the planted crop.
[0010] In a possible implementation manner of the first aspect, analyzing spectral characteristics corresponding to the planted crops includes:
[0011] Collecting the reflectivity of the planted crops in a specific band and constructing a spectral curve corresponding to the reflectivity;
[0012] Identifying a spectral extreme point of the reflectivity on the spectral curve;
[0013] Calculating the spectral slope and spectral width of the spectral curve in the specific waveband;
[0014] The spectral characteristics corresponding to the planted crops are analyzed according to the spectral extreme points, the spectral slope and the spectral width.
[0015] In a possible implementation manner of the first aspect, constructing a spectral curve corresponding to the reflectivity includes:
[0016] Collecting spectral data corresponding to the reflectivity;
[0017] Formatting the spectral data to obtain formatted data;
[0018] Setting a wavelength sequence corresponding to the formatted data;
[0019] A spectral curve corresponding to the reflectivity is constructed according to the wavelength sequence.
[0020] In a possible implementation of the first aspect, analyzing the time series changes of the planted crops includes:
[0021] evaluating key phenological periods of the planted crops;
[0022] Measuring the plant height and canopy coverage of the planted crops during the key phenological period;
[0023] Analyzing the seasonal variation patterns of the plant height and the canopy coverage;
[0024] According to the seasonal variation rules, the time series variation of the planted crops is analyzed.
[0025] In a possible implementation of the first aspect, the evaluating the key phenological period of the planted crop includes:
[0026] Querying the growth habits corresponding to the planted crops;
[0027] Defining the phenological period standard of the planted crops according to the growth habit;
[0028] Analyzing the growth stage characteristics of the planted crops based on the phenological period standards;
[0029] Extracting key features of the planted crop under the growth stage characteristics;
[0030] Based on the key characteristics, the key phenological period of the planted crops is evaluated.
[0031] In a possible implementation manner of the first aspect, inputting the spectral label data into a preset Transformer model includes:
[0032] constructing an input sequence of the spectral label data;
[0033] Setting the high-dimensional vector form of the input sequence;
[0034] Set the position of the element in the input sequence;
[0035] Based on the element positions and the high-dimensional vector form, the spectral label data is input into a preset Transformer model.
[0036] In a possible implementation of the first aspect, the step of evaluating the time dependence of the planted crops in different growth cycles using the preset Transformer model according to the phenological characteristics includes:
[0037] Constructing a time series of the phenological characteristics in the Transformer model, and adding a position code to each time point in the time series;
[0038] Inputting the phenological features and the position encoding into the self-attention layer of the Transformer model;
[0039] Based on the self-attention layer, calculating the feature weight of the phenological feature in the sequence at each time point;
[0040] The comprehensive factors affecting the change of the feature weight in the time series are analyzed, and the analysis results of the comprehensive factors are output to obtain the evaluation results of the time dependence of the planted crops in different growth cycles.
[0041] In a possible implementation manner of the first aspect, identifying the crop area in the target remote sensing image includes:
[0042] Performing feature extraction on the object in the target remote sensing image to obtain a feature extraction result;
[0043] Based on the feature extraction result, setting the distinction standard between the crop area and the non-crop area; performing image segmentation on the target remote sensing image according to the distinction standard to obtain a segmented image; performing cluster analysis on the segmented image to obtain a clustered image;
[0044] The crop area in the target remote sensing image is identified according to the cluster image.
[0045] In a possible implementation manner of the first aspect, evaluating the key shape parameters of the shape descriptor includes:
[0046] Performing edge detection on the planted crops under the shape descriptor to obtain edge detection results;
[0047] Extracting contour features of the planted crops based on the edge detection result;
[0048] Calculating the importance score corresponding to the contour feature;
[0049] Based on the importance score, key shape parameters of the shape descriptor are evaluated.
[0050] In a second aspect, the present invention provides a system for crop planting type identification based on a Transformer model, the system comprising:
[0051] A band acquisition module, used to acquire a remote sensing image of a crop-planting plot, perform correction processing on the remote sensing image to obtain a target remote sensing image, acquire a band factor of the target remote sensing image, calculate a vegetation index of the crop-planting plot based on the band factor, and analyze spectral characteristics of crops planted in the crop-planting plot, and construct a spectral label of the crop according to the spectral characteristics and the vegetation index;
[0052] A model evaluation module, for analyzing the time series changes of the planted crops and identifying the phenological characteristics of the planted crops under the time series changes, inputting the spectral label data into a preset Transformer model, so as to evaluate the time dependence of the planted crops in different growth cycles according to the phenological characteristics using the preset Transformer model, and analyzing the plot characteristics of the crop planting plots, and evaluating the growth pattern of the planted crops based on the time dependence and the plot characteristics;
[0053] A texture analysis module, for identifying a crop region in the target remote sensing image, extracting a shape descriptor of the crop in the crop region, evaluating key shape parameters of the shape descriptor, and analyzing texture characteristics of the planted crop based on the key shape parameters;
[0054] A planting type identification module is used to generate a planting type identification result of the planted crop by combining the growth pattern and the texture characteristics.
[0055] Compared with the prior art, the technical principle and beneficial effects of this solution are:
[0056] The embodiment of the present invention can clearly display the characteristics of crops by acquiring remote sensing images of crop planting plots, which is helpful to improve the accuracy of crop identification. Furthermore, the embodiment of the present invention can improve the image quality and reduce various interference factors, such as cloud cover, by correcting the remote sensing images to obtain target remote sensing images, so as to make subsequent crop planting type identification more accurate and reliable. The embodiment of the present invention can effectively analyze the spectral characteristics of crops by collecting band factors of the target remote sensing images, so as to distinguish different types of crops. Furthermore, the embodiment of the present invention can simplify complex multi-band spectral information into a single value by calculating the vegetation index of the crop planting plot based on the band factors, so as to simplify the spectral label information of different types of crops. The embodiment of the present invention can accurately identify and distinguish the types of crops by analyzing the spectral characteristics corresponding to the planted crops. Furthermore, the present invention The embodiment constructs the spectral label of the planted crop according to the spectral characteristics and the vegetation index, which can reflect the growth state of the crop, such as leaf area index, chlorophyll content, etc., which helps to distinguish the growth pattern of the crop. The embodiment of the present invention can help us understand the changing trend within the crop growth cycle and predict the future growth status by analyzing the time series changes of the planted crop. Furthermore, the embodiment of the present invention can be used to monitor the growth cycle of the crop and identify the growth pattern of the crop by identifying the phenological characteristics of the planted crop under the time series changes, thereby promoting the identification of the crop type. The embodiment of the present invention can help distinguish the planting type of the planted crop by evaluating the time dependence of the planted crop in different growth cycles using the preset Transformer model according to the phenological characteristics, which helps to understand the adaptability of the planted crop to seasonal changes and guide the planting type. Therefore, the crop planting type identification method based on the Transformer model proposed in the embodiment of the present invention can realize the multimodal data fusion of the planted crop and improve the efficiency of the type identification of the planted crop. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 A schematic diagram of a process flow of a crop planting type identification method based on a Transformer model provided in one embodiment of the present invention;
[0060] Figure 2 A module diagram of a crop planting type identification method based on a Transformer model provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0061] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0062] The embodiment of the present invention provides a method for identifying crop planting types based on a Transformer model, and the execution subject of the method for identifying crop planting types based on a Transformer model includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the method for identifying crop planting types based on a Transformer model can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms.
[0063] See also Figure 1 FIG. 1 is a flow chart of a crop planting type identification method based on a Transformer model provided by an embodiment of the present invention. Figure 1 The crop planting type recognition method based on the Transformer model described in includes:
[0064] S1. Acquire a remote sensing image of a crop-planting plot, perform correction processing on the remote sensing image to obtain a target remote sensing image, collect the band factor of the target remote sensing image, calculate the vegetation index of the crop-planting plot based on the band factor, and analyze the spectral characteristics of the crops planted in the crop-planting plot; and construct a spectral label of the crops according to the spectral characteristics and the vegetation index.
[0065] The embodiment of the present invention can clearly display the characteristics of crops by acquiring remote sensing images of crop planting plots, which helps to improve the accuracy of crop identification. The remote sensing images refer to surface reflection information of the crop planting area obtained by using satellites, drones and airplanes, such as band information images.
[0066] Furthermore, the embodiment of the present invention can improve image quality and reduce various interference factors, such as cloud occlusion, by correcting the remote sensing image to obtain a target remote sensing image, so as to make subsequent crop planting type identification more accurate and reliable. The target remote sensing image refers to an image that can be subsequently analyzed after image preprocessing operations, and the image preprocessing operations include radiation correction, atmospheric correction, geometric correction, image enhancement and noise removal, etc.
[0067] Optionally, the correction processing of the remote sensing image can be obtained through remote sensing image processing software, such as ENVI and GIS.
[0068] Furthermore, the embodiments of the present invention can effectively analyze the spectral characteristics of crops and distinguish different types of crops by collecting the band factors of the target remote sensing image. The band factors refer to the radiation energy factors corresponding to different wavelength ranges reflected or emitted by the ground objects. For example, vegetation usually has a higher reflectivity in the near-infrared band and a lower reflectivity in the red band. This difference can be used to distinguish crops from bare soil.
[0069] Optionally, the band factor collection of the target remote sensing image can be achieved by utilizing the Spatial Analysis extension module of ArcGIS.
[0070] Furthermore, the embodiment of the present invention can simplify complex multi-band spectral information into a single value by calculating the vegetation index of the crop-planting plot based on the band factor, thereby simplifying the spectral label information of different types of crops. The vegetation index refers to a value calculated by the reflection characteristics of surface vegetation in different electromagnetic spectrum regions.
[0071] Optionally, the vegetation index calculation of the crop-planting plot based on the band factor can be obtained through an enhanced vegetation index (EVI) formula.
[0072] The embodiments of the present invention can accurately identify and distinguish the types of crops by analyzing the spectral characteristics corresponding to the crops. The spectral characteristics refer to the optical properties of the crops, such as reflectivity, absorptivity and transmittance in a specific wavelength band.
[0073] As an embodiment of the present invention, the analysis of spectral characteristics corresponding to the planted crops includes: collecting the reflectance of the planted crops in a specific band and constructing a spectral curve corresponding to the reflectance; identifying spectral extreme points of the reflectance on the spectral curve; calculating the spectral slope and spectral width of the spectral curve in the specific band; and analyzing the spectral characteristics corresponding to the planted crops based on the spectral extreme points, the spectral slope and the spectral width.
[0074] Among them, the specific band refers to a specific wavelength range selected in the remote sensing image according to the spectral response characteristics of the crops, which is used to identify the type of crops planted, such as the visible light band. The reflectivity refers to the ratio of the energy of reflected light to the energy of incident light on the crop surface within a specific wavelength range. The spectral curve is a curve obtained by plotting the reflectivity data of the crop at continuous wavelengths. The spectral extreme points refer to the peaks and valleys on the spectral curve. The spectral slope refers to the rate of change between two points on the spectral curve within a specific band. The spectral width refers to the width of the crop reflectivity variation range within a specific band.
[0075] Optionally, the reflectance of the cultivated crops in a specific band can be acquired through a spectrometer, the identification of spectral extreme points of the reflectance on the spectral curve can be acquired through the above-mentioned ENVI software, the calculation of the spectral slope of the spectral curve in the specific band can be achieved using the least squares method, and the spectral width of the spectral curve in the specific band can be acquired through spectral analysis software, such as OrganicLab.
[0076] As another embodiment of the present invention, constructing the spectral curve corresponding to the reflectivity includes: collecting spectral data corresponding to the reflectivity; formatting the spectral data to obtain formatted data; setting a wavelength sequence corresponding to the formatted data; and constructing the spectral curve corresponding to the reflectivity according to the wavelength sequence.
[0077] The spectral data refers to reflectance data measured at different wavelengths, the formatted data refers to standardized format data that is convenient for constructing a spectral curve, and the wavelength sequence refers to wavelength values arranged in an orderly manner.
[0078] Optionally, the wavelength sequence setting corresponding to the formatted data may be acquired through wavelength measurement points corresponding to the spectrum data.
[0079] Furthermore, the embodiment of the present invention can reflect the growth state of the crop, such as leaf area index, chlorophyll content, etc., by constructing a spectral label of the planted crop based on the spectral characteristics and the vegetation index, which helps to distinguish the growth pattern of the crop. The spectral label refers to a unique signature of the spectral reflectance characteristics of the crop in different bands.
[0080] S2. Analyze the time series changes of the cultivated crops and identify the phenological characteristics of the cultivated crops under the time series changes, input the spectral label data into a preset Transformer model, and use the preset Transformer model to evaluate the time dependence of the cultivated crops in different growth cycles according to the phenological characteristics, analyze the plot characteristics of the crop planting plots, and evaluate the growth pattern of the cultivated crops based on the time dependence and the plot characteristics.
[0081] The embodiment of the present invention can help us understand the changing trends within the crop growth cycle and predict future growth conditions by analyzing the time series changes of the planted crops. The time series changes refer to the changes in various characteristics or indicators of crops over time, such as growth conditions and pest and disease conditions.
[0082] As an embodiment of the present invention, the analysis of the time series changes of the planted crops includes: evaluating the critical phenological period of the planted crops; measuring the plant height and canopy coverage of the planted crops during the critical phenological period; analyzing the seasonal variation patterns of the plant height and the canopy coverage; and analyzing the time series changes of the planted crops based on the seasonal variation patterns.
[0083] Among them, the key phenological period refers to a specific growth stage that has a significant impact on crop growth, such as the flowering period and the filling period; the plant height refers to the height of the crop from the root to the top; the canopy coverage refers to the coverage of the branches and leaves at the top of the crop; and the seasonal variation law refers to the pattern of seasonal changes in the plant height and canopy coverage of the crop.
[0084] Optionally, the plant height measurement of the cultivated crops during the critical phenological period can be achieved using a rangefinder, the canopy coverage measurement of the cultivated crops during the critical phenological period can be obtained through a canopy gap meter, and the seasonal variation analysis of the plant height and the canopy coverage can be achieved using an ARI MA model.
[0085] As another embodiment of the present invention, the evaluation of the critical phenological period of the planted crops includes: querying the growth habits corresponding to the planted crops; defining the phenological period standards of the planted crops based on the growth habits; analyzing the growth stage characteristics of the planted crops based on the phenological period standards; extracting the key characteristics of the planted crops under the growth stage characteristics; and evaluating the critical phenological period of the planted crops based on the key characteristics.
[0086] Among them, the growth habits refer to the growth habits of crops in the natural environment, such as the adaptability of crops to light; the phenological period standard refers to the specific standard for defining and identifying the phenological period of crops; and the growth stage characteristics refer to the physiological characteristics exhibited by crops at different growth stages.
[0087] Optionally, the growth stage characteristic analysis of the planted crops based on the phenological period standard can be achieved using ground monitoring equipment, such as a smart camera.
[0088] Furthermore, the embodiments of the present invention can be used to monitor the growth cycle of crops, identify the growth pattern of crops, and thus promote the identification of crop types by identifying the phenological characteristics of the cultivated crops under the changes in the time series. The phenological characteristics refer to the time-related growth and development characteristics exhibited by the crops in their growth cycle.
[0089] Optionally, the identification of the phenological characteristics of the planted crops under the time series changes can be obtained by extracting the vegetation index of the crops and performing time series analysis.
[0090] Furthermore, the embodiment of the present invention can effectively process the spectral data of cultivated crops and extract features therefrom for crop type identification by inputting the spectral label data into a preset Transformer model, wherein the Transformer model refers to a sequence processing model including components such as a multi-head self-attention layer and a feedforward network layer.
[0091] As an embodiment of the present invention, the inputting of the spectral label data into a preset Transformer model includes: constructing an input sequence of the spectral label data; setting a high-dimensional vector form of the input sequence; setting an element position in the input sequence; and inputting the spectral label data into a preset Transformer model based on the element position and the high-dimensional vector form.
[0092] Among them, the input sequence refers to the reflectance data or other spectral characteristics of crops in different bands, which are arranged in the order of bands. The high-dimensional vector form refers to converting each element in the input sequence into a higher-dimensional spatial representation. The element position refers to the relative or absolute position of the element obtained by adding position information to each element in the sequence.
[0093] Optionally, the input sequence construction of the spectral label data can be obtained through sequence modeling of a Transformer model, and the element position setting in the input sequence can be implemented by using the position encoding of the Transformer model.
[0094] The embodiment of the present invention can help distinguish the planting types of crops by evaluating the time dependence of the crops in different growth cycles using the preset Transformer model according to the phenological characteristics, help understand the adaptability of crops to seasonal changes, and guide the planting types. The time dependence refers to the characteristics of the physiological and morphological characteristics of crops changing over time during their growth.
[0095] As an embodiment of the present invention, the temporal dependence of the planted crops in different growth cycles is evaluated using the preset Transformer model based on the phenological characteristics, including: constructing a time series of the phenological characteristics in the Transformer model, and adding a position code for each time point in the time series; inputting the phenological characteristics and the position code into the self-attention layer of the Transformer model; based on the self-attention layer, calculating the feature weights of the phenological characteristics at each time point in the sequence; analyzing the comprehensive factors affecting the changes in the feature weights in the time series, and outputting the analysis results of the comprehensive factors to obtain the evaluation results of the time dependence of the planted crops in different growth cycles.
[0096] Among them, the time series represents a sequence of data points of the changes of crop phenological characteristics over time, the position encoding refers to the position information of each time point in the sequence, the self-attention layer refers to the core layer that focuses on elements at different positions in the sequence when processing sequence data in the Transformer model and calculates the correlation between them, the feature weight refers to the importance of each phenological feature relative to other features in the self-attention layer, the comprehensive factor refers to the various factors that affect crop growth and phenological characteristics, such as precipitation and soil factors, the analysis result refers to the output result obtained by analyzing the various factors that affect crop growth and phenological characteristics, and the evaluation result refers to the evaluation result of the time dependence of cultivated crops in different growth cycles.
[0097] Optionally, the comprehensive factor analysis affecting the change of the feature weight in the time series can be obtained through the multi-head attention mechanism in the Transformer model, and the feature weights of the phenological features in the sequence in the different growth cycles are calculated based on the self-attention layer, including:
[0098] The characteristic weights of the phenological characteristics in the different growth cycles are calculated using the following formula:
[0099]
[0100] Among them, G t represents the characteristic weight of the i-th phenological characteristic at time point t, f(t) represents the time-dependent function of the weight changing over time, exp represents the exponential function that converts linear influence into nonlinear influence, n represents the total number of environmental factors of phenological characteristics, and B ie represents the weight coefficient between the i-th phenological characteristic and the e-th environmental factor, A e (t) represents the value of the phenological characteristic corresponding to the e-th environmental factor at time point t.
[0101] Furthermore, the embodiments of the present invention can locate suitable crop types for planting by analyzing the plot characteristics of the crop planting plot, thereby providing guidance for identifying the crop planting types. The plot characteristics refer to the geographical and environmental attributes that affect crop growth.
[0102] Optionally, the plot feature analysis of the crop planting plot can be obtained through agricultural Internet of Things technology, such as soil moisture sensors and temperature sensors.
[0103] The embodiment of the present invention can accurately identify the crop planting type of a plot of land by evaluating the growth pattern of the planted crops based on the time dependency and the plot characteristics, improve agricultural production efficiency, and promote the sustainable development of agriculture. The growth pattern refers to the ecological changes in a series of growth and development stages that a crop experiences during its life cycle.
[0104] Optionally, the growth pattern assessment of the planted crops based on the time dependency and the plot characteristics may be implemented using the Transformer model.
[0105] S3. Identify the crop area in the target remote sensing image, extract the shape descriptor of the crop in the crop area, evaluate the key shape parameters of the shape descriptor, and analyze the texture characteristics of the planted crop based on the key shape parameters.
[0106] The embodiment of the present invention can accurately divide the crop planting range by identifying the crop area in the target remote sensing image, so as to analyze different types of crops within the range. The crop area refers to a part of the area identified on the remote sensing image that represents the actual planting of specific crops.
[0107] As an embodiment of the present invention, the identifying of the crop area in the target remote sensing image includes: performing feature extraction on the objects in the target remote sensing image to obtain feature extraction results; based on the feature extraction results, setting a distinction standard between the crop area and the non-crop area; performing image segmentation on the target remote sensing image according to the distinction standard to obtain a segmented image; performing cluster analysis on the segmented image to obtain a clustered image; and identifying the crop area in the target remote sensing image according to the clustered image.
[0108] Among them, the feature extraction result refers to the data result obtained after the feature extraction step is completed, the non-crop area refers to the area that does not belong to the crop planting range, the distinction standard refers to the standard for dividing the image into different areas, the segmented image refers to the image after image segmentation processing, and the cluster image refers to the image after cluster analysis processing.
[0109] Optionally, based on the feature extraction result, the distinction standard between the crop area and the non-crop area can be set by obtaining the vegetation index and reflectivity features that distinguish the crop area and the non-crop area, and the cluster analysis of the segmented image can be implemented using a K-means cluster analysis algorithm.
[0110] Furthermore, the embodiment of the present invention can be used to quantify and describe the shape attributes of objects, thereby distinguishing different types of crops by extracting shape descriptors of crops in the crop area. The shape descriptor refers to an indicator extracted from an image that can be used to quantify and describe the shape attributes of an object.
[0111] Optionally, the extraction of shape descriptors of the crops in the crop region may be implemented by using edge detection and contour extraction.
[0112] Furthermore, the embodiments of the present invention can obtain key data about the shape of crops in the image as feature parameters for model training by evaluating the key shape parameters of the shape descriptor, thereby helping the model to identify and classify different crops. The key shape parameters refer to a set of indicators that can effectively describe the shape characteristics of crops, such as leaf area index.
[0113] As an embodiment of the present invention, the evaluation of the key shape parameters of the shape descriptor includes: performing edge detection on the planted crops under the shape descriptor to obtain edge detection results; based on the edge detection results, extracting contour features of the planted crops; calculating the importance scores corresponding to the contour features; and evaluating the key shape parameters of the shape descriptor based on the importance scores.
[0114] Among them, the edge detection result refers to the result obtained by using an algorithm to detect the edge of the crop, the contour feature refers to the geometric characteristics of the crop edge, such as length, direction, curvature, etc., and the importance score refers to a quantitative score of the importance of the contour feature according to a specific calculation formula.
[0115] Optionally, performing edge detection on the planted crops under the shape descriptor to obtain edge detection results may be obtained by using a Canny operator, and extracting contour features of the planted crops based on the edge detection results may be implemented using a findContours function of OpenCV, and calculating importance scores corresponding to the contour features includes:
[0116] The importance score corresponding to the contour feature is calculated using the following formula:
[0117]
[0118] Among them, M represents the importance score corresponding to the contour feature, β j represents the importance of the jth feature in the profile feature, j represents the sequence number corresponding to the profile feature, g represents the number of profile features, N j represents the importance rating of the jth feature in contour extraction, P j Indicates the probability of occurrence of the jth contour in contour extraction, R j Represents the irregular influencing factor corresponding to the jth feature in the contour feature.
[0119] The embodiment of the present invention analyzes the texture characteristics of the cultivated crops based on the key shape parameters, and can identify different types of crops through differences in leaf structure, color distribution and surface texture of the cultivated crops. The texture characteristics refer to repetitive patterns and structural features on the surface of the crops, such as the arrangement direction of crop rows and the geometric features of crop texture elements.
[0120] Optionally, the texture characteristic analysis of the planted crops based on the key shape parameters can be obtained through a gray level co-occurrence matrix.
[0121] S4. Combining the growth pattern and the texture characteristics to generate a planting type recognition result of the planted crop
[0122] The embodiment of the present invention generates a planting type identification result of the planted crop by combining the growth pattern and the texture characteristics. It can promote the management of precision agriculture by identifying the diversity of crop planting, and can also more reasonably arrange supporting measures for crop planting based on information on crop growth conditions to reduce resource waste.
[0123] It can be seen that the embodiment of the present invention can clearly display the characteristics of crops by acquiring remote sensing images of crop planting plots, which is helpful to improve the accuracy of crop identification. Furthermore, the embodiment of the present invention can improve the image quality and reduce various interference factors, such as cloud cover, by correcting the remote sensing images to obtain target remote sensing images, so as to make subsequent crop planting type identification more accurate and reliable. The embodiment of the present invention can effectively analyze the spectral characteristics of crops by collecting the band factors of the target remote sensing images, so as to distinguish different types of crops. Furthermore, the embodiment of the present invention can simplify complex multi-band spectral information into a single value by calculating the vegetation index of the crop planting plot based on the band factors, so as to simplify the spectral label information of different types of crops. The embodiment of the present invention can accurately identify and distinguish the types of crops by analyzing the spectral characteristics corresponding to the planted crops. Furthermore, this The embodiment of the invention can reflect the growth state of the crop, such as leaf area index, chlorophyll content, etc., by constructing the spectral label of the planted crop according to the spectral characteristics and the vegetation index, which helps to distinguish the growth pattern of the crop. The embodiment of the invention can help us understand the changing trend within the crop growth cycle and predict the future growth status by analyzing the time series changes of the planted crop. Furthermore, the embodiment of the invention can be used to monitor the growth cycle of the crop and identify the growth pattern of the crop by identifying the phenological characteristics of the planted crop under the time series changes, thereby promoting the identification of the crop type. The embodiment of the invention can help distinguish the planting type of the planted crop by evaluating the time dependence of the planted crop in different growth cycles using the preset Transformer model according to the phenological characteristics, which helps to understand the adaptability of the planted crop to seasonal changes and guide the planting type. Therefore, the crop planting type identification method based on the Transformer model proposed in the embodiment of the invention can realize the multimodal data fusion of the planted crop and improve the efficiency of the type identification of the planted crop.
[0124] like Figure 2 As shown, it is a system functional module diagram of crop planting type identification based on Transformer model of the present invention.
[0125] The crop planting type identification system 200 based on the Transformer model of the present invention can be installed in an electronic device. According to the functions implemented, the crop planting type identification system based on the Transformer model can include a data monitoring module 201, a data replication module 202, a data processing module 203, and a data recovery setting module 204. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0126] In the embodiment of the present invention, the functions of each module / unit are as follows:
[0127] The band acquisition module 201 is used to acquire a remote sensing image of a crop-planting plot, perform correction processing on the remote sensing image to obtain a target remote sensing image, acquire a band factor of the target remote sensing image, calculate a vegetation index of the crop-planting plot based on the band factor, and analyze spectral characteristics of crops planted in the crop-planting plot, and construct a spectral label of the crop according to the spectral characteristics and the vegetation index;
[0128] The model evaluation module 202 is used to analyze the time series changes of the planted crops and identify the phenological characteristics of the planted crops under the time series changes, input the spectral label data into a preset Transformer model, and use the preset Transformer model to evaluate the time dependence of the planted crops in different growth cycles according to the phenological characteristics, and analyze the plot characteristics of the crop planting plots, and evaluate the growth pattern of the planted crops based on the time dependence and the plot characteristics;
[0129] The texture analysis module 203 is used to identify the crop area in the target remote sensing image, extract the shape descriptor of the crop in the crop area, evaluate the key shape parameters of the shape descriptor, and analyze the texture characteristics of the planted crop based on the key shape parameters;
[0130] The planting type identification module 204 is used to generate a planting type identification result of the planted crop by combining the growth pattern and the texture characteristics.
[0131] In detail, the modules in the crop planting type identification system 200 based on the Transformer model in the embodiment of the present invention are used in the same manner as described above. Figure 1 The crop planting type recognition method based on the Transformer model described in the present invention has the same technical means and can produce the same technical effects, so it will not be repeated here.
[0132] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0133] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A crop planting type identification method based on a Transformer model, the method comprising: Acquire a remote sensing image of a crop-planting plot, perform correction processing on the remote sensing image to obtain a target remote sensing image, collect band factors of the target remote sensing image, calculate a vegetation index of the crop-planting plot based on the band factors, and analyze spectral characteristics of crops planted in the crop-planting plot, and construct a spectral label of the crops according to the spectral characteristics and the vegetation index; Analyze the time series changes of the planted crops and identify the phenological characteristics of the planted crops under the time series changes, input the spectral label data into a preset Transformer model, and use the preset Transformer model to evaluate the time dependence of the planted crops in different growth cycles according to the phenological characteristics, and analyze the plot characteristics of the crop planting plots, and evaluate the growth pattern of the planted crops based on the time dependence and the plot characteristics; Identifying a crop area in the target remote sensing image, extracting a shape descriptor of the crop in the crop area, evaluating key shape parameters of the shape descriptor, and analyzing texture characteristics of the planted crop based on the key shape parameters; The growth pattern and the texture characteristics are combined to generate a planting type identification result of the planted crop.
2. The method according to claim 1, characterized in that The analysis of spectral characteristics corresponding to the planted crops includes: Collecting the reflectivity of the planted crops in a specific band and constructing a spectral curve corresponding to the reflectivity; Identifying a spectral extreme point of the reflectivity on the spectral curve; Calculating the spectral slope and spectral width of the spectral curve in the specific waveband; The spectral characteristics corresponding to the planted crops are analyzed according to the spectral extreme points, the spectral slope and the spectral width.
3. The method according to claim 1, characterized in that The constructing a spectral curve corresponding to the reflectivity includes: Collecting spectral data corresponding to the reflectivity; Formatting the spectral data to obtain formatted data; Setting a wavelength sequence corresponding to the formatted data; A spectral curve corresponding to the reflectivity is constructed according to the wavelength sequence.
4. The method according to claim 1, characterized in that: The analyzing the time series changes of the planted crops comprises: evaluating key phenological periods of the planted crops; Measuring the plant height and canopy coverage of the planted crops during the key phenological period; Analyzing the seasonal variation patterns of the plant height and the canopy coverage; According to the seasonal variation rules, the time series variation of the planted crops is analyzed.
5. The method according to claim 1, characterized in that The key phenological period of the crop planted is evaluated, including: Querying the growth habits corresponding to the planted crops; Defining the phenological period standard of the planted crops according to the growth habit; Analyzing the growth stage characteristics of the planted crops based on the phenological period standards; Extracting key features of the planted crop under the growth stage characteristics; Based on the key characteristics, the key phenological period of the planted crops is evaluated.
6. The method according to claim 1, characterized in that The step of inputting the spectral label data into a preset Transformer model comprises: constructing an input sequence of the spectral label data; Setting the high-dimensional vector form of the input sequence; Set the position of the element in the input sequence; Based on the element positions and the high-dimensional vector form, the spectral label data is input into a preset Transformer model.
7. The method according to claim 1, characterized in that The step of evaluating the time dependence of the planted crops in different growth cycles using the preset Transformer model according to the phenological characteristics includes: Constructing a time series of the phenological characteristics in the Transformer model, and adding a position code to each time point in the time series; Inputting the phenological features and the position encoding into the self-attention layer of the Transformer model; Based on the self-attention layer, calculating the feature weight of the phenological feature in the sequence at each time point; The comprehensive factors affecting the change of the feature weight in the time series are analyzed, and the analysis results of the comprehensive factors are output to obtain the evaluation results of the time dependence of the planted crops in different growth cycles.
8. The method according to claim 1, characterized in that The identifying of the crop area in the target remote sensing image comprises: Performing feature extraction on the object in the target remote sensing image to obtain a feature extraction result; Based on the feature extraction result, setting the distinction standard between the crop area and the non-crop area; performing image segmentation on the target remote sensing image according to the distinction standard to obtain a segmented image; performing cluster analysis on the segmented image to obtain a clustered image; The crop area in the target remote sensing image is identified according to the cluster image.
9. The method according to claim 1, characterized in that: The key shape parameters of the shape descriptor are evaluated, including: Performing edge detection on the planted crops under the shape descriptor to obtain edge detection results; Extracting contour features of the planted crops based on the edge detection result; Calculating the importance score corresponding to the contour feature; Based on the importance score, key shape parameters of the shape descriptor are evaluated.
10. A crop planting type identification method based on Transformer model, characterized in that: The system comprises: A band acquisition module, used to acquire a remote sensing image of a crop-planting plot, perform correction processing on the remote sensing image to obtain a target remote sensing image, acquire a band factor of the target remote sensing image, calculate a vegetation index of the crop-planting plot based on the band factor, and analyze spectral characteristics of crops planted in the crop-planting plot, and construct a spectral label of the crop according to the spectral characteristics and the vegetation index; A model evaluation module, for analyzing the time series changes of the planted crops and identifying the phenological characteristics of the planted crops under the time series changes, inputting the spectral label data into a preset Transformer model, so as to evaluate the time dependence of the planted crops in different growth cycles according to the phenological characteristics using the preset Transformer model, and analyzing the plot characteristics of the crop planting plots, and evaluating the growth pattern of the planted crops based on the time dependence and the plot characteristics; A texture analysis module, for identifying a crop region in the target remote sensing image, extracting a shape descriptor of the crop in the crop region, evaluating key shape parameters of the shape descriptor, and analyzing texture characteristics of the planted crop based on the key shape parameters; A planting type identification module is used to generate a planting type identification result of the planted crop by combining the growth pattern and the texture characteristics.
Citation Information
Cited By
Rice planting area identification method and device based on multi-temporal remote sensing data, equipment and storage medium
CN120783240A