The Identification of Fritillaria Species Using Hyperspectral Imaging with Enhanced One-Dimensional Convolutional Neural Networks via Attention Mechanism

Foods. 2023 Nov 16;12(22):4153. doi: 10.3390/foods12224153.

Abstract

Combining deep learning and hyperspectral imaging (HSI) has proven to be an effective approach in the quality control of medicinal and edible plants. Nonetheless, hyperspectral data contains redundant information and highly correlated characteristic bands, which can adversely impact sample identification. To address this issue, we proposed an enhanced one-dimensional convolutional neural network (1DCNN) with an attention mechanism. Given an intermediate feature map, two attention modules are constructed along two separate dimensions, channel and spectral, and then combined to enhance relevant features and to suppress irrelevant ones. Validated by Fritillaria datasets, the results demonstrate that an attention-enhanced 1DCNN model outperforms several machine learning algorithms and shows consistent improvements over a vanilla 1DCNN. Notably under VNIR and SWIR lenses, the model obtained 98.97% and 99.35% for binary classification between Fritillariae Cirrhosae Bulbus (FCB) and other non-FCB species, respectively. Additionally, it still achieved an extraordinary accuracy of 97.64% and 98.39% for eight-category classification among Fritillaria species. This study demonstrated the application of HSI with artificial intelligence can serve as a reliable, efficient, and non-destructive quality control method for authenticating Fritillaria species. Moreover, our findings also illustrated the great potential of the attention mechanism in enhancing the performance of the vanilla 1DCNN method, providing reference for other HSI-related quality controls of plants with medicinal and edible uses.

Keywords: Fritillaria identification; attention mechanism; hyperspectral imaging; medicinal and edible plants; one-dimensional convolutional neural network.