Instruct2See: Learning to Remove Any Obstructions Across Distributions

Junhang Li, Yu Guo, Chuhua Xian, Shengfeng He

Abstract

Image obstruction removal has traditionally relied on task-specific models tailored for individual degradation types like rain, snow, or fences. We present Instruct2See, a novel zero-shot framework that unifies these tasks into a single "soft-hard mask" restoration problem. By leveraging multi-modal prompts (text and vision), Instruct2See follows user instructions to remove arbitrary obstructions without task-specific retraining. Our approach achieves state-of-the-art generalization on out-of-distribution (OOD) obstacles, outperforming specialized models in both quantitative metrics and visual coherence.

Introduction

In computer vision, obstruction removal is often treated as a collection of fragmented sub-problems: deraining, defencing, and reflection removal. While specialized models perform well within their domains, they often fail when encountering real-world obstructions that fall outside their training data, such as power cables, lens smudges, or complex textures. Existing "all-in-one" models are typically tethered to specific training distributions and struggle with out-of-distribution (OOD) scenarios. Furthermore, traditional inpainting methods often produce "uncanny" artifacts that hinder downstream tasks like object detection.

Instruct2See addresses these challenges by shifting the paradigm from learning specific obstruction types to learning how to follow instructions for scene restoration.

Methodology

The core of Instruct2See is a unified framework that treats all obstructions as either "hard" (opaque) or "soft" (semi-transparent).

Overview of the Instruct2See framework showing in-distribution and out-of-distribution performance alongside the multi-modal instruction pipeline.

Multi-modal Prompt Generation

The system utilizes a pre-trained CLIP model to process both the degraded image and a textual instruction (e.g., "Remove the semi-transparent obstruction"). These inputs are converted into visual and textual tokens that guide the restoration process.

Soft Masking Switch and Tunable Adapter

A key innovation is the use of text embeddings to toggle a "soft masking" mode. By calculating the similarity between the user's instruction and the concept of semi-transparency, the model autonomously decides whether to activate a tunable adapter. This adapter dynamically refines the mask for soft obstructions, compensating for the blurry boundaries typical of rain streaks or shadows.

Restoration Backbone

The architecture employs Restormer, a high-performance transformer for image restoration, augmented with cross-attention units. These units allow multi-modal prompts to inject semantic guidance at every layer of the network, helping the model reconstruct backgrounds based on high-level visual cues rather than just local pixel values.

Experiments and Datasets

Instruct2See was trained on a diverse dataset of 3,984 images across three "in-distribution" categories: fences, flares, and raindrops. To evaluate its zero-shot capabilities, the model was tested on a wide array of unseen (OOD) obstructions.

Examples of in-distribution and out-of-distribution obstacles used for training and zero-shot evaluation.

The OOD evaluation included weather effects like rain streaks and snow, artificial artifacts such as strokes and watermarks, and real-world objects like power cables, yarn, and scratches.

Results

Instruct2See consistently outperformed specialized state-of-the-art models like Restormer and LaMa across both seen and unseen categories.

Quantitative Performance

On unseen obstructions (Rain Streak, Snow, Stroke), Instruct2See achieved an average PSNR of 31.37 dB, surpassing the next best competitor (Restormer) by 0.86 dB. This demonstrates superior generalization to novel degradation types.

Qualitative Analysis

Visual results indicate that Instruct2See produces cleaner, more coherent backgrounds with fewer "ghosting" artifacts compared to baselines. It successfully handles complex, thin obstructions like power cables and yarn—scenarios where previous models often fail or introduce significant distortion.

Conclusion and Limitations

Instruct2See demonstrates that multi-modal instruction following is a powerful paradigm for generalized image restoration. However, the method has limitations:

  • Occlusion Size: It is optimized for small, distributed obstacles and may be less effective for large-area occlusions where generative inpainting is more appropriate.
  • Mask Dependency: The framework's performance is tied to the accuracy of the initial mask detector (e.g., SAM2), though the tunable adapter provides some robustness.
  • Computational Complexity: The inclusion of cross-attention modules and multi-modal encoders results in a higher parameter count (56.69M), though inference speed remains competitive at approximately 84ms per image.

Summary updated

BibTeX
@inproceedings{li2025instruct,
  author = {Junhang Li and Yu Guo and Chuhua XIAN and Shengfeng He},
  title = {{Instruct2See: Learning to Remove Any Obstructions Across Distributions}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=RmQnijtu6h},
}
Figure