Feature Extraction for Cocoa Bean Digital Image Classification Prediction for Smart Farming Application
Abstract
:1. Introduction
2. Development of a New Methodology for the Textural Feature Analysis of Digital Images of Cocoa Beans
3. Case Study and Results
3.1. Materials and Methods
3.1.1. Materials
3.1.2. Methodology
Experimental Environment
Image Data Preprocessing
Feature Extraction: Convolutional Neural Network (CNN)
Feature Extraction: Gray Level Co-Occurrence Matrix (GLCM) Textural Features
GLCM coordinates, each ranging 0 to | |
th entry in a normalized gray-tone spatial dependence matrix. | |
Number of distinct gray levels in the quantized image. | |
(x, y) | Pictorial information is represented as a function of two variables. |
First-order statistical moments of the quantized image. | |
Second-order statistical moments of the quantized image. |
Classification Prediction
- The feature extraction model using CNN;
- The feature extraction model using GLCM.
3.2. Results
- ·
- A large number of epochs have an immense effect on the accuracy of the identification of the image being tested. The larger the number of epochs, the more accurate the identification of the image. As presented in Table 5 (bold formatted numbers emphasize higher accuracy values), using features extracted from the CNN method can achieve an accuracy of 59.14% with the SVM classifier and 56.99% with the XGBoost classifier.
- ·
- Based on GLCM textural features, we can see that the −90°, and 90° for the GLCM textural features method can achieve an accuracy of 61.04% with the SVM classifier and 65.08% with the XGBoost classifier.
- ·
- We also conducted experiments using WEKA in comparison with the GLCM textural features method, which achieved an accuracy of 63.86% with the SVM classifier and 39.74% with the AdaBoost classifier.
4. Discussion
5. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Farooq, M.S.; Riaz, S.; Abid, A.; Abid, K.; Naeem, M.A. A Survey on the Role of IoT in Agriculture for the Implementation of Smart Farming. IEEE Access 2019, 7, 156237–156271. [Google Scholar] [CrossRef]
- Yoon, C.; Huh, M.; Kang, S.; Park, J.; Lee, C. Implement Smart Farm with IoT Technology. In Proceedings of the 20th International Conference on Advanced Communication Technology (ICACT), Chuncheon-si Gangwon-do, Korea, 11–14 February 2018; pp. 749–752. [Google Scholar]
- Haralick, R.M.; Shanmugam, K.; Dinstein, I. Textural Features for Image Classification. IEEE Trans. Syst. Man Cybern. 1973, SMC-3, 610–621. [Google Scholar] [CrossRef] [Green Version]
- Ye, F.; Shi, Z.; Shi, Z. A comparative study of PCA, LDA and Kernel LDA for image classification. In Proceedings of the International Symposium on Ubiquitous Virtual Reality, Gwangju, South Korea, 8–11 July 2009; pp. 51–54. [Google Scholar]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
- Purwanto, D.; Chen, Y.; Fang, W. First-Person Action Recognition with Temporal Pooling and Hilbert-Huang Transform. IEEE Trans. Multimed. 2019, 21–12, 3122–3135. [Google Scholar] [CrossRef]
- Nazir, F.; Majeed, M.N.; Ghazanfar, M.A.; Maqsood, M. Mispronunciation Detection Using Deep Convolutional Neural Network Features and Transfer Learning—Based Model for Arabic Phonemes. IEEE Access 2019, 7, 52589. [Google Scholar] [CrossRef]
- Khagi, B.; Lee, C.G.; Kwon, G. Alzheimer’s disease Classification from Brain MRI based on transfer learning from CNN. In Proceedings of the 11th Biomedical Engineering International Conference (BMEiCON), Chiang Mai, Thailand, 21–24 November 2018; pp. 1–4. [Google Scholar]
- Sengur, A.; Akhtar, Z.; Akbulut, Y.; Ekici, S.; Budak, U. Deep Feature Extraction for Face Liveness Detection. In Proceedings of the International Conference on Artificial Intelligence and Data Processing (IDAP), Malatya, Turkey, 28–30 September 2018; pp. 1–4. [Google Scholar]
- Zhang, Y.; Gao, X.; He, L.; Lu, W.; He, R. Objective Video Quality Assessment Combining Transfer Learning with CNN. IEEE Trans. Neural Netw. Learn. Syst. 2020, 31, 2716–2730. [Google Scholar] [CrossRef]
- Löfstedt, T.; Brynolfsson, P.; Asklund, T.; Nyholm, T.; Garpebring, A. Gray-level invariant Haralick texture features. PLoS ONE 2019. [Google Scholar] [CrossRef]
- Öztürk, S.; Akdemir, B. Application of Feature extraction and Classification Methods for Histopathological Image using GLCM, LBP, LBGLCM, GLRLM and SFTA. In Proceedings of the Part of special issue: International Conference on Computational Intelligence and Data Science, Gurgaon, India, 7–8 April 2018; Volume 132, pp. 40–46. [Google Scholar]
- Brynolfsson, P.; Nilsson, D.; Torheim, T.; Asklund, T.; Karlsson, C.T.; Trygg, J.; Nyholm, T.; Garpebring, A. Haralick texture features from apparent diffusion coefficient (ADC) MRI images depend on imaging and pre-processing parameters. Sci. Rep. 2017, 7, 4041. [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] [Green Version]
- Clausi, D.A. 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]
- Jachowski, N.R.A.; Quak, M.S.Y.; Friess, D.A.; Duangnamon, D.; Webb, E.L.; Ziegler, A.D. Mangrove biomass estimation in Southwest Thailand using machine learning. In Applied Geography; Elsevier: Amsterdam, The Netherlands, 2013; Volume 45, pp. 311–321. [Google Scholar]
- Kamilaris, A.; Prenafeta-Boldu’, F.X. Deep learning in agriculture: A survey. Computers and Electronics in Agriculture; Elsevier: Amsterdam, The Netherlands, 2018; Volume 147, pp. 70–90. [Google Scholar]
- Liakos, K.G.; Busato, P.; Moshou, D.; Pearson, S.; Bochtis, D. Machine Learning in Agriculture: A Review. Sensors 2018, 18, 2675. [Google Scholar] [CrossRef] [Green Version]
- Kumar, R.; Singh, M.P.; Kumar, P.; Singh, J.P. Crop Selection Method to Maximize Crop Yield Rate using Machine Learning Technique. In Proceedings of the International Conference on Smart Technologies and Management for Computing, Communication, Controls, Energy and Materials (ICSTM), Chennai, India, 6–8 May 2015; pp. 138–145. [Google Scholar]
- Behera, S.K.; Rath, A.K.; Mahapatra, A.; Sethy, P.K. Identification, classification & grading of fruits using machine learning & computer intelligence: A review. J. Ambient Intell. Human. Comput. 2020. [Google Scholar] [CrossRef]
- Zawbaa, H.M.; Hazman, M.; Abbass, M.; Hassanien, A.E. Automatic fruit classification using random forest algorithm. In Proceedings of the IEEE International Conference on Hybrid Intelligent Systems, Kuwait, Kuwait, 14–16 December 2014; pp. 164–168. [Google Scholar]
- Yro, A.; Camille, E.N.; Kpalma, K. Cocoa Beans Fermentation Degree Assessment for Quality Control Using Machine Vision and Multiclass SVM Classifier. Int. J. Innov. Appl. Stud. ISSR J. 2018, 24, 1711–1717. [Google Scholar]
- Astika, I.W.; Solahudin, M.; Kurniawan, A.; Wulandari, Y. Determination of Cocoa Bean Quality with Image Processing and Artificial Neural Network. In Proceedings of the AFITA 2010 International Conference, The Quality Information for Competitive Agricultural Based Production System and Commerce, Bogor, Indonesia, 3–7 October 2010. [Google Scholar]
- Unser, M. Sum and Difference Histograms for Texture Classification. IEEE Trans. Pattern Anal. Mach. Intell. 1986, 8, 118–125. [Google Scholar] [CrossRef] [PubMed]
- Hossain, M.S.; Al-Hammadi, M.; Muhammad, G. Automatic Fruits Classification Using Deep Learning for Industrial Applications. IEEE Trans. Ind. Inform. 2018, 15, 1027–1034. [Google Scholar] [CrossRef]
- Mahajan, M.S.; Patil, S.T. Optimization and Classification of Fruit using Machine Learning Algorithm. IJIRST Int. J. Innov. Res. Sci. Technol. 2016, 3, 377–381. [Google Scholar]
- Tan, J.; Balasubramanian, B.; Sukha, D.A.; Ramkissoon, S.; Umaharan, P. Sensing fermentation degree of cocoa (Theobroma cacao L.) beans by machine learning classification models based electronic nose system. J. Food Process Eng. 2019, 42. [Google Scholar] [CrossRef]
- Knapp, A.W. Cocoa and Chocolate: Their History from Plantation to Consumer; Chapman and Hall Ltd.: London, UK, 1920; pp. 36–40. [Google Scholar]
- Bacco, M.; Barsocchi, P.; Ferro, E.; Gotta, A.; Ruggeri, M. The Digitization of Agriculture: A Survey of Research Activities on Smart Farming. Array 2019, 3–4, 1–11. [Google Scholar]
- Wang, P.; Valerdi, R.; Zhou, S.; Li, L. Introduction: Advances in IoT research and applications. Springer Inform. Syst. Front. 2015, 17, 239–241. [Google Scholar] [CrossRef] [Green Version]
- Baldovino, R.G.; Valenzuela, I.C.; Dadios, E.P. Implementation of a Low-power Wireless Sensor Network for Smart Farm Applications. In Proceedings of the IEEE 10th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment and Management (HNICEM), Baguio City, Philippines, 29 November–2 December 2018; IEEE: New York, NY, USA, 2018; pp. 1–5. [Google Scholar]
- Codeluppi, G.; Cilfone, A.; Davoli, L.; Ferrari, G. LoRaFarM: A LoRaWAN-Based Smart Farming Modular IoT Architecture. Sensors 2020, 20, 2028. [Google Scholar] [CrossRef] [Green Version]
- Botta, A.; Donato, W.; Persico, V.; Pescapé, A. Integration of cloud computing and Internet of Things: A survey. Future Gener. Comput. Syst. 2016, 56, 684–700. [Google Scholar] [CrossRef]
- Navulur, S.; Sastry, A.S.C.S.; Prasad, M.N.G. Agricultural management through wireless sensors and Internet of Things. Int. J. Electr. Comput. Eng. 2017, 7, 3492–3499. [Google Scholar] [CrossRef] [Green Version]
- Badan Standardisasi Nasional (BSN). Petunjuk Pengambilan Contoh Padatan SNI-19-0428-1998; Badan Standardisasi Nasional: Jakarta, Indonesia, 1998. [Google Scholar]
- Kementrian Pertanian. Peraturan Menteri Pertanian Republik Indonesia: Pedoman Penanganan Pascapanen Kakao Nomor. 51/Permentan/OT.140/9/2012.; Kementrian Pertanian: Jakarta, Indonesia, 2012. [Google Scholar]
- Badan Standardisasi Nasional (BSN). Biji kakao SNI 2323:2008 ICS 1.67.140.30 Kakao.; Badan Standardisasi Nasional: Jakarta, Indonesia, 2008. [Google Scholar]
- Frank, E.; Hall, M.A.; Witten, I.H. The WEKA Workbench, Online Appendix for Data Mining: Practical Machine Learning Tools and Techniques, 4th ed.; Morgan Kaufmann: Burlington, MA, USA, 2016. [Google Scholar]
- Alcorn, M.A.; Li, Q.; Gong, Z.; Wang, C.; Mai, L.; Ku, W.; Nguyen, A. Strike (with) a Pose: Neural Networks Are Easily Fooled by Strange Poses of Familiar Objects. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 16–20 June 2019; pp. 4845–4854. [Google Scholar]
- Zhu, Z.; Xie, L.; Yuille, A.L. Object recognition with and without objects. arXiv 2016, arXiv:1611.06596. [Google Scholar]
- Yani, M.; Irawan, B.; Setiningsih, C. Application of Transfer Learning Using Convolutional Neural Network Method for Early Detection of Terry’s Nail. In Proceeding of the International Conference on Electronics Representation and Algorithm (ICERA), Yogyakarta, Indonesia, 29–30 January 2019. [Google Scholar]
- International Telecommunication Union. Recommendation ITU-T BT.601-7 Studio Encoding Parameters of Digital Television for Standard 4:3 and Wide-screen 16:9 Aspect Ratios BT Series Broadcasting Service; International Telecommunication Union: Geneva, Switzerland, 2011. [Google Scholar]
- Hall-Byer, M. GLCM Texture: A Tutorial v. 2.7 April 2004; Department of Geography, University of Calgary: Calgary, AB, Canada, 2004. [Google Scholar]
Architecture Layer | Output | Parameter Size |
---|---|---|
Convolutional 1 | (222, 222, 32) | 896 |
Convolutional 2 | (220, 220, 32) | 9248 |
Pooling | (44, 44, 32) | 0 |
Flattening | (61,952) | 0 |
Fully connected layer | (7) | 433,671 |
Total parameter: 443.815 | ||
Trainable parameter: 443.815 | ||
Non-trainable parameter: 0 |
Parameter | Parameter Value |
---|---|
Image rotation | 25 |
Image shift width | 0.1 |
Image shift height | 0.1 |
Image shear | 0.2 |
Image zoom | 0.2 |
Horizontal flip | True |
Image fill | “nearest” |
Model Evaluation/Epoch | 5 | 10 | 15 | 20 | 25 |
---|---|---|---|---|---|
Test loss | 1.37% | 1.23% | 1.30% | 1.28% | 1.13% |
Test accuracy | 0.41% | 0.52% | 0.45% | 0.47% | 0.56% |
Class/Feature | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
1 | 28.95 | 1.83 | 0.80 | 0.30 | 0.55 | 0.96 | 369.05 |
2 | 48.56 | 3.17 | 0.58 | 0.22 | 0.47 | 0.95 | 539.75 |
3 | 22.43 | 1.41 | 0.78 | 0.18 | 0.42 | 0.97 | 491.84 |
4 | 44.61 | 2.07 | 0.75 | 0.15 | 0.38 | 0.97 | 941.58 |
5 | 26.21 | 1.64 | 0.80 | 0.27 | 0.52 | 0.97 | 415.37 |
6 | 30.87 | 2.45 | 0.56 | 0.16 | 0.39 | 0.94 | 258.46 |
7 | 36.79 | 2.46 | 0.68 | 0.36 | 0.60 | 0.95 | 401.79 |
Classifier | Epoch: 5 | Epoch: 10 | Epoch: 15 | Epoch: 20 | Epoch: 25 |
---|---|---|---|---|---|
SVM | 53.05% | 54.84% | 50.54% | 55.91% | 59.14% |
XGBoost | 51.9% | 52.69% | 46.95% | 54.12% | 56.99% |
GLCM (0°) | GLCM (−180°) | GLCM (−90°) | GLCM (90°) | GLCM (180°) | |
SVM | 59.07% | 59.07% | 61.04% | 61.04% | 59.07% |
XGBoost | 63.02% | 63.02% | 65.08% | 65.08% | 63.02% |
WEKA SVM | 61.12% | 61.12% | 63.86% | 63.86% | 61.12% |
WEKA AdaBoost | 39.41% | 39.41% | 39.74% | 39.74% | 39.41% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 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 (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Adhitya, Y.; Prakosa, S.W.; Köppen, M.; Leu, J.-S. Feature Extraction for Cocoa Bean Digital Image Classification Prediction for Smart Farming Application. Agronomy 2020, 10, 1642. https://doi.org/10.3390/agronomy10111642
Adhitya Y, Prakosa SW, Köppen M, Leu J-S. Feature Extraction for Cocoa Bean Digital Image Classification Prediction for Smart Farming Application. Agronomy. 2020; 10(11):1642. https://doi.org/10.3390/agronomy10111642
Chicago/Turabian StyleAdhitya, Yudhi, Setya Widyawan Prakosa, Mario Köppen, and Jenq-Shiou Leu. 2020. "Feature Extraction for Cocoa Bean Digital Image Classification Prediction for Smart Farming Application" Agronomy 10, no. 11: 1642. https://doi.org/10.3390/agronomy10111642
APA StyleAdhitya, Y., Prakosa, S. W., Köppen, M., & Leu, J. -S. (2020). Feature Extraction for Cocoa Bean Digital Image Classification Prediction for Smart Farming Application. Agronomy, 10(11), 1642. https://doi.org/10.3390/agronomy10111642