Classification of hazelnuts according to their quality using deep learning algorithms

Erbaş N., Çınarer G., Kılıç K. (2022): Classification of hazelnuts according to their quality using deep learning algorithms. Czech J. Food Sci., 40: 240–248.

download PDF

Hazelnut is a product with high nutritional and economic value. In maintaining the quality value of hazelnut, the classification process is of great importance. In the present day, the quality classification of hazelnuts and other crops is performed in general manually, and so it is difficult and costly. Performing this classification with modern agricultural techniques is much more important in terms of quality. This study was based on a model intended to detect hazelnut quality. The model is about the establishment of an artificial intelligence-based classification system that can detect the hidden defects of hazelnuts. In the developed model, the visuals used in the dataset are divided into training and test groups. In the model, hazelnuts are divided into 5 classes according to their quality using AlexNet architecture and modern deep learning (DL) techniques instead of traditional hazelnut classification methods. In this model developed based on artificial intelligence, a very good approach was presented with the accurate classification of 99%. Moreover, the values regarding precision and recall were also determined at 98.7% and 99.6%, respectively. This study is important in terms of becoming widespread information technology use and computer-assisted applications in the agricultural economics field such as product classification, quality, and control.

Alnajjar M. (2021): Image-based detection using deep learning and Google Colab. International Journal of Academic Information Systems Research (IJAISR), 5: 30–35.
Bergmann P., Fauser M., Sattlegger D., Steger C. (2019): MVTec AD – A comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, USA, June 15–20, 2019: 9592–9600.
Bergmann P., Batzner K., Fauser M., Sattlegger D., Steger C. (2021): The MVTec anomaly detection dataset: A comprehensive real-world dataset for unsupervised anomaly detection. International Journal of Computer Vision, 129: 1038–1059.
Cai H., Liu S. (2019): Betel nut classification method based on transfer learning. In: 2019 IEEE 8th Data Driven Control and Learning Systems Conference (DDCLS), Dali, China, May 24–27, 2019: 1039–1043.
Dheir I.M., Mettleq A.S.A., Elsharif A.A., Abu-Naser S.S. (2020): Classifying nuts types using Convolutional Neural Network. International Journal of Academic Information Systems Research (IJAISR), 3: 12–18.
Di Caro D., Liguori C., Pietrosanto A., Sommella P. (2019): Quality control of hazelnuts by means of NMR measurements. In: IOP Conference Series: Earth and Environmental Science, Vol. 275, 1st Workshop on Metrology for Agriculture and Forestry (METROAGRIFOR), Ancona, Italy, Oct 1–2, 2018: P1–P10.
FAOSTAT (2019): Faostat Statistical Database. [Dataset]. FAOSTAT. Available at (accessed Jan, 2022).
Fırıldık K., Talu M.F. (2019): Investigation of transfer learning approaches used in Convolutional Neural Networks. (Evrişimsel sinir ağlarında kullanılan transfer öğrenme yaklaşımlarının incelenmesi). Computer Science, 4: 88–95. (in Turkish)
Gang L. (2018). The impact of supply chain relationship on food quality. Procedia Computer Science, 131: 860–865.
Gu J., Wang Z., Kuen J., Ma L., Shahroudy A., Shuai B., Chen T. (2018): Recent advances in convolutional neural networks. Pattern Recognition, 77: 354–377.
Han Y., Liu Z., Khoshelham K., Bai S.H. (2021): Quality estimation of nuts using deep learning classification of hyperspectral imagery. Computers and Electronics in Agriculture, 180: 105868.
Howard J., Gugger S. (2020): fastai: A layered API for deep learning. Information, 11: 108.
Kalkan H., Ince N.F., Tewfik A.H., Yardimci Y., Pearson T. (2008): Classification of hazelnut kernels by using impact acoustic time-frequency patterns. EURASIP Journal on Advances in Signal Processing, 2008: 247643.
Kamilaris A., Prenafeta S.X. (2018): A review of the use of convolutional neural networks in agriculture. The Journal of Agricultural Science, 156: 312–322.
Kılıç O., Alkan I. (2006): The developments in the world hazelnut production and export, the role of Turkey. Journal of Applied Sciences, 6: 1612–1616.
Koç C., Gerdan D., Eminoğlu M.B., Yegül U.I., Koç B., Vatan-daş M. (2020): Classification of hazelnut cultivars: Comparison of DL4J and ensemble learning algorithms. Notulae Botanicae Horti Agrobotanici Cluj-Napoca, 48: 2316–2327.
Krizhevsky A., Sutskever I., Hinton G.E. (2012): Imagenet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems, 25: 1097–1105.
MAAF (2021): Hazelnut in the World. Ankara, Turkey, Ministry of Agriculture and Forestry, General Directorate of Vegetation Report (MAAF): 1–10.
Miraei Ashtiani S.H., Rohani A., Aghkhani M.H. (2020): Soft computing-based method for estimation of almond kernel mass from its shell features. Scientia Horticulturae, 262: 109071.
MVTec (2021): MVTec AD – A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. [Dataset]. MVTec. Available at (accessed Jan, 2022).
Narendra V.G., Kini A.S. (2018): An intelligent classification model for peanut's varieties by color and texture features. International Journal of Engineering and Technology (UAE), 7: 250–254.
Öztürk D., Kaşko Arıcı Y. (2017): Analysis of production and marketing problems of hazelnut producers: A case of Samsun Province. Ordu University Journal of Social Science Research, 7: 21–34.
Schmidt-Hieber J. (2020): Nonparametric regression using deep neural networks with ReLU activation function. The Annals of Statistics, 48: 1875–1897.
Smith L.N. (2017): Cyclical learning rates for training neural networks. In: 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), Santa Rosa, USA, March 24–31, 2017: 464–472.
Solak S., Altınışık U. (2018): Detection and classification of hazelnut fruit by using image processing techniques and clustering methods. Sakarya University Journal of Science, 22: 56–65.
Vidyarthi S.K., Singh S.K., Tiwari R., Xiao H.W., Rai R. (2020): Classification of first quality fancy cashew kernels using four deep convolutional neural network models. Journal of Food Process Engineering, 43: 1–13.
download PDF

© 2022 Czech Academy of Agricultural Sciences | Prohlášení o přístupnosti