Source-linked AI summary
A Leaf Recognition Algorithm for Plant Classification Using Probabilistic Neural Network
Stephen Gang Wu, Forrest Sheng Bao, Eric You Xu, Yu-Xuan Wang, Yi-Fan Chang, Qiao-Liang Xiang
TL;DR
Automated plant classification from leaf images requires extracting useful features without relying on manual botanist-defined inputs. The paper combines 12 extracted features, PCA, and a PNN trained on 1800 leaves to classify 32 plant types, achieving accuracy greater than 90%.
Problem
Existing leaf-recognition approaches can require manually entered botanist-defined features, while some systems apply only to certain species.
Method
The algorithm extracts 12 leaf features, reduces them with PCA, and supplies the resulting principal variables to a three-layer PNN classifier.
Results
90.312% average accuracy was obtained when testing 10 leaves per plant kind, while the algorithm classified 32 kinds of plants.
Takeaways & Limitations
The authors characterize the algorithm as workable, fast in execution, efficient in recognition, and easy to implement for general-purpose leaf-based plant classification.
Abstract
from arXiv · showhide
In this paper, we employ Probabilistic Neural Network (PNN) with image and data processing techniques to implement a general purpose automated leaf recognition algorithm. 12 leaf features are extracted and orthogonalized into 5 principal variables which consist the input vector of the PNN. The PNN is trained by 1800 leaves to classify 32 kinds of plants with an accuracy greater than 90%. Compared with other approaches, our algorithm is an accurate artificial intelligence approach which is fast in execution and easy in implementation.
I. INTRODUCTION
The paper targets automated plant classification from leaf images, addressing the difficulty of extracting botanist-defined features without human intervention. It combines automatically extracted leaf features, PCA, and a PNN to create a fast, general-purpose recognition algorithm.
- Leaf-image classification is presented as a low-cost, convenient alternative for transferring plant information to computers.
- Prior systems often require manually entering botanist-defined features, limiting automatic feature extraction.
- Earlier approaches include species-specific systems, similarity-based expert systems, k-NN classifiers, and several ANN-based methods.
- ANN methods are reported as faster and more accurate than k-NN and MMC hypersphere classifiers, motivating the paper’s ANN approach.
- The proposed algorithm extracts 12 digital leaf features, orthogonalizes them with PCA, and uses PNN for fast, simple classification.
II. IMAGE PRE-PROCESSING
The preprocessing pipeline converts captured JPEG leaf images from RGB to grayscale and then to binary form using a histogram-based threshold, followed by noise filtering.
- Leaf images are captured with scanners or digital cameras as JPEG files at 800 x 600 resolution, without restricting leaf orientation.
- Each RGB image is first converted into grayscale using the paper’s weighted color-to-luminance formula.
- The grayscale-to-binary threshold is selected from the RGB histogram by separating leaf pixels from the white background.
- The selected threshold is 0.95, corresponding to approximately 242/255, and pixels above it become 1 while the others become 0.
- A 3 × 3 rectangular averaging filter reduces noise before pixel values are rounded to binary values.
B. Boundary Enhancement
Boundary enhancement extracts the leaf margin after preprocessing, then derives geometric and morphological features from the resulting leaf shape. Most measurements are automatic, but physiological length requires marking the main-vein terminals.
- B. Boundary Enhancement: A Laplacian filter with a 3 × 3 spatial mask is used to obtain the leaf-image margin.
- B. Boundary Enhancement: The preprocessing example swaps binary pixel values so the boundary appears as a black curve on a white background.
- III. FEATURE EXTRACTION: The algorithm extracts 12 digital morphological features derived from 5 basic geometric features for rapid, mostly automatic feature acquisition.
- A. Basic Geometric Features: Leaf diameter is defined as the longest distance between any two points on the leaf margin.
- A. Basic Geometric Features: Physiological length is the distance between the two marked terminals of the leaf’s main vein, making this the algorithm’s only human-intervened step.
- A. Basic Geometric Features: Physiological width is defined from the longest intersection distance between lines orthogonal to the main-vein terminal line and the leaf margin.
3) Physiological Width:
The paper defines physiological geometry and several digital morphological features from processed leaf images. These features quantify size, shape, smoothness, and similarity to basic geometric forms.
- Leaf area is computed by counting pixels with binary value 1 in the smoothed binary leaf image.
- Leaf perimeter is calculated by counting pixels forming the leaf margin.
- Twelve digital morphological features are defined from five previously introduced basic features.
- Smooth factor compares leaf areas after 5 × 5 and 2 × 2 rectangular averaging filters to describe image smoothness.
- Aspect ratio is defined as physiological length divided by physiological width, Lp/Wp.
- Form factor compares a leaf with a circle using 4πA/P 2, where A is area and P is perimeter.
2) Aspect ratio:
The paper defines shape descriptors by comparing leaves with rectangles, using diameter and perimeter relationships, and combining physiological length and width.
- 3) Form factor:: Rectangularity describes leaf similarity to a rectangle using LpWp/A.
- 4) Rectangularity:: Narrow factor is defined as diameter divided by physiological length, D/Lp.
- The perimeter-to-diameter ratio is calculated as P/D.
- 7) Perimeter ratio of physiological length and physiological width:: The perimeter ratio of physiological length and width is calculated as P/(Lp + Wp).
- 8) Vein features:: Vein features are obtained after morphological opening with disk-shaped structuring elements of radii 1, 2, 3, and 4.
8) Vein features:
The method extracts five normalized vein features, then applies PCA to reduce the 12-feature representation to five principal variables before PNN classification.
- 8) Vein features:: The final five vein features are Av1/A, Av2/A, Av3/A, Av4/A, and Av4/Av1.
- PCA orthogonalizes 12 features so the transformed coordinates successively capture the greatest remaining variance.
- 93.6% of the contribution comes from the first five principal components, which are adopted to balance computational complexity and accuracy.
- The feature transformation maps vectors from R12 to R5 in the new coordinate system.
- B. Introduction to Probabilistic Neural Network: PNN is selected for fast training, robustness to noise examples, simple structure, and a training procedure that can be implemented by matrix manipulation.
- The PNN classifies an input by selecting the class with the maximum probability after radial-basis processing and competition.
C. Network Structure
The PNN network compares a five-dimensional input with stored weight vectors, transforms distances through a radial-basis layer, and selects the strongest class output.
- C. Network Structure: The network structure uses MATLAB-style array notation, with array dimensions marked beneath their names.
- C. Network Structure: The input vector p has dimension R × 1, with R = 5 in this paper.
- Radial Basis Layer: The radial-basis layer computes distances between p and each row of the Q × R weight matrix W, producing a Q × 1 distance vector.
- Radial Basis Layer: The bias vector is combined element-by-element with the distance vector before the PNN transfer function is applied.
- Radial Basis Layer: Each transformed distance produces a corresponding element of a, the radial-basis layer output.
- Radial Basis Layer: For each row, Wi denotes a weight vector and bi denotes the corresponding bias-vector element.
- Radial Basis Layer: A radial-basis neuron outputs near 1 when its weight vector is close to input p, allowing several neurons to respond strongly to similar training patterns.
- Competitive Layer: The competitive layer multiplies a by M and outputs 1 for the largest resulting element, whose index identifies the classified plant.
4) Competitive Layer:
The competitive layer uses 1800 training leaves and a spread constant selected to control radial-basis responses and generalization. Target class vectors encode plant classes in a sparse matrix.
- Training data: 1800 pure leaves are used to train the network, sampled from Nanjing University and Sun Yat-Sen arboretum in China.Most samples are common plants from the Yangtze Delta.
- Competitive layer weights: The weight matrix W contains five principal variables for each training sample, with Q = 1800 in this paper.Each row of W represents one training sample after dimensionality reduction.
- Spread constant: A too-small s can impair generalization, whereas a sufficiently large s produces high responses for all design inputs.Each radial-basis neuron responds with 0.5 or more within distance s of its weight vector.
- Spread constant: The spread constant s is set to 0.03 (≃1/32) according to the authors’ experience.The spread constant controls the response range of radial-basis neurons.
- Target encoding: The target matrix M is formed from class vectors with one 1 in each column at the row corresponding to the sample’s plant class.This produces a sparse class-encoding matrix.
3) Competitive Layer Weights:
The section presents the plant names associated with the competitive-layer training data and describes how each sample’s class is encoded in the target matrix.
- Training-set organization: Table I is titled “DETAILS ABOUT THE LEAF NUMBERS OF DIFFERENT TYPES OF PLANTS.”The supplied table content identifies the table’s subject but does not provide the leaf counts.
- Plant classes: The listed plant classes include Cedrus deodara, Lagerstroemia indica, Podocarpus macrophyllus, and Ligustrum lucidum.These names are presented as scientific names in Latin.
- Plant classes: Additional listed classes include Toona sinensis, Prunus persica, Manglietia fordiana, Mahonia bealei, and Liriodendron chinense.The section continues the scientific-name list for the plant classes.
- Target encoding: For a sample belonging to the j-th plant kind, the j-th row of its target-vector column is set to 1.This class-index conversion produces the sparse target matrix used by the network.
V. EXPERIMENTAL RESULT
The algorithm is evaluated on held-out leaves and compared with other general-purpose leaf-shape classifiers. It reaches 90.312% average accuracy, while some species remain harder to classify.
- Accuracy: 90.312% average accuracy is obtained when 10 testing leaves per plant kind are used.Incorrect recognitions are listed in the last column of Table I.
- Accuracy: Some species obtain low accuracy, and the authors suggest adding more features to improve performance.The proposed extension follows from the simplicity of the algorithm framework.
- Comparison: The algorithm’s accuracy is reported as very similar to other general-purpose classifiers using only leaf-shape information.The comparison concerns methods applicable beyond particular species.
- Implementation: The MATLAB source code is available for download at http://flavia.sf.net.The passage provides the implementation location rather than an additional accuracy result.
VI. FUTURE WORK
Future work extends the classifier’s outputs, explores additional leaf features, and expands the plant database. The authors also frame the current system as a workable, fast, and easy-to-implement approach.
- Output expansion: The algorithm is planned to output the indices of the maximum, second greatest, and third greatest values.These indices are intended to represent the three most probable plant matches.
- Output expansion: Users may select the correct plant from the top three candidates so the algorithm can learn from that feedback to improve accuracy.This is presented as a future development.
- Feature expansion: Future feature work considers Fourier Descriptors and surface qualities useful for human leaf recognition.The authors describe these features as being under consideration.
- Database expansion: The plant database is under construction, and the number of classifiable plants is expected to increase.Database expansion is identified as ongoing work.
- Conclusion: The conclusion reports automated classification of 32 plant kinds from digital leaf images with accuracy greater than 90%.The paper attributes fast execution to PNN and describes the implementation as easy.