| Matting technology was originally applied in the professional field of image processing,such as photo studio high-definition picture processing,film and television production,video post-editing,and so on.With the continuous development of society,there is also a demand for matting operation in the public.the use of matting technology to accurately create selection,extract the foreground image,to achieve high-precision background replacement,so that matting results real natural is particularly important.Currently,image matting algorithms mainly include traditional image matting methods and image matting algorithms based on deep learning.The traditional matting method requires input of a trimap,or an indication line of the foreground image and background image,which is not easy to operate and easy to waste part of the prior information.By building neural networks,the matting algorithm based on deep learning is able to process complex features of images,generate high-precision alpha matte,and have better results in processing hair strands,shaded areas,and translucent objects.In this thesis,the matting network commonly used in deep learning is studied,and each component module of convolutional neural network are researched,a two-layer neural network of DeeplabV3-Refine based on DeeplabV3 is constructed from this.The base network is based on DeeplabV3,including encoder-decoder process.The encoder part includes backbone network and Atrous Spatial Pyramid Pooling(ASPP).After comparison,Resnet50 is selected as the backbone network and improved.The images first passe through the backbone network and outputs two parts of feature map respectively.One part obtain high-dimensional features through the cavity convolution and pooling process of Atrous Spatial Pyramid Pooling(ASPP),and the other part is fed directly into the decoder module.The decoder module is proposed based on the model structure of DeeplabV3+.Adding this module can restore the image to its original size to ensure the image resolution.The high-dimensional feature map output by ASPP and the feature map directly sent by the backbone network into the decoder module meet and integrate in the decoder module.After the convolution and upsampling process of the decoder module,the image is finally output with the original resolution.Through the above base network,the alpha matte boundary of the original image exerted by the model output is smooth,and the details processing is not accurate enough.Therefore,a layer of overlay optimization network is proposed here,and the optimization network is set as a full convolutional network,which combines the original image and the predicted alpha channel.After four convolutional operations,the image resolution remains unchanged.Without making large-scale changes to the alpha matte,only sharpening and refining alpha values,the optimized network output alpha matte is more adaptive to the boundary,and the effect of foreground image matting is better than the base network only.The model is trained and tested with open HD image data set to verify the role and effectiveness of the model in the actual matting process.According to several common error evaluation indexes,the experimental results were compared with those existing models.Taking Alpha GAN algorithm as the benchmark,the error of matting in terms of Sum of Absolute Differences(SAD)indexes is reduced by 5.5% and reduced by 8.7% in terms of Gradient error(Grad).The expected effect of improving the matting accuracy is realized. |