测试技术学报2024,Vol.38Issue(3):298-307,10.DOI:10.3969/j.issn.1671-7449.2024039
基于SAM分割的交互式局部图像风格迁移方法研究
Research on Interactive Local Image Style Transfer Based on SAM Segmentation
摘要
Abstract
Aiming at the problems of the current local image style transfer methods,such as the difficulty in selecting the target region,the lack of transfer flexibility,the easy occurrence of content leakage and unnatural transitions between foreground and background boundaries,an interactive local image style transfer method based on SAM segmentation is proposed in this paper.Firstly,SAM segmentation network is employed to extract the target transfer region of the input content image interactively under the guidance of the user input prompt,and the effective object mask is binarized.The binary mask is used to extract the target region of the global stylized image as the foreground and the content image as the background image for Poisson fusion to realize the local image style transfer.In order to avoid content leakage during the transfer process,the architecture of generative adversarial network is adopted in the global style transfer network.The multi-level adaptive attention normalization module is used for style feature conversion,and the joint loss function is used for comprehensive training of the network.The experimental results show that the interactive local image style transfer network designed in this paper can generate flexible and controllable local transfer results according to user prompts,and can carry out style transfer for any object in the image.The transfer results well preserve the content structure in the content source image,avoid content leakage and the boundaries of foreground and background transit more naturally.关键词
局部图像风格迁移/任意分割模型/全局风格迁移/泊松融合/自适应注意力归一化Key words
local image style transfer/segment anything model(SAM)/global style transfer/Poisson fusion/adaptive attention normalization分类
信息技术与安全科学引用本文复制引用
尚金灿,张丽红..基于SAM分割的交互式局部图像风格迁移方法研究[J].测试技术学报,2024,38(3):298-307,10.基金项目
山西省研究生创新资助项目(2023SJ012) (2023SJ012)
山西省高等学校教学改革创新资助项目(J2021086) (J2021086)