Flavia (at a glance)

a Leaf Recognition Algorithm for Plant Classification using PNN (Probabilistic Neural Network)

Publication and errata

Please cite our paper if you use our data and program in your publications. We will be very happy if you give us the credit.

This program is based on the paper A Leaf Recognition Algorithm for Plant classification Using Probabilistic Neural Network, by Stephen Gang Wu, Forrest Sheng Bao, Eric You Xu, Yu-Xuan Wang, Yi-Fan Chang and Qiao-Liang Xiang, published at IEEE 7th International Symposium on Signal Processing and Information Technology, Dec. 2007.

We also found some errors in the Latin or English names of plants. We listed the up-to-date version in the "Dataset" section. We shared our dataset for other researchers here.


The purpose of this MATLAB program is to teach a computer to classify plants via their leaves. You just need to input the leaf image of plant (acquired via digital camera or scanners), then the computer can tell you what kind of plant it is. Presently, our system can classify 32 plants. The average accuracy is 93% for all of them.

We utilize the PNN (Probabilistic Neural Network) to implement this AI process. 12 characters of leaves are taken into account, including geometrical ones and morphological ones. After discriminant analysis (stepwise method), all these characters are reserved. PCA orthogonalizes these 12 characters into 5 principal variables, which are input vectors of the PNN. Details can be found in our paper.

More details can be found from our SourceForge summary page.


The default download is our MATLAB source code. We strongly recommend you read the user manual first. If you need the leaf comparison function of our program, please also download the standard leaf image library and place it in proper path.

If any link is broken, please check all files of this project to determine. If you have further trouble, please ask questions in our mailing list or forum.

If you want a big collection of leaf images, please see the section below to download our 1GB dataset.


During our research, we suffered a lot from the lack of a standard plant leaf dataset. Thus, we don't have a benchmark to compare our algorithm with others. A public dataset may help other researchers working on similar projects as ours. So we decide to share our raw data. You can download the complete raw dataset. It is a very large file, around 1 GB. You can check your file integrity by this MD5SUM: 8d3ca661e201f4eac8d0975e7b6b5853.

When citing the source of the dataset, please don't use the web link, which might change. Please cite it as the data used in our paper: Stephen Gang Wu, Forrest Sheng Bao, Eric You Xu, Yu-Xuan Wang, Yi-Fan Chang and Chiao-Liang Shiang, A Leaf Recognition Algorithm for Plant classification Using Probabilistic Neural Network, IEEE 7th International Symposium on Signal Processing and Information Technology, Dec. 2007, Cario, Egypt

In our dataset, file names of all images are 4-digit numbers, followed by a ".jpg" suffix. The plants and their corresponding image file names are listed in below table. The classification labels of plants used in our program are listed at the most left column. Classification information from USDA websites, Wikipedia or other websites are listed in the most right column.

label Scientific Name Common Name(s) filename URL
1 Phyllostachys edulis (Carr.) Houz. pubescent bamboo 1001-1059
2 Aesculus chinensis Chinese horse chestnut 1060-1122
3 Berberis anhweiensis Ahrendt Anhui Barberry 1552-1616
4 Cercis chinensis Chinese redbud 1123-1194
5 Indigofera tinctoria L. true indigo 1195-1267
6 Acer Palmatum Japanese maple 1268-1323
7 Phoebe nanmu (Oliv.) Gamble Nanmu 1324-1385
8 Kalopanax septemlobus (Thunb. ex A.Murr.) Koidz. castor aralia 1386-1437
9 Cinnamomum japonicum Sieb. Chinese cinnamon 1497-1551
10 Koelreuteria paniculata Laxm. goldenrain tree 1438-1496
11 Ilex macrocarpa Oliv. Big-fruited Holly 2001-2050
12 Pittosporum tobira (Thunb.) Ait. f. Japanese cheesewood 2051-2113
14 Chimonanthus praecox L. wintersweet 2114-2165
15 Cinnamomum camphora (L.) J. Presl camphortree 2166-2230
16 Viburnum awabuki K.Koch Japan Arrowwood 2231-2290
17 Osmanthus fragrans Lour. sweet osmanthus 2291-2346
18 Cedrus deodara (Roxb.) G. Don deodar 2347-2423
19 Ginkgo biloba L. ginkgo, maidenhair tree 2424-2485
20 Lagerstroemia indica (L.) Pers. Crape myrtle, Crepe myrtle 2486-2546
21 Nerium oleander L. oleander 2547-2612
22 Podocarpus macrophyllus (Thunb.) Sweet yew plum pine 2616-2675
23 Prunus serrulata Lindl. var. lannesiana auct. Japanese Flowering Cherry 3001-3055
24 Ligustrum lucidum Ait. f. Glossy Privet 3056-3110
25 Tonna sinensis M. Roem. Chinese Toon 3111-3175
26 Prunus persica (L.) Batsch peach 3176-3229
27 Manglietia fordiana Oliv. Ford Woodlotus 3230-3281
28 Acer buergerianum Miq. trident maple 3282-3334
29 Mahonia bealei (Fortune) Carr. Beale's barberry 3335-3389
30 Magnolia grandiflora L. southern magnolia 3390-3446
31 Populus ×canadensis Moench Canadian poplar 3447-3510
32 Liriodendron chinense (Hemsl.) Sarg. Chinese tulip tree 3511-3563
33 Citrus reticulata Blanco tangerine 3566-3621


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Support or contact

Please use the forum of this project or join our mailing system to ask for help.


Program information

Detailed information of our algorithm

Start the program from command window

Click to mark the two terminals of the longest and main vein of the leaf.

Side-by-side display of the image you inputed and the standard leaf image.

Result message box

Project file structure

Last update: Dec. 24, 2009