Image restoration, which aims to retrieve and enhance degraded images, is fundamental across a wide range of applications. While conventional deep learning approaches have notably improved the image quality across various tasks, they still suffer from (i) the high storage cost needed for various task-specific models and (ii) the lack of interactivity and flexibility, hindering their wider application. Drawing inspiration from the pronounced success of prompts in both linguistic and visual domains, we propose novel Prompt-In-Prompt learning for universal image restoration, named PIP. First, we present two novel prompts, a degradation-aware prompt to encode high-level degradation knowledge and a basic restoration prompt to provide essential low-level information. Second, we devise a novel prompt-to-prompt interaction module to fuse these two prompts into a universal restoration prompt. Third, we introduce a selective prompt-to-feature interaction module to modulate the degradation-related feature. By doing so, the resultant PIP works as a plug-and-play module to enhance existing restoration models for universal image restoration. Extensive experimental results demonstrate the superior performance of PIP on multiple restoration tasks, including image denoising, deraining, dehazing, deblurring, and low-light enhancement. Remarkably, PIP is interpretable, flexible, efficient, and easy-to-use, showing promising potential for real-world applications. The code is available at https://github.com/longzilicart/pip_universal.
翻译:图像恢复旨在检索和增强退化图像,是众多应用领域的基础。尽管传统深度学习方法在不同任务中显著提升了图像质量,但仍存在以下问题:(i) 不同任务专用模型需要高昂的存储成本;(ii) 缺乏交互性与灵活性,限制了其更广泛应用。受提示在语言和视觉领域中显著成功的启发,我们提出了一种创新的提示内提示学习框架(PIP),用于通用图像恢复。首先,我们设计了两种新型提示:退化感知提示用于编码高层退化知识,基础恢复提示用于提供必要的底层信息。其次,我们设计了一种新颖的提示间交互模块,将这两种提示融合为通用恢复提示。第三,我们引入了一种选择性提示-特征交互模块,用于调制与退化相关的特征。通过上述设计,PIP可作为即插即用模块增强现有恢复模型,实现通用图像恢复。大量实验结果表明,PIP在多种恢复任务(包括图像去噪、去雨、去雾、去模糊和低光增强)中均展现出优越性能。值得注意的是,PIP具有可解释性、灵活性、高效性和易用性,展现出在真实世界应用中的巨大潜力。代码已开源:https://github.com/longzilicart/pip_universal。