The portrait matting task aims to extract an alpha matte with complete semantics and finely-detailed contours. In comparison to CNN-based approaches, transformers with self-attention allow a larger receptive field, enabling it to better capture long-range dependencies and low-frequency semantic information of a portrait. However, the recent research shows that self-attention mechanism struggle with modeling high-frequency information and capturing fine contour details, which can lead to bias while predicting the portrait's contours. To address the problem, we propose EFormer to enhance the model's attention towards semantic and contour features. Especially the latter, which is surrounded by a large amount of high-frequency details. We build a semantic and contour detector (SCD) to accurately capture the distribution of semantic and contour features. And we further design contour-edge extraction branch and semantic extraction branch for refining contour features and complete semantic information. Finally, we fuse the two kinds of features and leverage the segmentation head to generate the predicted portrait matte. Remarkably, EFormer is an end-to-end trimap-free method and boasts a simple structure. Experiments conducted on VideoMatte240K-JPEGSD and AIM datasets demonstrate that EFormer outperforms previous portrait matte methods.
翻译:肖像抠图任务旨在提取具有完整语义和精细轮廓细节的alpha遮罩。与基于CNN的方法相比,具有自注意力机制的Transformer能获得更大感受野,从而更好地捕捉肖像的长程依赖和低频语义信息。然而近期研究表明,自注意力机制在建模高频信息和捕获精细轮廓细节方面存在不足,可能导致肖像轮廓预测出现偏差。为解决该问题,我们提出EFormer以增强模型对语义和轮廓特征的关注,尤其是被大量高频细节包围的轮廓特征。我们构建语义与轮廓检测器(SCD)精准捕获语义和轮廓特征的分布,并进一步设计轮廓边缘提取分支和语义提取分支以精细化轮廓特征与完整语义信息。最后融合两类特征,通过分割头生成预测肖像遮罩。值得注意的是,EFormer是一种无需三分图(trimap-free)的端到端方法,且结构简洁。在VideoMatte240K-JPEGSD和AIM数据集上的实验表明,EFormer优于现有肖像抠图方法。