Abstract
In order to reduce the number of parameters in the Chinese herbal medicine recognition model while maintaining accuracy, this paper takes 20 classes of Chinese herbs as the research object and proposes a recognition network based on knowledge distillation and cross-attention - ShuffleCANet (ShuffleNet and Cross-Attention). Firstly, transfer learning was used for experiments on 20 classic networks, and DenseNet and RegNet were selected as dual teacher models. Then, considering the parameter count and recognition accuracy, ShuffleNet was determined as the student model, and a new cross-attention mechanism was proposed. This cross-attention model replaces Conv5 in ShuffleNet to achieve the goal of lightweight design while maintaining accuracy. Finally, experiments on the public dataset NB-TCM-CHM showed that the accuracy (ACC) and F1_score of the proposed ShuffleCANet model reached 98.8%, with only 128.66M model parameters. Compared with the baseline model ShuffleNet, the parameters are reduced by nearly 50%, but the accuracy is improved by about 1.3%, proving this method's effectiveness.