Global contexts in images are quite valuable in image-to-image translation problems. Conventional attention-based and graph-based models capture the global context to a large extent, however, these are computationally expensive. Moreover, the existing approaches are limited to only learning the pairwise semantic relation between any two points on the image. In this paper, we present Latent Graph Attention (LGA) a computationally inexpensive (linear to the number of nodes) and stable, modular framework for incorporating the global context in the existing architectures, especially empowering small-scale architectures to give performance closer to large size architectures, thus making the light-weight architectures more useful for edge devices with lower compute power and lower energy needs. LGA propagates information spatially using a network of locally connected graphs, thereby facilitating to construct a semantically coherent relation between any two spatially distant points that also takes into account the influence of the intermediate pixels. Moreover, the depth of the graph network can be used to adapt the extent of contextual spread to the target dataset, thereby being able to explicitly control the added computational cost. To enhance the learning mechanism of LGA, we also introduce a novel contrastive loss term that helps our LGA module to couple well with the original architecture at the expense of minimal additional computational load. We show that incorporating LGA improves the performance on three challenging applications, namely transparent object segmentation, image restoration for dehazing and optical flow estimation.
翻译:图像中的全局上下文在图像到图像转换问题中极具价值。传统的基于注意力机制和图模型的模型虽能在很大程度上捕获全局上下文,但计算开销较大。此外,现有方法仅限于学习图像中任意两点之间的成对语义关系。本文提出潜在图注意力(LGA)——一种计算成本较低(与节点数呈线性关系)且稳定的模块化框架,用于将全局上下文融入现有架构,尤其能增强小型架构的性能使其接近大型架构,从而使轻量级架构更适合计算能力低、能耗需求小的边缘设备。LGA通过局部连接图的网络在空间上传播信息,从而构建任意空间远距离点之间语义连贯的关系,并同时考虑中间像素的影响。此外,图网络的深度可用于调整上下文传播范围以适应目标数据集,从而显式控制附加的计算成本。为增强LGA的学习机制,我们引入一种新的对比损失项,以最小的额外计算开销帮助LGA模块与原始架构良好耦合。实验表明,在透明对象分割、去雾图像恢复和光流估计三项具有挑战性的应用中,融入LGA有效提升了性能。