Photo-Sketching: Inferring Contour Drawings from Images

Mengtian Li, Zhe Lin, Radomír Mech, Ersin Yumer, Deva Ramanan

Abstract

This paper introduces Photo-Sketching, a method for automatically generating human-like contour drawings from photos. By leveraging a novel dataset of 5,000 human sketches and a specialized "Min-Mean" loss function, the authors created a model that captures the semantic "salience" of a scene rather than just mathematical gradients. Surprisingly, this approach to sketching also yields state-of-the-art results when applied to traditional boundary detection tasks.

Introduction

In computer vision, "edges" or "boundaries" are typically defined by pixel-level intensity changes. However, contour drawings represent how humans perceive and simplify a scene, including occluding contours and salient inner features. Existing tools struggle with this task due to the lack of perfect pixel alignment in human sketches, the inherent diversity of sketching styles (one-to-many mapping), and the sparsity of sketch data which complicates GAN training.

Methodology

The authors propose a deep learning framework based on a conditional GAN (cGAN) with two primary innovations:

Min-Mean Loss (MM-loss)

To address the diversity of valid sketches for a single image, the authors designed the Min-Mean loss:

  • Min Task Loss: The generator's loss is calculated only against the best-matching ground truth sketch, preventing the model from producing a blurry average of multiple styles.
  • Mean GAN Loss: The discriminator is trained on the entire distribution of human styles by averaging the GAN loss across all available sketches for an image.

Architectural Refinements

The model removes standard skip connections to avoid passing low-level "noise" from the photo, ensuring cleaner, sparser lines. A Global GAN discriminator is employed to ensure the resulting sketch is semantically coherent as a whole.

Data Collection

The study utilizes a new Photo-Sketching Dataset containing 5,000 high-quality drawings based on 1,000 outdoor images. Unlike abstract datasets like QuickDraw, these sketches provide a semantically rich, roughly aligned image-to-sketch correspondence. The model was also evaluated on the BSDS500 benchmark to test its generalization to traditional boundary detection.

Key Results and Insights

The proposed model significantly outperforms baselines in both visual quality and quantitative metrics.

Comparison of Photo-Sketching results against the HED baseline for portrait and indoor scenes.
  • Superior Performance: The model achieved an F1-score of 0.822 on the contour drawing task, compared to 0.536 for pix2pix and 0.782 for HED.
  • State-of-the-Art Boundary Detection: When fine-tuned on BSDS500, the model reached an F1-score of 0.707, surpassing specialized models like RCF (0.693).
  • Human Evaluation: In A/B user studies, the model's drawings were mistaken for hand-drawn sketches 19.5% of the time, a five-fold improvement over previous methods.

A key insight is that the model learns semantic salience—focusing on object boundaries while ignoring distracting texture edges (e.g., patterns on fabric).

Conclusion and Future Work

While highly effective, the model still faces challenges with complex partial occlusions. Future research may explore "closing the loop" via a "Sketch Game" to collect more data or adapting the model to specific artistic styles like cross-hatching. Ultimately, this work demonstrates that human-drawn sketches are a powerful, scalable signal for training advanced computer vision models.

Summary updated

BibTeX
@inproceedings{li2019photo,
  author = {Mengtian Li and Zhe Lin and Radomír Mech and Ersin Yumer and Deva Ramanan},
  title = {{Photo-Sketching: Inferring Contour Drawings from Images}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2019},
  doi = {10.1109/wacv.2019.00154},
}
Figure