ChangeMyPet provides a deep learning model that is capable of replacing a real dog/cat image with a GAN(Generative adversarial network) generated image with the help of segmentation masks.
The results are quite interesting and the model is learning to generate images in the required segment. Regularization and ensembling losses have given more accurate results but we are still exploring other techniques. Our next step is to include Discriminator so that the images generated look more real. Generate a pull request if you want to conrtribute to the project.
- Clone the repository in your GitHub account Clone with HTTPS
- To run the code, please download the pretrained pytorch weights first. Pretrained Weights
biggan512-release.pt # download this for generating 512*512 images
- Upload the biggan512-release.pt file to your google drive.
- Open MSE_average_losses_clean.ipynb file in Google Colab or your Jupyter Notebook and run it. Comments are added to the file as needed.
paper: https://arxiv.org/abs/1809.11096
https://github.com/ivclab/BIGGAN-Generator-Pretrained-Pytorch
https://pytorch.org/hub/pytorch_vision_fcn_resnet101/
https://pytorch.org/hub/pytorch_vision_deeplabv3_resnet101/
dependencies:
- python=3.6
- cudatoolkit=10.0
- pytorch
- torchvision
- scipy
Please feel free to leave suggestions or comments to ([email protected]).