Butterfly protection is critical for environmental protection, and butterfly classification study is an essential tool for doing so. We proposed a new fine-grained butterfly classification architecture to address the issues of duplicate information in some butterfly images and trouble identifying them due to their tiny inter-class variance. To begin, a Non-Local Mean Filtering and Multi-Scale Retinex-based method (NL-MSR) is employed to enhance the butterfly images in order to efficiently retain more detail information. Then, to accomplish fine-grained categorization of butterfly images, a Multi-scale Sparse Network with Cross-Attention Mechanism (CA-MSNet) is designed. In CA-MSNet, a Cross-Attention Mechanism module (CAM) that offers distinct weights in the horizontal and vertical directions based on two strategies is devised to successfully identify the spatial distribution of butterfly stripes and spots and suppress incorrect information. Then, to overcome the recognition problem of butterfly spots with small inter-class variance, a Multi-scale sparse module (MSS) with multi-scale receptive fields is constructed. Finally, a Depthwise Separable Convolution module is employed to mitigate the parameter rise induced by the MSS network. In order to validate the model’s feasibility and effectiveness in a complex environment, we compared it to existing methods, and our proposed method achieved an average recognition accuracy of 91.88%, with an F1 value of 92.15%, indicating that it has a good effect on the fine-grained classification of butterflies and can be applied to their recognition to realize their protection.
Read full abstract