Mapping and forecasting crop yields are fundamental to agricultural decision-making and crop oversight. The emergence of unmanned aerial vehicles (UAVs) has accelerated the acquisition of high-resolution imagery for assessing and tracking crop growth. This work established an economical approach for yield mapping within a commercial production environment. Two separate UAVs were deployed to swiftly collect RGB and multispectral imagery of spinach at various developmental stages across multiple fields, facilitating the appraisal of crop physiological conditions under real-farm conditions. Drawing on this imagery, a processing pipeline for orthoimage rotation and segmentation tailored to agricultural fields was introduced. Twelve vegetation indices (VIs) were subsequently extracted from the processed images. The most dependable VIs were identified by comparing correlations between each VI and recorded yields, complemented by regression tree analysis and stepwise multiple linear regression. The Excess Green Index (ExG) and the Normalized Difference Vegetation Index (NDVI) emerged as two of the strongest predictors of spinach yield at differing growth periods. A linear regression model was fitted using 45 hand-harvested calibration points, attaining a coefficient of determination (R²) of 0.98. Evaluation on a separate validation set yielded a root mean squared error (RMSE) of 0.19 kg/m and a mean absolute percentage error (MAPE) of 9.0 %. The yield maps generated served as a basis for guiding harvest-related decision-making on the farm and for informing broader crop management approaches.
Reliable prediction of crop yield is of great significance for vegetable production management, sustaining adequate market supply, and streamlining resource utilization. In commercial operations, obtaining yield estimates at the earliest possible stage is favored to plan harvesting tasks around finite resources, including workforce availability, processing capacity, storage facilities, and supply chain logistics [1-3]. Yet, the unpredictability and heterogeneity inherent in real-world cultivation systems pose obstacles to accurately and quickly forecasting yields. Conventional techniques for evaluating plant physiological properties are labor-intensive, slow, and prone to human operator error. Owing to breakthroughs in remote sensing (RS), platforms built around unmanned aerial vehicles (UAVs) have gained widespread adoption in precision agriculture and smart farming for non-invasive, high-throughput image capture [4-7]. When set against ground-based RS approaches, UAV-mounted techniques cause less disturbance and afford greater maneuverability [8]. Their revisit windows can be tailored flexibly, an attribute that proves especially valuable for managing short-cycle crops, particularly compared with satellite platforms, whose revisit intervals average roughly 16 days [9]. UAVs stand out for delivering high spatial resolution over comparatively large areas at centimeter-level detail and at high temporal frequency, while keeping operational expenses low.
RS methodologies enable the capture of electromagnetic reflectance signatures from crop canopies [9]. A diverse array of optical vegetation indices (VIs) has been formulated from these signatures to enable both quantitative and qualitative assessment of vegetative surfaces, amplifying responsiveness to vegetation characteristics while suppressing extraneous influences such as background soil reflectance, directional scattering, and atmospheric interference [10, 11]. To illustrate, the Normalized Difference Vegetation Index (NDVI) ranks among the earliest VIs developed and remains widely used for distinguishing vegetated surfaces from exposed soil and water bodies [12, 13]. Earlier investigations have concluded that NDVI is the most consistent index for estimating LAI [14, 15]. For instance, Hassan et al. [6] reported a strong positive association between NDVI values extracted from multispectral UAV imagery across the entire wheat growth cycle and ultimate grain yield. Their research examined the capacity of NDVI to reflect yield fluctuations driven by both irrigation regimes and genetic differences. That said, a body of work has also highlighted NDVI’s drawback—namely, its tendency to saturate at low thresholds when deployed over thick crop canopies [16]. As a result, more responsive multispectral indices, including the Green Normalized Difference Vegetation Index (GNDVI) and red-edge-driven indices such as the Normalized Difference Red Edge (NDRE) and the Chlorophyll Index - Red Edge (CI-RE), are better suited for yield forecasting. For example, Saravia et al. [17] examined the relationships between maize productivity and 10 VIs, concluding that CI-RE and NDRE were the most promising indicators for predicting maize yields. Liu et al. [18] singled out the G-B VI as the most resilient index for estimating soil-plant analysis development values in barley foliage across multiple growth phases, using imagery acquired at varying flight elevations. That work illustrated how certain VIs perform effectively at particular developmental stages but lose accuracy at others. For yield prediction across a range of growth stages, it is necessary to identify VIs that consistently assess canopy attributes.
Phenotyping throughput represents yet another avenue for advancing yield prediction. The abbreviated life cycles of spinach, for example, demand swift data handling and rapid appraisal of collected information. To inspect nuanced canopy features, earlier studies often used flight altitudes of 20-30 m when collecting UAV imagery [7, 19, 20]. Although low-elevation imaging yields granular canopy detail, it also increases the time required for both scanning and processing, with substantial computational loads posing an additional concern. Battery packs with relatively short recharge intervals require multiple UAV landings and recharging cycles to cover a designated region of interest fully. Under open-air conditions, shifting environmental variables—such as weather fluctuations, changing illumination, and moving shadows—introduce inconsistencies into UAV captures, degrading image quality [21]. Striking a practical balance between flying at greater altitudes, accepting some information loss, and minimizing total scanning duration is thus key to UAV image acquisition.
In the field of crop yield estimation using UAV imagery, a broad range of modeling strategies has been tested. The most commonly deployed algorithms span machine-learning (ML)-centered methods and linear regression [22]. ML-based techniques, including Neural Networks (NN), Random Forests (RF), and Support Vector Machines (SVM), have demonstrated strong predictive performance for crop yields and currently dominate the research landscape [23-25]. Xu et al. [26] turned to a U-Net architecture to semantically segment cotton bolls from imagery. Following the registration and fusion of multispectral UAV time-series captures spanning 13 growth intervals, a Bayesian regularized Backpropagation neural network was constructed to estimate yield, drawing on VIs and a metric obtained from the segmentation outputs. In the context of relatively sparsely sown spinach plots, instance segmentation via Mask R-CNN was employed to assist with plant counting, overcoming difficulties introduced by non-vegetation pixels within UAV images [4]. Although ML models can capture intricate, high-order relationships and patterns, their success typically hinges on the availability of large amounts of data. Procuring data at this scale can prove costly and damaging, a factor that is particularly salient for calibration sample plots located in commercial farm fields.
By comparison, statistical regression models represent a less resource-intensive option for tackling yield prediction problems. Working with modest datasets and limited computational capacity, regression approaches explicitly probe the main effects and the interplay between independent variables on the outcome variable. Prior research employing statistical regression frameworks has yielded favorable results in yield-prediction studies for crops such as red fescue, corn, soybean, and barley foliage [18, 27, 28].
Despite these successes observed across a variety of settings, a gap persists in the published literature regarding yield prediction for leafy vegetables with extraordinarily dense canopies under commercial farming conditions. As far as we are aware, the investigation that most closely resembles ours tested 10 spinach genotypes under differing water regimes, applying bootstrap forest partitioning and partition rank fraction to identify phenotypic predictors of fresh and dry spinach biomass and water-use efficiency [5]. Drawing on those predictors, a random-effects model was built to accommodate genotype, treatment, and replicates as random effects. Among plant height, canopy cover, canopy volume, and four VIs, canopy volume, NDRE, and ExG were the best predictors overall. These observations partly coincide with what emerged from our own study, a point that will be elaborated upon in later parts of this paper.
The overarching aim of this work is to develop a framework for rapid predictive mapping of green vegetable crop yields. In particular, the investigation pursues the following aims: 1) to formulate a data collection protocol covering both UAV image capture and ground-truth yield measurement suited to a commercial farming context; 2) to devise an efficient image processing pipeline for UAV orthomosaic rotation and segmentation; 3) to ascertain the most robust VIs out of a collection of 12 indices commonly drawn upon for yield prediction, and to craft a multiple linear regression model capable of predicting spinach yields spanning several growth stages; and 4) to produce yield maps that inform effective harvesting choices and crop management strategies. To showcase the methodology, we examined the feasibility of conducting fast, cost-effective yield mapping for spinach, a quintessential leafy green known for its extremely dense canopy.
Field experiments were undertaken in four spinach fields across the 2021 and 2022 growing seasons at VegPro International Inc., a commercial farming operation located in Sherrington, Quebec, Canada. The complete data gathering and processing sequence is illustrated in Figure 1.

Figure 1. The data collection and processing protocol during the 2021 and 2022 growing seasons: (a) The MicaSense ALTUM-PT multispectral sensor was calibrated with a MicaSense Calibrated Reflectance Panel. (b) One of the GCPs was placed in Field CA303. The white flags mark the GCP to protect it from potential damage from farm activity. (c) The RGB composite of the multispectral orthoimage obtained on July 15, 2022. (d) Three representative sampling areas with low, intermediate, and high biomasses were manually harvested on July 22, 2022.
RGB photographs were captured using a DJI Phantom 4 Pro drone fitted with a 1-inch 20MP CMOS sensor (DJI Phantom 4 Pro-Drone, SZ DJI Technology Co., Ltd., Shenzhen, China). At the same time, multispectral imagery was obtained by mounting a MicaSense Altum-PT sensor (MicaSense Altum-PT Sensor, MicaSense Inc., Seattle, USA) onto a DJI Matrice M600 Pro airframe (DJI Matrice M600 Pro-Drone, SZ DJI Technology Co., Ltd., Shenzhen, China). This multispectral instrument records across six distinct wavebands: red, green, blue, near-infrared (NIR), red edge, and thermal infrared. Each multispectral band yields a resolution of 3.2MP, the panchromatic band reaches 12MP, and the thermal infrared channel operates at 320 × 256 pixels. Before every flight, the sensor was calibrated against a MicaSense Calibrated Reflectance Panel. The calibration device and the pre-flight preparation of the multispectral sensor are depicted in Figure 1a. To georeference the UAV images, six ground control points (GCPs) were positioned at intervals across the field. Figure 1b shows a representative GCP installed on-site. The geographic coordinates of these GCPs were registered using two handheld global navigation satellite system (GNSS) receivers (Garmin eTrex 20x, Garmin Ltd., Olathe, USA), which provided positional accuracy within 2 m.
Our investigation relied on multispectral imaging to analyze spinach yield. Visible light absorption and reflection from the canopy were assessed through the red, green, and blue channels, with these measurements serving as indicators of chlorophyll concentration and water status—both critical determinants of plant health and vigour. The NIR band served as a cornerstone of the VIs used to gauge crop condition, stress, and growth. Owing to its sensitivity to chlorophyll fluctuations, the red edge band delivered meaningful insight into the plants’ physiological condition. Canopy temperature, a primary metric for water-stress evaluation, was captured in the thermal infrared band. Through an extensive comparative evaluation of multiple VIs, the indices best suited to studying spinach yield in our context were identified. The UAV imagery further enabled clear separation of crop material from non-vegetative surfaces, such as bare soil.
A summary of the datasets gathered over the two years is provided in Table 1. Three distinct aerial survey campaigns were conducted: an initial trial round in 2021, followed by two further rounds in 2022. Across all experimental fields, spinach beds were arranged as straight, parallel rows.
Table 1. Dataset summary.
Field | Seeding date | UAV imagery collection date | Harvesting date |
CA200 | – | 2021-Jul-15, 2021-Jul-19, 2021-Jul-21 | – |
CA303 | 2022-Jun-27 | 2022-Jul-15 | 2022-Jul-20 (Manual) |
CA304 | 2022-Jul-04 | 2022-Jul-15 | 2022-Jul-22 (Manual) |
CA221 | 2022-Aug-22 | 2022-Sep-12 | 2022-Sep-15 (Machine) |
The 2021 trial campaign generated a test dataset encompassing RGB and multispectral images of a spinach field at early, middle, and late phases of development, with each phase lasting under a week. Six orthomosaic maps corresponding to these three stages are displayed in Figure 2, where pronounced and easily discernible shifts in canopy size and colour are evident. For this 2021 test dataset, flight altitudes were configured at 70 m for the RGB sensor (ground sample distance (GSD) = 1.92 cm/pixel) and 100 m for the multispectral sensor (multispectral band GSD = 4.32 cm/pixel; thermal band GSD = 67.80 cm/pixel). As shown in Figure 2, imagery from both sensor types lacked the resolution necessary for detailed canopy-feature extraction, particularly for characterizing canopy density. Additionally, the radii of sparse patches and bare-soil hollows within spinach beds typically range from 2 cm to 5 cm. Capturing such non-vegetated gaps requires a GSD that is equivalent to or smaller than these dimensions. Given that the RGB sensor inherently has a higher resolution than the multispectral unit, a flight altitude of 70 m was also deemed unsuitable for the latter. Consequently, the flight height was uniformly reduced to 50 m for both the RGB sensor (1.37 cm/pixel) and the multispectral sensor (2.16 cm/pixel and 33.90 cm/pixel), achieving an optimal trade-off between total image acquisition time and the level of canopy detail preserved. Throughout each flight, the camera was maintained in nadir orientation, with the gimbal set to 90°, ensuring a direct downward view for canopy coverage assessment. The UAV captured images continuously while in forward motion, without any hovering or stopping. Configured with 75% to 80% forward and lateral overlap and a drone speed of 6 m/s, scanning two adjacent fields containing 20 beds required an average flight duration of roughly 0.5 hours.

Figure 2. RGB and multispectral UAV imagery collected in three growth stages of spinach in the Year 2021.
The second aerial imaging campaign took place on July 15, 2022, and produced RGB and multispectral imagery of two neighbouring spinach fields, CA303 and CA304. This dataset functioned as the training set for constructing the multiple linear regression model. The state of crop growth in fields CA303 and CA304 on the day of this second UAV survey is shown in Figure 3. Spinach in CA303 had advanced to its late developmental stage and was ready for net installation, a protective measure deployed ahead of harvest. Conversely, the spinach in CA304 was at the mid-growth stage and had comparatively small leaves. While the canopy in CA303 was dense enough to cover most sections of the beds, the soil surface in CA304 remained only partially concealed. Drawing on findings from the initial test dataset, two VIs—GNDVI [29] and CI-RE [30]—served as guiding references for pre-arrival sample selection in CA303 and CA304, respectively. The 24 target beds visible within the UAV imagery were segmented into uniform unit cells, each corresponding to the bed width (1.6 m) and extending 0.5 m along its length.
Furthermore, 50 manually harvested samples measuring 50 × 50 cm² were collected as ground-truth data for model calibration. The fresh mass of spinach from every sample was weighed and logged immediately after cutting. A square metal frame was used to maintain uniform sample dimensions during harvest. The resulting dataset comprises roughly equal numbers of samples with low, moderate, and high yields. Figure 1d illustrates three representative samples that were determined to possess differing levels of biomass on July 22, 2022. Weeds were cleared from all sampling zones before manual harvesting, and any areas displaying clear anomalies were removed from the dataset. Both the actual harvested locations of each preselected GNSS sampling zone and the associated bed indices were recorded.

Figure 3. Fields CA303 and CA304 on the day of UAV imagery collection, July 15, 2022. Field CA303 was at the late growth stage, while CA304 was at the middle growth stage.
A third dataset was acquired in September 2022 to serve as an independent validation set for the developed prediction model. This collection includes RGB and multispectral images of another spinach field, CA221, at a late growth stage. Within CA221, 30 sampling areas were defined. Owing to practical farm constraints, sample harvesting at this site was performed using tractors, potentially introducing bias due to differences in harvest mechanisms. To simulate the tractor-based harvesting pattern, the farm beds were divided into unit cells 0.5 m long, with widths matched to each bed.
Photo alignment, stitching, and orthomosaic generation were carried out in Agisoft (Agisoft Metashape 2.0, professional edition, Acuvec Geospatial, Calgary, Canada) once image acquisition was complete. The orthoimages were subsequently georectified using the recorded coordinates of the six GCPs.
The rectangular geometry of raised beds offers a distinct benefit when segmenting vertical orthomosaic maps. By annotating the boundaries of every bed using bounding boxes, the resulting annotation maps can greatly enhance the efficiency of image processing, computation, and analysis. Building on this geometric advantage, we put forward an orthomosaic map rotation algorithm. Initially, a rectangular box oriented perpendicularly to the image’s horizontal edge was specified as the region of interest (ROI) for the rotation procedure, containing mostly the beds and the walkways between them. The ROI’s position remains static as the rotation is applied. Recognising that rotating very large orthomosaic files places a heavy burden on computing resources, the process was broken into two stages: a coarse initial rotation, followed by a series of progressively finer adjustments. During the coarse stage, rotation angles ranging from 1 ° to 180° were tested. Subsequently, the angle was refined by shifting the decimal point by one place within each iteration. For example, if 45° were identified as the optimal coarse angle, the next iteration would evaluate angles from 44.1 to 45.9° in increments of 0.1°. In this manner, the image undergoes only 200 distinct rotations. Algorithm 1 outlines the algorithmic approach for establishing the optimal rotation angle for an image containing a specified ROI. The procedure iteratively sharpens the rotation angle while minimising the average column differences within the ROI. The getColumnDiff function determines the spread between the maximum and minimum ExG values within a buffer zone constructed around each column of the rotated image’s ROI. The buffer was roughly sized to match a single bed within the ROI. The algorithm ultimately returns the rotation degree associated with the lowest mean column difference.

Algorithm 1. The algorithm to conduct the orthomosaic map rotation. The algorithm first estimates a coarse rotation angle in the range of 1 to 180°, then determines the precise rotation angle using the same function.
Figure 4 demonstrates cases of ExG transition within a region of interest (ROI) with precise and imprecise orientations. Selecting a typical, small-scale ROI, as shown in Figure 4a, significantly reduces the orientation algorithm’s processing time and minimizes the presence of features unconnected to the rotation, such as access roads. As depicted in Figure 4b, the average variation between the highest and lowest mean ExG values within the buffers reached its peak at the optimal rotation angle. For instance, the accurately oriented image represented by the orange line yields a substantially higher average variation than the poorly oriented image represented by the blue line.

Figure 4. An example area was selected as the ROI in the UAV orthomosaic of a spinach field in its early growth stage in July 2021 to determine the angle of rotation: (a) The patterns of ExG values in the ROI of correct and wrongly rotated orthoimages, and (b) The mean ExG intensity of each column in the ROI of the correct and wrongly rotated orthoimages.
To separate the raised beds from the intervening pathways, image thresholding and binarization were applied to the reoriented images. The ExG-composite served as the grayscale baseline for this binarization process. In this research, an initial threshold was set to the 25th percentile of connected pixel counts across all objects in the binarized frame, which was then fine-tuned through multiple practical trials. This threshold successfully separated the target orthomosaic into a foreground containing green vegetation and a background containing soil and miscellaneous items. After binarization, minor objects containing few connected components were purged, as these typically represented wrongly identified non-plant elements or weeds growing in the pathways.
The subsequent phase of identifying bed boundaries was performed using the resulting binary image. Under real field conditions, both crops and weeds frequently sprout outside designated growing beds, making row identification more challenging. To resolve this challenge, any column with fewer than 80% vegetation pixels was set to all zeros. This technique enhanced row identification precision by eliminating pixel noise and mapping the vertical edges of each bed involved, iteratively looping over a chosen span of rows to detect where values switched from 0 (background) to 1 (foreground). Every selected row had to intersect the same number of beds to generate a matching quantity of transition points. Rows containing residual noise or tiny fragments within the pathways were detected and bypassed. The horizontal bounds were established by identifying the top and bottom non-zero pixels that settled within these vertical bed edges. Algorithm 2 details the matching pseudocode utilized to detect these vertical bed boundaries. Because bed lengths across a single field can vary and be disconnected, the ROI designated for boundary detection, RB, had to encompass all target beds. If it did not, those beds were bypassed during processing. When the algorithm detected the expected, consistent number of beds, it updated the edge coordinates accordingly. It automatically bypasses rows showing pathway noise to deliver the definitive left and right bed edges.

Algorithm 2. The algorithm to conduct vertical boundary delineation.
For this research, beds were divided into identically sized cells mapped with recorded boundaries. Positional offset buffers were generated for each gathered sample to correct discrepancies in GNSS coordinate data. Figure 5 highlights an example of this positional offset buffer designed for a harvested sample, spanning three neighboring cells. Due to GNSS inaccuracies, the physical sample site may deviate from the intended sampling zone and from its logged coordinates. Consequently, the two neighboring cells directly above and below the true sample zone were integrated to form the offset buffer. Data metrics for a sample site—including the mean, median, and VI calculations—were extracted from the collective pixels contained within that specific buffer zone.

Figure 5. The buffer created for a manually harvested sampling area for the training dataset.
A suite of 12 multispectral-derived VIs, tied to crop productivity and physiological health, was selected as candidate predictors for the mathematical model (Table 2). Due to the reflectance of underlying soil and surrounding elements, non-zero values for indices such as ExG frequently occurred even in zones entirely devoid of biomass. To separate genuine vegetative pixels from non-vegetative background noise, a metric called the vegetation fraction (VF) was established. Specifically, an NDVI baseline of 0.6 was chosen to isolate the spinach canopy, and any pixel below this threshold had its NDVI value automatically reset to 0. This specific NDVI baseline was determined by first approximating the ideal range using Otsu’s method [31] and then conducting targeted evaluations of the VF’s descriptive performance. Ultimately, the VF was defined as the ratio of pixels with an NDVI exceeding 0.6 to the total number of pixels within the target spatial unit.
Table 2. Potential VIs for spinach yield prediction.
Vegetation index | Computation formula | Reference |
Chlorophyll Index – Red Edge (CI-RE) | ||
Chlorophyll Vegetation Index (CVI) | ||
Color Index of Vegetation (CIVE) | ||
Enhanced Vegetation Index (EVI) | ||
Excess Green Index (ExG) | ||
Green Leaf Index (GLI) | ||
Green Normalized Difference Vegetation Index (GNDVI) | ||
Modified Green Red Vegetation Index (MGRVI) | ||
Nonlinear Vegetation Index (NLI) | ||
Normalized Difference Red Edge Index (NDRE) | ||
Normalized Difference Vegetation Index (NDVI) | ||
Optimized Soil Adjusted Vegetation Index (OSAVI) |
The foundational training dataset comprised 50 distinct samples, including two control locations with zero biomass and a final sample intentionally collected from a section exhibiting visible vegetative anomalies. Because maintaining a minimum of 10 observations per predictor in a linear regression framework is critical for generating reliable forecasts and statistical inferences [40], the total number of independent variables in our multiple linear regression architecture was limited to 4 or fewer. We initially generated an empirical correlation matrix to identify which VIs showed the highest pairwise alignment with biomass, VF, canopy temperature, and the 12 candidate indices, thereby preventing multicollinearity. The variance inflation factor (VIF) was also used to monitor multicollinearity. Thereafter, a combination of regression trees and stepwise multiple linear regression was used to rank the candidate VIs by their ability to explain fluctuations in biomass.
The structured multiple linear regression model is formulated as follows:
(1)
Where βi represents the mathematical coefficients, xi indicates the chosen VIs alongside their interactive terms, ϵi represents the random error component, and Yi denotes the crop yield. In multiple scenarios, the equation was calibrated without the intercept βo, since crop yield logically drops to zero when both the VI and VF are zero. Following model estimation, the core assumptions of linear modeling were verified via a visual analysis of the residuals. A Box-Cox transformation is destined for the dependent variable—meaning the actual harvest yield of the sampled zone—should the prerequisite of data normality be breached. The top-performing model was chosen by balancing the adjusted coefficient of determination R2), the Akaike information criterion (AIC), and the Bayesian information criterion (BIC). The ideal architecture was required to minimize both AIC and BIC while maximizing the adjusted $R^2$, as this statistical pairing balances superior explanatory fit with mathematical parsimony. Once the premier model was established, an analysis of highly influential data points was performed, which was vital for our training dataset given its constrained sample size [41]. Suspected outliers and influential points that could skew the regression trajectory or violate model assumptions were thoroughly scrutinized using Cook’s distance [42], DFFITS, and DFBETA [41].
The estimated mathematical regression model is structured as:
(2)
Where signifies the estimated vector of coefficients β, X denotes an n×p data matrix containing the explanatory variables, and Yˆ represents the forecasted yield. By discarding a single observation at a time, DFFITS quantifies the resulting shift in the predicted value for each data point; DFBETA tracks the modifications to the individual coefficients when a single observation is systematically omitted; and Cook’s distance evaluates the comprehensive shift across all modeled outputs. The equations governing these three diagnostic metrics are defined below:
(3)
(4)
(5)
Where s(i)2 denotes the residual variance calculated when the ith row of X and y are completely removed from consideration, p signifies the total count of regression parameters, hii represents the ith diagonal component belonging to the hat matrix,
Model accuracy was measured using the root-mean-square error (RMSE) and the mean absolute percentage error (MAPE). An optimized model yielding minimal RMSE and low MAPE scores on the validation data demonstrates robust predictive capability. The formulas for these performance metrics are:
(6)
(7)
Where yi indicates the actual ground-truth harvest measured from the target plot, yˆi represents the predicted yield for that same plot, and N represents the complete sum of sampled plots.
Bootstrap validation and leave-one-out cross-validation (LOOCV) were performed to evaluate how well the trained model performs on independent datasets that mirror the characteristics of the training data. Adhering to a strict internal-external validation protocol, we first conducted internal verification of the proposed forecasting model. Because internal validation trends are highly indicative of potential failure in subsequent external validation [43, 44], any model that generated subpar outcomes in the internal testing phase was barred from proceeding to external evaluation.
External validation was conducted using a distinct third dataset collected in September 2022 to assess the generalizability of the proposed framework, following successful internal validation. In practical agricultural environments, operational variables such as differing levels of crop damage, variations in crop dimensions, and other physical deviations can compromise a model’s predictive precision. To counteract potential discrepancies and systematic biases present between the original training dataset and the external harvest data, a normalization routine was applied to the validation data, and scaling parameters were introduced to calibrate the mathematical equations. By running these calibrated models against an independent validation dataset, we verified their overall resilience and adaptability across different farming management practices.
Figure 6 shows the visual results for each phase of the orthomosaic image processing sequence. The initial, raw orthomosaic shown in Figure 6a was compiled utilizing Agisoft software. As a primary measure, the image was digitally rotated to ensure that every planting bed aligned perfectly along a vertical axis, as shown in Figure 6b. Following this alignment, Figure 6c illustrates the image produced by an optional step that adds border padding to the rotated image, thereby filling the voids created during geometric rotation. Next, an ExG threshold was evaluated and chosen to convert the rotated orthomosaic into a binary format. As shown in Figure 6d, minor elements, such as weeds along the walkways, were inadvertently captured in the initial binary mask. To remedy this, the subsequent step purged any continuous object containing fewer than 100,000 pixels, a value dictated by calculating the 25th percentile of the pixel counts of all interconnected mask features. Despite this cleanup, obscure bed edges remained visible in Figure 6e due to residual pathway noise and the incomplete elimination of the scanned bed structure. We subsequently zeroed out any column that failed to contain at least 80% valid vegetation pixels, yielding the refined results shown in Figure 6f. This clean, filtered binary mask was then applied directly to the rotated orthomosaic, yielding the finalized output scene shown in Figure 6g.

Figure 6. Representative results derived using the proposed image processing workflow.
Figure 7 displays the variance graphs for the spectral indices derived from the 50 field plots across zones CA303 and CA304. Individual indices proved far more effective than their counterparts at distinct stages of crop maturity; for instance, a strong association emerged between CI-RE and NDRE and the mature crop weight shown in Figure 7a. Conversely, as shown in Figure 7b, both CI-RE and NDRE exhibit negligible relationships with total mass during intermediate development. As a consequence, this pair of spectral metrics lacked the consistency required to model the interplay between structural canopy features and total weight when evaluating composite maturity periods.

Figure 7. The correlation matrices between manually harvested biomass, canopy temperature, and the 12 selected VIs of the training dataset. The cell’s color intensity indicates the magnitude of the correlation. Red cells represent strong positive correlations, while blue cells suggest negative correlations: (a) Correlation matrix of the 15 data points from CA303, in which UAV imagery was collected 5 days before harvesting, (b) Correlation matrix of the 30 data points from CA304, in which UAV imagery was collected 7 days before harvesting, and (c) Correlation matrix of all 50 data points from both CA303 and CA304.
The collective feedback from all exploratory trials—including tree-based regressions, iterative multivariable regressions, and the visual trend grids (Figure 7)—unanimously indicated that ExG was the most dependable index for tracing variations in spinach output across blended maturity timelines. The metrics VF and MGRVI emerged as the next two most influential predictors. This hierarchy of index performance matches the experimental conclusions published by Awika et al. [5]. After analyzing numerous iterations of parameter configurations and cross-product terms, the final multivariable estimation equation was framed as follows:
(8)
Where Yield indicates the final weight (kg/m) gathered from a specific collection plot, ExG denotes the median ExG score extracted solely from the plant-covered pixels within that plot, VF represents the calculated vegetation fraction for that designated zone, and VF signifies the compound interaction parameter combining the VF and ExG inputs.
VIF tracking confirmed an absence of redundant data inflation between ExG and VF within this mathematical structure. Based on the adjusted R2, AIC, and BIC summaries in Table 3, along with the variance cross-examinations detailed in Table 4, equation M1 was singled out as the superior framework. It minimized both the AIC and BIC scores while maintaining a highly robust adjusted $R^2$, striking the ideal balance between data parsimony and descriptive power. Following the selection of M1, an evaluation of high-leverage data anomalies was executed on the base data. Five distinct plots were flagged as disproportionate outliers via Cook’s Distance, DFBETA, and DFFITS. Purging these high-leverage anomalies reduced the final sample size to 45 plots. The adjusted model conformed cleanly to all standard assumptions of linear estimation, achieving an adjusted R2 score of 0.98.
Table 3. Comparison of candidate models.
|
Because of the distinct numerical scales inherent to the Box-Cox-transformed frameworks, the AIC and BIC outputs for formulas M5 and M6 cannot be directly compared with the baseline, unaltered expressions. We ultimately bypassed the transformations used in M5 and M6 because applying the Box-Cox transformation did not yield any visible improvement in satisfying the underlying linearity assumptions.
Table 4. Comparison of the ANOVA tables for the candidate models.
Index | Residual Degrees of Freedom | Pr(>F) | F-statistic | Sum of Squares | Degrees of Freedom | Residual Sum of Squares |
M1 | 46 |
|
|
|
| 583,883 |
M2 | 45 | 0.5228 | 0.4154 | 5243 | 1 | 578,640 |
M3 | 43 | 0.1660 | 1.8748 | 47,330 | 2 | 531,311 |
M4 | 42 | 0.7642 | 0.0912 | 1151 | 3 | 530,159 |
For the same reason, architectures M5 and M6 were excluded from this multi-model variance comparison due to scale differences.
Our methodology initially validated the internal stability of the equation via resampled bootstrap arrays and Leave-One-Out Cross-Validation (LOOCV). A stable adjusted R2 of 0.98, with 95 % confidence bounds [0.97, 0.99], was established across 1000 bootstrap iterations, demonstrating model resilience. The cross-validation routine yielded a perfect R2 of 1 and an RMSE of 0.31 kg/m.
Spurred by this strong showing during internal testing, an independent external validation was conducted using field data captured in September 2022 to gauge the system’s true predictive power and stability. This separate validation group, however, was mapped from a spinach field at a much more advanced stage of maturity than plots CA303 and CA304. Additionally, these validation sections were reaped using industrial harvesting machinery. Figure 8 contrasts the two field zones gathered by hand versus machine. We observed systematic deviations introduced by these contrasting reaping strategies. Consequently, a correction coefficient of 1.198 was introduced to adjust the initial predictions. This correction factor was derived by running an origin-intercepted linear estimation comparing the raw forecasts directly against the measured field yields. The definitive validation findings are plotted in Figure 9 and summarized in Table 5. A comprehensive MAPE of $20.9\%$ was calculated across the entire validation pool. A specific cluster of mid-tier yield plots yielded an RMSE of $0.19\text{ kg/m}$ and a MAPE of $9.0\%$. In contrast, the lowest-yielding and highest-yielding clusters recorded less precise outcomes, finishing with an RMSE of $0.54\text{ kg/m}$ and $0.50\text{ kg/m}$ paired with MAPEs of $39.2\%$ and $19.4\%$, respectively.

Figure 8. Comparing the leftovers from manually harvested and machine-harvested spinach beds. (a) A sampling area manually harvested in CA304, and (b) a section of a machine-harvested spinach bed.

Figure 9. The ground truth yields versus the scaled predicted yields. The model gives a relatively low MAPE and RMSE for medium-level yields.
Table 5. External validation results from the September 2022 dataset.
Ground truth yield range | MAPE | RMSE |
All validation data points | 20.9% | 0.43 kg/m |
Yield < 1.49 kg/m | 39.2% | 0.54 kg/m |
1.49 kg/m ≤ Yield ≤ 2.20 kg/m | 9.0% | 0.19 kg/m |
Yield > 2.20 kg/m | 19.4% | 0.50 kg/m |
To clear a path for unmediated benchmarking against historical literature, the baseline error was scaled to a spatial density format kg/m2 using an average crop bed width of 1.6 m. The collective RMSE across all independent validation samples was 0.27 kg/m2, representing a significant reduction compared to the 0.87 kg/m2 reported by Awika et al. [5] for fresh-weight spinach predictions. This step forward in precision is likely tied to several factors, including our distinct architectural assumptions, our image-isolated data preparation, and our target feature-extraction logic.
Figure 10 highlights the divergence in the multivariable data space between our original training group and the separate validation cohort. Within the external validation array, the vast majority of observations clustered at higher ExG and VF values than the samples in the training pool. This environmental disparity between the training and validation horizons introduces an extrapolation hurdle for the algorithm when handling completely unobserved agricultural environments.

Figure 10. The training dataset and the validation dataset. The validation dataset was from a later growth stage than both fields in the training dataset, which results in higher ExG and VF values.
Projections were converted into spatial yield maps to serve as a geographic reference for identifying variations in crop density. These digital layouts provided an all-encompassing snapshot of vegetative conditions across the acreage, acting as an operational guide for ordering harvest sequences and designing targeted field interventions. The cultivation rows were divided into uniform cell segments, each 0.5 m or 1 m long, determined by the physical footprint of automated harvesting machines. This grid framework simulated the operational patterns of mechanical harvesters in the real world. Figure 11 displays a localized yield map forecasting outputs for zones CA303 and CA304 at a 1 m cell resolution. The rich green segments across the plot indicate high crop volumes that should be prioritized in harvesting schedules. Conversely, the yellow and red blocks mark underperforming spots, flagging possible vegetative threats such as water deficits or localized blight. The resulting map shapes a geographic pattern of crop distribution that closely mirrors the physical field assessments recorded during the project, proving its value as an administrative asset.

Figure 11. Predicted yield map for unit areas in fields CA303 and CA304 (unit area length = 1 m).
This investigation confirmed that aerial drone mapping is a highly capable tool for capturing the spatial configuration, volume, and physiological state of crops across an agricultural landscape. Even as modern precision agriculture (PA) workflows achieve greater operational viability within commercial farming, their widespread integration remains restricted by various obstacles, including the baseline willingness of agricultural operators to adopt PA innovations [45]. Within the current automated pipeline, a notable constraint of the bed-edge detection routine is its reliance on case-specific threshold parameters, which limit its cross-site adaptability when migrating the framework to alternative farming layouts or distinct crop types. Although cluster analysis routines could be integrated to chart these boundaries, highly adaptable row-extraction pipelines can likely be realized using deep learning methodologies [46].
We observed several fundamental hurdles when deploying drone-based imaging within highly intensive vegetable production systems. The data acquisition protocol frequently encountered operational bottlenecks due to real-world farming management. For instance, to safeguard the crop from adverse weather and standard field operations, spinach stands are typically managed beneath protective nets throughout the latter half of their developmental timeline, with these covers peeled back only moments before reaping. Consequently, aerial scans had to be conducted between 3 and 5 days before net deployment to generate harvest forecasts. This temporal lag between drone scanning and the actual physical harvest introduced unmonitored variance, unquantifiable ambiguity, and external confounding variables. Although fields with minimal leaf coverage yielded highly volatile forecasts, the vast majority of validation tests demonstrated a clear capacity to estimate crop biomass destined for harvest under a 40 % margin. Predicting with imagery captured closer to harvest inevitably curtailed this ambiguity.
Beyond the specific timing of data-collection flights, contemporary harvesting systems yield limited crop-weight data, coupled with structural positioning errors in the precise start and stop locations of individual mechanical cuts. A total of only 50 plot samples, each measuring 50 × 50 cm2, were manually reaped to calibrate the estimation architecture, a restriction necessary to avoid substantial crop destruction that would incur direct financial penalties for the agricultural operation. We also observed that the physical cutting height was manually set by the operator and fluctuated according to the perceived state of the crop canopy. As detailed in Section 3.3, data calibration based on manual plot clipping may not accurately reflect the realities of industrial machine harvesting. Simultaneously, commercial harvesting equipment failed to log biomass weights within clearly demarcated spatial zones consistently.
Owing to operational constraints, including the farm’s commercial margins and the risk of physical crop degradation, this preliminary research targeted a selective group of spinach cultivars. In future exploration, the yield forecasting framework must undergo deeper validation and expansion to encompass broader targets, including expanded sample cohorts and a richer diversity of crops to support wider operational use cases and generic deployment. Within this experimental context, ExG and NDVI were identified as the most effective parameters for estimating spinach weight, aligned with the core goals of our study. Nevertheless, when dealing with alternative crop species or differing geographic regions, index selection and model pairing must be conducted with tailored parameters. Furthermore, verifying that baseline statistical assumptions hold remains imperative for the practical application of these equations.
A direct comparison was drawn between standard RGB and multispectral drone imagery to weigh the relative operational advantages of both sensor types for spinach weight forecasting. Given the high financial outlays required by multispectral imaging equipment, RGB drone configurations offer a more accessible, economically viable alternative that delivers superior spatial resolution. However, our comprehensive analysis—blending model calibration, performance validation, and correlation matrices—unmasked the critical value and rich information content of VIs derived from NIR and IR wavelengths, which showed a strong relationship with final crop weight. Within our structured framework, we introduced an NDVI-based VF parameter to serve as a proxy for vegetation density. While the main effect of VF was not statistically significant in the equation, the interaction between ExG and VF was significant. Consequently, equations containing the ExG × VF cross-product term accounted for a larger portion of the data variance. Conversely, the thermal imaging band used to track canopy temperature performed inadequately at a flight altitude of 50 m, yielding a GSD of 67.80 cm/pixel. The structural detail provided by the thermal sensor was mismatched for this application, given that individual spinach leaves measure less than 10 cm on average. Additionally, surface canopy temperature exhibited a weak relationship with total biomass. For these reasons, multispectral drone configurations carrying at least R, G, B, and NIR channels are strongly recommended for spinach yield forecasting.
On the whole, our predictive architecture demonstrated a robust fit across the training matrix and generated precise forecasts during internal cross-validation and in external mid-tier validation plots. For the low-yielding and high-yielding samples within the independent validation cohort, the model manifested reduced forecasting accuracy due to a clear mismatch within the explanatory feature space (Figure 9). Due to the rigid production timelines and operational schedules of the commercial farm, the plots gathered for external validation were clipped at a more mature developmental phase than those constituting the training pool. Latent variables driving yield heterogeneity, such as moisture stress, fertilizer distribution patterns, and localized crop diseases, were not directly quantified. These environmental, genotypic, and interactive confounders could be modeled through expanded field tracking and future empirical assessments [47, 48]. The mathematical relationships established by these data-driven frameworks are fundamentally dependent on the calibrated field observations used to build them. The model’s forecasting scope was constrained by the training dataset, leaving it vulnerable to extrapolation errors during deployment. In this experiment, two consumer-grade handheld GNSS units were utilized to log the spatial positions of the plots. While budget-friendly, the 2-meter positional bias of these units introduces mapping errors. Spatial buffer zones were established around each plot to absorb the deviations caused by these errors. A superior alternative is to deploy a real-time kinematic (RTK) positioning network to achieve highly accurate, pinpoint measurements, with spatial positioning errors of less than 3 cm [49].
An additional source of error stemmed from the inherent limitations in the sensitivity of VIs when analyzing closed, dense spinach canopies. The saturation ceilings of these indices require deeper analysis to map out a reliable, operational boundary for crop weight estimation. Crop-specific and cultivar-adapted spectral indices could be identified using data mining frameworks and band-fusion models [50]. However, assembling such specialized index structures demands a massive volume of underlying data.
In this investigation, spinach yield forecasts were successfully modeled using multispectral drone imagery. This research initially presented an automated drone orthomosaic processing pipeline that substantially improves the operational throughput of subsequent downstream tasks. Utilizing a dataset collected across two adjoining spinach fields during their intermediate and advanced maturity phases, ExG, along with NDVI-derived VF values pulled from the multispectral imagery, were identified as the most dependable VIs across multi-stage crop timelines. Compared with historical studies, the higher flight altitude chosen for this project reduced total data collection time to under 0.5 h, thereby minimizing potential data variance and environmental noise caused by shifting outdoor conditions while balancing the minor data loss associated with lower spatial resolution. This investigation subsequently developed a multiple linear regression model to predict spinach yield from the extracted VIs. Despite operating on a compact dataset comprising only 50 calibrated field plots, the model achieved a stable fit on the training data and yielded precise forecasts when evaluated against mid-tier yield validation plots, achieving an RMSE of 0.192 kg/m and a MAPE of 9.0 %. At present, the true predictive power of this framework remains constrained by the representativeness and positional accuracy of the calibration samples. A viable path toward system enhancement involves minimizing errors and location ambiguities associated with these calibration plots while expanding data diversity across the feature space. This objective can be achieved by logging crop metrics across a wider array of growth phases. Persistent challenges also remain in isolating confounding factors and unmapped variables that emerge during the temporal window between drone imaging flights and commercial harvesting activities.
We acknowledge the support from Drone Des Champs (Laval, Quebec, Canada) and Vert Nature Inc., a division of VegPro International Inc. (Sherrington, Quebec, Canada), for data collection of UAV imagery and spinach yield for the AAFC AgriRisk Initiatives Program.
None
None
None
Open Access The author(s) retain copyright. This article is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. It may be shared and adapted for non-commercial purposes with appropriate attribution, an indication of changes, and distribution of adaptations under the same license. Third-party material may be subject to separate terms identified in its credit line. View the license at https://creativecommons.org/licenses/by-nc-sa/4.0/.