This is the official pretrained models for the paper.
Restore Anything with Masks:Leveraging Mask Image Modeling for Blind All-in-One Image Restoration
Chujie Qin, Ruiqi Wu, Zikun Liu, Xin Lin, Chunle Guo, Hyun Hee Park, Chongyi Li†
( † indicates corresponding author )
In ECCV 2024, [HomePage], [Paper Link]
RAM++: Robust Representation Learning via Adaptive Mask for All-in-One Image Restoration
Zilong Zhang*, Chujie Qin*, Chunle Guo, Yong Zhang, Chao Xue, Ming-Ming Cheng, Chongyi Li†
(*indicates equal contribution; † indicates corresponding author)
arxiv preprint, [HomePage], [Paper Link]
Model description
RAM
This method is architecture-agnostic and can be trained with any model.
Here we provide the pre-trained and fine-tuned weights for two representative models: PromptIR and SwinIR.
RAM_plus
AdaSAM is a ViT-based, pixel-level mask generator. It analyzes correlations between image tokens and applies masks to regions that are semantically and texturally rich.
RestormerWoSkip is built on Restormer; it differs by removing the long-range residual connections.
RestormerRFR regularizes via an efficient feature-fusion strategy that leverages DINOv2’s semantic consistency and degradation invariance.
Different folders contain model weights trained under configurations with different numbers of tasks.
How to use
For full instructions and runnable scripts, see the code repository
RAM
Pre-training:
mask, mask_token = Random(img) #pixel_level
output = PromptIR(img, mask, mask_token)
Fine-tuning:
output = PromptIR(img, mask=None, mask_token=None)
RAM_plus
Pre-training:
mask, mask_token = AdaSAM(img)
output = RestormerWoSkip(img, mask, mask_token)
Fine-tuning:
dino_features = DINOv2(img)
output = RestormerRFR(img, mask=None, mask_token=None, dino_features)
Citation
If you find our repo useful for your research, please consider citing our paper:
@inproceedings{qin2024restore,
title={Restore Anything with Masks: Leveraging Mask Image Modeling for Blind All-in-One Image Restoration},
author={Qin, Chu-Jie and Wu, Rui-Qi and Liu, Zikun and Lin, Xin and Guo, Chun-Le and Park, Hyun Hee and Li, Chongyi},
booktitle={European Conference on Computer Vision},
pages={364--380},
year={2024},
organization={Springer}
}
@misc{zhang2025ramrobustrepresentationlearning,
title={RAM++: Robust Representation Learning via Adaptive Mask for All-in-One Image Restoration},
author={Zilong Zhang and Chujie Qin and Chunle Guo and Yong Zhang and Chao Xue and Ming-Ming Cheng and Chongyi Li},
year={2025},
eprint={2509.12039},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2509.12039},
}