CCUnet
An end-to-end image translation model with weight-map for color constancy
1. Download the dataset (take Colorchecker_recommended dataset as an example)
Place RCC dataset in this directory:
./datasets/ColorChecker_ Recommended
Place the mask image data in this directory:
./datasets/masks
2. Install required toolkits
The program needs to use tensorflow and opencv toolkit. It is recommended to install in the conda environment.
And here we create a new conda environment as follow:
Install the latest version of tensorflow-gpu
using the following command:
conda install tensorflow-gpu
install opencv
:
pip install opencv-python
3. Training and testing
Enter the folder where CCUnet.py and dataset are located, and use the following command under the created conda environment to start training:
python CCUnet.py fold1
Here fold1
means that it is the first fold of the dataset used for this training, and can be replaced by fold2
or fold3
, which means the second or the third fold used for training.
After each epoch of training, the testing process is automatically executed.
4. Training and testing results
The train
folder is used to save the image results during the training process.
The test
folder is used to save the image results during the testing process.
The model
folder is used to save the network model which achieves the best results.
And records.txt
is the log file, which records the results of the experiment.