[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-121177-en":3,"doc-seo-121177-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},121177,687197207639,"Asher","https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd",8,"Research & Report","Measuring the Level of Aflatoxin Infection in Pistachio Nuts by Applying Machine Learning Techniques to Hyperspectral Images","This paper investigates using machine learning on hyperspectral images of pistachios to detect and classify aflatoxin contamination levels. Aflatoxins are toxic mycotoxins produced by moulds and they threaten consumer health, while existing testing approaches are invasive and generate food waste. The study evaluates non-invasive hyperspectral imaging combined with models such as dimensionality reduction with K-Means, residual networks (ResNets), variational autoencoders (VAEs), and deep convolutional GANs (DCGANs). Experiments on 300 images from three contamination ranges identify key wavelengths and report accuracies up to 96.67%, supporting improved pistachio quality control and food safety.","Citation:  \nWilliams, L and Shukla, S and Sheikh-Akbari, A and Mahroughi, S and Mporas, I (2025) Measuring the Level of Aflatoxin Infection in Pistachio Nuts by Applying Machine Learning Techniques to Hyperspectral Images. Sensors, 25 (5). pp. 1-37. ISSN 1424-2818 DOI: [https://doi.org/10.3390/s25051548](https://doi.org/10.3390/s25051548)  \nLink to Leeds Beckett Repository record:  \n[https://eprints.leedsbeckett.ac.uk/id/eprint/11854/](https://eprints.leedsbeckett.ac.uk/id/eprint/11854/)  \nDocument Version:  \nArticle (Published Version)  \nCreative Commons: Attribution 4.0 © 2025 by the authors  \nThe aim of the Leeds Beckett Repository is to provide open access to our research, as required by funder policies and permitted by publishers and copyright law.  \nThe Leeds Beckett repository holds a wide range of publications, each of which has been checked for copyright and the relevant embargo period has been applied by the Research Services team.  \nWe operate on a standard take-down policy. If you are the author or publisher of an output and you would like it removed from the repository, please contact us and we will investigate on a case-by-case basis.  \nEach thesis in the repository has been cleared where necessary by the author for third party copyright. If you would like a thesis to be removed from the repository or believe there is an issue with copyright, please contact us on [openaccess@leedsbeckett.ac.uk](openaccess@leedsbeckett.ac.uk) and we will investigate on a case-by-case basis.  \nArticle  \nMeasuring the Level of Aflatoxin Infection in Pistachio Nuts by Applying Machine Learning Techniques to Hyperspectral Images  \nLizzie Williams 1, Pancham Shukla 1, Akbar Sheikh-Akbari 2, *, Sina Mahroughi 2 and Iosif Mporas 3  \nAcademic Editor: Subrata Chakraborty  \nReceived: 24 November 2024  \nRevised: 19 February 2025  \nAccepted: 27 February 2025  \nPublished: 2 March 2025  \nCitation: Williams, L.; Shukla, P.; Sheikh-Akbari, A.; Mahroughi, S; Mporas, I. Measuring the Level of Aflatoxin Infection in Pistachio Nuts by Applying Machine Learning Techniques to Hyperspectral Images. Sensors 2025, 25, 1548. [https://](https://)[ ](https://)[doi.org/10.3390/s25051548](doi.org/10.3390/s25051548)  \n[Copyright:](Copyright:) © 2025 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 ([https://creativecommons.org/](https://creativecommons.org/)[ ](https://creativecommons.org/)[licenses/by/4.0/](licenses/by/4.0/)) .  \n1 Department of Computing, Imperial College London, London SW7 2AZ, UK;  \n[lizzies.williams02@gmail.com](lizzies.williams02@gmail.com) (L.W.); [panchamkumar.shukla@imperial.ac.uk](panchamkumar.shukla@imperial.ac.uk) (P.S.)  \n2 School of Built Environment, Engineering and Computing, Leeds Beckett University, Leeds LS6 3QS, UK; [s.mahroughi@leedsbeckett.ac.uk](s.mahroughi@leedsbeckett.ac.uk)  \n3 Department of Engineering and Technology, School of Physics, Engineering & Computer Science, University of Hertfordshire, Hatfield AL10 9AB, UK; i.mporas@herts.ac.uk  \n* Correspondence: [a.sheikh-akbari@leedsbeckett.ac.uk](a.sheikh-akbari@leedsbeckett.ac.uk); Tel.: +44-(0)1138121767  \nAbstract: This paper investigates the use of machine learning techniques on hyperspectral images of pistachios to detect and classify different levels of aflatoxin contamination. Aflatoxins are toxic compounds produced by moulds, posing health risks to consumers. Current detection methods are invasive and contribute to food waste. This paper explores the feasibility of a non-invasive method using hyperspectral imaging and machine learning to classify aflatoxin levels accurately, potentially reducing waste and enhancing food safety. Hyperspectral imaging with machine learning has shown promise in food quality control. The paper evaluates models including Dimensionality Reduction with K-Means Clustering, Residual Networks (ResNets), ","cbCaivUl8McDJuNL","https://ap.wps.com/l/cbCaivUl8McDJuNL","pdf",35065352,1,38,"English","en",105,"# Introduction\n## Background and health risk\n## Regulations for aflatoxin levels\n## Motivation: reducing waste with non-invasive testing\n# Methods\n## Hyperspectral imaging pipeline\n## Data and contamination levels\n## Model set: K-Means, ResNets, VAEs, DCGANs\n## Feature/wavelength identification\n# Results and Evaluation\n## Dimensionality reduction performance\n## ResNet performance by key wavelength\n## Impact of dataset size on generative models\n# Conclusion and Future Work\n## Potential for quality control\n## Expanding datasets and refining models","[{\"question\":\"What problem does the paper address regarding pistachios?\",\"answer\":\"The paper targets detecting and classifying different levels of aflatoxin contamination in pistachios, which are harmful toxins produced by moulds.\"},{\"question\":\"Why are hyperspectral imaging and machine learning used together?\",\"answer\":\"The approach aims to provide a non-invasive alternative to current invasive detection methods, using hyperspectral imaging features and machine learning models to classify contamination levels accurately.\"},{\"question\":\"Which models and key performance results are reported?\",\"answer\":\"The study evaluates K-Means-based dimensionality reduction, ResNets, VAEs, and DCGANs. Dimensionality reduction with K-Means reaches 84.38% accuracy, while a ResNet model using the 866.21 nm wavelength achieves 96.67%.\"}]","Measuring the Level of Aflatoxin Infection in Pistachio Nuts by Applying Machine Learning Techniques to Hyperspectral Images | PDF",1785734220,96,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"measuring-the-level-of-aflatoxin-infection-in-pistachio-nuts-by-applying-machine-learning-techniques-to-hyperspectral-images","",{"@graph":36,"@context":85},[37,54,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/measuring-the-level-of-aflatoxin-infection-in-pistachio-nuts-by-applying-machine-learning-techniques-to-hyperspectral-images/121177/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-03",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does the paper address regarding pistachios?","Question",{"text":75,"@type":76},"The paper targets detecting and classifying different levels of aflatoxin contamination in pistachios, which are harmful toxins produced by moulds.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Why are hyperspectral imaging and machine learning used together?",{"text":80,"@type":76},"The approach aims to provide a non-invasive alternative to current invasive detection methods, using hyperspectral imaging features and machine learning models to classify contamination levels accurately.",{"name":82,"@type":73,"acceptedAnswer":83},"Which models and key performance results are reported?",{"text":84,"@type":76},"The study evaluates K-Means-based dimensionality reduction, ResNets, VAEs, and DCGANs. Dimensionality reduction with K-Means reaches 84.38% accuracy, while a ResNet model using the 866.21 nm wavelength achieves 96.67%.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]