| With the promulgation of the new national infrastructure policy,new technologies such as AI(artificial intelligence)and 5G have become the focus.As a combination of 5G and AI,the field of smart cars is also highly anticipated.In the field of smart cars,environment perception has always been the focus of research,and semantic segmentation,as a major branch of smart car environment perception,can classify target objects such as traffic participants,road boundaries,and obstacles in road scene images pixel by pixel,which provide rich information for the smart car system.This article mainly studies the semantic segmentation algorithm for smart car scenes,starting from three perspectives: the accuracy of semantic segmentation,real-time semantic segmentation algorithm,and the deployment of semantic segmentation model.Firstly,this paper proposes a semantic segmentation model based on an improved attention mechanism to improve the accuracy of the semantic segmentation algorithm.Multi-scale receptive field information is extracted by the GASPP(Global Atrous Sptial Pyramid Pooling)structure,and the selective attention mechanism is used as the decoder.On this basis,GSANet is constructed,which achieves 81.6% m IoU accuracy on the Cityscapes dataset,and 79.2% m IoU accuracy on the Cam Vid dataset.Considering the real-time remand of the semantic segmentation algorithm under the smart car scene,this paper proposes a real-time semantic segmentation model based on an improved lightweight network.Specificly,it is based on the lightweight network Mobile Net v2 with atrous convolutions and a feature attention module for feature extraction.And the ASPP module with neighbor information is constructed.On this basis,a lightweight semantic segmentation model Light Seg was constructed and tested on a single RTX 2080 Ti GPU,which achieved 73.8% m IoU at 47.5 frames per second on the Cityscapes dataset,and 67.6% m IoU at 38.5 frames per second on the Cam Vid dataset.Finally,this paper also proposes an optimization method for the semantic segmentation algorithm based on pruning and inference acceleration.In the model training phase,channel pruning is used to reduce the number of parameters of the designed semantic segmentation model while maintaining the segmentation performance.In the model inference phase,batch normalized BN layer and convolutional layer merging are used to achieve GPU inference acceleration.Then,comparative experiments were completed on several proposed optimization methods to prove the effectiveness of the optimization methods. |