基于Mask约束的图像局部风格迁移算法

IMAGE LOCAL STYLE TRANSFER ALGORITHM BASED ON MASK CONSTRAINT

  • 摘要: 针对实际应用中不能直接对图像指定区域进行风格迁移的问题,提出一种基于Mask约束的图像局部风格迁移算法。借助DeepLab V3+算法分割内容图像,并提取其目标区域,采用基于Gram矩阵的逐像素点优化的图像风格迁移算法进行图像局部风格迁移,重新定义图像局部风格迁移内容、风格损失函数,一方面将语义分割产生的Mask矩阵对需要学习的参数范围进行约束,另一方面用Mask矩阵约束部分风格损失函数计算的区域,除去冗余区域。实验结果表明,改进后算法具有较好的局部风格转换能力,并加快算法的收敛速度。

     

    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.

     

/

返回文章
返回