Skip to content

asiajo/DPR

 
 

Repository files navigation

Face shadow creator and remover

Shadow creator

Combination of two other repositories: https://github.com/zhhoper/DPR and https://github.com/kampta/face-seg and some OpenCV code.

Create face shadow adds a shadow on the face and slight shadow on the hair, but leaves the background untouched. Sample images:

Usage:

python create_face_shadow.py --input_data_folder ./data --output_folder ./result

Shadow remover

Usage:

python deshadow.py --input_data_folder ./data/shadowed --output_folder ./result/deshadowed

For light modification model and code credits to:

@InProceedings{DPR,
  title={Deep Single Portrait Image Relighting},
  author = {Hao Zhou and Sunil Hadap and Kalyan Sunkavalli and David W. Jacobs},
  booktitle={International Conference on Computer Vision (ICCV)},
  year={2019}
}

For face segmentation model and code credits to: Kamal Gupta

About

Code for Deep Single-image Portrait Image Relighting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%