Next Article in Journal
What Is Authentic Maple Water? A Twelve-Month Shelf-Life Study of the Chemical Composition of Maple Water and Its Biological Activities
Next Article in Special Issue
Phenotypic Analysis of Fourier-Transform Infrared Milk Spectra in Dairy Goats
Previous Article in Journal
A Rapid and Visual Method for Nucleic Acid Detection of Escherichia coli O157:H7 Based on CRISPR/Cas12a-PMNT
Previous Article in Special Issue
Discriminant Analysis of Brazilian Stingless Bee Honey Reveals an Iron-Based Biogeographical Origin
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Extracting Tissue Optical Properties and Detecting Bruised Tissue in Pears Quickly and Accurately Based on Spatial Frequency Domain Imaging and Machine Learning

1
School of Information Science and Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China
2
Key Laboratory of Transplanting Equipment and Technology of Zhejiang Province, Hangzhou 310018, China
*
Author to whom correspondence should be addressed.
Foods 2023, 12(2), 238; https://doi.org/10.3390/foods12020238
Submission received: 20 November 2022 / Revised: 28 December 2022 / Accepted: 29 December 2022 / Published: 4 January 2023

Abstract

:
Recently, Spatial Frequency Domain Imaging (SFDI) has gradually become an alternative method to extract tissue optical properties (OPs), as it provides a wide-field, no-contact acquisition. SFDI extracts OPs by least-square fitting (LSF) based on the diffuse approximation equation, but there are shortcomings in the speed and accuracy of extracting OPs. This study proposed a Long Short-term Memory Regressor (LSTMR) solution to extract tissue OPs. This method allows for fast and accurate extraction of tissue OPs. Firstly, the imaging system was developed, which is more compact and portable than conventional SFDI systems. Next, numerical simulation was performed using the Monte Carlo forward model to obtain the dataset, and then the mapping model was established using the dataset. Finally, the model was applied to detect the bruised tissue of ‘crown’ pears. The results show that the mean absolute errors of the absorption coefficient and the reduced scattering coefficient are no more than 0.32% and 0.21%, and the bruised tissue of ‘crown’ pears can be highlighted by the change of OPs. Compared with the LSF, the speed of extracting tissue OPs is improved by two orders of magnitude, and the accuracy is greatly improved. The study contributes to the rapid and accurate extraction of tissue OPs based on SFDI and has great potential in food safety assessment.

Graphical Abstract

1. Introduction

The study of the propagation process of light in biological tissue has been a hot issue. It has been found that tissue optical properties (OPs) show great potential in biomedical detection [1,2], OPs’ detection of fruit [3,4] and OPs’ detection of milk [5]. The propagation behavior of light in biological tissue consists mainly of absorption and scattering, which are generally quantitatively described by the absorption coefficient ( μ a ) and the reduced scattering coefficient ( μ s ). The μ a reflects the chemical composition of biological tissue, whereas the μ s reflects the physical structural properties of the tissues [6]. Therefore, obtaining μ a and μ s of biological tissue is important for assessing the physicochemical properties of biological tissue. There are various methods to obtain tissue OPs, such as the temporally resolved [7], spatially resolved [8], and integrating sphere methods [9]. As a new method to obtain tissue OPs, Spatial Frequency Domain Imaging (SFDI) is widely used in burned tissue assessment [10], meat classification [11], and bruised fruit detection [12,13]. The SFDI technique is commonly used in the biomedical field, but it is rarely used in food safety evaluation and agricultural product quality assessment.
There are two homogeneous forward models of mapping from OPs to diffuse reflectance in Spatial Frequency Domain Imaging. One model is an analytic approach based on the diffusion approximation equation and another model is based on transport using Monte Carlo (MC) simulations [14,15]. The main task of extracting tissue OPs by transport models is to deal with an inverse process of mapping tissue OPs to spatial frequency diffuse reflectance. There are two ways to implement the inversion process, one is the error minimization, and the other is the search method. For the first approach, the error minimization problem ( min ( R d , model ( f x )   -   R d , sample ( f x ) ) ) is solved by inputting a guess value of the optical properties into the model to obtain the diffuse reflectance ( R d , model ) closest to the actual value ( R d , sample ). The second approach is a search problem, which first generates a large amount of data using a forward model and then compares the diffuse reflectance of the sample and dataset to find the optical properties values. Regardless of which forward model is used, there are two common methods used for inversion so far. One is the least-square fitting (LSF) method, and the other is the look-up table (LUT) method [16,17]. Generally, to obtain accurate and stable results, diffuse reflectance at multiple spatial frequencies is used [18,19]. However, whether using analytic approach based on the diffusion approximation equation or MC simulations based on transport, the LSF is computationally slow and unsuitable for fitting large numbers of pixels, which is an inherent drawback of the fitting method. The LUT method generates a diffuse reflectance dataset from a forward model and then builds a mapping table from diffuse reflectance to OPs, and the inversion process usually uses interpolation to estimate the OPs. In theory, if the interval of the LUT is small enough, extremely high inversion accuracy can be obtained. However, with the decrease of LUT interval and the increase of frequency number, the inversion time increases exponentially. The LUT therefore requires a compromise between accuracy and speed. In conclusion, traditional inversion methods are not good to balance accuracy and speed at the same time. Therefore, it is necessary to improve the speed and accuracy of SFDI inversion to quantify the OPs of tissue quickly and accurately.
Machine learning is widely used in visual inspection [20], quality assessment of agricultural products [21], and metal material research [22]. Since machine learning techniques have great advantages in dealing with regression problems with large amounts of data, they are used to replace the time-consuming model-based inversion process in diffuse reflectance optics [23,24]. The mapping between OPs and diffuse reflectance is strongly nonlinear in SFDI. Meanwhile, machine learning and regression techniques were found to be highly advantageous in solving nonlinear problems; for example, an artificial neural network (ANN) implementation for extraction of tissue OPs [25], and extraction of tissue OPs based on random forest regressor (RFR) [26]. According to the literature [27,28], machine learning-based extraction of OPs can be two orders of magnitude faster than conventional methods, without degrading the accuracy of OPs, based on the SFDI technique. Although these methods are based on machine learning, which greatly improves the prediction speed, the prediction accuracy is still lacking.
The analysis of OPs allows for the assessment of physiological indicators such as firmness and Soluble Solids Content (SSC) [6], which helps in the evaluation and classification of fruits. Fruits are prone to receive crushing and bruising during the picking, transportation, and marketing process. Over time, the bruised tissues of pears will decay and spread to the surrounding tissue, which eventually leads to a decrease in the economic efficiency of pears. Furthermore, it is a good mean to detect the bruised tissue of fruits by Ops. Therefore fast, accurate, and portable extraction of tissue OPs is of great importance in agricultural production and food safety.
Researchers have been looking for fast and accurate inversion methods, aiming to achieve real-time, accurate, and portable extraction of tissue OPs based on the SFDI technique. Common mapping models based on machine learning methods are used to extract OPs, which greatly improve the prediction speed and prediction accuracy. However, accuracy is still lacking. In this study, a mapping method based on Long Short-term Memory (LSTM) [29] was proposed to extract OPs, which is not only fast, but also improves accuracy. This work lays a foundation for solving the problem of real-time, accurate, and portable extraction of tissue OPs based on the SFDI technique. The purpose of this study was to look for an alternative approach to extract OPs quickly and accurately from diffuse reflectance images for bruised tissue detection in ‘crown’ pears. Therefore, the main objectives of this research are as follows: (1) build a compact and portable system; (2) obtain data through Monte Carlo simulation; (3) establish a mapping model; and (4) detect the change of tissue OPs after a ‘crown’ pear has been bruised.

2. Materials and Methods

2.1. Spatial Frequency Domain Imaging Instrumentation

The Spatial Frequency Domain Imaging system is shown in Figure 1a. The grayscale illumination pattern is generated by a miniature projection module. In this study, we used a digital projector (M1, Lenovo, Beijing, China), based on a digital micromirror-based digital light processing (DLP) light engine (Texas Instruments, Dallas, TX, USA) and an LED light source. A filter (λ = 525 nm, Δλ = 10 nm, Beijing Optical Century Instrument co. LTD (BOCIC), Beijing, China) was used in front of the lens of the projector to filter out light with a wavelength of 525 nm. The diffuse light reflected from the sample surface was captured by an 8-bit CCD camera (MV-CA060-11GM, Hikvision, Hangzhou, China). The generation of the illumination pattern, the projection, and the acquisition of the diffuse reflectance image of the sample were implemented by two ARM boards (Jetson Nano, Nvidia Corporation, Santa Clara, CA, USA). The synchronization of the sinusoidal illumination pattern projection and the sample diffuse reflectance acquisition was ensured by network communication. Compared to conventional systems, this study abandoned the strategy of using a personal computer as the control core and used miniature components, making the system more portable and compact.

2.2. SFDI Processing

For the Spatial Frequency Domain Imaging technique, the sinusoidally modulated light is projected onto the surface of the scattering medium first, and then the raw diffuse reflectance image is captured with a camera. Sinusoidally modulated light at each frequency needs to be projected three times with the phase 0π, 2π/3, and 4π/3. At least two frequencies are required to map the optical properties (OPs) using the optical transport model [30]. The data processing is shown in Figure 1b.
After obtaining the raw diffuse reflectance image, the modulation amplitude ( M ( f x ) ) needs to be obtained by three-phase demodulation, as in Equation (1).
M ( f x ) = 2 3 { ( I 1 ( f x )   -   I 2 ( f x ) ) 2 + ( I 2 ( f x )   -   I 3 ( f x ) ) 2 + ( I 3 ( f x )   -   I 1 ( f x ) ) 2 } 1 / 2
where I i ( f x ) is the raw diffuse reflectance with different phases at the same frequency, and M ( f x ) is the modulation amplitude. The correction is then performed using a reference whiteboard with known diffuse reflectance, as in Equation (2),
R d ( f x ) measured = M ( f x ) measured M ( f x ) reference R d ( f x ) reference
where M ( f x ) measured is the modulated amplitude of the sample, M ( f x ) reference is the modulated amplitude of the reference whiteboard, R d ( f x ) measured is the diffuse reflectance of the sample, and R d ( f x ) reference is the diffuse reflectance of the reference whiteboard. According to the diffuse approximation theory, the optical properties ( μ a , μ s ) can be solved using curve fitting based on the diffuse equation [30] after the diffuse reflectance is obtained. This is shown in Equation (3),
R d ( f x ) = 3 A μ s / μ tr ( μ   eff / μ tr + 1 ) ( μ   eff / μ tr + 3 A )
where μ tr = μ a + μ s is the transport coefficient, μ eff = 3 μ a μ tr + 2 π f x 2 represents the scalar attenuation coefficient in the spatial frequency domain, n is the refractive index of sample, R eff = 0 . 63 n + 0 . 668 + 0 . 71 / n   -   1 . 44 / n 2 is effective reflection coefficient, and A = ( 1   -   R eff ) / 2 ( 1 + R eff ) is a proportionality constant.

2.3. Monte Carlo Simulations

Unlike the diffuse approximation equation, Monte Carlo (MC) simulation is a stochastic statistical method that simulates the transport of photons through tissue. After the photons enter the tissue, they constantly interact, and some of the photons are absorbed and disappear. Photons emitted from the upper surface of the tissue form diffuse light, and photons emitted from the lower surface of the tissue form transmitted light. Given the optical properties (OPs) parameters, the purpose of MC simulations is to simulate the photons transport process and then accurately calculate the corresponding diffuse reflectance. Many researchers have implemented MC simulations programs for different purposes, some for time-domain MC simulations [31], some for single-layer tissue MC simulations, and some for multi-layer tissue MC simulations [32]. This study uses a GPU-accelerated simulations program developed by Eric [33]. A large amount of mapping data (from OPs to diffuse reflectance) was obtained through MC simulations, which was used to construct the Long Short-term Memory Regressor model.
Given the value of the OPs, the diffuse reflectance R d ( r ) can be obtained using the MC simulations program. However, this spatially distributed diffuse reflectance R d ( r ) obtained by MC simulations is independent of the frequency of the structured light. The diffuse reflectance R d ( f x ) in the spatial frequency domain (SFD) can be derived by Fourier transform [30]. As shown in Equation (4),
R d ( f x ) = 2 π i = 1 n r i J 0 ( 2 π f x r i ) R d ( r i ) Δ r i
where R d ( f x ) is diffuse reflectance in SFD, r i is the radial distance of the ith photon from the incident point of the light source in the MC simulation, f x is the frequency of the sinusoidally modulated light, R d ( r i ) is the reflection weight of the photon at the point r i , Δ r i is the distance between radially adjacent photons, and J 0 is the zeroth-order Bessel function of the first kind. The initialization parameters of MC simulations are shown in Table 1.

2.4. Long Short-Term Memory Regressor Method

The Long Short-term Memory (LSTM) network model has great potential to solve problems where input sequences have context relations. Meanwhile, the LSTM network model performs very well in solving complex nonlinear problems. Therefore, this study decided to build a mapping model based on a LSTM network model for mapping tissue optical properties (OPs) from diffuse reflectance.
The Long Short-term Memory Regressor (LSTMR) model takes the n-dimensional diffuse reflectance vector and maps it to a 2-dimensional OPs vector. The input of the LSTM network is generally an n-dimensional vector with dimensions from 1 to n representing n moments. The LSTM has a memory cell that records the memory of each moment. Furthermore, the operations at each moment include adding memory and deleting memory to extract the relevant details of the context. The structure of the LSTMR model is shown in Figure 2, where the n-dimensional vector is the diffuse reflectance at different frequencies. The model of the network could be a deep neural network, and only one layer of the neural network is shown in the figure. The basic structure of the model is shown in the upper of Figure 2, and equations are shown in Equations (5)–(10),
F t = σ ( W f [ Y t - 1 , X t ] + z f )
I t = σ ( W i [ Y t - 1 , X t ] + z i )
  C t ˜ = tan h ( W c [ Y t - 1 , X t ] + z c )
O t   = σ ( W o [ Y t - 1 , X t ] +   z o )
C t = F t C t - 1 + I t     C t ˜
Y t = tan h ( F t     C t - 1 + I t C t ˜ )     O t
where ⊙ is the pointwise multiplication operation, σ is the sigmoid function, W is the weight matrix of the network layer, z is the bias term of the network layer, F t is the forget gate, = I t is the input gate, C t ˜ is the current memory, O t is the output gate, C t is the memory cell at moment t, h t is the output at moment t, and X t is the input at moment t. LSTM modifies the content of the memory cell through all the forget and input gates to extract context-related information. The final output of the model can be written as Equation (11),
[ μ a , μ s ] = w t Y t
where w t is the weight of the output corresponding to each component of the input vector, and μ a and μ s are the OPs.
The Long Short-term Memory Regressor model was constructed based on the PyTorch framework (PyTorch, version 1.10.0+cu113, Meta, Menlo Park, CA, USA), which is a mainstream framework for building machine learning models. To obtain reliable and stable models, five-fold cross-validation was used in the optimization of model parameters. Theoretically, if there are enough nodes, an artificial neural network with one hidden layer can fit any complex function. This study obtained the best results when the number of nodes was 25 and the number of hidden layers was 5. Too small a batch size will lead to model oscillation and difficult convergence. Setting the batch size to the training set size is a good choice due to the small dataset, and choosing the Resilient Propagation optimizer, which is preferred when the batch size is equal to the training set size, has proven to be a smart choice. When the initial learning rate of the model was 0.0001, the model had a good convergence effect, and the model converged quickly before 200 epochs. Finally, the dropout algorithm was used to prevent overfitting, and the final model training took 30 min.

2.5. Model Testing

2.5.1. Simulations Experiments

The Long Short-term Memory Regressor (LSTMR) model was tested using a simulated dataset, and the tested dataset never appeared in the training dataset. To accelerate the inversion speed, the two-frequency inversion strategy is usually adopted. In this study, there were six alternative frequencies ( f x = 0.167, 0.180, 0.200, 0.220, 0.250, 0.300 mm−1). Different mapping models were built with different high frequencies, and a five-fold cross-validation was used in the model-building process. Different models were used to map the optical properties (OPs), and then the mean absolute error of OPs was used as the basis for the preference.
After determining the optimal frequency, the full set of training dataset was used to train the Long Short-term Memory Regressor mapping model. To highlight the advantages of the model, least-square fitting (LSF), artificial neural network (ANN), random forest regressor (RFR), and recurrent neural networks (RNN) mapping methods were implemented in the experiments, respectively. The strengths and weaknesses of the models were evaluated by the normalized mean absolute error (NMAE), the determination coefficient (R2), the root mean square error (RMSE), and the mean absolute error (MAE). Look-up table inversion was not chosen because it required a tradeoff in time and accuracy.

2.5.2. Phantoms Experiments

By using Indian ink (Royal Talens, Apeldoorn, The Netherlands) as an absorbing agent and titanium dioxide (T104950-500 g, Aladdin Biochemical Technology Corporation., Shanghai, China) as a scattering agent, deionized-water-based optical phantoms were prepared. Five gradients were set for absorption and reduced scattering, respectively. The volume fraction of India ink is 0.006–0.014% with a 0.002% interval and the volume fraction of TiO2 is 0.04–0.12% with a 0.02% interval. Twenty-five small liquid phantoms with various optical properties (OPs) were fabricated. The absorption range of these phantoms was from 0.0945 mm−1 to 0.1905 mm−1, and the scattering range was from 1.3689 mm−1 and 4.1063 mm−1. According to Lambert’s law, the standard value of the absorption coefficient was derived using the collimated transmittance T , and the collimated transmittance T is obtained by spectrometer acquisition (QE65pro, Ocean Insight Corporation, Orlando, FL, USA), as shown in Equation (12),
μ a = ln ( T ) D = ln ( I / I 0 ) D
where D is the length of the optical path passed in the liquid during collimated transmission, and I 0 and I are the transmitted light intensity of water and the transmitted light intensity of the absorber, respectively. The standard value of the reduced scattering coefficient can be calculated by using the Mie program [34] given the parameters of TiO2, the refractive index of water, and the wavelength of light. The parameters of TiO2 include diameter, volume fraction, and refractive index.
The phantom experiments were performed using a two-frequency strategy (high frequency is the optimal frequency 0.25 mm−1) and an inversion was performed using the Long Short-term Memory Regressor (LSTMR), the least-square fitting (LSF), the artificial neural network (ANN), the random forest regressor (RFR), recurrent neural network (RNN), respectively. A 300 × 300-pixel area near the center pixel of each phantom was selected as the target area and the OPs images were computed.

2.5.3. Pear Experiments

‘Crown’ pears were selected as experimental objects, and all crown pears came from fruit supermarkets. The surface of these pears was not damaged, and they were very fresh. The experiments were conducted in March at an ambient temperature of 20 degrees Celsius. During the bruising treatment, the pendulum motion was simulated by using a small iron ball to hit the pear around the equator, thus inducing the formation of bruised tissue. During the experiments, the experimental subjects were consistent before and after bruising, and the images of normal pears were collected first, and then the images of bruised pears were collected after bruising treatment. All experimental procedures used the same system to acquire images and the same program to extract optical properties.

3. Results

3.1. Simulation Experiment Results

To obtain the best high frequency, the mapping models with different high frequencies were built based on the training dataset, and the most suitable high frequencies were determined in the range of 0.167–0.300 mm−1. Figure 3 illustrates the mean absolute error (MAE) of the optical properties (OPs), where the horizontal axis is the mapping model for different high frequencies. The results show that the model has the best accuracy when the frequency is chosen to be 0.25 mm−1, and when the MAE of the absorption coefficient ( μ a ) and the reduced scattering coefficient ( μ s ) are 0.6240% and 0.5939%, respectively. The optimal frequency of 0.25 mm−1 is very close to the commonly used optimal frequency of 0.2 mm−1, which is consistent with the experimental results of Luo’s frequency preference [5].
The prediction results of different models are shown in Table 2. The prediction results of the Long Short-term Memory (LSTMR) are optimal in terms of normalized mean absolute error (NMAE), MAE, root mean square error (RMSE), and determined coefficient (R2). Except for the LSTMR model, the RFR model has the best prediction results. For LSTMR, the MAE of the μ a and the μ s are 0.32% and 0.21%, respectively. This is an order-of-magnitude improvement compared to the prediction accuracy of the LSF. As shown in Figure 4, there is an extremely high linearity between the predicted and target values of the LSTMR, with the R2 approaching 1. As can be seen in Figure 4, the target and predicted values almost exactly coincide and overlap in a straight line, both for the μ a and the μ s . This indicates that the model is an excellent fitting and that the model fits well as a function of the diffuse reflectance and OPs. The experiments illustrate that LSTMR is an ideal model for accurately mapping OPs.

3.2. Phantoms Experiments Results

To verify that the proposed Long Short-term Memory Regressor (LSTMR) mapping model can be used to extract optical properties (OPs) accurately and quickly, 25 optical phantoms with known OPs were produced. As shown in Table 3, LSTMR mapped OPs at a speed of 253 ms for a 300 × 300-pixel image (CPU, Intel-I7-11800H). However, for the least-square fitting (LSF) method, extracting the OPs of a 300 × 300-pixel image took 57,970 ms. The results show that the LSTMR inversion speed is improved by 2 to 3 orders of magnitude compared to LSF. The speed of predicting tissue OPs based on machine learning methods depends on the complexity of the model (number of nodes and number of network layers), so this study only implemented a speed comparison between LSTMR and LSF.
The results of different inversion methods for the phantoms experiments are shown in Figure 5 and Figure 6, and the mean absolute error (MAE) of μ a and μ s are 0.0211 and 0.0674 using the LSTMR method, respectively. Furthermore, the R2 of μ a and μ s are 0.9916 and 1.0, respectively, which indicates that the predicted results of LSTMR have a good linear relationship with the expected values. It confirms that LSTMR is an ideal choice for inversion in Spatial Frequency Domain Imaging. Due to the inevitable experimental error, the actual value of the phantom is different from the reference value, so the prediction result of the phantom would be slightly worse than the simulation result. The relative error of μ s is larger than that of μ a because the scattering agent is easily precipitated and is more influenced by whether the liquid surface is stationary or not, resulting in a larger error in the prediction of μ s . Obviously, the mapping results of the LSTMR inversion model are better than other models in the experiments.

3.3. Pear Experiment Results

The results of the bruised tissue detection experiment for pears are shown in Figure 7 and Figure 8. Pears will form bruised tissue at an early stage after being slightly crushed. In this study, it was demonstrated that bruised tissue forms on the surface of the pear after a slight impact. The absorption coefficient of the tissue increases during the formation of bruised tissue. The opposite is true for the reduced scattering coefficient, which is consistent with the experimental results of Sun [25] and Luo [35]. Moreover, both absorption and reduced scattering images could highlight the areas of bruised tissue. Therefore, using the Spatial Frequency Domain Imaging technique, early bruised detection of fruits can be performed. Furthermore, it can effectively control the bruised of fruits during transportation, thus controlling the cost of the fruit industry. The optical properties (OPs) of apple tissues can be used for nondestructive quality or ripeness prediction of apples [4], and the Long Short-term Memory method proposed in this study can obtain prediction results more accurately and quickly. Therefore, the rapid acquisition of OPs in tissues is of particular importance. This further illustrates the need to improve the speed and accuracy of extracting the OPs of tissues. It also lays the foundation for the real-time, portable acquisition of tissue OPs.

4. Discussion

Absorption and scattering have different sensitivities to frequency. Absorption is mainly sensitive to low frequency, whereas scattering is mainly sensitive to high frequency. The non-zero frequency should not be too large or too small for the two-frequency inversion. The simulations experimental results showed that f x = 0.25 mm−1 was the most suitable frequency under these experimental conditions, which was also closer to the non-zero frequency used in the existing literature [5]. The simulations experimental results show that the mapping accuracy of the Long Short-term Memory Regressor (LSTMR) model could be substantially improved, and the mean absolute error (MAE) of μ a and μ s could reach 0.32% and 0.21%, respectively. The mapping accuracy of LSTMR is much better than that of the traditional LSF method, and it also performs better than the other machine learning methods in the experiments. Compared with the LSF method, the phantoms experiment not only shows that LSTMR has an advantage in mapping accuracy, but also has a huge performance advantage in inversion speed.
Jäger et al. [23] combined spatial resolution technology with multiple artificial neural network to extract optical properties (OPs). According to their reports, the normalized mean absolute errors (NMAEs) of μ a and μ s are 6.1% and 2.9%, respectively. The MAE of the deep neural network mapping model proposed by Stier [1] for μ s is 6.8%. Song [28] developed an OPs mapping model based on the deep neural network, and according to their study, the mean and standard deviation of the percentage errors of μ a and μ s were 0.0 ± 1.4 and 0.0 ± 0.28%, respectively. Sun proposed an artificial neural network method [25] for the inversion of OPs based on multi-frequency inversion, where the NMAEs of μ a and μ s are 0.18% and 0.027%, respectively. Sun used seven frequencies for inversion, whereas we used only two frequencies to achieve comparable accuracy. Panigrahi [26] demonstrated that the random forest regressor (RFR) method was a highly accurate and fast inversion method, and the MAE of OPs could be reduced to 0.556% and 0.126%, respectively. Comparing the MAE, it could be found that the μ a of LSTMR was more accurate, whereas the μ s of RFR was more accurate. The μ s of LSTMR is slightly less accurate than RFR due to the large gradient (the interval of μ s is 0.126 mm−1) of the μ s of the dataset.
The phantom experimental results showed that the LSTMR not only has better inversion accuracy than other methods, but also had a dramatic improvement in inversion speed, with a speed improvement of 2 to 3 orders of magnitude compared to the LSF. The LSF method requires continuous iterations for optimization until the error is within an acceptable range, which consumes a lot of time during the iterations, and which is evident as the number of frequency increases. The look-up table uses a search strategy in which the time taken for the search process increases exponentially as the number of frequencies increases. However, using multiple spatial frequencies for inversion can improve the robustness of the model [18]. The machine learning method can solve the slow speed problem in the process of multi-frequency inversion, and the mapping accuracy can be improved at the same time. As can be seen from Table 3, LSTMR is more than 100 times faster than LSF. This is also consistent with the results of Zhao’s study [27] and Song’s study [28].

5. Conclusions

The proposed Long Short-term Memory Regressor (LSTMR) method is an ideal mapping model to replace the inversion method based on the optical transport model. It can quickly extract optical properties (OPs), but without loss of estimation accuracy. This study not only compared the LSTMR method to the traditional LSF method, but also to other machine learning methods that appeared in journals, and it turns out that the LSTMR method is indeed a good choice. The experimental results show that the accuracy of LSTMR inversion is comparable to or even better than that of the previous literature. Furthermore, the speed of LSTMR is improved by 2~3 orders of magnitude compared with LSF. These pear experiments proved that LSTMR can accurately distinguish bruised tissue, which provides a feasible solution for the quality assessment of pears. All experiments are based on our developed miniaturized Spatial Frequency Domain Imaging system. This study laid the hardware foundation and method foundation for real-time and portable OPs acquisition of pears, and further applied it to pear quality evaluation.

Author Contributions

Conceptualization, S.X. and X.F.; methodology, S.X.; software, S.X.; validation, S.X., Y.L., Y.Y. and J.Z.; formal analysis, S.X.; investigation, S.X.; resources, X.F.; data curation, S.X.; writing—original draft preparation, S.X.; writing—review and editing, S.X. and X.F.; visualization, S.X.; supervision, X.F.; project administration, X.F.; funding acquisition, X.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the National Natural Science Fund of China (32071904), the Natural Science Fund of Zhejiang Province (LY20C130008), and the Science Foundation of Zhejiang Sci-Tech Univ. (ZSTU) (Grand No. 16022177-Y).

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Acknowledgments

The authors thank anonymous reviewers for providing helpful suggestions for improving the quality of this manuscript.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Stier, A.C.; Goth, W.; Hurley, A.; Brown, T.; Feng, X.; Zhang, Y.; Lopes, F.C.P.S.; Sebastian, K.R.; Ren, P.; Fox, M.C.; et al. Imaging sub-diffuse optical properties of cancerous and normal skin tissue using machine learning-aided spatial frequency domain imaging. J. Biomed. Opt. 2021, 26, 096007. [Google Scholar] [CrossRef] [PubMed]
  2. Yafi, A.; Vetter, T.S.; Scholz, T.; Patel, S.; Saager, R.B.; Cuccia, D.J.; Evans, G.R.; Durkin, A.J. Postoperative quantitative assessment of reconstructive tissue status in a cutaneous flap model using spatial frequency domain imaging. Plast. Reconstr. Surg. 2011, 127, 117–130. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  3. Hu, D.; Fu, X.; He, X.; Ying, Y. Noncontact and wide-field characterization of the absorption and scattering properties of apple fruit using spatial-frequency domain imaging. Sci. Rep. 2016, 6, 37920. [Google Scholar] [CrossRef] [PubMed]
  4. Lohner, S.A.; Biegert, K.; Nothelfer, S.; Hohmann, A.; McCormick, R.; Kienle, A. Determining the optical properties of apple tissue and their dependence on physiological and morphological characteristics during maturation. Part 1: Spatial Frequency Domain Imaging. Postharvest Biol. Technol. 2021, 181, 111647. [Google Scholar] [CrossRef]
  5. Luo, Y.; Dai, L.; Jiang, X.; Fu, X. Measurement of absorption and scattering properties of milk using a hyperspectral spatial frequency domain imaging system. J. Food Meas. Charact. 2022, 16, 753–761. [Google Scholar] [CrossRef]
  6. He, X.; Fu, X.; Rao, X.; Fang, Z. Assessing firmness and SSC of pears based on absorption and scattering properties using an automatic integrating sphere system from 400 to 1150 nm. Postharvest Biol. Technol. 2016, 121, 62–70. [Google Scholar] [CrossRef]
  7. Lurie, S.; Vanoli, M.; Dagar, A.; Weksler, A.; Lovati, F.; Zerbini, P.E.; Spinelli, L.; Torricelli, A.; Feng, J.; Rizzolo, A. Chilling injury in stored nectarines and its detection by time-resolved reflectance spectroscopy. Postharvest Biol. Technol. 2011, 59, 211–218. [Google Scholar] [CrossRef]
  8. Chen, Y.W.; Chen, C.C.; Huang, P.J.; Tseng, S.H. Artificial neural networks for retrieving absorption and reduced scattering spectra from frequency-domain diffuse reflectance spectroscopy at short source-detector separation. Biomed. Opt. Express 2016, 7, 1496–1510. [Google Scholar] [CrossRef] [Green Version]
  9. Hu, D.; Lu, R.; Huang, Y.; Ying, Y.; Fu, X. Effects of optical variables in a single integrating sphere system on estimation of scattering properties of turbid media. Biosyst. Eng. 2020, 194, 82–98. [Google Scholar] [CrossRef]
  10. Rowland, R.A.; Ponticorvo, A.; Baldado, A.L.; Kennedy, G.T.; Burmeister, D.M.; Christy, R.J.J.; Bernal, N.P.; Durkin, A.J. Burn wound classification model using spatial frequency-domain imaging and machine learning. J. Biomed. Opt. 2019, 24, 056007. [Google Scholar]
  11. Fu, X.; Jiang, X.; Dai, L.; Luo, Y. Study of spatial frequency domain imaging technique for turbid media optical property estimation and application. In Optical Metrology and Inspection for Industrial Applications VII (OMIIA 2020); SPIE: Bellingham, WA, USA, 2020; Volume 11552. [Google Scholar] [CrossRef]
  12. He, X.; Fu, X.; Li, T.; Rao, X. Spatial frequency domain imaging for detecting bruises of pears. J. Food Meas. Charact. 2018, 12, 1266–1273. [Google Scholar] [CrossRef]
  13. He, X.; Hu, D.; Fu, X.; Rao, X. Spatial frequency domain imaging for determining absorption and scattering properties of bruised pears based on profile corrected diffused reflectance. Postharvest Biol. Technol. 2021, 179, 111570. [Google Scholar] [CrossRef]
  14. Jacques, S.L.; Wang, L. Monte Carlo Modeling of Light Transport in Tissues; Welch, A.J., Van Gemert, M.J.C., Eds.; Optical-Thermal Response of Laser-Irradiated Tissue, Lasers, Photonics, and Electro-Optics; Springer: Boston, MA, USA, 1995; pp. 73–100. [Google Scholar]
  15. Marquet, P.; Bevilacqua, F.P.; Depeursinge, C.D.; de Haller, E.B. Determination of reduced scattering and absorption coefficients by a single charge-coupled-device array measurement, Part I: Comparison between experiments and simulations. Opt. Eng. 1995, 34, 2055–2063. [Google Scholar] [CrossRef]
  16. Erickson, T.A.; Mazhar, A.; Cuccia, D.J.; Durkin, A.J.; Tunnell, J.W. Lookup-table method for imaging optical properties with structured illumination beyond the diffusion theory regime. J. Biomed. Opt. 2010, 15, 036013. [Google Scholar] [CrossRef] [PubMed]
  17. Angelo, J.; Vargas, C.R.; Lee, B.T.; Bigio, I.J.; Gioux, S. Ultrafast optical property map generation using lookup tables. J. Biomed. Opt. 2016, 21, 110501. [Google Scholar] [CrossRef] [Green Version]
  18. Pera, V.; Karrobi, K.; Tabassum, S.; Teng, F.; Roblyer, D. Optical property uncertainty estimates for spatial frequency domain imaging. biomed. Opt. Express 2018, 9, 661–678. [Google Scholar] [CrossRef] [PubMed]
  19. Lin, A.J.; Ponticorvo, A.; Konecky, S.D.; Cui, H.; Rice, T.B.; Choi, B.; Durkin, A.J.; Tromberg, B.J. Visible spatial frequency domain imaging with a digital light microprojector. J. Biomed. Opt. 2013, 18, 096007. [Google Scholar] [CrossRef] [Green Version]
  20. Mahadevkar, S.V.; Khemani, B.; Patil, S.; Kotecha, K.; Vora, D.R.; Abraham, A.; Gabralla, L.A. A review on machine learning styles in computer vision—Techniques and future directions. IEEE Access 2022, 10, 107293–107329. [Google Scholar] [CrossRef]
  21. Kaya, F.; Keshavarzi, A.; Francaviglia, R.; Kaplan, G.; Başayiğit, L.; Dedeoğlu, M. Assessing machine learning-based prediction under different agricultural practices for digital mapping of soil organic carbon and available phosphorus. Agriculture 2022, 12, 1062. [Google Scholar] [CrossRef]
  22. Geng, X.; Mao, X.; Wu, H.; Wang, S.; Xue, W.; Zhang, G.; Ullah, A.; Wang, H. A hybrid machine learning model for predicting continuous cooling transformation diagrams in welding heat-affected zone of low alloy steels. J. Mater. Sci. Technol. 2022, 107, 207–215. [Google Scholar] [CrossRef]
  23. Jäger, M.; Foschum, F.; Kienle, A. Application of multiple artificial neural networks for the determination of the optical properties of turbid media. J. Biomed. Opt. 2013, 18, 057005. [Google Scholar] [CrossRef] [PubMed]
  24. He, X.; Jiang, X.; Fu, X.; Gao, Y.; Rao, X. Least squares support vector machine regression combined with Monte Carlo simulation based on the spatial frequency domain imaging for the detection of optical properties of pear. Postharvest Biol. Technol. 2018, 145, 1–9. [Google Scholar] [CrossRef]
  25. Sun, Z.; Xie, L.; Hu, D.; Ying, Y. An artificial neural network model for accurate and efficient optical property mapping from spatial-frequency domain images. Comput. Electron. Agric. 2021, 188, 106340. [Google Scholar] [CrossRef]
  26. Panigrahi, S.; Gioux, S. Machine learning approach for rapid and accurate estimation of optical properties using spatial frequency domain imaging. J. Biomed. Opt. 2018, 24, 071606. [Google Scholar] [CrossRef] [PubMed]
  27. Zhao, Y.; Deng, Y.; Bao, F.; Peterson, H.; Istfan, R.; Roblyer, D. Deep learning model for ultrafast multifrequency optical property extractions for spatial frequency domain imaging. Opt. Lett. 2018, 43, 5669–5672. [Google Scholar] [CrossRef] [PubMed]
  28. Song, B.; Jia, W.; Zhao, Y.; Huang, H.; Fan, Y. Ultracompact deep neural network for ultrafast optical property extraction in Spatial Frequency Domain Imaging (SFDI). Photonics 2022, 9, 327. [Google Scholar] [CrossRef]
  29. Hochreiter, S.; Schmidhuber, J. Long Short-term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  30. Cuccia, D.J.; Bevilacqua, F.P.; Durkin, A.J.; Ayers, F.R.; Tromberg, B.J. Quantitation and mapping of tissue optical properties using modulated imaging. J. Biomed. Opt. 2009, 14, 024012. [Google Scholar] [CrossRef]
  31. Jacques, S.L. Time-resolved reflectance spectroscopy in turbid tissues. IEEE. Trans. Biomed. Eng. 1989, 36, 1155–1161. [Google Scholar] [CrossRef]
  32. Wang, L.; Jacques, S.L.; Zheng, L. MCML-Monte Carlo modeling of light transport in multi-layered tissues. Comput. Methods Programs Biomed. 1995, 47, 131–146. [Google Scholar] [CrossRef]
  33. Alerstam, E.; Svensson, T.; Andersson-Engels, T. Parallel computing with graphics processing units for high-speed monte carlo simulation of photon migration. J. Biomed. Opt. 2008, 13, 060504. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  34. Mätzler, C. MATLAB Functions for Mie Scattering and Absorption. 2002. Available online: https://omlc.org/software/mie/maetzlermie/Maetzler2002.pdf (accessed on 17 June 2021).
  35. Luo, Y.; Jiang, X.; Fu, X. Spatial frequency domain imaging system calibration, correction and application for pear surface damage detection. Foods 2021, 10, 2151. [Google Scholar] [CrossRef] [PubMed]
Figure 1. (a) for SFDI instrumentation and (b) for data processing.
Figure 1. (a) for SFDI instrumentation and (b) for data processing.
Foods 12 00238 g001
Figure 2. The Long Short-term Memory Regressor Model.
Figure 2. The Long Short-term Memory Regressor Model.
Foods 12 00238 g002
Figure 3. The Mean absolute errors of different models in predicting optical properties. The horizontal coordinate is the mapping model for different high frequencies. The numbers marked in red are the minimum mean absolute errors.
Figure 3. The Mean absolute errors of different models in predicting optical properties. The horizontal coordinate is the mapping model for different high frequencies. The numbers marked in red are the minimum mean absolute errors.
Foods 12 00238 g003
Figure 4. Linearity between the measured and calculated values of the optical properties in the simulation experiments, (a) is for the absorption coefficient and (b) is for the reduced scattering coefficient.
Figure 4. Linearity between the measured and calculated values of the optical properties in the simulation experiments, (a) is for the absorption coefficient and (b) is for the reduced scattering coefficient.
Foods 12 00238 g004
Figure 5. Performance metrics for different models in the phantom experiment for absorption coefficient.
Figure 5. Performance metrics for different models in the phantom experiment for absorption coefficient.
Foods 12 00238 g005
Figure 6. Performance metrics for different models in the phantom experiment for reduced scattering coefficient.
Figure 6. Performance metrics for different models in the phantom experiment for reduced scattering coefficient.
Foods 12 00238 g006
Figure 7. Changes in the absorption coefficient of bruised tissue of ‘crown’ pears.
Figure 7. Changes in the absorption coefficient of bruised tissue of ‘crown’ pears.
Foods 12 00238 g007
Figure 8. Changes in the reduced scattering coefficient of bruised tissue of ‘crown’ pears. The red box indicates changes in tissue optical properties in the bruised area of the pear.
Figure 8. Changes in the reduced scattering coefficient of bruised tissue of ‘crown’ pears. The red box indicates changes in tissue optical properties in the bruised area of the pear.
Foods 12 00238 g008
Table 1. Parameter settings for the Monte Carlo simulations.
Table 1. Parameter settings for the Monte Carlo simulations.
ParametersSymbols 1Value
Number of photonsN3,000,000
Resolutiondz 2, dr 30.01 cm
Anisotropyg0.7
The thickness of tissued5 cm
Refractive index airn01
Refractive index of tissuen11.34
1 The symbols corresponding to the parameters. 2 The thickness of each tissue layer in the Monte Carlo simulations. 3 The thickness of each tissue layer in the radial direction of the light source.
Table 2. Predictive performance of different mapping models in simulation experiments.
Table 2. Predictive performance of different mapping models in simulation experiments.
OPsMetricLSTMRANNRNNRFRLSF
μ a NMAE0.00120.00690.00770.00490.0506
MAE0.00320.01510.01810.01710.0597
RMSE0.00020.00100.00120.00070.0207
R21.00000.99990.99990.99990.9999
μ s NMAE0.00090.00460.00530.00360.0598
MAE0.00210.01270.01390.00230.0770
RMSE0.00600.02980.03500.02260.3323
R21.00000.99710.99660.99780.9996
Table 3. The speed of mapping from diffuse reflectance to optical properties.
Table 3. The speed of mapping from diffuse reflectance to optical properties.
MethodsResolution/PixelSpeed ms/Pixel
LSF300 × 3000.6441
LSTMR300 × 3000.0028
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xing, S.; Zhang, J.; Luo, Y.; Yang, Y.; Fu, X. Extracting Tissue Optical Properties and Detecting Bruised Tissue in Pears Quickly and Accurately Based on Spatial Frequency Domain Imaging and Machine Learning. Foods 2023, 12, 238. https://doi.org/10.3390/foods12020238

AMA Style

Xing S, Zhang J, Luo Y, Yang Y, Fu X. Extracting Tissue Optical Properties and Detecting Bruised Tissue in Pears Quickly and Accurately Based on Spatial Frequency Domain Imaging and Machine Learning. Foods. 2023; 12(2):238. https://doi.org/10.3390/foods12020238

Chicago/Turabian Style

Xing, Shengqiang, Jiaming Zhang, Yifeng Luo, Yang Yang, and Xiaping Fu. 2023. "Extracting Tissue Optical Properties and Detecting Bruised Tissue in Pears Quickly and Accurately Based on Spatial Frequency Domain Imaging and Machine Learning" Foods 12, no. 2: 238. https://doi.org/10.3390/foods12020238

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop