Compressing Facial Makeup Transfer Networks by Collaborative Distillation and Kernel Decomposition

Bianjiang Yang, Zi Hui, Haoji Hu, Xinyi Hu, Lu Yu

Abstract

Facial makeup transfer is a computationally intensive task typically requiring deep encoder-decoder architectures. This paper presents a novel compression strategy to enable high-quality makeup transfer on resource-constrained devices. By integrating Collaborative Knowledge Distillation (CKD) and Kernel Decomposition, the authors successfully compressed the state-of-the-art BeautyGAN model. The resulting architecture achieves a 66% reduction in parameters and a 43% reduction in MACs while maintaining—and in some cases exceeding—the visual quality of the original teacher model.

Introduction

Facial makeup transfer involves migrating cosmetic styles from a reference image to a non-makeup face while preserving the subject's identity. While models like BeautyGAN produce impressive results, their reliance on heavy deep learning architectures makes them difficult to deploy on smartphones. Most model compression research focuses on high-level tasks like classification; this work addresses the specific needs of low-level image-to-image translation in the makeup domain.

Proposed Compression Strategy

The authors employ a "Teacher-Student" framework, using the original BeautyGAN as the teacher to guide a smaller student network through two primary phases:

1. Collaborative Knowledge Distillation (CKD)

The encoder is compressed by reducing the number of filters per layer. To bridge the gap between the teacher’s large feature maps and the student’s smaller ones, the authors introduce a $1 \times 1$ convolutional layer with a linear activation function. This allows the student to learn a linear embedding of the teacher’s features, guided by a specialized feature loss function that captures the "exclusive collaborative relationship" between the encoder and decoder.

2. Kernel Decomposition

To lighten the residual blocks, standard convolutions are replaced with depth-wise separable convolutions. This process decomposes a standard convolution into a depth-wise convolution followed by a $1 \times 1$ point-wise convolution, drastically reducing multiplications. Interestingly, the authors found that increasing the number of residual blocks from 6 (in the teacher) to 9 (in the student) provided the best balance of speed and representational power.

Figure 1: Overview of the proposed compression framework, showing the transition from the original BeautyGAN generator to the compressed "Small Generator" via collaborative distillation and residual block decomposition.

Experimental Results

The study utilized the MT (Makeup Transfer) dataset, consisting of 3,834 high-resolution face images. Evaluation combined quantitative hardware metrics with qualitative perceptual studies.

Quantitative Performance

The compression results demonstrate significant efficiency gains across all metrics:

  • Parameters: Reduced from 9.23M to 3.13M (~66% reduction).
  • Model Size: Shrunk from 36MB to 12MB.
  • Computation (MACs): Dropped from 66.89G to 38.27G.
  • Inference Time: On an Intel Xeon CPU, latency decreased from 0.495s to 0.403s.

Qualitative and Perceptual Quality

Despite the reduction in size, the student model achieved a slightly better makeup distance (15.09 vs 15.13) and improved face identity preservation (0.163 vs 0.188) compared to BeautyGAN. In a user study with 111 participants, the compressed model was preferred 58.92% of the time, often due to its superior ability to match the illumination of the reference image.

Figure 6: Qualitative comparison of makeup transfer results. The proposed small generator produces results that are visually comparable to or better than the original BeautyGAN, often matching reference illumination more effectively.

Conclusion

This work demonstrates that strategic distillation and kernel decomposition can significantly reduce the footprint of image-to-image translation models without sacrificing quality. While the CPU speedup was modest (18.5%) due to memory access overhead typical of depth-wise convolutions, the massive parameter reduction makes these models far more viable for mobile storage. Future work will focus on optimizing these kernels for mobile-specific hardware accelerators to further reduce real-world latency.

Summary updated

BibTeX
@inproceedings{yang2020compressing,
  author = {Bianjiang Yang and Zi Hui and Haoji Hu and Xinyi Hu and Lu Yu},
  title = {{Compressing Facial Makeup Transfer Networks by Collaborative Distillation and Kernel Decomposition}},
  booktitle = {VCIP},
  year = {2020},
  url = {https://openreview.net/forum?id=lavDh3KikC},
}
Figure