| Butterflies are diverse in species and play an important role in maintaining ecosystem stability and preserving biodiversity.Additionally,their wings display a wide range of colorful patterns and unique shapes,making them highly valuable for observation.However,the colors,patterns,and shapes of butterfly species that are distantly related can be complex and diverse,while those of the same species,especially within the same genus,tend to exhibit greater similarity in shape,color,and pattern.Furthermore,some butterflies possess mimicry.These factors have a significant impact on the identification of butterfly species in the wild,making it imperative to investigate reliable identification methods based on butterfly traits.While entomologists were essential for early species recognition,this process required a lot of time and effort.With the advancement of computer technology,deep learning methods have been used to solve image processing problems,and the outcomes have improved.This paper applies deep learning techniques to butterfly species recognition based on current research issues.Separate studies on butterfly picture segmentation and butterfly image recognition were conducted.By comparing mainstream networks,the benchmark model appropriate for butterfly species identification was selected.Then,the benchmark model was enhanced and optimized by combining butterfly image features.The main work accomplished in this paper is as follows:1.Butterfly image dataset production in natural environment.Due to the limited quantity and variety of butterfly image datasets in natural environments in existing research.This paper utilized field photography techniques to capture butterfly images,downloaded images from the main Kaggle data website,and utilized web crawler programming to collect butterfly images from the internet.By combining local butterfly species with those from official databases,a total of 7,825 butterfly images of 32 species in their natural habitats were created.The butterfly image dataset can be improved with gaussian noise,salt and pepper noise,left-right flip and enhanced luminance to increase the generalizability of the model.2.Aiming at the problems such as low recognition rate of butterfly species in natural environments,this paper utilizes the 32 butterfly image datasets in natural environments mentioned above as the research object.A Deep Labv3+ butterfly image segmentation model incorporating the shuffle attention mechanism and dense atrous spatial pyramidal pooling is proposed to remove complex backgrounds from butterfly images.To improve segmentation accuracy of the model,the Xception backbone feature extraction network in the Deep Labv3+ network is replaced with the Efficient Net V2-S network.Although the original atrous spatial pyramidal pooling network has increased the network’s field of perception to some extent,it is necessary to further increase the field of perception for large butterflies to capture more complete butterfly image features.Additionally,the low information utilization problem of the original atrous spatial pyramidal pooling network must also be addressed,and the idea of dense cascade is introduced into the atrous spatial pyramidal pooling network.To extract more detailed information about butterfly images,the shuffle attention network is used to extract high-dimensional semantic information.The experimental results demonstrate that the enhanced butterfly image segmentation network can successfully segment butterfly images in natural environments.Compared to the Deep Labv3+network,the mean intersection over union of the improved model reached 96.19%.Meanwhile the pixel accuracy reached 98.60%.The method presented in this article can successfully separate butterflies from backgrounds in natural environments.3.To address the problem of low efficiency in butterfly image recognition,this paper first segmented butterflies with their complex backgrounds to obtain butterfly images with background noise removed.Based on these images,a lightweight deformable butterfly species recognition model was proposed using residual networks.The model is based on the Res Net-18 network,which was improved by accounting for the distribution of butterfly species,their variety in sizes,shapes and their lightness.To address the uneven distribution of butterfly species,the Poly Loss-Focal Loss function is introduced for training,which effectively improves butterfly recognition.Deformable convolution was used instead of regular convolution to accommodate butterflies of various sizes and shapes.The network’s sensory field was expanded to fully perceive larger butterflies with larger sensory fields,resulting in increased recognition rates.Taking inspiration from the depthwise separable convolution,an enhanced version has been proposed to significantly reduce the number of model parameters and operations.The experimental results show that the improved model achieves superior performance in butterfly recognition,with an average recognition accuracy of 96.23%,and the number of model parameters of just 1.04 MB.It is capable of accurately identifying 32 distinct types of butterfly images. |