In recent years,benefiting from the enhancement of feature extraction capability of convolutional neural network,it has occupied an increasingly important position in many tasks of computer vision.As an important branch in the field of computer vision,image semantic segmentation is also making breakthroughs with the development of convolutional neural networks.Traditional image semantic segmentation methods are limited by the feature extraction ability of the model,and often cannot extract deep semantic information,resulting in low segmentation accuracy and low robustness.After the convolutional neural network is brought into the field of image semantic segmentation,the segmentation accuracy is greatly improved and the application scenarios are broadened.Due to the large amount of computation and high complexity of the convolutional neural network,it is easy to cause the segmentation time to be too long and the model to be too large,which is difficult to apply to real-time scenarios.Some application scenarios that need to meet low latency,such as autonomous driving scenarios,have more stringent requirements for the running speed of the model.How to design a network model to strike a balance between segmentation accuracy and segmentation efficiency is particularly important,so it is of great research significance to take into account the speed and accuracy of the model in real-time semantic segmentation.This paper conducts research on this task,as follows:Firstly,based on the DeepLabV3+ method,a real-time segmentation method combining attention mechanism and pyramid structure is proposed.The network is committed to obtaining higher inference speed on the basis of ensuring a certain segmentation accuracy.The backbone network reduces computational consumption by reducing the number of channels.For the atrous spatial pyramid pooling module,normal convolutions are replaced by depthwise separable convolutions,and the pooling branches are stacked hierarchically.The attention feature fusion module is constructed by using the spatial attention mechanism and the channel attention mechanism to efficiently fuse the features between different dimensions.Experiments show that the real-time segmentation method fused with attention mechanism and pyramid structure achieves higher real-time performance than other methods on the premise of similar segmentation accuracy.Secondly,a real-time segmentation method based on the dilated sandglass block and spatial branching is proposed.In the face of automatic driving scenarios with higher real-time requirements,higher requirements are placed on the inference speed of the network model.Based on the encoderdecoder structure,a fast downsampling module is used in the encoder part to rapidly reduce the image size at the initial stage,then the dilated sandglass block is used as the backbone network feature extraction unit,and finally the improved atrous spatial pyramid pooling module is connected.The spatial branch is parallel to the backbone network to extract the spatial information of the original input image.Finally,the spatial information and high-dimensional semantic information are fused with the help of the attention feature fusion module.In the decoder part,bilinear interpolation is used for upsampling.Comprehensive experiments show that the real-time segmentation method based on the the dilated sandglass block and spatial branch has excellent performance in segmentation accuracy and segmentation speed,and can be applied to real-time scenarios such as autonomous driving.Finally,based on the above algorithm,combined with the PyQt5 toolkit and Socket technology,the functions of local street view image import,local area network street view image acquisition,and image segmentation display are realized.It provides a visual interface for judging the segmentation performance of the algorithm,and explores the way of using wirelessly transmitted images to achieve segmentation. |