RESUMO
Melamine and its derivative, cyanuric acid, are occasionally added to pet meals because of their nitrogen-rich qualities, leading to the development of several health-related issues. A nondestructive sensing technique that offers effective detection must be developed to address this problem. In conjunction with machine learning and deep learning technique, Fourier transform infrared (FT-IR) spectroscopy was employed in this investigation for the nondestructive quantitative measurement of eight different concentrations of melamine and cyanuric acid added to pet food. The effectiveness of the one-dimensional convolutional neural network (1D CNN) technique was compared with that of partial least squares regression (PLSR), principal component regression (PCR), and a net analyte signal (NAS)-based methodology, called hybrid linear analysis (HLA/GO). The 1D CNN model developed for the FT-IR spectra attained correlation coefficients of 0.995 and 0.994 and root mean square error of prediction values of 0.090% and 0.110% for the prediction datasets on the melamine- and cyanuric acid-contaminated pet food samples, respectively, which were superior to those of the PLSR and PCR models. Therefore, when FT-IR spectroscopy is employed in conjunction with a 1D CNN model, it serves as a potentially rapid and nondestructive method for identifying toxic chemicals added to pet food.
Assuntos
Aprendizado Profundo , Espectroscopia de Infravermelho com Transformada de Fourier , Contaminação de Alimentos/análiseRESUMO
Seafood mislabeling rates of approximately 20% have been reported globally. Traditional methods for fish species identification, such as DNA analysis and polymerase chain reaction (PCR), are expensive and time-consuming, and require skilled technicians and specialized equipment. The combination of spectroscopy and machine learning presents a promising approach to overcome these challenges. In our study, we took a comprehensive approach by considering a total of 43 different fish species and employing three modes of spectroscopy: fluorescence (Fluor), and reflectance in the visible near-infrared (VNIR) and short-wave near-infrared (SWIR). To achieve higher accuracies, we developed a novel machine-learning framework, where groups of similar fish types were identified and specialized classifiers were trained for each group. The incorporation of global (single artificial intelligence for all species) and dispute classification models created a hierarchical decision process, yielding higher performances. For Fluor, VNIR, and SWIR, accuracies increased from 80%, 75%, and 49% to 83%, 81%, and 58%, respectively. Furthermore, certain species witnessed remarkable performance enhancements of up to 40% in single-mode identification. The fusion of all three spectroscopic modes further boosted the performance of the best single mode, averaged over all species, by 9%. Fish species mislabeling not only poses health-related risks due to contaminants, toxins, and allergens that could be life-threatening, but also gives rise to economic and environmental hazards and loss of nutritional benefits. Our proposed method can detect fish fraud as a real-time alternative to DNA barcoding and other standard methods. The hierarchical system of dispute models proposed in this work is a novel machine-learning tool not limited to this application, and can improve accuracy in any classification problem which contains a large number of classes.
Assuntos
Inteligência Artificial , Dissidências e Disputas , Animais , Aprendizado de Máquina , Análise Espectral , PeixesRESUMO
This study is directed towards developing a fast, non-destructive, and easy-to-use handheld multimode spectroscopic system for fish quality assessment. We apply data fusion of visible near infra-red (VIS-NIR) and short wave infra-red (SWIR) reflectance and fluorescence (FL) spectroscopy data features to classify fish from fresh to spoiled condition. Farmed Atlantic and wild coho and chinook salmon and sablefish fillets were measured. Three hundred measurement points on each of four fillets were taken every two days over 14 days for a total of 8400 measurements for each spectral mode. Multiple machine learning techniques including principal component analysis, self-organized maps, linear and quadratic discriminant analyses, k-nearest neighbors, random forest, support vector machine, and linear regression, as well as ensemble and majority voting methods, were used to explore spectroscopy data measured on fillets and to train classification models to predict freshness. Our results show that multi-mode spectroscopy achieves 95% accuracy, improving the accuracies of the FL, VIS-NIR and SWIR single-mode spectroscopies by 26, 10 and 9%, respectively. We conclude that multi-mode spectroscopy and data fusion analysis has the potential to accurately assess freshness and predict shelf life for fish fillets and recommend this study be expanded to a larger number of species in the future.
Assuntos
Inteligência Artificial , Peixes , Animais , Espectrometria de Fluorescência/métodosRESUMO
Strawberry (Fragaria × ananassa Duch) plants are vulnerable to climatic change. The strawberry plants suffer from heat and water stress eventually, and the effects are reflected in the development and yields. In this investigation, potential chlorophyll-fluorescence-based indices were selected to detect the early heat and water stress in strawberry plants. The hyperspectral images were used to capture the fluorescence reflectance in the range of 500 nm-900 nm. From the hyperspectral cube, the region of interest (leaves) was identified, followed by the extraction of eight chlorophyll-fluorescence indices from the region of interest (leaves). These eight chlorophyll-fluorescence indices were analyzed deeply to identify the best indicators for our objective. The indices were used to develop machine-learning models to assess the performance of the indicators by accuracy assessment. The overall procedure is proposed as a new workflow for determining strawberry plants' early heat and water stress. The proposed workflow suggests that by including all eight indices, the random-forest classifier performs well, with an accuracy of 94%. With this combination of the potential indices, namely the red-edge vegetation stress index (RVSI), chlorophyll B (Chl-b), pigment-specific simple ratio for chlorophyll B (PSSRb), and the red-edge chlorophyll index (CIREDEDGE), the gradient-boosting classifier performs well, with an accuracy of 91%. The proposed workflow works well with a limited number of training samples which is an added advantage.
Assuntos
Desidratação , Fragaria , Temperatura Alta , Fluorescência , ClorofilaRESUMO
Ensuring the quality of fresh-cut vegetables is the greatest challenge for the food industry and is equally as important to consumers (and their health). Several investigations have proven the necessity of advanced technology for detecting foreign materials (FMs) in fresh-cut vegetables. In this study, the possibility of using near infrared spectral analysis as a potential technique was investigated to identify various types of FMs in seven common fresh-cut vegetables by selecting important wavebands. Various waveband selection methods, such as the weighted regression coefficient (WRC), variable importance in projection (VIP), sequential feature selection (SFS), successive projection algorithm (SPA), and interval PLS (iPLS), were used to investigate the optimal multispectral wavebands to classify the FMs and vegetables. The application of selected wavebands was further tested using NIR imaging, and the results showed good potentiality by identifying 99 out of 107 FMs. The results indicate the high applicability of the multispectral NIR imaging technique to detect FMs in fresh-cut vegetables for industrial application.
Assuntos
Espectroscopia de Luz Próxima ao Infravermelho , Verduras , Algoritmos , Análise dos Mínimos Quadrados , Espectroscopia de Luz Próxima ao Infravermelho/métodosRESUMO
Plant phenomics has been rapidly advancing over the past few years. This advancement is attributed to the increased innovation and availability of new technologies which can enable the high-throughput phenotyping of complex plant traits. The application of artificial intelligence in various domains of science has also grown exponentially in recent years. Notably, the computer vision, machine learning, and deep learning aspects of artificial intelligence have been successfully integrated into non-invasive imaging techniques. This integration is gradually improving the efficiency of data collection and analysis through the application of machine and deep learning for robust image analysis. In addition, artificial intelligence has fostered the development of software and tools applied in field phenotyping for data collection and management. These include open-source devices and tools which are enabling community driven research and data-sharing, thereby availing the large amounts of data required for the accurate study of phenotypes. This paper reviews more than one hundred current state-of-the-art papers concerning AI-applied plant phenotyping published between 2010 and 2020. It provides an overview of current phenotyping technologies and the ongoing integration of artificial intelligence into plant phenotyping. Lastly, the limitations of the current approaches/methods and future directions are discussed.
Assuntos
Inteligência Artificial , Fenômica , Aprendizado de Máquina , Fenótipo , SoftwareRESUMO
Panax ginseng has been used as a traditional medicine to strengthen human health for centuries. Over the last decade, significant agronomical progress has been made in the development of elite ginseng cultivars, increasing their production and quality. However, as one of the significant environmental factors, heat stress remains a challenge and poses a significant threat to ginseng plants' growth and sustainable production. This study was conducted to investigate the phenotype of ginseng leaves under heat stress using hyperspectral imaging (HSI). A visible/near-infrared (Vis/NIR) and short-wave infrared (SWIR) HSI system were used to acquire hyperspectral images for normal and heat stress-exposed plants, showing their susceptibility (Chunpoong) and resistibility (Sunmyoung and Sunil). The acquired hyperspectral images were analyzed using the partial least squares-discriminant analysis (PLS-DA) technique, combining the variable importance in projection and successive projection algorithm methods. The correlation of each group was verified using linear discriminant analysis. The developed models showed 12 bands over 79.2% accuracy in Vis/NIR and 18 bands with over 98.9% accuracy at SWIR in validation data. The constructed beta-coefficient allowed the observation of the key wavebands and peaks linked to the chlorophyll, nitrogen, fatty acid, sugar and protein content regions, which differentiated normal and stressed plants. This result shows that the HSI with the PLS-DA technique significantly differentiated between the heat-stressed susceptibility and resistibility of ginseng plants with high accuracy.
Assuntos
Panax , Análise Discriminante , Resposta ao Choque Térmico , Humanos , Análise dos Mínimos Quadrados , Espectroscopia de Luz Próxima ao InfravermelhoRESUMO
Contamination inspection is an ongoing concern for food distributors, restaurant owners, caterers, and others who handle food. Food contamination must be prevented, and zero tolerance legal requirements and damage to the reputation of institutions or restaurants can be very costly. This paper introduces a new handheld fluorescence-based imaging system that can rapidly detect, disinfect, and document invisible organic residues and biofilms which may host pathogens. The contamination, sanitization inspection, and disinfection (CSI-D) system uses light at two fluorescence excitation wavelengths, ultraviolet C (UVC) at 275 nm and violet at 405 nm, for the detection of organic residues, including saliva and respiratory droplets. The 275 nm light is also utilized to disinfect pathogens commonly found within the contaminated residues. Efficacy testing of the neutralizing effects of the ultraviolet light was conducted for Aspergillus fumigatus, Streptococcus pneumoniae, and the influenza A virus (a fungus, a bacterium, and a virus, respectively, each commonly found in saliva and respiratory droplets). After the exposure to UVC light from the CSI-D, all three pathogens experienced deactivation (> 99.99%) in under ten seconds. Up to five-log reductions have also been shown within 10 s of UVC irradiation from the CSI-D system.
Assuntos
Desinfecção , Raios Ultravioleta , Biofilmes , Fungos , Imagem ÓpticaRESUMO
The grading of ginseng (Panax ginseng) including the evaluation of internal quality attributes is essential in the ginseng industry for quality control. Assessment for inner whitening, a major internal disorder, must be conducted when identifying high quality ginseng. Conventional methods for detecting inner whitening in ginseng root samples use manual inspection, which is time-consuming and inaccurate. This study develops an internal quality measurement technique using near-infrared transmittance spectral imaging to evaluate inner whitening in ginseng samples. Principle component analysis (PCA) was used on ginseng hypercube data to evaluate the developed technique. The transmittance spectra and spectral images of ginseng samples exhibiting inner whitening showed weak intensity characteristics compared to normal ginseng in the region of 900-1050 nm and 1150-1400 nm respectively, owing to the presence of whitish internal tissues that have higher optical density. On the basis of the multivariate analysis method, even a simple waveband ratio image has the great potential to quickly detect inner whitening in ginseng samples, since these ratio images show a significant difference between whitened and non-whitened regions. Therefore, it is possible to develop an efficient and rapid spectral imaging system for the real-time detection of inner whitening in ginseng using minimal spectral wavebands. This novel strategy for the rapid, cost-effective, non-destructive detection of ginseng's inner quality can be a key component for the automation of ginseng grading.
Assuntos
Técnicas Biossensoriais , Imagem Molecular , Panax/química , Doenças das Plantas/genética , Humanos , Análise Multivariada , Panax/genética , Panax/ultraestrutura , Análise de Componente Principal , Controle de Qualidade , República da Coreia , Espectroscopia de Luz Próxima ao InfravermelhoRESUMO
Rapid and reliable inspection of food is essential to ensure food safety, particularly in mass production and processing environments. Many studies have focused on spectral imaging for poultry inspection; however, no research has explored the use of multispectral fluorescence imaging (MFI) for on-line poultry inspection. In this study, the feasibility of MFI for on-line detection of fecal matter from the ceca, colon, duodenum, and small intestine of poultry carcasses was investigated for the first time. A multispectral line-scan fluorescence imaging system was integrated with a commercial poultry conveying system, and the images of chicken carcasses with fecal contaminants were scanned at processing line speeds of one, three, and five birds per second. To develop an optimal detection and classification algorithm to distinguish upper and lower feces-contaminated parts from skin, the principal component analysis (PCA) and partial least square discriminant analysis (PLS-DA) were first performed using the spectral data of the selected regions, and then applied in spatial domain to visualize the feces-contaminated area based on binary images. Our results demonstrated that for the spectral data analysis, both the PCA and PLS-DA can distinguish the high and low feces-contaminated area from normal skin; however, the PCA analysis based on selected band ratio images (F630 nm/F600 nm) exhibited better visualization and discrimination of feces-contaminated area, compared with the PLS-DA-based developed chemical images. A color image analysis using histogram equalization, sharpening, median filter, and threshold value (1) demonstrated 78% accuracy. Thus, the MFI system can be developed utilizing the two band ratios for on-line implementation for the effective detection of fecal contamination on chicken carcasses.
Assuntos
Fezes/química , Contaminação de Alimentos/análise , Imagem Óptica/métodos , Algoritmos , Animais , Galinhas , Análise Discriminante , Carne/análise , Análise de Componente PrincipalRESUMO
Viability is an important quality factor influencing seed germination and crop yield. Current seed-viability testing methods rely on conventional manual inspections, which use destructive, labor-intensive and time-consuming measurements. The aim of this study is to distinguish between viable and nonviable soybean seeds, using a near-infrared (NIR) hyperspectral imaging (HSI) technique in a rapid and nondestructive manner. The data extracted from the NIRâ»HSI of viable and nonviable soybean seeds were analyzed using a partial least-squares discrimination analysis (PLS-DA) technique for classifying the viable and nonviable soybean seeds. Variable importance in projection (VIP) was used as a waveband selection method to develop a multispectral imaging model. Initially, the spectral profile of each pixel in the soybean seed images was subjected to PLS-DA analysis, which yielded a reasonable classification accuracy; however, the pixel-based classification method was not successful for high accuracy detection for nonviable seeds. Another viability detection method was then investigated: a kernel image threshold method with an optimum-detection-rate strategy. The kernel-based classification of seeds showed over 95% accuracy even when using only seven optimal wavebands selected through VIP. The results show that the proposed multispectral NIR imaging method is an effective and accurate nondestructive technique for the discrimination of soybean seed viability.
RESUMO
A multi-spectral fluorescence imaging technique was used to detect defective cherry tomatoes. The fluorescence excitation and emission matrix was used to measure for defects, sound surface and stem areas to determine the optimal fluorescence excitation and emission wavelengths for discrimination. Two-way ANOVA revealed the optimal excitation wavelength for detecting defect areas was 410 nm. Principal component analysis (PCA) was applied to the fluorescence emission spectra of all regions at 410 nm excitation to determine the emission wavelengths for defect detection. The major emission wavelengths were 688 nm and 506 nm for the detection. Fluorescence images combined with the determined emission wavebands demonstrated the feasibility of detecting defective cherry tomatoes with >98% accuracy. Multi-spectral fluorescence imaging has potential utility in non-destructive quality sorting of cherry tomatoes.
Assuntos
Análise de Alimentos/métodos , Frutas/anatomia & histologia , Frutas/classificação , Microscopia de Fluorescência/métodos , Solanum lycopersicum/anatomia & histologia , Solanum lycopersicum/classificação , Espectrometria de Fluorescência/métodos , Algoritmos , Interpretação de Imagem Assistida por Computador/métodos , República da CoreiaRESUMO
Fresh-cut vegetables are a food product susceptible to contamination by foreign materials (FMs). To detect a range of potential FMs in fresh-cut vegetables, a dual imaging technique (fluorescence and color imaging) with a simple and effective image processing algorithm in a user-friendly software interface was developed for a real-time inspection system. The inspection system consisted of feeding and sensing units, including two cameras positioned in parallel, illuminations (white LED and UV light), and a conveyor unit. A camera equipped with a long-pass filter was used to collect fluorescence images. Another camera collected color images of fresh-cut vegetables and FMs. The feeding unit fed FMs mixed with fresh-cut vegetables onto a conveyor belt. Two cameras synchronized programmatically in the software interface simultaneously collected fluorescence and color image samples based on the region of interest as they moved through the conveyor belt. Using simple image processing algorithms, FMs could be detected and depicted in two different image windows. The results demonstrated that the dual imaging technique can effectively detect potential FMs in two types of fresh-cut vegetables (cabbage and green onion), as indicated by the combined fluorescence and color imaging accuracy. The test results showed that the real-time inspection system could detect FMs measuring 0.5 mm in fresh-cut vegetables. The results showed that the combined detection accuracy of FMs in the cabbage (95.77%) sample was superior to that of green onion samples (87.89%). Therefore, the inspection system was more effective at detecting FMs in cabbage samples than in green onion samples.
RESUMO
The Contamination Sanitization Inspection and Disinfection (CSI-D) device is a handheld fluorescence-based imaging system designed to disinfect food contact surfaces using ultraviolet-C (UVC) illumination. This study aimed to determine the optimal CSI-D parameters (i.e., UVC exposure time and intensity) for the inactivation of the following foodborne bacteria plated on non-selective media: generic Escherichia coli (indicator organism) and the pathogens enterohemorrhagic E. coli, enterotoxigenic E. coli, Salmonella enterica, and Listeria monocytogenes. Each bacterial strain was spread-plated on non-selective agar and exposed to high-intensity (10 mW/cm2) or low-intensity (5 mW/cm2) UVC for 1-5 s. Control plates were not exposed to UVC. The plates were incubated overnight at 37 °C and then enumerated. Three trials for each bacterial strain were conducted. Statistical analysis was carried out to determine if there were significant differences in bacterial growth between UVC intensities and exposure times. Overall, exposure to low or high intensity for 3-5 s resulted in consistent inhibition of bacterial growth, with reductions of 99.9-100 % for E. coli, 96.8-100 % for S. enterica, and 99.2-100 % for L. monocytogenes. The 1 s exposure time showed inconsistent results, with a 66.0-100 % reduction in growth depending on the intensity and bacterial strain. When the results for all strains within each species were combined, the 3-5 s exposure times showed significantly greater (p < 0.05) growth inhibition than the 1 s exposure time. However, there were no significant differences (p > 0.05) in growth inhibition between the high and low UVC intensities. The results of this study show that, in pure culture conditions, exposure to UVC with the CSI-D device for ≥3 s is required to achieve consistent reduction of E. coli, S. enterica, and L. monocytogenes.
RESUMO
Root rot of Panax ginseng caused by Cylindrocarpon destructans, a soil-borne fungus is typically diagnosed by frequently checking the ginseng plants or by evaluating soil pathogens in a farm, which is a time- and cost-intensive process. Because this disease causes huge economic losses to ginseng farmers, it is important to develop reliable and non-destructive techniques for early disease detection. In this study, we developed a non-destructive method for the early detection of root rot. For this, we used crop phenotyping and analyzed biochemical information collected using the HSI technique. Soil infected with root rot was divided into sterilized and infected groups and seeded with 1-year-old ginseng plants. HSI data were collected four times during weeks 7-10 after sowing. The spectral data were analyzed and the main wavelengths were extracted using partial least squares discriminant analysis. The average model accuracy was 84% in the visible/near-infrared region (29 main wavelengths) and 95% in the short-wave infrared (19 main wavelengths). These results indicated that root rot caused a decrease in nutrient absorption, leading to a decline in photosynthetic activity and the levels of carotenoids, starch, and sucrose. Wavelengths related to phenolic compounds can also be utilized for the early prediction of root rot. The technique presented in this study can be used for the early and timely detection of root rot in ginseng in a non-destructive manner.
RESUMO
The quality of tropical fruits and vegetables and the expanding global interest in eating healthy foods have resulted in the continual development of reliable, quick, and cost-effective quality assurance methods. The present review discusses the advancement of non-destructive spectral measurements for evaluating the quality of major tropical fruits and vegetables. Fourier transform infrared (FTIR), Near-infrared (NIR), Raman spectroscopy, and hyperspectral imaging (HSI) were used to monitor the external and internal parameters of papaya, pineapple, avocado, mango, and banana. The ability of HSI to detect both spectral and spatial dimensions proved its efficiency in measuring external qualities such as grading 516 bananas, and defects in 10 mangoes and 10 avocados with 98.45%, 97.95%, and 99.9%, respectively. All of the techniques effectively assessed internal characteristics such as total soluble solids (TSS), soluble solid content (SSC), and moisture content (MC), with the exception of NIR, which was found to have limited penetration depth for fruits and vegetables with thick rinds or skins, including avocado, pineapple, and banana. The appropriate selection of NIR optical geometry and wavelength range can help to improve the prediction accuracy of these crops. The advancement of spectral measurements combined with machine learning and deep learning technologies have increased the efficiency of estimating the six maturity stages of papaya fruit, from the unripe to the overripe stages, with F1 scores of up to 0.90 by feature concatenation of data developed by HSI and visible light. The presented findings in the technological advancements of non-destructive spectral measurements offer promising quality assurance for tropical fruits and vegetables.
RESUMO
Unlike standard chemical analysis methods involving time-consuming, labor-intensive, and invasive pretreatment procedures, Raman hyperspectral imaging (HSI) can rapidly and non-destructively detect components without professional supervision. Generally, the Kjeldahl methods and Soxhlet extraction are used to chemically determine the protein and lipid content of soybeans. This study is aimed at developing a high-performance model for estimating soybean protein and lipid content using a non-destructive Raman HSI. Partial least squares regression (PLSR) techniques were used to develop the model using a calibration model based on 70% spectral data, and the remaining 30% of the data were used for validation. The results indicate that the Raman HSI, combined with PLSR, resulted in a protein and lipid model Rp2 of 0.90 and 0.82 with Root Mean Squared Error Prediction (RMSEP) 1.27 and 0.79, respectively. Additionally, this study successfully used the Raman HSI approach to create a prediction image showing the distribution of the targeted components, and could predict protein and lipid based on a single seeds.
RESUMO
Edible insects are gaining popularity as a potential future food source because of their high protein content and efficient use of space. Black soldier fly larvae (BSFL) are noteworthy because they can be used as feed for various animals including reptiles, dogs, fish, chickens, and pigs. However, if the edible insect industry is to advance, we should use automation to reduce labor and increase production. Consequently, there is a growing demand for sensing technologies that can automate the evaluation of insect quality. This study used short-wave infrared (SWIR) hyperspectral imaging to predict the proximate composition of dried BSFL, including moisture, crude protein, crude fat, crude fiber, and crude ash content. The larvae were dried at various temperatures and times, and images were captured using an SWIR camera. A partial least-squares regression (PLSR) model was developed to predict the proximate content. The SWIR-based hyperspectral camera accurately predicted the proximate composition of BSFL from the best preprocessing model; moisture, crude protein, crude fat, crude fiber, and crude ash content were predicted with high accuracy, with R2 values of 0.89 or more, and root mean square error of prediction values were within 2%. Among preprocessing methods, mean normalization and max normalization methods were effective in proximate prediction models. Therefore, SWIR-based hyperspectral cameras can be used to create automated quality management systems for BSFL.
RESUMO
Compact and automated sensing systems are needed to monitor plant health for NASA's controlled-environment space crop production. A new hyperspectral system was designed for early detection of plant stresses using both reflectance and fluorescence imaging in visible and near-infrared (VNIR) wavelength range (400-1000 nm). The prototype system mainly includes two LED line lights providing VNIR broadband and UV-A (365 nm) light for reflectance and fluorescence measurement, respectively, a line-scan hyperspectral camera, and a linear motorized stage with a travel range of 80 cm. In an overhead sensor-to-sample arrangement, the stage translates the lights and camera over the plants to acquire reflectance and fluorescence images in sequence during one cycle of line-scan imaging. System software was developed using LabVIEW to realize hardware parameterization, data transfer, and automated imaging functions. The imaging unit was installed in a plant growth chamber at NASA Kennedy Space Center for health monitoring studies for pick-and-eat salad crops. A preliminary experiment was conducted to detect plant drought stress for twelve Dragoon lettuce samples, of which half were well-watered and half were under-watered while growing. A machine learning method using an optimized discriminant classifier based on VNIR reflectance spectra generated classification accuracies over 90% for the first four days of the stress treatment, showing great potential for early detection of the drought stress on lettuce leaves before any visible symptoms and size differences were evident. The system is promising to provide useful information for optimization of growth environment and early mitigation of stresses in space crop production.
RESUMO
Consumption of aflatoxin-contaminated food can cause severe illness when consumed by humans or livestock. Because the mycotoxin frequently occurs in cereal grains and other agricultural crops, it is crucial to develop portable devices that can be used non-destructively and in real-time to identify aflatoxin-contaminated food materials during early stages of harvesting or processing. In this study, an aflatoxin detection method was developed using a compact Raman device that can be used in the field. Data were obtained using maize samples naturally contaminated with aflatoxin, and the data were analyzed using a machine learning method. Of the multiple classification models evaluated, such as linear discriminant analysis (LDA), linear support vector machines (LSVM), quadratic discriminant analysis (QDA), and quadratic support vector machines and spectral preprocessing methods, the best classification accuracy was achieved at 95.7% using LDA in combination with Savitzky-Golay 2nd derivative (SG2) preprocessing. Partial least squares regression (PLSR) models demonstrated a close-range accuracy within the scope of standard normal variate (SNV) and multiplicative scatter correction (MSC) preprocessing methods, with determination of coefficient values of R2C and R2V of 0.9998 and 0.8322 respectively for SNV, and 0.9916 and 0.8387 respectively for MSC. This study demonstrates the potential use of compact and automated Raman spectroscopy, coupled with chemometrics and machine learning methods, as a tool for rapidly screening food and feed for hazardous substances at on-site field processing locations.