Deep learning–driven classification of 46 medicinal macrofungi species: comparative analysis, fusion strategies, and explainability insights
摘要
Accurate identification of medicinal and wild macrofungi remains a major challenge due to high intra-species variability, visually overlapping morphologies, and inconsistent field-level imaging conditions. Existing deep learning studies typically focus on limited taxonomic scopes (5–12 classes) and lack systematic comparisons across modern convolutional and transformer architectures, leaving a significant gap in fine-grained fungal classification. This study introduces a comprehensive evaluation framework covering 46 macrofungal species, integrating 18 single backbones and three feature-level fusion strategies under a unified, fully reproducible protocol. All models were trained with identical preprocessing, stratified partitions, deterministic seeds, and a two-stage fine-tuning pipeline to ensure fair architectural comparison. Among single models, ConvNeXt-Base achieved the strongest performance with 96.59% accuracy, 0.966 macro-F1, 0.965 MCC, 0.9997 macro-AUC, and 0.1054 log-loss, exhibiting a near-diagonal confusion matrix where 25 classes reached perfect recall. Although feature-level fusion did not exceed the best single model in overall accuracy, it improved stability for several visually difficult taxa. The best ensemble, ConvNeXt-Base + DeiT-Base, achieved 95.85% accuracy, 0.958 macro-F1, and 0.9995 macro-AUC, remaining close to the ConvNeXt-Base baseline while providing complementary class-level robustness. The reported latency of ≈0.0021 s/image refers only to the precomputed-feature mode, in which backbone features are already cached and only the shared MLP head is evaluated. Therefore, this value should not be interpreted as full end-to-end inference latency for newly acquired field images. Explainability analyses using Grad-CAM and Integrated Gradients demonstrated that both single and fused models rely on biologically meaningful structures such as gill edges, pore surfaces, cap margins, and hymenophore textures. Overall, this study provides one of the most extensive quantitative benchmarks for macrofungal recognition to date and establishes a reproducible, architecture-agnostic foundation for future multimodal, large-scale, and explainable AI systems in fungal taxonomy.