How to train the model? #268

Open
opened 2022-05-21 13:43:54 +02:00 by sdasdasddaaaa · 9 comments
sdasdasddaaaa commented 2022-05-21 13:43:54 +02:00 (Migrated from github.com)

Hello everyone, I have downloaded the source code, how can I train the model?thank you!

Hello everyone, I have downloaded the source code, how can I train the model?thank you!
BeaverInGreenland commented 2022-05-23 09:08:41 +02:00 (Migrated from github.com)

Hello, have you tried to follow these steps ? https://github.com/neuralchen/SimSwap#training

Hello, have you tried to follow these steps ? https://github.com/neuralchen/SimSwap#training
SerZhyAle commented 2022-05-26 11:24:36 +02:00 (Migrated from github.com)

friends! Still not sure why we have to train? What is the point if we have already pretrained models published year ago?
It can give some best results within the particular face? Can I see some samples/examples?

friends! Still not sure why we have to train? What is the point if we have already pretrained models published year ago? It can give some best results within the particular face? Can I see some samples/examples?
BeaverInGreenland commented 2022-06-01 11:48:20 +02:00 (Migrated from github.com)

If I'm not wrong, the pretrained weights come from a training on either vggface2-224 (people folder in checkpoints/) or vggface2-hq (512 folder in checkpoints/)
The point of training is to change the dataset for example

If I'm not wrong, the pretrained weights come from a training on either vggface2-224 (**people** folder in **checkpoints/**) or vggface2-hq (**512** folder in **checkpoints/**) The point of training is to change the dataset for example
chenqiu1024 commented 2023-03-12 17:23:26 +01:00 (Migrated from github.com)

Same question.
I trained my model for 400K+ steps following these steps: https://github.com/neuralchen/SimSwap#training. What I don't get is how to use the trained results?
All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth.
So, how do I get these 3 files from my training results?

Same question. I trained my model for 400K+ steps following these steps: [https://github.com/neuralchen/SimSwap#training](url). What I don't get is how to use the trained results? All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth. So, how do I get these 3 files from my training results?
Fibonacci134 commented 2023-03-21 15:03:46 +01:00 (Migrated from github.com)

Same question.
I trained my model for 400K+ steps following these steps: https://github.com/neuralchen/SimSwap#training. What I don't get is how to use the trained results?
All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth.
So, how do I get these 3 files from my training results?

Can you post the model? You have to make some changes in the models layers to get it to work.

> Same question. > I trained my model for 400K+ steps following these steps: [https://github.com/neuralchen/SimSwap#training](url). What I don't get is how to use the trained results? > All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth. > So, how do I get these 3 files from my training results? Can you post the model? You have to make some changes in the models layers to get it to work.
chenqiu1024 commented 2023-03-22 15:08:16 +01:00 (Migrated from github.com)

Same question.
I trained my model for 400K+ steps following these steps: https://github.com/neuralchen/SimSwap#training. What I don't get is how to use the trained results?
All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth.
So, how do I get these 3 files from my training results?

Can you post the model? You have to make some changes in the models layers to get it to work.

How to post the model? Do you mean the .pth files?

> > Same question. > > I trained my model for 400K+ steps following these steps: [https://github.com/neuralchen/SimSwap#training](url). What I don't get is how to use the trained results? > > All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth. > > So, how do I get these 3 files from my training results? > > Can you post the model? You have to make some changes in the models layers to get it to work. How to post the model? Do you mean the .pth files?
chenqiu1024 commented 2023-03-23 03:29:34 +01:00 (Migrated from github.com)

Same question.
I trained my model for 400K+ steps following these steps: https://github.com/neuralchen/SimSwap#training. What I don't get is how to use the trained results?
All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth.
So, how do I get these 3 files from my training results?

Can you post the model? You have to make some changes in the models layers to get it to work.

The files are too big, they all exceed the 25MB limit. I'll try using some internet storage service.

> > Same question. > > I trained my model for 400K+ steps following these steps: [https://github.com/neuralchen/SimSwap#training](url). What I don't get is how to use the trained results? > > All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth. > > So, how do I get these 3 files from my training results? > > Can you post the model? You have to make some changes in the models layers to get it to work. The files are too big, they all exceed the 25MB limit. I'll try using some internet storage service.
chenqiu1024 commented 2023-03-25 11:40:28 +01:00 (Migrated from github.com)

Same question.
I trained my model for 400K+ steps following these steps: https://github.com/neuralchen/SimSwap#training. What I don't get is how to use the trained results?
All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth.
So, how do I get these 3 files from my training results?

Can you post the model? You have to make some changes in the models layers to get it to work.

I have uploaded the 4 model files of my 330000th epoch to dropbox, please check them out @Fibonacci134 : https://www.dropbox.com/scl/fo/n03aggt78lbpoqwubae4d/h?dl=0&rlkey=oecxeiqmhh79804xa2nifw4ca

> > Same question. > > I trained my model for 400K+ steps following these steps: [https://github.com/neuralchen/SimSwap#training](url). What I don't get is how to use the trained results? > > All I found is that, for each saving, there are 4 files generated in the ./checkpoints/MyModelName folder, like: 30000_net_D.pth, 30000_net_G.pth, 30000_optim_D.pth, 30000_optim_G.pth. However, the model files needed by the inferencing process are: latest_net_D1.pth, latest_net_D2.pth and latest_net_G.pth. > > So, how do I get these 3 files from my training results? > > Can you post the model? You have to make some changes in the models layers to get it to work. I have uploaded the 4 model files of my 330000th epoch to dropbox, please check them out @Fibonacci134 : https://www.dropbox.com/scl/fo/n03aggt78lbpoqwubae4d/h?dl=0&rlkey=oecxeiqmhh79804xa2nifw4ca
OlofOu commented 2023-07-28 21:19:03 +02:00 (Migrated from github.com)

Hi @chenqiu1024, I am really struggled in this problem as well, since it seems to have two discriminaters when loading pretrained models to swap face. Did you solve this problem? Would you mind to share how you conquer this issue?Thanks
in advance.

Hi @chenqiu1024, I am really struggled in this problem as well, since it seems to have two discriminaters when loading pretrained models to swap face. Did you solve this problem? Would you mind to share how you conquer this issue?Thanks in advance.
Sign in to join this conversation.