zhanghang1989 / PyTorch-Multi-Style-Transfer

Neural Style and MSG-Net
http://hangzh.com/PyTorch-Style-Transfer/
MIT License
976 stars 207 forks source link

training new model #4

Closed akashdexati closed 6 years ago

akashdexati commented 6 years ago

@zhanghang1989 I trained a model with three style images. Now, I see eight .model files. Can you please tell me which .model file to use OR how to integrate them to single model file.

Thanks Akash

zhanghang1989 commented 6 years ago

wget -O 21styles.model https://www.dropbox.com/s/2iz8orqqubrfrpo/21styles.model?dl=1

https://github.com/zhanghang1989/PyTorch-Style-Transfer/blob/master/experiments/models/download_model.sh#L2

akashdexati commented 6 years ago

I want to use my own styles. Can you tell me the process for that. The one mentioned in README has generated eight model files. So, it is not clear to me how to generate final model from all thode checkpoints. Can you please tell that

Thanks

zhanghang1989 commented 6 years ago

For training --style-folder: path to the folder style images.

The code by default save all the checkpoints, it will generate Final_.model when finish. If you couldn't wait, just use the last saved checkpoints.

akashdexati commented 6 years ago

I used the last saved checkpoint file. But the result was not good.

Are there any constraints about the training data or other things involved ? Is it the case that style images should be strictly 1024x1024 sized ? Or any other constraints ?

zhanghang1989 commented 6 years ago

If using default parameters and default images, you should be able to reproduce the pretrained models.

For other setup, you may need to tune the params.

zhanghang1989 commented 6 years ago

I guess you are using the unfinishing checkpoint. The code will save checkpoints every a few iterations, only for resuming. Please use the final model for testing performance.

akashdexati commented 6 years ago

Thanks @zhanghang1989 Somehow the training process was uncomplete so I could not see the final model file. I reran the train script and it works well now.