Skip to content

Latest commit

 

History

History
46 lines (42 loc) · 1.88 KB

README.md

File metadata and controls

46 lines (42 loc) · 1.88 KB

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.