Classification of Pepper Seeds by Machine Learning Using Color Filter Array Images
Abstract
:1. Introduction
- The creation of a large CFA image database;
- The improvement of the experimental set-up used by Bitjoka et al., 2015 [12];
- The segmentation extraction and attribute extraction method, which can be used for the automation of seed identification in general.
2. Related Work
- -
- Precision measures the proportion of positive instances correctly identified among all positive instances. It is calculated by dividing the number of true positives by the sum of true positives and false positives.
- -
- Recall measures the proportion of correctly identified positive instances among all truly positive instances. It is calculated by dividing the number of true positives by the sum of true positives and false negatives.
- -
- F-measure, also known as F1 measure, represents a harmonic average of precision and recall. It provides a balanced measure between the two. It is calculated using the formula F1 = 2 × (precision × recall)/(precision + recall).
- -
- Accuracy measures the proportion of correctly classified instances among all instances. It is calculated by dividing the total number of correct predictions by the total number of instances.
- -
- Confusion matrix summarizes the performance of a model in terms of true positives, true negatives, false positives and false negatives. It can be used to calculate other metrics such as precision, recall, and accuracy.
3. Materials and Methods
3.1. Sample and Image Preparation
3.2. Images Acquisition Device
- ➢
- The drawer is placed inside the lightproof box
- ➢
- The camera is positioned above the drawer and focused on the seeds
- ➢
- The image is captured with the camera
3.3. Creation of the Dataset
- -
- Shape attributes: area, perimeter, compactness, extent, width, and height;
- -
- The characteristics of the Gabor filter: the mean and the standard deviation;
- -
- The characteristics of the LBP (Local Binary Patterns transform: contrast, correlation, energy, homogeneity, and entropy);
- -
- The characteristics of the co-occurrence matrix (GLCM): dissimilarity, correlation, contrast, homogeneity, and ASM.
3.4. Classification
- (a)
- Energy: ;
- (b)
- Entropy: ;
- (c)
- Correlation: ;
- (d)
- Local uniformity: ;
- (e)
- Moment of inertia: ;
4. Results
- Search for optimal parameters with grid search and cross-validation;
- Train the model with the train set, testing the model with the test set;
- Construct the confusion matrix;
- Plot the learning curve.
4.1. The Confusion Matrix
4.2. Learning Curve
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
CFA | Color filter array |
CCM | Co-occurrence matrices |
DT | Decision tree |
IQR | Interquartile range |
KNN | k-nearest neighbors |
LDA | Linear discrimination |
LED | Light-emitting diode |
MLP | Multilayer perceptron |
NB | Naive Bayes |
PGM | Portable gray map |
RFECV | Recursive feature elimination with cross-validation |
RF | Random forest |
SVM | Support vector machine |
References
- FAO. Production de Poivre—État des Récoltes Mondiales, des Récoltes Commerciales et des Perspectives Pour 2019; FAO: Rome, Italy, 2019. [Google Scholar]
- Ying, X.; Chen, X.; Cheng, S.; Shen, Y.; Peng, L.; Peng, L. Piperine inhibits IL-β induced expression of inflammatory mediators in human osteoarthritis chondrocyte. Int. Immunopharmacol. 2013, 17, 293–299. [Google Scholar] [CrossRef]
- Bang, J.S.; Oh, D.H.; Choi, H.M.; Sur, B.-J.; Lim, S.-J.; Kim, J.Y.; Yang, H.-I.; Yoo, M.C.; Hahm, D.-H.; Kim, K.S. Anti-inflammatory and antiarthritic effects of piperine in human interleukin 1β-stimulated fibroblast-like synoviocytes and in rat arthritis models. Arthritis Res. Ther. 2009, 11, R49. [Google Scholar] [CrossRef] [PubMed]
- Shoba, G.; Joy, D.; Joseph, T.; Majeed, M.; Rajendran, R.; Srinivas, P.S.S.R. Influence of Piperine on the Pharmacokinetics of Curcumin in Animals and Human Volunteers. Planta Medica 1998, 64, 353–356. [Google Scholar] [CrossRef]
- Srinivasan, K. Black pepper and its pungent principle-piperine: A review of diverse physiological effects. Crit. Rev. Food Sci. Nutr. 2007, 47, 735–748. [Google Scholar] [CrossRef]
- Jensen-Jarolim, E.; Gajdzik, L.; Haberl, I.; Kraft, D.; Scheiner, O.; Graf, J. Hot Spices Influence Permeability of Human Intestinal Epithelial. J. Nutr. 1998, 128, 577–581. [Google Scholar] [CrossRef] [PubMed]
- Dioses, J.L., Jr. Classification of Pepper Seeds Using Data Mining Algorithms. Int. J. Adv. Trends Comput. Sci. Eng. 2020, 9, 5. [Google Scholar] [CrossRef]
- Iskandar; Ling, N.J.; Fauzi, A.H. Foreign Matter Identification in Piper Nigrum Samples. In Proceedings of the IEEE 7th International Colloquium on Signal Processing and its Applications, Penang, Malaysia, 4–6 March 2011; p. 5. [Google Scholar]
- Olaes, E.J.; Arboleda, E.R.; Dioses, J.L., Jr.; Dellosa, R.M. Bell Pepper and Chili Pepper Classification: An Application of Image Processing and Fuzzy Logic. Int. J. Sci. Technol. Res. 2020, 9, 4832–4839. [Google Scholar]
- Macaire, L.L. Colour texture classification from colour filter array images using various colour spaces. IET Image Process. 2012, 6, 1192–1204. [Google Scholar]
- Polling, M.; Cao, L.; Gravendeel, B.; Verbeek, F.J. Analysis of automatic image classification methods for Urticaceae pollen classification. Neurocomputing 2023, 522, 181–193. [Google Scholar]
- Bitjoka, L.; Boukar, O.; Ngatchou, A.; Djaowé, G.; Banbe, L. Fast Objective Identification of Beans Grains (Phaseolus vulgaris L.) Varieties Using CFA Images Compacity Measurement. Electr. Electron. Eng. 2015, 5, 5. [Google Scholar]
- Kurtulmu, F.; Alibaş, İ.; Kavdır, I. Classification of pepper seeds using machine vision based on neural network. Int. J. Biol. Eng. 2016, 9, 51–62. [Google Scholar]
- Xu, P.; Yang, R.; Zeng, T.; Zhang, J.; Zhang, Y.; Tan, Q. Varietal classification of maize seeds using computer vision and machine learning techniques. Food Process Eng. 2021, 44, e13846. [Google Scholar] [CrossRef]
- Ansari, N.; Ratri, S.S.; Jahan, A.; Ashik-E-Rabbani, M.; Rahman, A. Inspection of paddy seed varietal purity using machine vision and multivariate analysis. J. Agric. Food Res. 2021, 3, 100109. [Google Scholar] [CrossRef]
- Ballabio; Grisoni, F.; Todeschini, R. Multivariate comparison of classification performance measures. Chemom. Intell. Lab. Syst. 2018, 174, 33–44. [Google Scholar] [CrossRef]
- Chen, J.; Lian, Y.; Li, Y. Real-time grain impurity sensing for rice combine harvesters using image processing and decision-tree algorithm. Comput. Electron. Agric. 2020, 175, 105591. [Google Scholar] [CrossRef]
- Jackman, P.; Sun, D.-W.; Du, C.-J.; Allen, P.; Downey, G. Prediction of beef eating quality from colour, marbling and wavelet texture features. Meat Sci. 2008, 80, 1273–1281. [Google Scholar] [CrossRef] [PubMed]
- Li, J.; Tan, J.; Martz, F.; Heymann, H. Image texture features as indicators of beef tenderness. Meat Sci. 1999, 51, 17–22. [Google Scholar] [CrossRef] [PubMed]
- Majumdar, S.; Jayas, D.S. Classification of cereal grains using machine vision. Am. Soc. Agric. Eng. 2000, 43, 1669–1675. [Google Scholar] [CrossRef]
- Zheng, C.; Sun, D.-W.; Zheng, L. Recent developments and applications of image features for food quality evaluation and inspection—A review. Trends Food Sci. Technol. 2006, 17, 642–655. [Google Scholar] [CrossRef]
- Arivazhagan, S.; Shebiah, R.; Nidhyanandhan, S.; Ganesan, L. Fruit Recognition using Color and Texture Features. J. Emerg. Trends Comput. Inf. Sci. 2010, 1, 90–94. [Google Scholar]
- Laurent, B.; Ousman, B.; Dzudie, T.; Carl, M.; Emmanuel, T. Digital camera. images processing of hard-to-cook beans. J. Eng. Technol. Res. 2010, 2, 177–188. [Google Scholar]
- Cawley, G.C.; Talbot, N.L. AUC: A misleading measure of the performance of predictive distribution models. J. Mach. Learn. Res. 2010, 17, 145–151. [Google Scholar]
- Davis, J.; Goadrich, M. Precision-Recall-Gain Curves: PR Analysis Done Right. In ACM Transactions on Knowledge Discovery from Data (TKDD); MIT Press: Cambridge, MA, USA, 2006. [Google Scholar]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Amazon france, Lepro 5m Ruban LED 1200LM Blanc Froid Dimmable, 12V 6000K 300LEDs 2835, Bande LED Autocollant avec Variateur, Connecteurs+Transformateur, Eclairage Intérieur pour Meuble, Escalier, Chambre, Cuisine. 2023. Available online: https://www.amazon.fr/gp/product/B07TJXZNDZ/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1 (accessed on 4 December 2023).
- Minato-KU, Dijital cameran X-E1 Manuel du propriétaire, Fujufilm Coporation, Tokyo 107-0052 disponilbe à l’URL: fujifilm_xe1_manual_fr.pdf. Available online: https://fujifilm-x.com/zh-cn/ (accessed on 4 December 2023).
- Haralick, R.M.; Shanmugam, K.; Dinstein, I. Textural features for image classification. IEEE Trans. Syst. Man Cybern. SMC 1973, 3, 610–621. [Google Scholar] [CrossRef]
- Ojala, T.; Pietikainen, M.; Maenpaa, T. Multiresolution gray-scale and rotation invariant texture classification with local binary patterns. IEEE Trans. Pattern Anal. Mach. Intell. 2002, 25, 971–987. [Google Scholar] [CrossRef]
- Soh, L.K.; Tsatsoulis, C. Texture analysis of SAR sea ice imagery using gray level co-occurrence matrices. IEEE Trans. Geosci. Remote Sens. 1999, 37, 780–795. [Google Scholar] [CrossRef]
- Clausi, D. An analysis of co-occurrence texture statistics as a function of grey level quantization. Can. J. Remote Sens. 2002, 28, 45–62. [Google Scholar] [CrossRef]
Origin 1 | Origin 2 | Origin 3 | Origin 4 | Origin 5 | |
---|---|---|---|---|---|
Penja white pepper | Penja market seller 1 | Penja market seller 2 | Penja market seller 3 | Penja market seller 4 | Penja market seller 5 |
Penja black pepper | Penja market seller 1 | Penja market seller 2 | Penja market seller 3 | / | / |
White pepper mix | Doubaï (Yaoundé super market) | India (Yaoundé super market) | French provinces | / | / |
Black pepper blend | Upper Nkam (Yaoundé market) | Black pepper mix (Yaoundé market) | French provinces (Brest supermarket) | / | / |
Texturals Features of [29] | ||
---|---|---|
1 | Contrast | |
2 | Correlation | |
3 | Energy | |
4 | Homogeneity | |
5 | Sum of squares: variance | |
6 | Entropy | |
7 | Sum of averages | |
8 | Entropy sum | |
9 | Sum of variance | |
10 | Difference of variances | |
11 | Difference of entropies | |
12 | Correlation measure 1 information | |
13 | Correlation measure 2 information | |
14 | Maximum correlation | |
Texturals features of [31] | ||
15 | Autocorrelation | |
16 | Dissimilarity | |
17 | Maximum probability | |
18 | Cluster nuance | |
19 | Cluster prominence | |
Texturals features of [32] | ||
20 | Inverse difference |
Variables | Features Selection | ||||
---|---|---|---|---|---|
Variance Threshold = 0.02 | Chi-Squared Test k = 5 | SGD Classifier Threshold = ‘Mean’ | RFECV | ANOVA p Values < 0.05 | |
Extent | X | X | X | ||
Area | X | X | X | X | X |
Height | X | X | X | X | |
Weight | X | X | X | X | X |
Compacity | X | X | X | ||
Perimeter | X | X | X | X | |
Contrast (LBP) | X | X | X | X | |
Correlation (LBP) | X | X | X | X | |
Energy (LBP) | X | X | X | X | |
Homogeneity (LBP) | X | X | X | X | |
Entropy (LBP) | X | X | X | X | |
Mean GABOR | X | X | X | X | |
Standard Deviation GABOR | X | X | X | ||
Dissimilarity (GLCM) | X | X | X | ||
Correlation (GLCM) | X | X | X | X | |
Contrast (GLCM) | X | X | X | X | X |
Homogeneity (GLCM) | X | X | X | ||
ASM (GLCM) | X | X | X |
Models | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
KN | 0.80 | 0.801 | 0.800 | 0.799 |
SGD | 0.79 | 0.794 | 0.793 | 0.794 |
SVM | 0.87 | 0.874 | 0.873 | 0.874 |
RF | 0.83 | 0.838 | 0.837 | 0.837 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Djoulde, K.; Ousman, B.; Hamadjam, A.; Bitjoka, L.; Tchiegang, C. Classification of Pepper Seeds by Machine Learning Using Color Filter Array Images. J. Imaging 2024, 10, 41. https://doi.org/10.3390/jimaging10020041
Djoulde K, Ousman B, Hamadjam A, Bitjoka L, Tchiegang C. Classification of Pepper Seeds by Machine Learning Using Color Filter Array Images. Journal of Imaging. 2024; 10(2):41. https://doi.org/10.3390/jimaging10020041
Chicago/Turabian StyleDjoulde, Kani, Boukar Ousman, Abboubakar Hamadjam, Laurent Bitjoka, and Clergé Tchiegang. 2024. "Classification of Pepper Seeds by Machine Learning Using Color Filter Array Images" Journal of Imaging 10, no. 2: 41. https://doi.org/10.3390/jimaging10020041
APA StyleDjoulde, K., Ousman, B., Hamadjam, A., Bitjoka, L., & Tchiegang, C. (2024). Classification of Pepper Seeds by Machine Learning Using Color Filter Array Images. Journal of Imaging, 10(2), 41. https://doi.org/10.3390/jimaging10020041