taki0112 / UGATIT

Official Tensorflow implementation of U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation (ICLR 2020)
MIT License
6.17k stars 1.04k forks source link

Pretrained models -- other than selfie2anime #51

Open VigneshSrinivasan10 opened 5 years ago

VigneshSrinivasan10 commented 5 years ago

Hi,

It would be great if you could also share the other pretrained models. Especially -- horse2zebra and cat2dog.

It will be very helpful for my research to reproduce your results. Thank you very much in advance.

thewaifuai commented 5 years ago

I have published a pre-trained model for cat2dog on kaggle. Please let me know if you have any issues with it. I saved the results in this pdf so you can see what it looks like: results.pdf I used the cat2dog dataset from DRIT.

dcalsky commented 4 years ago

@thewaifuai Do you have any approach to convert checkpoint to savedModel?

thewaifuai commented 4 years ago

@dcalsky It should be possible by launching the UGATIT training to create the model with variables and then loading the checkpoint into the model and then saving the entire graph as savedModel. I do not currently have any savedModel versions of it.

dcalsky commented 4 years ago

@thewaifuai do I need to use GPU to save the entire graph as savedModel? or it will spend lots of time?

thewaifuai commented 4 years ago

@dcalsky GPU might be needed to load the graph with the correct variables which would be necessary for loading the GPU-trained checkpoint.

dcalsky commented 4 years ago

Thanks for your answering. On Oct 15, 2019, 11:29 PM +0800, WaifuAI notifications@github.com, wrote:

@dcalsky GPU might be needed to load the graph with the correct variables which would be necessary for loading the GPU-trained checkpoint. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

NoamGaash commented 4 years ago

@thewaifuai Do you have any approach to convert checkpoint to savedModel?

Hi, did you have any success converting the pretrained model to a savedModel? Any tutorial / code sample would be highly appreaciated 🙏

thewaifuai commented 4 years ago

@thewaifuai Do you have any approach to convert checkpoint to savedModel?

Hi, did you have any success converting the pretrained model to a savedModel? Any tutorial / code sample would be highly appreaciated

Ok I'll try to make one.

thewaifuai commented 4 years ago

@thewaifuai Do you have any approach to convert checkpoint to savedModel?

Hi, did you have any success converting the pretrained model to a savedModel? Any tutorial / code sample would be highly appreaciated

It looks like line 494 of UGATIT.py uses tf.train.Saver which saves checkpoints. tf.saved_model.simple_save() would save model instead of just checkpoints , but it seems to need to know the input and output variables.

Also I have not had success so far in converting it. I think you'd have to load the checkpoint into UGATIT then save as model, which would require editing the UGATIT source code.