storymy / take-off-eyeglasses

Remove eyeglasses and shadows from photo

  • Public
  • 23.9K runs
  • GitHub



Run time and cost

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 82 seconds. The predict time for this model varies significantly based on the inputs.


Portrait Eyeglasses and Shadow Removal by Leveraging 3D Synthetic Data

Official pytorch implementation of paper “Portrait Eyeglasses and Shadow Removal by Leveraging 3D Synthetic Data”. (CVPR 2022)


Make sure the input image is a square image if possible, otherwise the output will appear compressed either vertically or horizontally.

Synthetic Dataset

Download the synthetic dataset in Google Drive.

The meaning of filename: img-[Glass]-[Subject]-[Expression]-[Node Type]-[HDR]-[HDR Rotation]-[Image Type]

Glass: Glass ID
Subject: Subject ID
Expression: Expression Name
Node Type: 4 kinds of floating nodes on different positions of the nose. {0, 1, 2, 3}
HDR: HDR Lighting Name
HDR Rotation: The angle of vertical axis in degree
Image Type: Images with different visibility combinations of eyeglasses and shadows or segmentations

To get the label of shadow segmentation:

python --syndata_dir <synthetic_data_dir>


If our paper helps your research, please cite it in your publications:

  title={Portrait Eyeglasses and Shadow Removal by Leveraging 3D Synthetic Data},
  author={Lyu, Junfeng and Wang, Zhibo and Xu, Feng},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},