Algae are simple organisms that grow in water bodies or intertidal zones and contain photosynthetic pigments such as chlorophyll,which can produce energy through photosynthesis.They are basic organisms in aquatic ecosystem and play an important role in improving water quality and protecting ecological environment.Traditional algal classification methods require high knowledge reserve of researchers,and the process is tedious and time-consuming.The current algal image classification method using deep learning has complex structure,many parameters and high requirements for operating equipment.Therefore,the research on lightweight algal image classification method has important practical significance and application value.In this paper,convolutional neural network and vision Transformer are applied to the task of algal image classification,and the main research contents are as follows:(1)Aiming at the problem that the traditional algal image classification model has a large number of parameters and is not suitable for mobile devices,a lightweight convolutional neural network Mobile Net V2 is introduced and improved,and a lightweight MCANet network model is proposed.First,in order to reduce the number of model parameters,MCANet adopts depth-separable convolution for feature extraction.By using the feature extraction method of first deep convolution and then point convolution,the number of parameters is greatly reduced on the premise of ensuring the accuracy of the model.Secondly,in order to avoid the neuron-death problem caused by the use of Re LU6 activation function in Mobile Net V2,MCANet chose GELU,which has smoother curve and higher performance,as the activation function to improve the accuracy and generalization performance of the model.Finally,Coordinate Attention was added to the model to establish the dependency between channel attention and location information and enhance the feature learning ability of the network.The experimental results show that MCANet has achieved97% accuracy on the diatom image data set made by Gloria Bueno et al.,and the parameter quantity is only 2.80 M.(2)In order to solve the problem that MCANet as a pure convolutional neural network is difficult to capture long distance dependency,a lightweight MCAViT network model is proposed by combining MCA-block and visual Transformer.The powerful modeling ability of global information acquisition in vision Transformer is utilized to make up for the difficulty of capturing long distance dependence relationships in MCANet,and the feature of convolutional neural network that can provide spatial induction bias is utilized to make up for the lack of spatial induction bias in vision Transformer.Refer to the Mobile Vit network model and improve on it.A deep separable convolution with a convolution kernel size of 3×3 was used for preliminary feature extraction.Add shortcut to enhance the presentation of the network model.Then replace the MV2-block in Mobile Vit with MCAblock for higher accuracy.The experimental results show that MCAViT has obtained 98.6%accuracy of algal image data set,and the number of model parameters is only 1.67 M. |