【Bringing Old Photos Back to Life】How to train?如何训练
发布日期:2021-07-01 02:26:51
浏览次数:2
分类:技术文章
本文共 2982 字,大约阅读时间需要 9 分钟。
目录
1) Create Training File(创建训练文件)
Put the folders of VOC dataset(clean images是原始的干净图像(VOC)), collected old photos (e.g., Real_L_old and Real_RGB_old(real_l_old是只有灰度(亮度)的照片集,real_rgb_old是彩色照片集)) into one shared folder. Then
cd Global/data/python Create_Bigfile.py
Note: Remember to modify the code based on your own environment.
2) Train the VAEs of domain A and domain B respectively(分别训练域A和域B的VAE)
cd ..python train_domain_A.py --use_v2_degradation --continue_train --training_dataset domain_A --name domainA_SR_old_photos --label_nc 0 --loadSize 256 --fineSize 256 --dataroot [your_data_folder] --no_instance --resize_or_crop crop_only --batchSize 100 --no_html --gpu_ids 0,1,2,3 --self_gen --nThreads 4 --n_downsample_global 3 --k_size 4 --use_v2 --mc 64 --start_r 1 --kl 1 --no_cgan --outputs_dir [your_output_folder] --checkpoints_dir [your_ckpt_folder]python train_domain_B.py --continue_train --training_dataset domain_B --name domainB_old_photos --label_nc 0 --loadSize 256 --fineSize 256 --dataroot [your_data_folder] --no_instance --resize_or_crop crop_only --batchSize 120 --no_html --gpu_ids 0,1,2,3 --self_gen --nThreads 4 --n_downsample_global 3 --k_size 4 --use_v2 --mc 64 --start_r 1 --kl 1 --no_cgan --outputs_dir [your_output_folder] --checkpoints_dir [your_ckpt_folder]
Note: For the --name option, please ensure your experiment name contains "domainA" or "domainB", which will be used to select different dataset.
3) Train the mapping network between domains(训练域之间的映射网络)
Train the mapping without scratches:
python train_mapping.py --use_v2_degradation --training_dataset mapping --use_vae_which_epoch 200 --continue_train --name mapping_quality --label_nc 0 --loadSize 256 --fineSize 256 --dataroot [your_data_folder] --no_instance --resize_or_crop crop_only --batchSize 80 --no_html --gpu_ids 0,1,2,3 --nThreads 8 --load_pretrainA [ckpt_of_domainA_SR_old_photos] --load_pretrainB [ckpt_of_domainB_old_photos] --l2_feat 60 --n_downsample_global 3 --mc 64 --k_size 4 --start_r 1 --mapping_n_block 6 --map_mc 512 --use_l1_feat --niter 150 --niter_decay 100 --outputs_dir [your_output_folder] --checkpoints_dir [your_ckpt_folder]
Traing the mapping with scraches:
python train_mapping.py --no_TTUR --NL_res --random_hole --use_SN --correlation_renormalize --training_dataset mapping --NL_use_mask --NL_fusion_method combine --non_local Setting_42 --use_v2_degradation --use_vae_which_epoch 200 --continue_train --name mapping_scratch --label_nc 0 --loadSize 256 --fineSize 256 --dataroot [your_data_folder] --no_instance --resize_or_crop crop_only --batchSize 36 --no_html --gpu_ids 0,1,2,3 --nThreads 8 --load_pretrainA [ckpt_of_domainA_SR_old_photos] --load_pretrainB [ckpt_of_domainB_old_photos] --l2_feat 60 --n_downsample_global 3 --mc 64 --k_size 4 --start_r 1 --mapping_n_block 6 --map_mc 512 --use_l1_feat --niter 150 --niter_decay 100 --outputs_dir [your_output_folder] --checkpoints_dir [your_ckpt_folder] --irregular_mask [absolute_path_of_mask_file]
转载地址:https://mapengsen.blog.csdn.net/article/details/118026562 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
感谢大佬
[***.8.128.20]2024年04月26日 17时54分20秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
Http状态码301和302概念简单区别及企业应用案例
2019-05-02
从浏览器打开网址到请求到网页内容超细原理过程详解(免费)
2019-05-02
企业Shell实战-MySQL分库分表备份脚本
2019-05-02
Bash shell command 速查手册
2019-05-02
linux网络编程常用头文件总结
2019-05-02
把一个内容为16进制 的文本文件,转换成10进制的文本文件
2019-05-02
fopen与fread函数分析
2019-05-02
推荐两篇Linux下的Socket文章
2019-05-02
Linux下代码内存泄露检查工具valgrind
2019-05-02
性能测试、指标和优化 -- 性能相关总结
2019-05-02
基于Web开发模式的信息抽取
2019-05-02
linux 下的不同函数的编程效率分享总结
2019-05-02
wait3,wait4 用法
2019-05-02
服务器TIME_WAIT和CLOSE_WAIT详解和解决办法
2019-05-02
使用gprof来对程序的性能分析总结
2021-07-05
回溯算法:字符串排序——C语言(回溯法)
2021-07-05