NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ByeGlassesGAN: Identity Preserving Eyeglasses Removal for Face Images

Yu-Hui Lee, Shang-Hong Lai

Introduction

Face recognition technology has become a cornerstone of modern security and user authentication. However, its performance often degrades when subjects wear eyeglasses. As a common "natural" occlusion, eyeglasses block critical biometric information around the periocular region and introduce variations in facial feature values due to lens refraction and frame shadows.

Existing methods for removing eyeglasses typically fall into two categories: PCA-based reconstruction, which often results in blurry images, or general-purpose Generative Adversarial Networks (GANs). While GANs produce sharper images, they frequently "hallucinate" features that alter the subject's identity or leave behind noticeable artifacts. ByeGlassesGAN addresses these challenges by employing a multi-task framework designed to remove eyeglasses while strictly preserving the subject's biometric identity.

The ByeGlassesGAN Framework

The core of ByeGlassesGAN is a multi-task generator supported by two discriminators (Global and Local) and a pre-trained Identity Extractor. The generator architecture is divided into three functional components:

  1. Encoder (E): This module extracts high-level feature vectors from the input image.
  2. Segmentation Decoder (SD): This decoder predicts binary masks for both the eyeglasses and the overall face shape. By forcing the model to predict the face shape as a prior, the decoder gains a better spatial understanding of facial proportions, leading to cleaner reconstructions.
  3. Face Decoder (FD): This module generates the final, glasses-free image.

A key innovation is the integration between the Segmentation Decoder and the Face Decoder. By sharing feature maps via skip connections, the SD provides a "spatial hint" to the FD, indicating exactly which pixels belong to the glasses and which belong to the face. This ensures that the inpainting process is confined to the occluded areas and remains consistent with the surrounding skin texture.

ByeGlassesGAN effectively removes thick, dark frames while maintaining facial structure and skin tone.

Identity Preservation

To ensure that the person in the generated image remains recognizable, the authors incorporate an Identity Extractor (IE). This module, a ResNet34 classifier trained on the UMDFaces dataset, calculates an "Identity Preserving Loss." By minimizing the distance between the feature embeddings of the original and generated images, the model is forced to maintain the biometric consistency necessary for downstream face recognition tasks.

Data Synthesis and Training

Training high-quality GANs for this task is difficult due to the lack of large-scale "paired" datasets (images of the same person with and without glasses in identical conditions). To overcome this, the researchers developed a sophisticated data synthesis pipeline using the CelebA dataset. They manually labeled 1,000 eyeglass masks and digitally applied them to glasses-free faces, simulating realistic optical effects such as lens refraction, color tinting, and specular glare. This realism allows the model to generalize better to real-world, "in-the-wild" photographs.

The model handles distinct eyeglass styles, such as round frames, by accurately segmenting the occlusion and reconstructing the underlying eye area.

Results and Evaluation

ByeGlassesGAN demonstrates superior performance across both qualitative and quantitative metrics. In comparisons with state-of-the-art models like CycleGAN and StarGAN, it achieved better Fréchet Inception Distance (FID) scores and higher Mean Opinion Scores (MOS) from human evaluators.

More importantly, the model significantly enhances face recognition accuracy. When used as a pre-processing step, ByeGlassesGAN improved the True Acceptance Rate (TAR) by approximately 7% at a strict False Acceptance Rate (FAR = $10^{-5}$). Ablation studies confirmed that both the Identity Extractor and the multi-task segmentation approach are essential for achieving these results.

Conclusion

ByeGlassesGAN provides a robust solution for removing eyeglasses from facial images without compromising identity. By leveraging multi-task learning and realistic data synthesis, it bridges the gap between image restoration and biometric security. Future work may extend this framework to other facial occlusions, such as facial hair or headwear, further improving the reliability of face recognition systems in diverse real-world scenarios.

Summary updated

BibTeX
@inproceedings{lee2020byeglassesgan,
  author = {Yu-Hui Lee and Shang-Hong Lai},
  title = {{ByeGlassesGAN: Identity Preserving Eyeglasses Removal for Face Images}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58526-6\_15},
}
Figure