| Forests are an important part of ecological environment.Effective protection of forest resources is not only a requirement for maintaining the natural ecological environment,but also in line with the theme of energy conservation,emission reduction,and green development in today’s world.To protect forest resources,it is first necessary to have an objective overall understanding of forest resources and to be able to accurately identify information on tree species in the forest.The methods of traditional human eye recognition and traditional deep learning recognition of forest trees have gradually exposed the problems of low efficiency,low accuracy and complex operation in the face of today’s increasingly complex and complicated recognition environment and recognition tasks.Therefore,the main content of this article is to apply deep learning to the field of tree species identification,use the model to continuously learn various characteristics of tree species,self-optimize iteratively,improve the recognition ability of tree species,and take into account the accuracy and efficiency of traditional pain points.The experiments prove that the optimized network can better complete the tree species classification task.The specific content is as follows:(1)Selection of the basic network.In order to improve the generalization ability of the network and enhance the robustness of the model,the tree species image data set used in this paper is preprocessed by data enhancement methods such as flipping,scaling,rotating,and cropping to expand the data set.Then,in order to choose the most suitable basic network for this paper,four classic convolutional neural networks(Alex Net,VGG16,Res Net34,and Res Net50)are used for comparison,and the comprehensive accuracy and efficiency indicators are tested.The one with best performance on the data set is selected as the basic network for improvement.(2)Lightweight improvement of basic network based on Ghost module.Due to the relatively large basic network(Res Net50)selected in the experiment,it will cause high operating pressure for some mobile low-computing devices,which is not conducive to the application and promotion of the model.Therefore,it is necessary to redesign the network structure and make lightweight improvements to the model.This paper takes advantage of the cheap computing characteristics of the Ghost module,replaces the convolution part in the residual basic block with the Ghost module,simplifies the network from the structure,and proposes a lightweight network improvement based on the Ghost module.Through the comparison before and after the improvement,it is found that the parameters and FLOPs of the improved model have decreased.The experimental results show that it is effective to improve the weight of the network by adding the Ghost module.At the same time,the experiment also explores the influence of common hyperparameters and factors such as batch size,activation function,learning rate change mode and transfer learning on the network training results.(3)Accuracy improvement method of lightweight improved network based on attention mechanism.Aiming at the problem of decreased accuracy in the lightweight improvement experiment of adding the Ghost module,by adding an attention mechanism to the network,the extraction of key features in the input information is strengthened,and according to the type of attention introduced,a spatial attention-based Compared with the original Res Net50 network,the accuracy rate of Res Net50-Ghost-SE drops by 0.16%;Res Net50-Ghost-CBAM The model accuracy rate increases by 0.48%.At the same time,the experiment also uses the focal loss function to replace the cross-entropy loss function of the network for optimization.The optimized Res Net50,Res Net50-Ghost-SE,and Res Net50-Ghost-CBAM accuracy rates increases by 0.13%,0.01%,and 0.09%,respectively,which proves Effectiveness of loss function optimization. |