Phenotypic Parameters Prediction of Lettuce based on Computer Vision and Regression

To obtain phenotypic parameters by means of lossy measurement, we proposed a comprehensive and integrated approach to predict diﬀerent parameters of four varieties of lettuces. By building diﬀerent prediction models, we required predicted value of ﬁve phenotypic parameters of lettuce. Test results indicate that prediction models we have constructed are reliable and feasible. In addition,our methods can be better transferred to the research of other crops, and producers can adjust the growing environment of crops in time, so as to obtain higher yield.


INTRODUCTION
The traditional phenotypic parameters are usually measured by manual method, which is difficult to meet the requirements of automation and high precision 1,2 .Meanwhile, it is time-wasting and labor-consuming.More importantly, it is unacceptable to obtain phenotypic parameters by means of lossy measurement in practical agricultural production.Therefore, we proposed a nondestructive method to measure phenotypic parameters of lettuce in this research, aiming to monitor the growth and development of lettuce dynamically and efficiently.The predicted phenotypic parameters are plant height(PH), plant diameter(PD), leaf area(LA), fresh weight(FW) and dry weight(DW), respectively.The five types of phenotypic parameters obtained by this method will help producers adjust the growing environment of crops in time, which have count for much meaning to increase yield.The dataset in this experiment includes four types of lettuce(Lugano, Aphylion, Salanova and Satine) based on the 3rd Greenhouse Autonomous Challenge organized by Wageningen University and Tencent Lab, which were taken by Intel depth camera, containing 391 sets of depth images and color images.Among them, fifty sets of data are used to test the performance of the model.The overall research flowchart is shown in Figure .1.

PROPOSED METHOD
Before building prediction models, we define some evaluation indexes, including R 2 , Adjusted R 2 (AR 2 ), RMSE, RMSE Radio(RR), NMSE, MAPE and Total Error(TE).Finally, R 2 , NMSE, MAPE and TE are used to evaluate verification results on test data.AR 2 is corrected determination coefficient, which offsets the influence of sample size and the number of independent variables in regression on R 2 .RR is the proportion of RMSE in actual average.The calculation formula of the above indicators is as follows. (5) Our approach is divided into the following two parts.The goal of the first step is predict PH and PD, as is shown in Table 1.Firstly, U-net network 3 is used to perform color image segmentation to obtain binary image, and then it is projected to depth image.Through projection results, the pixel point with the smallest depth is obtained, which corresponds to the highest point of lettuce.The relative plant height (PH1) can be defined by making the difference between mininum of depth and the camera height.Secondly, the number of pixels in binary image is counted as relative projection area (RPA).Based on segmentation results, we apply contour detection function of OpenCV library to obtain all contour pixels, among which point pair with farthest distance are found to calculate the relative diameter (PD1).Finally, the linear regression model is used to fit the relationship between predicted value and actual value of PH1 and PD1 to get predict PD and PD, where AR 2 of model is 94.4% and 91.8%, respectively.When average PH is 13cm and average PD is 23cm, RMSE is as low as 0.816cm and 0.980cm, respectively.The second step is predict LA, FW, and DW of different types of lettuce.Due to large difference of lettuce shape among different species and growing period(GP), we build the model of fresh weight and dry weight separately.The solution of each parameter is divided into five parts, and they are all varieties at seedling stage, Aphylion, Lugano, Satine and Salanova at mature stage.According to data of different stages of lettuce, we use PH1, GP and RPA to fit the prediction model.In terms of LA, we find that all varieties at seedling stage and Salanova at mature stage have a significant linear relationship with GP, RPA, PH and the product of two, respectively.Lugano and Satine have a significant linear relationship with the power function of GP, PH and RPA.While Aphylion has a significant linear relationship with GP and RPA.The average AR 2 of LA is 91.8% and the average RMSE is 192.58,accounting for 14.92% of actual average LA, as is shown in Table 2.In terms of FW, we find that there is a significant relationship between the power function of all varieties and LA at seedling stage, while Lugano at mature stage has an obvious linear relationship with GP, RPA and their product.FW of Aphylion, Salanova and Satine at mature stage is significantly related to exponential function of GP and power function of LA.The average AR 2 of FW is 92.08% and the average RMSE is 11.63, accounting for 16.75% of actual average FW, as is shown in Table 3.In terms of DW, we find that all varieties at seedling stage and mature stage have a significant relationship with exponential function of GP and power function of LA.The average AR 2 of DW is 93.42% and the average RMSE is 0.50, accounting for 15.44% of actual DW, as is shown in Table 4.

RESULT AND DISCUSSION
According to optimal model we have selected, verification result based on test data is shown in Table 5.It can be clearly seen that MAPE is below 20% basically.The correlation analysis of actual value and predicted value is shown in Figure .2−6,NMSE of PH, PD, LA, FW and DW are 0.00773, 0.00763, 0.01688, 0.02370 and 0.02123, respectively, whose sum is the value of TE.More importantly, when our model proposed in this paper is used to predict five phenotypic parameters of test data, final TE can reach 0.07717.While the first place's TE was 0.08128 in the 3rd Greenhouse Independent Challenge based on this dataset, it is obvious that we have exceeded the first place in the above competition, which further proves that our model has good applicability.

CONCLUSION
In this research, we propose a series of a comprehensive and integrated approach to predict different parameters of four varieties of lettuces.By building different prediction models, AR 2 of predicted value and actual value have reached more than 90%.Test results indicate that prediction models we have constructed in this study are reliable and feasible.Although it is specific to different varieties, the early treatment methods can be better transferred to the research of other crops, and the later parameter prediction models can be better analogized to other similar crops.According to the five phenotypic parameters obtained by this method, producers can adjust the growing environment of crops in time, so as to obtain higher yield.

Table 1 .
Optimal model of PH and PD.

Table 2 .
Optimal model of LA.

Table 3 .
Optimal model of FW.

Table 4 .
Optimal model of DW.

Table 5 .
Test results of different models.