Abstract
The development of international trade has facilitated the global distribution of food. Ensuring the safety of food products is a crucial process that spans from production to sale. Mismanagement of this process can pose significant public health risks. The issue of food adulteration is increasingly prevalent, necessitating the development of fast and reliable methods for its detection. Deep learning, as an effective machine learning algorithm, has emerged as a new field in the food industry, offering rapid and accurate results in the identification of food adulteration. In this study, a digital image and deep learning-based method was developed to detect spinach adulteration in pistachios. A unique dataset with 6 classes was created in a laboratory environment for testing the method. The adulteration rates for each class were determined, and images were analyzed in various color spaces, including Red Green Blue (RGB), HSV (Hue Saturation Value), Y,u and v (YUV), and L, a, and b (LAB). Subsequently, Convolutional Neural Network (CNN) architectures, namely ResNet-50, VGGNet-19, and DenseNet201, were employed for classification. The accuracy of all color spaces and architectural combinations exceeded 90%. Notably, the VGGNet-19 architecture achieved a 100% success rate in classifying the LAB color space. Moreover, the YUV/ResNet-50 and HSV/VGGNet-19 combinations demonstrated over 98% success in detecting peanut adulteration. The utilization of deep learning-based architectures enables swift and effortless analysis of complex food samples, eliminating the challenges associated with analyzing large quantities of food and effectively preventing food adulteration.
Similar content being viewed by others
Data availability
The datasets generated during and analysed during the current study are available in the [Kaggle] repository, [https://www.kaggle.com/datasets/kazimkili/spinach-adulterated-pistachios].
References
Abbaszadeh M, Rahimifard A, Eftekhari M et al (2019) Deep Learning-Based Classification Of the Defective Pistachios Via Deep Autoencoder Neural Networks. arXiv preprint arXiv. https://doi.org/10.48550/arxiv.1906.11878
Abideen AZ, Pandiyan V, Sundram K et al (2021) Food Supply Chain Transformation through Technology and Future Research Directions–A Systematic Review. Logistics 5:83. https://doi.org/10.3390/LOGISTICS5040083
Ahmed MR, Yasmin J, Park E et al (2020) Classification of watermelon seeds using morphological patterns of x-ray imaging: A comparison of conventional machine learning and deep learning. Sensors (Switzerland) 20:1–15. https://doi.org/10.3390/s20236753
Al-Sarayreh M, Reis MM, Yan WQ, Klette R (2018) Detection of Red-Meat Adulteration by Deep Spectral-Spatial Features in Hyperspectral Images. J Imaging 4:63. https://doi.org/10.3390/JIMAGING4050063
Al-Tairi ZH, Rahmat RW, Iqbal Saripan M, Sulaiman PS (2014) Skin segmentation using YUV and RGB color spaces. J Inform Process Syst 10:283–299. https://doi.org/10.3745/JIPS.02.0002
Alzubi OA, Alzubi JA, Al-Zoubi AM et al (2022) An efficient malware detection approach with feature weighting based on Harris Hawks optimization. Cluster Comput 25:2369–2387. https://doi.org/10.1007/s10586-021-03459-1
Arlorio M, Coisson JD, Bordiga M et al (2009) Olive oil adulterated with hazelnut oils: simulation to identify possible risks to allergic consumers. 101080/02652030903225799 27:11–18. https://doi.org/10.1080/02652030903225799
Ayari F, Mirzaee- Ghaleh E, Rabbani H, Heidarbeigi K (2018) Using an E-nose machine for detection the adulteration of margarine in cow ghee. J Food Process Eng 41:e12806. https://doi.org/10.1111/JFPE.12806
Aykas DP, Menevseoglu A (2021) A rapid method to detect green pea and peanut adulteration in pistachio by using portable FT-MIR and FT-NIR spectroscopy combined with chemometrics. Food Control 121:107670. https://doi.org/10.1016/J.FOODCONT.2020.107670
Ayustaningwarno F, Fogliano V, Verkerk R, Dekker M (2021) Surface color distribution analysis by computer vision compared to sensory testing: Vacuum fried fruits as a case study. Food Res Int 143:110230. https://doi.org/10.1016/J.FOODRES.2021.110230
Bai G, Jenkins S, Yuan W et al (2018) Field-based scoring of soybean iron deficiency chlorosis using RGB imaging and statistical learning. Front Plant Sci 9:1002. https://doi.org/10.3389/fpls.2018.01002
Bakre SM, Gadmale DK, Toche RB, Gaikwad VB (2015) Rapid determination of alpha tocopherol in olive oil adulterated with sunflower oil by reversed phase high-performance liquid chromatography. J Food Sci Technol 52:3093–3098. https://doi.org/10.1007/S13197-014-1309-7/TABLES/1
Carvalho Polari Souto UT, Barbosa MF, Dantas HV et al (2015) Identification of adulteration in ground roasted coffees using UV–Vis spectroscopy and SPA-LDA. LWT Food Sci Technol 63:1037–1041. https://doi.org/10.1016/J.LWT.2015.04.003
Castro W, Oblitas J, De-La-Torre M et al (2019) Classification of Cape Gooseberry Fruit According to its Level of Ripeness Using Machine Learning Techniques and Different Color Spaces. IEEE Access 7:27389–27400. https://doi.org/10.1109/ACCESS.2019.2898223
Cavus F, Us MF, Guzelsoy NA (2018) Assesing Pistachio Nut (Pistacia vera L.) Adulteration with Green Pea (Pisum sativum L.) by Untargeted Liquid Chromatography-(quadrupole-time of flight)-Mass Spectrometry Method and Chemometrics. Gıda ve Yem Bilimi Teknolojisi Dergisi 19:34–41
Bandara WGC, Prabhath GWK, Dissanayake DWSCB, Herath VR, Godaliyadda GMRI, Ekanayake MPB, Madhujith T (2020) Validation of multispectral imaging for the detection of selected adulterants in turmeric samples. J Food Eng 266:109700. https://doi.org/10.1016/j.jfoodeng.2019.109700
de Lima TK, Musso M, Bertoldo Menezes D (2020) Using Raman spectroscopy and an exponential equation approach to detect adulteration of olive oil with rapeseed and corn oil. Food Chem 333:127454. https://doi.org/10.1016/J.FOODCHEM.2020.127454
Diez Y, Kentsch S, Fukuda M et al (2021) Deep Learning in Forestry Using UAV-Acquired RGB Data: A Practical Review. Remote Sensing 13:2837. https://doi.org/10.3390/RS13142837
Doğan C, Şehirli E, Doğan N, Buran İ (2023) Non-targeted approach to detect pistachio authenticity based on digital image processing and hybrid machine learning model. Food Measure 17:1693–1702. https://doi.org/10.1007/s11694-022-01671-0
Dreher ML (2012) Pistachio nuts: composition and potential health benefits. Nutr Rev 70:234–240. https://doi.org/10.1111/J.1753-4887.2011.00467.X
Ferreiro-González M, Espada-Bellido E, Guillén-Cueto L et al (2018) Rapid quantification of honey adulteration by visible-near infrared spectroscopy combined with chemometrics. Talanta 188:288–292. https://doi.org/10.1016/J.TALANTA.2018.05.095
Genis HE, Durna S, Boyaci IH (2021) Determination of green pea and spinach adulteration in pistachio nuts using NIR spectroscopy. LWT 136:110008. https://doi.org/10.1016/J.LWT.2020.110008
Ghiasi SA, Parastar H (2021) Chemometrics-assisted isotope ratio fingerprinting based on gas chromatography/combustion/isotope ratio mass spectrometry for saffron authentication. J Chromatography A 1657:462587. https://doi.org/10.1016/J.CHROMA.2021.462587
Goel N, Sehgal P (2015) Fuzzy classification of pre-harvest tomatoes for ripeness estimation – An approach based on automatic rule learning using decision tree. Appl Soft Comput 36:45–56. https://doi.org/10.1016/j.asoc.2015.07.009
Grace MH, Esposito D, Timmers MA et al (2016) Chemical composition, antioxidant and anti-inflammatory properties of pistachio hull extracts. Food Chem 210:85–95. https://doi.org/10.1016/J.FOODCHEM.2016.04.088
Green HS, Li X, De Pra M et al (2020) A rapid method for the detection of extra virgin olive oil adulteration using UHPLC-CAD profiling of triacylglycerols and PCA. Food Control 107:106773. https://doi.org/10.1016/J.FOODCONT.2019.106773
He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition. pp 770–778
Hong E, Lee SY, Jeong JY et al (2017) Modern analytical methods for the detection of food fraud and adulteration by food category. J Sci Food Agric 97:3877–3896. https://doi.org/10.1002/JSFA.8364
Horn B, Esslinger S, Pfister M et al (2018) Non-targeted detection of paprika adulteration using mid-infrared spectroscopy and one-class classification – Is it data preprocessing that makes the performance? Food Chem 257:112–119. https://doi.org/10.1016/J.FOODCHEM.2018.03.007
Huang M, He C, Zhu Q, Qin J (2016) Maize seed variety classification using the integration of spectral and image features combined with feature transformation based on hyperspectral imaging. Appl Sci (Switzerland) 6:183. https://doi.org/10.3390/app6060183
Huang G, Liu Z, Van Der Maaten L, Weinberger KQ (2017) Densely connected convolutional networks. In: Proceedings - 30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017. pp 2261–2269
Iymen G, Tanriver G, Hayirlioglu YZ, Ergen O (2020) Artificial intelligence-based identification of butter variations as a model study for detecting food adulteration. Innov Food Sci Emerg Technol 66:102527. https://doi.org/10.1016/J.IFSET.2020.102527
Izquierdo M, Lastra-Mejías M, González-Flores E et al (2020) Deep thermal imaging to compute the adulteration state of extra virgin olive oil. Comput Electron Agric 171:105290. https://doi.org/10.1016/j.compag.2020.105290
Kaltenbrunner M, Hochegger R, Cichna-Markl M (2018) Development and validation of a fallow deer (Dama dama)-specific TaqMan real-time PCR assay for the detection of food adulteration. Food Chem 243:82–90. https://doi.org/10.1016/J.FOODCHEM.2017.09.087
Kamruzzaman M, Barbin D, Elmasry G et al (2012) Potential of hyperspectral imaging and pattern recognition for categorization and authentication of red meat. Innov Food Sci Emerg Technol 16:316–325. https://doi.org/10.1016/J.IFSET.2012.07.007
Karuppuswami S, Kaur A, Arangali H, Chahal PP (2017) A Hybrid Magnetoelastic Wireless Sensor for Detection of Food Adulteration. IEEE Sens J 17:1706–1714. https://doi.org/10.1109/JSEN.2017.2656476
Kaur S (2021) A decade of impact of monetary policy on food inflation: An overview and future direction. Vision 0972262921. https://doi.org/10.1177/09722629211015603
Kavi Niranjana K, Professor A, Kalpana Devi M (2015) RGB to Lab Transformation Using Image Segmentation. Int J Adv Res 3:8–16
Kotha RR, Tareq FS, Byrdwell C, Luthria DL (2021) Rapid and Sensitive Analytical Assessment of Curcuminoids and Three Common Turmeric Adulterants in a Single Run Using Liquid Chromatography and Tandem Mass Spectrometry. ACS Food Sci Techno 1:2174–2181. https://doi.org/10.1021/ACSFOODSCITECH.1C00356
Küçüköner E, Yurt B (2003) Some chemical characteristics of Pistacia vera varieties produced in Turkey. Eur Food Res Technol 217:308–310. https://doi.org/10.1007/S00217-003-0763-7/TABLES/3
Ladha-Sabur A, Bakalis S, Fryer PJ, Lopez-Quiroga E (2019) Mapping energy consumption in food manufacturing. Trends Food Sci Technol 86:270–280. https://doi.org/10.1016/J.TIFS.2019.02.034
Lai J, Zhu H, Ling X (2019) Segmentation of Brain MR Images by Using Fully Convolutional Network and Gaussian Mixture Model with Spatial Constraints. Math Probl Eng 2019. https://doi.org/10.1155/2019/4625371
Manning L, Soon JM (2016) Food Safety, Food Fraud, and Food Defense: A Fast Evolving Literature. J Food Sci 81:R823–R834. https://doi.org/10.1111/1750-3841.13256
Moore JC, Spink J, Lipp M (2012) Development and Application of a Database of Food Ingredient Fraud and Economically Motivated Adulteration from 1980 to 2010. J Food Sci 77:R118–R126. https://doi.org/10.1111/J.1750-3841.2012.02657.X
Moreira G, Magalhães SA, Pinho T et al (2022) (2022) Benchmark of Deep Learning and a Proposed HSV Colour Space Models for the Detection and Classification of Greenhouse Tomato. Agronomy 12:356. https://doi.org/10.3390/AGRONOMY12020356
Movassagh AA, Alzubi JA, Gheisari M et al (2021) Artificial neural networks training algorithm integrating invasive weed optimization with differential evolutionary model. J Ambient Intell Human Comput. https://doi.org/10.1007/s12652-020-02623-6
Pustjens AM, Weesepoel Y, van Ruth SM (2016) Food Fraud and Authenticity: Emerging Issues and Future Trends. Innovation and Future Trends in Food Manufacturing and Supply Chain Technologies 3–20. https://doi.org/10.1016/B978-1-78242-447-5.00001-0
Qiana G, Guoa X, Guob J, Wub J (2011) China’s dairy crisis: impacts, causes and policy implications for a sustainable dairy industry. Int J Sust Dev World 18:434–441. https://doi.org/10.1080/13504509.2011.581710
Rajković D, Jeromela AM, Pezo L et al (2022) Yield and Quality Prediction of Winter Rapeseed—Artificial Neural Network and Random Forest Models. Agronomy 12:58. https://doi.org/10.3390/agronomy12010058
Ribeiro SS (2016) Classification of Grain Based On the Morphology, Color and Texture Information Extracted From Digital Images. Int J Comput Appl Eng Technol 5:359–366
Robert Singh K, Chaudhury S (2020) A cascade network for the classification of rice grain based on single rice kernel. Complex Intell Syst 6:321–334. https://doi.org/10.1007/s40747-020-00132-9
Satil F, Azcan N, Baser KHC (2003) Fatty Acid Composition of Pistachio Nuts in Turkey. Chem Nat Compd 39(4):322–324. https://doi.org/10.1023/B:CONC.0000003408.63300.B5
Sezer B, Apaydin H, Bilge G, Boyaci IH (2019) Detection of Pistacia vera adulteration by using laser induced breakdown spectroscopy. J Sci Food Agric 99:2236–2242. https://doi.org/10.1002/JSFA.9418
Shahbandeh M (2021) Pistachios: global production 2007–2021 | Statista
Sharif MI, Khan MA, Alhussein M et al (2021) A decision support system for multimodal brain tumor classification using deep learning. Complex Intell Syst 1:1–14. https://doi.org/10.1007/s40747-021-00321-0
Silva AFS, Rocha FRP (2020) A novel approach to detect milk adulteration based on the determination of protein content by smartphone-based digital image colorimetry. Food Control 115:107299. https://doi.org/10.1016/J.FOODCONT.2020.107299
Song K, Wang SH, Yang D, Shi TY (2021) Combination of spectral and image information from hyperspectral imaging for the prediction and visualization of the total volatile basic nitrogen content in cooked beef. J Food Meas Charact 15:4006–4020. https://doi.org/10.1007/S11694-021-00983-X/FIGURES/9
Suman M, Cavanna D, Sammarco G et al (2021) Fighting food frauds exploiting chromatography-mass spectrometry technologies: Scenario comparison between solutions in scientific literature and real approaches in place in industrial facilities. TrAC Trends Anal Chem 142:116305. https://doi.org/10.1016/J.TRAC.2021.116305
Tamatjita EN, Sihite RD (2022) Banana Ripeness Classification using HSV Colour Space and Nearest Centroid Classifier. Inform Eng Express 8:1. https://doi.org/10.52731/iee.v8.i1.687
Taylan O, Cebi N, Yilmaz MT et al (2021) Rapid detection of green-pea adulteration in pistachio nuts using Raman spectroscopy and chemometrics. J Sci Food Agric 101:1699–1708. https://doi.org/10.1002/JSFA.10845
Tian L, Zeng Y, Zheng X et al (2019) Detection of Peanut Oil Adulteration Mixed with Rapeseed Oil Using Gas Chromatography and Gas Chromatography-Ion Mobility Spectrometry. Food Anal Methods 12:2282–2292. https://doi.org/10.1007/S12161-019-01571-Y/FIGURES/7
Tomaino A, Martorana M, Arcoraci T et al (2010) Antioxidant activity and phenolic profile of pistachio (Pistacia vera L., variety Bronte) seeds and skins. Biochimie 92:1115–1122. https://doi.org/10.1016/J.BIOCHI.2010.03.027
Vidyarthi SK, Singh SK, Tiwari R et al (2020) Classification of first quality fancy cashew kernels using four deep convolutional neural network models. J Food Process Eng 43:e13552. https://doi.org/10.1111/jfpe.13552
Wang J, Chen T (2016) The spread model of food safety risk under the supply-demand disturbance. Springerplus 5:1–12. https://doi.org/10.1186/S40064-016-2881-2/FIGURES/4
Xiao M, Chen Y, Chu H, Yin R (2020) Development of a polymerase chain reaction - Nucleic acid sensor assay for the rapid detection of chicken adulteration. LWT 131:109679. https://doi.org/10.1016/J.LWT.2020.109679
Yam KL, Papadakis SE (2004) A simple digital imaging method for measuring and analyzing color of food surfaces. J Food Eng 61:137–142. https://doi.org/10.1016/S0260-8774(03)00195-X
Zhang X, Yang J, Lin T, Ying Y (2021) Food and agro-product quality evaluation based on spectroscopy and deep learning: A review. Trends Food Sci Technol 112:431–441. https://doi.org/10.1016/j.tifs.2021.04.008
Zhou L, Zhang C, Liu F et al (2019) Application of Deep Learning in Food: A Review. Compr Rev Food Sci Food Saf 18:1793–1811. https://doi.org/10.1111/1541-4337.12492
Zhu W, Wang X, Chen L (2017) Rapid detection of peanut oil adulteration using low-field nuclear magnetic resonance and chemometrics. Food Chem 216:268–274. https://doi.org/10.1016/J.FOODCHEM.2016.08.051
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Ethical guidelines
Ethics approval was not required for this research.
Conflict of interest
All authors declared they have no conflict of interest.
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
Çinarer, G., Doğan, N., Kılıç, K. et al. Rapid detection of adulteration in pistachio based on deep learning methodologies and affordable system. Multimed Tools Appl 83, 14797–14820 (2024). https://doi.org/10.1007/s11042-023-16172-5
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-023-16172-5