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

Pre-trained model weights #1

Open
GODGANG4885 opened this issue Oct 26, 2020 · 4 comments
Open

Pre-trained model weights #1

GODGANG4885 opened this issue Oct 26, 2020 · 4 comments

Comments

@GODGANG4885
Copy link

Thanks for sharing this awesome re-implementation.
Can you please provide pre-trained model weights so that we can finetune your model?

@zcemycl
Copy link
Owner

zcemycl commented Oct 26, 2020

@GODGANG4885

Sure. Can you leave me your email address?

I am not certain if this is a good implementation, so the weights might not be pretrained as expected. To clarify, you want the pretrained weights from the first step (pretrain wgan)? Or the second step (finetune srn)?

I trained the model in the following settings due to my limited computation resources,
1.

python main.py --pretrained_network=1 --batch_size=16 --gan_loss_alpha=0 --pretrain_l1_alpha=5 --mrf_alpha=0 --lrG=1e-5 --lrD=5e-5 --beta1 0.5 --beta2 0.9 --summarydir=log/store
--lrG=1e-5 --lrD=5e-5 --mrf_alpha=0.05 --summarydir=log/store5 --beta1=.5 --beta2=.9 --pretrain_l1_alpha=1.2  --gan_loss_alpha=0.001 

Refer to the paper,

To better stabilize the adversarial training, our model ispre-trained first with only reconstruction loss (λs= 5).Afterwards, we letλmrf= 0.05andλadv= 0.001forfine-tuning SRN until convergence. During training, Adamsolver [22] with learning rate1e−4is adopted whereβ1= 0.5andβ2= 0.9. Training batch size is 16. Theinput and output are linearly scaled within range[−1,1]

@kareem337
Copy link

Thank for this great work. i have trained the model succefully but im not sure how to test the model or how to put the validator dataset to test the model. plus where can i find the output. thanks in advance!!

@zcemycl
Copy link
Owner

zcemycl commented Dec 24, 2021

@kareem337 The code I had written does not contain a test/deploy script. To test it with another dataset, i would recommend to read data.py, it shows how to load images into dataloader. Then, in main.py, there is a line to call the loader, please replace it with another dataloader. Finally, evaluate the model to generate the outerpolated image and save it with typical matplotlib method.

This repo is a trial version for me to replicate the paper, the performance is not guaranteed to be good.

@kareem337
Copy link

It worked! Thank you for your help. Since you are saying that the code is not guaranteed to be good, what kind of methods or files are missing so that the code can outpaint an image successfully.

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

3 participants