Abstract
Today, image classification methods are widely utilized on agricultural products or in agricultural applications. However, many of these methods based on traditional approaches remain unsatisfactory in terms of obtaining effective results. Within this context, this study aimed to classify lentil images by machine learning algorithms, a current and effective method. In line with this purpose, first of all, a camera system was prepared primarily and a dataset was created by recording lentil grains at 225 × 225 resolution via this system. The dataset contains a total of 33,938 data obtained from 3 lentil species as green, yellow, and red. SqueezeNet, InceptionV3, DeepLoc, and VGG16 architectures, among the CNN methods, were used in order to extract features from the recorded images. Lastly, Artificial Neural Network (ANN), Naive Bayes (NB), Random Forest (RF), Adaptive Boosting (AB), and Decision Tree (DT) algorithms were utilized with the aim of creating models for lentil images’ classification. The classification success of the created machine learning models was calculated and the results were analyzed. The highest classification success with the deep features obtained from the SqueezeNet model, 99.80%, was achieved in the ANN algorithm. The results also revealed that grain size and shape features in image classification can yield much more detailed and precise data than can be obtained practically with manual quality assessment.
Similar content being viewed by others
Data availability
The dataset used in the study can be accessed from corresponding author.
References
Kumar J, Srivastava E, Singh M, Mahto D, Pratap A, Kumar S (2014) Lentil. Alien Gene Transfer in Crop Plants, vol 2. Springer, pp 191–205
Samaranayaka A (2017) Lentil: revival of poor man’s meat. Sustainable protein sources. Elsevier, pp 185–196
Kaale LD, Siddiq M, Hooper S (2022) Lentil (Lens culinaris Medik) as nutrient‐rich and versatile food legume: areview. Legume Science e169
Vandenberg A, Slinkard A (1990) Genetics of seed coat color and pattern in lentil. J Hered 81(6):484–488
Opoku A, Tabil L, Meda V, Rodd’s Brudenell River Resort P, Island E (2009) Effect of microwave drying and storage on the color, breakage, dehulling and cooking quality of two red lentil varities. CSBE 8:134–142
Hajas L, Sipos L, Csobod ÉC, Bálint MV, Juhász R, Benedek C (2022) Lentil (Lens culinaris Medik) flour varieties as promising new ingredients for gluten-free cookies. Foods 11(14): 2028
Bubelová Z, Sumczynski D, Salek RN (2018) Effect of cooking and germination on antioxidant activity, total polyphenols and flavonoids, fiber content, and digestibility of lentils (Lens culinaris L.). J Food Process Preserv 42(1):e13388
Portman D, Maharjan P, McDonald L, Laskovska S, Walker C, Irvin H, Blanchard C, Naiker M, Panozzo JF (2020) Nutritional and functional properties of cookies made using down-graded lentil–A candidate for novel food production and crop utilization. Cereal Chem 97(1):95–103
Chaugule A (2021) Survey of Seed Classification techniques. Turkish J Computer Mathem Educ (TURCOMAT) 12(13):1236–1260
Granitto PM, Garralda PA, Verdes PF, Ceccatto HA (2002) Boosting classifiers for weed seeds identification. in VIII Congreso Argentino de Ciencias de la Computación
Venora G, Grillo O, Shahin M, Symons S (2007) Identification of Sicilian landraces and Canadian cultivars of lentil using an image analysis system. Food Res Int 40(1):161–166
LeMasurier L, Panozzo J, Walker C (2014) A digital image analysis method for assessment of lentil size traits. J Food Eng 128:72–78
Zhao L, Haque S, Wang R (2022) Automated seed identification with computer vision: challenges and opportunities. Seed Sci Technol 50(2):75–102
Mahmood A, Singh SK, Tiwari AK (2022) Pre-trained deep learning-based classification of jujube fruits according to their maturity level. Neural Comput Appl 1–11
Shahin M, Symons S (2001) A machine vision system for grading lentils. Canadian Biosyst Eng 43:7.7-7.14
Shahin M, Symons S (2003) Lentil type identification using machine vision. Canadian Biosyst Eng 45:3.5-3.5
Narendra V, Abdorrazzaghi M (2013) An intelligent system for identification of Indian Lentil types using Artificial Neural Network (BPNN). IOSR J Comput Eng (IOSRJCE) 15(5):54–60
Ali A, Mohammed US, Nour RR (2021) Product based classification of bulk food grains using bag of visual words and deep features. Kafrelsheikh J Inform Sci 2(2):1–6
McDonald LS, Assadzadeh S, Panozzo JF (2021) Images, features, or feature distributions? A comparison of inputs for training convolutional neural networks to classify lentil and field pea milling fractions. Biosys Eng 208:16–27
Xiao L, Fan C, Ouyang H, Abate AF, Wan S (2022) Adaptive trapezoid region intercept histogram based Otsu method for brain MR image segmentation. J Ambient Intell Humaniz Comput 13(4):2161–2176
Taspinar YS, Selek M (2020) Object recognition with hybrid deep learning methods and testing on embedded systems. Int J Intell Syst Appl Eng 8(2):71–77
Taspinar YS, Cinar I, Koklu M (2021) Classification by a stacking model using CNN features for COVID-19 infection diagnosis. J X-ray Sci Technol(Preprint): p. 1–16
Ozyurt F (2020) Efficient deep feature selection for remote sensing image recognition with fused deep learning architectures. J Supercomput 76(11):8413–8431
Zhang X, Zhou X, Lin M, Sun J (2018) Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE conference on computer vision and pattern recognition. Salt Lake City, UT, USA
Zavan FHDB, Bellon OR, Silva L, Medioni GG (2019) Benchmarking parts based face processing in-the-wild for gender recognition and head pose estimation. Pattern Recogn Lett 123:104–110
Iandola FN, Han S, Moskewicz MW, Ashraf K, Dally WJ, Keutzer K (2016) SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and< 0.5 MB model size. arXiv preprint arXiv:1602.07360
Ozyurt F, Sert E, Avcı D (2020) An expert system for brain tumor detection: Fuzzy C-means with super resolution and convolutional neural network with extreme learning machine. Med Hypotheses 134:109433
Pathak D, El-Sharkawy M (2018) ReducedSqNet: A shallow architecture for CIFAR-10. In 2018 International Conference on Computational Science and Computational Intelligence (CSCI). Las Vegas, NV, USA: IEEE
Mateen M, Wen J, Song S, Huang Z (2018) Fundus image classification using VGG-19 architecture with PCA and SVD. Symmetry 11(1):1
Bozyigit F, Taskin A, Akar K, Kilinc D (2021) A Deep Learning-Based Hotel Image Classifier for Online Travel Agencies. Dokuz Eylül Üniversitesi Mühendislik Fakültesi Fen ve Mühendislik Dergisi 23(67):257–264
Dong N, Zhao L, Wu C-H, Chang J-F (2020) Inception v3 based cervical cell classification combined with artificially extracted features. Appl Soft Comput 93:106311
Calp MH, Kose U (2020) Estimation of burned areas in forest fires using artificial neural networks. Ingeniería Solidaria 16(3):1–22
Calp MH (2017) Yazılım projeleri için yapay zeka tabanlı risk yönetimi, in Institute of Informatics. Gazi University, Ankara
Erdal H (2015) Contribution of machine learning methods to the construction industry: Prediction of compressive strength. Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi 21(3):109–114
Bayes T (1997) LII. An essay towards solving a problem in the doctrine of chances. By the late Rev. Mr. Bayes, FRS communicated by Mr. Price, in a letter to John Canton, AMFR S. Philos Trans Royal Soc London 1763(53):370–418
Yildiz HK, Genctav M, Usta N, Diri B, Amasyali MF (2007) A new feature extraction method for text classification. In 2007 IEEE 15th Signal Processing and Communications Applications. Eskisehir, Turkey: IEEE.
Breiman L (2001) Random forests. Mach Learn 45(1):5–32
Gislason PO, Benediktsson JA, Sveinsson JR (2004) Random forest classification of multisource remote sensing and geographic data. In: IGARSS 2004. 2004 IEEE International Geoscience and Remote Sensing Symposium. Anchorage, AK, USA: IEEE.
Cinar I, Taspinar YS, Saritas MM, Koklu M (2020) Feature extraction and recognition on traffic sign images. J Selcuk-Technic 19(4):282–292
Cakir E, Kamal B (2020) İstanbul Boğazı’ndaki ticari gemi kazalarının karar ağacı yöntemiyle analizi. Aquatic Res 4(1):10–20
Arslanturk Collu D, Akgun L, Eyduran E (2020) Karar ağacı algoritmalarıyla finansal başarısızlık tahmini: Dokuma, giyim eşyası ve deri sektörü uygulaması. Uluslararası Ekonomi ve Yenilik Dergisi, 6(2): 225–246.
An G, Jiang Z, Cao X, Liang Y, Zhao Y, Li Z, Dong W, Sun H (2021) Short-term wind power prediction based on particle swarm optimization-extreme learning machine model combined with Adaboost algorithm. IEEE Access 9:94040–94052
Xia T, Zhuo P, Xiao L, Du S, Wang D, Xi L (2021) Multi-stage fault diagnosis framework for rolling bearing based on OHF Elman AdaBoost-Bagging algorithm. Neurocomputing 433:237–251
Suner A, Demirarslan M (2021) Sağlık Veri Setlerinde Öznitelik Seçiminin Sınıflandırma Performansına Etkisi: The effect of feature selection methods to classification performance in health datasets. Sağlık Bilimlerinde Yapay Zeka Dergisi (J Artific Intellig Health Sci ISSN: 2757–9646 1(1): 6–11
Cihan P, Kalipsiz O, Gokce E (2020) Yenidoğan kuzularda bilgisayar destekli tanı. Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi 26(2):385–391
Taspinar YS, Cinar I, Koklu M (2021) Prediction of computer type using benchmark scores of hardware units. Selcuk University J Eng Sci 20(1):11–17
Koklu M, Cinar I, Taspinar YS (2021) Classification of rice varieties with deep learning methods. Comput Electron Agric 187:106285
Cinar I, Koklu M (2022) Identification of rice varieties using machine learning algorithms. J Agric Sci 28(2):307–325
Funding
This project was supported by the Scientific Research Coordinator of Selcuk University with the project number 22111002. No funding was received for this study.
Author information
Authors and Affiliations
Contributions
All authors contributed to the design and study of the article. RB, literature research and preparation of the draft; YST, MK, MHC, analysis of data and result; IC, RK, arranged the materials, methods and data.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no conflict of interest. Resul Butuner declares that he has no confict of interest. Ilkay Cinar declares that he has no confict of interest, Yavuz Selim Taspinar declares that he has no confict of interest. Ramazan Kursun declares that he has no confict of interest. M. Hanefi Calp declares that he has no confict of interest, Murat Koklu declares that he has no confict of interest.
Consent for publication
Not applicable.
Compliance with ethics requirements
This study does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Butuner, R., Cinar, I., Taspinar, Y.S. et al. Classification of deep image features of lentil varieties with machine learning techniques. Eur Food Res Technol 249, 1303–1316 (2023). https://doi.org/10.1007/s00217-023-04214-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00217-023-04214-z