| China has the largest tomato production in the world,but because tomato plants are easily disturbed by diseases during the growth process,the yield of tomato is reduced and the profit is lost.What is particularly noteworthy is the occurrence of early epidemics,which can reduce the production by up to 30% in severe cases.There are some problems in disease diagnosis of growers,such as easy error and not timely diagnosis.At present,image processing technology of deep learning is applied more and more widely in agricultural field,and has made good research progress.The method of deep learning can be used to achieve accurate segmentation of leaf diseases,which provides technical support for artificial intelligence in tomato leaf diseases segmentation.In this paper,the image of tomato leaf disease in the complex environment of greenhouse is taken as the research object.Based on the UNet model,a residual UNet(SER_UNet)tomato leaf disease segmentation model based on channel attention is proposed.In addition,a Graphical User Interface(GUI)based on computer and a disease spot classification diagnosis APP based on mobile phone have been designed to provide a new method for disease diagnosis for growers and assist users in disease diagnosis.The main research work of this paper is as follows:(1)Data set and classic tomato leaf disease segmentation model were established.In this study,disease images such as tomato early blight,pepper scab,apple black rot,grape wheel spot and grape brown spot were used.Among them,tomato early blight needed images from complex background artificially collected,and the remaining four fruit and vegetable disease images came from single background images used in Plant Village.In order to improve the quality of the data set and prevent the over-fitting phenomenon in the training caused by too few images,the data enhancement methods such as rotation,brightness adjustment and noise addition were used to expand the data of the required images.Label Me labeling software was used to mark the data,and the required data set was constructed and divided into the training set verification set and the test set according to the ratio of 6:2:2.Classic segmentation models such as UNet,Deeplab V3,Residual Network(Res Net)and Seg Net were built.Understand the characteristics of different segmentation models,in the same test environment for comparison test,UNet as the foundation model,to lay a foundation for the subsequent proposed model.(2)A method for segmentation of SER_UNet tomato leaf diseases was proposed.Using UNet as the basis segmentation model,the influence of residual convolution and depthseparable convolution on model segmentation performance was analyzed and compared.In the coding stage,residual convolution was used to replace the original convolution mode,and the R_UNet tomato leaf disease segmentation model was built.The influences of channel attention mechanism,spatial attention mechanism and self-attention mechanism on model segmentation performance were analyzed and compared.The channel attention mechanism was embedded in the decoding stage,and the SER_UNet tomato leaf disease segmentation model was built.The weights corresponding to different features were recalibrated to improve the network’s interest in leaves and diseases.The convergence of Focal loss,BCE loss,Dice loss and Tversky loss during model training was analyzed and compared,and Focal loss was used as the loss function during training.In the encoding and decoding stage,the feature information obtained from the two stages is fused by skip connection.(3)Analysis of test results.The SER_UNet proposed in this paper was compared with the original segmentation network on the data of tomato early blight.Mean Intersection over Union(MIo U),Accuracy,Acc,Precision and Recall were used as evaluation indexes.Compared with UNet,R_UNet and other models,the SER_UNet model proposed in this paper has improved evaluation indexes,among which MIo U is 0.8976,Precision is 0.9019,and Recall is 0.9026.Compared with other models,it shows that the proposed model has better segmentation effect.The segmented image was graded according to the proportion of disease area to leaf area.The method of transfer learning was used to migrate to the segmentation of other fruit and vegetable leaf diseases,and a small number of data sets were used to obtain a high accuracy.Based on the SER_UNet segmentation model and the classification of fruit and vegetable spots,GUI and a classification diagnosis APP for fruit and vegetable spots were designed.The tomato leaf disease segmentation method proposed in this study improves the performance of disease segmentation and lays a foundation for the research and development of automatic segmentation equipment. |