PPR10K Dateset:
Download raw portrait photos and retouching target from baiduyun (code:pprd).
MIT-Adobe FiveK Dataset:
Download raw portrait photos and retouching target from baiduyun (code:fv5k).
HDR+ Dateset:
Download raw portrait photos and retouching target from baiduyun (code:hdrp).
Please ensure the data structure is as below
├── ppr
├── train
├── source_aug
├── 0_0.tif
├── 0_0_1.tif
└── ...
├── target
├── 0_0.tif
├── 0_1.tif
└── ...
└── val
├── source
├── 1356_0.tif
├── 1356_1.tif
└── ...
├── target
├── 1356_0.tif
├── 1356_1.tif
└── ...
├── FiveK
├── train_input
├── 1_0.tif
└── ...
├── train_target
├── 1_0.tif
└── ...
├── test_input
├── 4501_0.tif
└── ...
├── test_target
├── 4501_0.tif
└── ...
└── hdr
├── train_input
├── 193_0.tif
└── ...
├── train_target
├── 193_0.tif
└── ...
├── test_input
├── 196_0.tif
└── ...
├── test_target
├── 196_0.tif
└── ...
##Environment Preparation Requirements
pip install -r requirements.txt
Build. Modify the CUDA path in trilinear_cpp/setup.sh adaptively and
cd trilinear_cpp
sh trilinear_cpp/setup.sh
To train our method on the dataset, please run this command:
python train_lut_bilinear_pooling_effres.py --data_path [path_to_dataset] --gpu_id [gpu_id] --output_dir [path_to_save_models]
To evaluate our model on the dataset, run:
Generate the retouched results:
python validation.py --data_path [path_to_dataset] --gpu_id [gpu_id] --model_dir [path_to_models]
Use matlab to calculate the measures in our paper, Please input the address of the photos generated by the model, the address of the expert retouched target photos and the address of the portrait area mask respectively.
source_dir='';
target_dir='';
mask_dir='';
You can download pretrained models from baiduyun (code:pprm).
├── saved_models
├── fivek
├── classifier_0.pth
└── LUTs_0.pth
├── hdr
...
├── ppr
└── ...
Our model achieves the following performance on PPR10K dataset:
Dataset | PSNR | △E-ab | PSNR-HC |
---|---|---|---|
PPR-a | 26.51 | 6.45 | 29.74 |
PPR-b | 25.40 | 7.42 | 28.66 |
PPR-c | 25.89 | 7.21 | 29.15 |
PPR-HR | 26.21 | 6.62 | 29.44 |
Our model achieves the following performance on FiveK dataset:
Dataset | PSNR | △E-ab | SSIM |
---|---|---|---|
FiveK | 25.42 | 7.29 | 0.917 |
Our model achieves the following performance on HDR+ dataset:
Dataset | PSNR | △E-ab | SSIM |
---|---|---|---|
HDR+ | 23.77 | 7.89 | 0.866 |