From the Li-Chonyi published paper and Li-Chongyi - author repository, Tuvovan implemented, I tried to learn and re-implement Zero-DCE.
I use Keras library from tensorflow 1.14 to develop this model
👍 Ubuntu 18.04
👍 python=3.6
👍 tensorflow 1.14
👍 numpy>=1.16.4
👍 Opencv
👍 skimage
👍 pillow
👍 pyaml
- Train dataset from Li-Chongyi / Zero-DCE
- Test dataset from Li-Chongyi / Zero-DCE
In this project, training data need to be converted to TFrecord format:
There are some Flag from file create_tfrecord.py
need to be consideration:
-
train_directory
in line 21 ofcreate_tfrecord.py
: it should be where you store raw training data./data/train_data
-
output_directory
in line 26 ofcreate_tfrecord.py
: it's the folder you want to store tfrecord files:./data/tfrecord
-
run
python3 create_tfrecord.py
Becarefull with the callback function, because I log too many images to tensorboard, so the tensorboard log may very huge, if you do not have large memory hardisk you need to deactive tensorboard callback function.
Need to check the config file in ./config.yaml
.
DATA_DIR: ./data/tfrecord
LOG_DIR: ./logs
OUTPUTS: ./outputs
INPUT_HEIGHT: 256
INPUT_WIDTH: 256
N_CHANNEL: 3
SOLVER:
EPOCHS: 200
INIT_LR: 0.0001
MOMENTUM: 0.9
LR_SCHEDULE: cosine
OPTIMS: sgd
TRAINING: True
REGULARIZATION: 0.0001
BATCH_SIZE: 48
To train the model run CUDA_VISIBLE_DEVICES=0 python3 train.py
-
Training log and tensorboard log are stored in
./logs
-
weight h5 and *.ckpt are stored in
./outputs
-
ADD QAT (quantization aware training) feature for optimize 8bit Uint8
-
Update channel first format