Text-Driven Image Editing via Learnable Regions

Yuanze Lin, Yi-Wen Chen, Yi-Hsuan Tsai, Lu Jiang, Ming-Hsuan Yang

Introduction

Text-driven image editing typically faces a trade-off between user effort and editing precision. Mask-based methods provide high control but require manual labor, while mask-free methods often suffer from "global leakage," where unintended background areas are modified. This paper introduces a novel framework that bridges this gap by automatically identifying "learnable regions"—bounding boxes that constrain modifications to specific areas without requiring manual user masks.

Methodology: The Region Generation Network

The core of the proposed system is the Region Generation Network (RGN). Instead of relying on user input, the RGN learns to propose optimal editing regions through a three-stage pipeline:

  1. Anchor Initialization: Using a self-supervised Vision Transformer (DINO), the system identifies semantically meaningful "anchor points" within the image.
  2. Region Proposal: The RGN generates multiple bounding box candidates of varying scales around these anchors.
  3. Composite Training Loss: The network is trained using downstream feedback from the editing process itself. The loss function incorporates CLIP guidance to ensure text-image alignment, a directional loss to match changes in text and image space, and a structural loss to preserve the original image's layout.
Qualitative comparison of input images and their edited counterparts across various prompts.

Results and Discussion

The framework is architecture-agnostic, demonstrating compatibility with both diffusion models (e.g., Stable Diffusion) and generative transformers (e.g., MaskGIT). In a user study involving over 200 participants, the proposed method achieved an 84.9% preference rate over established baselines like InstructPix2Pix and DiffEdit.

A significant advantage of this approach is its ability to handle complex, localized prompts. For instance, when adding "a cup of coffee next to the bread," the model successfully isolates the change to a specific region, maintaining the integrity of the surrounding scene.

A precise local edit adding a cup of coffee to a scene while preserving the original sandwich and background.

Conclusion and Future Work

By automating the identification of editing regions, this method provides a seamless, mask-free user experience with the precision of localized editing. While currently limited by the rectangular nature of bounding boxes, future research will explore more flexible representations, such as learned patches or soft masks, to accommodate irregular shapes and further minimize background interference.

Summary updated

BibTeX
@inproceedings{lin2023text,
  author = {Yuanze Lin and Yi-Wen Chen and Yi-Hsuan Tsai and Lu Jiang and Ming-Hsuan Yang},
  title = {{Text-Driven Image Editing via Learnable Regions}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=ORqGgKh9t5},
}
Figure