awei669 / VQ-Font

[ICCV 2023] Few shot font generation via transferring similarity guided global and quantization local styles
https://arxiv.org/abs/2309.00827
127 stars 6 forks source link

评估问题 #19

Open bbjsfa opened 3 months ago

bbjsfa commented 3 months ago

训练后的图片是一张许多图片拼接而成的大图,请问我如何才能获得单一图片,来计算进行模型评估指标的

awei669 commented 3 months ago

指定以下参数路径:模型参数weight、内容字体content_font、参考字符img_path、结果存储位置saving_root

随后运行 inference.sh

python3 inference.py ./cfgs/custom.yaml \
--weight \path\to\saved_model.pdparams \
--content_font \path\to\content_imgs \
--img_path \path\to\test_imgs \
--saving_root ./infer_res
bbjsfa commented 3 months ago

1 您好我想问这里这个train_img_paths应该下面文件组织格式中哪个文件夹的路径? Font Directory |--| content |  --| kaiti4train_VAE |    --| train_3000.png |    --| ... |  --| kaiti4val_VAE |    --| val_500.png |    --| ... |  --| kaiti4train_FFG |    --| trian_val_3500.png |    --| ... |--| train |  --| train_font1 |  --| train_font2 |    --| trian_val_3500.png |    --| ... |  --| ... |--| val |  --| val_font1 |  --| val_font2 |    --| trian_val_3500.png |    --| ... |  --| ...

bbjsfa commented 3 months ago

您好想请问一下正常情况下,l1loss大概会在多少轮的时候趋于收敛

haoyi @.***

 

------------------ 原始邮件 ------------------ 发件人: "awei669/VQ-Font" @.>; 发送时间: 2024年5月11日(星期六) 下午5:04 @.>; @.**@.>; 主题: Re: [awei669/VQ-Font] 评估问题 (Issue #19)

指定以下参数路径:模型参数weight、内容字体content_font、参考字符img_path、结果存储位置saving_root

随后运行 inference.sh

或 python3 inference.py ./cfgs/custom.yaml \ --weight \path\to\saved_model.pdparams \ --content_font \path\to\content_imgs \ --img_path \path\to\test_imgs \ --saving_root ./infer_res
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bbjsfa commented 3 months ago

还行再请问一下custom.yaml中的vae_iter是什么参数,vqvae的训练轮次不是在预训练模型里就确定了吗? 还有defaults中的comb——iter指的是什么,我看它初始设置是80000

haoyi @.***

 

------------------ 原始邮件 ------------------ 发件人: "awei669/VQ-Font" @.>; 发送时间: 2024年5月11日(星期六) 下午5:04 @.>; @.**@.>; 主题: Re: [awei669/VQ-Font] 评估问题 (Issue #19)

指定以下参数路径:模型参数weight、内容字体content_font、参考字符img_path、结果存储位置saving_root

随后运行 inference.sh

或 python3 inference.py ./cfgs/custom.yaml \ --weight \path\to\saved_model.pdparams \ --content_font \path\to\content_imgs \ --img_path \path\to\test_imgs \ --saving_root ./infer_res
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

awei669 commented 3 months ago

1 您好我想问这里这个train_img_paths应该下面文件组织格式中哪个文件夹的路径? Font Directory |--| content |  --| kaiti4train_VAE |    --| train_3000.png |    --| ... |  --| kaiti4val_VAE |    --| val_500.png |    --| ... |  --| kaiti4train_FFG |    --| trian_val_3500.png |    --| ... |--| train |  --| train_font1 |  --| train_font2 |    --| trian_val_3500.png |    --| ... |  --| ... |--| val |  --| val_font1 |  --| val_font2 |    --| trian_val_3500.png |    --| ... |  --| ...

VQ-VAE训练:your_path/content/kaiti4train_VAE,测试:your_path/content/kaiti4val_VAE;

第二阶段制作lmdb数据库时:your_path/content/kaiti4train_FFG。

awei669 commented 3 months ago

还行再请问一下custom.yaml中的vae_iter是什么参数,vqvae的训练轮次不是在预训练模型里就确定了吗? 还有defaults中的comb——iter指的是什么,我看它初始设置是80000 haoyi @.   ------------------ 原始邮件 ------------------ 发件人: "awei669/VQ-Font" @.>; 发送时间: 2024年5月11日(星期六) 下午5:04 @.>; @*.**@*.>; 主题: Re: [awei669/VQ-Font] 评估问题 (Issue #19) 指定以下参数路径:模型参数weight、内容字体content_font、参考字符img_path、结果存储位置saving_root 随后运行 inference.sh 或 python3 inference.py ./cfgs/custom.yaml \ --weight \path\to\saved_model.pdparams \ --content_font \path\to\content_imgs \ --img_path \path\to\test_imgs \ --saving_root ./infer_res — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

这几个参数你可以删掉,/cfgs/custom.yaml里的内容会覆盖defaults.yaml,所以这个参数你可以忽略它。

感谢你指出这个问题,稍后我会更新一下此文件。