Acta Entomologica Sinica ›› 2025, Vol. 68 ›› Issue (2): 223-230.doi: 10.16380/j.kcxb.2025.02.010

• RESEARCH PAPERS • Previous Articles     Next Articles

Automatic butterfly recognition with center loss and focal loss fused

LI Xiao-Lin1, LI Jian-Xiang1, CHEN Bin-Bin1, WANG Rong2, ZHANG Fei-Ping2,3, HUANG Shi-Guo1,3,*   

  1. (1. College of Computer and Information Sciences, Fujian Agriculture and Forestry University, Fuzhou 350002, China; 2. College of Forestry, Fujian Agriculture and Forestry University, Fuzhou 350002, China; 3. Key Laboratory of Integrated Pest Management in Ecological Forests, Fujian Province University, Fuzhou 350002, China)
  • Online:2025-02-20 Published:2025-03-27

Abstract: 【Aim】 To address the issue of inter-taxon and intra-taxon distribution imbalance leading to the decreased recognition performance in butterfly samples, a multi-loss fused automatic butterfly recognition method is explored. 【Methods】 We used the open source image dataset Butterfly-200, including 200 species of butterflies with the number of images of per species ranging from 30 to 885, as the experimental data. Using cross-entropy loss as the baseline loss, we compared the recognition performance of the algorithms by adding contrastive loss, focal loss, class-balanced loss, sampling, and logit adjustment, respectively. Further, we conducted an ablation study to analyze the effects of combining center loss and focal loss, which mitigated intra-taxon imbalance and inter-taxon imbalance, respectively, on recognition performance. Finally, we proposed a new automatic butterfly recognition method integrating these two types of losses. 【Results】 When the cross-entropy loss was combined with other single losses (except contrastive loss) the algorithms generally exhibited a decline in recognition performance, compared to the cross-entropy loss. Our algorithm, which combined center loss and focal loss with cross-entropy loss, outperformed cross-entropy loss and its combinations with other losses. The accuracy, F1-score, precision, and recall of our algorithm were 91.67%, 90.68%, 91.68% and 90.38%, respectively. An ablation study further confirmed the complementarity of center loss and focal loss, demonstrating that the simultaneous use of these two losses obviously enhanced recognition performance. Additionally, loss combinations with different weights also had a noticeable impact on recognition performance.【Conclusion】 The results of this study demonstrate that the integration of center loss and focal loss alleviate the issues of inter-taxon and intra-taxon distribution imbalance to a certain extent, thereby effectively improving the accuracy of butterfly recognition, and providing an effective auxiliary method for ecological environment monitoring.

Key words: Butterfly, distribution imbalance, cross-entropy loss, center loss, focal loss, image classification