/pix2pix-tensorflow

A Tensorflow implementation of Pix2Pix

Primary LanguagePythonMIT LicenseMIT

pix2pix2 - Tensorflow

A Tensorflow implementation of Pix2Pix

Original paper: Image-to-Image Translation with Conditional Adversarial Networks (pix2pix)
Paper Authors and Researchers: Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, Alexei A. Efros

Review training on colab:
Open In Colab

Review training on Kaggle:
Kaggle

Author

Usage

Dependencies

  • python >= 3.9
  • numpy >= 1.20.3
  • tensorflow >= 2.7.0
  • opencv >= 4.5.4
  • matplotlib >= 3.4.3

Train your model by running this command line

Training script:

python train.py --all-train ${link_to_train_A_folder} \
    --all-train ${link_to_train_B_folder} --epochs ${epochs}
    --bone ${bone} --weights ${weights} --pretrain ${pretrain} \
    --batch-size ${batch_size} --rotation ${rotation} \ 
    --random-brightness ${random_brightness} --image-size ${image-size}

Example:

python train.py --all-train face/*.jpg  --all-train comics/*.jpg \
  --bone resunet50_unet --weights imagenet --pretrain True --epochs 10 --batch-size 8 --rotation 60 --random-brightness True --image-size 256

There are some important arguments for the script you should consider when running it:

  • all-train: The folder of training data
  • batch-size: The batch size of the dataset
  • image-size: The image size of the dataset

Feedback

If you meet any issues when using this library, please let us know via the issues submission tab.