Flow-Guided Controllable Line Drawing Generation

Cheng-Yu Fang, Xianfeng HanarXiv 2023

Introduction

Translating photographs into artistic line drawings is a complex task that extends beyond simple edge detection. While traditional methods like Canny filters capture raw gradients, they often fail to replicate the abstraction and stylistic intent of human artists. Deep learning approaches, such as Generative Adversarial Networks (GANs), have attempted to automate this process but frequently struggle with three primary issues: the sparse representation of 3D volumes (abstraction), the lack of spatial guidance for stroke direction, and the absence of user-tunable parameters for style control. This paper presents a novel framework that addresses these challenges through vector flow guidance and a dedicated control regressor.

Methodology

The proposed architecture, illustrated in Figure 1, introduces several key components designed to improve both the quality and controllability of generated line art.

I2FNet and Edge Tangent Flow

To provide spatial guidance, the system utilizes I2FNet (Image-to-Flow Network). Instead of operating solely on pixel intensities, this module learns to predict an Edge Tangent Flow (ETF) field. The ETF acts as a directional map, ensuring that generated strokes follow the natural contours and semantic structures of the input image, which significantly reduces visual noise.

Double Flow Generator (DFG)

The core of the generation process is the Double Flow Generator. This U-Net-based architecture employs two distinct encoder branches: one for the original image and another for the predicted ETF. By fusing these flows, the model produces lines that are both semantically accurate and spatially coherent.

The proposed architecture featuring I2FNet, Double Flow Generator, and various loss functions including FFT Loss.

Controllability and Loss Functions

User control is achieved via a Line Control Matrix (LCM) and a Line Control Regressor (LCR). By adjusting a single parameter ($\alpha$), users can modify line thickness and continuity in real-time. Furthermore, the authors incorporate a Fourier Transformation (FFT) Loss. By supervising the model in the frequency domain, the system ensures the production of sharp, high-frequency "edge" components, eliminating the haziness typical of standard GAN outputs.

Experimental Results

The framework was trained on a curated dataset of 1,634 character images, including manga and real-world photographs. Ground truth data was generated using a synthetic "Flow-based Difference of Gaussian" method to provide diverse training targets.

Quantitative and Qualitative Performance

The proposed model achieved a Fréchet Inception Distance (FID) of 20.3, outperforming major competitors such as SPADE (23.8), Pix2Pix, and CycleGAN. It also demonstrated superior performance in Structural Similarity (SSIM) and Peak Signal-to-Noise Ratio (PSNR). Qualitatively, the model excels in maintaining clean, continuous strokes in complex areas like hair and clothing folds, where other models often produce artifacts or disconnected lines.

An example of a high-quality line drawing generated by the proposed framework, demonstrating clean and continuous strokes.

Style Controllability

By varying the control parameter $\alpha$ from 0.1 to 0.9, the model demonstrates a smooth transition between highly detailed, fine-lined sketches and bold, simplified manga-style illustrations. This decoupled control allows for a continuous spectrum of artistic styles without the need for retraining.

Conclusion

By integrating vector flow guidance and frequency domain supervision, this framework significantly advances the state-of-the-art in automated line drawing generation. The introduction of the Line Control Regressor provides a practical "knob" for artistic adjustment, making the tool more accessible for creative workflows. Future work will explore extending these techniques to complex architectural environments and more intricate artistic styles such as cross-hatching.

Summary updated

BibTeX
@misc{fang2023flow,
  author = {Cheng-Yu Fang and Xianfeng Han},
  title = {{Flow-Guided Controllable Line Drawing Generation}},
  year = {2023},
  eprint = {2307.07540},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.07540},
}
Figure