Developing an affordable hyperspectral imaging system for rapid identification of Escherichia coli O157:H7 and Listeria monocytogenes in dairy products

Abstract The objective of this foundational study was to develop and evaluate the efficacy of an affordable hyperspectral imaging (HSI) system to identify single and mixed strains of foodborne pathogens in dairy products. This study was designed as a completely randomized design with three replications. Three strains each of Escherichia coli O157:H7 and Listeria monocytogenes were evaluated either as single or mixed strains with the HSI system in growth media and selected dairy products (whole milk, and cottage and cheddar cheeses). Test samples from freshly prepared single or mixed strains of pathogens in growth media or inoculated dairy products were streaked onto selective media (PALCAM and/or Sorbitol MacConkey agar) for isolation. An isolated colony was selected and mixed with 1 ml of HPLC grade water, vortexed for 1 min, and spread over a microscope slide. Images were captured at 2000× magnification on the built HSI system at wavelengths ranging from 400 nm to 1100 nm with 5‐nm band intervals. For each image, three cells were selected as regions of interest (ROIs) to obtain hyperspectral signatures of respective bacteria. Reference pathogen libraries were created using growth media, and then test pathogenic cells were classified by their hyperspectral signatures as either L. monocytogenes or E. coli O157:H7 using k‐nearest neighbor (kNN) and cross‐validation technique in R‐software. With the implementation of kNN (k = 3), overall classification accuracies of 58.97% and 61.53% were obtained for E. coli O157:H7 and L. monocytogenes, respectively.

detection and identification of foodborne pathogens due to being sensitive, inexpensive, and their ability to provide both qualitative and quantitative results (Doyle & Buchanan, 2013), these methods are time-consuming, laborious, and can take from 4 to 7 days to give confirmatory results (FDA, 2021). Any method that can reduce the analysis time by a day, or even several hours compared to the conventional counterpart is considered a rapid test.
Hyperspectral imaging (HSI) is a novel technology in the field of food safety that has great potential in rapid, reliable, and inexpensive identification of foodborne pathogens. The HSI integrates conventional imaging and spectroscopy techniques to simultaneously gather both spatial (x-and y dimensions of image) and spectral (wavelength, λ) information of a sample to form a hyperspectral cube (Gowen et al., 2007).
The hyperspectral cube can store vast amount of information in this three-dimensional (3-D) hyperspectral cube. In HSI, images of a specimen are acquired at various contiguous predefined wavelengths in the visible/near-infrared region (approximately 400-1000 nm) at specific wavelength intervals. This results in dozens or hundreds of images, giving every pixel in a hyperspectral image its own spectrum or hyperspectral signature, over a contiguous wavelength range (Ariana & Lu, 2008). Hyperspectral cubes can be broken down to a single pixel, or a selection of a group of pixels known as a region of interest (ROI).
The hyperspectral signature can then be used as a unique fingerprint for rapid identification of respective specimens. The HSI utilizes optical characteristics of the sample captured over a wide wavelength range for identification; therefore, HSI uses the interactions between light and the molecular structure of a sample for its identification.
The HSI was initially developed for remote sensing and has since been proven useful in a multitude of disciplines such as astronomy, agriculture, pharmaceuticals, and medicine (Gowen et al., 2007). In the food industry, HSI had been studied predominantly for food quality assessment, such as rapid detection of defects in agricultural products. Food ranging from fruits, vegetables, meat, fish, and grains have had HSI applied to assess water and fat content, spoilage, and damage, and for product quality grading (Chen et al., 2020;Codgill, 2004;ElMasry et al., 2012;ElMarsy et al., 2008;Heia et al., 2007;Naganathan et al., 2008;Qin, 2005).
In terms of food safety, most of the previous HSI research for bacterial detection has been conducted at macroscale using bacterial colonies, but minimal research has been conducted at the single bacterial cell level (Eady & Park, 2016a Currently, what is stopping researchers from exploring this technology is the initial startup cost of acquiring HSI systems. Most preassembled and preprogrammed HSI systems cost over $100,000 and have very little room for modification. The development of a cheaper and reliable HSI system by mounting a commercially available hyperspectral imaging camera on a regular laboratory compound microscope and using commercially available software could encourage other researchers to explore this technology and could invoke more interest from the food industry in investing in this technology. The first objective of this study was to develop an affordable HSI system using a basic compound microscope and an HSI camera connected to a computer interface. The second objective was to evaluate the efficacy of the newly developed affordable HSI system to identify single and mixed strains of L. monocytogenes and E. coli O157:H7 in growth media, and selected dairy products (whole milk, and cottage and cheddar cheeses).

| Development of an affordable HSI system
An affordable HSI system (Figure 1) was assembled by integrating a GoldenEye TM snapshot hyperspectral imager (BaySpec Inc., San Jose, CA) with a B3-223 trinocular microscope (VWR ® International, Radnor, PA). Several engineering adjustments were performed to transform the above-mentioned technologies into one functional HSI system.
Briefly, a dark field attachment (Motic ® , Schertz, TX) was inserted below the condenser and above the halogen lamp of the microscope. A 100× oil dark field plan objective with an adjustable iris (AmScope TM , Irvine, CA) was installed on the revolving nose piece of the microscope.
A custom-designed 20× adapter (Engineering Shop, Washington State University, Pullman, WA) built by installing a wide field 20× lens into a 3-D printed adapter was used to connect the hyperspectral imager directly to the trinocular port on the microscope. Lastly, the hyperspectral imager was connected through a USB (universal serial bus) port to a laptop computer (Dell ® , Round Rock, TX). The price breakdown of the completed affordable custom-designed HSI setup is shown in Table 1.

| Experimental design
This study was designed as a completely randomized design. To study whether the custom-designed affordable HSI system can be used for the rapid identification of various foodborne pathogens, three strains each of Escherichia coli O157:H7 and Listeria monocytogenes were used. Hyperspectral images of immobilized cells from isolated colonies were captured. These images were then used to generate hyperspectral graphs of respective bacterial cells. The hyperspectral graphs/signatures of cells of pure cultures obtained from respective selective agar were stored as a reference library and used to train the classification model. The k-nearest neighbor (kNN) classifier (with an optimal k determined by cross-validation) was used to classify unknown bacterial cells (Escherichia coli O157:H7 and Listeria monocytogenes) from artificially inoculated dairy products.
Three replications were conducted for both pure cultures and inoculated dairy product samples for generating hyperspectral graphs; and within each replication, hyperspectral images of various samples were obtained randomly.

| Culture propagation
Escherichia coli O157:H7 and L. monocytogenes strains used in this study are presented in Table 2. All strains were selected on the basis of risk and involvement in foodborne disease outbreaks or isolated from the environment and food processing facilities. The cultures were propagated according to manufacturers' instructions, individually transferred onto glycerol protectant beads (Microbank TM , Richmond Hill, ON), and stored in a −80°C freezer (Panasonic Healthcare Co., Ltd., Wood Dale, IL) until used. At the start of the study, a frozen bead of each culture was grown individually at 37°C for 24 h in 10 ml of brain heart infusion (BHI) broth (Difco TM , Becton, Dickinson and Company, Sparks, MD) and stored at 4˚C as stock cultures. All stock cultures were confirmed using API ® 20E and API ® Lister (bioM´erieux, Inc., Durham, NC) for E. coli O157:H7 and L. monocytogenes strains, respectively.

| Sample preparation using selective media
For each replication, a loop of an individual stock culture was used to inoculate 10 ml of BHI broth and incubated at 37°C for 24 h.

| Dairy product preparation and inoculation
Dairy products (milk and cheeses) were purchased from a local store in Pullman, WA (Walmart, Pullman, WA). For each replication, F I G U R E 1 Affordable custom-designed hyperspectral microscope imaging setup. 1: GoldenEye TM hyperspectral imaging camera; 2: custom-designed 20 × adapter; 3: adjustable numerical aperture 100 × objective; 4: dark field adapter; 5: halogen light source; 6: VWR compound microscope; and 7: computer and immobilized by air drying in a biosafety cabinet for 5 min. These immobilized bacterial cells on glass slides were then used for HSI analysis.

| Hyperspectral graph generation
The custom-designed

| kNN classification and validation of hyperspectral graphs
An important step in statistical analyses and classification of a spectral data set is preprocessing; however, there are currently no well-established guidelines or rules for selecting a particular preprocessing technique for a specific type of data set (Scott et al., 2006). The preprocessing technique chosen for a particular data set should aim to provide the best possible classification accuracy. For this study, hyperspectral graphs were preprocessed by normalizing the y-axis (scattering value) from 0 to 1 (Michael et al., 2019;Scott et al., 2006), with "1" being the brightest point on the ROI and "0" being the darkest point. The following equation was used to calculate normalized scattering values (Michael et al., 2019;Scott et al., 2006): where X j is a numeric vector and is the hyperspectral signature of the jth observation, x ij the ith entry of X j and is the scattering value at the ith wavelength; min (X j ) is the minimum scattering value of the hyperspectral signature X j ; and max (X j ) is the max scattering value of the hyperspectral signature X j .
The k-nearest neighbor (kNN) classifier was used to classify the different pathogens using the normalized hyperspectral signatures, where the value of neighboring size k was chosen to be 3 (as explained below). The kNN classifier is a commonly used, nonparametric classification technique. This classification technique was chosen since each (normalized) hyperspectral signature in this study is a high-dimensional vector but there were only a few such signatures whose pathogen types were available to train a parametric classifier different than the kNN classifier. Specifically, the Euclidean distance between a pair of normalized hyperspectral signatures was used as a dissimilarity measure on these signatures. In order to determine an optimal neighboring size k, a training set was created and consisted of 18 normalized hyperspectral signatures of known pathogens, and a 5-fold cross-validation was applied to the training set. This gave an optimal value for k as 3. It should be noted that values for k from 1 to 3, and 5-or 10-fold cross-validation are commonly used, and considerable empirical evidence shows that these two choices of the number of folds for cross-validation work well in practice for a range of statistical learning methods including kNN classifiers (James et al., 2013;Scott et al., 2006). For this study, 5-fold cross-validation was chosen in order to more stably estimate the test error of an optimal kNN classifier since the training set had only 18 observations.
The optimal 3-NN classifier was then applied to classify a total of 78 normalized hyperspectral signatures, all different from those in the training set, to classify them into their corresponding pathogens.

| RE SULTS
An example of the hyperspectral image of bacterial cells as visible under the field of view of the microscope and acquired by the affordable custom-designed HSI system is presented in Figure 2a. Using the ENVI software, this image was clarified using various imageclarifying tools for better visualization of bacterial cells presented in Figure 2b; however, clarification of the images did not affect the hyperspectral signatures of these bacterial cells. The selection of the three individual cells as ROIs within the hyperspectral image is presented in Figure 2c.
To evaluate the efficacy of the assembled HSI system, hyperspectral images of different reference strains of E. coli O157:H7 and L. monocytogenes grown in nutrient growth media followed by isolating on selective agar were captured to develop a training data set to train the kNN classification model. The mean hyperspectral graphs from 400-to 1,100-nm wavelength range for these reference strains are presented in Figure 3. The graphs presented in Figure 3 demonstrated that there were overall differences in scattering intensities in the hyperspectral graphs of E. coli O157:H7 and L. monocytogenes.
The main difference between E. coli O157:H7 and L. monocytogenes was observed in the wavelength range of 500-700 nm, with the scattering intensities of L. monocytogenes being lower than those of E. coli O157:H7. Likewise, L. monocytogenes has lower scattering intensities at the wavelength range of 900-1025 nm in comparison to those of E. coli O157:H7.
The graphs in Figure 3

TA B L E 3
Confusion matrix for the optimal kNN classifier (with k = 3) to classify 78 bacterial hyperspectral images as Escherichia coli O157:H7 (EC) and Listeria monocytogenes (LM) using their normalized hyperspectral signatures that were obtained from the custom-designed hyperspectral imaging system from 400 to1100 nm (with 5-nm band intervals)  hyperspectral signature is required to identify the unknown target organism (Gomez, 2002). Without previous hyperspectral information, such as a reference library, the classification technique would not be able to identify the unknown organism. Second, an enrichment step is necessary when looking to identify possible target organisms in food matrices (Bari & Yeasmin, 2015). The necessity of the enrichment step is due to the low concentrations of pathogens in foods and variability in cellular morphology due to various stresses encountered in the foods, such as pH, temperatures, and antimicrobials.
Currently, preassembled and preprogrammed HSI systems are expensive and can easily cost over $100,000, leading to limited research being explored using hyperspectral microscope imaging for the identification and detection of foodborne pathogens.
However, with the introduction of an affordable HSI microscope setup built in this study, the initial investment cost is reduced to a fifth of the average cost of commercially available HSI systems.
After the initial cost of the HSI system, the cost of running HSI analysis is considerably low, which would include the cost of enrichment and isolation media along with regular microbiological tools (such as loops, glass slides coverslips, and a biosafety cabinet). Once the bacterial colonies are isolated on appropriate agar, the time for the hyperspectral image acquiring and analyzing is less than 15 min. After developing an affordable, accurate, and precise HSI system, the HSI of the bacterial cells could be used as a rapid identification technique for specific pathogens or bacteria, at least at the presumptive levels.
In conclusion, the overall classification accuracy (60.25%) of this affordable custom-designed HSI system with kNN classification model still needs improvement to be considered a reliable detection and identification method for foodborne pathogens within a food matrix. Further work will be performed to improve the bacterial cells' magnification and classification accuracy of the HSI system.
Likewise, different preprocessing and classification methods will be examined to increase the classification accuracy. Future research will focus on building a stronger reference library for more pathogens such as Salmonella, Big Seven Shiga toxin producing E. coli (STEC), L. monocytogenes, and Staphylococcus aureus. Once a stronger reference library has been established, future research will focus on the identification of pathogens within different food matrices such as low moisture foods. This technology has shown promising results with E. coli O157:H7 and L. monocytogenes, and the development of diverse standard library in future and enhanced magnification will make this even more potent. Overall, HSI has a bright future for its application in food safety.

ACK N OWLED G M ENTS
The authors would like to thank BUILD Dairy (managed by Western Dairy Center, Utah, USA) and National Institute of Food and Agriculture, U.S. Department of Agriculture (NIFA-USDA; award number 2020-67018-30791) for funding this research. We would also like to thank Dr. Eric Bastian, Director, Western Dairy Center, for his constant support during the research.

CO N FLI C T O F I NTE R E S T
The authors do not have any conflict of interest.

E TH I C A L A PPROVA L
This study does not involve any human or animal testing.