A hyperspectral-based method for estimating water content in multiple crops

By combining hyperspectral imaging technology with deep neural networks and transfer learning, the problems of low accuracy and poor universality in estimating water content at different growth stages of various crops have been solved, achieving non-destructive, rapid, and high-precision water content detection.

CN121191042BActive Publication Date: 2026-02-24SOUTHWEAT UNIV OF SCI & TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511761810.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-24
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and poor universality in estimating the water content of various crops at different growth stages, making it difficult to achieve non-destructive, rapid, and high-precision detection.

Method used

By combining hyperspectral imaging technology with deep neural networks and transfer learning methods, hyperspectral data is collected by UAVs. A robust competitive adaptive reweighted sampling method optimized by genetic algorithms is used to select characteristic wavelengths and construct various crop water content prediction models to achieve accurate estimation at different growth stages.

Benefits of technology

It enables accurate, rapid, and non-destructive prediction of water content for various crops at different growth stages, improving estimation accuracy and universality while avoiding damage to crops.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121191042B_ABST
    Figure CN121191042B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on hyperspectral variety crop moisture content estimation method, including steps: collection set region hyperspectral data, crop setting sampling point and sampling scheme in the region of collected hyperspectral data, obtain crop moisture content;According to hyperspectral data, region of interest extraction and data preprocessing are carried out, obtain the hyperspectral data of different crops, according to the hyperspectral data of crop and crop moisture content selects characteristic wavelength, obtains optimal wavelength set;According to hyperspectral data and optimal wavelength set, input matrix is constructed, input matrix is input into deep neural network, and single crop moisture content prediction model is established;Single crop moisture content prediction model is used as source domain model, and the method of transfer learning is used to fine-tune source domain model, and the moisture content prediction model of multiple crops is obtained. Can effectively improve model precision and prediction ability, realize the accurate, fast and non-destructive effective prediction of crop moisture content in the scene of multiple crops in different growth stages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of crop growth monitoring technology, specifically relating to a method for estimating the water content of multiple crops based on hyperspectral imaging. Background Technology

[0002] Water content: The relative proportion of water within a plant, a fundamental physiological indicator. Widely present in all plant organs, including roots, stems, leaves, and fruits, it is a core substance for maintaining plant structure and function. Changes in water content serve as a key physiological indicator of a plant's response to drought stress. Under water-scarce conditions, plants undergo a series of physiological and metabolic changes, including decreased cell turgor pressure, stomatal closure, reduced photosynthetic rate, and impaired nutrient transport. These processes directly constrain crop growth and development. Water is crucial for crop growth and yield formation, directly affecting cell division and expansion, the accumulation and translocation of photosynthetic products, and ultimately, the filling and plumpness of grains or fruits. Water plays a fundamental role in plant life activities; it is not only a medium for biochemical reactions but also participates in maintaining cell structural stability and transpiration cooling processes. Therefore, monitoring changes in water content can directly reflect a plant's water status and its adaptability to drought environments, providing important information for assessing crop growth potential and predicting final yield.

[0003] Currently, to determine the water content of plant canopy leaves, one generally chooses to use specialized instruments or collect samples, dry them in a laboratory, and then calculate the result. These methods are not only time-consuming and labor-intensive, but also cause damage to the crop itself, and none of them can achieve non-destructive testing.

[0004] Hyperspectral imaging technology can capture reflectance information of crop canopy across hundreds of consecutive bands, enabling non-destructive and rapid estimation of crop water content. Existing studies typically employ machine learning or deep learning models to directly establish regression relationships between water content and the entire spectral range or a few artificially selected general bands.

[0005] However, this method also has limitations: different crops have vastly different tissue structures and biochemical compositions, resulting in drastically different spectral response characteristics. Even for the same crop, spectral response characteristics vary at different growth stages. Using the same model to estimate the water content of all crops makes it difficult to achieve optimal accuracy, and the model has poor generalization ability. Currently, there is a lack of an efficient method that can automatically adapt to different crop species and dynamically adopt the optimal spectral characteristics for water content estimation.

[0006] Therefore, there is an urgent need for a new technical solution to address the problem of low accuracy and poor universality in water content estimation for various crops at different growth stages. Summary of the Invention

[0007] In view of the above-mentioned shortcomings in the prior art, the present invention provides a method for estimating the water content of multiple crops based on hyperspectral imaging, which solves the problems of low accuracy and poor universality in estimating water content of multiple crops at different growth stages.

[0008] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a method for estimating the water content of multiple crops based on hyperspectral imaging, comprising the following steps:

[0009] S1. Set the UAV flight area, flight altitude and planned route, and collect hyperspectral data of the set area;

[0010] S2. Set up sampling points and sampling schemes for crops in the area where hyperspectral data is collected, obtain crop samples of different crops, and then obtain the crop water content;

[0011] S3. Based on the hyperspectral data, perform region of interest extraction and data preprocessing to obtain hyperspectral data of different crops. Select characteristic wavelengths based on the hyperspectral data and crop water content to obtain the optimal wavelength set.

[0012] S4. Construct an input matrix based on hyperspectral data and the optimal wavelength set, and input the input matrix into a deep neural network to establish a single crop water content prediction model.

[0013] S5. Using a single crop moisture content prediction model as the source domain model, the source domain model is fine-tuned using transfer learning to obtain moisture content prediction models for multiple crops.

[0014] Furthermore, in S1, the collected hyperspectral data specifically refers to reflectance data with a spectral range of 400 nm to 1000 nm.

[0015] Furthermore, in S2, the collected crop samples included corn, rice, wheat, and soybeans. After sampling, their fresh weight was measured on-site, and the crop growth stages were recorded, including the seedling stage, heading / flowering stage, and maturity stage. The crop samples were then dried until their weight became constant to obtain the dry weight. The crop moisture content was calculated based on the fresh weight and dry weight. R The specific expression is:

[0016]

[0017] In the formula, For fresh weight, Dry weight.

[0018] Furthermore: In S3, before extracting the region of interest, the hyperspectral data undergoes radiometric calibration, atmospheric correction, and image stitching operations. Data preprocessing includes Savitzky-Golay filtering and differential transform.

[0019] The method for selecting characteristic wavelengths based on crop hyperspectral data and crop water content includes the following steps:

[0020] S31. Based on crop hyperspectral data and crop moisture content, the SPA algorithm is used to coarsely screen and obtain candidate wavelength pools.

[0021] S32. Based on the candidate wavelength pool, a robust competitive adaptive reweighted sampling method optimized by genetic algorithm is used to screen and select the optimal wavelength set.

[0022] Furthermore, S31 includes the following sub-steps:

[0023] S311. Initialize the hyperspectral data of the crop, obtain the data vectors of each band, and calculate the absolute correlation coefficient between each band data vector and the water content vector.

[0024] S312. Select the wavelengths that are related to the water content vector based on the absolute correlation coefficient as the initial wavelengths, establish the selected wavelength set, calculate the projection of the remaining unselected wavelengths onto the selected wavelength set, select the wavelength with the largest projection to add to the selected wavelength set, and obtain the candidate wavelength pool.

[0025] Furthermore, S32 includes the following sub-steps:

[0026] S321. Perform Monte Carlo sampling on the wavelengths in the candidate wavelength pool and form a subset according to the probability based on the weight of each wavelength;

[0027] S322. Divide the hyperspectral data into growth stage subsets according to the growth stage. Perform PLS cross-validation on the subsets in each independent growth stage. Calculate the root mean square error and robustness index of the subsets on the growth stage subsets to obtain the evaluation target of the subsets. The smaller the evaluation target value, the better the subset.

[0028] S323. The GA algorithm is used to optimize the initial value and decay rate in exponential decay. The subset is selected according to the evaluation target using exponential decay to obtain the optimal subset.

[0029] S324. Repeat S321~S323 according to the set number of iterations, and output the optimal subset that minimizes the evaluation target value, and take it as the optimal wavelength set.

[0030] Furthermore: In S322, robustness indices are calculated. The specific expression is:

[0031]

[0032] In the formula, The penalty coefficient is... For subsets in the growth stage sRoot mean square error on a subset of data. This is a simplified version of the standard deviation calculation formula;

[0033] Evaluation objective of subset The specific expression is:

[0034]

[0035] In the formula, denoted as the root mean square error of the subset;

[0036] In S323, the method for optimizing the initial value and decay rate in exponential decay using the GA algorithm is as follows:

[0037] The population is initialized by randomly generating several sets of parameters, each set including the initial value and decay rate of exponential decay. For each set of parameters, a competitive adaptive reweighting algorithm is run once to obtain an optimal subset. The fitness of the optimal subset is calculated, and the set of parameters that maximizes the fitness is searched. G The specific expression is:

[0038]

[0039] In the formula, optimal subset The evaluation objectives.

[0040] Furthermore: In S4, the deep neural network includes an input layer, hidden layers, and an output layer;

[0041] Specifically, the optimal wavelength set is used to extract the input matrix from the hyperspectral data, and the input matrix is ​​then input into the input layer.

[0042] The hidden layer is activated using the ReLU activation function. l The output of the hidden layer The expression is as follows:

[0043]

[0044] In the formula, It is the ReLU activation function. To obtain the maximum value, For the first l Intermediate calculation results of the hidden layer;

[0045]

[0046] In the formula, For the first l The weights of the hidden layers, For the first l -1 hidden layer output, For the first l The bias of the hidden layer;

[0047] The output layer uses linear activation, and the output of the output layer... The specific expression is:

[0048]

[0049] In the formula, k For the dimensions of the data, For the first L The weights of the output layer, For the first The output of the hidden layer, For the first L The bias of the output layer;

[0050] Loss function during deep neural network training The specific expression is:

[0051]

[0052] In the formula, This is the measured moisture content. m The number of samples in the training batch. For network parameters, ,in, The weights of the first hidden layer. This is the bias of the first hidden layer;

[0053] The training process involves backpropagation and minimization using the Adam optimizer. To obtain the optimal network parameters .

[0054] Furthermore, in S5, the method for fine-tuning the source domain model using transfer learning is as follows:

[0055] Load the source domain model parameters, split the network, and obtain the underlying feature extractor. and top-level regressor During fine-tuning, the underlying feature extractor is fixed. Without changing the target domain data, minimize the loss function. Top-level regressor Update;

[0056]

[0057]

[0058] In the formula, n The number of samples in the training set for the target domain. For the model to the first j Predicted values ​​for each target domain sample. For the first j The true water content value of each target domain sample For the first t +1 update , For the first t Next update , for gradient, This is the learning rate.

[0059] The beneficial effects of this invention are as follows:

[0060] (1) This invention uses hyperspectral imaging technology to focus on crop water content estimation in various crop scenarios at different growth stages. It adopts the approach of first modeling one crop and then generalizing to other plants. It combines the robust competitive adaptive reweighted sampling method (GAOR-CARS) based on genetic algorithm optimization for feature wavelength extraction, deep neural network (DNN) for water content estimation modeling, and transfer learning to achieve generalization to other crops. This enables accurate, fast, and lossless prediction of crop water content in various crop scenarios at different growth stages, and solves the problems of low accuracy and poor universality of water content estimation in various crop scenarios at different growth stages.

[0061] (2) This invention proposes a robust competitive adaptive reweighted sampling method (GAOR-CARS) based on genetic algorithm optimization. First, a continuous projection algorithm is used for coarse screening, and then an improved CARS algorithm is used for fine screening. In the CARS algorithm, a genetic algorithm (GA) is introduced to update the parameters in the exponential decay part, avoiding the blindness of manual parameter adjustment. At the same time, a robustness penalty term and an accuracy index are introduced to form the objective function, so as to screen out the characteristic bands that can cover the entire growth stage and well characterize the correlation between spectral data and water content. Attached Figure Description

[0062] Figure 1 This is a flowchart of a method for estimating the water content of multiple crops based on hyperspectral imaging according to the present invention.

[0063] Figure 2 The original spectral data and the preprocessed spectral data are shown.

[0064] Figure 3 This is the preprocessed spectral data. Detailed Implementation

[0065] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0066] like Figure 1 As shown, in one embodiment of the present invention, a method for estimating the water content of multiple crops based on hyperspectral imaging includes the following steps:

[0067] S1. Set the UAV flight area, flight altitude and planned route, and collect hyperspectral data of the set area;

[0068] S2. Set up sampling points and sampling schemes for crops in the area where hyperspectral data is collected, obtain crop samples of different crops, and then obtain the crop water content;

[0069] S3. Based on the hyperspectral data, perform region of interest extraction and data preprocessing to obtain hyperspectral data of different crops. Select characteristic wavelengths based on the hyperspectral data and crop water content to obtain the optimal wavelength set.

[0070] S4. Construct an input matrix based on hyperspectral data and the optimal wavelength set, and input the input matrix into a deep neural network (DNN) to establish a single crop water content prediction model;

[0071] S5. Using a single crop moisture content prediction model as the source domain model, the source domain model is fine-tuned using transfer learning to obtain moisture content prediction models for multiple crops.

[0072] In S1, the collected hyperspectral data specifically refers to reflectance data with a spectral range of 400 nm to 1000 nm.

[0073] In this embodiment, a hyperspectral camera mounted on a drone is used to collect hyperspectral data of the experimental field area. After the hyperspectral data collection is completed, the crop canopy leaves are randomly sampled in the corresponding area according to the regional sampling method. The fresh weight of the samples is weighed on site and the growth stage of the crops at the time of sampling is recorded. The growth stages include the seedling stage, the heading / flowering stage and the maturity stage. The BBCH standard is used uniformly. After recording, the samples are taken to the laboratory for further processing.

[0074] In S2, crop samples were collected including corn, rice, wheat, and soybeans. After sampling, their fresh weight was measured on-site, and the crop's growth stage was recorded, including emergence, heading / flowering, and maturity. The crop samples were then dried until their weight became constant to obtain their dry weight. The crop moisture content was calculated based on the fresh and dry weights. RThe specific expression is:

[0075]

[0076] In the formula, For fresh weight, Dry weight.

[0077] In S3, before extracting the region of interest (ROI), the hyperspectral data undergoes radiometric calibration, atmospheric correction, and image stitching to convert DN values ​​into reflectance and eliminate atmospheric scattering and absorption. Since the hyperspectral data includes other irrelevant ground data, the ROI must be extracted first, specifically the crop's hyperspectral data. This extracted data requires preprocessing, including Savitzky-Golay filtering and differential transform. The original and preprocessed spectral data are shown below. Figure 2 and Figure 3 As shown.

[0078] The processed crop hyperspectral data were fine-screened using a robust competitive adaptive reweighted sampling method (GAOR-CARS) optimized by a genetic algorithm. This characteristic wavelength fine-screening method selects characteristic wavelength combinations for each crop covering the entire growth stage.

[0079] The method for selecting characteristic wavelengths based on crop hyperspectral data and crop water content includes the following steps:

[0080] S31. Based on crop hyperspectral data and crop moisture content, the SPA algorithm is used to coarsely screen and obtain candidate wavelength pools.

[0081] S32. Based on the candidate wavelength pool, a robust competitive adaptive reweighted sampling method optimized by genetic algorithm is used to screen and select the optimal wavelength set.

[0082] In this embodiment, a robust competitive adaptive reweighted sampling method based on genetic algorithm optimization is adopted to perform sampling across the entire band. Rapid screening A pool of representative wavelengths constitutes the candidate wavelength pool. This significantly reduces the amount of subsequent calculations.

[0083] S31 includes the following steps:

[0084] S311. Initialize the hyperspectral data of the crop, obtain the data vectors of each band, and calculate the absolute correlation coefficient between each band data vector and the water content vector.

[0085] set up , ,..., For each band data vector, calculate the relationship between each band and the water content vector.y absolute correlation coefficient ;

[0086]

[0087] In the formula, The formula for the correlation coefficient is... For the first h Band data vector, ;

[0088] S312. Select wavelengths that are related to the water content vector based on the absolute correlation coefficient, and establish a set of selected wavelengths;

[0089] In this embodiment, the selection is... y The most relevant wavelength is taken as the first wavelength in the selected wavelength set and denoted as the initial wavelength. w (1);

[0090]

[0091] Let the number of iterations be n The process involves iterative iteration. In each iteration, for the remaining unselected wavelengths, the projection of each wavelength onto the set of selected wavelengths is calculated. The wavelength with the largest projection is then added to the set of selected wavelengths, resulting in a candidate wavelength pool. This process continues until... n > The selected wavelength is obtained. w (1), w (2),..., w ( n -1) is denoted as the set of selected wavelengths S.

[0092] In each iteration, for the remaining unselected wavelengths, calculate their projection onto the set of selected wavelengths, and select the wavelength with the largest projection to add to the set of selected wavelengths, thus obtaining the candidate wavelength pool.

[0093] In this embodiment, for the remaining unselected band data vectors x g Calculate its projection onto the selected wavelength set S. ,express x g The orthogonal projection vector onto the space spanned by S, i.e. x g All information in the text that was not interpreted by S.

[0094]

[0095] In the formula, The matrix is ​​composed of all the selected wavelength vectors. T It is the transpose symbol;

[0096] S32 includes the following steps:

[0097] S321. Perform Monte Carlo sampling on the wavelengths in the candidate wavelength pool and form a subset according to the probability based on the weight of each wavelength;

[0098] S322. Divide the hyperspectral data into growth stage subsets according to the growth stage. Perform PLS cross-validation on the subsets in each independent growth stage. Calculate the root mean square error and robustness index of the subsets on the growth stage subsets to obtain the evaluation target of the subsets. The smaller the evaluation target value, the better the subset.

[0099] S323. The GA algorithm is used to optimize the initial value and decay rate in the exponential decay (EDP) algorithm. The subset is then selected based on the evaluation target using the exponential decay algorithm to obtain the optimal subset.

[0100] S324. Repeat S321~S323 according to the set number of iterations, and output the optimal subset that minimizes the evaluation target value, and take it as the optimal wavelength set.

[0101] In this embodiment, the candidate wavelength pool obtained by the SPA algorithm needs to be further refined using the improved CARS (Competitive Adaptive Reweighting) algorithm to select the optimal wavelength subset as the feature wavelengths. The robust competitive adaptive reweighting sampling method based on genetic algorithm optimization introduced in this invention improves the CARS algorithm in two ways: first, it uses the GA algorithm to optimize key parameters, avoiding the blindness of manual parameter tuning; second, it introduces a robust penalty term to measure stability across growth stages, ensuring good performance of the algorithm throughout the entire crop growth stage.

[0102] In S321, the traditional CARS algorithm first performs Monte Carlo sampling, assuming that... M The sampling in the cyclic iteration, for the ... i The next sample, based on the current first sample... h Band data vector weight According to probability Selected to form a subset The probability formula is as follows:

[0103]

[0104] In S322, robustness indices are calculated. The specific expression is:

[0105]

[0106] In the formula, The penalty coefficient is... For subsets in the growth stages The root mean square error on a subset of data, where the dataset contains three stages: seedling stage, jointing stage, and heading stage. s It is 3. This is a simplified version of the standard deviation calculation formula;

[0107] In this embodiment, the present invention introduces a robustness index. As a robustness penalty term, it is used to apply to the sampled subset. The evaluation is performed by calculating the root mean square error (RMSE) on subsets at different growth stages. Based on this, the evaluation target for the subset is constructed by combining it with the original RMSECV of the CARS algorithm. The goal is to make The smallest, one with high precision ( Small and stable A smaller subset will have a smaller Fitness value.

[0108] Evaluation objective of subset The specific expression is:

[0109]

[0110] In the formula, denoted as the root mean square error of the subset;

[0111] In S323, the method for optimizing the initial value and decay rate in exponential decay using the GA algorithm is as follows:

[0112] The population is initialized by randomly generating several sets of parameters, each set including the initial value and decay rate of exponential decay. For each set of parameters, a competitive adaptive reweighting algorithm is run once to obtain an optimal subset. The fitness of the optimal subset is calculated, and the set of parameters that maximizes the fitness is searched. G The specific expression is:

[0113]

[0114] In the formula, optimal subset The evaluation objectives.

[0115] In this embodiment, the CARS algorithm uses exponential decay during the screening process to forcibly remove wavelengths with lower weights, thereby accelerating the screening process, as defined by the following formula:

[0116]

[0117] In the formula, a This is the starting value for exponential decay. b The decay rate is the rate of exponential decay. It is the firsti The proportion of wavelengths retained after each sampling. Finally, the weights are updated based on the regression coefficients of the PLS model, with higher weights assigned to wavelengths.

[0118] This invention uses the GA algorithm to optimize the parameters of the CARS algorithm. The optimization targets are the initial value and decay rate of exponential decay, so that the optimal subset ultimately found by the entire CARS algorithm selection process. of The minimum value. The GA algorithm process is to first optimize the parameter [ a , b The encoding is a chromosome. First, the population is initialized, and multiple sets of [...] are randomly generated. a , b For each set of parameters [ a , b Running a complete CARS process will eventually yield an optimal subset. Calculate the subset The fitness of the optimal subset is obtained, since the GA usually takes the maximum value, so the fitness... G In the formula The value is negative, and a new generation of the population is generated based on the fitness. This process is repeated iteratively until the parameter combination that maximizes fitness (i.e., minimizes it) is found. Finally, output an integer vector. This is the optimal feature wavelength index vector, which records the position of the selected wavelength.

[0119] In S4, a deep neural network includes an input layer, a hidden layer, and an output layer;

[0120] Specifically, the optimal wavelength set is used to extract the input matrix from the hyperspectral data, and the input matrix is ​​then input into the input layer.

[0121] The hidden layer is activated using the ReLU activation function. l The output of the hidden layer The expression is as follows:

[0122]

[0123] In the formula, It is the ReLU activation function. To obtain the maximum value, For the first l Intermediate calculation results of the hidden layer;

[0124]

[0125] In the formula, For the first l The weights of the hidden layers, For the first l -1 hidden layer output, For the first l The bias of the hidden layer;

[0126] The output layer uses linear activation, and the output of the output layer... The specific expression is:

[0127]

[0128] In the formula, k For the dimensions of the data, For the first L The weights of the output layer, For the first The output of the hidden layer, For the first L The bias of the output layer;

[0129] Loss function during deep neural network training The specific expression is:

[0130]

[0131] In the formula, This is the measured moisture content. m The number of samples in the training batch. For network parameters, ,in, The weights of the first hidden layer. This is the bias of the first hidden layer;

[0132] The training process involves backpropagation and minimization using the Adam optimizer. To obtain the optimal network parameters .

[0133] In S5, the specific method for fine-tuning the source domain model using transfer learning is as follows:

[0134] Load the source domain model parameters, split the network, and obtain the underlying feature extractor. and top-level regressor During fine-tuning, the underlying feature extractor is fixed. Without changing the target domain data, minimize the loss function. Top-level regressor Update;

[0135]

[0136]

[0137] In the formula, n The number of samples in the training set for the target domain. For the model to the first j Predicted values ​​for each target domain sample. For the first j The true water content value of each target domain sample For the first t +1 update , For the first t Next update , for gradient, This is the learning rate.

[0138] In this embodiment, a single-crop water content prediction model is used as the source domain model. Transfer learning is employed to fine-tune the model, achieving generalization from a single crop to multiple crops. The evaluation index for the water content prediction model is the coefficient of determination. ), root mean square error and relative analysis error (RPD).

[0139] In the description of this invention, it should be understood that the terms "center," "thickness," "upper," "lower," "horizontal," "top," "bottom," "inner," "outer," and "radial," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying the relative importance or the number of technical features implicitly specified. Therefore, a feature defined by "first," "second," and "third" may explicitly or implicitly include one or more of that feature.

Claims

1. A method for estimating the water content of multiple crops based on hyperspectral imaging, characterized in that, Includes the following steps: S1. Set the UAV flight area, flight altitude and planned route, and collect hyperspectral data of the set area; S2. Set up sampling points and sampling schemes for crops in the area where hyperspectral data is collected, obtain crop samples of different crops, and then obtain the crop water content; S3. Based on the hyperspectral data, perform region of interest extraction and data preprocessing to obtain hyperspectral data of different crops. Select characteristic wavelengths based on the hyperspectral data and crop water content to obtain the optimal wavelength set. S4. Construct an input matrix based on hyperspectral data and the optimal wavelength set, and input the input matrix into a deep neural network to establish a single crop water content prediction model. S5. Using a single crop water content prediction model as the source domain model, the source domain model is fine-tuned using transfer learning to obtain water content prediction models for multiple crops. The method for selecting characteristic wavelengths based on crop hyperspectral data and crop water content includes the following steps: S31. Based on crop hyperspectral data and crop moisture content, the SPA algorithm is used to coarsely screen and obtain candidate wavelength pools. S32. Based on the candidate wavelength pool, a robust competitive adaptive reweighted sampling method optimized by genetic algorithm is used to screen and select the optimal wavelength set. S31 includes the following steps: S311. Initialize the hyperspectral data of the crop, obtain the data vectors of each band, and calculate the absolute correlation coefficient between each band data vector and the water content vector. S312. Select the wavelengths that are related to the water content vector based on the absolute correlation coefficient as the initial wavelengths, establish the selected wavelength set, calculate the projection of the remaining unselected wavelengths onto the selected wavelength set, select the wavelength with the largest projection to add to the selected wavelength set, and obtain the candidate wavelength pool. S32 includes the following steps: S321. Perform Monte Carlo sampling on the wavelengths in the candidate wavelength pool and form a subset according to the probability based on the weight of each wavelength; S322. Divide the hyperspectral data into growth stage subsets according to the growth stage. Perform PLS cross-validation on the subsets in each independent growth stage. Calculate the root mean square error and robustness index of the subsets on the growth stage subsets to obtain the evaluation target of the subsets. The smaller the evaluation target value, the better the subset. S323. The GA algorithm is used to optimize the initial value and decay rate in exponential decay. The subset is selected according to the evaluation target using exponential decay to obtain the optimal subset. S324. Repeat S321~S323 according to the set number of iterations, and output the optimal subset that minimizes the evaluation target value, and take it as the optimal wavelength set. In S322, robustness indices are calculated. The specific expression is: In the formula, The penalty coefficient is... For subsets in the growth stage s Root mean square error on a subset of data. This is a simplified version of the standard deviation calculation formula. Evaluation objective of subset The specific expression is: In the formula, denoted as the root mean square error of the subset; In S323, the method for optimizing the initial value and decay rate in exponential decay using the GA algorithm is as follows: The population is initialized by randomly generating several sets of parameters, each set including the initial value and decay rate of exponential decay. For each set of parameters, a competitive adaptive reweighting algorithm is run once to obtain an optimal subset. The fitness of the optimal subset is calculated, and the set of parameters that maximizes the fitness is searched. G The specific expression is: In the formula, optimal subset The evaluation objectives.

2. The method for estimating the water content of multiple crops based on hyperspectral imaging according to claim 1, characterized in that, In S1, the collected hyperspectral data specifically refers to reflectance data with a spectral range of 400 nm to 1000 nm.

3. The method for estimating the water content of multiple crops based on hyperspectral imaging according to claim 1, characterized in that, In S2, crop samples were collected including corn, rice, wheat, and soybeans. After sampling, their fresh weight was measured on-site, and the crop's growth stage was recorded, including emergence, heading / flowering, and maturity. The crop samples were then dried until their weight became constant to obtain their dry weight. The crop moisture content was calculated based on the fresh and dry weights. R The specific expression is: In the formula, For fresh weight, Dry weight.

4. The method for estimating the water content of multiple crops based on hyperspectral imaging according to claim 1, characterized in that, In S3, before extracting the region of interest, the hyperspectral data undergoes radiometric calibration, atmospheric correction, and image stitching. Data preprocessing includes Savitzky-Golay filtering and differential transform.

5. The method for estimating the water content of multiple crops based on hyperspectral imaging according to claim 1, characterized in that, In S4, a deep neural network includes an input layer, a hidden layer, and an output layer; Specifically, the optimal wavelength set is used to extract the input matrix from the hyperspectral data, and the input matrix is ​​then input into the input layer. The hidden layer is activated using the ReLU activation function. l The output of the hidden layer The expression is as follows: In the formula, It is the ReLU activation function. To obtain the maximum value, For the first l Intermediate calculation results of the hidden layer; In the formula, For the first l The weights of the hidden layers, For the first l -1 hidden layer output, For the first l The bias of the hidden layer; The output layer uses linear activation, and the output of the output layer... The specific expression is: In the formula, k For the dimensions of the data, For the first L The weights of the output layer, For the first The output of the hidden layer, For the first L The bias of the output layer; Loss function during deep neural network training The specific expression is: In the formula, This is the measured moisture content. m The number of samples in the training batch. For network parameters, ,in, The weights of the first hidden layer. This is the bias of the first hidden layer; The training process involves backpropagation and minimization using the Adam optimizer. To obtain the optimal network parameters .

6. The method for estimating the water content of multiple crops based on hyperspectral imaging according to claim 1, characterized in that, In S5, the specific method for fine-tuning the source domain model using transfer learning is as follows: Load the source domain model parameters, split the network, and obtain the underlying feature extractor. and top-level regressor During fine-tuning, the underlying feature extractor is fixed. Without changing the target domain data, minimize the loss function. Top-level regressor Update; In the formula, n The number of samples in the training set for the target domain. For the model to the first j Predicted values ​​for each target domain sample. For the first j The true water content value of each target domain sample For the first t +1 update , For the first t Next update , for gradient, This is the learning rate.

Citation Information

Patent Citations

  • Soil water content prediction method based on spectral analysis technology and related device

    CN120721660A

  • Fruit maturity and quality scanning

    US20240302272A1