Skip to main content
Log in

Classification of deep image features of lentil varieties with machine learning techniques

  • Original Paper
  • Published:
European Food Research and Technology Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Data availability

The dataset used in the study can be accessed from corresponding author.

References

  1. 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

    Chapter  Google Scholar 

  2. Samaranayaka A (2017) Lentil: revival of poor man’s meat. Sustainable protein sources. Elsevier, pp 185–196

    Chapter  Google Scholar 

  3. Kaale LD, Siddiq M, Hooper S (2022) Lentil (Lens culinaris Medik) as nutrient‐rich and versatile food legume: areview. Legume Science e169

  4. Vandenberg A, Slinkard A (1990) Genetics of seed coat color and pattern in lentil. J Hered 81(6):484–488

    Article  Google Scholar 

  5. 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

  6. 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

  7. 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

    Article  Google Scholar 

  8. 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

    Article  CAS  Google Scholar 

  9. Chaugule A (2021) Survey of Seed Classification techniques. Turkish J Computer Mathem Educ (TURCOMAT) 12(13):1236–1260

    Google Scholar 

  10. 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

  11. 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

    Article  Google Scholar 

  12. LeMasurier L, Panozzo J, Walker C (2014) A digital image analysis method for assessment of lentil size traits. J Food Eng 128:72–78

    Article  Google Scholar 

  13. Zhao L, Haque S, Wang R (2022) Automated seed identification with computer vision: challenges and opportunities. Seed Sci Technol 50(2):75–102

    Article  Google Scholar 

  14. 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

  15. Shahin M, Symons S (2001) A machine vision system for grading lentils. Canadian Biosyst Eng 43:7.7-7.14

    Google Scholar 

  16. Shahin M, Symons S (2003) Lentil type identification using machine vision. Canadian Biosyst Eng 45:3.5-3.5

    Google Scholar 

  17. 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

    Article  Google Scholar 

  18. 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

    Article  Google Scholar 

  19. 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

    Article  CAS  Google Scholar 

  20. 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

    Article  Google Scholar 

  21. 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

    Article  Google Scholar 

  22. 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

  23. Ozyurt F (2020) Efficient deep feature selection for remote sensing image recognition with fused deep learning architectures. J Supercomput 76(11):8413–8431

    Article  Google Scholar 

  24. 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

  25. 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

    Article  Google Scholar 

  26. 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

  27. 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

    Article  PubMed  Google Scholar 

  28. 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

  29. Mateen M, Wen J, Song S, Huang Z (2018) Fundus image classification using VGG-19 architecture with PCA and SVD. Symmetry 11(1):1

    Article  Google Scholar 

  30. 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

    Google Scholar 

  31. 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

    Article  Google Scholar 

  32. Calp MH, Kose U (2020) Estimation of burned areas in forest fires using artificial neural networks. Ingeniería Solidaria 16(3):1–22

    Article  Google Scholar 

  33. Calp MH (2017) Yazılım projeleri için yapay zeka tabanlı risk yönetimi, in Institute of Informatics. Gazi University, Ankara

    Google Scholar 

  34. 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

    Google Scholar 

  35. 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

    Google Scholar 

  36. 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.

  37. Breiman L (2001) Random forests. Mach Learn 45(1):5–32

    Article  Google Scholar 

  38. 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.

  39. Cinar I, Taspinar YS, Saritas MM, Koklu M (2020) Feature extraction and recognition on traffic sign images. J Selcuk-Technic 19(4):282–292

    Google Scholar 

  40. 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

    Google Scholar 

  41. 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.

  42. 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

    Article  Google Scholar 

  43. 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

    Article  Google Scholar 

  44. 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

  45. Cihan P, Kalipsiz O, Gokce E (2020) Yenidoğan kuzularda bilgisayar destekli tanı. Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi 26(2):385–391

    Google Scholar 

  46. 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

    Google Scholar 

  47. Koklu M, Cinar I, Taspinar YS (2021) Classification of rice varieties with deep learning methods. Comput Electron Agric 187:106285

    Article  Google Scholar 

  48. Cinar I, Koklu M (2022) Identification of rice varieties using machine learning algorithms. J Agric Sci 28(2):307–325

    Google Scholar 

Download references

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

Authors

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

Correspondence to Murat Koklu.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00217-023-04214-z

Keywords

Navigation