Professional Documents
Culture Documents
Recognisation of Spices
Recognisation of Spices
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Now people are interested in the entire food detection and classification of spices images using
analysis with advanced technologies in many areas. In this Baysien Network classifier was proposed in [2]. An
paper we proposed a spices image identification system for Food image classification system with calorific value
Indian food images. The system is based on segmenting the extraction approach and tested using SVM classifier
spices images and classifies them to recognize what type of was proposed in [3]. Dietary Assessment on a Mobile
spice it is. We have used various region properties for Phone Using Image Processing and Pattern Recognition
segmenting a food images into multiple segmentation. Color
Techniques was proposed in [4]. A Deep Learning-
and texture features are extracted by histogram efficiently.
based Food Image Recognition for Computer-aided
Then we used Neural Network Classifier for classification.
Dietary Assessment method for image retrieval
Key Words: Classification, Spices image, Recognition, predication was proposed in [5]. Automated
Segmentation. identification of food in images that extracts calorific
value using SVM classifier was proposed in [6]. Another
1. INTRODUCTION nutrition calculation method from food images using
SVM and deep learning was proposed in [7] and some
Spices image detection and recognition based on image other works mentioned in the reference part.
processing is a widely concentrating field in research.
Food is most important part of human’s lives. Every 3. PROPOSED METHOD
food we take on the daily basis contains various kind of
spices which makes them delicious and tasty. People Spices are dust particles, they are of different colour,
are more conscious about their health. They know that texture and different grain size. Hence representative
spices used in the food also helps in dietary, obesity dataset should contain different variability’s. Many
and other such problem prevention. The motivation for works is carried out on food image recognition in
this project is to build an automatic system for different fields. Less work is considered on Indian
detection and recognizing Indian species for food Spices items. Here we considered four different Indian
image researchers and dietician to make proper spices images for segmentation and classification.
analysis of nutrition and other kind of health hazards. Some sample spices images are shown in figure 1.
Here we mainly used color and texture features for
recognition algorithm for a better classification result.
This method has been tested on four different spices.
Neural network was used to classify the different
spices. Detailed research was carried out about how
individual features perform and the performance of
combined features.
Fig-1: Indian Spices
2. PREVIOUS WORK
Fig.2 depicts the process flow diagram of the proposed
There are very few number of works related to spices method and has been illustrated below.
image classification, though researchers show a great
interest on various food images related researches.
Like, multiple feature detection of Indian Foods was
proposed and tested by using multiSVM classifier in
[1]. Various color and texture features for automated
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2418
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 06 | June 2020 www.irjet.net p-ISSN: 2395-0072
N 1
(n hk µh )2
h k 0
N
(1)
N 1
(n sk µs )2
s k 0
N
(2)
N 1
Fig-2: Process Flow Diagram for Proposed Method (n vk µv )2
v k 0
3.1 ACQUISITION AND PRE-PROCESSING N
The images are captured by us using high quality DSLR (3)
and to introduce sufficient variations the images are
Variance is represented as h 2 , s 2 , v 2 for three
captured from different angles. The pre-processing
steps includes resizing the images to standard color channels respectively. Skewness and kurtosis
dimensions, so as to reduce the computational load. for three color channels are respectively denoted in
Relevant portion of the images are segmented from the Eq. (4) to (9).
background using black and white and color N
segmentations respectively.
(n hk µh )3 / N
3.2 FEATURE EXTRACTION
Skewnessh i 1
h2
Color Features: Color image is split into three separate (4)
color channels H(Hue), S(Saturation), V(Value). The
HSV color space provides a close representation of N
(n vk µv )3 / N
image having level rk . To denote the three color Skewnessv i 1
v2
channels, the symbols nhk , nsk , nvk are being used
(6)
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2419
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 06 | June 2020 www.irjet.net p-ISSN: 2395-0072
N N N
(nhk µh )4 / N GC Pi , j (i j )2
i 1 j 1
Kurtosish i 1
h 4
(10)
(7)
N N Pi , j
GH
N
1 | i j |
(n sk µs ) 4 / N i 1 j 1
Kurtosiss i 1 (11)
s4
N N
(8) GE ( Pi , j )2
i 1 j 1
N
(n vk µv )4 / N (12)
Kurtosisv i 1
v4 N N (i µi)( j µj ) Pi , j
GN
(9) i 1 j 1 i j
(13)
For each image the color features are represented by
15-element vectors. Combined Features: A combination of color and texture
features is carefully selected to make the classification
FC = { µh , µs , µv , h , s , v , h 2 , s 2 , v 2 ,
process much more efficient. These features include
Skewnessh , Skewnesss , Skewnessv , Kurtosish , Mean, Standard deviation, Contrast, Energy,
Kurtosiss , Kurtosisv } Homogeneity, Correlation respectively. It is
represented by,
Texture Features: Texture refers to visual patters or
F {FS , FT , µh , µs , µv , h , s , v }
spatial arrangement of pixels. It cannot be described by
a single color or intensity value. It is modeled by
3.3 CLASSIFIER
variations of gray level over the image. It is computed
from a set of gray-level co-occurrence matrices A multi-layer perception using back propagation
(GLCM). GLCM defines the probability of gray level i in algorithm has been used (MLP). In the training phase
neighbourhood of gray level j at a distance d. Formally, the input feature vector is mapped to the known output
class. Weights are iteratively adjusted to reduce the
G Pr(i, j | d , )
error at output. At the end of the training phase the
correct weights are determined. In the testing phase an
Directional GLCMs can be computed along three other
unknown feature vector is mapped to an estimated
directions viz. Right-diagonal( 45 ),
class using pre-determined weights. The test samples
vertical( 90 ) and left-diagonal( 135 ).GLCM are not exactly same as the training samples. 75% of
based features are contrast(GC), homogeneity(GH), the images in the dataset are fed to the neural network
energy(GE), correlation(GN) respectively. Here P(i,j) to learn the characteristics shape, color and texture,
represents the (i,j)-th element of a normalized while the other 25% are subsequently treated as
symmetrical GLCM and N denotes the number of gray unknown test samples to evaluate the performance of
levels then the system. The percentage classification results are
reported in the experimentations section.
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2420
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 06 | June 2020 www.irjet.net p-ISSN: 2395-0072
3.4 EXPERIMENTAL RESULTS AND ANALYSIS are then used to calculate sensitivity, specificity and
accuracy for classification performance. The sensitivity
To test the performance of the proposed system, tells us how likely the test is come back positive in
experiments were performed on a dataset of 80 images someone who has the characteristic. This is calculated
of 4 spices that includes: Chilli Powder, Turmeric Dust, as TP/(TP+FN). The specificity tells us how likely the
Cumin Dust, and Mustard Seed. The training dataset test is to come back negative in someone who does not
contains 60 images whereas the testing dataset have the characteristic. This is calculated as
contains 20 images. We considered a color and texture TN/(TN+FP). Finally accuracy is
feature sets for the food description and both sets are (TP+TN)/(TP+FP+TN+FN)…………………………………(14)
histogram-based. For color features, the histogram of
the 1024 most dominant spices colors was used. For Here, we obtained an efficiency of 96.7%. shown in fig
texture features we have used glcm property, 4 below.
Correlation, Energy, Contrast, Homogeneity. After
combining color and texture features, a vector is
created and fed to MLP that will assign to the segment
four predefined spice classes.
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2421
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 06 | June 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2422
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 06 | June 2020 www.irjet.net p-ISSN: 2395-0072
BIOGRAPHIES
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2423