The significance of multi-scale features has been gradually recognized by the edge detection community. However, the fusion of multi-scale features increases the complexity of the model, which is not friendly to practical application. In this work, we propose a Compact Twice Fusion Network (CTFN) to fully integrate multi-scale features while maintaining the compactness of the model. CTFN includes two lightweight multi-scale feature fusion modules: a Semantic Enhancement Module (SEM) that can utilize the semantic information contained in coarse-scale features to guide the learning of fine-scale features, and a Pseudo Pixel-level Weighting (PPW) module that aggregate the complementary merits of multi-scale features by assigning weights to all features. Notwithstanding all this, the interference of texture noise makes the correct classification of some pixels still a challenge. For these hard samples, we propose a novel loss function, coined Dynamic Focal Loss, which reshapes the standard cross-entropy loss and dynamically adjusts the weights to correct the distribution of hard samples. We evaluate our method on three datasets, i.e., BSDS500, NYUDv2, and BIPEDv2. Compared with state-of-the-art methods, CTFN achieves competitive accuracy with less parameters and computational cost. Apart from the backbone, CTFN requires only 0.1M additional parameters, which reduces its computation cost to just 60% of other state-of-the-art methods. The codes are available at https://github.com/Li-yachuan/CTFN-pytorch-master.
翻译:多尺度特征的重要性已逐渐被边缘检测领域所认知。然而,多尺度特征的融合增加了模型的复杂度,这对实际应用并不友好。本文提出了一种紧凑双融合网络(CTFN),在保持模型紧凑性的同时充分整合多尺度特征。CTFN包含两个轻量级多尺度特征融合模块:语义增强模块(SEM),可利用粗尺度特征中包含的语义信息指导细尺度特征的学习;以及伪像素级加权模块(PPW),通过为所有特征分配权重来聚合多尺度特征的互补优势。尽管如此,纹理噪声的干扰使得部分像素的正确分类仍具挑战性。针对这些困难样本,我们提出了一种新颖的损失函数——动态聚焦损失(Dynamic Focal Loss),该损失函数重塑了标准交叉熵损失,并通过动态调整权重来修正困难样本的分布。我们在三个数据集(BSDS500、NYUDv2和BIPEDv2)上评估了该方法。与现有最优方法相比,CTFN以更少的参数和计算成本实现了具有竞争力的精度。除骨干网络外,CTFN仅需额外0.1M参数,将其计算成本降低至其他最优方法的60%。代码已开源:https://github.com/Li-yachuan/CTFN-pytorch-master。