This repository contains the implementation of Light Maps for relighting portraits. The code is based on the paper LightMaps.pdf.
- Follow the
Step 1mentioned in DSINE GitHub to install the required dependencies and set up the necessary files. - Replace
test_minimal.pywithnormals.pyin the folderprojects/dsine/. - Save the file
light_maps.pyin the same folder. - Save the input images in the folder
projects/samples/img/. - Update the input image path in
light_maps.pyto point to your desired image. For example:file_path = os.path.abspath('samples/img/input_img.hdr')
- Navigate to the folder
projects/dsine/, and run the following command:python light_maps.py ./experiments/exp001_cvpr2024/dsine.txt
- The output images are save in
projects/samples/output/