/TransGAN

A quick guide on how to deploy TransGAN network on the cloud

Primary LanguagePython

TransGAN

A quick guide on how to deploy TransGAN network on the cloud using DeepMux serverless functions.

In this example we use use weights published by the authors to generate CelebA-like images.

Full guide describing the deployment is availible at Medium.

Credits

Code uses original TransGAN implementation referenced in TransGAN: Two Transformers Can Make One Strong GAN", Yifan Jiang, Shiyu Chang, Zhangyang Wang paper.

Deploy and run

1. Download model weights

Download celeba64_checkpoint.pth checkpoint from Google Drive to ./pretrained_weight directory.

2. Install and configure DeepMux cli

pip install deepmux-cli

deepmux login

3. Deploy the model

./deploy.sh

4. Run the model

deepmux run --name TransGAN --data '' > face.jpg

OR

curl -o face.jpg \
  -X POST \
  -H "X-Token: <YOUR API TOKEN>" \
  https://api.deepmux.com/v1/function/TransGAN/run