Research on Rice Leaf Disease Recognition Based on BP Neural Network
2019-10-22ShenWeizhengGuanYingWangYanandJingDongjun
Shen Wei-zheng, Guan Ying, Wang Yan, and Jing Dong-jun
College of Electrical and Information, Northeast Agricultural University, Harbin 150030, China
Abstract: To solve the problem of mistake recognition among rice diseases, automatic recognition methods based on BP (back propagation) neural network were studied in this paper for blast, sheath blight and bacterial blight. Chose mobile terminal equipment as image collecting tool and built database of rice leaf images with diseases under threshold segmentation method. Characteristic parameters were extracted from color, shape and texture. Furthermore, parameters were optimized using the single-factor variance analysis and the effects of BP neural network model. The optimization would simplify BP neural network model without reducing the recognition accuracy. The finally model could successfully recognize 98%, 96% and 98% of rice blast, sheath blight and white leaf blight, respectively.
Key words: rice leaf disease recognition, feature extraction, optimization of characteristic paramete, BP neural network
Introduction
Rice is one of the most important grain crops in China.Improving rice yield and quality is an important target in rice production. However, varieties of diseases occurred during the growth period of rice will result the decline of rice yield, quality and huge economic losses. Rice blast, sheath blight and bacterial blight are three kinds of diseases with high incidence, during the rice growing period, while the early symptoms of these three diseases can not be easily distinguished. The correct diagnosis of diseases can effectively reduce the economic losses caused by the diseases.
Traditionally, farmers mainly rely on experience to recognize rice diseases, which have the disadvantages of strong subjectivity and low recognition accuracy.With the development and popularization of computer technology, many scholars try to realize the automatic recognition and diagnosis of crop diseases by using computer image processing and pattern recognition technology. Automatic recognition methods,based on image processing and pattern recognition kept emerging which have made progress (Laiet al.,2009; Phadatareet al., 2016; Meiet al., 2017; Liet al., 2013; Pydipatiet al., 2006; Pragati and Surekha,2017). Rice exists many kinds of diseases whose characteristics are diversified and complicated. Domestic and international researchers have done the studies on automatic recognition of rice diseases. Most of researchers collect images by digital cameras. They extract the characteristic parameters reflecting the critical features of the scab. The models are built up,based on characteristic parameters by using BP neural network and support vector machine (Tharwatet al.,2015; Charmetteet al., 2016; Massiet al., 2016;Dhingret al., 2017). Previous studies showed that BP neural network performs well in the field for rice disease automatic identification. Therefore, BP neural network was selected as the qualitative analysis method to recognize these three rice diseases in this study.
Digital cameras are used as image acquisition tool in most disease recognition researches, but they have the disadvantages of high price, low universality,complex operation and no real-time data transmission.Nevertheless, the mobile terminal device, such as mobile phones, can make up for the above shortcomings. This paper would study on the establishment of an automatic recognition model of the three diseases, based on BP neural network, using the mobile terminal as data acquisition tool. The characteristics of different disease lesions were analyzed, compare the effects of different extracted parameters on modeling were compared, and effective parameters without redundancy were elected and image processing technology was used to build up the disease lesion database of rice blast, sheath blight and bacterial blight.
Materials and Methods
Image acquisition equipment
Compared with digital cameras, the mobile terminal device represented by the mobile phone was characterized with low price, generally high universality and simple operation. Using mobile phones as the disease images acquisition equipment, the application of automatic recognition of the disease would be more suitable for agricultural production and easier to be promoted and popularized among the farmers. In addition, with the popularization of the 4G network,the timeliness and convenience of the mobile phones as the image acquisition device in the data transmission were unparalleled by the digital camera. Based on the practical application, the automatic recognition method was explored for three kinds of common diseases of rice by using mobile phone as the image acquisition equipment.
Considering that the mobile phones should have enough high resolution ration and the farmers could afford, the smart phone with an affordable price was chosen as the acquisition device. HUAWEI Glory 7I mobile phone with 10 million pixel, and 1 920×1 080 pixels resolution was selected in this paper. The aperture of the mobile phone was f/2.0 and all the images could be saved in Joint photographic experts group (JPG) format. At the initial modeling stage, the disease images attained could be transmitted to the host computer by data wire, and then formed the lesion database after being processed. In actual applications,the captured images could be transmitted to the host computerviathe 4G network and the results could be obtained after analysis.
Image acquisition scheme
The pictures were acquired from 16 rice diseased plants with rice sheath blight, bacterial blight and blast. All the plants were cultivated in the experimental field of Agricultural College, Northeast Agricultural University. From 15th, July to 15th, September 2016,the condition of the diseases was observed every three days and disease lesion pictures were collected under the natural light. The collected data contained the early, middle and late onset of three rice diseases. A total of 200 color images of diseased rice leaves were saved in JPG format.
Segmentation of spots and establishment of database
Images of diseased rice leaves were segmented by threshold segmentation approach and a database was established after segmentation. Gray image was more conducive for segmentation than color image. All the color images were converted to gray level images using the following formula (1):
Where,maprepresented the color mapping table of the original image, andNewmaprepresented the color mapping table of the transformed gray image.
Threshold segmentation approach was the simplest method of image segmentation. The key was to find the appropriate threshold, usually based on the histogram of the image (Yanget al., 2013; Wanget al.,2013). The maximum between-cluster variance method also called Otsu algorithm was used in this study. This algorithm was simple, understandable, effective and with best segmentation method in a statistical sense.Its basic principle was to divide the gray value of the image into two parts with the best threshold and the maximum variance was existed between these two parts, which meant the maximum separability.
The function off(x,y), which was in [0, L-1]interval, was the gray value of position (x,y) in imageI(M×N), whereLwas the gray level. The pixel number of a gray leveliwasf^i, the probability of the appearance of the leveliwas calculated by the following formula (2):
The segmentation effects of rice blast, rice sheath blight and bacterial blight are shown in Fig. 1. It could be seen that the segmented image retained complete spot contour and internal feature for three kinds of diseases. So choosing Otsu method as image segmentation approach was effective in this paper.
Fig. 1 Segmentation effects for rice blast, rice sheath blight and rice bacterial leaf blight based on Otsu method
To build image database, firstly the disease regions were recovered into color images and one to three scab images were extracted from one disease picture.Totally 150 scab images of each disease were obtained for establishing the scab image database. And then 60 pictures of each disease were used to train the BP neural network, 50 pictures were used to verify the network and 40 pictures used to test the effects of network.
Feature extraction
After analyzing disease leaves images, results showed that rice leaf diseases had the impact on leaf shape and texture properties. In addition, three kinds of diseases had different scab figures in color, shape and texture. Thus, color, shape and texture features were selected as the characteristic parameters for diseases recognition (Fu and Huang, 2005; Liu and Zhou, 2009;Yan and Zhao, 2010).
Color characteristics
Color is the most directly visual feature that described the content of the image (Han and Chen, 2008).Color was an internal feature of an image and reflects the surface properties of image and scene region corresponding to the image. Compared with other visual features, color features were insensitive to change in image size, direction and perspective.Therefore, color features were widely applied to image recognition. Compared to the Red, Green and Blue color space (RGB) color space, Hue, Saturation and Value color space (HSV) space could intuitively express color shade, hue and bright degree, which were convenient to compare different colors. Thus,in rice diseases recognition, HSV color space could reflect the in-fluence of color on the scab. In this paper, the RGB color space was transformed into HSV color space was transformed, in which HSV referred to the hue, the saturation and the brightness.
The color moments were simple and effective representation of color features, and color moments could be expressed in the image color distribution with simple data effectively. In this study, color moment method was used to express the color features of the scab images. As the color distribution information was mainly concentrated in the low order moment,color distribution of the image was usually expressed by the first and the second order moment of the color.Fig. 2 was the HSV color histogram corresponding to the three disease pictures in Fig. 1. According to Fig. 2, the V component of the histogram of the three diseases had great difference. In picture (a) of Fig. 2,V component histogram of rice blast was concentrated in the hue value from 0.6 to 0.9 and the peak appeared in the hue value of approximately 0.8 points. In picture(b) of Fig. 2, V concentration in the hue histogram of component sheath value was from 0.4 to 0.7, and the peak value of hue was 0.4-0.5. In picture (c) of Fig. 2,bacterial blight V component histogram distribution was uniform and the color was bright. Therefore, the first and the second color moments of V component were used as the color characteristics.
Shape features
Different diseases of rice had great difference in scab shape. In this study, five shape features were extracted including rectangular degree, complexity,length, narrow length and sphericity. After image segmentation, black background was removed and scab area was obtained. The calculation method was shown in formula (3):
Where,f(x,y) meant a digital image of rice disease.Five shape features were calculated for three kinds of diseases in scab image database according to the following formulas. In formulas (4) and (5), scab area was expressed byS0, referring to the rice leaf scab with pixel value.
(1) Scab rectangular degree: the parameter was expressed byRt, referring to the ratio of rice leaf images in scab area and minimum external rectangle scab, calculated by formula (4):
Where,S0was the scab area,Sewas the area by four vertexes of the smallest rectangle surrounded the scab.
(2) Scab complexity: this parameter described the discrete of scabs, and was represented byS. The calculation methods was shown as formula (5), which showed that the greater perimeter of the unit area value, the higher discrete degree of the scab was and more complex as well.
(3) Scab length: this parameter referred to the ratio of the short edge and long edge of scab minimum bounding rectangle.
(4) Scab aspect ratio: the parameter was used to describe the narrow length of the object. The aspect ratio expressedLwas defined as:
MθmaxandMθminrepresented the maximum and minimum values ofMθ, respectively.Mθrepresented the inertia moment of the imagefaround the liney=xtanθ.
(5) Spot sphericity:rnrepresented inscribed circle radius of the target area,rwrepresents the radius of circumcircle in the target region. The sphericitySwas defined as:
Fig. 2 Color histogram of HSV for three diseases
Texture features
Texture features described the surface properties of objects corresponding to images or image areas. It was calculated from image and it quantified the characteristics of gray level changing in the region.The texture features of the images often reflected the texture of the objects, such as roughness, smoothness,granularity, randomness and normalization. Usually,the gray level co-occurrence matrix was used to extract the texture features of the image, which could be obtained by counting the distance between the two pixels with a certain gray level on the image.The gray level co-occurrence matrix was simple in operation and accurate in the calculation, and the texture feature value was comprehensive. The gray level co-occurrence matrix of an image could reflect the comprehensive information of the gray level on the direction, the adjacent interval and the amplitude of the change. It was the basis for analyzing the local patterns and the rules of their arrangements (Hemalatha and Anouncia, 2017; Arivazhaganet al., 2013).
In this study, a function graycoprops was chosen to calculate texture eigenvalues. This function was convenient to call and simple to write. The specific invocation format was as the following:
stats=graycoprops (glcm, {'contrast', 'correlation','energy', 'homogeneity'});
The five texture features were calculated using the function including correlation, entropy, stability and the second order moments in Matlab.
BP neural network
BP neural network was a typically supervised MLP neural network classifier, implementing a mapping from the input to the output function. BP neural network could achieve any complex nonlinear mappings, which made it particularly suitable for solving complex problems. Automatic extraction of"reasonable" solution rules examples could learn the correct answer with set, which had self-learning ability and had certain popularization and generalization ability.
The toolbox of BP neural network function in Matlab was used to build neural network structure with three layers. BP neural network was used as classifier for three kinds of rice diseases. It contained input layer, hidden layer and output layer. Selected characteristic parameters were neurons of input layer.Hidden layer contained a variable number of neurons and transfer function was transferred by the tangent Sigmoid. The output layer contained four neurons,which represented the rice blast, sheath blight of rice,rice bacterial blight and not recognized (Jia and Ji,2013; Gonzalez, 2007; Changet al., 2012; Wanet al.,2006).
Results
Optimization of color feature parameters
The first and the second order color moments of V component of HSV color space were selected as color feature parameters in this paper. These values were calculated for all the scab images in database.Fig. 3 showed the comparison of the first order color moments and the second order color moments curve for three kinds of diseases. Good discrimination was observed among rice blast, sheath blight and bacterial blight. So the first order and the second order color moments could be used as color feature parameters.
Optimization of shape feature parameters
Through the analysis, complexity, length, rectangular degree, spherical degree and aspect ratio were chosen as feature parameters in this paper. And the five characteristic parameters for all the images in database were calculated. The differences among the five characteristic parameters of three kinds of diseases were analyzed by the single-factor variance analysis with equaled 0.05. The results are shown in Table 1.From the data in Table 1, three kinds of rice diseases had the greatest discrimination in complexity, followed by length, rectangular degree, spherical degree and aspect ratio. Spherical degree and aspect ratio had poorer performance than other three. In order to verify the contribution of spherical degree and aspect ratio,five parameters (complexity, length, rectangular degree, aspect ratio and spherical) and three parameters(complexity, length and rectangular degree) were used to build BP neural network. Sixty samples are used to train the neural network and 50 samples were used to test model of neural network. The recognition results are shown in Table 2. The results showed that for the rice blast and sheath blight, adding aspect ratio and spherical degree could only increase the recognition rate by one percentage point. In addition, no increase of the recognition rate was observed for bacterial blight disease, when adding these two parameters. Therefore,these two parameters of three kinds of diseases had no significant contribution and the complexity, length and rectangular degree could be used as the shape feature parameters.
Fig. 3 Data contrast diagram of the first order color moment and the second order color moment for three diseases
Table 1 Single factor analysis of variance of shape feature parameters
Table 2 Recognition accuracy of BP neural network based on different shape features
Optimization of texture feature parameters
Five characteristic parameters were selected as the texture features including correlation, entropy, stability and the second order moments. These five parameters of all the scabs in the database were calculated and analyzed by the single-factor variance analysis withαvalue of 0.05. The results of the calculation are shown in Table 3.
As shown in Table 3, the maximum distinction of the five texture characteristic parameters of the three rice diseases was the second order moments,followed by entropy, contrast and stationary and the smallest was relativity. The BP neural network was also established to check, if the two parameters less affected could be removed or not. The experimental scheme was optimized with the shape feature parameters, and the results of the final model are shown in Table 4.
Results showed that the effects of stationary and the relativity were none for rice sheath blight and bacterial blight disease recognition and not significant for rice blast as well. Thus, the two parameters could be removed from the texture parameters and the second order moments, contrast, entropy could be remained.
Table 3 Single factor variance analysis of texture feature parameters
Table 4 Recognition accuracy of BP neural network based on different texture features
Design of BP neural network
Color features, texture features and shape features of rice blast, sheath blight and bacterial blight,including 12 characteristic parameters were extracted and analyzed by the single-factor variance analysis. In addition, all the parameters were optimized by BP neural network model. Finally, eight effective characteristic parameters were selected and contained two color feature parameters, three shape characteristic parameters and three texture parameters.In order to verify the recognition of different characteristic parameters on three rice diseases, the BP neural networks were built with each of color features, shape features and texture features or the combination of them.
BP neural network based on color features
The first and the second color moments of V component in the HSV color space were corresponding to the two input neurons of the input layer of the BP neural network, respectively. The output layer adopted four neurons. Fifty scab images of each disease were used to test the accuracy of BP neural network classifier. The results are shown in Table 5. Results showed when only using color feature as a parameter identification of rice blast, sheath blight and bacterial blight, the correct recognition rate was below 80%, and the recognition rate was not high. The reason was that the color of all the three diseased leaves turned from green to brown till gray. Therefore, the identification of three diseases was not high, when only using color feature to build BP neural network.
BP neural network based on shape features
Shape features including rectangular degree, complexity and length were corresponding to three neurons in input layer of the BP neural network classifier.
The output layer adapted four neurons. Fifty scab images from each rice disease were used to test the accuracy of BP neural network recognition classifier.The results are shown in Table 6.
From Table 6, the accuracy rate of identifying three diseases by using shape features was over 80%, which indicated that the three diseases could be easier to identify with shape than with color.
Table 5 Recognition accuracy of BP neural network based on color feature
Table 6 Recognition accuracy of BP neural network based on shape features
BP neural network based on texture features
Texture features including contrast, entropy and the second moments were corresponding to the three input neurons in the input layer of BP neural network classifier. The output layer adapted four neurons.Fifty scab images of each rice disease were used to test the accuracy of BP neural network classifier. The results are shown in Table 7. The three diseases of rice had the largest range in texture characteristics,and the recognition rate of BP neural network built with texture feature parameters reached 90% for the recognition of bacterial blight and rice sheath blight.The recognition rate for rice blast was also higher when using texture features than color and shape features.
Table 7 Recognition accuracy of BP neural network based on texture features
BP neural network based on color, shape and texture combination features
In order to improve the recognition accuracy of rice blast, sheath blight and bacterial blight, the BP neural network was constructed by combining color features,shape features and texture features. The recognition accuracy of the BP neural network classifier was tested with 50 samples of each rice disease. The results are shown in Table 8.
Table 8 Recognition accuracy of BP neural network based on combinatorial characteristics
According to the experimental results, the accuracy of the model, based on the combine of texture features and shape was same for identifying rice sheath blight,lower by two percentages for rice blast and higher by three percentages for rice bacterial blight, compared to the model based on the combine of all of them.The reason was that it was not easy to recognize leaf blight and sheath blight using color features and the recognition rate of leaf blight would decrease, when adding color features. Color characteristic parameters had a certain contribution to the identification of rice blast and sheath blight. Therefore, the combination of three color characteristics was chosen as input to build BP neural network. Fourty spot images of each rice disease were used to test model recognition. The recognition rate was above 98% and the recognition model performed well.
In this study, the single-factor variance analysis was applied to exclude the characteristic parameters which were not used to recognize the difference among three rice diseases. The input elements of the BP neural network could be reduced, so as to simplify the model input and improve the convergence speed of the model. Two shapes and two texture feature parameters were removed and eight feature parameters remained.In order to verify whether parameter optimization had an impact on rice disease recognition rate or not,a BP neural network model was built with all the 12 characteristic parameters as inputs. The results of network identification are shown in Table 9.
Table 9 Recognition accuracy of BP neural network based on combinatorial characteristics
According to Tables 8 and 9, BP neural network based on 12 parameters did not improve the recognition rate compared to the BP neural network based on eight parameters. Thus, the parameter optimization process simplified the model and did not reduce the rice disease recognition rate. The results showed that the process of optimization of characteristic parameters was theoretical significance and practical application.
Discussion
Smart phones can be used as image acquisition devices
In this research, the mobile phone was used as image acquisition device and it was a medially configured mobile phone. Character parameters were extracted from leaves color, shape, texture and build the BP neural network as identification model. Experimental results showed that the images collected by mobile phones could meet the needs of automatic identification of rice diseases and the recognition rate was high. And the recognition rate was more than 96%. Using mobile phones as acquisition device were conducive to the popularization of automatic identification technology for rice diseases. The picture taken by a digital camera was about 4 000×3 000 pixels while taken by a smart phone was about 2 000×1 000 pixels. In terms of the time of transferring a photo, a phone takes only a few seconds, while a digital camera took dozens of seconds. By comparison,the pictures taken by a smart phone could reduce about one-sixth of the space and time, which greatly improved the space utilization rate and the processing speed. Thus, the influence of image resolution ratio to the rice disease recognition rate was not significant,which made it possible using mobile phone as the mobile terminal equipment.
Effect of rice disease onset period of lesion recognition rate
In this study, scab images of the early, middle and late onset of the diseases were collected. To ensure transferability of the model, images of different stages were not classified when establishing scab library.At the early onset of rice diseases, little difference was observed among the three kinds of diseases scab in color, shape and texture. With the development of diseases, the distinction between the scab degrees increased gradually, so the recognition rate of the model for identification of disease at early onset was low, but higher at the middle and late onset. In a follow-up study, research should focus on digging information in scab images at the early onset of three rice diseases extracting features and then constructing recognition model for early onset of rice diseases. The diagnosis and identification for the early onset of rice diseases would have an important guiding significance to the actual production.
Conclusions
In this paper, automatic recognition method for rice blast, sheath blight and bacterial blight was studied based on machine vision and BP neural network.Mobile terminal equipment (mobile phone) was explored as image collecting tool to fit for actual production application. Database of rice leaf images with three kinds of diseases was built after the method of threshold segmentation. Character parameters were extracted from leaf color, shape and texture, especially optimized by single-factor variance analysis. Optimal parameters were chosen, based on effects of BP neural network model. The experimental results showed that the combination of the three parameters could reflect the discrimination among the three rice diseases and the recognition rate was more than 96%. In this study,the optimization of feature parameters could reduce the count of input parameters and simplify the model without reducing the rate of disease recognition.Image collecting tool, which was with low cost, high penetration rate and simple operation, would promote the popularization of the automatic recognition method of rice diseases and make it more fitful for actual application. Simultaneously, method proposed in this paper also provided guidance for automatic recognition of other crop diseases.
杂志排行
Journal of Northeast Agricultural University(English Edition)的其它文章
- Differential Responses of Phytophthora sojae to Seed Exudates of Host Soybean and Non-host Maize
- Identification of QTL and Analysis QTL with Tolerance to Sclerotinia sclerotiorum in Soybean
- Screening of Transgenic Soybean Materials for Salt Tolerance
- Development, Reproduction and Body Size Variation of Aphis glycines Matsumura Fed on Different Plants
- Effects of Bacillus subtilis on Degradation of Cellulose
- Effects of Dietary Fat Levels on Growth, Nutrient Digestibility,Nitrogen Utilization and Fur Quality of Growing-furring Blue Foxes