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.
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
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
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.