Multiple Attentional Pyramid Networks for Chinese Herbal Recognition

Yingxue Xu, Guihua Wen, Yang Hu, Mingnan Luo, Dan Dai, Yishan Zhuang, Wendy Hall

Introduction

Traditional Chinese Medicine (TCM) relies heavily on the accurate identification of herbs, a task usually reserved for highly trained professionals. Automating this via computer vision is difficult due to multi-granularity—where some herbs are distinguished by global shape while others require fine-grained textural analysis—and a historical lack of standardized datasets. Standard Convolutional Neural Networks (CNNs) often struggle with these varying scales, and while Feature Pyramid Networks (FPNs) address multi-scale features, their fixed fusion methods often lead to redundancy.

The CNH-98 Dataset

To address data scarcity, the authors introduced CNH-98, the first standard image dataset for Chinese herbal recognition. It contains 9,184 images across 98 classes, covering eight main species groups including Fruits & Seeds, Rhizomes, Flowers, Bark, and Thallophytes. The dataset combines crawled images with hand-collected samples from real-world medicinal stores, ensuring both diversity and practical relevance.

Examples of Chinese herbs from the CNH-98 dataset categorized by species groups.

Attentional Pyramid Networks (APN)

The proposed Attentional Pyramid Network (APN) enhances the standard FPN architecture by introducing two novel attention mechanisms designed to balance global context and local detail:

  1. Competitive Attention (CA): A channel-wise mechanism that forces the "spatial flow" (bottom-up, detail-rich) and "semantic flow" (top-down, context-rich) to compete. This allows the model to dynamically prioritize the most relevant information stream for a given image.
  2. Spatial Collaborative Attention (SCA): A pixel-wise mechanism that identifies informative regions, allowing global and local features to complement each other across pyramid levels.

The authors explored several variants of SCA, including a fully parametric squeeze-excitation version ($\theta^+$) that learns complex relationships between channels and spatial regions.

Architecture of the Attentional Pyramid Network (APN) featuring the CSCA (Competitive and Spatial Collaborative Attention) module.

Key Results and Efficiency

The APN-CSCA-50 achieved a 94.9% Top-1 accuracy on the CNH-98 dataset, consistently outperforming baselines like standard FPN, SENet, and CBAM. Notably, the APN-CSCA-18 outperformed deeper models like ResNet-34 while using only ~58% of the parameters and ~78% of the FLOPs. This efficiency suggests that intelligent multi-scale feature fusion is more critical for botanical tasks than simply increasing model depth.

Conclusion

By introducing the CNH-98 dataset and the APN architecture, this work provides a robust foundation for automated herbal recognition. Future work aims to address data imbalance in rare categories and incorporate heuristic knowledge from human herbalists to further refine model performance.

Summary updated

BibTeX
@article{xu2021multiple,
  author = {Yingxue Xu and Guihua Wen and Yang Hu and Mingnan Luo and Dan Dai and Yishan Zhuang and Wendy Hall},
  title = {{Multiple Attentional Pyramid Networks for Chinese Herbal Recognition}},
  journal = {Pattern Recognition},
  year = {2021},
  doi = {10.1016/j.patcog.2020.107558},
}
Figure