Deep Plastic Surgery: Robust and Controllable Image Editing with Human-Drawn Sketches

Shuai Yang, Zhangyang Wang, Jiaying Liu, Zongming Guo

Abstract

Sketch-based image editing offers an intuitive interface for novice users, yet it remains challenging due to the significant domain gap between clean, machine-generated edge maps and the "wild," often imprecise nature of human sketches. We present Deep Plastic Surgery, a robust framework that bridges this gap by simulating the coarse-to-fine drawing process of artists. By introducing a dilation-based synthesis strategy and a style-based refinement control parameter, our model enables users to interactively balance sketch faithfulness with photographic realism in real-time.

Introduction

The primary hurdle in sketch-to-image synthesis is the "domain gap." Most state-of-the-art models are trained on perfectly aligned edge maps extracted from photos. However, human sketches are inherently noisy, containing shaky lines, anatomical inaccuracies, and missing details. When presented with such inputs, existing models often fail by either strictly following the "bad" sketch—resulting in uncanny, distorted faces—or ignoring the user's intent entirely to preserve image naturalness.

Rough human sketches (top) often contain anatomical errors that traditional edge-based models struggle to interpret realistically (bottom).

Deep Plastic Surgery addresses this by viewing a rough sketch not as a fixed constraint, but as a "search region" where the true, realistic edge likely resides. This perspective allows the model to perform "plastic surgery" on the user's input, refining it into a plausible photographic result.

Methodology

The framework introduces two core technical innovations to handle the variability of human drawings.

1. Sketch Refinement via Dilation

To train a model without requiring massive amounts of paired human-sketch/photo data, the authors propose a dilation-based synthesis strategy. Starting with a clean edge map, the system applies random deformations and line removals, followed by a dilation operation that thickens the remaining lines. This thickened area mimics an artist's rough "draft." By training the network to map these coarse, messy regions back to sharp, realistic edges, the model learns to be robust to the inherent noise of human sketching.

2. Style-based Refinement Level Control

Recognizing that the ideal balance between following a sketch and ensuring realism varies by user and context, the authors treat the "coarseness" of a sketch as a controllable style. They introduce a refinement parameter $\ell \in [0, 1]$:

  • Low $\ell$: The model treats the sketch as a precise blueprint (high faithfulness).
  • High $\ell$: The model treats the sketch as a loose guide, prioritizing image realism (high "plastic surgery").

This is implemented via a style-based module inspired by AdaIN, where $\ell$ is mapped to style codes that adjust feature statistics within the refinement network. This allows for continuous, interactive control over the output.

The refinement parameter allows users to decide exactly how much the AI should "fix" their rough sketch, moving from high faithfulness to high realism.

Key Results and Performance

Deep Plastic Surgery was evaluated on CelebA-HQ, handbag, and shoe datasets. Qualitative results demonstrate that the model consistently produces more natural facial structures than baselines like SC-FEGAN or DeepFillv2, especially when the input sketch is anatomically flawed.

In a large-scale user study (1,320 votes), the proposed method was preferred by 73% of participants for face editing and 94.5% for face synthesis. Beyond visual quality, the model is highly efficient. As a feed-forward network, it avoids the slow, iterative optimization required by previous "weak constraint" methods. It achieves a processing time of approximately 12ms for a $64 \times 64$ image—a 650x speedup over methods like ContextualGAN.

Discussion and Limitations

While highly robust, the model has structural limits defined by the maximum dilation radius used during training. If a user places a feature (e.g., an eye) too far from its anatomically correct position, the "plastic surgery" may fail to bridge the gap. Additionally, at very high refinement levels, closely spaced lines (like eyelids) may merge, leading to a loss of fine detail. Future work could explore spatially non-uniform refinement, allowing users to apply different levels of AI assistance to different parts of the image.

Conclusion

Deep Plastic Surgery provides a powerful, real-time tool for sketch-based image editing. By bridging the domain gap through intelligent refinement and providing users with a "reliability knob," it transforms rough, novice sketches into high-quality, realistic images without sacrificing user control.

Summary updated

BibTeX
@inproceedings{yang2020deep,
  author = {Shuai Yang and Zhangyang Wang and Jiaying Liu and Zongming Guo},
  title = {{Deep Plastic Surgery: Robust and Controllable Image Editing with Human-Drawn Sketches}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=CINbjDXhwVM},
}
Figure