This repository is implementation of the "Deep Convolution Networks for Compression Artifacts Reduction".
In contrast with original paper, It use RGB channels instead of luminance channel in YCbCr space and smaller(16) batch size.
- PyTorch
- Tensorflow
- tqdm
- Numpy
- Pillow
Tensorflow is required for quickly fetching image in training phase.
Input | JPEG (Quality 10) |
|
|
AR-CNN | Fast AR-CNN |
|
|
When training begins, the model weights will be saved every epoch.
Data augmentation option --use_augmentation performs random rescale and rotation.
If you want to train quickly, you should use --use_fast_loader option.
python main.py --arch "ARCNN" \ # ARCNN, FastARCNN
--images_dir "" \
--outputs_dir "" \
--jpeg_quality 10 \
--patch_size 24 \
--batch_size 16 \
--num_epochs 20 \
--lr 5e-4 \
--threads 8 \
--seed 123 \
--use_augmentation \
--use_fast_loader
Output results consist of image compressed with JPEG and image with artifacts reduced.
python example --arch "ARCNN" \ # ARCNN, FastARCNN
--weights_path "" \
--image_path "" \
--outputs_dir "" \
--jpeg_quality 10