Skip to content

Official Implementation of "Spin-UP: Spin Light-for Natural Light Uncalibrated Photometric Stereo", CVPR2024

Notifications You must be signed in to change notification settings

LMozart/CVPR2024-SpinUP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spin-UP: Spin Light-for Natural Light Uncalibrated Photometric Stereo

Spin-UP: Spin Light-for Natural Light Uncalibrated Photometric Stereo

Zongrui Li*, Zhan Lu*, Haojie Yan, Boxin Shi, Gang Pan, Qian Zheng, Xudong Jiang

Given a set of observed images captured under arbitrary spin light, we recovers surface normal of the objects.

Dependencies

We use Anaconda to install the dependencies given following code:

# Create a new python3.8 environment
conda env create -f code/environment.yml
conda activate spinup

Test

To test our method, please download the dataset and checkpoint files from link.

To test Spin-UP on particular object, please run:

python test.py --config CONFIG_PATHs

To test Spin-UP on multiple objects in a particular dataset, please run:

# Synthetic Dataset.
sh configs/sync-rand-light/test.sh 
# Real-world Dataset.
sh configs/real/test.sh 

Train

To train on particular dataset, please run:

# Synthetic Dataset.
sh configs/sync-rand-light/train_1.sh
sh configs/sync-rand-light/train_2.sh
# Real-world Dataset.
sh configs/real/train_1.sh
sh configs/real/train_2.sh

To train on your own data, please first follow the steps in code/preprocess/image_process.

sh preprocess/image_process/preprocess_crop_imgs.sh
# create mask.jpg in each ${out_root}/{scene} folder with phtotoshop
sh preprocess/image_process/preprocess_offset.sh

Then, use code/preprocess/camera_calib/even.py to calibrate the dataset. After that, use script: code/preprocess/light_init/init_env_map_gray_fixlobe_sh.py to preprocess the light map.

About

Official Implementation of "Spin-UP: Spin Light-for Natural Light Uncalibrated Photometric Stereo", CVPR2024

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published