Peanut yield prediction with UAV multispectral imagery using a cooperative machine learning approach

: The unmanned aerial vehicle (UAV), as a remote sensing platform, has attracted many researchers in precision agriculture because of its operational flexibility and capability of producing high spatial and temporal resolution images of agricultural fields. This study proposed machine learning (ML) models and their ensembles for peanut yield prediction using UAV multispectral data. We utilized five bands (red, green, blue, near-infra-red (NIR) and red-edge) multispectral images acquired at various growth stages of peanuts using UAV. The correlation between spectral bands and yield was analyzed for each growth stage, which showed that the maturity stages had a significant correlation between peanut yield and spectral bands: red, green, NIR and red edge (REDE). Using these four bands spectral data, we assessed the potential for peanut yield prediction using multiple linear regression and seven non-linear ML models whose hyperparameters were optimized using simulated annealing (SA). The best three ML models, random forest (RF), support vector machine (SVM) and XGBoost, were then selected to construct a cooperative yield prediction framework with both the best ML model and the ensemble scheme from the best three as comparable recommendations to the farmers


Introduction
Maximizing crop yield by keeping the cost as low as possible is one of the main goals of many precision agriculture systems.Early identification and prediction of crop traits such as crop disease, biomass and yield are beneficial as they allow the farmer to manage crop growth and harvesting well in advance [1].Therefore, the estimation of yield and related parameters such as biomass, disease, plant health, nitrogen status and soil conditions has been a frequent topic in the literature [2][3][4][5][6][7][8].Early detection and management of problems associated with farming can help increase yield and subsequent profit, and better estimation of the yield offers farmers and processors numerous benefits in terms of harvest planning, storage and transportation scheduling, sale and price negotiation and other business decisions.
The traditional yield prediction models are based on ground samples, collected from the farm, and extrapolating these samples throughout the field to estimate the yield [9].These methods are not only costly and labour-intensive but also poorly represent the spatial variability of yield over the field.An alternative approach is a non-destructive sampling method for yield estimation which uses a remote sensing platform to acquire field images and employs various vegetation indices (VIs) to establish a regression model for crop yield [10].Recent works on UAV-based remote sensing [11][12][13][14] showed the efficiency of crop traits such as yield estimation using multispectral images and ML methods [15].For instance, Guo et al. [14] utilized the multispectral images of maize with a Mini-MCA camera embedded in the drone to estimate the soil and plant analyzer development (SPAD) values.They also implemented various ML methods such as SVM and RF where SVM outperformed the RF with an R 2 of 0.81 in estimating SPAD value.
For crop yield estimation using UAVs, the VIs derived from the multispectral and RGB images were extensively utilized by various works [12,16,17].These studies established a strong correlation between crop yield and VIs.For instance, the normalized difference vegetation index (NDVI) is linearly related to wheat yield [17].Similarly, a yield map for rice and wheat crops was developed using NDVI from multispectral images [12].Since the NDVI has a saturation issue with high biomass at the early growing stages of the crop, a few other VIs such as enhanced vegetation index (EVI) and soil-adjusted vegetation index (SAVI) were also assessed for yield estimation [16].
Since UAV has the flexibility in revisiting the field and can capture high-resolution imagery in comparison to satellite imagery, it has opened possible avenues for cheaper and more frequent image acquisition to support more accurate estimates of crop traits using predictive approaches such as ML methods [18,19].For instance, Zhou et al. [18] implemented a convolutional neural network (CNN) for soybean yield estimation with high-resolution UAV imagery.They used crop features such as plant height, canopy colour and canopy texture to train the neural network.Their model achieved an R 2 of 0.78 with a root mean square of 391.0 kg/ha.Similarly, Guo et al. [19] implemented four ML models, a backpropagation neural network (BPNN), SVM, RF and extreme learning machine (ELM), for maize yield predictions using VIs.They showed that SVM with a modified red-blue vegetation index (MRBVI) was effective in monitoring maize yield.Besides the image feature, Guo et al. [20] employed the combination of phenology, climate and geography data to estimate rice yield with statistical and ML methods.However, their proposal of building the yield prediction model with an individual ML method missed the cooperative nature of the ensemble approach where if one method fails to capture the correct prediction, another ML method can pick the right prediction.Considering such limitations, this study first establishes the relationship between UAV images and peanut yield at the individual growth stage.Based on such a relationship and existing ML methods, an accurate and cooperative ensemble method for yield prediction is proposed and validated using peanuts as a study crop.
Peanut is an oilseed crop grown in many countries over the world.In Australia, the peanut is mainly grown in Queensland, in the northeast of Australia.Its growth cycles include various stages: planting, emergence, emergence to first flower (FF), flowering (F), pegging, pod-filling and harvest maturity (HM).It takes around three to five months from planting to maturity [21].It is important to monitor peanut growth to assure the quality and quantity potential of peanuts.Owing to such successes of UAV-based remote sensing for crop yield estimation, this study aims to develop peanut yield estimation models based on UAV multispectral images at the late growth stages in Queensland.This study intends to a) investigate the relationship between spectral information acquired with UAV and peanut yield at different peanut growth stages.b) evaluate multiple linear regression and seven existing ML (non-linear) models for yield prediction using SA-based hyperparameter optimization.c) select the best learning models and design an ensemble approach for better yield prediction. d) compare the performance of the best ML model and the ensemble approach for yield prediction.The paper is organized as follows.Related works are reviewed in Section 2. The study site, data collections, experimental design and methodologies are presented in Section 3. Experimental results and discussion are reported in Section 4. Finally, conclusions and future works are summarized in Section 5.

Related works
Remote sensing has been widely used for crop yield prediction because of its ability to cover large geographical areas from the country level to the continent level [22].Forecasting with remote sensing tries to build a prediction model in a non-destructive way by capturing field data with sensors [6].Recent works with UAVs [23,24] showed that it has a great potential to be used in precision agriculture because of their flexibility in flying, ability to capture high-resolution imagery and low cost compared to other airborne imagery such as satellite [25].However, these features vary in designs and sensors used for imaging on different UAVs [26].Sensors on UAVs play a vital role in data acquisition.Several types of sensors have been used with UAVs for crop monitoring.These include RGB sensors, multispectral sensors, hyperspectral sensors and thermal sensors [27].A few studies have proved the effectiveness of using UAV images in yield prediction.For instance, Ramos et al. [28] showed that NDVI, normalized difference NDRE and green normalized difference (GNDVI) were highly ranked indices for maize yield prediction using multispectral UAV imagery.
Studies on yield estimation using UAV-based sensors have increased in recent years.Zhou et al. [24] estimated grain yield using RGB as well as multispectral sensors.They investigated six RGB indices and seven multispectral indices at multiple growth stages of rice for yield estimation.Five regression models based on linear, exponential, logarithmic, polynomial and power functions were established.Their results showed that rice yield was best estimated at the booting stage with NDVI and visible atmospherically resistant index (VARI).However, this study did not explore the ML model for yield predictions.Corn grain yield estimation was proposed in [23] using VIs, canopy cover and plant density acquired through multispectral as well as RGB sensors.Six VIs were examined for grain yield prediction with an RMSE of 0.125 t/ha and a correlation coefficient of 0.99.Similarly, Geipel et al. [29] combined the spectral and spatial indices with a linear regression model for corn yield estimation and achieved an R 2 of 0.74.An artificial neural network (ANN) was implemented by Ashapure et al. [30] for tomato yield estimation using a combination of plant attributes, VI and weather information which achieved an R 2 of 0.70.The various ML models including LR, RF SVM and GPR were implemented by Matese and Di Gennaro [31] for vine yield estimation where the GPR achieved the highest R 2 of 0.80.
A regional regression model for crop yield prediction with UAV multispectral data was implemented by Bian et al. [32].They explored six ML methods such as SVM, RF and Gaussian process regression (GPR) and showed that GPR achieved the optimal prediction of wheat yield with R 2 = 0.87 at the filling stage.Similarly, multi-sensor data fusion and ML methods for wheat yield prediction were implemented by Fei et al. [33].They developed regression models using ML algorithms such as SVM, deep neural networks (DNN), ridge regression, RF and cubist.They achieved the highest R 2 values up to 0.69 when data from multiple sensors such as RGB, multispectral and thermal were combined and ensemble learning was implemented.

Materials and methods
The high-level setup required to carry out this work is depicted in Figure 1.First, the raw UAV images were captured and processed by following the standard UAV image processing pipeline [27,34].Second, the pre-processed images were divided into a region of interest, and plot-level data extraction was carried out.Third, the highly correlated spectral bands with peanut yield are selected and fed into both linear and non-linear ML models.Furthermore, these ML models' hyperparameters were optimized using SA.Finally, the best-performing ML models were selected to build a cooperative ensemble-based yield prediction framework.A detailed discussion of each activity is provided in the following sections.

Crop study area and yield data
Field data were collected from the Queensland Department of Agriculture and Fisheries research facility at Bundaberg in S. Queensland, Australia.The regional climate is categorized as sub-tropical with an annual average temperature of 27.8 C and average precipitation of 742.8 mm for 2018 (http://www.bom.gov.au/climate/data/).This study considered two field trials and each trial had 24 treatments/genotypes x 3 replications (72 plots) where each treatment has 2 rows x 5m.Therefore, there were 144 plots in total.Before planting the peanut, the soil sample was collected and sent for analysis.Then, the Gypsum @1.5 t/ha and potassium sulphate @70kg/ha was applied on 2017-11-20 to make the field ready for peanut plantation.The peanuts were planted on 2017-12-19 with inter-row cultivation and no herbicide treatments except some hand weeding and chipping.The soil type was red ferrosol as per the Australian soil classification.The 50mm of irrigation was applied three times dated 2018-01-23, 2018-02-26 and 2018-04-20.Similarly, the fungicide (Bravo @1.8L/ha) and fungicide (Amistar xtra 750ml/ha+ agral 100ml/100l) were applied four and two times respectively throughout the growth periods.No insecticide treatments were applied.The peanut trails were harvested on 2018-06-04 and threshed on 2018-06-19.
A destructive sampling method was used to collect peanut yield data for each plot.For this, a sample from a non-plot area was used to determine when the peanuts have reached full maturity.Once the peanuts reached full maturity, they were dug out with a mechanical digger and the bushes/peanuts were left to dry on the ground for 7-10 days.This allowed the bush and peanuts to dry which helped with the separation process during threshing.In the threshing process, the pods were removed from the bush with the peanuts going into a hessian bag and then labelled.Once the trials were harvested, kernel moisture was determined.If the peanuts were too high in moisture they were put onto bed dryers until they reached safe kernel moisture of around 9-10%.Finally, the extraneous material was removed through a pre-cleaner and each sample was weighed to determine the final yield which was expressed as tons per hectare (t/ha).

UAV image acquisition
The multi-rotor drone, Phantom 3 (DJI, Shenzhen, China) was used to collect the peanut field images.It consists of an integrated MicaSense RedEdge (Mica-sense, Seattle, WA, USA) with five spectral bands: Red (630-690 nm), Blue (460-510 nm), Green (545-575 nm), Near-infrared (820-860 nm) and Red-edge (712-722 nm).The images were captured at the various growth stages of peanuts at the height of 40 meters above the ground along with a parallel camera CCD angle to the ground.The side and forward overlaps of 60% and 90% were maintained in each UAV flight while capturing the images.The geo-referencing was carried out in the World Geodetic System (WGS) 1984 datum, Universal Transverse Mercator (UTM) Zone 55 projection.For this, six ground checkpoints were surveyed and marked with Real-time Kinematic (RTK), Global Positioning System (GPS) and ground data were registered with multispectral images which provide a spatial error of less than 2 cm across the field of study (Figure 2).The five growth stages of peanuts were mapped with the UAV flights listed in Table 1.

Plot-level data extraction
We followed the UAV image processing pipeline as outlined in [27] to extract the plot-level image data.We first transferred the raw UAV image into a computing platform to perform the image stitching using Pix4Dmapper (Pix4D S. A. Prilly, Switzerland) with a specific template "Ag Multispectral' included in the software package to rectify and mosaic the UAV images.Once the orthomosaic of the study area was achieved, the individual orthomosaic for each spectral band was stacked into a virtual raster using quantum geographic information system (QGIS) software [35].Then, an individual plot shapefile for each block (block1 and block2) was built using an open-source R package-FIELDimageR [36] which divides a whole field into individual plots.Finally, the individual plot-level data extraction was carried out by clipping the individual plot using the given shape file and the average of all pixels included in each plot is considered plot-level spectral information.Furthermore, the soil pixels were segmented from crop pixels using a Green Red Vegetation Index (GRVI) as defined in Eq (1).

GRVI
(1) where if GRVI ≤ 0.2, a pixel was masked out as a soil pixel; otherwise, the pixel was considered as a crop pixel.

Correlation analysis and band selections
The correlation results between the individual spectral band and peanut yield reported in Table 2 show that the first four growth stages (FF, F, P and PF) have a very low correlation with yield.Hence, we filtered out these growth stages from further consideration and choose the HM stage for yield prediction. Considering the individual spectral band correlation at the HM stage, the NIR (r = 0.68) and REDE (r = 0.49) bands have a higher correlation (greater than 0.40) in comparison to the other three bands.However, the other two bands Red (R) and green (G) have a highly significant correlation (r > 0.27) with yield, and the blue (B) band has a poor correlation.For instance, the correlation plots showing a positive relationship between yield and NIR (r = 0.68) and REDE (r = 0.49) are shown in Figure 3. Hence, the four spectral bands (R, G, NIR and REDE,) at the HM stage were selected to develop the peanut yield prediction model using ML as well as ensemble models.

Multiple linear regression
Multiple linear regression represents the linear relationship between a set of several independent variables and a dependent variable.It estimates the regression model by minimizing the sum of squared errors between the dependent variable and prediction by linear approximations.Here, we used individual spectral bands as independent variables and peanut yield as a dependent variable to build the MLR model.If X1, X2, X3 and X4 represent the four spectral bands (R, G, NIR and REDE) as independent variables and Y represent the dependent variable (yield), the multiple regression model for peanut yield estimation is defined in Eq (2).
where a1, a2, a3, a4 represent the regression coefficient and c represents the constant.

ML models
We consider seven existing ML models for yield prediction.These models range from support vector regressor (SVR) to multilayer perceptron neural network (MLP).Here we briefly summarized these models.

Support vector regressor
The SVM is a binary classifier based on hyperplane to separate multidimensional data into two classes [37].However, it can be used to resolve the regression problem using a margin of tolerance known as a SVR.It consists of two free parameters as regularization parameter (C) and epsilon which need to be optimized.

Decision tree
A decision tree (DT) is a non-parametric learning method which creates a set of decision rules to predict the target variable using certain criteria such as the Gini index or entropy [38].The decision tree's hyperparameter such as the maximum depth of the tree, minimum samples to split an internal node, and minimum sample required to be at the leaf need to be optimized for a given dataset.

Random forest
RF uses the decision tree as a basic regressor with bagging approaches [39].It built a forest of decision trees with random subsets of training data with the replacement of samples.Finally, the output of all trees is averaged to get the final prediction for a given sample [39].The random forest's hyperparameters that need to be optimized include a number of estimators, the maximum depth of the tree, minimum samples to split an internal node, the minimum sample required to be at the leaf, etc. [40].

Extra tree classifier
Extra Tree regressor (ETR) is also a meta estimator that uses the randomized decision trees on the random subsets of training data similar to a RF.However, it is different from RF regressors in the way that trees are constructed.In ETR, further randomness is introduced while constructing the splitting rule.Here, the thresholds for the splitting rule are drawn at random for each candidate feature and the best threshold among these randomly generated thresholds is chosen [40].It has a similar set of hyperparameters as of RF to be optimized.

AdaBoost
It is also a meta-estimator based on the adaptive boosting method of ensemble learning, which fits a sequence of weak learning trees such as small decision trees on a modified version of the dataset.A strong learner is obtained by combining all such weak learners using a weighted majority voting in each boosting iteration [41].The data modification at each boosting iteration consists of applying weights to each of the training samples.

XGBoost
XGBoost uses a boosting approach for ensemble learning.The combination of a group of weak learners can be performed either by boosting or bagging.XGBoost uses three kinds of boosting: gradient boosting, regularized boosting and stochastic boosting, which surge the overall performance of XGBoost [42].

Multilayer perceptron neural network
A multilayer perceptron (MLP) neural consists of one input layer, one-hidden layer and one output layer (Figure 4).The n-dimensional vector as input to a one-hidden layer (1-h) neural network will be transformed into an m-dimensional output vector using Eq (3).
where f and g are the activation functions; Aji represents input-hidden layer weights at the neuron j and Bkj is the hidden-output layer weights at output unit k.

SA for hyper-parameter optimization of ML models
SA is based on the analogy of heating a material and cooling it down slowly to achieve the desired structure.Similarly, it can be used to find the optimal or approximate solution during the iterative process over the search space [43].The SA iteratively tries to find the best solution with the following steps: initialization, neighbour selection, evaluation and accept/reject the solution.Here, we employed SA to find the optimal set of hyperparameters for each ML model discussed in section 3.6.In each ML model, there are two major stages: model training and evaluation.Model training involves the finding of a set of rules or functions resulting from a given ML method using training data.The training data consists of pair of dependent and independent variables.While training the model, it tries to minimize the objective function.In this work, we utilized the mean square error (MSE) as an objective function (refer to Eq (4)).Once the model is trained, it is evaluated on the validation data.The SA is used to select the best set of hyperparameters while evaluating the ML model as shown in Algorithm-1.Here, we first set the initial temperature and the initial set of hyperparameters randomly.This set of hyperparameters is considered as an initial solution (for instance, NeighborSelection(s) in Algorithm 1, Table 3).Then the ML model is trained with those hyper-parameters and evaluated using Evaluation (V) operator on the validation set.The SA iteratively finds the optimal set of hyperparameters for a given ML model using steps 3 to 11 in Algorithm 1 (Table 3).
where yi and  are actual and simulated values.
Table 3.The high-level pseudocode of the SA algorithm [44].

Data compilation and parameter settings
Among the 144 data samples (72 plots in each block), we performed a sanitized check to find any noise or outliers.For this, we used Mahalanobis distance [45] and found four data points as noise or outliers which we removed from the dataset.This is essential as some ML models may not learn the appropriate patterns with the noise present in the dataset.After such noise removal, we ended up with a total of 140 data samples for the training and testing of yield prediction models.The yield distribution among the experimental plots was in the range of 1-9 tons/ha.While dividing the data samples into train and test sets, it is crucial to maintain a similar distribution in both train and test sets.Otherwise, the model evaluation might be biased towards the specific range of yield.The common approach to split the training and test data for model training is to split the dataset into train and test set in the ratio of 9:1 with random sampling which doesn't fit in our case as we need to preserve the yield range of 1-9 t/ha in both training and test set.Therefore, we used a specific technique to split the data into train and test sets which first group the sample data into nine groups on the basis of yield range (yield in the range of [1][2], [2][3], and so on, where '[' denotes the inclusion and ')' represents the exclusion).Then, we performed the stratified sampling to select the train and test set from these groups in the ratio of 9:1.Similarly, 10% of the training set was sampled as validation data while training ML models.The holdout set of 14 data samples was used to evaluate the performance of ML as well as ensemble approaches.
All the ML methods were implemented using a sckit-learn [40] package while the SA and the proposed ensemble approaches are implemented in Python.The empirical simulations were carried out on a PC with an Intel i5-8265 CPU (1.6GHz, 8 cores) with 16 GB of memory running Windows 10.The list of hyperparameters that are optimized using SA for each ML model and their optimal values are listed in Table 4. Table 4.The list of ML and their associated hyperparameters used in this work.

ML method List of hyperparameters and their optimal value
Decision Tree Max_depth = 87, min_samples_split = 0. (The details about the corresponding hyperparameters of each ML method can be found in [40] and [42])

Evaluation metrics
The predicted yields from various ML models as well as ensemble approaches are assessed with well-known evaluation metrics such as coefficient of determination (R 2 ), root mean square error (RMSE) and mean absolute error (MAE) [46].The mean absolute relative errors (MARE) in percentage for each test sample from best-performing models are also reported.

Simulation results
The optimized ML models with SA are evaluated on 14 test datasets.We performed five runs of each model to report the average results so as to reduce the randomness of taking the result from only a single run (Table 5).Through all indicators, XGBoost has the highest R 2 of 86.43% and minimum errors of RMSE = 0.5598 and MAE = 0.4131.The second ML model is SVR with R 2 of 82.69% and errors of RMSE = 0.6376 and MAE = 0.5453, followed by RF with R 2 of 81.26% and errors of RMSE = 0.6691 and MAE = 0.5347.The other ML models such as DT and MLP have produced the R 2 in the range of 71%-78%.Hence, we would have a well-covered prediction range for peanut yield by only choosing the best three ML models, i.e., XGBoost, SVR and RF, for yield forecasting.The prediction results of these three ML models on the test datasets are listed in Table 6, along with the prediction error (the difference between the actual and predicted yields) on each of the 14 test samples.The scatterplots for the three best-performing models are presented in Figure 5.With these individual scatterplots, the divergence between the predicted and actual yield for some points is higher in the case of SVR compared to RF and XGBoost than the ensemble model (Figure 5 (d)).Table 6.The actual yield and predicted yields from the three best ML models and errors.

Ensemble approaches for peanut yield prediction
As the differences between the actual and predicted yields vary with the quantity of actual yield, it is difficult to observe any general trend from these sets of differences.However, more meaningful observations can be drawn from the absolute relative errors (the percental ratio of the absolute difference versus the actual yield) on each test sample shown in Table 7.
The relative errors (er) from the 14 test sets over the three best prediction models demonstrate the following features.First, over the average of the 14 test sets, XGBoost returned the best performance for yield prediction with an average relative error of 7.5% from the best of less than 0.5% to the worst of 17.3% (Table 7).If we regard a relative error of 20% and above as a fail in the prediction of peanut yield, a relative error greater than or equal to 15% but below 20% as a poor prediction, a relative error greater than or equal to 10% but below 15% as a moderately accurate prediction, a relative error smaller than 10% as a highly accurate prediction, XGBoost would be classified as the most successful method for peanut yield prediction without a single failure (Table 8), the only method among the three best models.Second, both the RF and SVR models have a similar average relative error of around 11%, from less than 0.2% to about 34% for RF and from 3.5 to 37% for SVR.Third, although XGBoost seems the most consistent and successful method among the three models on average, it was not always the best predictor among the three for individual cases.For example, the best predictor for test sets 4, 6 and 11 are RF, SVR and XGBoost, respectively.Furthermore, in 9 out of 14 tests, all three models consistently over-estimated or under-estimated yield but on the other 5 occasions, the three models produced forecasts mixed with over-estimated and under-estimated yields.Hence, in addition to picking up the most consistent and successful performer, another combinative predictor constructed from all the three best models would offer another comparative means in peanut yield forecasting.To build a weighted ensemble from the three best ML models, we use their average relative errors and R 2 values to render the weight factors for the three ML models respectively.If the model has an average relative error within the high accuracy class, farmers would be happy to assign a credit of 100 to that model, for instance, XGBoost in Table 7.Similarly, the fail class should be credited with 0 and considered as completely useless.The model that fell in the less credible class of low accuracy would be given the lowest credit of 1.Along the similar line, it would be reasonable to assign a credit of 10 to the model that fell in the moderate accuracy class, like RF and SVR in this study.Using this credit scheme, we can work out the total credit from these three ML models as per Eq (9).
Using these individual and total credit scores, a weighted ensemble for the predicted peanut yield can be determined using Eq (10).

Discussion on peanut yield prediction with the ensemble
Using both the XGBoost and ensemble models together, a comparable and relatively consistent forecast on peanut yield could be recommended to the farmers with an accuracy ranging from low to high in all cases (Table 9).The XGBoost model could produce a predicted yield with a high accuracy at a possibility of 64% (9/14), a moderate accuracy at a possibility of 14% (2/14), or a low accuracy at a possibility of 21% (3/14).The ensemble scheme could produce a predicted yield with a high accuracy at the same possibility (9/14) as XGBoost, a moderate accuracy at a possibility of 21% (3/14), or a low accuracy at a possibility of 14% (2/14).The difference between these two appears minor because the ensemble output is largely determined by the output from XGBoost (83%).However, the ensemble provides an alternative that may be able to complement the output from XGBoost in special cases should such cases be encountered.For example, in Case 9 shown in Table 7, both RF and SVR performed better than XGBoost, which resulted in a better yield prediction by the ensemble than the XGBoost alone (Table 9).More noticeably, in most cases, the ensemble model looks a more improved predictor than either RF or SVR alone for peanut yield prediction.
It should be noted that the actual yields used in this study were taken as given.We are unsure if significant errors would exist in some of these records due to various possibilities.Logically, the large errors in the predicted yields associated with both the smallest (Cases 1 and 2) and largest (Cases 13 and 14) actual yields could be explained as a result of a scarcity of data at the two ends of a data sequence which may greatly influence the training of ML models.However, for a model like XGBoost that performed consistently satisfactorily for most of the middle range, large errors in a couple of predictions (Cases 6 and 9) might be an indication of inaccuracy on the actual yield in the record book.

Conclusions and future work
UAVs have been very attractive for acquiring high-resolution field images for precision agriculture and plant breeding programs.This study explored ML as well as the ensemble model for peanut yield estimation using UAV multispectral imagery.We analyzed the correlation between the individual spectral bands at various growth stages with peanut yield.The correlation results revealed that the HM stage had a significant correlation with yield.This allowed us to select the best-performing ML models to build ensemble learning for yield prediction.The results showed that the proposed ensemble approach, based on the three best ML models XGBoost, RF and SVR among the eight ML models examined, produced a consistent and comparable peanut yield prediction alongside the best performer XGBoost.Hence, rather than providing only one option to farmers, presenting both the results predicted by the XGBoost model and the ensemble scheme would give the farmers a more reliable estimate for peanut yield as mutual verification.
This work has two limitations.First, only a single-year peanut dataset is considered in this work; hence, the proposed model should be extended to multi-year peanut data to further increase the consistency of the model in future studies.Second, advanced deep learning models such as CNN should be investigated along with more agriculture input data in the future.

Figure 1 .
Figure 1.The high-level model building pipeline used in this work.

Figure 2 .
Figure 2. Study area maps (a) Field location on the Australia map.(b) RGB Orthomosaic of whole UAV trial (c) two peanut trials/blocks (block1 and block2) used in this work.

Figure 3 .
Figure 3.The correlation plot between yield and spectral bands.a) NIR and b) REDE at the HM stage of peanuts.Note that the 'r' denotes the correlation coefficient between yield and the respective spectral bands.

Figure 5 .
Figure 5.The scatter plot of simulated yield vs predicted yield with the best three ML models a) RF, b) SVR, c) XGBoost and d) ensemble.

Table 1 .
UAV Images acquisition of peanut fields*.
*Note the planting date for these trials was 19/12/2017.

Table 2 :
Correlation coefficient (r) between spectral bands and peanut yield.Note that * and ** represents the significance level of 0.01 and 0.05 for the correlation value respectively.

Table 5 .
Performance of eight ML models for yield prediction on the test data.The reported metrics are taken as an average of five runs of each model.

Table 7 .
The absolute relative errors in percentage from the three best ML models and the average.

Table 8 .
The performance summary of the best three ML models by relative errors (er).

Table 9 .
The absolute relative errors in percentage from the XGBoost and ensemble model.