storymy / take-off-eyeglasses

Remove eyeglasses and shadows from photo

  • Public
  • 35K runs
  • GitHub

Run time and cost

This model costs approximately $0.018 to run on Replicate, or 55 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

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.

Readme

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)

Usage

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 generate_shadow_label.py --syndata_dir <synthetic_data_dir>

Citation

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

@inproceedings{lyu2022portrait,
  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},
  pages={3429--3439},
  year={2022}
}