This project is based on the thesis《Deep Photo Enhancer: Unpaired Learning for Image Enhancement from Photographs with GANs》。
The author's project address is:nothinglo/Deep-Photo-Enhancer
My code is based on https://github.com/mtics/deep-photo-enhancer
hyerania\Deep-Learning-Project
中文文档说明请看这里
https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
The latest code is on the dev
branch
pip install -r requirements.txt
Expert-C on MIT-Adobe FiveK dataset
libs\constant.py
All this extra foders are created by calling
python directory_strcture.py
images_LR
:Used to store datasets
Expert-C
input
Testing
Training1
Training2
models
:Used to store all the training generated files:
gt_images
input_images
pretrain_checkpoint
pretrain_images
test_images
train_checkpoint
train_images
train_test_images
1Way
2Way
model
: Used to store log_PreTraining.txt
images_LR/input/Training1
should contain folders containing images you want to correct.images_LR/Expert-C/Training2
should contain folders containing the images of the type you want to obtain.images_LR/input/Testing
images_LR/Expert-C/Testing
should contain folders containing the images to get the test scores. In the former you should put the 'bad' sample and on the latter the 'good' sample of the same image Run the following line to get all the images to max_size 512 ...change the commented directoies as needed
python reize.py
Run for training
python 2WayGAN_Train_v3.py
For now, the evaluation and training are simultaneous. So there is no need to run anything.
To evaluate my model, I use PSNR in “XWayGAN_Train.py”
This is inference for general ized images, it may be improved by using a loader.
python unbounded_inference.py --generator_model 'gan2_train_28_40.pth' --input_image 'input_image' --output_image 'output_image'
libs\compute.py
are wrong, which cause the discriminator loss cannot converge and the output is awful.This repo is released under the MIT License
For now, This repo is maintained by Felipe Bivort Haiek.
Welcome to join me to maintain it together.