A Neural Network Classifier for Date Fruit Varieties - KSU - Colleges

glibdoadingAI and Robotics

Oct 20, 2013 (3 years and 7 months ago)

181 views






-

5

-

( مقر ثحب
1
2
6
( ص ،دوعس كلملا ةعماج ،ةعارزلا ةيلك ثوحب زكرم ،)
5
-
11
)
1121
ـه

ريوطت
مادختساب رومتلا فانصلأ يبصع يكبش ف
ِّ
نصُم

ضعب
تافصلا

ةيئايزيفلا


ينابوح ميهاربإ يلع
1


ماتوث داشن رامع
1


دحاولادبع دمحأ دلاخ
2



:صخلملا

يبصع ةكبش ريوطت ثحبلا فدهتسا
نم ةسيئر فانصأ ةعبس فينصتل ة
مادختساب يركسلاو يرسلاو يرفصلاو يعقصلاو فيس توبنو صلاخلاو يحربلا :رومتلا
ءارجإ مت دقو .نوللا ةفص ىلإ ةفاضإ ةراتخم ةيئايزيف تافص ىلع يوتحت ةيضاير جذامن
ىلع ةساردلا
111

رابتخا ضرغل نيبردم صاخشأ ةطساوب اهرايتخا مت فنص لك نم ةرمث
ا
كلت عم جذامنلا هذه نم اهيلع لوصحلا مت يتلا جئاتنلا ةنراقم تحضوأ دقو .ةفلتخملا جذامنل
نيب تحوارت فينصت ةقدب اهريوطت مت يتلا جذامنلا قوفت ةيئاصحإ جذامن نم
1558

و
..56
ىطعأو نوللا ةفصو ةيئايزيفلا تافصلا نم
ً
اجيزم ةقد رثكلأا جذومنلا لمتشا دقو .%
فينصت ةقد
..56
%

.






_____________________________________
________________________
_______

1

ةيعارزلا ةسدنهلا مسق
،

ةعارزلا ةيلك
،

دوعس كلملا ةعماج
،

ب.ص
2161

،
ضايرلا
11151

.ةيدوعسلا ةيبرعلا ةكلمملا

2

ةيعارزلا تلالآاو تارارجلا تارابتخاو ثاحبأ ةطحم
،

سدنهلا ثوحب دهعم
ةيعارزلا ة
،

ةيحبصلا


ةيردنكسلإا


.ةيبرعلا رصم ةيروهمج







-

6

-

Res. Bult., No. (12
6
), Agric. Res. Center, King Saud Univ., pp. (5
-
18
) 2003

Development of a

Neural Network Classifier for Date
Fruit Varieties

Using
Some
Physical Attributes


Ali I. Hobani
1



AmarNishad M. Thottam
1


Khaled A.M. Ahmed
2



Abstract

A neural network was developed to classify seven major varieties
of date fruits: Berhi, Khlass, Nubot Saif, Saqei, Sefri, Serri, and Sukkari,
using models incorporating selected physical and colo
r features of each
variety. Best quality dates, 100 from each variety graded by experts,
were used for training and testing the models. The results from the
classifier with different classification models were evaluated with the
results from a statistical
classifier and showed that the models had
classification accuracies between 85.7 and 99.6%. The most accurate
model employed a combination of physical and color features of the
dates and it resulted a classification accuracy of 99.6%. Also for the
statisti
cal classifier, this model gave the highest classification accuracy
but it was less than the neural network classifier.










______________
_______________________________
___________

1

Agricultural Engineering Dept., College of Agriculture, King Saud

Un
iversity,
Riyadh 11451, Saudi Arabia.

2

Tractor and Farm Machinery Research and Test Station, Agric. Engng.

Res. Inst.,
Sabahya, Baccous, Alexandria, A.R.E.






-

7

-

INTRODUCTION

The date (
Phoenix dectylifera, L
) is one of the oldest fruits in the
Arab world and is

still thought of as highly nutritious food, containing
all the basic elements required for a balanced diet. In Saudi Arabia
dates are highly regarded and widely consumed both as a fresh fruit and
in different food forms, jam and sweetener. Saudis are the
world’s
highest consumers of date fruits with an annual per capita consumption
of 40 kg (Sawaya, 1986).

Saudi Arabia is also one of the largest date producing countries in
the world with the total crop yield estimated to be about 650,000 tons of
dates per
year. The number of palm trees is estimated to be more than
18 millions of 450 varieties, of which about three
-
quarters are fruit
bearing. The date palms cover an area of more than 100,000 ha through
out the country (Ministry of Agriculture and Water, 1999
). The Arabic
names for the various stages of development of dates are the terms used
universally. The Kimiri refers to the stage when the dates are young and
green in color. The Khalal (also called Bisr) is the stage at which dates
begin to change color a
nd reach maximum weight and size. The Rutab
defines the stage when the fruit begins to soften, loses its astringency
and starts acquiring a darkness and less attractive color. Finally, Tamr,
the ripe stage characterizes the date which has totally softened.

With the advance of computers, the most important quality
a
t
tributes employed in subjective date inspection can be rapidly
mea
s
ured. The most important physical parameters identified for
grading fresh dates are size, shape, and external appearance. They a
re
chara
c
terized by fruit length, diameter, weight, volume, moisture
content, water activity, and color. One parameter, which is important to
the consumer and to post harvest, is the color of the dates. As the color
is distinct for different varieties of d
ates, for the consumers it is very
di
f
ficult to differentiate them. Therefore, for commercial purpose, it is
necessitated to study the color of different varieties of dates. Lee (1997)
reported that with certain guidelines tristimulus color values rather t
han
subjective assessment could be adapted for grading food products.
Tristimulus colorimetric measurements giving the three coordinates in
the color space, L*, a*, and b* corresponding to lightness, gree
n
ness

/






-

8

-

redness, and blueness/yellowness respectivel
y, established by the
International Commission on Illumination (CIE), determine the color
of different varieties of dates accurately. Unlike other fruits, dates are
considerably distinct in external appearance and have at least three
different maturity sta
ges characterized by color, the sweet Khalal, the
Rutab, and the Tamr. The effect of moisture content becomes more
significant at the various stages of date development (Barreveld, 1993).
The color of the date changes from light green to dark as the date
d
e
velops to Tamr with decreasing moisture content. The decreasing
moisture content is related to the water activity of the dates. Water
activity is the equilibrium relative humidity at which the sample neither
gains nor loses moisture, and hence it is an in
dication of 'free' water in a
sample; 'free' refers to the water particles in the sample that are not
chemically or physically bound (Mohsenin, 1986). Therefore, moi
s
ture
content and water activity are also considered as quality attributes in
grading date
s.

Due to the growing demand for the supply of good quality dates
and date pastries in all date producing countries, establishment of date
industries is considered to be of increasing importance. Saudi Arabia
has 48 date processing plants for grading and p
acking date fruits; half
of them are almost completed for full scale operation. In these
indu
s
tries, the current grading procedure is to pass dates on a belt
conveyor and the grades are determined by a number of industry
-

trained i
n
spectors positioned alon
g the conveyor. Despite training, the
grading decisions are inherently subjective and are influenced by the
individual experience of inspectors. An objective means to quantify the
date characteristics would be highly desirable with the expectation that
it
would ease the task of manual inspection and provide more reliable
and consistent grading of dates. In this paper, we present a date
classific
a
tion system based on an artificial neural network classifier
with a set of moisture dependent parameters as chara
cteristic features.
The steps taken to develop the network and the classification results are
presented. The results are also compared with the results from a
statistical class
i
fier.

Artificial neural network models have been shown to achieve
better perfo
rmance than conventional statistical classification





-

9

-

tec
h
niques in many applications. Once the network is trained with a
large number of input patterns for desired outputs, it is able to recognize
similarities when presented with a new input pattern, result
ing in a
predicted output pattern. Damage to a few nodes or connections in the
neural network does not significantly affect its overall performance.
Also its connection weights are adapted in time to improve
perfor
m
ance based on current results. Traditiona
l statistical techniques,
on the other hand, are not adaptive because they process all training
data s
i
multaneously before being used with new data.

There have been several successful applications of artificial
neural networks in the field of agriculture.
Most neural network
a
p
plications involve the use of multilayer perceptron (MLP)
architecture. As MLPs trained with the standard back propagation
algorithm are powerful pattern classifiers researchers have used this
system in many applications. They have be
en shown to approximate the
performance of optimal statistical classifiers in difficult problems. For
example, they have been used to classify pine seedling (Rigney &
Kranzler, 1989), to classify different corn kernel shapes (Liao
et al

1993), and to predi
ct the sensory attributes of the snack quality (Sayeed
et al

1995). We have been interested in using the feed forward MLP
network system with the popular and widely used back propagation
algorithm to classify date varieties into categories. This MLP
archit
ecture has the ability to cla
s
sify the non linearly separable feature
data measured from the date samples using the non linear processing
elements in the hidden and output layers of the network. It could be
trained to produce a correct target output when p
resented with the
corresponding input pattern.

The specific objectives of this research were to develop a neural
network classifier, which could classify seven varieties of date fruits,
and to evaluate the performance of the classifier with the results
o
b
t
ained from a statistical classifier.







-

10

-

MATERIALS AND METHODS

Date samples

Date samples at Tamr stage of seven major varieties:
-

namely,
Berhi, Khlass, Nubot Saif, Saqei, Sefri, Serri, and Sukkari, were used in
this study, Figure 1. Surface color is an impor
tant factor considered to
distinguish between acceptable dates and damaged or immature dates.
The color of acceptable dates is relatively uniform and predominantly
light amber in color. For a specific variety, dates are rejected if they are
significantly l
arger or smaller than the subjective average size. Texture
and shape are useful factors in identifying over
-
dried dates and dates
with defects. The best quality dates graded by experts were obtained
from King Saud University’s Agricultural Research Centre
at Dirab
during the 2000 harvest season. The samples were put in plastic bags
and placed in a refrigerator prior to conducting experiments. This was
done to help prevent the loss of moisture content in the samples, in view
of the important role that moistu
re content plays in determining the
quality classes of dates (Barreveld, 1993).











Figure 1. The seven date varieties; A) Berhi, B) Khlass, C) Nubot


Saif, D) Saqei, E) Sefri, F) Serri, and G) Sukkari.

A

B

C

D

E

F

G






-

11

-

Experimental Procedure

To m
easure the various physical and color attributes of the date
samples of seven varieties, samples kept in the plastic bags were taken
out from the refrigerator and seven sub
-
samples, each of 100 fruits
representing each variety were randomly chosen. In the
classification
analysis, each sub
-
sample of the varieties was considered as a separate
class. For each individual fruit, the physical attributes of length,
d
i
ameter, weight, volume, moisture content, and water activity, and the
color attributes were measur
ed.


Measurement of physical parameters

For each date fruit in the seven sub
-
samples, the major length,
major diameter, and two minor diameters were measured using
Abs
o
lute Digimatic digital electronic vernier caliper of readability 0.00

mm (Model CD
-
15CW
, Mitutoyo Corporation, Japan). The major
length is defined as the longest dimension in the direction parallel to the
stem, while the major diameter is the maximum dimension
perpendicular to the stem. The two minor diameters were measured
very close at the

two ends of the date because of the non
-
cylindrical
nature of the fruit. These parameters were denoted by L, D
2
, D
1
, and D
3

respectively. The volume of each date, V, was measured by first
weighing it on a platform scale (Model AB204, Mettler
-
Toledo AG,
Sw
itzerland) then measuring the apparent change in the weight of a
beaker of water mounted on the same scale, when the date was forced
into the water by means of a sinker rod. The scale had a readability of
0.1

mg, repeatability of 0.1

mg, linearity of ±0.2
mg and a maximum
capacity of 220 g. The weight range of the dates was from 6.2 to 15.31 g.
The weight, W of the date was measured using the same electronic
scale used in the volume measurement setup.


Color measurement

The color of each date fruit in the

seven sub
-
samples was
measured by an S1000 spectrometer system (Ocean Optics, Inc.,
Dunedin, FL), employing the principle of color reflectance. Color
measurements were carried out using a D55 light source and a 10 mm
diameter viewing area with a 10° stand
ard observer. Color parameters





-

12

-

L*, a*, and b* were recorded by means of the Ocean OOIBASE
software. Each parameter was sampled five times and the average
values were stored. Prior to measurement, the system was calibrated
with a 100% reflective white stand
ard.


Measurement of moisture content and water activity

As only two ovens were available at the laboratory to determine
the moisture content of the seven sub
-
samples of date fruits, only one
sub
-
sample was considered for the experiment in one day and the
sub
-
samples of other varieties were put back in the refrigerator. After
the physical and color measurements were taken, all the date fruits in
one sub
-
sample of a variety were brought for determining the moisture
content and water activity. The moisture co
ntent, Mc, was measured
following the AOAC method for sugary fruits (AOAC, 1995). Each
date fruit after removing the seed was cut into small pieces and a
sa
m
ple of 3gm was taken and mixed thoroughly with 2gm of sand to
avoid burning the sugar content. Then

it was weighed using the
electronic scale used in the volume and weight measurements of the
date and dried in an oven (Model VT 6025, Heraeus Instrument,
Germany) at 70°C, under vacuum at 200mm of mercury, for 48 hr. The
dried sample was re
-
weighed and th
e moisture content was calculated
on a dry weight basis.

The water activity, aw, was measured using another 3gm sample
from the already cut pieces of each individual date fruit using an
AquaLab water activity meter of accuracy ±0.003 (Model CX
-
2,
Decagon D
evices Inc., Pullman, WA) with chilled
-
mirror dew point
technique. It was determined as a ratio of vapor pressure exerted by the
water in the sample to the vapor pressure of pure water at the same
temperature. Prior to use in measuring, the equipment was c
alibrated
with distilled water since water activity for pure water at any
te
m
perature above its freezing point is 1.0 (Mohsenin, 1986).


Classification models

From the sub
-
samples of seven date varieties, the data of eight
physical parameters including moi
sture content and water activity, and
the three tristimulus color measurements were pooled in an Excel





-

13

-

spreadsheet for classification purpose. Seven classification models
were formed with the physical and color attributes measured from the
sub
-
samples of s
even varieties (Table 1). To identify the attributes,
major length, major diameter, two minor diameters, weight, volume,
moisture content, water activity, lightness, greenness/redness, and
blueness/ yellowness, variables L, D
2
, D
1
, D
3
, W, V, Mc, aw, L*, a*
,
and b* were used correspondingly. Models 1 through 4 were composed
of all physical parameters and moisture content, and water activity.
Model 5 was formed with tristimulus color measurements only,
whereas models 6 and 7 were composed of both tristimulus
color
measurements and physical parameters, major length and three
d
i
ameters.


Table 1. Classification models and Multilayer perceptron (MLP)
class
i
fier structures

Model

Variables
+

Nodes
in I/P
layer

Nodes in
O/P
layer

Nodes in
hidden
layer 1

Nodes in
hidd
en
layer 2

1

2

3

4

5

6

7

L D
2

W V

L D
1

D
2

D
3

W V

L D
2

W V Mc a
w

L D
1

D
2

D
3

W V Mc a
w

L* a* b*

L D
2

L* a* b*

L D
1

D
2

D
3

L* a* b*

4

6

6

8

3

5

7

7

7

7

7

7

7

7

8

12

12

16

6

10

14

4

6

6

8

3

5

7

+

L
-

major length; D
2

-

major diameter; D
1

and D
3

-

two minor d
i
ameters; W
-

weight;

V
-

volume; Mc
-

moisture content; a
w

-

water activity; L*
-

lightness;

a*
-

greenness/redness; b*
-

blueness/yellowness.






-

14

-

Neural Network Classifier

The basic structure of the neural network chosen for classifying
the date varieties i
s a feed forward MLP as shown in Figure 2. It is a
four layered back propagation system with two hidden layers. This
classifier had a different structure for each classification model, as
shown in Table 1. In the pooled data for the sub
-
samples of the seve
n
date v
a
rieties, a total of 490 measurements (70 from each measurement)
were tagged as training data and the classifier criterion was obtained
from this. In the remaining 210 measurements, 30 from each variety
were tagged as test data. A commercial neural

network software
package, NeuroSolutions (NeuroDimensions, 1997) was used for
network d
e
veloping, training, and testing. Feed forward MLPs trained
with the back propagation algorithm were used. The transfer function
and learning rule adopted for the two h
idden layers were hyperbolic
tangent non linearity and momentum respectively. The former gave the
ne
t
work the computational ability to learn the problem, whereas the
latter, also called the gradient search, was used to calculate the weight
update. The lear
ning rates were set to 1.0, 0.1, and 0.01 for the first
hidden layer, second hidden layer, and output layer respectively,
whereas the m
o
mentum rate was set to 0.7 for both the hidden layers
and output layer. Training proceeded until the convergence; or the

training stopped when the set epochs of 10,000 was reached. Networks
weights were saved for the best performance and classification was
performed with the derived classifier. To evaluate the performance of
the MLP classifier, the same experiment was repea
ted with statistical
method using linear di
s
criminant analysis in SPSS software package
(SPSS, 1998). The di
s
criminant procedure generated a discriminant
function based on linear combinations of the features of different
models and provided the best discri
mination between the varieties.


RESULTS AND DISCUSSION

Table 2 shows the summarized results of the classification
analysis by the MLP classifier, whereas Table 3 shows the results of
classific
a
tion by the statistical method. Out of the seven classificatio
n
models, models 2, 3, 4, and 6 gave higher classification accuracies by





-

15

-

the st
a
tistical method, while the neural network classifier performed
well only with models 1, 5, and 7. However, the best performance was
given by neural network classifier model 7,
with its accuracy of 99.6%.
Model 7 was composed of all physical and color attributes, and it shows
the effectiveness in classification of date varieties when used in
combin
a
tion. Therefore, the procedure using model 7 features on a
neural ne
t
work classifi
er was considered for classifying the sub
-

samples of the seven date varieties.






Figure 2. Multilayer perceptron topology




Input

Output

Hidden layers

Input layer

Output layer






-

16

-

Table 2. Classification accuracy of seven varieties of date samples with

different classification
models by neural network classifier

Model

Date varieties

Average

%

Berhi

Khlass

N. Saif

Saqei

Sefri

Serri

Su
k
kari

1

2

3

4

5

6

7

100

94

100

100

90

80

100

80

100

80

80

100

100

98

100

100

80

100

50

100

100

80

99

80

90

100

100

100

80

98

80

100

100

99

99

10
0

100

100

98

89

90

100

81

80

80

100

80

90

100

88.7

95.9

85.7

95.4

87.0

94.1

99.6



Table 3: Classification accuracy of seven varieties of dates samples

with

different classification models by statistical method
.

Model

Date varieties

Average

%

Berhi

Khla
ss

N. Saif

Saqei

Sefri

Serri

Su
k
kari

1

2

3

4

5

6

7

100

93

100

100

98

100

99

93

100

81

100

100

99

100

93

100

100

99

35

100

100

80

93

80

93

100

100

98

80

98

85

100

100

99

100

93

100

100

98

86

87

100

80

98

86

100

87

87

99

88.4

97.4

90.3

98.6

86.6

96.0

99.4







-

17

-

Table 4 presents the results of classification of the sub
-
samples of
the seven date varieties with model 7 features using the neural network
classifier. It shows that all varieties except Khlass and Sefri were
cla
s
sified correctly. From the 100 dates of
the Khlass variety, only two
were misclassified; one each as Nubot Saif and Sefri, with a
miscla
s
sification error of 2%. In addition, one fruit from the Sefri
variety was misclassified as Saqei with a minimum misclassification
error of 1%. So with the low
misclassification errors and the very low
class errors, model 7 features showed its high discriminating power in
classifying the date varieties when they applied to the neural network
classifier. In the statistical method also, model 7 features gave the
hi
ghest classif
i
cation accuracy although this was marginally less than
the neural network classifier.

From the classification results, it can be concluded that the
pe
r
formance of an MLP neural network classifier is better than a
statistical classifier. The p
erformance of an MLP classifier depends on
the structure of the network, specifically the number of hidden layers
and the number of PEs in each hidden layer. As there is no theoretical
method for the optimum design of MLP structures, the best performing
ML
P structure must be determined by repeated experiments for the
specific classification problem. Even though the training time required
by the MLP classifier is greater, its performance with model 7 features
justifies its selection for classifying the seven

date varieties.


CONCLUSIONS

In this study, it has been demonstrated that the proposed neural
networks are effective in classifying varieties of date fruits using
s
e
lected physical and color attributes. With the selected features,
di
f
ferent classification

models were formed and the model consisting of
all the features offered the best classification accuracy of 99.6%. In
comparison, the statistical classifier also resulted the highest
classif
i
cation accuracy with the same model of features but it was
margi
nally less than the neural network classifier.

Even though there may be some nonlinearity between the inputs
and outputs in the classification models, the neural networks can





-

18

-

model the variation in the attribute space effectively. Future
applic
a
tions of ne
ural network to classify date varieties will include
the use of machine vision system to measure the characteristic
features of date fruits and that will be suitable for practical
implementation.



Table 4: Classification of sub
-
samples of seven date varie
ties and the

percentage error with model 7 features by neural

network

classifier



References

[1]

AOAC. (1995).
Official methods of Analysis AOAC.
16
th

Ed.
Association of Official Analytical Chemists, Washington D.C.

[2]

Barreveld, W.H. (1993). Date palm product
s. FAO Agricultural
Services, Bulletin No. 101. Food and Agriculture Organization of
the United Nations, Rome.

[3]

Lee, H.S. (1997). Issue of color in pigmented grapefruit juice. Fruit
Processing, 7(4), 132
-
135.






-

19

-

[4]

Liao, K.; M.R. Paulsen and J.F. Reid (1993). Cor
n kernel breakage
classification by machine vision using a neural network classifier.
Transactions of the ASAE, 36(6), 1949
-
1953.

[5]

Ministry of Agriculture and Water (1999). Agriculture Statistical
Yearbook. Department of Economic Studies and Statistics, Riy
adh,
Saudi Arabia.

[6]

Mohsenin, N.N. (1986). Physical properties of plant and animal
materials: Structure, physical characteristics, and mechanical
properties. Second updated and revised edition. Gordon and Breach
Science Publishers, New York.

[7]

NeuroDimensions (1997). Neural network simulation environment.
NeuroDimensions, Inc., Gainesville, FL 32609.

[8]

Rigney, M.P., G.A. Kranzler (1989). Seedling classification
pe
r
formance of a neural network. ASAE paper 89
-
7523, ASAE, St.
Joseph, MI 49085
-
9659.

[9]

S
awaya, N.W. (1986). Dates of Saudi Arabia. Safir Press, Riyadh,
Saudi Arabia, pp 33
-
38.

[10]

Sayeed, M.S.; A.D. Whittaker and N.D. Kehtarnavaz (1995).
Snack quality evaluation method based on image feature and
neural network prediction. Transactions of the ASAE

38(4):
1239
-
1245.

[11]

SPSS (1998). SPSS© 9.0 Base Syntax Reference Guide. SPSS
Inc., 233 South Wacker Drive, Chicago, IL.