SFSegNet: Parse Freehand Sketches using Deep Fully Convolutional Networks

Junkun Jiang, Ruomei Wang, Shujin Lin, Fei Wang

Abstract

SFSegNet is a novel deep Fully Convolutional Network (FCN) designed specifically for the semantic segmentation of freehand sketches. Unlike traditional image segmentation, sketch parsing faces unique challenges such as extreme pixel sparsity, high abstraction, and stroke jitter. SFSegNet addresses these through a specialized loss-reweighting strategy that ignores background pixels and an affine transform encoder that canonicalizes distorted strokes. To support this research, a new large-scale dataset of 10,000 annotated sketches was developed. Experimental results demonstrate that SFSegNet achieves state-of-the-art performance, significantly outperforming standard FCN architectures.

Introduction

Freehand sketches are a primary medium for human expression, yet their automated understanding remains difficult. Semantic segmentation of sketches involves assigning a part label (e.g., "wing," "tail," "body") to every stroke pixel. Standard deep learning models designed for natural images often fail on sketches due to several factors:

  1. Extreme Class Imbalance: Strokes typically occupy less than 1% of the image area, causing standard networks to default to background classification.
  2. High Abstraction: Variability in drawing styles across different skill levels leads to significant structural differences for the same object category.
  3. Stroke Jitter: Input from touchpads or tablets often contains noise, shaky lines, and overlapping strokes.
  4. Data Scarcity: Existing benchmarks are too small (e.g., 300 images) to support robust deep learning training.

Methods

SFSegNet (Sketch-target deep FCN Segmentation Network) is built upon a modified ResNet34 backbone. The architecture is divided into three stages to capture hierarchical features, which are then fused through upsampling layers to produce a dense, pixel-wise prediction map.

The SFSegNet architecture featuring ResNet34 stages, Affine Transform Encoders, and an upsampling decoder.

Two key innovations distinguish SFSegNet:

  • Loss-Reweighting Strategy: To combat the 99% background dominance, the cross-entropy loss is modified to assign a weight of zero to background pixels. This forces the network to optimize solely for the classification of actual stroke pixels.
  • Affine Transform Encoder: Integrated into the max-pooling layers, this module learns to apply affine transformations to feature maps. This process "straightens" shaky strokes and handles distortions, providing spatial invariance against user-induced jitter.

Datasets

The authors introduced a new large-scale dataset of 10,000 sketches across 10 categories (Airplane, Bicycle, Candelabra, Chair, Fourleg, Human, Lamp, Rifle, Table, Vase). Each category contains 1,000 sketches produced by 10 volunteers, including both experts and non-experts, ensuring a wide range of drawing quality and style. Additionally, the model was evaluated on the legacy Huang benchmark to compare against traditional non-deep-learning methods.

Results and Discussion

SFSegNet was evaluated against several baseline FCN architectures, including FCN-8s, LinkNet-34, and U-Net. On the new dataset, SFSegNet achieved a Pixel-based accuracy (P-metric) of 91.2% and a Component-based accuracy (C-metric) of 88.6%.

Qualitative comparison of SFSegNet (Ours/ATE) against ground truth and baseline models across various sketch categories.

As shown in the qualitative results, SFSegNet provides much cleaner part boundaries and more accurate labeling than standard FCNs. Ablation studies confirmed the importance of the Affine Transform Encoder (ATE); removing it dropped the P-metric accuracy from 91.2% to 89.2%. On the legacy Huang benchmark, SFSegNet achieved 74.2% accuracy, outperforming the original method (67.9%) and performing on par with complex CRF-based methods while being significantly faster (processing 1-2 sketches per second).

Conclusion

SFSegNet demonstrates that deep FCNs can effectively parse static freehand sketches without requiring temporal stroke information. By addressing sparsity and jitter through architectural and loss-function innovations, the model sets a new benchmark for sketch segmentation. Future work will focus on incorporating global category priors to better handle disconnected components in complex sketches, such as multiple candles on a candelabra.

Summary updated

BibTeX
@inproceedings{jiang2019sfsegnet,
  author = {Junkun Jiang and Ruomei Wang and Shujin Lin and Fei Wang},
  title = {{SFSegNet: Parse Freehand Sketches using Deep Fully Convolutional Networks}},
  booktitle = {IJCNN},
  year = {2019},
  url = {https://openreview.net/forum?id=6XwKjaJIXD1},
}
Figure