The mushroom industry is the fifth largest category of industry in China.As one of the important fungi,mushroom has a wide variety of species.Many mushrooms are very similar in morphology,which is often difficult to identify.Using traditional methods takes a long time,consumes manpower and financial resources,and restricts the development of the mushroom industry.Rapid and high-precision classification of mushroom images is of great significance.Using deep learning technology can effectively classify data and apply it to the field of mushroom image classification to achieve accurate classification of mushroom images.This paper designs two classification models based on attention mechanism and residual network,BAM-Net(Base on Attention Mechanism-Net)and IAMR-Net(Integrating Attention Mechanism and Res Net-Net),which can better solve the classification problem of fine-grained mushroom images and improve the accuracy of image classification.In addition,a dataset of 96 species of mushrooms from field photography around the world was screened and collated.The two models showed good classification accuracy on 4 public fine-grained datasets and 96self-built mushroom datasets,effectively solving the problem of fine-grained mushroom image classification.The specific research work is as follows:(1)In response to the lack of data sets in the field of mushroom classification at present,we have created a mushroom data set from field photography in natural environments around the world,naming it Mushroom-96.There are a total of 8178 mushroom images of 96 species in the data set.Each type of mushroom belongs to the Basidiomycetes.The fruiting body of the mushroom is composed of three parts: a cap,a fold,or a pore,and a stipe.Each type of mushroom contains 72 to 103 image data.Each image provides label category label information,Latin name,and Chinese name.The unified dataset image resolution is 72 × 72.(2)Aiming at the problems of small,non-uniform,and imperceptible differences in data distribution in fine grained mushroom image classification,a residual network model BAM-Net based on multi head self-attention mechanism and embedded SENet channel attention was designed for fine grained image classification.The model uses dual SENet channel attention and Embedded to achieve feature weight calibration and preliminary feature embedding for the feature map extracted from the input image after passing through Res Net50.After that,the model applies Multi Head Self Attention to learn the spatial feature relationships in the gradient network.In terms of loss functions,a combination of Cross Entropy Loss and Center Loss functions is used to train the model.The accuracy of the model on Oxford 102 Flowers,、CUB-200-2011 and Mushroom-96 datasets reached 94.42%、89.43%and 90.09%.(3)In order to further solve the problem of fine grained mushroom image classification,a classification model IAMR-Net based on bilinear convolutional network and attention mechanism was designed.The model combines the optimized and improved Res Net50 bilinear convergence operation as a feature extraction network,embeds the extracted bilinear features into the multi header self-attention mechanism,and performs spatial dimensional global modeling of the features to achieve the purpose of extracting fine grained relationships between deep feature data.After that,a mixed loss function is used to extract the fine-grained relationships between Oxford 102 Flowers 、CUB-200-2011、Stanford Cars Comparative experiments and ablation analysis were conducted on five datasets,Stanford Dogs and Mushroom-96,and the results showed that the model achieved 96.05%、92.33%、94.14%、91.22% and 91.17% accuracy without using fine-grained feature labeling. |