Wheat emergence density measurement method and system based on unmanned aerial vehicle multispectral image
By using multispectral image data acquisition and feature fusion technology, the problems of low efficiency and poor accuracy in wheat seedling density measurement by UAVs have been solved, achieving high-throughput and high-precision wheat seedling density measurement, which is suitable for field management during the wheat seedling stage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHWEST A & F UNIV
- Filing Date
- 2026-03-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing drone-based wheat seedling density measurement technology suffers from low efficiency and poor accuracy. In particular, the recognition accuracy drops significantly when the seedlings and soil background colors are similar during the seedling stage, and the fixed altitude flight results in insufficient coverage area or detailed information.
A wheat emergence density distribution map was generated by using multispectral image data acquisition methods, combined with multispectral reflectance index and attention mechanism, and through multi-scale feature fusion and spatial attention processing.
It achieves high-throughput and high-precision measurement of wheat emergence density, and can effectively identify seedlings and background in complex field environments, thus improving measurement efficiency and accuracy.
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural remote sensing and intelligent monitoring technology, specifically relating to a method and system for calculating wheat emergence density based on UAV multispectral imagery. Background Technology
[0002] Wheat emergence density is a core agronomic parameter for assessing sowing quality, predicting yield potential, and guiding field management during the seedling stage, making its accurate acquisition crucial. Traditional methods for obtaining wheat emergence density primarily rely on manual field counting, with agricultural technicians using handheld counters to count each plant in selected quadrats. While this method is the industry benchmark, it suffers from low efficiency, high subjectivity, and high labor costs. Furthermore, it involves point-based sampling, limiting its coverage and failing to achieve comprehensive field-scale surveys.
[0003] With the development of UAV remote sensing technology, related technologies are gradually being applied to crop phenotypic monitoring. Existing UAV-based wheat seedling density measurement techniques mainly rely on UAV visible light (RGB) image counting. This method acquires orthophotos of the field using a UAV equipped with a color camera, and then uses image segmentation or target detection algorithms to identify seedlings. While this improves data acquisition efficiency, it relies on insufficient spectral dimensions. During the seedling stage, wheat seedlings are highly similar in color to the soil background and crop residue (especially under shady or moist conditions), leading to severe confusion with traditional color- or texture-based image processing algorithms and a significant decrease in recognition accuracy.
[0004] Meanwhile, most existing drone solutions employ fixed-altitude flight. If the flight altitude is too low (e.g., <15 meters), although individual plant images are clear, the coverage area for a single operation is small, resulting in low data acquisition and processing efficiency. If the flight altitude is too high (e.g., >30 meters), a single plant target occupies only a few pixels in the image, leading to the loss of detailed information and a surge in missed detection rates. This inherent contradiction between efficiency and accuracy limits the practical application of the technology. Summary of the Invention
[0005] To address the problems in the background technology, this invention provides a method and system for measuring wheat emergence density based on UAV multispectral imagery.
[0006] The technical solution of the present invention is as follows:
[0007] This invention provides a method for calculating wheat emergence density based on UAV multispectral imagery, comprising:
[0008] S1: Acquire spectral image data of the target wheat field at multiple preset flight altitudes and in four bands: green, red, red edge, and near-infrared. After geometric correction and spectral standardization, the spectral image data are fused to generate a multispectral reflectance orthophoto image.
[0009] S2: Based on multispectral reflectance orthophotos, calculate the normalized differential vegetation index, green light normalized differential vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index as multispectral features.
[0010] S3: Multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor;
[0011] The spectrally weighted feature tensor is processed by spatial attention to obtain a spatial attention map. The weights of regions with pixel values below the pixel threshold in the spatial attention map are suppressed and then multiplied element-wise with the spectrally weighted feature tensor to generate an enhanced feature map.
[0012] The enhanced feature map is processed sequentially by convolution, batch normalization, and the first activation function, and then by deformable convolution to obtain aligned multi-scale features; the aligned multi-scale features are then processed by adaptive feature fusion to generate fused features;
[0013] The fusion features were processed through a fully connected layer to obtain the wheat emergence density estimation results;
[0014] S4: Spatial mapping of wheat emergence density estimation results to generate a wheat emergence density distribution map of the target wheat field.
[0015] Furthermore, the spectrally weighted feature tensor described in S3 undergoes spatial attention processing to obtain a spatial attention map, specifically:
[0016] For the spectrally weighted feature tensor, calculate the channel average pooling map and the channel max pooling map respectively. Concatenate the two pooling maps according to the channel dimension to obtain the aggregated feature map. After convolving the aggregated feature map with a 7×7 convolution kernel, process it with the second activation function to generate the spatial attention map.
[0017] Furthermore, the multispectral features described in S3 are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor, specifically:
[0018] After performing global average pooling on the multispectral features, they are sequentially processed by a fully connected layer and then by a second activation function to generate weight coefficients for each channel. The generated weight coefficients are then multiplied channel by channel with the multispectral features to obtain the spectrally weighted feature tensor.
[0019] Furthermore, the pixel threshold mentioned in S3 is determined by using multispectral features and spatial attention map to determine an initial threshold, selecting a preset number of candidate thresholds within a preset range with the initial threshold as the center, processing the spatial attention map using each candidate threshold, calculating the proportion of non-zero pixels within a preset window, counting the number of preset windows with a proportion greater than the preset proportion, and using the candidate threshold with the maximum number of preset windows as the pixel threshold.
[0020] Furthermore, the aligned multi-scale features described in S3 undergo adaptive feature fusion processing to generate fused features, specifically as follows:
[0021] The aligned multi-scale features are processed by an attention mechanism to calculate the fusion weight of each flight altitude feature. Based on the fusion weight, all flight altitude features are weighted and summed to generate fused features.
[0022] Furthermore, S3 also includes using regression loss and multi-scale prediction consistency loss to obtain wheat emergence density estimation results.
[0023] Furthermore, S4 also includes visualizing the wheat emergence density distribution map of the target wheat field, or transmitting it to the farm management system via a data interface.
[0024] Furthermore, S2 describes the calculation of the Normalized Difference Vegetation Index (NDVI), Green Light Normalized Difference Vegetation Index (GDI), Normalized Red Edge Index (RDI), Soil-Optimized Adjusted Vegetation Index (SODI), and Chlorophyll Index based on multispectral reflectance orthophotos, specifically as follows:
[0025] The normalized differential vegetation index was calculated by utilizing the difference in reflectance between the near-infrared and red light bands.
[0026] The green light normalized difference vegetation index was calculated by utilizing the difference in reflectance between the near-infrared and green light bands.
[0027] The normalized red-edge index is calculated by utilizing the difference in reflectance between the near-infrared and red-edge bands.
[0028] By utilizing the difference in reflectance between the near-infrared and red light bands, and soil regulating factors, the soil-regulated vegetation index was calculated and optimized.
[0029] The chlorophyll index is calculated using the reflectance of near-infrared and red light, as well as the red edge band.
[0030] Furthermore, the spectral image data mentioned in S1, after geometric correction and spectral normalization, are fused to generate a multispectral reflectance orthophoto image, specifically as follows:
[0031] Based on UAV positioning and attitude determination system data, digital surface model data and ground control points, the spectral images are orthorectified one by one, and the corrected single images are stitched together according to a unified coordinate system to generate a multispectral orthorectified image mosaic.
[0032] Using reference data from calibration plates laid synchronously during flight experiments, a linear regression model was established between the raw digital values of spectral images and the known reflectance of the calibration plates. Based on the linear regression model, the raw digital values of spectral images were converted into surface reflectance data.
[0033] Multispectral orthophoto mosaics are fused with surface reflectance data to generate multispectral reflectance orthophotos.
[0034] This invention also provides a wheat emergence density measurement system based on UAV multispectral imagery, comprising:
[0035] The data acquisition and preprocessing module is used to acquire spectral image data of the target wheat field at multiple preset flight altitudes and in four bands: green, red, red edge, and near-infrared. After geometric correction and spectral standardization, the spectral image data are fused to generate a multispectral reflectance orthophoto image.
[0036] Spectral feature construction module: Based on multispectral reflectance orthophotos, calculate the normalized differential vegetation index, green light normalized differential vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index as multispectral features;
[0037] Density estimation module: Multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor;
[0038] The spectrally weighted feature tensor is processed by spatial attention to obtain a spatial attention map. The weights of regions with pixel values below the pixel threshold in the spatial attention map are suppressed and then multiplied element-wise with the spectrally weighted feature tensor to generate an enhanced feature map.
[0039] The enhanced feature map is processed sequentially by convolution, batch normalization, and the first activation function, and then by deformable convolution to obtain aligned multi-scale features; the aligned multi-scale features are then processed by adaptive feature fusion to generate fused features;
[0040] The fusion features were processed through a fully connected layer to obtain the wheat emergence density estimation results;
[0041] Density distribution map generation module: Spatially map the wheat emergence density estimation results to generate a wheat emergence density distribution map of the target wheat field.
[0042] Beneficial effects
[0043] This invention achieves high-throughput and high-precision measurement of wheat seedling density through multi-altitude and multi-spectral collaborative acquisition, construction of multispectral features, spectral-spatial dual attention mechanism, and multi-scale feature fusion. It solves the problems of low efficiency and poor accuracy in existing technologies and can be widely applied to field management during the wheat seedling stage. Specifically, the introduction of red-edge and near-infrared bands, which are highly sensitive to vegetation, combined with index combinations such as NDRE and OSAVI that effectively suppress soil background, greatly enhances the spectral separability between seedlings and background. Through the spectral-spatial dual attention mechanism and multi-scale feature fusion, it ensures recognition accuracy by relying on low-altitude imagery while maintaining coverage efficiency by leveraging high-altitude imagery. Detailed Implementation
[0044] The following examples are intended to illustrate the present invention, and not to further limit the invention.
[0045] Example 1
[0046] This embodiment provides a method for calculating wheat emergence density based on UAV multispectral imagery, including:
[0047] S1: Acquire spectral image data of the target wheat field at multiple preset flight altitudes and in four bands: green, red, red edge, and near-infrared. After geometric correction and spectral standardization, the spectral image data are fused to generate a multispectral reflectance orthophoto image.
[0048] During the data acquisition phase, a drone system equipped with a multispectral camera is used. For the same target wheat field, aerial photography is conducted at multiple different altitudes (e.g., 12 meters, 15 meters, 20 meters, and 40 meters, adjustable according to drone performance and actual conditions) according to a pre-set flight plan. The multispectral sensor simultaneously acquires spectral images in four discrete bands: green, red, red-edge, and near-infrared. Simultaneously, its integrated independent RGB camera provides high-resolution true-color images for analysis. The purpose of this step is to simultaneously acquire high-resolution images containing details of seedlings and medium-to-low-resolution images covering large areas.
[0049] This invention achieves a leap from "sampling" to "census" by using multi-altitude and multi-spectral collaborative data acquisition, especially by covering a large area in a single flight at a relatively high altitude (e.g., 40 meters). This significantly improves the efficiency of field plant estimation and effectively solves the core efficiency bottleneck of manual and ground photography methods, which suffer from "point" sampling and small coverage.
[0050] In the data preprocessing stage, the spectral image data are geometrically corrected and spectrally standardized, then fused to generate a multispectral reflectance orthophoto image, specifically as follows:
[0051] Based on UAV positioning and attitude determination system (POS) data, digital surface model (DSM) data, and ground control points, each spectral image is orthorectified to eliminate geometric distortions caused by terrain undulations and sensor attitude. The corrected individual images are then stitched together according to a unified coordinate system to generate a multispectral orthorectified image mosaic with a unified coordinate system and precise geometric accuracy at each flight altitude.
[0052] Using reference data from a calibration board (whose reflectance is known and its accuracy is better than ±2%) synchronously laid during flight experiments, a linear regression model was established between the raw digital values (DN) of the spectral image and the known reflectance of the calibration board. Based on the linear regression model, the raw digital values of the spectral image were converted into surface reflectance data. This process aims to eliminate the influence of changes in solar irradiance under different times and illumination conditions on the image data, and to achieve absolute data standardization.
[0053] Multispectral orthophoto mosaics are fused with surface reflectance data to generate multispectral reflectance orthophotos.
[0054] S2: Based on multispectral reflectance orthophotos, calculate the normalized differential vegetation index, green light normalized differential vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index as multispectral features.
[0055] The purpose of this step is to transform the raw band information into more direct and discriminative crop phenotypic features.
[0056] Specifically:
[0057] The Normalized Difference Vegetation Index (NDVI) is calculated by utilizing the difference in reflectance between the near-infrared and red light bands. The formula is as follows:
[0058] NDVI = (NIR - R) / (NIR + R), where NIR and R represent the reflectance in the near-infrared band and the reflectance in the red band, respectively. This index is a core indicator reflecting the growth status and coverage of vegetation.
[0059] The Green Normalized Difference Vegetation Index (GNDVI) is calculated by utilizing the difference in reflectance between the near-infrared and green light bands. The formula is as follows:
[0060] GNDVI = (NIR-G) / (NIR+G), where G represents the reflectivity in the green light band. This index can be used to indicate nutrient stress.
[0061] The normalized red-edge index (NDRE) is calculated using the difference in reflectance between the near-infrared and red-edge bands. The formula is as follows:
[0062] NDRE = (NIR-RE) / (NIR+RE), where RE represents the red-edge reflectance. This index utilizes the red-edge band, which is extremely sensitive to the physiological state of vegetation, and is highly sensitive to the early stages of crop growth and stress.
[0063] The soil-regulated vegetation index (OSAVI) was calculated and optimized by utilizing the difference in reflectance between the near-infrared and red light bands and soil regulating factors. The formula is as follows:
[0064] OSAVI = (NIR - R) / (NIR + R + 0.16), by introducing a soil adjustment factor, effectively reduces the interference of bare soil background. The soil adjustment factor is determined through experimental simulation and adaptation to low vegetation cover scenarios. In specific implementation, it can be dynamically adjusted according to field soil type (0.18 for sandy soil, 0.12 for moist loam) and stubble coverage rate (0.2 for >50%). The adjustment principle is that the higher the soil reflectance, the larger the factor value, so as to enhance the spectral separability of seedlings and background under different field environments.
[0065] The chlorophyll index (LCI) is calculated using near-infrared, red, and red-edge reflectance bands. The formula is as follows:
[0066] LCI = (NIR-RE) / (NIR+R). This index integrates near-infrared and red-edge band information and is an effective indicator for assessing leaf chlorophyll content.
[0067] This invention introduces the red-edge and near-infrared bands, which are extremely sensitive to vegetation, and combines them with index combinations such as NDRE and OSAVI, which can effectively suppress soil background. This greatly enhances the spectral separability between seedlings and background, fundamentally improving recognition accuracy and environmental adaptability. It overcomes the problem of severe confusion and low accuracy of RGB image method when seedling and soil colors are similar.
[0068] S3: Multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor;
[0069] The spectrally weighted feature tensor is processed by spatial attention to obtain a spatial attention map. The weights of regions with pixel values below the pixel threshold in the spatial attention map are suppressed and then multiplied element-wise with the spectrally weighted feature tensor to generate an enhanced feature map.
[0070] The enhanced feature map is processed sequentially by convolution, batch normalization, and a first activation function (such as SiLU activation function), and then by deformable convolution to obtain aligned multi-scale features; the aligned multi-scale features are then processed by adaptive feature fusion to generate fused features;
[0071] The fused features were processed through a fully connected layer to obtain the wheat emergence density estimation results.
[0072] This step can be achieved by building a multi-scale deep regression network based on the PyTorch framework, aiming to directly regress the number of seedlings per unit area from the multispectral features of wheat fields.
[0073] During the wheat emergence period, the contribution of various spectral indices (i.e., normalized difference vegetation index, green light normalized difference vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index) to seedling identification varies significantly across different plots, soil backgrounds, and emergence conditions. Treating all spectral indices equally can easily introduce redundant information and even amplify soil background noise.
[0074] Therefore, the multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor, specifically:
[0075] After performing global average pooling on the multispectral features, they are sequentially processed by fully connected layers and then by a second activation function (such as ReLU activation function) to generate weight coefficients for each channel. The generated weight coefficients are then multiplied channel by channel with the multispectral features to obtain the spectrally weighted feature tensor.
[0076] In the specific implementation process, for the specific scenario of "wheat seedling density measurement", this invention designs the number of input channels of the compression-excitation network (matching 4 multispectral channels: R / G / RE / NIR, 5 core spectral indices: NDVI / GNDVI / NDRE / OSAVI / LCI, instead of the general 3 channels of RGB image), and optimizes the weight learning objective to "enhance the spectral separability of seedlings and soil / stubble".
[0077] This invention introduces spectral adaptive weighting into a multi-scale deep regression network. By performing global feature compression and importance assessment on each spectral index channel constructed in step S2, corresponding weight coefficients are dynamically generated to achieve adaptive adjustment of the contribution of different spectral index information. This design enables the network to automatically strengthen spectral indices sensitive to seedling physiological states (such as NDRE and LCI, which significantly respond to chlorophyll content) and suppress spectral features heavily influenced by soil background during training, thereby improving the accuracy of seedling density regression based on multi-spectral indices.
[0078] The vegetation index constructed in step S2 exhibits a clear discontinuous spatial distribution. Seedling areas typically appear as dots or stripes along the sowing rows in the image, while bare soil areas show a large, continuous distribution. If feature extraction is performed directly on the full-frame spectral index image, the network is easily interfered with by large areas of low-frequency background information, thus weakening the spectral index's ability to distinguish seedling locations.
[0079] Therefore, the spectrally weighted feature tensor is further processed by spatial attention to obtain a spatial attention map, specifically:
[0080] For the spectrally weighted feature tensor, calculate the channel average pooling map and the channel max pooling map respectively. Concatenate the two pooling maps according to the channel dimension to obtain the aggregated feature map. After convolving the aggregated feature map with a 7×7 convolution kernel, process it with the second activation function to generate the spatial attention map.
[0081] This invention addresses the small-target, high-density, row-like or dot-like spatial distribution characteristics of wheat seedlings during the emergence stage, and uses a 7×7 convolution kernel to adapt the seedling distribution scale of field images.
[0082] This invention employs spatial attention processing, generating two-dimensional spatial attention weights based on the spatial response intensity of the spectrally weighted feature tensor. The pixel values of the spatial attention map indicate the importance of the corresponding spatial location, thereby guiding the network to concentrate computational resources on potential seedling areas in the image that present a "point-like" or "row-like" distribution. It also actively suppresses large areas of uniform bare soil background or crop residue areas, effectively improving the model's anti-interference ability in complex field environments and significantly enhancing the effective utilization rate of multispectral features in complex field scenarios.
[0083] Furthermore, after the spatial attention map is generated, a threshold filtering logic is designed to forcibly suppress the weight of bare soil / stubble areas. Specifically, the pixel threshold is determined by using multispectral features and the spatial attention map to establish an initial threshold. Using this initial threshold as the center, a preset number of candidate thresholds are selected within a preset range. Each candidate threshold is used to process the spatial attention map, calculating the proportion of non-zero pixels within a preset window. The number of preset windows with a proportion greater than a preset proportion is counted, and the candidate threshold with the largest preset number of windows is used as the pixel threshold.
[0084] Preferably, the initial threshold is determined by extracting the global pixel value distribution features of the spatial attention map and then filtering the seedling response region of the spatial attention map using multispectral features.
[0085] The global pixel value distribution characteristics include the maximum value of the background pixel value peak interval, the global pixel mean, and the global pixel standard deviation.
[0086] In the specific implementation process, firstly, histogram statistics are performed on the spatial attention map to find the interval with the highest percentage of pixel values. This interval corresponds to the concentrated area of bare soil and stubble. The maximum value of the peak interval of background pixel values is recorded as A1. In addition, the global pixel mean μ and the global pixel standard deviation σ are calculated.
[0087] The Normalized Red Edge Index (NRI) channel, which is most sensitive to seedlings in multispectral features, was selected, as it shows the strongest response to chlorophyll signals in wheat seedlings. A mask for potential seedling areas was generated using adaptive binarization (either by calculating the mean of the NRI and marking areas with NRIs greater than the mean as potential seedling areas). This mask was then used to extract the minimum attention pixel value of the potential seedling areas from the spatial attention map, denoted as A2.
[0088] Compare A1, μ+0.5σ, and 0.5×A2, and take the maximum value as the initial threshold T.
[0089] Centered on an initial threshold T, five candidate thresholds are selected within the range [T-0.05, T+0.05]. Each candidate threshold is used to perform threshold filtering on the spatial attention map. Then, the proportion of non-zero pixels within a 3×3 sliding window is calculated, and the number of windows with a proportion >10% is counted (corresponding to the dotted and striped clustering characteristics of seedlings). The candidate threshold with the largest number of windows is selected as the final pixel threshold. This ensures that the weights of bare soil and stubble areas can be accurately suppressed under different field scenarios, while preserving the weak feature signals of wheat seedlings in the emergence stage.
[0090] The weights of regions with pixel values below a pixel threshold in the spatial attention map are suppressed. Suppression methods can include: calculating the mean OSAVI (Optimized Soil Adjusted Vegetation Index) for the corresponding region in the spatial attention map. avg Adapted to the seedling distribution scale during the wheat emergence period, for bare soil areas (OSAVI) avg <0.15), weight is set to 0.
[0091] Finally, for multi-altitude UAV observation scenarios of the same plot, due to differences in spatial resolution, pixel mixing degree, and observation perspective, the spectral indices calculated for the same plot at different altitudes show significant differences in numerical distribution and spatial scale. Existing deep learning-based density estimation methods typically assume that the features to be processed have a fixed scale and lack constraints on the consistency of observation results at multiple altitudes of the same plot. This makes the models highly sensitive to changes in flight altitude, making it difficult to meet the application requirements of unstable flight altitudes in actual agricultural operations.
[0092] Therefore, this invention needs to process and fuse multi-scale features from different flight altitudes. In its specific implementation, the process includes:
[0093] General Feature Extraction: The enhanced feature map is passed through an EfficientNet series backbone network with shared weights. The weights are adjusted in real time according to the seedling density and background complexity of different fields to extract basic features with high semantic consistency.
[0094] Cross-scale feature alignment: To eliminate the differences in feature map scale and spatial location caused by different flight altitudes, this invention introduces deformable convolution processing. This operation predicts the spatial offset by using the sampling points of the convolution kernel, enabling the receptive field to adaptively deform, thereby aligning representations of different scales in the feature space to eliminate geometric misalignment.
[0095] Adaptive Feature Fusion: The aligned multi-scale features are then subjected to adaptive feature fusion processing, specifically:
[0096] The aligned multi-scale features are processed by an attention mechanism to calculate the fusion weight for each flight altitude feature. Based on these fusion weights, all flight altitude features are weighted and summed to generate a fused feature. Alternatively, a lightweight attention mechanism can be used to dynamically generate the fusion weights, which are then used to weight and sum features from different altitudes, ultimately generating a unified and robust fused feature that integrates multi-scale information.
[0097] In addition, it also includes using regression loss and multi-scale prediction consistency loss to obtain wheat emergence density estimation results.
[0098] The fused features are processed through a fully connected layer and then jointly optimized by regression loss and multi-scale prediction consistency loss to finally obtain the wheat emergence density estimation result.
[0099] Among them, the multi-scale prediction consistency loss This refers to a loss function that, by penalizing the difference in density prediction values of the same plot under different flight altitude images, guides the model corresponding to the method of this invention to learn robust features that remain unchanged in altitude, thus ensuring stable prediction results when flight altitude fluctuates.
[0100] The formula is: In the formula, They are the same plot of land. At altitude , The predicted wheat emergence density is as follows. N This represents the number of land parcel samples used in the calculation.
[0101] The total loss function is defined as , To adapt to the mean squared error (MSE) loss of the density regression task, The balancing coefficient (with a value ranging from 0.1 to 0.5, preferably 0.3, determined through validation set accuracy calibration) is used to achieve synergistic optimization of regression accuracy and flight altitude robustness.
[0102] In the training phase, the model corresponding to the method of this invention introduces an additional multi-scale prediction consistency loss function in addition to the conventional regression loss function. This function penalizes the differences in density values predicted by the model from images of the same plot at different altitudes, forcing the model to learn robust features that are altitude-invariant. This ensures that, in actual operations, even if the flight altitude fluctuates, the prediction results for the same plot at different flight altitudes can be consistent across multiple scales.
[0103] S4: Spatial mapping of wheat emergence density estimation results to generate a wheat emergence density distribution map of the target wheat field.
[0104] In addition, it also includes visualizing the wheat emergence density distribution map of the target wheat field, or transmitting it to the farm management system or variable operation agricultural machinery through a data interface to guide production decisions.
[0105] This invention achieves high-throughput and high-precision measurement of wheat seedling density through multi-altitude and multi-spectral collaborative acquisition, construction of multispectral features, spectral-spatial dual attention mechanism, and multi-scale feature fusion. It solves the problems of low efficiency and poor accuracy in existing technologies and can be widely applied to field management during the wheat seedling stage. Specifically, the introduction of red-edge and near-infrared bands, which are highly sensitive to vegetation, combined with index combinations such as NDRE and OSAVI that effectively suppress soil background, greatly enhances the spectral separability between seedlings and background. Through the spectral-spatial dual attention mechanism and multi-scale feature fusion, it ensures recognition accuracy by relying on low-altitude imagery while maintaining coverage efficiency by leveraging high-altitude imagery.
[0106] Example 2
[0107] Based on Example 1, this example provides a wheat emergence density measurement system based on UAV multispectral imagery, including:
[0108] Data acquisition and preprocessing module: used to acquire spectral image data of the target wheat field at multiple preset flight altitudes and in four bands: green, red, red edge, and near-infrared. After geometric correction and spectral standardization, the spectral image data are fused to generate a multispectral reflectance orthophoto image.
[0109] The data acquisition and preprocessing module comprises a multi-rotor UAV platform, a high-precision multispectral imaging sensor (covering green, red, red-edge, and near-infrared bands), a flight control system, and an integrated positioning and attitude determination system. It is responsible for acquiring images at a preset flight altitude. Raw data is cached in the onboard storage unit and transmitted wirelessly to the subsequent processing module.
[0110] Spectral feature construction module: Based on multispectral reflectance orthophotos, calculate the normalized difference vegetation index, green light normalized difference vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index as multispectral features.
[0111] Density estimation module: Multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor;
[0112] The spectrally weighted feature tensor is processed by spatial attention to obtain a spatial attention map. The weights of regions with pixel values below the pixel threshold in the spatial attention map are suppressed and then multiplied element-wise with the spectrally weighted feature tensor to generate an enhanced feature map.
[0113] The enhanced feature map is processed sequentially by convolution, batch normalization, and the first activation function, and then by deformable convolution to obtain aligned multi-scale features; the aligned multi-scale features are then processed by adaptive feature fusion to generate fused features;
[0114] The fused features were processed through a fully connected layer to obtain the wheat emergence density estimation results.
[0115] The density estimation module is a dedicated computing device equipped with a high-performance parallel computing unit (such as a graphics processing unit (GPU) or a neural network processing unit (NPU)). A trained multi-scale deep regression neural network model and its corresponding inference framework are deployed on it. It receives the output from the spectral feature construction module and is responsible for performing deep regression inference. It connects to the front-end and back-end modules via a high-speed data interface to complete model calculations and output density estimation results.
[0116] Density distribution map generation module: Spatially map the wheat emergence density estimation results to generate a wheat emergence density distribution map of the target wheat field.
[0117] The density distribution map generation module includes a display unit, graphical user interface software, and various data communication interfaces (such as wireless network, vehicle bus, universal serial bus, etc.). It receives the result data from the density estimation module and is responsible for visualizing and outputting the results.
[0118] Furthermore, the system control and data bus, acting as the nerve center of the system, is composed of software control logic and hardware communication links. It is responsible for scheduling the task sequence of each module, managing the stable and real-time transmission of data between modules, and providing system status monitoring and anomaly diagnosis functions.
[0119] The wheat emergence density measurement system based on UAV multispectral imagery provided by this invention can directly learn features from input data and output density results through data acquisition and preprocessing modules, spectral feature construction modules, density estimation modules, and density distribution map generation modules. This achieves automated operation of the entire plant estimation process, significantly reduces the cost of manual intervention, improves recognition accuracy, and achieves stable measurement.
[0120] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for calculating wheat emergence density based on UAV multispectral imagery, characterized in that, include: S1: Acquire spectral image data of the target wheat field at multiple preset flight altitudes and in four bands: green, red, red edge, and near-infrared. After geometric correction and spectral standardization, the spectral image data are fused to generate a multispectral reflectance orthophoto image. S2: Based on multispectral reflectance orthophotos, calculate the normalized differential vegetation index, green light normalized differential vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index as multispectral features. S3: Multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor; The spectrally weighted feature tensor is processed by spatial attention to obtain a spatial attention map. The weights of regions with pixel values below the pixel threshold in the spatial attention map are suppressed and then multiplied element-wise with the spectrally weighted feature tensor to generate an enhanced feature map. The enhanced feature map is processed sequentially by convolution, batch normalization and the first activation function, and then by deformable convolution to obtain aligned multi-scale features; The aligned multi-scale features are then subjected to adaptive feature fusion processing to generate fused features; The fusion features were processed through a fully connected layer to obtain the wheat emergence density estimation results; S4: Spatial mapping of wheat emergence density estimation results to generate a wheat emergence density distribution map of the target wheat field.
2. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, The spectral weighted feature tensor described in S3 is processed by spatial attention to obtain a spatial attention map, specifically: For the spectrally weighted feature tensor, calculate the channel average pooling map and the channel max pooling map respectively. Concatenate the two pooling maps according to the channel dimension to obtain the aggregated feature map. After convolving the aggregated feature map with a 7×7 convolution kernel, process it with the second activation function to generate the spatial attention map.
3. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, The multispectral features described in S3 are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor, specifically: After performing global average pooling on the multispectral features, they are sequentially processed by a fully connected layer and then by a second activation function to generate weight coefficients for each channel. The generated weight coefficients are then multiplied channel by channel with the multispectral features to obtain the spectrally weighted feature tensor.
4. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, The pixel threshold described in S3 is determined by using multispectral features and spatial attention maps to determine an initial threshold. A preset number of candidate thresholds are selected within a preset range, centered on the initial threshold. Each candidate threshold is used to process the spatial attention map, and the proportion of non-zero pixels within a preset window is calculated. The number of preset windows with a proportion greater than the preset proportion is counted, and the candidate threshold with the maximum number of preset windows is taken as the pixel threshold.
5. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, The aligned multi-scale features described in S3 undergo adaptive feature fusion processing to generate fused features, specifically: The aligned multi-scale features are processed by an attention mechanism to calculate the fusion weight of each flight altitude feature. Based on the fusion weight, all flight altitude features are weighted and summed to generate fused features.
6. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, S3 also includes using regression loss and multi-scale prediction consistency loss to obtain wheat emergence density estimation results.
7. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, S4 also includes the ability to visualize the wheat emergence density distribution map of the target wheat field, or to transmit it to the farm management system via a data interface.
8. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, S2 describes the calculation of the Normalized Difference Vegetation Index (NDVI), Green Light Normalized Difference Vegetation Index (GDI), Normalized Red Edge Index (RDI), Soil-Optimized Adjusted Vegetation Index (SOA), and Chlorophyll Index based on multispectral reflectance orthophotos. Specifically: The normalized differential vegetation index was calculated by utilizing the difference in reflectance between the near-infrared and red light bands. The green light normalized difference vegetation index was calculated by utilizing the difference in reflectance between the near-infrared and green light bands. The normalized red-edge index is calculated by utilizing the difference in reflectance between the near-infrared and red-edge bands. By utilizing the difference in reflectance between the near-infrared and red light bands, and soil regulating factors, the soil-regulated vegetation index was calculated and optimized. The chlorophyll index is calculated using the reflectance of near-infrared and red light, as well as the red edge band.
9. The method for calculating wheat emergence density based on UAV multispectral imagery according to claim 1, characterized in that, The spectral image data described in S1, after being geometrically corrected and spectrally normalized, are fused to generate a multispectral reflectance orthophoto image, specifically: Based on UAV positioning and attitude determination system data, digital surface model data and ground control points, the spectral images are orthorectified one by one, and the corrected single images are stitched together according to a unified coordinate system to generate a multispectral orthorectified image mosaic. Using reference data from calibration plates laid synchronously during flight experiments, a linear regression model was established between the raw digital values of spectral images and the known reflectance of the calibration plates. Based on the linear regression model, the raw digital values of spectral images were converted into surface reflectance data. Multispectral orthophoto mosaics are fused with surface reflectance data to generate multispectral reflectance orthophotos.
10. A wheat emergence density measurement system based on UAV multispectral imagery, characterized in that, include: The data acquisition and preprocessing module is used to acquire spectral image data of the target wheat field at multiple preset flight altitudes and in four bands: green, red, red edge, and near-infrared. After geometric correction and spectral standardization, the spectral image data are fused to generate a multispectral reflectance orthophoto image. Spectral feature construction module: Based on multispectral reflectance orthophotos, calculate the normalized differential vegetation index, green light normalized differential vegetation index, normalized red edge index, optimized soil-regulated vegetation index, and chlorophyll index as multispectral features; Density estimation module: Multispectral features are sequentially processed through global feature compression and channel attention to obtain a spectrally weighted feature tensor; The spectrally weighted feature tensor is processed by spatial attention to obtain a spatial attention map. The weights of regions with pixel values below the pixel threshold in the spatial attention map are suppressed and then multiplied element-wise with the spectrally weighted feature tensor to generate an enhanced feature map. The enhanced feature map is processed sequentially by convolution, batch normalization and the first activation function, and then by deformable convolution to obtain aligned multi-scale features; The aligned multi-scale features are then subjected to adaptive feature fusion processing to generate fused features; The fusion features were processed through a fully connected layer to obtain the wheat emergence density estimation results; Density distribution map generation module: Spatially map the wheat emergence density estimation results to generate a wheat emergence density distribution map of the target wheat field.