SlideShare a Scribd company logo
Deep-shallow Framework-based Hybrid
Feature Extractor For Ethiopian Coffee
Bean Varieties Classification using Image
Processing
By: Yirga Kegne Molla
Advisor: Abebe Alemu (Asst. prof.)
Department of
Computer Science
Table
of
Contents
Introduction
Motivation
Problem Statement
Objective
Scope and delimitation
Significance
Related work
Research methodologies
Result and discussion
Conclusion and recommendation
o1
02
03
04
o5
o6
Introduction
 Agriculture plays an important role in the sustainable
development of world’s economy [1].
The two species commonly grown globally are.
 Arabica and
Robusta coffee [3][4].
 Due to, their economic importance for coffee beverage
production.
 Nowadays, Arabica and Robusta coffee accounts (70%, 30%)
of global coffee production respectively [2].
Cont..
 Ethiopia is the birthplace of coffee Arabica [8].
 Ethiopia is Africa’s leading coffee producer and the fifth-largest in the world next
to Brazil, Vietnam, Colombia, Indonesia [11], [14]–[16].
 Currently, around 15% of the country's entire population, rely on coffee [12][13].
 Ethiopian coffee is characterized by a good flavor & quality[9].
 In Ethiopia variety of coffee with a variety of quality and grades is produced, But
the common ones are Sidama, Limu, Wellega, Jimma, Harar [15].
 Coffee produced have distinct size or flavor [18].
Cont..
 Coffees exported based on specific geographical origins, organoleptic characters.
ECX has mandated to assure the quality of the coffee from beans to cup before
export with the purpose to .
 Check coffee's origin,
 Countries reputation for coffee quality,
 Client’s interest, and
 Export standard
 However, classifying coffee based on their region manually is a worthful task.
 Therefore, to solve subject heterogeneity, we used a hybrid of shallow & deep
learning technique.
Motivation
Coffee bean classification and grading is done manually at ECX
 It costs a lot of money and
Degrades the company's reputation.
We need to improve the existing technique and enhance our foreign income.
 To balance consumption rate with production rate.
 The advancement of image analysis in detection of agricultural seeds.
Problem statement
In Ethiopia coffees are cultivated under different weather
and climatic conditions [28].
 So, CB’s have different ingredients and flavors with
distinct physical makeups[18].
Having this, coffee classified manually at ECX, with
teams that have experience with it [22][20].
 However, this process is highly biased, subjective, and
prone to error [21], [23], [29]. Anxiety of Manual work
Cont..
The size, shape, texture, color, and defects are the main quality criteria used [31].
 However, due to the natural similarity of the coffee, the human perception could easily
be biased [32].
Inconsistent nature of coffee shape, texture, and color, makes manual classification
highly challenging.
Image analysis technique was used by [21]–[23], [29], [30] using hand-crafted image
feature extractors.
The shape of a coffee bean has natural rotation variation, including edges and curves.
 So, extracting information by hand-crafted techniques are challenging [27].
Cont..
Exploring advanced techniques to determine the form similarity of beans is critical.
 So, we used HOG to detect the information contained in edges and curves to get
local features and deep learning to get high-level features.
 CNN is rotation invariant, on the other hand, HOG is rotation variant and can give
an edge direction to detect features [27].
 Therefore, we used HOG as an additive to the CNN to extract discriminative
features.
 The previous researches on coffee bean varieties use low-level image feature
extractors.
Cont..
However, low-level features are less successful at generalizing and
distinguishing significant properties in similar classes when used alone [27].
 Where as, DL requires a huge dataset to train and it is not computationally
feasible.
 Therefore, this work aims at a deep-shallow hybrid feature extractor for
accurate classification of ECB varieties.
Research question
RQ1. Which image preprocessing techniques are better for smoothing
and removing noise to enhance the classification of coffee bean varieties?
RQ2. To what extent does hybrid feature extraction improve coffee bean
variety classification?
RQ3. What is the suitable classification algorithm for constructing a
model for coffee bean varieties classification?
RQ4. To what extent the proposed model performs better in the
identification and classification of coffee bean varieties?
Objective
To collect coffee bean varieties, prepare, and organize our data.
To investigate and apply different preprocessing techniques.
To study and investigate (HOG) for hand-crafted features and
CNN for High-level features.
To develop a hybrid feature extraction algorithm (HOG-CNN)
To study and investigate different classification algorithms.
To build a model better than pre-trained state-of-the-art deep
learning models.
To evaluate the performance of our model using a test dataset
Scope and Significance
Scope
 Data collected at ECX
 Coffee data – 2020/21
 Washed & unwashed
coffee
 Raw coffee
 Physical property
 Deep-shallow
framework.
Delimitation
 Roasted in type
 No cup test (chemical
property)
 Limited regions
Significance
 Economic significance
 Social aspect
 Scientific contribution
Methods
Data collection
Classification
Tools
Feature Extraction
Data preprocess
Segmentation
1
6
2
5
3
4
Related works
Title Author FE Classification Limitation
Sorting and Grading of
agricultural fruit products
[81] Morphology and
shape feature
descriptor
SVM  The model where not correctly
identify all varieties due to size
and shape similarities of fruits.
 Shape and size features
considered are poor in
discriminating similar classes
[76].
Using texture features for
fruit classification.
[63] GLCM, HOG,
LBP
DT  No noise removal technique was
used.
 Only shape and texture
information were used which has
limited generalization potential
when used alone.
Detecting Fruit
Information Using ML
Techniques
[74] CNN CNN  The model was computationally
intensive.
 CNN features were used
separately which has difficult for
small dataset problems.
Cont..
Title Author FE Classification Limitation
Automatic Ethiopian maize
quality Assessment
[25] Morphology,
Texture, and
color feature
descriptor.
ANN  Shadows and illuminations
influence the color feature value
extracted.
 Classic features used.
Classification of rice grain
varieties.
[82] GLCM texture
feature
descriptor
ANN  GLCM texture feature used which
have less recognizing power.
 The model was trained with a
small dataset that has low
discriminating power in similar
classes.
Malt-Barley Seed
Identification using image
processing
[24] Morphology,
Texture, and
color feature
descriptor.
Ensemble of
KNN and ANN
 Only considered seeds in the
ventral side which results in a
poor discrimination rate of malt-
barely.
 Color, morphology, and texture
features were used which are less
generalizing ability.
Cont..
Title Author FE Classification Limitation
Ethiopian Coffee
Classification using image
processing
[30] Morphology,
Texture, and
color feature
descriptor.
ANN  The manual threshold value is
used.
 Color features are extracted
including the background.
 Image enhancement, filtering, and
color space conversion are not yet
applied.
The effects of
segmentation techniques
for identification of
Ethiopian coffee variety
[23] Morphology,
Texture, and
color feature
descriptor.
ANN  The texture and color features of
an image are hand-crafted features
that are less effective to generalize
related class features.
Raw quality value
classification of Ethiopian
Coffee in Wellega region.
[22] Morphology,
Texture, and
color feature
descriptor.
Naive Bayes,
C4.5, and ANN.
 Considers only healthy coffee
beans.
 Used only color and texture
features which have the less
generalizing ability when used
alone.
Proposed Model Architecture for classification of coffee bean varieties
Experiment and result
Dataset acquisition
and preparation
• Data collected at ECX.
• We used Redmi Note 6 pro with 12MP + 5MP Dual rear camera
• 120 image samples taken per class of Harar,Jimma,Limu,Sidama,
&Wellega .
• Camera stand used with distance of 120 mm and spatial resolution
of 360x360.
• Augmentation were used
Experimental
setups
• Python 3.8
• Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz 2.30 GHz.
• train-test split of 80/20
• Eleven were experiments conducted
CNN model Construction
 We have conducted a different experiment on the proposed end-to-end CNN model
 To refine suitable model architecture for our dataset
 Because the complexity of the CNN model is highly dependent on the data [73].
 We carried out two broad experiments to construct an end-to-end CNN model.
 The first experiment is conducted to determine parameters and components of CNN.
 The second experiment is conducted to enhance the performance CNN by applying
preprocessing, segmentation, and histogram equalization.
CNN model construction
I. CNN model parameter selection.
The following table shows summary of experimental result obtained.
Parameter Value Accuracy
Image size 128,224,292, & 360 74.16,81.33, 77.49, 82.49
Train-test split 70/30, 80/20, 90/10 77.22, 89.99, 75.85
Convolution layers 3, 4, 5, 6, 7 80, 83.31, 79.43, 77.57, 78.26
Pooling operations Max, Average, Combined 81.34, 79.45, 82.49
Filter size 3x3, 5x5, 7x7, combined 77.98, 78.42, 79.24, 84.86
Activation and
optimizers
Adam+Relu, Adam+Tanh,SGD+Relu,SGD+Tanh 82.49, 80, 82.29, 79.69
Cont..
II. CNN model performance enhancement
86.16 84.12 84.2 81.83
82.81 80.84
79.17 79.46
84.58 82.91 83.74 80.89
11 11 11 11
0
10
20
30
40
50
60
70
80
90
100
Median Gaussian Bilateral Unfiltered
Comparison of filtering Techniques
Training_acc(%) Val_acc(%) Test_acc(%) Time/epoch(sec.)
92.8
88.84 89.66
11
86.16 82.81 84.58
11
0
10
20
30
40
50
60
70
80
90
100
Training_acc(%) Val_acc(%) Testing_acc(%) Time/epoch(sec)
The effect o Histogram Equalization(AHE)
With Contrast enhancement Without enhancement
Cont..
Proposed
model
Architecture
Accuracy and loss of end-to-end CNN model
Performance evaluation of CNN model
Classification of CB verities using SVM classifier
 We used SVM classifier instead of SoftMax.
 We extract features using HOG, CNN and Hybrid of the two.
 A non-linear kernel function RBF are used over multiclass SVM CB
classification.
 We used a 10-fold cross-validation.
HOG feature over SVM classifier
CNN feature over SVM classifier
CNN-HOG feature over SVM classifier
Comparisons of HOG, CNN, and the hybrid feature vector
Feature extraction algorithm Accuracy
HOG 74.17 %
CNN 85.83 %
CNN-HOG(Deep-shallow) 97.5 %
Comparison end-to-end CNN and HOG-CNN algorithms
Algorithm Classifier Accuracy
End-to-end CNN SoftMax 89.99 %
Deep-shallow SVM 97.5 %
Comparison of our model with pre-trained VGG16 and ResNet50
Model Type Accuracy
VGG16 87.5 %
ResNet50 81.2 %
CNN 89.99 %
Discussion of results
 We conduct an experiment to choose building parameters of CNN model
because the default setting of the model did not perform well for all types of
the dataset [36].
Cont..
 We assess input dimension of our data by using 128, 224, 292, & 360.
 Image size 360 performs better than others due to
 Additive pixels during feature extraction [53].
 But elapsed time increases
We used Adam and SGD optimizer with ReLU and Tanh activation function
 Adam + ReLU performs better than Adam + Tanh, SGD + ReLU, and SGD +Tanh by
0.2 %, 2.49 %, 2.8 % respectively.
 ReLU has lower processing time than Tanh in our experiment, because the Tanh range
is between -1 to 1 to adjust the weights of the network whereas ReLU is 0 and 1 [73].
Cont..
 We used a combination of Average and Max pooling and the performance of the model
enhanced by 2.49%, this is because feature loss is reduced when combined.
 We employed Median filtering, Gaussian filtering, and Bilateral filtering during the
experiment to get the best results.
 The use of Median filtering improves model performance by 1.97% due to
 Effective at reducing impulsive noises such as salt and paper noises.
 keeping the edge of the coffee beans.
 After MF, we enhance the contrast of blurred image by using AHE and the model
performance enhanced by 5.08 %.
Cont..
 We used a combination of Average and Max pooling and the performance of the model
enhanced by 2.49%, this is because feature loss is reduced when combined.
 We employed Median filtering, Gaussian filtering, and Bilateral filtering during the
experiment to get the best results.
 The use of Median filtering improves model performance by 1.97% due to
 Effective at reducing impulsive noises such as salt and paper noises.
 keeping the edge of the coffee beans.
 After MF, we enhance the contrast of blurred image by using AHE and the model performance
enhanced by 5.08 %.
 End-to-end CNN model performs 89.99% after K-Means segmentation technique are applied.
Cont..
 However, CNN with SoftMax classifier are data intensive when trained with complex
networks, so we used multi-class SVM classifier to enhance class prediction ability.
 We used HOG local feature descriptor But the performance is highly degraded,
because local features are not successful at generalizing related classes.
 So, we used CNN as FE, shows an improved accuracy of 85.83%.
 But, CNN feature are not powerful as the hybrid deep-shallow features.
 The hybrid deep-shallow feature outperforms by 11.67% (97.5%) accuracy.
 This shows that, usage of hybrid features improves the performance of classification
than local or deep features used separately on a small dataset.
Cont..
 Finally, we compare our model with state-of-the-art pretrained models VGG16 and
ResNet50.
The performance of the proposed model performs 8.79% better than ResNet50 and
2.49 % than VGG16.
 Because, VGG16 and ResNet50 were trained with more than 138 million trainable
parameters.
Millions of trainable parameters require thousands of training datasets to get enough
training features [95].
However, our model is limited to 240 images per class, which has 383k trainable
parameters. The proposed model's smaller size makes it more efficient.
Conclusion
 Coffee contributes to Ethiopia's foreign currency earnings.
 Nowadays, the sub-sector is attracting governmental and nonprofit attention.
 So, coffee should be identified in a uniform manner
 To this, we use end-to-end CNN and hybrid feature extraction models
 Data collected at ECX and labeled to Harar, Jimma, Limu, Sidama, Wellega.
 We used 80/20 train-test split
 We used cross validation
 End-to-end CNN model achieved 89.99%.
 We used CNN-HOG to increase class prediction by using deep and handcraft features.
Cont..
 Multiclass SVM classifier with RBF kernel were used to classify HOG, CNN
and CNN-HOG features.
 We obtained 74.17%, 85.83%, and 97.5% accuracy respectively.
 Our model performs better with the combined Deep-shallow features.
 The challenge was the confusion error of Limu coffee with Sidama coffee and
Jima coffee with Harar, as well as Sidama, and Jimma coffee.
 Selected coffee regions' color and textural similarities.
Contribution
Hybrid Feature
Extraction
Image
Segmentation
Dataset
preparation
Recommendation
Identification of coffee bean varieties from mixed components.
Developing a GUI-based model for identification of CBV using smartphones.
The detection and counting of the number of defects.
Increasing class labels.
Image processing and machine learning based Ethiopian Coffee bean varieties .

More Related Content

Similar to Image processing and machine learning based Ethiopian Coffee bean varieties .

Ripeness Evaluation of Mango using Image Processing
Ripeness Evaluation of Mango using Image ProcessingRipeness Evaluation of Mango using Image Processing
Ripeness Evaluation of Mango using Image Processing
dbpublications
 
Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...
Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...
Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...
ijsrd.com
 
phase 1 ppt dal adulteration.pptx
phase 1 ppt dal adulteration.pptxphase 1 ppt dal adulteration.pptx
phase 1 ppt dal adulteration.pptx
bharatt7
 
F010423541
F010423541F010423541
F010423541
IOSR Journals
 
Stem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding Method
Stem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding MethodStem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding Method
Stem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding Method
IJCSIS Research Publications
 
Classification of Mango Fruit Varieties using Naive Bayes Algorithm
Classification of Mango Fruit Varieties using Naive Bayes AlgorithmClassification of Mango Fruit Varieties using Naive Bayes Algorithm
Classification of Mango Fruit Varieties using Naive Bayes Algorithm
ijtsrd
 
The quality identification of fruits in image processing using matlab
The quality identification of fruits in image processing using matlabThe quality identification of fruits in image processing using matlab
The quality identification of fruits in image processing using matlab
eSAT Publishing House
 
Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...
Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...
Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...
IJECEIAES
 
Computer Vision based Model for Fruit Sorting using K-Nearest Neighbour clas...
Computer Vision based Model for Fruit Sorting  using K-Nearest Neighbour clas...Computer Vision based Model for Fruit Sorting  using K-Nearest Neighbour clas...
Computer Vision based Model for Fruit Sorting using K-Nearest Neighbour clas...
IJEEE
 
IRJET- Automatic Fruit Quality Detection System
IRJET- Automatic Fruit Quality Detection SystemIRJET- Automatic Fruit Quality Detection System
IRJET- Automatic Fruit Quality Detection System
IRJET Journal
 
528Seed Technological Development – A Survey
528Seed Technological Development – A Survey528Seed Technological Development – A Survey
528Seed Technological Development – A Survey
idescitation
 
Image Analysis for Ethiopian Coffee Plant Diseases Identification
Image Analysis for Ethiopian Coffee Plant Diseases IdentificationImage Analysis for Ethiopian Coffee Plant Diseases Identification
Image Analysis for Ethiopian Coffee Plant Diseases Identification
CSCJournals
 
Grading and quality testing of food grains using neural
Grading and quality testing of food grains using neuralGrading and quality testing of food grains using neural
Grading and quality testing of food grains using neural
eSAT Publishing House
 
Sorting of Raisins using Computer Vision Approach
Sorting of Raisins using Computer Vision ApproachSorting of Raisins using Computer Vision Approach
Sorting of Raisins using Computer Vision Approach
IRJET Journal
 
REAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCV
REAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCVREAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCV
REAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCV
IRJET Journal
 
Defected fruit detection
Defected fruit detection Defected fruit detection
Defected fruit detection
Vyshnavi N Y
 
IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...
IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...
IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...
IRJET Journal
 
Grading and quality testing of food grains using neural network
Grading and quality testing of food grains using neural networkGrading and quality testing of food grains using neural network
Grading and quality testing of food grains using neural network
eSAT Journals
 
Machine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting techniqueMachine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting technique
Anudeep Badam
 
口試簡報.pptx
口試簡報.pptx口試簡報.pptx
口試簡報.pptx
dhedyhusada2
 

Similar to Image processing and machine learning based Ethiopian Coffee bean varieties . (20)

Ripeness Evaluation of Mango using Image Processing
Ripeness Evaluation of Mango using Image ProcessingRipeness Evaluation of Mango using Image Processing
Ripeness Evaluation of Mango using Image Processing
 
Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...
Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...
Quality Evaluation Technique For Phyllanthus Emblica(Gooseberry) Using Comput...
 
phase 1 ppt dal adulteration.pptx
phase 1 ppt dal adulteration.pptxphase 1 ppt dal adulteration.pptx
phase 1 ppt dal adulteration.pptx
 
F010423541
F010423541F010423541
F010423541
 
Stem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding Method
Stem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding MethodStem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding Method
Stem Removal of Citrus Fruit by Finest StemcompleteRm Thresholding Method
 
Classification of Mango Fruit Varieties using Naive Bayes Algorithm
Classification of Mango Fruit Varieties using Naive Bayes AlgorithmClassification of Mango Fruit Varieties using Naive Bayes Algorithm
Classification of Mango Fruit Varieties using Naive Bayes Algorithm
 
The quality identification of fruits in image processing using matlab
The quality identification of fruits in image processing using matlabThe quality identification of fruits in image processing using matlab
The quality identification of fruits in image processing using matlab
 
Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...
Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...
Classification of Macronutrient Deficiencies in Maize Plant Using Machine Lea...
 
Computer Vision based Model for Fruit Sorting using K-Nearest Neighbour clas...
Computer Vision based Model for Fruit Sorting  using K-Nearest Neighbour clas...Computer Vision based Model for Fruit Sorting  using K-Nearest Neighbour clas...
Computer Vision based Model for Fruit Sorting using K-Nearest Neighbour clas...
 
IRJET- Automatic Fruit Quality Detection System
IRJET- Automatic Fruit Quality Detection SystemIRJET- Automatic Fruit Quality Detection System
IRJET- Automatic Fruit Quality Detection System
 
528Seed Technological Development – A Survey
528Seed Technological Development – A Survey528Seed Technological Development – A Survey
528Seed Technological Development – A Survey
 
Image Analysis for Ethiopian Coffee Plant Diseases Identification
Image Analysis for Ethiopian Coffee Plant Diseases IdentificationImage Analysis for Ethiopian Coffee Plant Diseases Identification
Image Analysis for Ethiopian Coffee Plant Diseases Identification
 
Grading and quality testing of food grains using neural
Grading and quality testing of food grains using neuralGrading and quality testing of food grains using neural
Grading and quality testing of food grains using neural
 
Sorting of Raisins using Computer Vision Approach
Sorting of Raisins using Computer Vision ApproachSorting of Raisins using Computer Vision Approach
Sorting of Raisins using Computer Vision Approach
 
REAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCV
REAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCVREAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCV
REAL FRUIT DEFECTIVE DETECTION BASED ON IMAGE PROCESSING TECHNIQUES USING OPENCV
 
Defected fruit detection
Defected fruit detection Defected fruit detection
Defected fruit detection
 
IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...
IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...
IRJET- Food (Fruit) Quality Recognition by External Appearance and InternalFl...
 
Grading and quality testing of food grains using neural network
Grading and quality testing of food grains using neural networkGrading and quality testing of food grains using neural network
Grading and quality testing of food grains using neural network
 
Machine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting techniqueMachine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting technique
 
口試簡報.pptx
口試簡報.pptx口試簡報.pptx
口試簡報.pptx
 

Recently uploaded

Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 

Recently uploaded (20)

Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 

Image processing and machine learning based Ethiopian Coffee bean varieties .

  • 1. Deep-shallow Framework-based Hybrid Feature Extractor For Ethiopian Coffee Bean Varieties Classification using Image Processing By: Yirga Kegne Molla Advisor: Abebe Alemu (Asst. prof.) Department of Computer Science
  • 2. Table of Contents Introduction Motivation Problem Statement Objective Scope and delimitation Significance Related work Research methodologies Result and discussion Conclusion and recommendation o1 02 03 04 o5 o6
  • 3. Introduction  Agriculture plays an important role in the sustainable development of world’s economy [1]. The two species commonly grown globally are.  Arabica and Robusta coffee [3][4].  Due to, their economic importance for coffee beverage production.  Nowadays, Arabica and Robusta coffee accounts (70%, 30%) of global coffee production respectively [2].
  • 4. Cont..  Ethiopia is the birthplace of coffee Arabica [8].  Ethiopia is Africa’s leading coffee producer and the fifth-largest in the world next to Brazil, Vietnam, Colombia, Indonesia [11], [14]–[16].  Currently, around 15% of the country's entire population, rely on coffee [12][13].  Ethiopian coffee is characterized by a good flavor & quality[9].  In Ethiopia variety of coffee with a variety of quality and grades is produced, But the common ones are Sidama, Limu, Wellega, Jimma, Harar [15].  Coffee produced have distinct size or flavor [18].
  • 5. Cont..  Coffees exported based on specific geographical origins, organoleptic characters. ECX has mandated to assure the quality of the coffee from beans to cup before export with the purpose to .  Check coffee's origin,  Countries reputation for coffee quality,  Client’s interest, and  Export standard  However, classifying coffee based on their region manually is a worthful task.  Therefore, to solve subject heterogeneity, we used a hybrid of shallow & deep learning technique.
  • 6. Motivation Coffee bean classification and grading is done manually at ECX  It costs a lot of money and Degrades the company's reputation. We need to improve the existing technique and enhance our foreign income.  To balance consumption rate with production rate.  The advancement of image analysis in detection of agricultural seeds.
  • 7. Problem statement In Ethiopia coffees are cultivated under different weather and climatic conditions [28].  So, CB’s have different ingredients and flavors with distinct physical makeups[18]. Having this, coffee classified manually at ECX, with teams that have experience with it [22][20].  However, this process is highly biased, subjective, and prone to error [21], [23], [29]. Anxiety of Manual work
  • 8. Cont.. The size, shape, texture, color, and defects are the main quality criteria used [31].  However, due to the natural similarity of the coffee, the human perception could easily be biased [32]. Inconsistent nature of coffee shape, texture, and color, makes manual classification highly challenging. Image analysis technique was used by [21]–[23], [29], [30] using hand-crafted image feature extractors. The shape of a coffee bean has natural rotation variation, including edges and curves.  So, extracting information by hand-crafted techniques are challenging [27].
  • 9. Cont.. Exploring advanced techniques to determine the form similarity of beans is critical.  So, we used HOG to detect the information contained in edges and curves to get local features and deep learning to get high-level features.  CNN is rotation invariant, on the other hand, HOG is rotation variant and can give an edge direction to detect features [27].  Therefore, we used HOG as an additive to the CNN to extract discriminative features.  The previous researches on coffee bean varieties use low-level image feature extractors.
  • 10. Cont.. However, low-level features are less successful at generalizing and distinguishing significant properties in similar classes when used alone [27].  Where as, DL requires a huge dataset to train and it is not computationally feasible.  Therefore, this work aims at a deep-shallow hybrid feature extractor for accurate classification of ECB varieties.
  • 11. Research question RQ1. Which image preprocessing techniques are better for smoothing and removing noise to enhance the classification of coffee bean varieties? RQ2. To what extent does hybrid feature extraction improve coffee bean variety classification? RQ3. What is the suitable classification algorithm for constructing a model for coffee bean varieties classification? RQ4. To what extent the proposed model performs better in the identification and classification of coffee bean varieties?
  • 12. Objective To collect coffee bean varieties, prepare, and organize our data. To investigate and apply different preprocessing techniques. To study and investigate (HOG) for hand-crafted features and CNN for High-level features. To develop a hybrid feature extraction algorithm (HOG-CNN) To study and investigate different classification algorithms. To build a model better than pre-trained state-of-the-art deep learning models. To evaluate the performance of our model using a test dataset
  • 13. Scope and Significance Scope  Data collected at ECX  Coffee data – 2020/21  Washed & unwashed coffee  Raw coffee  Physical property  Deep-shallow framework. Delimitation  Roasted in type  No cup test (chemical property)  Limited regions Significance  Economic significance  Social aspect  Scientific contribution
  • 15. Related works Title Author FE Classification Limitation Sorting and Grading of agricultural fruit products [81] Morphology and shape feature descriptor SVM  The model where not correctly identify all varieties due to size and shape similarities of fruits.  Shape and size features considered are poor in discriminating similar classes [76]. Using texture features for fruit classification. [63] GLCM, HOG, LBP DT  No noise removal technique was used.  Only shape and texture information were used which has limited generalization potential when used alone. Detecting Fruit Information Using ML Techniques [74] CNN CNN  The model was computationally intensive.  CNN features were used separately which has difficult for small dataset problems.
  • 16. Cont.. Title Author FE Classification Limitation Automatic Ethiopian maize quality Assessment [25] Morphology, Texture, and color feature descriptor. ANN  Shadows and illuminations influence the color feature value extracted.  Classic features used. Classification of rice grain varieties. [82] GLCM texture feature descriptor ANN  GLCM texture feature used which have less recognizing power.  The model was trained with a small dataset that has low discriminating power in similar classes. Malt-Barley Seed Identification using image processing [24] Morphology, Texture, and color feature descriptor. Ensemble of KNN and ANN  Only considered seeds in the ventral side which results in a poor discrimination rate of malt- barely.  Color, morphology, and texture features were used which are less generalizing ability.
  • 17. Cont.. Title Author FE Classification Limitation Ethiopian Coffee Classification using image processing [30] Morphology, Texture, and color feature descriptor. ANN  The manual threshold value is used.  Color features are extracted including the background.  Image enhancement, filtering, and color space conversion are not yet applied. The effects of segmentation techniques for identification of Ethiopian coffee variety [23] Morphology, Texture, and color feature descriptor. ANN  The texture and color features of an image are hand-crafted features that are less effective to generalize related class features. Raw quality value classification of Ethiopian Coffee in Wellega region. [22] Morphology, Texture, and color feature descriptor. Naive Bayes, C4.5, and ANN.  Considers only healthy coffee beans.  Used only color and texture features which have the less generalizing ability when used alone.
  • 18. Proposed Model Architecture for classification of coffee bean varieties
  • 19. Experiment and result Dataset acquisition and preparation • Data collected at ECX. • We used Redmi Note 6 pro with 12MP + 5MP Dual rear camera • 120 image samples taken per class of Harar,Jimma,Limu,Sidama, &Wellega . • Camera stand used with distance of 120 mm and spatial resolution of 360x360. • Augmentation were used Experimental setups • Python 3.8 • Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz 2.30 GHz. • train-test split of 80/20 • Eleven were experiments conducted
  • 20. CNN model Construction  We have conducted a different experiment on the proposed end-to-end CNN model  To refine suitable model architecture for our dataset  Because the complexity of the CNN model is highly dependent on the data [73].  We carried out two broad experiments to construct an end-to-end CNN model.  The first experiment is conducted to determine parameters and components of CNN.  The second experiment is conducted to enhance the performance CNN by applying preprocessing, segmentation, and histogram equalization.
  • 21. CNN model construction I. CNN model parameter selection. The following table shows summary of experimental result obtained. Parameter Value Accuracy Image size 128,224,292, & 360 74.16,81.33, 77.49, 82.49 Train-test split 70/30, 80/20, 90/10 77.22, 89.99, 75.85 Convolution layers 3, 4, 5, 6, 7 80, 83.31, 79.43, 77.57, 78.26 Pooling operations Max, Average, Combined 81.34, 79.45, 82.49 Filter size 3x3, 5x5, 7x7, combined 77.98, 78.42, 79.24, 84.86 Activation and optimizers Adam+Relu, Adam+Tanh,SGD+Relu,SGD+Tanh 82.49, 80, 82.29, 79.69
  • 22. Cont.. II. CNN model performance enhancement 86.16 84.12 84.2 81.83 82.81 80.84 79.17 79.46 84.58 82.91 83.74 80.89 11 11 11 11 0 10 20 30 40 50 60 70 80 90 100 Median Gaussian Bilateral Unfiltered Comparison of filtering Techniques Training_acc(%) Val_acc(%) Test_acc(%) Time/epoch(sec.) 92.8 88.84 89.66 11 86.16 82.81 84.58 11 0 10 20 30 40 50 60 70 80 90 100 Training_acc(%) Val_acc(%) Testing_acc(%) Time/epoch(sec) The effect o Histogram Equalization(AHE) With Contrast enhancement Without enhancement
  • 24. Accuracy and loss of end-to-end CNN model
  • 26. Classification of CB verities using SVM classifier  We used SVM classifier instead of SoftMax.  We extract features using HOG, CNN and Hybrid of the two.  A non-linear kernel function RBF are used over multiclass SVM CB classification.  We used a 10-fold cross-validation.
  • 27. HOG feature over SVM classifier
  • 28. CNN feature over SVM classifier
  • 29. CNN-HOG feature over SVM classifier
  • 30. Comparisons of HOG, CNN, and the hybrid feature vector Feature extraction algorithm Accuracy HOG 74.17 % CNN 85.83 % CNN-HOG(Deep-shallow) 97.5 % Comparison end-to-end CNN and HOG-CNN algorithms Algorithm Classifier Accuracy End-to-end CNN SoftMax 89.99 % Deep-shallow SVM 97.5 %
  • 31. Comparison of our model with pre-trained VGG16 and ResNet50 Model Type Accuracy VGG16 87.5 % ResNet50 81.2 % CNN 89.99 % Discussion of results  We conduct an experiment to choose building parameters of CNN model because the default setting of the model did not perform well for all types of the dataset [36].
  • 32. Cont..  We assess input dimension of our data by using 128, 224, 292, & 360.  Image size 360 performs better than others due to  Additive pixels during feature extraction [53].  But elapsed time increases We used Adam and SGD optimizer with ReLU and Tanh activation function  Adam + ReLU performs better than Adam + Tanh, SGD + ReLU, and SGD +Tanh by 0.2 %, 2.49 %, 2.8 % respectively.  ReLU has lower processing time than Tanh in our experiment, because the Tanh range is between -1 to 1 to adjust the weights of the network whereas ReLU is 0 and 1 [73].
  • 33. Cont..  We used a combination of Average and Max pooling and the performance of the model enhanced by 2.49%, this is because feature loss is reduced when combined.  We employed Median filtering, Gaussian filtering, and Bilateral filtering during the experiment to get the best results.  The use of Median filtering improves model performance by 1.97% due to  Effective at reducing impulsive noises such as salt and paper noises.  keeping the edge of the coffee beans.  After MF, we enhance the contrast of blurred image by using AHE and the model performance enhanced by 5.08 %.
  • 34. Cont..  We used a combination of Average and Max pooling and the performance of the model enhanced by 2.49%, this is because feature loss is reduced when combined.  We employed Median filtering, Gaussian filtering, and Bilateral filtering during the experiment to get the best results.  The use of Median filtering improves model performance by 1.97% due to  Effective at reducing impulsive noises such as salt and paper noises.  keeping the edge of the coffee beans.  After MF, we enhance the contrast of blurred image by using AHE and the model performance enhanced by 5.08 %.  End-to-end CNN model performs 89.99% after K-Means segmentation technique are applied.
  • 35. Cont..  However, CNN with SoftMax classifier are data intensive when trained with complex networks, so we used multi-class SVM classifier to enhance class prediction ability.  We used HOG local feature descriptor But the performance is highly degraded, because local features are not successful at generalizing related classes.  So, we used CNN as FE, shows an improved accuracy of 85.83%.  But, CNN feature are not powerful as the hybrid deep-shallow features.  The hybrid deep-shallow feature outperforms by 11.67% (97.5%) accuracy.  This shows that, usage of hybrid features improves the performance of classification than local or deep features used separately on a small dataset.
  • 36. Cont..  Finally, we compare our model with state-of-the-art pretrained models VGG16 and ResNet50. The performance of the proposed model performs 8.79% better than ResNet50 and 2.49 % than VGG16.  Because, VGG16 and ResNet50 were trained with more than 138 million trainable parameters. Millions of trainable parameters require thousands of training datasets to get enough training features [95]. However, our model is limited to 240 images per class, which has 383k trainable parameters. The proposed model's smaller size makes it more efficient.
  • 37. Conclusion  Coffee contributes to Ethiopia's foreign currency earnings.  Nowadays, the sub-sector is attracting governmental and nonprofit attention.  So, coffee should be identified in a uniform manner  To this, we use end-to-end CNN and hybrid feature extraction models  Data collected at ECX and labeled to Harar, Jimma, Limu, Sidama, Wellega.  We used 80/20 train-test split  We used cross validation  End-to-end CNN model achieved 89.99%.  We used CNN-HOG to increase class prediction by using deep and handcraft features.
  • 38. Cont..  Multiclass SVM classifier with RBF kernel were used to classify HOG, CNN and CNN-HOG features.  We obtained 74.17%, 85.83%, and 97.5% accuracy respectively.  Our model performs better with the combined Deep-shallow features.  The challenge was the confusion error of Limu coffee with Sidama coffee and Jima coffee with Harar, as well as Sidama, and Jimma coffee.  Selected coffee regions' color and textural similarities.
  • 40. Recommendation Identification of coffee bean varieties from mixed components. Developing a GUI-based model for identification of CBV using smartphones. The detection and counting of the number of defects. Increasing class labels.