Sharing Key Semantics in Transformer Makes Efficient Image Restoration

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ren, Bin, Li, Yawei, Liang, Jingyun, Ranjan, Rakesh, Liu, Mengyuan, Cucchiara, Rita, Van Gool, Luc, Yang, Ming-Hsuan, Sebe, Nicu
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916530098274304
author Ren, Bin
Li, Yawei
Liang, Jingyun
Ranjan, Rakesh
Liu, Mengyuan
Cucchiara, Rita
Van Gool, Luc
Yang, Ming-Hsuan
Sebe, Nicu
author_facet Ren, Bin
Li, Yawei
Liang, Jingyun
Ranjan, Rakesh
Liu, Mengyuan
Cucchiara, Rita
Van Gool, Luc
Yang, Ming-Hsuan
Sebe, Nicu
contents Image Restoration (IR), a classic low-level vision task, has witnessed significant advancements through deep models that effectively model global information. Notably, the emergence of Vision Transformers (ViTs) has further propelled these advancements. When computing, the self-attention mechanism, a cornerstone of ViTs, tends to encompass all global cues, even those from semantically unrelated objects or regions. This inclusivity introduces computational inefficiencies, particularly noticeable with high input resolution, as it requires processing irrelevant information, thereby impeding efficiency. Additionally, for IR, it is commonly noted that small segments of a degraded image, particularly those closely aligned semantically, provide particularly relevant information to aid in the restoration process, as they contribute essential contextual cues crucial for accurate reconstruction. To address these challenges, we propose boosting IR's performance by sharing the key semantics via Transformer for IR (\ie, SemanIR) in this paper. Specifically, SemanIR initially constructs a sparse yet comprehensive key-semantic dictionary within each transformer stage by establishing essential semantic connections for every degraded patch. Subsequently, this dictionary is shared across all subsequent transformer blocks within the same stage. This strategy optimizes attention calculation within each block by focusing exclusively on semantically related components stored in the key-semantic dictionary. As a result, attention calculation achieves linear computational complexity within each window. Extensive experiments across 6 IR tasks confirm the proposed SemanIR's state-of-the-art performance, quantitatively and qualitatively showcasing advancements. The visual results, code, and trained models are available at https://github.com/Amazingren/SemanIR.
format Preprint
id arxiv_https___arxiv_org_abs_2405_20008
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Sharing Key Semantics in Transformer Makes Efficient Image Restoration
Ren, Bin
Li, Yawei
Liang, Jingyun
Ranjan, Rakesh
Liu, Mengyuan
Cucchiara, Rita
Van Gool, Luc
Yang, Ming-Hsuan
Sebe, Nicu
Computer Vision and Pattern Recognition
Image Restoration (IR), a classic low-level vision task, has witnessed significant advancements through deep models that effectively model global information. Notably, the emergence of Vision Transformers (ViTs) has further propelled these advancements. When computing, the self-attention mechanism, a cornerstone of ViTs, tends to encompass all global cues, even those from semantically unrelated objects or regions. This inclusivity introduces computational inefficiencies, particularly noticeable with high input resolution, as it requires processing irrelevant information, thereby impeding efficiency. Additionally, for IR, it is commonly noted that small segments of a degraded image, particularly those closely aligned semantically, provide particularly relevant information to aid in the restoration process, as they contribute essential contextual cues crucial for accurate reconstruction. To address these challenges, we propose boosting IR's performance by sharing the key semantics via Transformer for IR (\ie, SemanIR) in this paper. Specifically, SemanIR initially constructs a sparse yet comprehensive key-semantic dictionary within each transformer stage by establishing essential semantic connections for every degraded patch. Subsequently, this dictionary is shared across all subsequent transformer blocks within the same stage. This strategy optimizes attention calculation within each block by focusing exclusively on semantically related components stored in the key-semantic dictionary. As a result, attention calculation achieves linear computational complexity within each window. Extensive experiments across 6 IR tasks confirm the proposed SemanIR's state-of-the-art performance, quantitatively and qualitatively showcasing advancements. The visual results, code, and trained models are available at https://github.com/Amazingren/SemanIR.
title Sharing Key Semantics in Transformer Makes Efficient Image Restoration
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2405.20008