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.
Code uses original TransGAN implementation referenced in TransGAN: Two Transformers Can Make One Strong GAN", Yifan Jiang, Shiyu Chang, Zhangyang Wang paper.
Download celeba64_checkpoint.pth
checkpoint from Google Drive to ./pretrained_weight
directory.
pip install deepmux-cli
deepmux login
./deploy.sh
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