Abstract
SC-FEGAN is a novel face-editing framework that enables users to modify high-resolution images through intuitive free-form sketches and color inputs. By leveraging gated convolutions and a specialized "style loss," the system achieves realistic results even for large-scale edits, such as changing hairstyles or adding accessories, with minimal user effort.
Introduction
Generative Adversarial Networks (GANs) have revolutionized image inpainting and editing. However, many existing tools remain inaccessible to novice users, requiring expert knowledge or offering limited control. Previous models often relied on rigid rectangular masks and lacked the ability to incorporate color information, frequently resulting in blurry or unrealistic edges when large sections of an image were modified. SC-FEGAN (Sketch-and-Color Face Editing GAN) addresses these limitations by providing an intuitive interface for high-resolution (512x512) face editing using free-form sketches and color strokes.
Methodology
The core of SC-FEGAN is an end-to-end trainable network architecture designed to treat user inputs as flexible guidelines rather than strict constraints.
Network Architecture
The generator follows a U-Net structure, replacing standard convolutions with gated convolutional layers. These layers are critical for handling irregular, free-form masks, as they learn to distinguish between valid pixels and those that need reconstruction.
For the discriminator, the authors employ an SN-patchGAN (Spectral Normalized PatchGAN), which ensures both local detail and global consistency without the complexity of multiple discriminators. The network processes a 9-channel input consisting of the incomplete RGB image, a binary sketch, a color stroke map, a binary mask, and a noise map.
Loss Functions
To achieve photorealistic results, the model utilizes a sophisticated combination of loss functions:
- Per-pixel loss for basic reconstruction accuracy.
- Perceptual loss (VGG-16) to ensure high-level features are visually correct.
- Style loss using Gram matrices, which is essential for capturing fine textures like individual hair strands.
- Total Variation (TV) loss to minimize checkerboard artifacts.
- WGAN-GP for stable adversarial training.
Key Insights
A pivotal discovery in this research was the role of Style Loss. The authors found that without it, the model struggled to generate the repetitive, fine-grained textures necessary for realistic hair and accessories. Furthermore, by training on random, stroke-like masks instead of traditional rectangles, the system became robust to the messy, irregular inputs typical of human sketching.
The researchers also implemented an eye-position priority masking algorithm. Since eyes are the most complex and recognizable facial features, forcing the model to reconstruct them frequently during training significantly improved its overall performance in maintaining facial identity and realism.
Key Results
SC-FEGAN demonstrates significant improvements over previous state-of-the-art models like Deepfillv1 and FaceShop. It excels at large-scale edits, such as removing hands covering a face or completely redesigning a hairstyle, with significantly fewer artifacts and seamless color blending.
The system is remarkably efficient, processing a 512x512 image in just 44ms on an NVIDIA V100 GPU. This speed enables real-time, interactive editing sessions. Additionally, the model is robust enough to act as a sketch-to-photo translator, generating realistic faces even when the original image is entirely erased.
Conclusion and Future Work
SC-FEGAN provides a powerful yet accessible tool for face editing. While the quality of the output remains somewhat dependent on the logic of the user's input, the system's ability to recover fine details like earrings and hair texture is a major step forward. Future work may involve refining the sketch generation process and exploring the model's application to other image domains beyond human faces to mitigate current dataset biases.
Summary updated