| In agriculture,weeding has always been an important step which has a great impact on crop yield.The existing mechanical weeding,chemical weeding and other weeding methods have many problems,such consuming much labor and leading to environmental pollution.Therefore,in modern agriculture,how to weed more efficiently and environmentally friendly has been a very important research topic.The purpose of this paper is to use computer vision technology to change the traditional chemical weeding method of large area full spray pesticide weeding.The aim is realizing spraying pesticides automatically,precisely and on demand.At the same time,we want to reduce the waste of pesticides and environmental pollution.Two problems need to be solved in order to realize the automatic on-demand pesticide application for weeds in farmland.One is to identify the weed area in the image,and the other is to map the weed area in the image to the real spatial position.Based on the improvement of weed image semantic segmentation network and binocular depth estimation network,this paper proposes a multi task learning framework,and completes the actual deployment on the embedded computing platform.The specific research contents of this paper are as follows:(1)The characteristics of weed image are studied,and semantic segmentation network DUSeg is proposed.Based on two-way semantic segmentation network,a segmentation network combining low-level spatial features and high-level semantic features is constructed.In view of the small space of field weed data classification,it is unnecessary to use too large feature extraction network.What’s more,large feature extraction network is easy to overfit.In this paper,we use lightweight and simple structure UNET as the feature extraction network,which has faster speed without losing accuracy.At the same time,based on UNET,more dense connections are used to reduce unnecessary spatial paths.In view of the serious imbalance of weed data in the field,Dice loss function is used to replace the cross entropy loss function,and a better semantic segmentation effect is obtained.(2)In order to obtain the spatial position of the weeds,depth estimation network is introduced.A binocular disparity estimation data set is constructed with the collected binocular data set,and a two-stage stereo matching network based on disparity residual is trained for disparity estimation.On this basis,a multi task learning network structure is constructed.Disparity estimation network and semantic segmentation network share UNET feature extraction module.One branch uses cost aggregation network for disparity estimation,and the other branch uses semantic segmentation network to realize multi task combination of binocular disparity estimation and semantic segmentation.This paper also discusses the weight design of multi task loss function,which makes semantic segmentation task and disparity estimation task promote each other and surpass the performance of single task.The shared feature extraction network not only reduces the computation cost,but also improves the accuracy of each task.Based on the results of semantic segmentation and depth estimation,combined with the camera parameters,the transformation from the input image to the output weed area boundary position spatial coordinates is completed and visualized.(3)Based on NVIDIA’s Jeston TX2 computing platform,the neural network prediction reasoning is deployed by using the optimizer and deployment engine of Tensor RT,and the whole system is deployed on the high energy efficient embedded computing platform.In the process of reasoning deployment of neural network,half floating point precision type FP16 is used to achieve the best balance between prediction accuracy and prediction speed. |