Efficient Near-Infrared Spectrum Detection in Nondestructive Wood Testing via Transfer Network Redesign
Abstract
:1. Introduction
- An exploration of the applicability of the basic structures in deep networks, including convolutional structures, fully connected structures, pooling structures, etc., and domain adaptation network techniques such as maximum mean discrepancies, optimal transport, and adversarial machine learning from the standpoint of near-infrared spectroscopy analysis.
- Based on the analysis presented in this paper, a modification of five mainstream domain adaptation networks was conducted to enable these networks to meet the requirements of near-infrared spectroscopy calibration transfer models, thereby facilitating their application in near-infrared spectroscopy analysis technology.
2. Theories and Methods
2.1. Fundamental Structure of Deep Neural Networks
2.1.1. Convolution Layer in Chemometrics and NIRS
- A straightforward multivariate linear connection exists between the concentrations of the components and the group characteristics observed in NIR spectra. In such a situation, indiscriminate convolution operations only disrupt the identification of characteristic spectral bands.
- The NIR spectrum results from the amalgamation of absorption peaks, and the deconvolution method, employing Fourier transform, can effectively disentangle the spectrum into individual absorption peaks. Conversely, the convolution operation lacks both physical and practical meaning within this particular context.
2.1.2. Fully Connected Layer in Chemometrics and NIRS
2.1.3. Maxpool Layer in Chemometrics and NIRS
2.1.4. Activation Function in Chemometrics and NIRS
2.1.5. Summary
2.2. Unsupervised Transfer Learning
2.2.1. Multiple Kernel Variant of MMD
2.2.2. Conditional Domain Adversarial Network
- (1)
- Let G be the classifier of the source domain deep network and be the cross-entropy loss. To ensure a lower source domain error risk, we seek the deep network solution that minimizes the expected .
- (2)
- Let D be the discriminator for the cross-source and target domains. Set and , corresponding to the classifier result and network feature representation, respectively; and is the discriminator result for g and f. Then, can be represented as a joint distribution across the source and target domains [41].
- Use MSE instead of cross-entropy loss.
- Propose a new weight assignment formula based on the histogram distribution function constructed from the labeled data in the dataset.
2.2.3. Margin Disparity Discrepancy Method
2.2.4. Enhanced Transport Distance for Unsupervised DA
2.2.5. Global–Local Regularization via Distributional Robustness
3. Results and Discussion
3.1. Experimental Analysis of NIRS Datasets
- Optimizer:
- -
- RMSProp and Adam optimizers were chosen for the deep networks.
- -
- RMSProp optimizer parameter momentum was set to 0.9.
- -
- Learning rate was set to 0.001 for both optimizers.
- -
- Adam optimizer parameter momentum was set to 0.9.
- -
- Weight decay for Adam optimizer was set to 0.01.
- Activation Function:
- -
- The activation function selected was sigmoid.
- Transfer Loss Weight:
- -
- The weight for the transfer loss was set to 0.1.
3.2. Comparison and Discussion for Transfer Network Model
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
BP | backpropagation |
BSP | batch spectral penalization |
CDAN | Conditional Domain Adversarial Network |
CNNs | convolutional neural networks |
CT | calibration transfer |
DAN | deep adaptation network |
ELM | extreme learning machine |
ETD | enhanced transport distance |
FLOPS | floating-point operations per second |
GLM | generalized linear model |
GLOT | Globalized Loss Optimization Transfer |
MDPI | Multidisciplinary Digital Publishing Institute |
MMD | maximum mean discrepancies |
MSE | mean squared error |
NIR | near-infrared |
NIRS | near-infrared spectroscopy |
OT | optimal transport |
PAC | probably approximately correct |
PLS | partial least squares |
R-squared, R | coefficient of determination |
RMSE | root mean square error |
RMSEP | root mean square error of prediction |
RNNs | recurrent neural networks |
Unsupervised DA | unsupervised domain adaptation |
References
- Zhang, S.; Liu, S.; Shen, L.; Chen, S.; He, L.; Liu, A. Application of near-infrared spectroscopy for the nondestructive analysis of wheat flour: A review. Curr. Res. Food Sci. 2022, 5, 1305–1312. [Google Scholar] [CrossRef]
- Tsuchikawa, S.; Kobori, H. A review of recent application of near infrared spectroscopy to wood science and technology. J. Wood Sci. 2015, 61, 213–220. [Google Scholar] [CrossRef]
- Mishra, P.; Passos, D.; Marini, F.; Xu, J.; Amigo, J.M.; Gowen, A.A.; Jansen, J.J.; Biancolillo, A.; Roger, J.M.; Rutledge, D.N.; et al. Deep learning for near-infrared spectral data modelling: Hypes and benefits. TrAC Trends Anal. Chem. 2022, 157, 116804. [Google Scholar] [CrossRef]
- Cui, C.; Fearn, T. Modern practical convolutional neural networks for multivariate regression: Applications to NIR calibration. Chemom. Intell. Lab. Syst. 2018, 182, 9–20. [Google Scholar] [CrossRef]
- Ng, W.; Minasny, B.; Mendes, W.D.S.; Demattê, J.A.M. The influence of training sample size on the accuracy of deep learning models for the prediction of soil properties with near-infrared spectroscopy data. Soil 2020, 6, 565–578. [Google Scholar] [CrossRef]
- Ng, W.; Minasny, B.; Montazerolghaem, M.; Padarian, J.; Ferguson, R.; Bailey, S.; McBratney, A.B. Convolutional neural network for simultaneous prediction of several soil properties using visible/near-infrared, mid-infrared, and their combined spectra. Geoderma 2019, 352, 251–267. [Google Scholar] [CrossRef]
- Mishra, P.; Passos, D. A synergistic use of chemometrics and deep learning improved the predictive performance of near-infrared spectroscopy models for dry matter prediction in mango fruit. Chemom. Intell. Lab. Syst. 2021, 212, 104287. [Google Scholar] [CrossRef]
- Einarson, K.A.; Baum, A.; Olsen, T.B.; Larsen, J.; Armagan, I.; Santacoloma, P.A.; Clemmensen, L.K.H. Predicting pectin performance strength using near-infrared spectroscopic data: A comparative evaluation of 1-D convolutional neural network, partial least squares, and ridge regression modeling. J. Chemom. 2022, 36, e3348. [Google Scholar] [CrossRef]
- Riba, J.R.; Puig, R.; Cantero, R. Portable Instruments Based on NIR Sensors and Multivariate Statistical Methods for a Semiautomatic Quality Control of Textiles. Machines 2023, 11, 564. [Google Scholar] [CrossRef]
- Santos, F.D.; Vianna, S.G.; Cunha, P.H.; Folli, G.S.; de Paulo, E.H.; Moro, M.K.; Romão, W.; de Oliveira, E.C.; Filgueiras, P.R. Characterization of crude oils with a portable NIR spectrometer. Microchem. J. 2022, 181, 107696. [Google Scholar] [CrossRef]
- Kranenburg, R.F.; Ramaker, H.J.; Sap, S.; van Asten, A.C. A calibration friendly approach to identify drugs of abuse mixtures with a portable near-infrared analyzer. Drug Test. Anal. 2022, 14, 1089–1101. [Google Scholar] [CrossRef] [PubMed]
- Mishra, P.; Passos, D. Deep calibration transfer: Transferring deep learning models between infrared spectroscopy instruments. Infrared Phys. Technol. 2021, 117, 103863. [Google Scholar] [CrossRef]
- Mishra, P.; Nikzad-Langerodi, R. Partial least square regression versus domain invariant partial least square regression with application to near-infrared spectroscopy of fresh fruit. Infrared Phys. Technol. 2020, 111, 103547. [Google Scholar] [CrossRef]
- Mishra, P.; Roger, J.M.; Rutledge, D.N.; Woltering, E. Two standard-free approaches to correct for external influences on near-infrared spectra to make models widely applicable. Postharvest Biol. Technol. 2020, 170, 111326. [Google Scholar] [CrossRef]
- Workman, J.J. A Review of Calibration Transfer Practices and Instrument Differences in Spectroscopy. Appl. Spectrosc. 2018, 72, 340–365. [Google Scholar] [CrossRef]
- Malli, B.; Birlutiu, A.; Natschläger, T. Standard-free calibration transfer—An evaluation of different techniques. Chemom. Intell. Lab. Syst. 2017, 161, 49–60. [Google Scholar] [CrossRef]
- Folch-Fortuny, A.; Vitale, R.; de Noord, O.E.; Ferrer, A. Calibration transfer between NIR spectrometers: New proposals and a comparative study. J. Chemom. 2017, 31, e2874. [Google Scholar] [CrossRef]
- Galvan, D.; Bona, E.; Borsato, D.; Danieli, E.; Montazzolli Killner, M.H. Calibration Transfer of Partial Least Squares Regression Models between Desktop Nuclear Magnetic Resonance Spectrometers. Anal. Chem. 2020, 92, 12809–12816. [Google Scholar] [CrossRef]
- Zhuang, F.; Qi, Z.; Duan, K.; Xi, D.; Zhu, Y.; Zhu, H.; Xiong, H.; He, Q. A Comprehensive Survey on Transfer Learning. Proc. IEEE 2021, 109, 43–76. [Google Scholar] [CrossRef]
- Zhang, L.; Gao, X. Transfer Adaptation Learning: A Decade Survey. IEEE Trans. Neural Netw. Learn. Syst. 2022, 35, 23–44. [Google Scholar] [CrossRef]
- Gretton, A.; Borgwardt, K.M.; Rasch, M.J.; Schölkopf, B.; Smola, A. A Kernel Two-sample Test. J. Mach. Learn. Res. 2012, 13, 723–773. [Google Scholar]
- Long, M.; Cao, Y.; Wang, J.; Jordan, M.I. Learning Transferable Features with Deep Adaptation Networks. In JMLR Workshop and Conference Proceedings, Proceedings of the 32nd International Conference on Machine Learning (ICML), Lille, France, 6–11 July 2015; Bach, F.R., Blei, D.M., Eds.; JMLR: New York, NY, USA, 2015; Volume 37, pp. 97–105. [Google Scholar]
- Zhang, Y.; Liu, T.; Long, M.; Jordan, M.I. Bridging Theory and Algorithm for Domain Adaptation. In Proceedings of Machine Learning Research (PMLR), Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA, 9–15 June 2019; Chaudhuri, K., Salakhutdinov, R., Eds.; JMLR: New York, NY, USA, 2019; Volume 97, pp. 7404–7413. [Google Scholar]
- Phan, H.; Le, T.; Phung, T.; Tuan Bui, A.; Ho, N.; Phung, D. Global-Local Regularization Via Distributional Robustness. In Proceedings of Machine Learning Research (PMLR), Proceedings of the 26th International Conference on Artificial Intelligence and Statistics, Valencia, Spain, 25–27 April 2023; Ruiz, F., Dy, J., van de Meent, J.W., Eds.; JMLR: New York, NY, USA, 2023; Volume 206, pp. 7644–7664. [Google Scholar]
- Li, M.; Zhai, Y.; Luo, Y.W.; Ge, P.; Ren, C.X. Enhanced Transport Distance for Unsupervised Domain Adaptation. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; IEEE: New York, NY, USA, 2020; pp. 13933–13941. [Google Scholar]
- Chen, X.; Wang, S.; Long, M.; Wang, J. Transferability vs. Discriminability: Batch Spectral Penalization for Adversarial Domain Adaptation. Proc. Mach. Learn. Res. 2019, 97, 1081–1090. [Google Scholar]
- Durstewitz, D.; Koppe, G.; Thurm, M.I. Reconstructing computational system dynamics from neural data with recurrent neural networks. Nat. Rev. Neurosci. 2023, 24, 693–710. [Google Scholar] [CrossRef]
- Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.; Duan, Y.; Al-Shamma, O.; Santamaría, J.; Fadhel, M.A.; Al-Amidie, M.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. J. Big Data 2021, 8, 53. [Google Scholar] [CrossRef]
- Acquarelli, J.; van Laarhoven, T.; Gerretzen, J.; Tran, T.N.; Buydens, L.M.; Marchiori, E. Convolutional neural networks for vibrational spectroscopic data analysis. Anal. Chim. Acta 2017, 954, 22–31. [Google Scholar] [CrossRef]
- Kim, W.; Song, J.M.; Park, K.R. Multimodal Biometric Recognition Based on Convolutional Neural Network by the Fusion of Finger-Vein and Finger Shape Using Near-Infrared (NIR) Camera Sensor. Sensors 2018, 18, 2296. [Google Scholar] [CrossRef]
- Trakoolwilaiwan, T.; Behboodi, B.; Lee, J.; Kim, K.; Choi, J.W. Convolutional neural network for high-accuracy functional near-infrared spectroscopy in a brain-computer interface: Three-class classification of rest, right-, and left-hand motor execution. Neurophotonics 2018, 5, 011008. [Google Scholar] [CrossRef]
- Yuanyuan, C.; Zhibin, W. Quantitative analysis modeling of infrared spectroscopy based on ensemble convolutional neural networks. Chemom. Intell. Lab. Syst. 2018, 181, 1–10. [Google Scholar] [CrossRef]
- Bjerrum, E.J.; Glahder, M.; Skov, T. Data Augmentation of Spectral Data for Convolutional Neural Network (CNN) Based Deep Chemometrics. arXiv 2017, arXiv:1710.01927. [Google Scholar] [CrossRef]
- Tooke, P. Fourier self-deconvolution in IR spectroscopy. TrAC Trends Anal. Chem. 1988, 7, 130–136. [Google Scholar] [CrossRef]
- Vazhnova, T.; Lukyanov, D.B. Fourier Self-Deconvolution of the IR Spectra as a Tool for Investigation of Distinct Functional Groups in Porous Materials: Brønsted Acid Sites in Zeolites. Anal. Chem. 2013, 85, 11291–11296. [Google Scholar] [CrossRef]
- Zhao, L.; Zhang, M.; Wang, H.; Mujumdar, A.S. Monitoring of free fatty acid content in mixed frying oils by means of LF-NMR and NIR combined with BP-ANN. Food Control 2022, 133, 108599. [Google Scholar] [CrossRef]
- Zeng, J.; Guo, Y.; Han, Y.; Li, Z.; Yang, Z.; Chai, Q.; Wang, W.; Zhang, Y.; Fu, C. A Review of the Discriminant Analysis Methods for Food Quality Based on Near-Infrared Spectroscopy and Pattern Recognition. Molecules 2021, 26, 749. [Google Scholar] [CrossRef]
- Chen, W.R.; Bin, J.; Lu, H.M.; Zhang, Z.M.; Liang, Y.Z. Calibration transfer via an extreme learning machine auto-encoder. Analyst 2016, 141, 1973–1980. [Google Scholar] [CrossRef]
- Li, H.; Kadav, A.; Durdanovic, I.; Samet, H.; Graf, H.P. Pruning Filters for Efficient ConvNets. arXiv 2017, arXiv:1608.08710. [Google Scholar] [CrossRef]
- Singh, P.; Kadi, V.S.R.; Namboodiri, V.P. FALF ConvNets: Fatuous auxiliary loss based filter-pruning for efficient deep CNNs. Image Vis. Comput. 2020, 93, 103857. [Google Scholar] [CrossRef]
- Long, M.; CAO, Z.; Wang, J.; Jordan, M.I. Conditional Adversarial Domain Adaptation. In Advances in Neural Information Processing Systems; Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., Garnett, R., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2018; Volume 31. [Google Scholar]
- Struckmeier, O.; Redko, I.; Mallasto, A.; Arndt, K.; Heinonen, M.; Kyrki, V. Learning representations that are closed-form Monge mapping optimal with application to domain adaptation. arXiv 2023, arXiv:2305.07500. [Google Scholar] [CrossRef]
- Coeurdoux, F.; Dobigeon, N.; Chainais, P. Learning Optimal Transport Between Two Empirical Distributions with Normalizing Flows. In Machine Learning and Knowledge Discovery in Databases; Amini, M.R., Canu, S., Fischer, A., Guns, T., Kralj Novak, P., Tsoumakas, G., Eds.; Springer Nature: Cham, Switzerland, 2022; pp. 275–290. [Google Scholar]
- GB/T 1938-2009; Method of Testing in Tensile Strength Parallel to Grain of Wood. Anhui Agricultural University: Hefei, China, 2009. Available online: https://www.chinesestandard.net/PDF/English.aspx/GBT1938-2009 (accessed on 7 January 2024).
- Robert, C. Machine Learning, a Probabilistic Perspective. Chance 2014, 27, 62–63. [Google Scholar] [CrossRef]
- Jiang, B.; Zhang, X.; Cai, T. Estimating the Confidence Interval for Prediction Errors of Support Vector Machine Classifiers. J. Mach. Learn. Res. 2008, 9, 521–540. [Google Scholar]
- Wager, S.; Hastie, T.; Efron, B. Confidence Intervals for Random Forests: The Jackknife and the Infinitesimal Jackknife. J. Mach. Learn. Res. 2014, 15, 1625–1651. [Google Scholar]
- Hellström, F.; Durisi, G. Generalization Bounds via Information Density and Conditional Information Density. IEEE J. Sel. Areas Inf. Theory 2020, 1, 824–839. [Google Scholar] [CrossRef]
- Zhang, Y.; Deng, B.; Tang, H.; Zhang, L.; Jia, K. Unsupervised Multi-Class Domain Adaptation: Theory, Algorithms, and Practice. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 2775–2792. [Google Scholar] [CrossRef] [PubMed]
NIRS Analyzer | Wavelength | Dataset Size |
---|---|---|
NIRquest512 | 512 | 196 |
NIR–NT–spectrometer–OEM system | 118 | 270 |
Training Dataset Split Ratio | CDAN | ETD | GLOT | MDD | DAN |
---|---|---|---|---|---|
0.7 | 92.33 ± 1.32 | 90.16 ± 1.81 | 94.16 ± 1.37 | 88.19 ± 1.49 | 87.57 ± 2.85 |
0.65 | 86.81 ± 2.27 | 89.34 ± 1.49 | 92.12 ± 1.48 | 87.73 ± 1.48 | 86.82 ± 1.81 |
0.6 | 83.33 ± 2.31 | 85.17 ± 2.28 | 91.47 ± 1.85 | 85.39 ± 2.34 | 83.83 ± 3.36 |
0.55 | 80.73 ± 3.17 | 84.19 ± 2.79 | 89.12 ± 2.45 | 84.38 ± 2.48 | 88.28 ± 2.84 |
0.5 | 83.45 ± 1.32 | 82.97 ± 2.29 | 82.45 ± 2.79 | 85.19 ± 2.17 | 82.49 ± 1.47 |
0.45 | 81.29 ± 2.51 | 79.63 ± 2.28 | 81.80 ± 2.57 | 82.27 ± 2.21 | 81.84 ± 2.85 |
0.4 | 77.28 ± 2.49 | 71.27 ± 2.01 | 75.23 ± 2.95 | 78.23 ± 2.39 | 80.19 ± 2.34 |
0.35 | 75.82 ± 4.92 | 72.72 ± 2.93 | 72.45 ± 2.71 | 76.90 ± 3.87 | 77.92 ± 2.48 |
0.3 | 73.19 ± 4.83 | 70.34 ± 3.34 | 68.27 ± 2.49 | 74.18 ± 3.41 | 74.82 ± 2.60 |
0.25 | 72.10 ± 4.31 | 72.23 ± 1.89 | 67.56 ± 2.45 | 75.54 ± 3.23 | 72.65 ± 2.77 |
DS | PDS | SST | CDAN | GLOT | |
---|---|---|---|---|---|
R | 79.29 | 83.46 | 85.91 | 92.33 | 94.16 |
RMSECV | 15.169 | 13.756 | 12.809 | 7.359 | 10.692 |
R | 70.23 | 72.8 | 76.53 | 82.11 | 83.59 |
RMSEP | 23.967 | 19.395 | 21.798 | 12.237 | 11.582 |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Jiang, D.; Wang, K.; Li, H.; Zhang, Y. Efficient Near-Infrared Spectrum Detection in Nondestructive Wood Testing via Transfer Network Redesign. Sensors 2024, 24, 1245. https://doi.org/10.3390/s24041245
Jiang D, Wang K, Li H, Zhang Y. Efficient Near-Infrared Spectrum Detection in Nondestructive Wood Testing via Transfer Network Redesign. Sensors. 2024; 24(4):1245. https://doi.org/10.3390/s24041245
Chicago/Turabian StyleJiang, Dapeng, Keqi Wang, Hongbo Li, and Yizhuo Zhang. 2024. "Efficient Near-Infrared Spectrum Detection in Nondestructive Wood Testing via Transfer Network Redesign" Sensors 24, no. 4: 1245. https://doi.org/10.3390/s24041245
APA StyleJiang, D., Wang, K., Li, H., & Zhang, Y. (2024). Efficient Near-Infrared Spectrum Detection in Nondestructive Wood Testing via Transfer Network Redesign. Sensors, 24(4), 1245. https://doi.org/10.3390/s24041245