GFPGANv1.3-to-ncnn icon indicating copy to clipboard operation
GFPGANv1.3-to-ncnn copied to clipboard

The GFPGAN network consists of two networks. Actually GFPGAN and StyleGAN2

The GFPGAN network consists of two networks. Actually GFPGAN and StyleGAN2

Export GFPGAN network from GFPGANv1.3 to ncnn

1 Clone repository
2 Download GFPGANv1.3.pth in root dir of this project
3 Run - Export_PTH_to_PT_GFPGAN.py to convert pth to pt
4 Download pnnx from https://github.com/pnnx/pnnx and unpack to root dir of this project
5 Run pnnx

pnnx.exe gfpganv1_clean_model.pt inputshape=[1,3,512,512]

6 Output will be gfpganv1_clean_model.ncnn.param and gfpganv1_clean_model.ncnn.bin

Export GFPGAN network from GFPGANv1.3 to onnx

1 Clone repository
2 Download GFPGANv1.3.pth in root dir of this project
3 Create folder "pretrained" in root dir of project
4 Put any jpg file 512x512 in root dir with name 1.jpg
4 Run - Export_GFPGANv1_3_to_ONNX.py to convert pth to ONNX

Export StyleGAN2 from GFPGANv1.3 to onnx

1 Clone repository
2 Create folder "pretrained" in root dir of project
3 Download GFPGANv1.3.pth in root dir of this project
4 Run Export_StyleGAN2GeneratorClean_to_ONNX.py