Papers › Prompt-In-Prompt Learning for Universal Image Restoration

Prompt-In-Prompt Learning for Universal Image Restoration

8 Dec 2023arXiv:2312.05038archive 2025-07-28

Zilong Li, Yiming Lei, Chenglong Ma, Junping Zhang, Hongming Shan

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2312.05038")

Code

Syntology Ran 6 of 6 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 2 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: official repository: 6 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

longzilicart/pip_universal officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

6 samples harvested; 6 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · fixture could not drive it
4ran

Licence: 0 of the 6 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from longzilicart/pip_universal. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_grid_from_dict longzilicart/pip_universal/src/longzili_utils/longzili_logger.py official repository ran MIT (permissive) · 5e41d3084b3c183d · report
get_grid_from_list longzilicart/pip_universal/src/longzili_utils/longzili_logger.py official repository ran MIT (permissive) · c0373c851b9df0f8 · report
load_partial_state_dict longzilicart/pip_universal/src/longzili_utils/longzili_loadparam.py official repository ran MIT (permissive) · 9d700a2e47337550 · report
only_on_rank0 longzilicart/pip_universal/src/longzili_utils/longzili_logger.py official repository ran MIT (permissive) · e53b1fbdf8c4bfd2 · report
to_3d longzilicart/pip_universal/src/net/PIP_utils.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · 82a15cc1e46f7e4d · report
to_4d longzilicart/pip_universal/src/net/PIP_utils.py official repository ran · fixture could not drive it MIT (permissive) · b20f2a5df739a59e · report

Tasks

DeblurringDenoisingImage DenoisingImage RestorationPrompt LearningRain Removal

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections