Precision agriculture,a new agricultural development direction,has become a hot topic in today’s agriculture.Generally,through the use of automated detection and different treatment of plants in the field,it can automatically interfere the local ecological environment and increase agricultural yields without using pesticides and fertilizers as much as possible.However,traditional detection methods cannot meet the high accuracy and low miss weed requirements of precision agriculture.Therefore,this paper proposes an automated crop weed detection method based on automatic machine learning.The main tasks are as follows:(1)Construct crop and weed data sets.Set up a small experimental field to simulate the nature growth environment of potatoes in the field;through the establishment of agricultural robot to collect data,a total of about 800 pictures have been collected.Afterwards,the image data was labeled and preprocessed,which included one crop and two weeds,about 2000 samples.(2)A method of automatic model selection and parameter adjustment is realized.In order to reduce the time slot of artificial neural networks selection,this article uses the Auto Keras to build an automatic machine learning method.Compared with the preplrexing model design of traditional machine learning,the model selection and tuning process is basically automated,and the model structure can be tuned according to the data.At the same time,this paper designs a model structure search method on automatic machine learning.Several sets of neural network models with the same main structure are obtained on multiple data sets.Among them,the neural network with the same main structure only has different input and output layer structures.This method can make subsequent experiments to be more consistent on the two data sets.(3)A new model result evaluation metric and model objective function are proposed.In order to meet the plant detection requirements of precision agriculture,the model algorithm must not only have high accuracy,but also have a low miss weed rate(the probability of detecting crops as weeds).The new evaluation metric aims at the model to identify the miss weed rate of field plants and measures the severity of the consequences of misclassification.Compared with traditional metric,it is more practical and guiding in crop identification.The new model objective function expects that the model can use the soft label information of the high-level category of the plant in addition to the specific label information,so that the model can be optimized in the direction of taking into account high accuracy and low miss weed rate.(4)A model ensemble method is designed.This paper integrates several models to further improve the detection accuracy and reduce the harm caused by misclassification.Experiments show that compared with a single model,the ensemble model can maintain the highest accuracy rate among the sub-models and effectively reduce the harm of misclassification.This paper has trained and evaluated the detection method proposed on the selfbuilt data set and Plant Village data set,and obtained the following results:(1)Based on Nvidia GTX 2080 Ti GPU,the automatic machine learning method took about 40 hours to complete the search and tuning of 3 different types of models,with accuracy above 97% and 99% respectively;(2)On the two data sets,the new objective function enables the neural network model to meet the high precision and low miss weed rate requirements of precision agriculture detection,and the new evaluation metric can display the model’s miss weed information;(3)Through the ensemble model,the prediction accuracy more than 99% was obtained on the two data sets,and the misclassified samples did not cause potential serious harm.The above results verify the feasibility and effectiveness of the method in this paper.Compared with traditional methods,the prediction results can take into account both high accuracy and low miss weed rate.(4)In order to verify the universality of the method in this paper,tests are also performed on a public data set(Plant Village).The experimental results show that the method in this paper performs similarly on the two data sets,and the metric difference does not exceed 2%. |