Leaf Recognition Using BP RBF Hybrid Neural Network
Leaf Recognition Using BP RBF Hybrid Neural Network
(2022) 33:579–589
https://doi.org/10.1007/s11676-021-01362-4
ORIGINAL PAPER
Received: 24 December 2020 / Accepted: 5 April 2021 / Published online: 26 June 2021
© The Author(s) 2021
13
Vol.:(0123456789)
580 X. Yang et al.
recognition and machine learning technology with plant This system is a software solution for automatic recog-
morphology to ascertain the automatic recognition of leaf nition and classification of plant species. The scheme is
images. Wu et al. (2007) extracted 12 digital morphologi- divided into four main steps: (1) color space conversion of
cal features on Flavia dataset (a widely used leaf dataset) images; (2) image pretreatment; (3) leaf feature extraction;
and used the probabilistic neural network (PNN) to test the and (4) design of classifier and recognition. The basic flow
accuracy of their algorithm. The result was very similar of the leaf identification system is shown in Fig. 1.
to other systems (90%). Turkoglu et al. (2019) proposed
that leaf feature extraction may be completed by dividing
the leaf image into two or four parts. The accuracy of their Materials and methods
method with the Flavia dataset was 99.1%. In their study,
image processing based on feature extraction methods such Sample preparation
as color, veins, Fourier descriptors (FD), and gray-level
co-occurrence matrix (GLCM) were used. Tang (2020) In order to achieve the recognition and classification of
used the grey cluster analysis method to establish a quan- species, the necessary preparation work is to establish a
titative feature system of leaves, and used a probabilistic leaf database (Backes et al. 2009; Kumar et al. 2012). The
neural network for classification. The results were to eval- research area was the Experimental Forest Farm of the
uate model performance and the influence of core features Northeast Forestry University, with geographic coordinates
of the model. The results showed that an accuracy of the 45°71′ − 45°72′ N, 126°62′ − 126°63′ E. The dataset com-
GBDT-PNN model using 12 core features was 92.7%, and prised 366 images of leaves belonging to 15 common spe-
the accuracy with all 35 features was 93.5%. cies in Northeast China. The scientific names and sample
Although there have been numerous advances on leaf numbers are shown in Table 1.
classification based on machine learning, there are still Leaves with common shapes, complete fronds, spotless,
some shortcomings. Few researchers have analyzed the and without pests were chosen, including petioles. Dust was
influence of different features on recognition. Most stud- removed from leaves; LEDs were used to illuminate leaves,
ies have selected too many features, which faced challenges and all leaf samples were photographed with a Nikon D850
in practical application. In the process of leaf image pre- digital camera. Leaf images of each species are shown in
treatment, the binary image obtained contains noise after Fig. 2.
image segmentation, usually caused by highlights on the leaf
surface and dust particles scattered on the image acquisi- Image pretreatment
tion device. Traditional denoising methods usually mistake
noise-polluted leaf surface for background. The RGB color space does not distinguish between bright-
Given these problems, this study proposed an image seg- ness and color information and so the images are converted
mentation method based on HSV color space and connected to HSV color space which has good linear scalability and
component labeling, which can completely extract leaves is directly oriented to human visual perception (Perona and
without petiole. The extracted image had a good denoising Malik 1990). Based on HSV images, the background was
performance. In addition, shape and texture were extracted, well separated, leaf contours were extracted and the noise
and the leaf recognition performance of various machine was initially removed. The Otsu algorithm (Chang et al.
learning methods was compared, and a BP-RBF hybrid neu- 2018; Yu et al. 2019) was selected as the threshold segmen-
ral network was newly established. tation method proposed by Otsu (1979). The basic principle
13
Leaf recognition using BP‑RBF hybrid neural network 581
Table 1 Statistics of the species from the training and test sets Shape features
Label Tree species Number of samples
Shape is one of the most important features for character-
Training set Test set Total
izing a leaf because it can be perceived by humans (Wang
1 Acer negundo L 17 5 22 et al. 2008). According to the extracted leaf contour, sev-
2 Ulmus pumila L 23 6 29 eral geometric parameters (Wu et al. 2007) were calcu-
3 Armeniaca sibirica (L.) Lamb 21 6 27 lated, including leaf area (S), the smallest rectangular area
4 Salix matsudana Koidz 25 7 32 surrounding the leaf (S0), the perimeter of the leaf area
5 Populus davidiana Dode 20 5 25 (L), length (b) and width (a) of the minimum enclosing
6 Amygdalus triloba (Lindl.) 15 4 19 rectangle of the leaf, the coordinates (x0, y0) of the center
Ricker of mass of the leaf, the coordinates (x, y) of the upper left
7 Tilia mandshurica Rmpr. & 19 5 24 corner of the rectangle, the length (X and Y) of the rec-
Maxim tangle in the x and y directions, the maximum deflection
8 Fraxinus mandshurica Rupr 17 5 22 angle (m) and the total number of groups (M) of the leaf
9 Betula platyphylla Suk 16 4 20 profile. These geometric parameters were used to further
10 Tilia amurensis Rupr 26 7 33 calculate the following five shape features:
11 Juglans mandshurica Maxim 23 6 29 Rectangularity: the ratio of leaf area (S) to the smallest
12 Acer mono Maxim 16 5 21 rectangle surrounding the leaf (S0)
13 Quercus mongolica Fisch. ex 16 4 20
Ledeb S
14 Lonicera maackii (Rupr.) 16 5 21
E1 =
S0 (1)
Maxim
15 Phellodendron amurense Rupr 17 5 22 Roundness: the similarity between leaf contour and cir-
cle.and circle
4𝜋S
E2 = (2)
is to find the best threshold to maximize the variance within L2
or between clusters to accurately classify background and where, S is leaf area and L is the perimeter.
foreground content. However, the Otsu algorithm is very Aspect ratio: the ratio of length (b) to width (a) of the
sensitive to noise, so noise should be eliminated using image smallest enclosing rectangle
smoothing algorithms.
b
E3 = (3)
Feature extraction a
Deviation degree: the offset degree of the leaf centroid
In the process of feature extraction, shape features (Wu et al.
relative to the smallest enclosing rectangle
2007; Wang et al. 2008) and texture features (Haralick 1973)
are the two most commonly used recognition features.
13
582 X. Yang et al.
{ (x0 −x)Y
∑∑
, X≥Y E= (P(i, j))2
X(y0 −y) (8)
E4 = (y0 −y)X (4) i j
Y(x0 −x)
, X<Y
Homogeneity: It represents the local uniformity of the
where, (x0, y0) is the coordinates of the center of mass of image
the leaf, (x, y) is the coordinates of the upper left corner of
∑∑ P(i, j)
the rectangle, X and Y are the length of the rectangle in the H=
1 + (i − j)2 (9)
x and y directions. i j
Sawtooth degree: the ratio of the maximum deflection
angle (m) to the total number of leaf profiles (M) In the above formulas, i and j are coordinates (row and
column) of a pixel in the image. P(i, j) is the gray value of
m the pixel located at coordinates (i, j) in a leaf image.
E5 =
M (5)
13
Leaf recognition using BP‑RBF hybrid neural network 583
A neural network is a complex machine learning algorithm Matlab built-in functions were used to obtain the M groups
used for prediction analysis. It is trained with a set of inputs of coordinate values located in the leaf contour (Fig. 9). For
and outputs, and implicit relationships between inputs and
outputs are extracted. The back propagation neural network
(BPNN) is a type of multilayer forward neural network,
which has strong data compression and fault tolerance abil-
ities (Rumelhart et al. 1986). It is commonly used in the
fields of pattern recognition, data classification and predic-
tive analysis because of its good adaptability and robustness
(Xu et al. 2018; Yang and Kan 2020).
The radial basis function neural network (RBFNN) has
the ability to approximate functions with arbitrary precision.
Based on the previous study using BPNN to identify plant
leaves, BPNN and RBFNN are connected in series to form a Fig. 4 BP-RBF neural network structure
13
584 X. Yang et al.
Fig. 5 RGB image and H, S and V components of leaf in HSV color space
Fig. 7 Main process of image segmentation a H component; b background removal; c brightness stretch; d binary image; e petiole removal
13
Leaf recognition using BP‑RBF hybrid neural network 585
Fig. 9 Shape features extraction: a shape features; b contour extraction of Betula platyphylla; c contour extraction of Acer negundo
13
586 X. Yang et al.
Table 3 Mean of texture features not completely recognized, while the remaining tree species
Label Texture features
were all correctly recognized.
Fig. 10 Fusion features recognition results of KNN and SVM: a KNN; b SVM. The ordinate is the label of tree species and the abscissa is the
sample order number of test set
13
Leaf recognition using BP‑RBF hybrid neural network 587
Discussion
The training process of the BP neural network and the
MSE are shown in Fig. 12. For the same dataset configura- Table 4 shows the recognition accuracy rates of different
tion, the recognition accuracy rate may change because the classifiers, which provided the opportunity for performance
weight generated by each training was not a certain value, comparisons. As can be seen, whether shape, texture or
which was different from KNN and SVM. When shape and fusion features were used, BP-RBF had the highest recog-
texture features were used as input, the average accuracy rate nition accuracy among all the methods. In contrast, SVM
was 88.1% and 50.6%, respectively, and the highest accuracy had the lowest. The BP-RBF network was used to optimize
rate was 89.9% and 55.7%, respectively. The highest recogni- the previous methods, and the fusion feature recognition
tion accuracy rate of BPNN was 94.9% when using fusion accuracy reached 96.2%, 1.3% higher than the BPNN. The
features as input. contribution of various features to recognition rate can be
The parameter selection of the BP-RBF network can be compared by selecting shape and texture features as the
divided into two parts. The first is the parameter selection input. When using texture features, the recognition rates of
of the BP neural network. The parameters of BPNN are kept all methods were generally low (less than 50%). It’s worth
Fig. 12 Training process of BPNN (left) and mean square error of training (right)
13
588 X. Yang et al.
Accuracy (%)
84
2.0
SVM 660 15 87.0
82 GBDT-PNN 1600 35 93.5
1.5 SSA based SVM 1600 36 96.7
80
1.0
BP-RBF 366 9 96.2
78
0.5
76
0.0 performance in plant recognition systems using fewer sam-
0 1 2 3 4 5
Spread
ples and features.
Plant classification methods have great potential in for-
est studies and management. There were reports that plant
Fig. 13 Mean square error of recognition results and recognition
accuracy of BP-RBF identification error for professionals was 10–20% to the spe-
cies level (Gray and Azuma 2005; Crall et al. 2011). Gener-
ally speaking, leaf structure allows closely related taxa to
Table 4 Comparison accuracy results of different classifier differentiate from each other (Merrill 1978; Sajo and Fls
Features Accuracy rate of classifiers (%)
2002; Espinosa et al. 2006). At the same time, leaf shape and
texture are extracted from leaf structure. The system in this
KNN SVM BPNN BP-RBF study can automatically preprocess leaf images, extract fea-
Shape 87.3 50.6 87.3 88.6 tures, and realize the identification of the species. Its accu-
Texture 48.1 16.5 48.1 49.4 racy is comparable to the work of professionals, and can be
Fusion 92.4 86.1 94.9 96.2 used to develop a portable forest tree species recognition
KNN k-nearest neighbors, SVM Surport vector machine, BPNN Back
system helpful to non-professionals. The advantage is that
propagation neural network, BP-RBF Back propagation and radial the selected features are not affected by translation, rotation
basis function neural network or scale of the leaf images. Although the recognition system
proposed in this study has excellent performance, there is
still room for improvement. Future work is to optimize the
noting that the recognition rate was significantly improved classification methods. On the one hand, the recognition per-
after using texture features combined with shape features. formance of the system can be further improved by enriching
This indicates that the contribution of shape features was the leaf features. On the other hand, more classification mod-
obviously higher than that of texture features in this study. els and algorithms, such as convolutional neural network,
Therefore, it is necessary to fuse texture features with other require further exploration and experimentation. And the
types of features for plant identification. number of tree species in the dataset needs be increased.
According to Fig. 10, KNN and SVM were not able to
recognize some specific types of leaves in the sample. The
results of the above classifiers were unsatisfactory when Conclusion
identifying the tree species labeled 8, 11 and 12, while the
other tree species were all recognized. The reason might This study used image processing technologies and machine
be that the features of these plants are so similar to others learning algorithms to identify 15 kinds of plant leaves. A
that the current features are not enough to distinguish these new BP-RBF hybrid neural network was proposed to further
leaves. The next task is to extract other suitable features improve the recognition accuracy rate. The conclusions of
to increase the differences between different kinds of plant this study are as follows.
leaves. In this study, a leaf database of common tree species in
Up to now, researchers have proposed numerous effec- Northeast China was established. An image segmentation
tive methods for species recognition. Commonly used leaf method, based on HSV color space and connected compo-
recognition methods include PNN (Wu et al. 2007), LDC nent labeling was presented, which can obtain the complete
(Kalyoncu and Toygar 2015), GBDT-PNN (Tang 2020), and leaf image without veins and background. Leaf shape and
SVM (Salman et al. 2017; Ahmed and Hussein 2020). As texture were extracted using feature extraction algorithms.
seen in Table 5, the BP-RBF neural network achieved high With all the leaf samples in our database, the recognition
13
Leaf recognition using BP‑RBF hybrid neural network 589
rates of KNN, SVM, BPNN and BP-RBF methods in the Merrill E (1978) Comparison of mature leaf architecture of three types
test set were 92.4%, 86.1%, 94.9% and 96.2%, respectively. in Sorbus L. (Rosaceae). Bot Gaz 139(4):447–453
Muhammad AFA, Lee SC, Fakhrul RR, Farah IA, Sharifah RWA
Accordingly, the proposed BP-RBF hybrid algorithm had (2019) Review on techniques for plant leaf classification and rec-
higher recognition accuracy than the other algorithms. For ognition. Computers 8(4):77
each method, the recognition contribution of shape features Nelson JDB, Damper RI, Gunn SR, Guo B (2008) Signal theory for
was greater than that of texture features. Compared with SVM kernel design with applications to parameter estimation and
sequence kernels. Neurocomputing 72(1–3):15–22
single-class features, the highest recognition rate can be Nevalainen O, Honkavaara E, Tuominen S, Viljanen N, Hakala T, Yu
obtained using fusion features. The BP-RBF neural network XW, Hyyppa J, Saari H, Polonen I, Imai NN, Tommaselli AMG
can achieve high recognition accuracy rates with fewer fea- (2017) Individual tree detection and classification with UAV-
tures and leaf samples compared with the other methods. In based photogrammetric point clouds and hyperspectral imaging.
Remote Sensing 9(3):185
future studies, the performance of this proposed method will Otsu N (1979) A threshold selection method from gray-level histo-
be improved by using other feature extraction techniques grams. IEEE Trans Syst Man Cybern 9(1):62–66
and classifiers. Perona P, Malik J (1990) Scale-space and edge detection using
anisotropic diffusion. IEEE Trans Pattern Anal Mach Intell
Open Access This article is licensed under a Creative Commons 12(7):629–639
Attribution 4.0 International License, which permits use, sharing, adap- Rahman MM, Islam MS, Sassi R, Aktaruzzaman M (2019) Convolu-
tation, distribution and reproduction in any medium or format, as long tional neural networks performance comparison for handwritten
as you give appropriate credit to the original author(s) and the source, Bengali numerals recognition. SN Appl Sci 1(12):1660
provide a link to the Creative Commons licence, and indicate if changes Roy K, Bhattacharya P (2010) Improvement of iris recognition per-
were made. The images or other third party material in this article are formance using region-based active contours, genetic algorithms
included in the article’s Creative Commons licence, unless indicated and SVMs. Int J Pattern Recognit Artif Intell 24(8):1209–1236
otherwise in a credit line to the material. If material is not included in Rumelhart DE, Hinton GE, Williams RJ (1986) Learning representa-
the article’s Creative Commons licence and your intended use is not tions by back-propagating errors. Nature 323(6088):533–536
permitted by statutory regulation or exceeds the permitted use, you will Sajo MG, Rudall PJ (2002) Leaf and stem anatomy of Vochysiaceae in
need to obtain permission directly from the copyright holder. To view a relation to subfamilial and suprafamilial systematics. Bot J Linn
copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Soc 138(3):339–364
Salman A, Semwal A, Bhatt U, Thakkar VM (2017) Leaf classification
and identification using Canny Edge Detector and SVM classi-
fier. In: 2017 International Conference on Inventive Systems and
References Control (ICISC) pp. 1-4
Tang ZX (2020) Leaf image recognition and classification based
Ahmed A, Hussein SE (2020) Leaf identification using radial basis on GBDT-probabilistic neural network. J Phys Conf Series
function neural networks and SSA based support vector machine. 1592:012061
PLoS ONE 15(8):e0237645 Tarjoman M, Fatemizadeh E, Badie K (2012) An implementation of a
Backes AR, Casanova D, Bruno OM (2009) A complex network- CBIR system based on SVM learning scheme. J Med Eng Technol
based approach for boundary shape analysis. Pattern Recogn 37(1):43–47
42(1):54–67 Turkoglu M, Hanbay D (2019) Recognition of plant leaves: an approach
Chang ZY, Cao J, Zhang YZ (2018) A novel image segmentation with hybrid features produced by dividing leaf images into two
approach for wood plate surface defect classification through and four parts. Appl Math Comput 352:1–14
convex optimization. J for Res 29(6):1789–1795 Wang XF, Huang DS, Du JX, Xu H, Heutte L (2008) Classification
Crall AW, Newman GJ, Stohlgren TJ, Holfelder KA, Graham J, Waller of plant leaf images with complicated background. Appl Math
DM (2011) Assessing citizen science data quality: an invasive Comput 205(2):916–926
species case study. Conserv Lett 4(6):433–442 Wu SG, Bao FS, Xu EY, Wang YX, Xiang QL (2007) A leaf recogni-
Espinosa D, Llorente J, Morrone JJ (2006) Historical biogeographical tion algorithm for plant classification using probabilistic neural
patterns of the species of Bursera (Burseraceae) and their taxo- network. In: 2007 IEEE International Symposium on Signal Pro-
nomic implications. J Biogeogr 33(11):1945–1958 cessing and Information Technology, pp. 11–16
Gong DX, Cao CR (2014) Classification of plant leaves based on con- Xu ZH, Huang XY, Lin L, Wang QF, Liu J, Yu KY, Chen CC (2018)
volutional neural network. Comput Mod 4:12–15 BP neural networks and random forest models to detect damage
Gray AN, Azuma DL (2005) Repeatability and implementation of a by Dendrolimus punctatus Walker. J Forestry Res 31:107–121
forest vegetation indicator. Ecol Ind 5(1):57–71 Yang R, Kan J (2020) Classification of tree species at the leaf level
Haralick RM, Shanmugam K, Dinstein IH (1973) Texture features for based on hyperspectral imaging technology. J Appl Spectrosc
image classification. IEEE Trans Syst Man Cybern 3(6):610–621 87(1):184–193
Kalyoncu C, Toygar O (2015) Geometric leaf classification. Comput Yu HL, Liang YL, Liang H, Zhang YZ (2019) Recognition of wood
vis Image Underst 133:102–109 surface defects with near infrared spectroscopy and machine
Kumar N, Belhumeur PN, Biswas A, Jacobs DW, Kress WJ, Lopez vision. J Forestry Res 30:2379–2386
IC, Soares JVB (2012) Leafsnap: A computer vision system for Zhang JW, Song WL, Jiang B, Li MB (2018) Measurement of lumber
automatic plant species identification. European Conference on moisture content based on PCA and GS-SVM. J Forestry Res
Computer Vision, pp. 502–516 29(2):1–8
Larese MG, Namías R, Craviotto RM, Arango MR, Gallo C, Granitto
PM (2014) Automatic classification of legumes using leaf vein Publisher’s Note Springer Nature remains neutral with regard to
image features. Pattern Recogn 47(1):158–168 jurisdictional claims in published maps and institutional affiliations.
13