Keras CNN Pre-
trained Deep
Learning models for
Flower Recognition
ā€œ
2
Steps
3
Step 1
Dataset
Acquisition
Step 3
Testing
Step 2
Training
Deep Learning
1.
Data Acquisition
Data
Acquisition
5
Data Acquisition
o Download the
FLOWER17 dataset
from here:
http://www.robots.ox.ac.
uk/~vgg/data/flowers/17/
o Unzip the file and you
will see all the 1360
images listed in one
single folder
named *.jpg.
o The FLOWERS17
dataset has 680
images of 17 flower
species classes with
40 images per class.
6
o To build our
training dataset, we
need to create a
master folder
named dataset,
and create Train
and Test folder
inside it.
o Inside train folder,
create 17 folders
corresponding to
the flower species
labels.
7
Folder Structure
Organize
Dataset
Code
9
2.
Data Training
Configuration
File
ā—¦ This is the configuration file or
the settings file we will be
using to provide inputs to our
system.
ā—¦ This is just a .json file which is a
key-value pair file format to
store data effectively.
11
12
1. Model:
The model key
takes the
parameters –
’mobilenet’.
2. Weights:
The weights key takes the
value ’imagenet’ as we are
using weights from
imagenet. You can also set
this to ’None’.
3. Include-top:
This key takes the
value false specifying that we
are going to take the
features from any
intermediate layer of the
network.
4. Test_size:
The test_size key takes the
value in the range (0.10 - 0.90).
This is to make a split between
your overall data into training
and testing.
5. Seed:
The seed key takes any
value to reproduce same
results everytime you run
the code.
6. Num_classes:
The num_classes specifies the
number of classes or labels
considered for the image
classification problem.
ā€œ
Feature Extraction
13
ā€œ
14
ā€œ
15
Output
Output
Files
16
17
18
Output
19
Confusion Matrix
20
Trained
Model
21
Model File
ā€œ
Results File
22
Accuracy
Rank-1
Accuracy
Rank-5
Accuracy
Mobilenet 98.53% 100.00%
23
3.
Test Un-seen Data
25
26
References
27
1. https://gogul09.github.io/software/flower-recognition-deep-learning
28
THANKS!
Any questions?

Keras CNN Pre-trained Deep Learning models for Flower Recognition