Image Recognition of Citrus Diseases Based on Deep Learning
2021-12-14ZongshuaiLiuXuyuXiangJiaohuaQinYunTanQinZhangandNealXiong
Zongshuai Liu,Xuyu Xiang,2,*,Jiaohua Qin,Yun Tan,Qin Zhang and Neal N.Xiong
1Central South University of Forestry and Technology,Changsha,410004,China
2School of Information Technology and Management,Hunan University of Finance and Economics,Changsha,410205,China
3Department of Mathematics and Computer Science,Northeastern State University,Tahlequah,OK,74464,USA
Abstract:In recent years,with the development of machine learning and deep learning,it is possible to identify and even control crop diseases by using electronic devices instead of manual observation.In this paper,an image recognition method of citrus diseases based on deep learning is proposed.We built a citrus image dataset including six common citrus diseases.The deep learning network is used to train and learn these images,which can effectively identify and classify crop diseases.In the experiment,we use MobileNetV2 model as the primary network and compare it with other network models in the aspect of speed,model size,accuracy.Results show that our method reduces the prediction time consumption and model size while keeping a good classification accuracy.Finally,we discuss the significance of using MobileNetV2 to identify and classify agricultural diseases in mobile terminal,and put forward relevant suggestions.
Keywords:Deep learning;image classification;citrus diseases;agriculture science and technology
1 Introduction
There are many types of agricultural disasters with great impact and frequent disasters,which not only cause losses to crop production,but also threaten food safety[1].Crop disease is one of the main types of“disasters”with variety and wide range of in uence,etc.Disease problems inevitably affect crops throughout their growing cycle.Moreover,ecological environment has synergistic effect,and the spread of diseases through insects may even change into a certain scale and serious infection problem under the in uence of the synergism,resulting in widespread crop loss.Therefore,the automatic and accurate identification of crop diseases is the key to crop prevention.
At present,some scholars have researched disease image recognition based on deep learning[2].Replacing agricultural disease monitoring technicians with artificial intelligence[3]can greatly improve the efficiency of disease prevention and control,solve the problem of insufficient forecasting personnel in China’s agricultural grassroots,and further realize the intellectualization of agricultural production.Therefore,promoting the intellectualization of disease prediction and prevention of agricultural output[4]can solve the problems of delay,low efficiency,and poor objectivity of artificial monitoring and prediction identification,and reduce the workload of personnel.The rapid and accurate diagnosis of crop diseases plays an essential role in ensuring crop yield and food safety,farmers can use mobile devices to detect crop diseases and treat them in time by photographing diseased crops[5].Citrus disease is one of the most important commercial crops all over the word,it brings great economic losses to farmers.There are some diseases that are the most threatening,such as Anthracnose[6],Huanglongbing(HLB)Canker[7],Scabis[8],Black spot[9]and Sand paper rust.This paper takes selects several common citrus diseases as experimental objects.
HLB is the most in uential and harmful citrus disease in the world.It is commonly known as the citrus cancer bringing great trouble to farmers.The long-distance transmission of HLB is scion grafting and disease seedlings.HLB can make citrus fruit bitter,early fall.In later stages,the whole citrus will wither and die.
Anthracnose is the most common citrus disease with a wide range and long duration.It is mainly harmful to leaves,branches,owers,fruits and stalks.Severe cases of Anthracnose often lead to defoliation,shoot dieback,the fall of owers and fruits in abundance,and fruit decay.
Canker is the significant challenge in citrus cultivation,which is harmful to citrus leaves,shoot tips and fruits.It can also cause small trees to lose their leaves and their shoots to die.Severe canker will lead to fall of fruits,and mild canker will cause fruit rot,reduction of storage resistance and perishability,which significantly reduce the value of fruit commodities and increase the cost of disease and insect control.
Black spot is a common disease in most citrus cultivation areas.It is harmful to fruits,and its symptoms are mostly found in nearly mature fruits.Black spot mainly infects fruitlets without obvious symptoms in the immature fruit stage.Black spot begins to appear from the fruit swelling stage to the mature stage,easily leading to fruit decay.
Sand paper rust is a fungal disease caused by Diaporthe citri.It mainly damages spires,tender tips and immature fruits of citrus and produces black and brown colloid small dots on the surface.
Scabis is one of the main fungal diseases of citrus,which is usually caused by Elsinoe fawcettii.It damages not only the young fruit of a new shoot,but also the calyx and the petal.
2 Related Works
Deep learning is a subclass of machine learning,it has significantly improved the recognition rate in many traditional recognition tasks[10].In recent years,deep learning is extensively used not only in image processing,image recognition and classification[11–16],but also in other fields such as agriculture.Compared with previous artificial neural network methods,deep learning can be more accurate in recognition and better solve image classification and visualization problems,hence it is now the most promising technology in the modern agricultural field[17].Deep learning is similar to shallow neural network structure,but it contains many neural networks with hidden layer structure.Typical deep learning networks include convolutional network(CNN),restricted boltzmann machine(RBM),deep confidence network,deep boltzmann machine(DBM)[18],DBN,RNN,GAN and CapsNet,etc.Compared with the shallow neural network,deep learning is stronger in learning ability,higher in recognition accuracy and lower in external environmental conditions requirements,which can be applied to the actual life and agricultural production[19],such as the detection of plant diseases[20].The current methods of crop disease investigation have been unable to meet the current agricultural production needs,deep learning can replace manual work and adopt electronic equipment to identify the disease even prevent and control the crop diseases.At present,some scholars have studied disease image recognition by using the technology of deep learning.
In view of the identification of some of the above diseases,in the farming process,the disease identification mainly relies on primary technical person.Through field observation,they compare the observation records with recorded disease specimens or disease specimens to determine the type of diseases.However,the long-term use of this artificial investigation method costs a lot of human resources and material resources,and cannot effectively guarantee the accuracy and effectiveness,it is unable to meet the current needs for disease detection and prevention.Therefore,more and more researchers focus on deep learning for the crop disease identification.While performance has improved,more computing power is needed as efficiency increases.Deep learning is limited in mobile deployment with limited energy consumption,computing resources and storage space.
The efficiency is mainly determined by two aspects,the storage and the prediction speed.Only when the efficiency of CNN is solved,can CNN get rid of the shackles of the laboratory and be more extensively in mobile devices.To improve the efficiency,the general method is to compress the trained model,to solve the memory and speed problem with fewer network parameters.Besides,the lightweight model design adopts another method,which design a more efficient network computing mode(mainly for the convolution mode)that can reduce the parameters without losing performance.
MobileNet is a lightweight model proposed for mobile devices and other embedded devices that effectively alleviates the problems mentioned above.It mainly utilizes Depthwise separable convolution to simplify the network structure.
3 Our Methods
3.1 Network Structure Comparison
MobileNetV1 and MobileNetV2 both use Depthwise(DW)convolution and Pointwise(PW)convolution to extract features.The combination of these two operations is also called depth-separable convolution.In theory,this method can exponentially reduce the time and space complexity of the convolution layer.According to the following formula,since the number of the convolution kernel is less than the number of output channels,the computational complexity of standard convolution is approximately K2times of the combination of DW and PW convolution.
Figure 1:The difference between MobileNetV1 and MobileNetV2
In Fig.1,there are some differences between MobileNetV1 and MobileNetV2.MobileNetV2 adds a new PW convolution before the DW convolution because the DW convolution cannot change the number of channels by itself due to its computational properties,it can only output the number of channels given by the previous layer.Thus,if the number of channels in the previous layer is very small,DW can only extract the features in the low-dimensional space very grievously,so the effect is not good enough.Now,to solve this problem,MobileNetV2 has been equipped with a PW before each DW,which is specifically used to raise the dimension,and defining the number of lift maintenance as t = 6.In this way,no matter whether the number of input channels Cin is more or less after the first PW raises the dimension,DW is always working hard in a relatively higher dimension(t·Cin).MobileNetV2 removes the activation function of the second PW.We call this linear bottleneck[21],because although activating function can increase the nonlinearity of high dimensional space with effect,it will destroy the features of low dimensional space,so it is not as good as the linear effect.According to the above theory,the main function of the second PW is dimension reduction,so ReLU6 should not be used after dimension reduction.
In Fig.2,MobileNet V1 doesn’t have the residual connection and contains ReLU in the last part,while MobileNet V2 has the residual connection and removes ReLU in the last part.
Figure 2:The network structure of MobileNetV1 and MobileNetV2.(a)MobileNetV2(b)MobileNetV1
In Tab.1[21],tis the multiplication coefficient of the input channel,c is the number of output channels,nis the repetitions of modules,andsis the stride of the first repetition of the module(all subsequent repetitions are stride 1).
Table 1:Overall structure diagram of MobileNetV2
The network architecture of MobileNetV2 has a lot in common with many of the CNN we’ve seen before.For example,it firstly uses the ordinary convolution for basic feature extraction,and then uses the novel residual module for level-one processing,feature map size is getting smaller and smaller,but the number of channels is increasing.Moreover,the extension factors for internal use of each residual module was 6(we conducted experiments in the range of 5–10 and finally chose 6)[21].
3.2 Citrus Disease Detection Based on MobileNetV2
In this paper,to establish an efficient citrus disease detection method,we adopt MobileNetV2 to implement our method,it is a lightweight network.The used dataset is enhanced through five ways in advance.Experiment with enhanced data sets on tweaked MobileNetV2.The intention is to reduce the training and testing time of the network,as well as the size of the network model while maintaining classification progress.In this way,we can use our method on the mobile terminal,which is convenient for users to use anytime and anywhere.
4 Experimental Results and Analysis
4.1 Experimental Environment
The experiment adopted Intel(R)Core(TM)i7-8750h CPU@2.20ghz,16.00gb RAM and Nvidia GeForce GTX 1070.The framework adopted in this paper is Keras,which is an advanced neural network API.The learning rate= 0.001,batch size =8 and epochs= 50.
4.2 The Establishment of Datasets
In this experiment,we used the six typical citrus cases mentioned in the previous article.We collected these pictures through Internet search and field photography.The dataset includes six categories:Huanglongbing,Anthracnose,Canker,Black spot,Sand paper rust,and Scabis.We divided the dataset into the training set,testing set,and validation set in a ratio of 6:2:2.Because our data set is small,the training results may be poor,such as the phenomenon of overfitting.To solve this problem,we enhanced the dataset to improve accuracy and efficiency[22].We changed the brightness,contrast,horizontal ip,vertical ip,and horizontal vertical ip of the data set,resulting in a five-fold increase in the size of the training set and the testing set[23].The original and enhanced image of dataset are shown in Tab.2.
4.3 Analysis the Classification Accuracy of Different Models
We used the trained model in MobileNetV2 to test our validation set,and the classification accuracy comparison of the original data and data augmentation is shown in Tab.3.Experimental results show that the overall accuracy after data augmentation has been improved by about 3%.
At the same time,we test the accuracy of each class in dataset with MobileNetV2,which are shown in Tab.4.
As can be seen from Tab.3,after data augmentation,the accuracy of 4 diseases was improved,while the accuracy of 2 diseases was decreased.This phenomenon may be related to the small number of raw datasets in these two categories and the complexity of the image background.
We also use the dataset after data enhancement to train in different networks and compare the accuracy of various networks,and the results are shown in Tab.5.
Although MobileNetV2 is not as complex as other networks,it still performs well in our dataset in terms of classification,even slightly better than ResNet50(+0.75%).
Table 2:Data samples of the original image and data augmentation
Table 3:Classification accuracy of the original image and data augmentation
Table 4:Accuracy comparison the of each category before and data augmentation
Table 5:The classification accuracy of the different network
4.4 Predict Time Consumption and Model Size of Different Network
We put images of the validation set into several network models that we trained,recording the predicted time and model size used to test each model.
From Figs.3 and 4,it can be seen that MobileNetV2 has little difference with other networks in the test accuracy.At the same time,Mobilenetv2 has a great advantage in the time used to verify the accuracy of the model compared with other network models,so it is more applicable on the mobile end.In this citrus disease classification,Mobilenetv2 keeps better accuracy and faster detection speed.It’s worth noting that the dataset used in this experiment is not large enough,if the dataset increases gradually,the speed advantage of MobileNetV2 will become more obvious.
Figure 3:The compares of predict time consumption
Figure 4:The compares of the model size of different model
5 Discussion
This method mainly uses MobileNetV2 to realize citrus disease detection with high efficiency.Therefore,the lightweight network model can play a meaningful role when the verification speed and model storage are limited.For example,as a mobile terminal,phones are often used by people.We can apply the trained network model to the App to automatically identify the disease by taking photos,and give the disease introduction and countermeasures.
After identification,the purchase link of the required pesticides can be attached to provide disease treatment experience for experts and fruit farmers.This approach may also be applied to mobile intelligent sensing equipment for diseases and pests and automatic identification system,it can help fruit farmers quickly determine disease types and take measures to reduce economic losses,protect the healthy growth and quality of fruit[24].
1)A rich database is the important basis for the classification and identification of crop diseases and insect pests,and a large dataset can increase the recognition accuracy after model training.Only by accumulating enough data can we give full play to the power of deep learning tools and technologies.In the future,we will continue to collect the number and types of expanded databases to improve the generalization ability of the model.
2)The collected citrus disease data set can be used for image segmentation to remove complex picture backgrounds to obtain more accurate disease pictures for training models and improve the identification accuracy.
3)The optimization of the convolution network algorithm is a direct way to achieve identification accuracy.In the case of further obtaining massive datasets,the optimization of the convolution operation can improve the identification accuracy.
6 Conclusions
In this paper,we trained MobileNetV2 to classify and identify six common citrus diseases.By comparing with other network models from the model accuracy,model size and model validation speed,we can see that MobileNetV2,performs well in the classification and identification of citrus diseases.As a lightweight network,MobileNetV2 has similar accuracy with other network models,and has fast validation.
Acknowledgement:The author would like to thank the support of Central South University of Forestry&Technology and the support of National Natural Science Fund of China.
Funding Statement:This work was supported in part by the National Natural Science Foundation of China under Grant 61772561,author J.Q,http://www.nsfc.gov.cn/;in part by the Key Research and Development Plan of Hunan Province under Grant 2018NK2012,author J.Q,http://kjt.hunan.gov.cn/;in part by the Key Research and Development Plan of Hunan Province under Grant 2019SK2022,author Y.T,http://kjt.hunan.gov.cn/;in part by the Science Research Projects of Hunan Provincial Education Department under Grant 18A174,author X.X,http://kxjsc.gov.hnedu.cn/;in part by the Science Research Projects of Hunan Provincial Education Department under Grant 19B584,author Y.T,http://kxjsc.gov.hnedu.cn/;in part by the Degree &Postgraduate Education Reform Project of Hunan Province under Grant 2019JGYB154,author J.Q,http://xwb.gov.hnedu.cn/;in part by the Postgraduate Excellent teaching team Project of Hunan Province under Grant[2019]370-133,author J.Q,http://xwb.gov.hnedu.cn/,in part by the Postgraduate Education and Teaching Reform Project of Central South University of Forestry &Technology under Grant 2019JG013,author X.X,http://jwc.csuft.edu.cn/ in part by the Natural Science Foundation of Hunan Province(No.2020JJ4140),author Y.T,http://kjt.hunan.gov.cn/;and in part by the Natural Science Foundation of Hunan Province(No.2020JJ4141),author X.X,http://kjt.hunan.gov.cn/.
Conflicts of Interest:The authors declare that they have no con icts of interest to report regarding the present study.
杂志排行
Computers Materials&Continua的其它文章
- Design of Authoring Tool for Static and Dynamic Projection Mapping
- Detecting Lumbar Implant and Diagnosing Scoliosis from Vietnamese X-Ray Imaging Using the Pre-Trained API Models and Transfer Learning
- Design of a Compact Monopole Antenna for UWB Applications
- A Smart Wellness Service Platform and Its Practical Implementation
- Fingerprint-Based Millimeter-Wave Beam Selection for Interference Mitigation in Beamspace Multi-User MIMO Communications
- Multilayer Self-Defense System to Protect Enterprise Cloud