Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

you can add example for colab #1

Open
molo32 opened this issue May 5, 2021 · 5 comments
Open

you can add example for colab #1

molo32 opened this issue May 5, 2021 · 5 comments

Comments

@molo32
Copy link

molo32 commented May 5, 2021

please add example for colab

@blandocs
Copy link
Collaborator

blandocs commented May 9, 2021

Unfortunately, I don't have enough time for now. I'd really appreciate it if other people post it.

@cyrilzakka
Copy link

I have a working colab in case you need assisstance

@molo32
Copy link
Author

molo32 commented Sep 17, 2021

cyrilzakka do you have a working colab?
you can share it

@cyrilzakka
Copy link

!git clone https://github.com/naver-ai/StyleMapGAN.git
!cd StyleMapGAN/

!pip install pytorch==1.4.0 torchvision==0.5.0
!pip install numpy==1.18.1 scikit-image==0.16.2 tqdm
!pip install lmdb==0.98 opencv-python==4.2.0.34 munch==2.5.0
!pip install -U scikit-image==0.15.0 scipy==1.2.1 matplotlib scikit-learn
!pip install flask==1.0.2 pillow==7.0.0
!pip install Ninja

%cd StyleMapGAN/

To download checkpoints:

!bash download.sh create-lmdb-dataset celeba_hq

# Download the pretrained network (256x256) 
!bash download.sh download-pretrained-network-256 celeba_hq # 20M-image-trained models
!bash download.sh download-pretrained-network-256 celeba_hq_5M # 5M-image-trained models used in our paper for comparison with other baselines and for ablation studies.

# Download the pretrained network (1024x1024 image / 16x16 stylemap / Light version of Generator)
!bash download.sh download-pretrained-network-1024 ffhq_16x16

And training is as easy as:

!python train.py --dataset celeba_hq --train_lmdb data/celeba_hq/LMDB_train --val_lmdb data/celeba_hq/LMDB_val

Don't forget to preprocess your data if you're using a custom dataset

@ArijZouaoui
Copy link

Hello @cyrilzakka , can you please send me a link for your colab notebook so I can custom it to my dataset? In fact, I have been trying to prepare my data and feed it to generate.py in order to test the model but I'm facing some problems. Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants