how to use the trained 512 model ? #251

Open
opened 2022-04-28 08:37:28 +02:00 by doctorcui · 5 comments
doctorcui commented 2022-04-28 08:37:28 +02:00 (Migrated from github.com)
No description provided.
Fibonacci134 commented 2022-04-29 01:25:59 +02:00 (Migrated from github.com)

Please refrain from spamming issues, reread the Updated preparation guide and if you have a specific problem, im sure one of us can help you. Thanks 🙏

Please refrain from spamming issues, reread the Updated preparation guide and if you have a specific problem, im sure one of us can help you. Thanks 🙏
doctorcui commented 2022-04-29 03:07:29 +02:00 (Migrated from github.com)

ok, thank you
i have a problem now,
i follow the guide to train 512 model
first i prepare 6W pics
and i run python scripts/crop_align_vggface2_FFHQalign.py --input_dir $DATAPATH$/VGGface2/train --output_dir_ffhqalign $ALIGN_OUTDIR$ --mode ffhq --crop_size 256
and python scripts/inference_gfpgan_forvggface2.py --input_path $ALIGN_OUTDIR$ --batchSize 8 --save_dir $HQ_OUTDIR$

to make my 512*512 dataset

then i run python train.py --name simswap512_test --batchSize 16 --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep True
to train my model

i use python test_video_swapsingle.py --crop_size 512 --use_mask --name simswap512 --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path ./demo_file/Iron_man.jpg --video_path ./demo_file/multi_people_1080p.mp4 --output_path ./output/multi_test_swapsingle.mp4 --temp_path ./temp_results to test
but finallly error comes
error appears []Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0']
I don't know where I went wrong I really look forward to your help

ok, thank you i have a problem now, i follow the guide to train 512 model first i prepare 6W pics and i run `python scripts/crop_align_vggface2_FFHQalign.py --input_dir $DATAPATH$/VGGface2/train --output_dir_ffhqalign $ALIGN_OUTDIR$ --mode ffhq --crop_size 256` and `python scripts/inference_gfpgan_forvggface2.py --input_path $ALIGN_OUTDIR$ --batchSize 8 --save_dir $HQ_OUTDIR$` to make my 512*512 dataset then i run `python train.py --name simswap512_test --batchSize 16 --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep True` to train my model i use `python test_video_swapsingle.py --crop_size 512 --use_mask --name simswap512 --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path ./demo_file/Iron_man.jpg --video_path ./demo_file/multi_people_1080p.mp4 --output_path ./output/multi_test_swapsingle.mp4 --temp_path ./temp_results ` to test but finallly error comes `error appears []Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0']` I don't know where I went wrong I really look forward to your help
doctorcui commented 2022-04-29 05:36:51 +02:00 (Migrated from github.com)

Finally I found the problem
I have been following simswap continuously, which led me to try training for the first time
I'm using the April 20th version train.py
# Last Modified: Wednesday, 20th April 2022 6:33:30 pm
but trian.py updated
# Last Modified: Friday, 22nd April 2022 10:49:26 am
remove line 182,183,184
if opt.train_simswap: src_image1 = F.interpolate(src_image1,size=(256,256), mode='bicubic') src_image2 = F.interpolate(src_image2,size=(256,256), mode='bicubic')

this might be my problem
I hope you pay attention to the training version

Finally I found the problem I have been following simswap continuously, which led me to try training for the first time I'm using the April 20th version train.py `# Last Modified: Wednesday, 20th April 2022 6:33:30 pm` but trian.py updated `# Last Modified: Friday, 22nd April 2022 10:49:26 am` remove line 182,183,184 `if opt.train_simswap: src_image1 = F.interpolate(src_image1,size=(256,256), mode='bicubic') src_image2 = F.interpolate(src_image2,size=(256,256), mode='bicubic')` this might be my problem I hope you pay attention to the training version
Fibonacci134 commented 2022-04-29 16:38:41 +02:00 (Migrated from github.com)

Hey, Im glad you found the issue! Good luck, will definitely be paying attention to see how your guy's model turns out. Remember to not undertrain but also, dont over train 🙂

Hey, Im glad you found the issue! Good luck, will definitely be paying attention to see how your guy's model turns out. Remember to not undertrain but also, dont over train 🙂
netrunner-exe commented 2022-05-03 16:09:40 +02:00 (Migrated from github.com)

ok, thank you i have a problem now, i follow the guide to train 512 model first i prepare 6W pics and i run python scripts/crop_align_vggface2_FFHQalign.py --input_dir $DATAPATH$/VGGface2/train --output_dir_ffhqalign $ALIGN_OUTDIR$ --mode ffhq --crop_size 256 and python scripts/inference_gfpgan_forvggface2.py --input_path $ALIGN_OUTDIR$ --batchSize 8 --save_dir $HQ_OUTDIR$

to make my 512*512 dataset

then i run python train.py --name simswap512_test --batchSize 16 --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep True to train my model

i use python test_video_swapsingle.py --crop_size 512 --use_mask --name simswap512 --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path ./demo_file/Iron_man.jpg --video_path ./demo_file/multi_people_1080p.mp4 --output_path ./output/multi_test_swapsingle.mp4 --temp_path ./temp_results to test but finallly error comes error appears []Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0'] I don't know where I went wrong I really look forward to your help

If I'm not mistaken, the dataset published in the VGGFace2-HQ repository is already aligned, croped and processed with GFPGAN to 512

> ok, thank you i have a problem now, i follow the guide to train 512 model first i prepare 6W pics and i run `python scripts/crop_align_vggface2_FFHQalign.py --input_dir $DATAPATH$/VGGface2/train --output_dir_ffhqalign $ALIGN_OUTDIR$ --mode ffhq --crop_size 256` and `python scripts/inference_gfpgan_forvggface2.py --input_path $ALIGN_OUTDIR$ --batchSize 8 --save_dir $HQ_OUTDIR$` > > to make my 512*512 dataset > > then i run `python train.py --name simswap512_test --batchSize 16 --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep True` to train my model > > i use `python test_video_swapsingle.py --crop_size 512 --use_mask --name simswap512 --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path ./demo_file/Iron_man.jpg --video_path ./demo_file/multi_people_1080p.mp4 --output_path ./output/multi_test_swapsingle.mp4 --temp_path ./temp_results ` to test but finallly error comes `error appears []Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0']` I don't know where I went wrong I really look forward to your help If I'm not mistaken, the [dataset](https://drive.google.com/drive/folders/1ZHy7jrd6cGb2lUa4qYugXe41G_Ef9Ibw) published in the [VGGFace2-HQ](https://github.com/NNNNAI/VGGFace2-HQ) repository is already aligned, croped and processed with GFPGAN to 512
Sign in to join this conversation.