Shuwei Yue and *Minchen Wei
Color, Imaging, and Metaverse Research Center, The Hong Kong Polytechnic University.
If you use this code, please cite our paper:
@article{yue2023color,
title={Color constancy from a pure color view},
author={Yue, Shuwei and Wei, Minchen},
journal={JOSA A},
volume={40},
number={3},
pages={602--610},
year={2023},
publisher={Optica Publishing Group}
}
- Pytorch
- opencv-python
- step 1: Preparing the dataset
To train PCC, training/validation data should have the following formatting:
datasets/numpy_data/
|1_8D5U5524.npy
|2_8D5U5525.npy
...
datasets/numpy_labels/
|1_8D5U5524.npy
|2_8D5U5525.npy
...
So, it is better to preprocess your data and corresponding labels into .npy format.
The processed Recommend-ColorChecker dataset (CC2018) are provided in the folder of datasets/CC2018/
. Noted that the black level and masked card of this dataset have subtracted, then resized to
- step 2:
Run train.py
You can change the training fold number in
config/param_config.py
move your trained model from log
folder to the pretrain_models
Run test.py
We will release the full dataset soon. For now, only thumbnails are provided in the following link: