Abstract:
Aimed at the problem that the style transfer of the specified area of the image cannot be carried out directly in practical application, an image local style transfer algorithm based on mask constraint is proposed. With the help of DeepLab V3 + algorithm, the content image was segmented and its target area was extracted, a pixel by pixel optimized image style migration algorithm based on Gram matrix was used for image local style migration, and the content and style loss function of image local style migration were redefined. On the one hand, the Mask matrix generated in semantic segmentation was used to standardize the range of parameters to be learned, on the other hand, the Mask matrix was used to constrain the region calculated by the partial style loss function to remove the redundant region. Experimental results show that the improved algorithm has better local style conversion ability and improves the convergence speed of the algorithm.