Huanglin Yu, Ke Chen*, Kaiqi Wang, Yanlin Qian, Zhaoxiang Zhang, Kui Jia AAAI 2020 [paper link]
This implementation uses Pytorch.
Please install Anaconda firstly.
git clone https://github.com/yhlscut/C4.git
cd C4-master
## Create python env with relevant packages
conda create --name C4 python=3.6
source activate C4
pip install -U pip
pip install -r requirements.txt
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch # cudatoolkit=10.0 for cuda10
Tested on pytorch >= 1.0 and python3.
Shi's Re-processing of Gehler's Raw Dataset:
/cs/chroma/data/canon_dataset/586_dataset/png
directory into ./data/images/
, without creating subfolders.bash ./data/run.sh
./trained_models/
, and then test model directlyOpen the visdom service
python -m visdom.server -p 8008
foldnum=0
to be foldnum=1
or foldnum=2
in line 6 of ./scripts/train_sq_1stage.sh
and ./scripts/train_sq_3stage.sh
accordingly)bash ./scripts/train_sq_1stage.sh
./log/C4_sq_1stage
to ./trained_models/
):
bash ./scripts/train_sq_3stage.sh
./log/C4_sq_3stage
to ./trained_models/
, and run:
bash ./scripts/test_sq_3stage.sh
./trained_models/
, and then test model directly.If you find this code useful for your research, please consider citing the following paper:
@inproceedings{yu2020cascading,
title={Cascading Convolutional Color Constancy},
author={Yu, Huanglin and Chen, Ke and Wang, Kaiqi and Qian, Yanlin and Zhang, Zhaoxiang and Jia, Kui},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
year={2020}
}
This work is supported in part by the National Natural Science Foundation of China (Grant No.: 61771201,61902131), the Program for Guangdong Introducing Innovative and Enterpreneurial Teams (Grant No.:2017ZT07X183), the Fundamental Research Funds for the Central Universities (Grant No.: D2193130), and the SCUT Program (Grant No.: D6192110).