Training on custom dataset #39

Closed
opened 2026-01-29 21:38:59 +00:00 by claunia · 3 comments
Owner

Originally created by @3BBUAE on GitHub (Jul 28, 2021).

Hello, first of all fantastic work and thanks for sharing.

I would like to know how can I train the model on a custom dataset?
I noticed in the training explanation, there are 3 files I need to download excluding the dataset:
-Pre trained styleGAN2 model
-FFHQ component locations
-Arcface

I know that Arcface is used for face recognition. I assume that the pretrained styleGAN2 model, is to train the GFPGAN model from scratch so if i wanted to continue training I could just use the model you have provided for inference to continue training on my custom dataset. Finally for the components locations file, will it work with my custom dataset or is it specific to the FFHQ dataset, and if it won't work how will I be able to create my own so it may work with my dataset?

I hope my issue is clear, thanks.

Originally created by @3BBUAE on GitHub (Jul 28, 2021). Hello, first of all fantastic work and thanks for sharing. I would like to know how can I train the model on a custom dataset? I noticed in the training explanation, there are 3 files I need to download excluding the dataset: -Pre trained styleGAN2 model -FFHQ component locations -Arcface I know that Arcface is used for face recognition. I assume that the pretrained styleGAN2 model, is to train the GFPGAN model from scratch so if i wanted to continue training I could just use the [model ](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/GFPGANv1.pth) you have provided for inference to continue training on my custom dataset. Finally for the components locations file, will it work with my custom dataset or is it specific to the FFHQ dataset, and if it won't work how will I be able to create my own so it may work with my dataset? I hope my issue is clear, thanks.
Author
Owner

@3BBUAE commented on GitHub (Jul 28, 2021):

Also does the model downsample the images while training, or will I need to provide my own version of low resolution faces?

@3BBUAE commented on GitHub (Jul 28, 2021): Also does the model downsample the images while training, or will I need to provide my own version of low resolution faces?
Author
Owner

@MDYLL commented on GitHub (Jul 28, 2021):

I trained on my own dataset without pretrained Stylegan. Results, that I got, so-so...I didn't understand how to use my own pretrained Stylegan

@MDYLL commented on GitHub (Jul 28, 2021): I trained on my own dataset without pretrained Stylegan. Results, that I got, so-so...I didn't understand how to use my own pretrained Stylegan
Author
Owner

@xinntao commented on GitHub (Aug 3, 2021):

@3BBUAE

  1. You can continue your training from the pretrained models.
  2. The FFHQ component locations are for FFHQ. For your own dataset, I think i) You can first remove the component discriminators. or ii) generate the locations with the provided scripts https://github.com/TencentARC/GFPGAN/blob/master/scripts/parse_landmark.py
  3. The current training process only requires High-Resolution images, and the data loader will generate low-resolution ones on the fly.

@MDYLL

  1. You can finetune from the pre-trained GFPGAN.
  2. Or use the provided StyleGAN. (I think you may not need to train the StyleGAN on your own dataset.)
@xinntao commented on GitHub (Aug 3, 2021): @3BBUAE 1. You can continue your training from the pretrained models. 2. The FFHQ component locations are for FFHQ. For your own dataset, I think i) You can first remove the component discriminators. or ii) generate the locations with the provided scripts https://github.com/TencentARC/GFPGAN/blob/master/scripts/parse_landmark.py 3. The current training process only requires High-Resolution images, and the data loader will generate low-resolution ones on the fly. @MDYLL 1. You can finetune from the pre-trained GFPGAN. 2. Or use the provided StyleGAN. (I think you may not need to train the StyleGAN on your own dataset.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#39