Semantic Segmentation Algorithm Based on Multi-Attention Mechanism and Cross-Feature Fusion
Image semantic segmentation is widely used in defect detection,medical diagnosis,and unmanned driving.To address the common problems of existing semantic segmentation models,such as their high training costs,poor target contour segmentation,small target missegmentation and missing segmentation,this study proposes an image semantic segmentation algorithm based on the DeepLabv3+network framework,which combines a multi-attention mechanism and Cross-Feature Fusion(CFF).In this algorithm,the lightweight network MobileNetv2 is selected as the backbone to reduce the training time.The expansion rate of the void convolution in the void space pyramid pool module is optimized,the extraction effects of multiscale semantic features are improved,and the segmentation ability of the model for small targets is improved.A convolution block attention mechanism with both a channel and space is introduced,and more attention is paid to the region that plays a decisive role in segmentation to enhance the extraction of target boundaries.A cross-feature fusion module is designed in the encoder to aggregate the spatial and semantic information of the feature graphs at different levels to thereby improve the feature learning ability of the network.A Coordinate Attention(CA)mechanism is introduced in both the encoding and decoding parts,and the location information is embedded into the channel using global average pooling decomposition to obtain the exact location of the segmented target.The experimental results show that the proposed algorithm F3crc-DeepLabv3+achieves average crossover ratios of 75.06%and 73.06%,average accuracies of 84.16%and 82.05%,and precision rates of 86.18%and 85.43%,respectively,on the PASCAL VOC 2012 enhanced dataset.The training times are only 10 h and 13.8 h,respectively,indicating that the algorithm achieves better network performance.