Author SHA1 Message Date
luni b5b2f1616e add docker-compose 2023-05-23 10:35:54 +00:00
luni e108460c48 save 2023-03-15 21:15:39 +00:00
luni 5857aceecd save 2023-03-14 11:13:22 +00:00
luni d5bade988f save 2023-03-12 23:29:47 +00:00
luni 4b1cb0b06d save 2023-03-10 17:25:44 +00:00
luni cb76d36c4f save 2023-03-07 22:02:55 +00:00
luni cbecf668df save 2023-03-07 12:54:53 +00:00
luni e192f6f9e3 save 2023-03-07 08:59:20 +00:00
luni 0b518e7f0e save 2023-03-06 09:55:48 +00:00
luni dfdf8d408e save 2023-03-04 20:32:16 +00:00
luni 76cb457a54 save 2023-03-04 18:35:35 +00:00
luni b95ccc3ca1 save 2023-03-04 17:19:30 +00:00
luni 54e7d33065 save 2023-03-04 16:57:22 +00:00
95 changed files with 11165 additions and 447 deletions
+94 -8
View File
@@ -23,9 +23,11 @@ nohup python cvae.py --name="lhunor_abl_all" > nohup/iccv/ablation/abl_all_3.out
nohup python cvae.py --name="lhunor_abl_all_gnn" > nohup/iccv/ablation/abl_all_gnn.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_gnn_2" > nohup/iccv/ablation/abl_all_gnn.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_cape_f" > nohup/iccv/ablation/abl_all_cape_f.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_cape_f" > nohup/iccv/ablation/abl_all_cape_f_2.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_skirt" > nohup/iccv/ablation/abl_all_skirt.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_skirt_var" > nohup/iccv/ablation/abl_all_skirt_var.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_skirt_var" > nohup/iccv/ablation/abl_all_skirt_var_2.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_curv" > nohup/iccv/ablation/abl_curv.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_curv_skirt" > nohup/iccv/ablation/abl_curv_skirt.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_skin" > nohup/iccv/ablation/abl_skin.out 2>&1 &
@@ -39,7 +41,10 @@ nohup python cvae.py --name="lhunor_abl_skin_reg" > nohup/iccv/ablation/abl_skin
nohup python cvae.py --name="lhunor_abl_skin_reg_skirt" > nohup/iccv/ablation/abl_skin_reg_skirt.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_skin_var" > nohup/iccv/ablation/abl_skin_var.out 2>&1 &
nohup python cvae_curv.py --name="lhunor_cvae_curv" > nohup/iccv/ablation/cvae_curv.out 2>&1 &
nohup python evaluate_ae.py --name abl_all > nohup/iccv/evaluate/abl_all.out 2>&1 &
nohup python evaluate_ae.py --name abl_all_skirt > nohup/iccv/evaluate/abl_all_skirt.out 2>&1 &
nohup python cvae_curv.py --name="lhunor_cvae_curv" > nohup/iccv/ablation/cvae_curv_3.out 2>&1 &
nohup python upscale_test.py --name="iccv_32_2" > nohup/iccv/upscale/iccv_32_2.out 2>&1 &
nohup python upscale_test.py --name="iccv_64_2" > nohup/iccv/upscale/iccv_64_2.out 2>&1 &
@@ -70,14 +75,35 @@ nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_curv" > nohup/iccv/pyr/i
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_curv_skirt" > nohup/iccv/pyr/iccv_pyr_32_curv_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_reg" > nohup/iccv/pyr/iccv_pyr_32_reg.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_reg_skirt" > nohup/iccv/pyr/iccv_pyr_32_reg_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_10p" > nohup/iccv/pyr/iccv_pyr_32_10p.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_25p" > nohup/iccv/pyr/iccv_pyr_32_25p.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_jumpsuit" > nohup/iccv/pyr/iccv_pyr_32_jumpsuit.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_trousers" > nohup/iccv/pyr/iccv_pyr_32_trousers.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_top" > nohup/iccv/pyr/iccv_pyr_32_top.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_tshirt" > nohup/iccv/pyr/iccv_pyr_32_tshirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_skirt_skirt" > nohup/iccv/pyr/iccv_pyr_32_skirt_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_skirt_dress" > nohup/iccv/pyr/iccv_pyr_32_skirt_dress.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_skirt_batch" > nohup/iccv/pyr/iccv_pyr_32_skirt_batch.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_seq" > nohup/iccv/pyr/iccv_pyr_32_seq_2.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64" > nohup/iccv/pyr/iccv_pyr_32_64.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_skin" > nohup/iccv/pyr/iccv_pyr_32_64_skin.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_skin" > nohup/iccv/pyr/iccv_pyr_32_64_skin.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_skin_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_skin_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_curv" > nohup/iccv/pyr/iccv_pyr_32_64_curv.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_curv_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_curv_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_reg" > nohup/iccv/pyr/iccv_pyr_32_64_reg.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_reg_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_reg_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_10p" > nohup/iccv/pyr/iccv_pyr_32_64_10p.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_25p" > nohup/iccv/pyr/iccv_pyr_32_64_25p.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_tshirt" > nohup/iccv/pyr/iccv_pyr_32_64_tshirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_trousers" > nohup/iccv/pyr/iccv_pyr_32_64_trousers.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_top" > nohup/iccv/pyr/iccv_pyr_32_64_top.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_skirt_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_skirt_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_skirt_dress" > nohup/iccv/pyr/iccv_pyr_32_64_skirt_dress.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_jumpsuit" > nohup/iccv/pyr/iccv_pyr_32_64_jumpsuit.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_seq" > nohup/iccv/pyr/iccv_pyr_32_64_seq.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_seq_2" > nohup/iccv/pyr/iccv_pyr_32_64_seq_2.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_cape_f" > nohup/iccv/pyr/iccv_pyr_64_cape_f.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_cape_m" > nohup/iccv/pyr/iccv_pyr_64_cape_m.out 2>&1 &
@@ -85,16 +111,45 @@ nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_cape_m_00032_SL" > nohup
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_cape_f_03223_SL" > nohup/iccv/pyr/iccv_pyr_64_cape_f_03223_SL.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_cape_f_03223_SS" > nohup/iccv/pyr/iccv_pyr_64_cape_f_03223_SS.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_128_cape_f" > nohup/iccv/pyr/iccv_pyr_64_128_cape_f.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_128_cape_m" > nohup/iccv/pyr/iccv_pyr_64_128_cape_m.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_128_256_cape_f" > nohup/iccv/pyr/iccv_pyr_64_128_256_cape_f.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_pre_cape_f" > nohup/iccv/pyr/iccv_pyr_64_pre_cape_f.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128" > nohup/iccv/pyr/iccv_pyr_32_64_128.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_skin" > nohup/iccv/pyr/iccv_pyr_32_64_128_skin.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_reg" > nohup/iccv/pyr/iccv_pyr_32_64_128_reg.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_skin" > nohup/iccv/pyr/iccv_pyr_32_64_128_skin_2.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_skin_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_skin_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_reg" > nohup/iccv/pyr/iccv_pyr_32_64_128_reg_2.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_curv" > nohup/iccv/pyr/iccv_pyr_32_64_128_curv.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_curv_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_curv_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_var" > nohup/iccv/pyr/iccv_pyr_32_64_128_var.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_tshirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_tshirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_trousers" > nohup/iccv/pyr/iccv_pyr_32_64_128_trousers.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_top" > nohup/iccv/pyr/iccv_pyr_32_64_128_top.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_jumpsuit" > nohup/iccv/pyr/iccv_pyr_32_64_128_jumpsuit.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_skirt_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_skirt_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_skirt_dress" > nohup/iccv/pyr/iccv_pyr_32_64_128_skirt_dress.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128" > nohup/iccv/pyr/iccv_pyr_32_64_128.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128" > nohup/iccv/pyr/iccv_pyr_32_64_128.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256" > nohup/iccv/pyr/iccv_pyr_32_64_128_256.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_128_cape_m_00032_SL" > nohup/iccv/pyr/iccv_pyr_64_128_cape_m_00032_SL.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_128_cape_f_03223_SL" > nohup/iccv/pyr/iccv_pyr_64_128_cape_f_03223_SL.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_128_cape_f_03223_SS" > nohup/iccv/pyr/iccv_pyr_64_128_cape_f_03223_SS.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_2.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_skirt_2.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_skin" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_skin.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_curv" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_curv.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_curv_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_curv_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_reg" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_reg.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_512" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_512.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_512_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_512_skirt.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_512_skin" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_512_skin.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_512_curv" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_512_curv.out 2>&1 &
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_32_64_128_256_512_reg" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_512_reg.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32 > nohup/iccv/evaluate/iccv_pyr_32.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_skirt > nohup/iccv/evaluate/iccv_pyr_32_skirt.out 2>&1 &
@@ -104,18 +159,49 @@ nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_reg > nohup/i
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_reg_skirt > nohup/iccv/evaluate/iccv_pyr_32_reg_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_curv > nohup/iccv/evaluate/iccv_pyr_32_curv.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_curv_skirt > nohup/iccv/evaluate/iccv_pyr_32_curv_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_10p > nohup/iccv/evaluate/iccv_pyr_32_10p.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_25p > nohup/iccv/evaluate/iccv_pyr_32_25p.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64 > nohup/iccv/evaluate/iccv_pyr_32_64.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_skin > nohup/iccv/evaluate/iccv_pyr_32_64_skin.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_skin_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_skin_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_reg > nohup/iccv/evaluate/iccv_pyr_32_64_reg.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_curv > nohup/iccv/evaluate/iccv_pyr_32_64_curv.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_curv_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_curv_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_10p > nohup/iccv/evaluate/iccv_pyr_32_64_10p.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_25p > nohup/iccv/evaluate/iccv_pyr_32_64_25p.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128 > nohup/iccv/evaluate/iccv_pyr_32_64_128.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128 > nohcup/iccv/evaluate/iccv_pyr_32_64_128.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_skin > nohup/iccv/evaluate/iccv_pyr_32_64_128_skin.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_skin_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_skin_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_reg > nohup/iccv/evaluate/iccv_pyr_32_64_128_reg.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_curv > nohup/iccv/evaluate/iccv_pyr_32_64_128_curv.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_curv_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_curv_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_trousers > nohup/iccv/evaluate/iccv_pyr_32_64_128_trousers.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_tshirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_tshirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_top > nohup/iccv/evaluate/iccv_pyr_32_64_128_top.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_jumpsuit > nohup/iccv/evaluate/iccv_pyr_32_64_128_jumpsuit.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_skirt_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_skirt_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_skirt_dress> nohup/iccv/evaluate/iccv_pyr_32_64_128_skirt_dress.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128 > nohup/iccv/evaluate/iccv_pyr_32_64_128.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256 > nohup/iccv/evaluate/iccv_pyr_32_64_128_256.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_skin > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_skin.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_curv > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_curv.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_reg > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_reg.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_512 > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_512.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_512_skirt > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_512_skirt.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_512_reg > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_512_reg.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_512_skin > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_512_skin.out 2>&1 &
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_64_128_256_512_curv > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_512_curv.out 2>&1 &
nohup python cvae.py --name="lhunor_cape_f_03223_SL" > nohup/iccv/ablation/abl_all_cape_f_03223_SL.out 2>&1 &
nohup python cvae.py --name="lhunor_cape_f_03223_SS" > nohup/iccv/ablation/abl_all_cape_f_03223_SS.out 2>&1 &
nohup python cvae.py --name="lhunor_cape_m_00032_SL" > nohup/iccv/ablation/abl_all_cape_m_00032_SL.out 2>&1 &
+60 -23
View File
@@ -1,37 +1,37 @@
import os
import sys
from configs.iccv.config_abl_pyr_32_64_skin import config
from configs.iccv.config_abl_pyr_32_64_128_tshirt import config
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
# import tensorflow as tf
import tensorflow as tf
# gpus = tf.config.experimental.list_physical_devices('GPU')
# if gpus:
# try:
# # Currently, memory growth needs to be the same across GPUs
# for gpu in gpus:
# tf.config.experimental.set_memory_growth(gpu, True)
# logical_gpus = tf.config.experimental.list_logical_devices('GPU')
# print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
# except RuntimeError as e:
# # Memory growth must be set before GPUs have been initialized
# print(e)
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
# Currently, memory growth needs to be the same across GPUs
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
# Memory growth must be set before GPUs have been initialized
print(e)
import csv
import glob
import time
import argparse
import wandb
import tqdm
from tqdm import tqdm
import random
import numpy as np
import plotly.graph_objects as go
import plotly.express as ex
# if config['is_skirt']:
# from losses import edge_loss_skirt as edge_loss
# else:
# from losses import edge_loss
from losses import collision_loss, normal_loss
if config['is_skirt']:
from losses import edge_loss_skirt as edge_loss
else:
from losses import edge_loss
@@ -53,9 +53,13 @@ if __name__ == '__main__':
parser.add_argument('--name', type=str)
args = vars(parser.parse_args())
print(config['name'])
# smpl = SMPL(use_one_hot=config['use_one_hot'])
skirt_modifier = '_skirt' if config['is_skirt'] else ''
error_type = 'euclidean' # 'euclidean' 'collision' edge normal
folder = config['test_dir']
checkpoint_name = config['name']
@@ -68,7 +72,7 @@ if __name__ == '__main__':
output_folder = '/home/workspace/local-data/results/iccv/' + checkpoint_name + '-'
# check if there is a folder that starts with this name using glob
folders = glob.glob(output_folder + '*')
assert len(folders) == 1, 'There should be only one checkpoint that starts with this name'
assert len(folders) == 1, f'There should be only one checkpoint that starts with this name, but found {len(folders)}'
output_folder = folders[0]
iteration = output_folder.split('-')[-1]
@@ -78,6 +82,7 @@ if __name__ == '__main__':
# ids = [id.split('.')[0] for id in ids]
# faces = {id : np.load(faces_folder + '/' + id + '.npy') for id in ids }
print('Reading masks...')
masks_folder = '/home/workspace/local-data' + ('' if config['is_skirt'] else '_127') + '/test' + ('_skirt' if config['is_skirt'] else '') + '_ready' + ('_2' if config['is_skirt'] else '') + '/mesh_mask'
ids = os.listdir(masks_folder)
ids = [id.split('.')[0] for id in ids]
@@ -85,6 +90,18 @@ if __name__ == '__main__':
frames = os.listdir(output_folder)
frames = [frame for frame in frames if not frame.endswith('_fixed_coll.npy')]
# frames = frames[:100]
# if 'frames_file_test' in config.keys():
# with open(os.path.join(folder, config['frames_file_test']), 'r') as f:
# lines = f.readlines()
# lines = [line.strip() for line in lines]
# frames = lines
if error_type == 'collision':
print('Reading bodies...')
bodies_folder = '/home/workspace/local-data' + ('' if config['is_skirt'] else '_127') + '/test' + ('_skirt' if config['is_skirt'] else '') + '_ready' + ('_2' if config['is_skirt'] else '') + '/mesh_posed_body_no_orient'
bodies = {frame : np.load(bodies_folder + '/' + frame[:-1] + 'z')['mesh_posed_body_no_orient'] for frame in tqdm(frames) }
if config['remove_global_orientation']:
gt_name = 'mesh_posed_no_orient'
@@ -99,12 +116,32 @@ if __name__ == '__main__':
else:
per_garment_errors = { 'Tshirt': [], 'Jumpsuit': [], 'Trousers': [], 'Top': [] }
for frame in tqdm.tqdm(frames):
for frame in tqdm(frames):
id = frame.split('_')[0]
frame_nr = frame.split('.')[0].split('_')[1]
gt = np.load(os.path.join(orig_folder, id + '_' + frame_nr + '.npz'))[gt_name][masks[id], :].astype(np.float32)
pred = np.load(os.path.join(output_folder, id + '_' + frame_nr + '.npy'))
metric = np.mean(np.sqrt(np.sum((gt - pred) ** 2, axis=-1)))
if error_type == 'edge':
pred_unmasked = np.zeros((1, 14475, 3), dtype=np.float32)
pred_unmasked[0, masks[id], :] = pred
gt_unmasked = np.zeros((1, 14475, 3), dtype=np.float32)
gt_unmasked[0, masks[id], :] = gt
metric = edge_loss(gt_unmasked, pred_unmasked, masks[id][None,:].astype(np.float32)).numpy()[0]
elif error_type == 'euclidean':
metric = np.mean(np.sqrt(np.sum((gt - pred) ** 2, axis=-1)))
elif error_type == 'collision':
pred_unmasked = np.zeros((1, 14475, 3), dtype=np.float32)
pred_unmasked[0, masks[id], :] = pred
metric = collision_loss(pred_unmasked, bodies[frame][None,:,:], masks[id][None,:].astype(np.float32))[0].numpy()[0]
elif error_type == 'normal':
pred_unmasked = np.zeros((1, 14475, 3), dtype=np.float32)
pred_unmasked[0, masks[id], :] = pred
gt_unmasked = np.zeros((1, 14475, 3), dtype=np.float32)
gt_unmasked[0, masks[id], :] = gt
metric = normal_loss(gt_unmasked, pred_unmasked, masks[id][None,:].astype(np.float32)).numpy()
else:
raise ValueError('Error type not supported')
errors[id + '_' + frame_nr] = metric
per_garment_errors[garment_type_table[id]].append(metric)
@@ -112,7 +149,7 @@ if __name__ == '__main__':
for key in per_garment_errors.keys():
print(key + ': ' + str(np.mean(per_garment_errors[key])))
with open('/home/workspace/data/results/errors/iccv/' + checkpoint_name + '-' + iteration + '.csv', mode='w') as f:
with open(f'/home/workspace/data/results/errors/iccv/{checkpoint_name}-{iteration}-{error_type}.csv', mode='w') as f:
file_writer = csv.writer(f, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
for key in sorted(errors.keys()):
+23 -12
View File
@@ -23,7 +23,7 @@ import numpy as np
import trimesh as tm
import plotly.express as ex
import plotly.graph_objects as go
from custom_utils.custom_utils import _maskFaces
from custom_utils.custom_utils import _maskFaces, save_stl
from custom_utils.smpl import SMPL
from plotly.subplots import make_subplots
from scipy.spatial.transform import Rotation as R
@@ -215,8 +215,8 @@ if __name__ == '__main__':
errors_cape_m = get_cape_errors('CAPE/results/CAPE-affineconv_nz18_pose24_clotype8_male/errors.npy', frames_m)
errors_cape_m = dict(reversed(sorted(errors_cape_m.items(), key=lambda item: item[1])))
errors_f = get_errors('temp/error_abl_2_pyr_64_128_256_512_cape_f.txt')
errors_m = get_errors('temp/error_abl_2_pyr_64_128_256_512_cape_m.txt')
errors_f = get_errors('temp/archive/error_abl_2_pyr_64_128_256_512_cape_f.txt')
errors_m = get_errors('temp/archive/error_abl_2_pyr_64_128_256_512_cape_m.txt')
folder_pyr_f = '/home/workspace/data/results/cape/abl_2_pyr_64_128_256_512_cape_f'
folder_pyr_m = '/home/workspace/data/results/cape/abl_2_pyr_64_128_256_512_cape_m'
@@ -238,9 +238,10 @@ if __name__ == '__main__':
_, faces = _maskFaces(np.zeros((3638, 3)), np.load('custom_utils/smpl_faces_orig.npy'), cape_mask)
faces = faces.astype(np.int32)
colors = np.ones((3627, 3), np.int8) * 230
gender = 'male'
gender = 'female'
if gender == 'male':
folder_cape = folder_m
@@ -262,11 +263,18 @@ if __name__ == '__main__':
all_errors_1 = []
all_errors_2 = []
# for key in tqdm.tqdm(errors_cape.keys()):
count = 0
while True:
key = random.choice(list(errors_cape.keys()))
for key in tqdm.tqdm(errors_cape.keys()):
# count = 0
# while True:
if os.path.exists(f'temp/cape_stl/{key}_gt.stl'):
continue
# key = random.choice(list(errors_cape.keys()))
cape = read_obj(os.path.join(folder_cape, '{:0>4d}.obj'.format(frames_to_i[key])))[clothing_verts_idx, :] - J0[np.newaxis, :]
split = key.split('_')
file = '_'.join(split[:-1]) + '.' + split[-1] + '.npy'
pose_shape_path = os.path.join(pose_folder, file)
if not os.path.exists(pose_shape_path):
continue
cape = add_global_orientation(cape, key, pose_folder, inverse=True)
if not os.path.exists(os.path.join(folder, key + '_posed.npy')):
continue
@@ -284,10 +292,13 @@ if __name__ == '__main__':
# print(np.mean(all_errors_1))
# print(np.mean(all_errors_2))
fig = plot_fixed_all(gt, cape, ours, errors_cape[key], errors[key], faces, colors)
fig.write_image('temp/cape/' + key + '.png')
# fig = plot_fixed_all(gt, cape, ours, errors_cape[key], errors[key], faces, colors)
# fig.write_image('temp/cape_2/' + key + '.png')
save_stl(f'temp/cape_stl/{key}_gt.stl', gt, faces)
save_stl(f'temp/cape_stl/{key}_cape.stl', cape, faces)
save_stl(f'temp/cape_stl/{key}_ours.stl', ours, faces)
print(count)
count += 1
# print(count)
# count += 1
print()
+65
View File
@@ -0,0 +1,65 @@
import os
import sys
import numpy as np
import trimesh as tm
from stl import mesh
# os.environ["CUDA_VISIBLE_DEVICES"] = '1'
# import tensorflow as tf
# gpus = tf.config.experimental.list_physical_devices('GPU')
# if gpus:
# try:
# # Currently, memory growth needs to be the same across GPUs
# for gpu in gpus:
# tf.config.experimental.set_memory_growth(gpu, True)
# logical_gpus = tf.config.experimental.list_logical_devices('GPU')
# print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
# except RuntimeError as e:
# # Memory growth must be set before GPUs have been initialized
# print(e)
# from losses import collision_loss, normal_loss
# from losses import edge_loss_skirt as edge_loss
# from losses import edge_loss
if __name__ == '__main__':
frame = '04173_193' # '02276_232', '02978_242', '04173_193'
folder = 'examples/sampling_analysis'
# original_folder = '/home/workspace/data/dataset/local-cache/train_skirt'
original_folder = '/home/workspace/local-data/train'
# folder = 'examples/sampling'
id = frame.split('_')[0]
mask = np.load(os.path.join(original_folder, 'mesh_mask', f'{id}.npy'))
gt = np.load(os.path.join(folder, frame, f'{frame}_gt.npy'))
faces = np.load(os.path.join(folder, frame, f'{frame}_faces.npy'))
edges = tm.Trimesh(vertices=gt, faces=faces, validate=False, process=False).edges
edges_gt = np.linalg.norm(gt[edges[:, 0]] - gt[edges[:, 1]], axis=1)
area_gt = np.sum(np.linalg.norm(np.cross(gt[faces[:, 0]] - gt[faces[:, 1]], gt[faces[:, 0]] - gt[faces[:, 2]]), axis=1))
errors = []
vars = []
area_diffs = []
# for i in [1,2,4,10]:
for i in range(15):
sample = np.load(os.path.join(folder, frame, f'{frame}_{i}.npy'))
edges_sample = np.linalg.norm(sample[edges[:, 0]] - sample[edges[:, 1]], axis=1)
error = np.mean(np.abs(edges_sample - edges_gt))
var = np.var(np.abs(edges_sample - edges_gt))
errors.append(error)
vars.append(var)
area_sample = np.sum(np.linalg.norm(np.cross(sample[faces[:, 0]] - sample[faces[:, 1]], sample[faces[:, 0]] - sample[faces[:, 2]]), axis=1))
area_diff = np.abs(area_sample - area_gt)
area_diffs.append(area_diff)
print(np.array(errors).mean())
print(np.array(vars).mean())
print(np.array(area_diffs).mean())
print(area_gt)
+2 -2
View File
@@ -35,9 +35,9 @@ config['is_skirt'] = False
config['dataset_in_memory'] = False
config['is_cape'] = False
config['train_dir'] = '/home/workspace/local-data/train'
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/data/dataset/test_ready'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['body_model'] = 'checkpoints/iccv/body_iccv_1'
+3 -3
View File
@@ -18,8 +18,8 @@ config['use_norm_loss'] = True
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '6'
config['name'] = 'abl_all_cape_f'
config['gpu'] = '2'
config['name'] = 'abl_all_cape_f_2'
config['notes'] = ''
config['tags'] = ['iccv', 'abl_all']
@@ -50,7 +50,7 @@ if config['is_cape']:
config['latent_dim'] = 128
config['pretrained_model'] = ''
config['pretrained_model'] = 'checkpoints/iccv/abl_all_cape_f'
###############
config['lr'] = 0.0001# 0.0001
@@ -0,0 +1,128 @@
config = dict()
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK AVG GARMENT USED
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_curvature'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = True
config['use_norm_loss'] = True
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '2'
config['name'] = 'abl_all_cape_f_03223_SL'
config['notes'] = ''
config['tags'] = ['iccv', 'abl_all']
config['avg_garment_path'] = 'custom_data/train_cape_f_03223_SL_2_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv
if config['use_skinning']:
assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '')
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['batch_size'] = 4
config['resolution'] = 512
config['is_skirt'] = False
config['dataset_in_memory'] = False
config['is_cape'] = True
config['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['valid_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['test_dir'] = '/home/workspace/local-data/cape_processed/train/female'
config['frames_file'] = 'frames_03223_SL_train_2.txt'
config['frames_file_valid'] = 'frames_03223_SL_test_2.txt'
config['frames_file_test'] = 'frames_03223_SL_test_2.txt'
config['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_f'
config['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_f'
config['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_f'
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['latent_dim'] = 128
config['pretrained_model'] = ''
###############
config['lr'] = 0.0001# 0.0001
###############
config['starting_balancing_coeff'] = 0.0001
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['upscale_enhancer'] = ''
config['freeze_encoders'] = True
config['use_one_hot'] = False
config['bottleneck_scale'] = 2
config['cvae'] = dict()
config['cvae']['is_label'] = False
config['cvae']['latent_dim'] = 64 * config['bottleneck_scale']
config['cvae']['add_noise'] = False
config['cvae']['noise_amount'] = 0.0
config['cvae']['kernel_size'] = 7
config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3]
config['cvae']['encoder_dims'] = [32, 64, 128, 256, config['cvae']['latent_dim']]
config['cvae']['decoder_depths'] = config['cvae']['encoder_depths']
config['cvae']['decoder_dims'] = config['cvae']['encoder_dims']
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,128 @@
config = dict()
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK AVG GARMENT USED
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_curvature'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = True
config['use_norm_loss'] = True
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '4'
config['name'] = 'abl_all_cape_f_03223_SS'
config['notes'] = ''
config['tags'] = ['iccv', 'abl_all']
config['avg_garment_path'] = 'custom_data/train_cape_f_03223_SS_2_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv
if config['use_skinning']:
assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '')
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['batch_size'] = 4
config['resolution'] = 512
config['is_skirt'] = False
config['dataset_in_memory'] = False
config['is_cape'] = True
config['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['valid_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['test_dir'] = '/home/workspace/local-data/cape_processed/train/female'
config['frames_file'] = 'frames_03223_SS_train_2.txt'
config['frames_file_valid'] = 'frames_03223_SS_test_2.txt'
config['frames_file_test'] = 'frames_03223_SS_test_2.txt'
config['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_f'
config['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_f'
config['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_f'
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['latent_dim'] = 128
config['pretrained_model'] = ''
###############
config['lr'] = 0.0001# 0.0001
###############
config['starting_balancing_coeff'] = 0.0001
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['upscale_enhancer'] = ''
config['freeze_encoders'] = True
config['use_one_hot'] = False
config['bottleneck_scale'] = 2
config['cvae'] = dict()
config['cvae']['is_label'] = False
config['cvae']['latent_dim'] = 64 * config['bottleneck_scale']
config['cvae']['add_noise'] = False
config['cvae']['noise_amount'] = 0.0
config['cvae']['kernel_size'] = 7
config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3]
config['cvae']['encoder_dims'] = [32, 64, 128, 256, config['cvae']['latent_dim']]
config['cvae']['decoder_depths'] = config['cvae']['encoder_depths']
config['cvae']['decoder_dims'] = config['cvae']['encoder_dims']
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,128 @@
config = dict()
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK AVG GARMENT USED
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_curvature'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = True
config['use_norm_loss'] = True
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '3'
config['name'] = 'abl_all_cape_m_00032_SL'
config['notes'] = ''
config['tags'] = ['iccv', 'abl_all']
config['avg_garment_path'] = 'custom_data/train_cape_m_00032_SL_2_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv
if config['use_skinning']:
assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '')
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['batch_size'] = 4
config['resolution'] = 512
config['is_skirt'] = False
config['dataset_in_memory'] = False
config['is_cape'] = True
config['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['valid_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['test_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['frames_file'] = 'frames_00032_SL_train_2.txt'
config['frames_file_valid'] = 'frames_00032_SL_test_2.txt'
config['frames_file_test'] = 'frames_00032_SL_test_2.txt'
config['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_m'
config['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_m'
config['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_m'
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['latent_dim'] = 128
config['pretrained_model'] = ''
###############
config['lr'] = 0.0001# 0.0001
###############
config['starting_balancing_coeff'] = 0.0001
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['upscale_enhancer'] = ''
config['freeze_encoders'] = True
config['use_one_hot'] = False
config['bottleneck_scale'] = 2
config['cvae'] = dict()
config['cvae']['is_label'] = False
config['cvae']['latent_dim'] = 64 * config['bottleneck_scale']
config['cvae']['add_noise'] = False
config['cvae']['noise_amount'] = 0.0
config['cvae']['kernel_size'] = 7
config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3]
config['cvae']['encoder_dims'] = [32, 64, 128, 256, config['cvae']['latent_dim']]
config['cvae']['decoder_depths'] = config['cvae']['encoder_depths']
config['cvae']['decoder_dims'] = config['cvae']['encoder_dims']
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+1 -1
View File
@@ -37,7 +37,7 @@ config['is_cape'] = False
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
+125
View File
@@ -0,0 +1,125 @@
config = dict()
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK AVG GARMENT USED
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_curvature'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = True
config['use_norm_loss'] = True
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '3'
config['name'] = 'abl_all_skirt_var_dasda'
config['notes'] = ''
config['tags'] = ['iccv', 'abl_all', 'skirt']
config['avg_garment_path'] = 'custom_data/train_no_shape_skirt_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv
if config['use_skinning']:
assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '')
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['batch_size'] = 4
config['resolution'] = 512
config['is_skirt'] = True
config['dataset_in_memory'] = False
config['is_cape'] = False
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['latent_dim'] = 128
config['pretrained_model'] = 'checkpoints/iccv/abl_all_skirt'
###############
config['lr'] = 0.0001# 0.0001
###############
config['starting_balancing_coeff'] = 0.1
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (14475, 3,),
'mesh_posed': (14475, 3,),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (14475,),
'uv_mask': (512, 256,),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (14475, 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['upscale_enhancer'] = ''
config['freeze_encoders'] = True
config['use_one_hot'] = False
config['bottleneck_scale'] = 2
config['cvae'] = dict()
config['cvae']['is_label'] = False
config['cvae']['latent_dim'] = 64 * config['bottleneck_scale']
config['cvae']['add_noise'] = False
config['cvae']['noise_amount'] = 0.0
config['cvae']['kernel_size'] = 7
config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3]
config['cvae']['encoder_dims'] = [32, 64, 128, 256, config['cvae']['latent_dim']]
config['cvae']['decoder_depths'] = config['cvae']['encoder_depths']
config['cvae']['decoder_dims'] = config['cvae']['encoder_dims']
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+16 -18
View File
@@ -33,6 +33,7 @@ config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
@@ -93,11 +94,10 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
@@ -106,13 +106,12 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
@@ -120,13 +119,12 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [16, 9, 9, 9]
level['encoder_dims'] = [64, 128, 128, 64]
level['decoder_input'] = (4, 2, 128)
level['decoder_depths'] = [16, 9, 9, 9]
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
@@ -139,7 +137,7 @@ for res in config['pyramid']['resolutions']:
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
+189
View File
@@ -0,0 +1,189 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_10p'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['frames_file'] = 'frames_10p.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_10p'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_10p'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_10p'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+189
View File
@@ -0,0 +1,189 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_25p'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['frames_file'] = 'frames_25p.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_25p'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_25p'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_25p'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+189
View File
@@ -0,0 +1,189 @@
config = dict()
config['gpu'] = '0'
config['name'] = 'iccv_pyr_32_64_10p'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_10p'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['frames_file'] = 'frames_10p.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_10p'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_10p'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_10p'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+5 -5
View File
@@ -1,7 +1,7 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_256'
config['gpu'] = '1'
config['name'] = 'iccv_pyr_32_64_128_256_2'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
@@ -22,13 +22,13 @@ config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256'
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_2'
config['pyramid']['pretrained_pyramid_iteration'] = '125000'
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
@@ -0,0 +1,189 @@
config = dict()
config['gpu'] = '0'
config['name'] = 'iccv_pyr_32_64_128_256_512'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_512'
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256, 512]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_2'
config['pyramid']['pretrained_pyramid_iteration'] = '90000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/train'
config['test_dir'] = '/home/workspace/local-data/test_ready'
# config['frames_file'] = 'frames_00761_0.txt'
# config['frames_file_valid'] = 'frames_00761_0.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = True
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_64_128_256_512_curv'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'curv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = False
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256, 512]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_curv'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_64_128_256_512_reg'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'reg']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = False # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = False
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256, 512]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_reg'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,195 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_64_128_256_512_skin'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = False # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256, 512]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_skin'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
if config['use_skinning']:
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
else:
config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_256_512_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256, 512]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_skirt_2'
config['pyramid']['pretrained_pyramid_iteration'] = '90000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_256_curv'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'curv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = False
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_curv'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '1'
config['name'] = 'iccv_pyr_32_64_128_256_curv_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'curv', 'skirt']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = False
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_curv_skirt'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '5'
config['name'] = 'iccv_pyr_32_64_128_256_reg'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'reg']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = False # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = False
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_reg_2'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,195 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_64_128_256_skin'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = False # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_skin_2'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
if config['use_skinning']:
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
else:
config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -1,7 +1,7 @@
config = dict()
config['gpu'] = '0'
config['name'] = 'iccv_pyr_32_64_128_256_skirt'
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_256_skirt_2'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
@@ -22,13 +22,13 @@ config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_skirt'
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_skirt'
config['pyramid']['pretrained_pyramid_iteration'] = '175000'
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
@@ -94,11 +94,10 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
@@ -0,0 +1,189 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_curv'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'curv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = False
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_curv'
config['pyramid']['pretrained_pyramid_iteration'] = '110000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_curv_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'curv', 'skirt']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = False
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_curv_skirt'
config['pyramid']['pretrained_pyramid_iteration'] = '60000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_jumpsuit'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_jumpsuit'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['frames_file'] = 'frames_jumpsuit.txt'
config['frames_file_valid'] = 'frames_jumpsuit.txt'
config['frames_file_test'] = 'frames_jumpsuit.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+7 -7
View File
@@ -1,7 +1,7 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_64_128_reg'
config['gpu'] = '0'
config['name'] = 'iccv_pyr_32_64_128_reg_2'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'reg']
@@ -22,17 +22,17 @@ config['use_offsets'] = False
config['use_norm_loss'] = False
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_reg'
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_reg'
config['pyramid']['pretrained_pyramid_iteration'] = '120000'
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_reg_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'reg']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = False # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = False
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_reg_skirt'
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -1,7 +1,7 @@
config = dict()
config['gpu'] = '5'
config['name'] = 'iccv_pyr_32_64_128_skin'
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_64_128_skin_2'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
@@ -22,17 +22,17 @@ config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_skin'
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_skin'
config['pyramid']['pretrained_pyramid_iteration'] = '130000'
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['pretrained_pyramid_iteration'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '0'
config['name'] = 'iccv_pyr_32_64_128_skin_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = False # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_skin_skirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
if config['use_skinning']:
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
else:
config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '7'
config['name'] = 'iccv_pyr_32_64_128_skirt_dress'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_skirt_dress'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_dress.txt'
config['frames_file_valid'] = 'frames_dress.txt'
config['frames_file_test'] = 'frames_dress.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_skirt_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_skirt_skirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_skirt.txt'
config['frames_file_valid'] = 'frames_skirt.txt'
config['frames_file_test'] = 'frames_skirt.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,197 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_top'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_top'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_top.txt'
config['frames_file_valid'] = 'frames_top.txt'
config['frames_file_test'] = 'frames_top.txt'
config['frames_file_skirt'] = 'frames_top.txt'
config['frames_file_valid_skirt'] = 'frames_top.txt'
config['frames_file_test_skirt'] = 'frames_top.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,197 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_128_top_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_top'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_top.txt'
config['frames_file_valid'] = 'frames_top.txt'
config['frames_file_test'] = 'frames_top.txt'
config['frames_file_skirt'] = 'frames_top.txt'
config['frames_file_valid_skirt'] = 'frames_top.txt'
config['frames_file_test_skirt'] = 'frames_top.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_trousers'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_trousers'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['frames_file'] = 'frames_trousers.txt'
config['frames_file_valid'] = 'frames_trousers.txt'
config['frames_file_test'] = 'frames_trousers.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,196 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_tshirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_tshirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_tshirt.txt'
config['frames_file_valid'] = 'frames_tshirt.txt'
config['frames_file_test'] = 'frames_tshirt.txt'
config['frames_file_skirt'] = 'frames_tshirt.txt'
config['frames_file_valid_skirt'] = 'frames_tshirt.txt'
config['frames_file_test_skirt'] = 'frames_tshirt.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,196 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_tshirt_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_tshirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_tshirt.txt'
config['frames_file_valid'] = 'frames_tshirt.txt'
config['frames_file_test'] = 'frames_tshirt.txt'
config['frames_file_skirt'] = 'frames_tshirt.txt'
config['frames_file_valid_skirt'] = 'frames_tshirt.txt'
config['frames_file_test_skirt'] = 'frames_tshirt.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,188 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_128_var'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_var'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.1
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+189
View File
@@ -0,0 +1,189 @@
config = dict()
config['gpu'] = '1'
config['name'] = 'iccv_pyr_32_64_25p'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_25p'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['frames_file'] = 'frames_25p.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_25p'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_25p'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_25p'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+14 -18
View File
@@ -86,7 +86,6 @@ config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
@@ -94,11 +93,10 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
@@ -107,13 +105,12 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
@@ -121,13 +118,12 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [16, 9, 9, 9]
level['encoder_dims'] = [64, 128, 128, 64]
level['decoder_input'] = (4, 2, 128)
level['decoder_depths'] = [16, 9, 9, 9]
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_jumpsuit'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_jumpsuit'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['frames_file'] = 'frames_jumpsuit.txt'
config['frames_file_valid'] = 'frames_jumpsuit.txt'
config['frames_file_test'] = 'frames_jumpsuit.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+3 -3
View File
@@ -1,6 +1,6 @@
config = dict()
config['gpu'] = '1'
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_reg'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'reg']
@@ -31,8 +31,8 @@ config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_reg/'
config['pyramid']['pretrained_pyramid_iteration'] = '150000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 4
config['is_skirt'] = False
+16 -20
View File
@@ -1,6 +1,6 @@
config = dict()
config['gpu'] = '2'
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_reg_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'reg']
@@ -32,7 +32,7 @@ config['pyramid']['pretrained_pyramid_iteration'] = '190000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
@@ -86,7 +86,6 @@ config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
@@ -94,11 +93,10 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
@@ -107,13 +105,12 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
@@ -121,13 +118,12 @@ for res in config['pyramid']['resolutions']:
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [16, 9, 9, 9]
level['encoder_dims'] = [64, 128, 128, 64]
level['decoder_input'] = (4, 2, 128)
level['decoder_depths'] = [16, 9, 9, 9]
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
+1 -1
View File
@@ -1,6 +1,6 @@
config = dict()
config['gpu'] = '1'
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_skin'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_skin_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = False # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_skin_skirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
if config['use_skinning']:
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
else:
config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_skin_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = False # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_skin_skirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
if config['use_skinning']:
config['signature_dynamic']['uv_unposed'] = (512, 256, 3)
config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,)
else:
config['signature_dynamic']['uv_posed'] = (512, 256, 3)
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
if config['use_skinning']:
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
else:
config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_skirt_dress'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_skirt_dress'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_dress.txt'
config['frames_file_valid'] = 'frames_dress.txt'
config['frames_file_test'] = 'frames_dress.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_skirt_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_skirt_skirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_skirt.txt'
config['frames_file_valid'] = 'frames_skirt.txt'
config['frames_file_test'] = 'frames_skirt.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+197
View File
@@ -0,0 +1,197 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_64_top'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_top'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_top.txt'
config['frames_file_valid'] = 'frames_top.txt'
config['frames_file_test'] = 'frames_top.txt'
config['frames_file_skirt'] = 'frames_top.txt'
config['frames_file_valid_skirt'] = 'frames_top.txt'
config['frames_file_test_skirt'] = 'frames_top.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_trousers'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_trousers'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['frames_file'] = 'frames_trousers.txt'
config['frames_file_valid'] = 'frames_trousers.txt'
config['frames_file_test'] = 'frames_trousers.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+196
View File
@@ -0,0 +1,196 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_64_tshirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32, 64]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_tshirt'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_tshirt.txt'
config['frames_file_valid'] = 'frames_tshirt.txt'
config['frames_file_test'] = 'frames_tshirt.txt'
config['frames_file_skirt'] = 'frames_tshirt.txt'
config['frames_file_valid_skirt'] = 'frames_tshirt.txt'
config['frames_file_test_skirt'] = 'frames_tshirt.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+187
View File
@@ -0,0 +1,187 @@
config = dict()
config['gpu'] = '7'
config['name'] = 'iccv_pyr_32_batch'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['batch_size'] = 64
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+190
View File
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '0'
config['name'] = 'iccv_pyr_32_jumpsuit'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['frames_file'] = 'frames_jumpsuit.txt'
config['frames_file_valid'] = 'frames_jumpsuit.txt'
config['frames_file_test'] = 'frames_jumpsuit.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '7'
config['name'] = 'iccv_pyr_32_skirt_batch'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_skirt.txt'
config['frames_file_valid'] = 'frames_skirt.txt'
config['frames_file_test'] = 'frames_skirt.txt'
config['batch_size'] = 128
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [16, 9, 9, 9]
level['encoder_dims'] = [64, 128, 128, 64]
level['decoder_input'] = (4, 2, 128)
level['decoder_depths'] = [16, 9, 9, 9]
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_skirt_dress'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_dress.txt'
config['frames_file_valid'] = 'frames_dress.txt'
config['frames_file_test'] = 'frames_dress.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_32_skirt_skirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train_skirt'
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
config['test_dir'] = '/home/workspace/local-data/test_skirt_ready_2'
config['frames_file'] = 'frames_skirt.txt'
config['frames_file_valid'] = 'frames_skirt.txt'
config['frames_file_test'] = 'frames_skirt.txt'
config['batch_size'] = 4
config['is_skirt'] = True
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_skirt'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_skirt'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+193
View File
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_test'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_top.txt'
config['frames_file_valid'] = 'frames_top.txt'
config['frames_file_test'] = 'frames_top.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+193
View File
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '2'
config['name'] = 'iccv_pyr_32_top'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_top.txt'
config['frames_file_valid'] = 'frames_top.txt'
config['frames_file_test'] = 'frames_top.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+190
View File
@@ -0,0 +1,190 @@
config = dict()
config['gpu'] = '1'
config['name'] = 'iccv_pyr_32_trousers'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['frames_file'] = 'frames_trousers.txt'
config['frames_file_valid'] = 'frames_trousers.txt'
config['frames_file_test'] = 'frames_trousers.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
+193
View File
@@ -0,0 +1,193 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_32_tshirt'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [32]
config['pyramid']['pretrained_pyramid'] = ''
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
config['train_dir_skirt'] = '/home/workspace/local-data_128/train_skirt'
config['valid_dir_skirt'] = '/home/workspace/local-data/valid_skirt'
config['test_dir_skirt'] = '/home/workspace/local-data_128/test_skirt_ready_2'
config['frames_file'] = 'frames_tshirt.txt'
config['frames_file_valid'] = 'frames_tshirt.txt'
config['frames_file_test'] = 'frames_tshirt.txt'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = False
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 3, 9, 3]
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,188 @@
config = dict()
config['gpu'] = '4'
config['name'] = 'iccv_pyr_64_128_256_cape_f'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'cape_f']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [64, 128, 256]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_64_128_cape_f'
config['pyramid']['pretrained_pyramid_iteration'] = '170000'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female'
config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female'
config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = True
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_f'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_f'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_f'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_cape_f'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_cape_f'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_cape_f'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_cape_f'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,191 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_64_128_cape_f_03223_SL'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'cape_f']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_64_cape_f_03223_SL'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['valid_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['test_dir'] = '/home/workspace/local-data_127/cape_processed/train/female'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = True
config['frames_file'] = 'frames_03223_SL_train_2.txt'
config['frames_file_valid'] = 'frames_03223_SL_test_2.txt'
config['frames_file_test'] = 'frames_03223_SL_test_2.txt'
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_f'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_f'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_f'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_cape_f'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_cape_f'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_cape_f'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,191 @@
config = dict()
config['gpu'] = '1'
config['name'] = 'iccv_pyr_64_128_cape_f_03223_SS'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'cape_f']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_64_cape_f_03223_SS'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female'
config['valid_dir'] = '/home/workspace/local-data/cape_processed/train/female'
config['test_dir'] = '/home/workspace/local-data/cape_processed/train/female'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = True
config['frames_file'] = 'frames_03223_SS_train_2.txt'
config['frames_file_valid'] = 'frames_03223_SS_test_2.txt'
config['frames_file_test'] = 'frames_03223_SS_test_2.txt'
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_f'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_f'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_f'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_cape_f'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_cape_f'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_cape_f'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,188 @@
config = dict()
config['gpu'] = '3'
config['name'] = 'iccv_pyr_64_128_cape_m'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'cape_m']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_64_cape_m'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data/cape_processed/train/male'
config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/male'
config['test_dir'] = '/home/workspace/local-data/cape_processed/test/male'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = True
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_m'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_m'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_m'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_cape_m'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_cape_m'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_cape_m'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -0,0 +1,192 @@
config = dict()
config['gpu'] = '1'
config['name'] = 'iccv_pyr_64_128_cape_m_00032_SL'
config['notes'] = ''
config['tags'] = ['pyr', 'iccv', 'cape_m']
# DON'T FORGET TO RESET SSIM LOSS USAGE
# DON'T FORGET TO CHECK MODEL LOADING
# DON'T FORGET TO CHECK IF STORE IN MEMORY
# DON'T FORGET TO CHECK REG LOSS COEFF
# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512
# DON'T FORGET TO CHECK IF SKIRT
# DON'T FORGET TO CHECK IF CAPE
# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2
# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS
config['use_skinning'] = True # and deshaping
config['remove_global_orientation'] = True
config['use_extra_losses'] = True # edge, collision, 3d mesh
config['use_offsets'] = False
config['use_norm_loss'] = True
config['use_curvature'] = True
config['pretrained_model'] = ''
config['pretrained_model_iteration'] = ''
config['pyramid'] = dict()
config['pyramid']['resolutions'] = [64, 128]
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_64_cape_m_00032_SL'
config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['valid_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['test_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = True
config['frames_file'] = 'frames_00032_SL_train_2.txt'
config['frames_file_valid'] = 'frames_00032_SL_test_2.txt'
config['frames_file_test'] = 'frames_00032_SL_test_2.txt'
config['dataset_in_memory'] = False
config['resolution'] = None
config['smpl_res'] = 14475
if config['is_cape']:
config['smpl_res'] = 3638
config['lr'] = 0.0001
config['starting_balancing_coeff'] = 0.001
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
config['avg_garment_path'] = ''
config['bottleneck_scale'] = 2
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
'uv_body_posed': (512, 256, 3),
'mesh_body_posed': (config['smpl_res'], 3,),
'mesh_posed': (config['smpl_res'], 3,),
'mesh_unposed': (config['smpl_res'], 3,),
'uv_unposed': (512, 256, 3),
'uv_curvature': (512, 256, 7),
}
config['signature_static'] = { 'uv_static': (512, 256, 3),
'mesh_mask': (config['smpl_res'],),
'uv_mask': (512, 256,),
}
config['pyramid']['is_label'] = False
config['pyramid']['add_noise'] = False
config['pyramid']['noise_amount'] = 0.0
config['pyramid']['loss_weights'] = [1,1,1,1,1]
for res in config['pyramid']['resolutions']:
if res != 512:
res_modifier = '_' + str(res)
config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3)
config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7)
config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3)
config['signature_static']['uv_mask' + res_modifier] = (res, res//2)
config['pyramid']['static_model'] = 'checkpoints/iccv/static_iccv_1_cape_m'
config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_cape_m'
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_cape_m'
config['pyramid']['freeze_encoders'] = True
config['pyramid']['levels'] = []
for res in config['pyramid']['resolutions']:
if res == 512:
level = dict()
level['resolution'] = 512
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 7
level['encoder_depths'] = [3, 3, 9, 3]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (16, 8, 80)
level['decoder_depths'] = [3, 3, 9, 3]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = ''
config['pyramid']['levels'].append(level)
elif res == 256:
level = dict()
level['resolution'] = 256
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9, 9]
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
level['decoder_input'] = (8, 4, 128)
level['decoder_depths'] = [9, 9, 9, 9]
level['decoder_dims'] = [256, 128, 64, 16]
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 128:
level = dict()
level['resolution'] = 128
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 5
level['encoder_depths'] = [9, 9, 9]
level['encoder_dims'] = [64, 128, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_cape_m'#'checkpoints/up_3_d128_256_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 64:
level = dict()
level['resolution'] = 64
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [9, 9]
level['encoder_dims'] = [64, level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2_cape_m'#checkpoints/up_3_d64_128_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
elif res == 32:
level = dict()
level['resolution'] = 32
level['latent_dim'] = 64 * config['bottleneck_scale']
level['kernel_size'] = 3
level['encoder_depths'] = [16]
level['encoder_dims'] = [level['latent_dim']]
level['decoder_depths'] = level['encoder_depths']
level['decoder_dims'] = level['encoder_dims']
level['avg_garment_path'] = ''
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_32_2_cape_m'#'checkpoints/up_3_d32_64_2'
level['upscale_enhancer_freeze'] = True
config['pyramid']['levels'].append(level)
else:
raise NotImplementedError
config['cond_ae_static'] = dict()
config['cond_ae_static']['is_label'] = False
config['cond_ae_static']['kernel_size'] = 7
config['cond_ae_static']['bottleneck_size'] = 8 * config['bottleneck_scale']
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 27, 3]
config['cond_ae_static']['encoder_dims'] = [8, 16, 32, 64, config['cond_ae_static']['bottleneck_size']]
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
config['cond_ae_static']['activation'] = 'tanh'
config['cond_ae_curv'] = dict()
config['cond_ae_curv']['is_label'] = True
config['cond_ae_curv']['kernel_size'] = 7
config['cond_ae_curv']['bottleneck_size'] = 40 * config['bottleneck_scale']
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
config['cond_ae_curv']['activation'] = 'tanh'
config['cond_ae_body'] = dict()
config['cond_ae_body']['is_label'] = False
config['cond_ae_body']['kernel_size'] = 7
config['cond_ae_body']['bottleneck_size'] = 16 * config['bottleneck_scale']
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
config['cond_ae_body']['activation'] = 'tanh'
@@ -32,7 +32,7 @@ config['pyramid']['final_upscale_enhancer'] = ''
config['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['valid_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['test_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
config['test_dir'] = '/home/workspace/local-data/cape_processed/train/male'
config['batch_size'] = 4
config['is_skirt'] = False
config['is_cape'] = True
+8 -7
View File
@@ -18,8 +18,8 @@ config['use_norm_loss'] = True
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '5'
config['name'] = 'cvae_curv'
config['gpu'] = '0'
config['name'] = 'cvae_curv_3'
config['notes'] = ''
config['tags'] = ['iccv', 'cvae_curv']
@@ -35,9 +35,9 @@ config['is_skirt'] = False
config['dataset_in_memory'] = False
config['is_cape'] = False
config['train_dir'] = '/home/workspace/local-data_127/train'
config['valid_dir'] = '/home/workspace/local-data_127/valid'
config['test_dir'] = '/home/workspace/data/dataset/test_ready'
config['train_dir'] = '/home/workspace/local-data/train'
config['valid_dir'] = '/home/workspace/local-data/valid'
config['test_dir'] = '/home/workspace/local-data/test_ready'
config['static_model'] = 'checkpoints/iccv/static_iccv_1'
config['body_model'] = 'checkpoints/iccv/body_iccv_1'
@@ -50,12 +50,13 @@ if config['is_cape']:
config['latent_dim'] = 128
config['pretrained_model'] = ''
config['pretrained_model'] = 'checkpoints/iccv/cvae_curv'
config['pretrained_model_iteration'] = ''
###############
config['lr'] = 0.0001# 0.0001
###############
config['starting_balancing_coeff'] = 0.01
config['starting_balancing_coeff'] = 1.0
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
'pose_shape': (72 + 11,),
+381
View File
@@ -0,0 +1,381 @@
import os
import sys
os.environ["CUDA_VISIBLE_DEVICES"] = '4'
import tqdm
import argparse
import random
import string
import time
import numpy as np
import trimesh as tm
import cmapy as cm
import scipy as sp
import scipy.io as sio
import plotly.graph_objects as go
from pyntcloud import PyntCloud
from scipy.sparse import csr_matrix, coo_matrix
from scipy.sparse.csgraph import floyd_warshall, dijkstra
from plotly.subplots import make_subplots
from custom_utils.custom_utils import _maskFaces
from postprocessing import fix_collision
from custom_utils.supersmpl_io import readPC2, readPC2Frame, writePC2, readOBJ
from custom_utils.custom_utils import _maskFaces, save_stl, write_obj
from auto_encoder_curv import dice_dense
def postprocess(mesh, faces, mask=None, body=None, do_smoothing=True):
if body is not None:
mesh_fixed = fix_collision(mesh, body[np.newaxis,:,:], mask[np.newaxis,:])[0].numpy()[mask, :]
else:
mesh_fixed = mesh
if do_smoothing:
m = tm.Trimesh(mesh_fixed, faces, process=False, validate=False)
outliers = np.array([len(v) for v in m.vertex_neighbors]) == 0
outliers = np.nonzero(outliers)[0]
outliers_n_neighbours = get_closest_n_points(mesh_fixed, outliers, 2)
outliers_faces = np.concatenate((outliers[:, np.newaxis], outliers_n_neighbours), axis=-1)
faces_fixed = np.concatenate((faces, outliers_faces), axis=0)
m = tm.Trimesh(mesh_fixed, faces_fixed, process=False, validate=False)
tm.smoothing.filter_humphrey(m, iterations=1, alpha=0.6, beta=0.4)
mesh = m.vertices
else:
mesh = mesh_fixed
return mesh
def export_to_ply(mesh, file):
ply = tm.exchange.ply.export_ply(mesh, encoding='binary', vertex_normal=True, include_attributes=True)
output_file = open(file, "wb+")
output_file.write(ply)
output_file.close()
def get_closest_n_points(verts, idx, n):
dist = sp.spatial.distance.cdist(verts[idx, :], verts)
dist[dist == 0] = 1e9
idx_sort = np.argsort(dist, axis=-1)
closest = idx_sort[:, :n]
return closest
def calculate_dist(folder, neighbourhood):
out = dict()
frames = sorted(os.listdir(os.path.join(folder, 'mesh_posed')))[int(args.start):int(args.end)]
for frame in tqdm.tqdm(frames):
id = frame.split('_')[0]
if id in out.keys():
continue
mask = np.load(os.path.join(folder, 'mesh_mask', f'{id}.npy')).astype(bool)
k_neighbors = np.argsort(dist[mask, :][:, mask], axis=-1)[:, :neighbourhood] #cloud.get_neighbors(k=neighbourhood)
out[id] = k_neighbors
return out
def histedges_equalN(x, nbin):
npt = len(x)
return np.interp(np.linspace(0, npt, nbin + 1),
np.arange(npt),
np.sort(x))
def get_bins(values, nr_of_bins):
flattened = []
for c in values:
flattened.extend(c.flatten())
flattened = np.array(flattened)
bins = histedges_equalN(flattened, nr_of_bins)
return bins
def generate_curvatures(v, faces, mask, neighbourhood=25, nr_of_labels=6):
# id = frame.split('_')[0]
# frame_nr = int(frame.split('_')[1].split('.')[0])
# mask = np.load(os.path.join(folder, 'mesh_mask', f'{id}.npy')).astype(bool)
# _, faces = _maskFaces(np.zeros((14475,3)), F, mask)
# v = np.load(os.path.join(folder, 'mesh_posed', f'{id}_{frame_nr}.npz'))['mesh_posed'][mask,:]
m = tm.Trimesh(v, faces, process=False, validate=False)
outliers = np.array([len(v) for v in m.vertex_neighbors]) == 0
outliers = np.nonzero(outliers)[0]
outliers_n_neighbours = get_closest_n_points(v, outliers, 2)
outliers_faces = np.concatenate((outliers[:, np.newaxis], outliers_n_neighbours), axis=-1)
faces = np.concatenate((faces, outliers_faces), axis=0)
verts = v
m = tm.Trimesh(verts, faces, process=False, validate=False)
export_to_ply(m, temp_file)
cloud = PyntCloud.from_file(temp_file)
k_neighbors = np.argsort(dist[mask, :][:, mask], axis=-1)[:, :neighbourhood] #cloud.get_neighbors(k=neighbourhood)
#k_neighbors = k_neighbors_cache[id] # np.argsort(dist[mask, :][:, mask], axis=-1)[:, :neighbourhood] #cloud.get_neighbors(k=neighbourhood)
ev = cloud.add_scalar_field("eigen_values", k_neighbors=k_neighbors)
cloud.add_scalar_field("curvature", ev=ev)
curvature = np.array(cloud.points["curvature(" + str(neighbourhood+1) + ")"])
# bins = np.load(f'custom_data/train_bins.npy') # get_bins(curvature, nr_of_labels)
bins = get_bins(curvature, nr_of_labels)
labels = np.linspace(0, bins.shape[0] - 2, bins.shape[0] - 1)
frame_labels = np.zeros((curvature.shape[0]), dtype=np.float32)
for j in range(bins.shape[0] - 2):
frame_labels[(curvature >= bins[j]) * (curvature < bins[j+1])] = labels[j]
frame_labels[curvature >= bins[-2]] = labels[-1]
return frame_labels
import tensorflow as tf
def visualize_curvature_labels(folder, results_folder, frame):
id = frame.split('_')[0]
frame_nr = frame.split('_')[1].split('.')[0]
mask = np.load(os.path.join(folder, 'mesh_mask', f'{id}.npy')).astype(bool)
_, faces = _maskFaces(np.zeros((14475,3)), F, mask)
verts = np.load(os.path.join(folder, 'mesh_posed', f'{id}_{frame_nr}.npz'))['mesh_posed'][mask,:]
pred = np.load(os.path.join(results_folder, frame + '.npy'))
pred = postprocess(pred, faces)
curvature_labels_gt = generate_curvatures(verts, faces, mask, 25)
curvature_labels_pred = generate_curvatures(pred, faces, mask, 25)
# dice = dice_dense(curvature_labels_pred[None,:], curvature_labels_gt[None,:])
dice = dice_dense(tf.one_hot(curvature_labels_pred, 7)[None,:], tf.one_hot(curvature_labels_gt, 7)[None,:]).numpy()
colors_binned_all = []
for curvature_labels in [curvature_labels_gt, curvature_labels_pred]:
colors = np.array([cm.color('jet', 1 - i) for i in np.linspace(0, 1, int(curvature_labels.max()+1))])
colors_binned = np.zeros((curvature_labels.shape[0], 3))
for i in range(int(curvature_labels.max())+1):
# print(np.count_nonzero(curvature_labels == i))
colors_binned[curvature_labels == i, :] = colors[i]
colors_binned_all.append(colors_binned)
fig = make_subplots(rows=1, cols=3, start_cell="top-left", specs = [ [{ 'type': 'scene' } for _ in range(3)] ])
fig.add_trace(go.Mesh3d(
# 8 vertices of a cube
x=-pred[:,0],
y=pred[:,2],
z=pred[:,1],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=np.ones((verts.shape[0],3))*np.array([255,200,200])[None,:]
),
row=1, col=2)
fig.add_trace(go.Mesh3d(
# 8 vertices of a cube
x=verts[:,0],
y=verts[:,1],
z=verts[:,2],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=colors_binned_all[0]
),
row=1, col=1)
fig.add_trace(go.Mesh3d(
# 8 vertices of a cube
x=-pred[:,0],
y=pred[:,2],
z=pred[:,1],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=colors_binned_all[1],
text=f'dice: {dice}'
),
row=1, col=3)
fig.update_layout(scene_aspectmode='manual', scene_aspectratio=dict(x=1, y=1, z=1),
scene2_aspectmode='manual', scene2_aspectratio=dict(x=1, y=1, z=1),
scene3_aspectmode='manual', scene3_aspectratio=dict(x=1, y=1, z=1),
# scene4_aspectmode='manual', scene4_aspectratio=dict(x=1, y=1, z=1),
# scene5_aspectmode='manual', scene5_aspectratio=dict(x=1, y=1, z=1),
)
helper = dict(xaxis = dict(range=[-1,1], showbackground=False, showticklabels=False, showaxeslabels=False, showspikes=False, visible=False),
yaxis = dict(range=[-1,1], showbackground=False, showticklabels=False, showaxeslabels=False, showspikes=False, visible=False),
zaxis = dict(range=[-1,1], showbackground=False, showticklabels=False, showaxeslabels=False, showspikes=False, visible=False),)
fig.update_layout(scene = helper,
scene2 = helper,
scene3 = helper,
# scene4 = helper,
# scene5 = helper,
)
# meshes = [go.Mesh3d(
# x=x[:,0],
# y=x[:,1],
# z=x[:,2],
# i = faces[:,0],
# j = faces[:,1],
# k = faces[:,2],
# vertexcolor=colors_binned
# )]
# fig = go.Figure(data=meshes)
# fig.update_layout(scene_aspectmode='manual', scene_aspectratio=dict(x=1, y=1, z=1))
# fig.update_layout(
# scene = dict(
# xaxis = dict(nticks=4, range=[-1,1],),
# yaxis = dict(nticks=4, range=[-1,1],),
# zaxis = dict(nticks=4, range=[-1,1],),)
# )
return fig, dice
import wandb
def init_wandb():
run = wandb.init(project='plots', name='curvatures', dir='/home/workspace/local-data/temp/')
artifact = wandb.Artifact('code', type='code')
artifact.add_file('curvature_analysis.py')
run.log_artifact(artifact)
def visualize_neighbourhoods(folder, frame):
id = frame.split('_')[0]
frame_nr = frame.split('_')[1].split('.')[0]
mask = np.load(os.path.join(folder, 'mesh_mask', f'{id}.npy')).astype(bool)
_, faces = _maskFaces(np.zeros((14475,3)), F, mask)
verts = np.load(os.path.join(folder, 'mesh_posed', f'{id}_{frame_nr}.npz'))['mesh_posed'][mask,:]
curvature_labels_10 = generate_curvatures(verts, faces, mask, 10)
curvature_labels_25 = generate_curvatures(verts, faces, mask, 25)
curvature_labels_100 = generate_curvatures(verts, faces, mask, 100)
colors_binned_all = []
for curvature_labels in [curvature_labels_10, curvature_labels_25, curvature_labels_100]:
colors = np.array([cm.color('jet', 1 - i) for i in np.linspace(0, 1, int(curvature_labels.max()+1))])
colors_binned = np.zeros((curvature_labels.shape[0], 3))
for i in range(int(curvature_labels.max())+1):
# print(np.count_nonzero(curvature_labels == i))
colors_binned[curvature_labels == i, :] = colors[i]
colors_binned_all.append(colors_binned)
fig = make_subplots(rows=1, cols=3, start_cell="top-left", specs = [ [{ 'type': 'scene' } for _ in range(3)] ])
fig.add_trace(go.Mesh3d(
# 8 vertices of a cube
x=-verts[:,0],
y=verts[:,1],
z=verts[:,2],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=colors_binned_all[0]
),
row=1, col=1)
fig.add_trace(go.Mesh3d(
# 8 vertices of a cube
x=verts[:,0],
y=verts[:,1],
z=verts[:,2],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=colors_binned_all[1]
),
row=1, col=2)
fig.add_trace(go.Mesh3d(
# 8 vertices of a cube
x=-verts[:,0],
y=verts[:,1],
z=verts[:,2],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=colors_binned_all[2],
),
row=1, col=3)
fig.update_layout(scene_aspectmode='manual', scene_aspectratio=dict(x=1, y=1, z=1),
scene2_aspectmode='manual', scene2_aspectratio=dict(x=1, y=1, z=1),
scene3_aspectmode='manual', scene3_aspectratio=dict(x=1, y=1, z=1),
# scene4_aspectmode='manual', scene4_aspectratio=dict(x=1, y=1, z=1),
# scene5_aspectmode='manual', scene5_aspectratio=dict(x=1, y=1, z=1),
)
helper = dict(xaxis = dict(range=[-1,1], showbackground=False, showticklabels=False, showaxeslabels=False, showspikes=False, visible=False),
yaxis = dict(range=[-1,1], showbackground=False, showticklabels=False, showaxeslabels=False, showspikes=False, visible=False),
zaxis = dict(range=[-1,1], showbackground=False, showticklabels=False, showaxeslabels=False, showspikes=False, visible=False),)
fig.update_layout(scene = helper,
scene2 = helper,
scene3 = helper,
# scene4 = helper,
# scene5 = helper,
)
write_obj(f'examples/curvature_analysis/{id}_{frame_nr}_10.obj', verts, faces.astype(np.int32), colors_binned_all[0].astype(np.int32))
write_obj(f'examples/curvature_analysis/{id}_{frame_nr}_25.obj', verts, faces.astype(np.int32), colors_binned_all[1].astype(np.int32))
write_obj(f'examples/curvature_analysis/{id}_{frame_nr}_100.obj', verts, faces.astype(np.int32), colors_binned_all[2].astype(np.int32))
write_obj(f'examples/curvature_analysis/{id}_{frame_nr}_mesh.obj', verts, faces.astype(np.int32), np.ones((verts.shape[0], 3), dtype=np.int32) * 200)
save_stl(f'examples/curvature_analysis/{id}_{frame_nr}_mesh.stl', verts, faces.astype(np.int32))
fig.show()
return fig
if __name__ == '__main__':
# init_wandb()
is_skirt = True
skirt_modifier = '_skirt' if is_skirt else ''
F = np.load("custom_utils/smpl_faces" + skirt_modifier + ".npy").astype(np.int32)
# k_neighbours(k=25)
folder = '/home/workspace/local-data_128/test_skirt_ready_2'
results_folder = '/home/workspace/data/results/iccv/iccv_pyr_32_64_128_256_512-120000'
# frames_file = 'frames_temp.txt'
# with open(os.path.join(folder, frames_file), 'r') as f:
# lines = f.readlines()
# lines = [line.strip() for line in lines]
# frames = lines
frames = os.listdir(os.path.join(folder, 'pose_shape'))
frames = [frame.split('.')[0] for frame in frames]
temp_file = '/home/workspace/local-data/temp/' + ''.join(random.choice(string.ascii_lowercase) for i in range(10)) + '.ply'
if not is_skirt:
dist = np.load('custom_data/dijkstra.npy')
else:
dist = np.load('custom_data/dijkstra_skirt.npy')
i = 0
while True:
frame = np.random.choice(frames)
print(frame)
# frame = '03265_193'
# frame = '03102_49'
# fig, dice = visualize_curvature_labels(folder, results_folder, frame)
# wandb.log({f'{frame}-dice:{dice}': fig}, step=i)
visualize_neighbourhoods(folder, frame)
i += 1
+11 -1
View File
@@ -442,4 +442,14 @@ def save_stl(file, mesh, faces):
for j in range(3):
obj.vectors[i][j] = mesh[f[j],:]
obj.save(file)
obj.save(file)
def write_obj(file, vertices, faces, colors):
with open(file, 'w') as file:
for v, c in zip(vertices, colors):
line = 'v ' + ' '.join([str(_) for _ in v]) + ' ' + ' '.join([str(_) for _ in c]) + '\n'
file.write(line)
for f in faces:
line = 'f ' + ' '.join([str(_) for _ in f]) + '\n'
file.write(line)
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -2
View File
@@ -1,7 +1,8 @@
import os
import sys
from configs.iccv.config_abl_all_cape_f import config
from configs.iccv.config_abl_all_skirt_var import config
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
import tensorflow as tf
@@ -479,7 +480,7 @@ def test():
if __name__ == '__main__':
init_wandb()
# init_wandb()
parser = argparse.ArgumentParser(description='')
parser.add_argument('--name', type=str)
args = vars(parser.parse_args())
+48 -82
View File
@@ -153,11 +153,11 @@ def dice_dense(prediction, ground_truth, weight_map=None):
return tf.reduce_mean(dice_score)
# @tf.function
@tf.function
def train_step(batch):
with tf.GradientTape() as tape:
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=True)
ce_uv_loss = scce(tf.math.argmax(batch['uv_curvature'], axis=-1), pred)
dice = dice_dense(pred, batch['uv_curvature'])
@@ -189,7 +189,7 @@ def train_step(batch):
@tf.function
def valid_step(batch):
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=False)
ce_uv_loss = scce(tf.math.argmax(batch['uv_curvature'], axis=-1), pred)
loss = ce_uv_loss
@@ -216,7 +216,7 @@ def valid_step(batch):
def plot_everything(batch: dict, type: str):
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=False)
pred = np.argmax(pred.numpy(), axis=-1)
mesh_pred = uv2mesh(pred)
@@ -251,90 +251,54 @@ def plot_everything(batch: dict, type: str):
def sample(folder):
load_model(model,folder)
def sample():
iteration = load_model(model, f'checkpoints/iccv/cvae_curv_3', return_iteration=True)
for batch in dataset_train:
batch = static_dataset_train.expand_batch(batch_to_dict(batch, signature_dynamic))
uv_curvature = tf.one_hot(batch['uv_curvature'], 7)
nr_of_samples = 16
batch = static_dataset_train.expand_batch(batch_to_dict(batch, config['signature_dynamic']))
nr_of_samples = 4
# pred = model.sample(batch['uv_static'], batch['uv_body_posed'], batch['uv_mask'])
pred = model.sample_single(batch['uv_static'][0], batch['uv_body_posed'][0], batch['uv_mask'][0], nr_of_samples=nr_of_samples)
ce_uv_loss = scce(tf.tile(batch['uv_curvature'][0][tf.newaxis,:,:], [nr_of_samples,1,1]), pred)
mesh_pred = uv2mesh(pred).numpy().argmax(axis=-1)
mesh_orig = batch['mesh_curvature'][0].numpy()
F = np.load("custom_utils/smpl_faces.npy")
mask = batch['mesh_mask'].numpy().astype(bool)[0]
_, faces = _maskFaces(np.ones((14475, 3)), F, mask)
mesh_pred = [mesh_pred[i, mask] for i in range(mesh_pred.shape[0])]
curv_color = [np.zeros((mesh_pred[i].shape[0], 3)) for i in range(len(mesh_pred))]
mesh_orig = mesh_orig[mask] + 1
colors = np.array([cm.color('jet', 1 - i) for i in np.linspace(0, 1, 6+1)])
curv_color_gt = np.zeros((mesh_pred[0].shape[0], 3))
for i in range(6+1):
for j in range(len(mesh_pred)):
curv_color[j][mesh_pred[j] == i, :] = colors[i]
curv_color_gt[mesh_orig == i, :] = colors[i]
mesh_base = batch['mesh_posed'][0].numpy()[mask, :]
meshes = []
meshes.append(go.Mesh3d(
# 8 vertices of a cube
x=mesh_base[:,0],
y=mesh_base[:,1],
z=mesh_base[:,2],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=curv_color_gt,
text='gt'
))
for i in range(nr_of_samples):
x = mesh_base.copy()
x[:, 1] += 1 * (i + 1)
meshes.append(go.Mesh3d(
# 8 vertices of a cube
x=x[:,0],
y=x[:,1],
z=x[:,2],
# i, j and k give the vertices of triangles
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
vertexcolor=curv_color[i]
))
fig = go.Figure(data=meshes)
fig.update_layout(scene_aspectmode='manual', scene_aspectratio=dict(x=1, y=nr_of_samples-1, z=1))
fig.update_layout(
scene = dict(
xaxis = dict(nticks=4, range=[-1,1],),
yaxis = dict(nticks=4, range=[-1,nr_of_samples + 1],),
zaxis = dict(nticks=4, range=[-1,1],),)
)
# fig.show()
pred = pred.numpy().argmax(-1)
frames = [Image.fromarray(pred[i]/6*255) for i in range(pred.shape[0])]
frames[0].save("temp/curv2.gif", format="GIF", append_images=frames[1:],
save_all=True, duration=500, loop=0)
for i in range(4):
# pred = model.sample(batch['uv_static'], batch['uv_body_posed'], batch['uv_mask'])
# pred = model.sample_single(batch['uv_static'][0], batch['uv_body_posed'][0], batch['uv_mask'][0], nr_of_samples=nr_of_samples)
pred = model.sample(tf.tile(batch['uv_static'][i][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_body_posed'][i][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_mask'][i][None,:,:], [nr_of_samples,1,1]))
# pred,_,_ = model([tf.tile(batch['uv_static'][0][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_body_posed'][0][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_mask'][0][None,:,:], [nr_of_samples,1,1])], training=False)
# pred = model.call_sample([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
orig_img = np.argmax(batch['uv_curvature'][i].numpy(), axis=-1)
pred_img = np.argmax(pred.numpy(), axis=-1)
img = np.concatenate((orig_img, np.concatenate(pred_img, axis=1)), axis=1)
colors = np.array([cm.color('jet', 1 - i) for i in np.linspace(0, 1, 6+1)])
color_img = np.zeros((img.shape[0], img.shape[1], 3), np.uint8)
for i in range(7):
color_img[img == i, :] = colors[i]
ex.imshow(color_img).show()
print()
print()
def sample_2(batch):
nr_of_samples = 4
# pred = model.sample(batch['uv_static'], batch['uv_body_posed'], batch['uv_mask'])
# pred = model.sample_single(batch['uv_static'][0], batch['uv_body_posed'][0], batch['uv_mask'][0], nr_of_samples=nr_of_samples)
# pred = model.sample(tf.tile(batch['uv_static'][0][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_body_posed'][0][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_mask'][0][None,:,:], [nr_of_samples,1,1]))
pred,_,_ = model([tf.tile(batch['uv_static'][0][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_body_posed'][0][None,:,:,:], [nr_of_samples,1,1,1]),tf.tile(batch['uv_curvature'][0][None,:,:,:], [nr_of_samples,1,1,1]), tf.tile(batch['uv_mask'][0][None,:,:], [nr_of_samples,1,1])], training=False)
# pred = model.call_sample([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
orig_img = np.argmax(batch['uv_curvature'][0].numpy(), axis=-1)
pred_img = np.argmax(pred.numpy(), axis=-1)
img = np.concatenate((orig_img, np.concatenate(pred_img, axis=1)), axis=1)
colors = np.array([cm.color('jet', 1 - i) for i in np.linspace(0, 1, 6+1)])
color_img = np.zeros((img.shape[0], img.shape[1], 3), np.uint8)
for i in range(7):
color_img[img == i, :] = colors[i]
ex.imshow(color_img).show()
print()
if __name__ == '__main__':
init_wandb()
# init_wandb()
parser = argparse.ArgumentParser(description='')
parser.add_argument('--name', type=str)
args = vars(parser.parse_args())
@@ -372,6 +336,8 @@ if __name__ == '__main__':
model = CVAE(config)
sample()
# lr_schedule = tf.keras.optimizers.schedules.ExponentialDecay(0.0001, decay_steps=30000, decay_rate=0.1, staircase=False)
optimizer = tf.optimizers.Adam(learning_rate=config['lr']) #0.0001
g_balancing_coeff = config['starting_balancing_coeff']
+85 -42
View File
@@ -1,7 +1,8 @@
import os
import sys
from configs.iccv.config_abl_pyr_64_pre_cape_f import config
from configs.iccv.config_abl_pyr_32_64_128_skirt_dress import config
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
import tensorflow as tf
@@ -38,12 +39,13 @@ else:
from losses import uv_mask_loss, bend_loss, kl_loss, collision_ratio, normal_loss
# from losses import collision_penalty as collision_penalty
from losses import collision_loss as collision_penalty
from custom_utils.custom_utils import batch_to_dict, load_model
from custom_utils.custom_utils import batch_to_dict, load_model, save_stl
from dataset import DatasetFactory, StaticDataset
from custom_utils.smpl import SMPL
from models.pyramid_model_optimized import PyramidNew as Pyramid
from postprocessing import fix_collision
from custom_utils.custom_utils import Accumulator
from sample_pro_2 import postprocess
def init_wandb():
@@ -417,6 +419,7 @@ def test_step(batch):
def plot_everything(batch: dict, type: str):
nr_to_plot = 4
if config['use_skinning']:
mesh_orig, uv_orig = batch['mesh_unposed'].numpy(), batch['uv_unposed'].numpy()
else:
@@ -426,8 +429,8 @@ def plot_everything(batch: dict, type: str):
output_levels = model(levels_input, training=False)
mesh_pred_levels = [uv2mesh(output_levels[i][0]).numpy() for i in range(len(output_levels))]
mesh_orig_posed = batch['mesh_posed'].numpy()
body = batch['mesh_body_posed'].numpy()
mesh_orig_posed = batch['mesh_posed'].numpy()[:nr_to_plot]
body = batch['mesh_body_posed'].numpy()[:nr_to_plot]
orig_img = (uv_orig + 1) / 2
uv_static_img = (batch['uv_static'].numpy() + 1) / 2
@@ -436,10 +439,10 @@ def plot_everything(batch: dict, type: str):
pred_img = np.concatenate([tf.image.resize(output_levels[i][0], (512, 256), tf.image.ResizeMethod.LANCZOS5) for i in range(len(output_levels))], axis=2)
pred_img = (pred_img - pred_img.min(axis=(1,2,3))[:,np.newaxis,np.newaxis,np.newaxis]) / (pred_img.max(axis=(1,2,3))[:,np.newaxis,np.newaxis,np.newaxis] - pred_img.min(axis=(1,2,3))[:,np.newaxis,np.newaxis,np.newaxis])
img = tf.concat((uv_static_img, uv_body_posed_img, uv_curvature, orig_img, pred_img), axis=2)
imgs = [wandb.Image(img[i]) for i in range(4)]
imgs = [wandb.Image(img[i]) for i in range(nr_to_plot)]
F = np.load("custom_utils/smpl_faces" + skirt_modifier + ("_orig" if config['is_cape'] else "") + ".npy")
mask = batch['mesh_mask'].numpy().astype(bool)
mask = batch['mesh_mask'].numpy().astype(bool)[:nr_to_plot]
_, faces = maskFacesBatch(np.ones_like(mesh_orig), F, mask)
if config['use_skinning']:
@@ -448,30 +451,30 @@ def plot_everything(batch: dict, type: str):
shape_offsets = tf.stack([tf.gather(tf.tensordot(shape[i,:10][tf.newaxis, :], smpl.shapedirs[gender[i]], axes=[[1], [2]])[0,:,:], smpl.to_keep, axis=0) for i in range(shape.shape[0])]).numpy()
gt = [mesh_orig[i][mask[i], :] + shape_offsets[i, mask[i], :] for i in range(mask.shape[0])]
gt = [mesh_orig[i][mask[i], :] + shape_offsets[i, mask[i], :] for i in range(nr_to_plot)]
mesh_unposed_shaped_levels = [[] for _ in range(mask.shape[0])]
mesh_unposed_shaped_levels = [[] for _ in range(nr_to_plot)]
for i in range(len(output_levels)):
mesh_unposed_shaped = [mesh_pred_levels[i][j, mask[j], :] + shape_offsets[j, mask[j]] for j in range(mask.shape[0])]
for k in range(mask.shape[0]):
mesh_unposed_shaped = [mesh_pred_levels[i][j, mask[j], :] + shape_offsets[j, mask[j]] for j in range(nr_to_plot)]
for k in range(nr_to_plot):
mesh_unposed_shaped_levels[k].append(mesh_unposed_shaped[k])
# full res version
mesh_unposed_shaped_full = np.zeros((mask.shape[0], config['smpl_res'], 3), dtype=np.float32)
for i in range(mask.shape[0]):
mesh_unposed_shaped_full = np.zeros((nr_to_plot, config['smpl_res'], 3), dtype=np.float32)
for i in range(nr_to_plot):
mesh_unposed_shaped_full[i, mask[i], :] = mesh_unposed_shaped[i]
mesh_posed = smpl.run_garment(batch['pose_shape'][:, :72], batch['pose_shape'][:, 72:], mesh_unposed_shaped_full).numpy()
mesh_posed = smpl.run_garment(batch['pose_shape'][:nr_to_plot, :72], batch['pose_shape'][:nr_to_plot, 72:], mesh_unposed_shaped_full).numpy()
else:
mesh_posed = mesh_pred_levels[-1]
gt = [mesh_orig[i][mask[i], :] for i in range(mesh_posed.shape[0])]
mesh_unposed_shaped_levels = [[mesh_pred_levels[i][j, mask[j], :] for i in range(len(output_levels))] for j in range(mask.shape[0])]
gt = [mesh_orig[i][mask[i], :] for i in range(nr_to_plot)]
mesh_unposed_shaped_levels = [[mesh_pred_levels[i][j, mask[j], :] for i in range(len(output_levels))] for j in range(nr_to_plot)]
gt_posed = [mesh_orig_posed[i, mask[i], :] for i in range(mask.shape[0])]
gt_posed = [mesh_orig_posed[i, mask[i], :] for i in range(nr_to_plot)]
mesh_posed_fixed = fix_collision(mesh_posed, body, mask).numpy()
mesh_posed = [mesh_posed[j, mask[j], :] for j in range(mask.shape[0])]
mesh_posed = [mesh_posed[j, mask[j], :] for j in range(nr_to_plot)]
if config['is_cape']:
collision = mesh_posed
@@ -487,11 +490,11 @@ def plot_everything(batch: dict, type: str):
if config['is_cape']:
figs_coll = dict()
else:
garment_posed_fixed = [mesh_posed_fixed[i, mask[i], :] for i in range(body.shape[0])]
garment_posed_fixed = [mesh_posed_fixed[i, mask[i], :] for i in range(nr_to_plot)]
collision_fixed = [np.concatenate((body[i], garment_posed_fixed[i]), axis=0) for i in range(len(mesh_posed))]
gt_posed = [batch['mesh_posed'].numpy()[i, mask[i], :] for i in range(mask.shape[0])]
gt_posed = [batch['mesh_posed'].numpy()[i, mask[i], :] for i in range(nr_to_plot)]
collision_gt = [np.concatenate((body[i], gt_posed[i]), axis=0) for i in range(len(gt_posed))]
figs_coll = { type + "/garment_" + str(i) + '_collision': plot_3d_collision(collision_gt[i], collision[i], collision_fixed[i], collision_faces[i], collision_color[i]) for i in range(4) }
figs_coll = { type + "/garment_" + str(i) + '_collision': plot_3d_collision(collision_gt[i], collision[i], collision_fixed[i], collision_faces[i], collision_color[i]) for i in range(nr_to_plot) }
return { **figs, **figs_coll, **{ type + '/images': imgs, } }
@@ -680,9 +683,10 @@ def test():
def generate_results():
load_model(model, 'checkpoints/' + config['name'])
load_model(model, 'checkpoints/iccv/' + config['name'])
F = np.load("custom_utils/smpl_faces" + skirt_modifier + ".npy").astype(np.int32)
dataset_test = factory.get_dataset(folder=config['test_dir'],
dataset_test = factory.get_dataset(folder=config['train_dir'],
batch_size=config['batch_size'],
# batch_size=1,
signature=config['signature_dynamic'],
@@ -691,15 +695,16 @@ def generate_results():
is_cape=config['is_cape'],
frames_file=config['frames_file'] if 'frames_file' in config.keys() else None,
do_repeat=False,
shuffle=False)
static_dataset_test = StaticDataset(folder=config['test_dir'],
shuffle=True)
static_dataset_test = StaticDataset(folder=config['train_dir'],
signature=config['signature_static'],
resolutions=dataset_resolutions,
in_memory=True,
is_cape=config['is_cape'])
folder = os.path.join('/home/workspace/data/results/cape', config['name'])
folder = os.path.join('examples/qualitative', config['name'])
os.makedirs(folder, exist_ok=True)
for batch in tqdm.tqdm(dataset_test):
batch = static_dataset_test.expand_batch(batch_to_dict(batch, config['signature_dynamic']))
@@ -716,21 +721,44 @@ def generate_results():
mesh_pred = uv2mesh(pred)
mesh_pred_shaped = mesh_pred + shape_offsets * batch['mesh_mask'][:,:,tf.newaxis]
mesh_pred_posed = smpl.run_garment(batch['pose_shape'][:, :72], batch['pose_shape'][:, 72:], mesh_pred_shaped)
mesh_gt = batch['mesh_posed'].numpy()
body = batch['mesh_body_posed'].numpy()
for i in range(batch['id'].shape[0]):
mask = batch['mesh_mask'][i].numpy().astype(bool)
id, frame_nr = batch['id'][i].numpy().decode("utf-8"), batch['frame_nr'][i].numpy().decode("utf-8")
unposed = mesh_pred[i].numpy()[mask, :]
posed = mesh_pred_posed[i].numpy()[mask, :]
np.save(os.path.join(folder, id + '_' + frame_nr + '_posed.npy'), posed)
np.save(os.path.join(folder, id + '_' + frame_nr + '_unposed.npy'), unposed)
_, faces_garment = _maskFaces(np.zeros((14475, 3), np.float32), F, mask)
faces_garment = faces_garment.astype(np.int32)
posed_unmasked = np.zeros((1, 14475, 3), np.float32)
posed_unmasked[0, mask, :] = posed
posed = postprocess(posed_unmasked, body[i], faces_garment, mask, do_smoothing=True)
unposed_unmasked = np.zeros((1, 14475, 3), np.float32)
unposed_unmasked[0, mask, :] = unposed
unposed = postprocess(unposed_unmasked, body[i], faces_garment, mask, do_smoothing=True)
save_stl(os.path.join(folder, id + '_' + frame_nr + '_posed.stl'), posed, faces_garment)
save_stl(os.path.join(folder, id + '_' + frame_nr + '_unposed.stl'), unposed, faces_garment)
save_stl(os.path.join(folder, id + '_' + frame_nr + '_gt.stl'), mesh_gt[i][mask, :], faces_garment)
print(id + '_' + frame_nr)
# np.save(os.path.join(folder, id + '_' + frame_nr + '_posed.npy'), posed)
# np.save(os.path.join(folder, id + '_' + frame_nr + '_unposed.npy'), unposed)
pass
@tf.function
def speed_step(levels_input, conds):
def speed_step(levels_input, conds, pose_shape, mask):
shape = pose_shape[:, 72:]
gender = tf.cast(tf.greater_equal(shape[:, 10] , 0.5), tf.int32)
shape_offsets = tf.stack([tf.gather(tf.tensordot(shape[i,:10][tf.newaxis, :], smpl.shapedirs[gender[i]], axes=[[1], [2]])[0,:,:], smpl.to_keep, axis=0) for i in range(shape.shape[0])])
return model.sample([levels_input, conds], training=False)
# pred = model.sample([levels_input, conds])
out_levels = model([levels_input, conds], training=False)
pred = out_levels[-1][0]
mesh_pred = uv2mesh(pred)
mesh_pred_shaped = mesh_pred + shape_offsets * mask[:,:,tf.newaxis]
mesh_pred_posed = smpl.run_garment(pose_shape[:, :72], pose_shape[:, 72:], mesh_pred_shaped)
return mesh_pred_posed
@@ -760,8 +788,12 @@ if __name__ == '__main__':
resolutions=dataset_resolutions,
in_memory=config['dataset_in_memory'],
is_cape=config['is_cape'],
frames_file=config['frames_file'] if 'frames_file' in config.keys() else None)
frames_file=config['frames_file'] if 'frames_file' in config.keys() else None,
frames_file_skirt=config['frames_file_skirt'] if 'frames_file_skirt' in config.keys() else '',
folder_skirt=config['train_dir_skirt'] if 'train_dir_skirt' in config.keys() else '',
)
static_dataset_train = StaticDataset(folder=config['train_dir'],
folder_skirt=config['train_dir_skirt'] if 'train_dir_skirt' in config.keys() else '',
signature=config['signature_static'],
resolutions=dataset_resolutions,
in_memory=True,
@@ -772,8 +804,12 @@ if __name__ == '__main__':
resolutions=dataset_resolutions,
in_memory=config['dataset_in_memory'],
is_cape=config['is_cape'],
frames_file=config['frames_file_valid'] if 'frames_file_valid' in config.keys() else None)
frames_file=config['frames_file_valid'] if 'frames_file_valid' in config.keys() else None,
frames_file_skirt=config['frames_file_valid_skirt'] if 'frames_file_valid_skirt' in config.keys() else '',
folder_skirt=config['valid_dir_skirt'] if 'valid_dir_skirt' in config.keys() else '',
)
static_dataset_valid = StaticDataset(folder=config['valid_dir'],
folder_skirt=config['valid_dir_skirt'] if 'valid_dir_skirt' in config.keys() else '',
signature=config['signature_static'],
resolutions=dataset_resolutions,
in_memory=True,
@@ -793,6 +829,8 @@ if __name__ == '__main__':
# generate_results()
ckpt = tf.train.Checkpoint(model=model)
manager = tf.train.CheckpointManager(ckpt, 'checkpoints/iccv/' + config['name'], max_to_keep=20)
train_accumulator = Accumulator()
@@ -803,25 +841,30 @@ if __name__ == '__main__':
if config['pretrained_model'] != '':
# assert len(config['pyramid']['resolutions']) == 1
load_model(model, config['pretrained_model'], iteration=config['pretrained_model_iteration'])
if len(config['pyramid']['resolutions']) == 1:
model.static_enc.trainable = False
model.body_enc.trainable = False
if config['use_curvature']:
model.curv_enc.trainable = False
else:
load_model(model, config['pyramid']['pretrained_pyramid'], iteration=(config['pyramid']['pretrained_pyramid_iteration'] if 'pretrained_pyramid_iteration' in config.keys() else ''))
model.static_enc.trainable = False
model.body_enc.trainable = False
if config['use_curvature']:
model.curv_enc.trainable = False
if len(config['pyramid']['resolutions']) == 1:
model.static_enc.trainable = False
model.body_enc.trainable = False
if config['use_curvature']:
model.curv_enc.trainable = False
else:
load_model(model, config['pyramid']['pretrained_pyramid'], iteration=(config['pyramid']['pretrained_pyramid_iteration'] if 'pretrained_pyramid_iteration' in config.keys() else ''))
model.static_enc.trainable = False
model.body_enc.trainable = False
if config['use_curvature']:
model.curv_enc.trainable = False
# load_model(model.levels[0], 'checkpoints/iccv/iccv_pyr_64_cape_f')
# load_model(model.levels[0].upscale_enhancer, config['pyramid']['levels'][0]['upscale_enhancer'])
# model.levels[0].upscale_enhancer.trainable = False
for i in range(len(model.levels)):
for i in range(len(model.levels)-1):
load_model(model.levels[i].upscale_enhancer, config['pyramid']['levels'][i]['upscale_enhancer'])
model.levels[i].upscale_enhancer.trainable = False
# if config['pyramid']['resolutions'][-1] != 512:
@@ -841,10 +884,10 @@ if __name__ == '__main__':
for batch in dataset_train:
batch = static_dataset_train.expand_batch(batch_to_dict(batch, config['signature_dynamic']))
# levels_input, conds = group_inputs_for_levels(batch, config)
levels_input, conds = group_inputs_for_levels(batch, config)
# start = time.perf_counter()
# out = speed_step(levels_input, conds)
# out = speed_step(levels_input, conds, batch['pose_shape'] ,batch['mesh_mask'])
# t = time.perf_counter() - start
# print(t)
# times.append(t)
@@ -889,4 +932,4 @@ if __name__ == '__main__':
step += 1
# print('mean:')
# print(np.mean(times[1:]))
# print(np.mean(times[10:]))
+39 -22
View File
@@ -54,10 +54,11 @@ from custom_utils.custom_utils import nest_conditions, batch_to_dict
class StaticDataset():
def __init__(self, folder, signature, use_filled=False, resolutions=[512], in_memory=True, is_cape=False) -> None:
def __init__(self, folder, signature, folder_skirt='', use_filled=False, resolutions=[512], in_memory=True, is_cape=False) -> None:
self.store = dict()
self.signature = signature
self.folder = folder
self.folder_skirt = folder_skirt
self.in_memory = in_memory
assert set(resolutions).issubset(set([32, 64, 128, 256, 512]))
self.possible_keys = ['uv_static', 'uv_static_32', 'uv_static_64', 'uv_static_128', 'uv_static_256',
@@ -85,6 +86,9 @@ class StaticDataset():
def read(self, id):
data = dict()
temp_folder = self.folder
if not os.path.exists(os.path.join(temp_folder, 'uv_mask', id + '.npz')):
temp_folder = self.folder_skirt
for res in self.resolutions:
res_string = ''
@@ -92,23 +96,23 @@ class StaticDataset():
res_string = '_' + str(res)
if 'uv_static' + res_string in self.signature.keys():
uv_static = np.load(os.path.join(self.folder, 'uv_static' + self.filled + res_string, id + '.npz')); uv_static = uv_static['uv_static' + self.filled]; data['uv_static' + res_string] = uv_static
uv_static = np.load(os.path.join(temp_folder, 'uv_static' + self.filled + res_string, id + '.npz')); uv_static = uv_static['uv_static' + self.filled]; data['uv_static' + res_string] = uv_static
if 'uv_mask' + res_string in self.signature.keys():
if self.is_cape:
data['uv_mask' + res_string] = self.uv_masks[res]
else:
uv_mask = np.load(os.path.join(self.folder, 'uv_mask' + res_string, id + '.npz')); uv_mask=uv_mask['uv_mask']; uv_mask = uv_mask.astype(np.float32); data['uv_mask' + res_string] = uv_mask
uv_mask = np.load(os.path.join(temp_folder, 'uv_mask' + res_string, id + '.npz')); uv_mask=uv_mask['uv_mask']; uv_mask = uv_mask.astype(np.float32); data['uv_mask' + res_string] = uv_mask
if 'mesh_static' in self.signature.keys():
mesh_static = np.load(os.path.join(self.folder, 'mesh_static', id + '.npz')); mesh_static = mesh_static['mesh_static']; data['mesh_static'] = mesh_static.astype(np.float32)
mesh_static = np.load(os.path.join(temp_folder, 'mesh_static', id + '.npz')); mesh_static = mesh_static['mesh_static']; data['mesh_static'] = mesh_static.astype(np.float32)
if 'mesh_mask' in self.signature.keys():
if self.is_cape:
data['mesh_mask'] = np.ones((3638), np.float32)
else:
mesh_mask = np.load(os.path.join(self.folder, 'mesh_mask', id + '.npy')); mesh_mask = mesh_mask.astype(np.float32); data['mesh_mask'] = mesh_mask
mesh_mask = np.load(os.path.join(temp_folder, 'mesh_mask', id + '.npy')); mesh_mask = mesh_mask.astype(np.float32); data['mesh_mask'] = mesh_mask
if 'uv_shaped_body' in self.signature.keys():
uv_shaped_body = np.load(os.path.join(self.folder, 'uv_shaped_body', id + '.npz')); uv_shaped_body = uv_shaped_body['uv_shaped_body']; data['uv_shaped_body'] = uv_shaped_body
uv_shaped_body = np.load(os.path.join(temp_folder, 'uv_shaped_body', id + '.npz')); uv_shaped_body = uv_shaped_body['uv_shaped_body']; data['uv_shaped_body'] = uv_shaped_body
return data
@@ -135,7 +139,7 @@ class StaticDataset():
class DatasetIdx(tf.data.Dataset):
def __new__(cls, folder, shuffle=True, is_cape=False, testing=False, frames_file=None):
def __new__(cls, folder, shuffle=True, is_cape=False, testing=False, frames_file=None, folder_skirt=None, frames_file_skirt=''):
if frames_file is None:
uv_static_folder = os.path.join(folder, 'pose_shape')
frames = sorted(os.listdir(uv_static_folder))
@@ -156,6 +160,12 @@ class DatasetIdx(tf.data.Dataset):
lines = [line.strip() for line in lines]
frames = lines
if frames_file_skirt != '':
with open(os.path.join(folder_skirt, frames_file_skirt), 'r') as f:
lines = f.readlines()
lines = [line.strip() for line in lines]
frames.extend(lines)
if shuffle:
random.shuffle(frames)
@@ -194,10 +204,12 @@ class DatasetFactory():
use_one_hot=False,
use_no_orient=True,
testing=False,
frames_file=None):
frames_file=None,
frames_file_skirt='',
folder_skirt='',):
assert set(resolutions).issubset(set([32, 64, 128, 256, 512]))
dataset_idx = DatasetIdx(folder, shuffle, is_cape=is_cape, testing=testing, frames_file=frames_file)
dataset_idx = DatasetIdx(folder, shuffle, is_cape=is_cape, testing=testing, folder_skirt=folder_skirt, frames_file=frames_file, frames_file_skirt=frames_file_skirt)
separator = '_'
if is_cape:
@@ -222,6 +234,11 @@ class DatasetFactory():
id, frame_nr = frame_split[0].numpy().decode("utf-8"), frame_split[1].numpy().decode("utf-8")
# id, frame_nr = frame_split[0].numpy(), frame_split[1].numpy()
# static_info = static_data[id]
temp_folder = folder
if not os.path.exists(os.path.join(temp_folder, 'pose_shape', id + separator + frame_nr + '.npy')):
temp_folder = folder_skirt
item = dict()
if 'id' in signature.keys():
@@ -229,23 +246,23 @@ class DatasetFactory():
if 'frame_nr' in signature.keys():
item['frame_nr'] = frame_nr
if 'pose_shape' in signature.keys():
pose_shape = np.load(os.path.join(folder, 'pose_shape', id + separator + frame_nr + '.npy'))
pose_shape = np.load(os.path.join(temp_folder, 'pose_shape', id + separator + frame_nr + '.npy'))
if use_no_orient:
pose_shape[:3] = 0
item['pose_shape'] = pose_shape
if 'mesh_body_posed' in signature.keys():
if use_no_orient:
mesh_posed_body_no_orient = np.load(os.path.join(folder, 'mesh_posed_body_no_orient', id + separator + frame_nr + '.npz')); mesh_posed_body_no_orient = mesh_posed_body_no_orient['mesh_posed_body_no_orient']
mesh_posed_body_no_orient = np.load(os.path.join(temp_folder, 'mesh_posed_body_no_orient', id + separator + frame_nr + '.npz')); mesh_posed_body_no_orient = mesh_posed_body_no_orient['mesh_posed_body_no_orient']
item['mesh_body_posed'] = mesh_posed_body_no_orient
else:
mesh_body_posed = np.load(os.path.join(folder, 'mesh_body_posed', id + '_' + frame_nr + '.npy'))
mesh_body_posed = np.load(os.path.join(temp_folder, 'mesh_body_posed', id + '_' + frame_nr + '.npy'))
item['mesh_body_posed'] = mesh_body_posed
if 'mesh_posed' in signature.keys():
if use_no_orient:
mesh_posed = np.load(os.path.join(folder, 'mesh_posed_no_orient', id + separator + frame_nr + '.npz')); mesh_posed = mesh_posed['mesh_posed_no_orient'].astype(np.float32)
mesh_posed = np.load(os.path.join(temp_folder, 'mesh_posed_no_orient', id + separator + frame_nr + '.npz')); mesh_posed = mesh_posed['mesh_posed_no_orient'].astype(np.float32)
item['mesh_posed'] = mesh_posed
else:
mesh_posed = np.load(os.path.join(folder, 'mesh_posed', id + separator + frame_nr + '.npz')); mesh_posed = mesh_posed['mesh_posed'].astype(np.float32)
mesh_posed = np.load(os.path.join(temp_folder, 'mesh_posed', id + separator + frame_nr + '.npz')); mesh_posed = mesh_posed['mesh_posed'].astype(np.float32)
item['mesh_posed'] = mesh_posed
# if 'mesh_unposed' in signature.keys():
# mesh_unposed = np.load(os.path.join(folder, 'mesh_unposed', id + '_' + frame_nr + '.npz')); mesh_unposed = mesh_unposed['mesh_unposed']
@@ -255,12 +272,12 @@ class DatasetFactory():
# item['uv_unposed'] = uv_unposed
if 'mesh_unposed' in signature.keys():
# print('one_hot')
mesh_unposed_no_shape = np.load(os.path.join(folder, 'mesh_unposed_no_shape' + one_hot, id + separator + frame_nr + '.npz')); mesh_unposed_no_shape = mesh_unposed_no_shape['mesh_unposed_no_shape']
mesh_unposed_no_shape = np.load(os.path.join(temp_folder, 'mesh_unposed_no_shape' + one_hot, id + separator + frame_nr + '.npz')); mesh_unposed_no_shape = mesh_unposed_no_shape['mesh_unposed_no_shape']
item['mesh_unposed'] = mesh_unposed_no_shape
if 'mesh_curvature' in signature.keys():
mesh_curvature = np.load(os.path.join(folder, 'mesh_curvature', id + separator + frame_nr + '.npz')); mesh_curvature = mesh_curvature['mesh_curvature']
mesh_curvature = np.load(os.path.join(temp_folder, 'mesh_curvature', id + separator + frame_nr + '.npz')); mesh_curvature = mesh_curvature['mesh_curvature']
item['mesh_curvature'] = mesh_curvature.astype(np.int32)
@@ -270,7 +287,7 @@ class DatasetFactory():
res_string = '_' + str(res)
if 'uv_curvature' + res_string in signature.keys():
uv_curvature = np.load(os.path.join(folder, 'uv_curvature' + res_string, id + separator + frame_nr + '.npz'));
uv_curvature = np.load(os.path.join(temp_folder, 'uv_curvature' + res_string, id + separator + frame_nr + '.npz'));
if res_string != '':
uv_curvature = uv_curvature['uv_curvature']
else:
@@ -279,24 +296,24 @@ class DatasetFactory():
item['uv_curvature' + res_string] = uv_curvature
if 'uv_unposed' + res_string in signature.keys():
uv_unposed_no_shape = np.load(os.path.join(folder, 'uv_unposed_no_shape' + one_hot_2 + res_string, id + separator + frame_nr + '.npz')); uv_unposed_no_shape = uv_unposed_no_shape['uv_unposed_no_shape']
uv_unposed_no_shape = np.load(os.path.join(temp_folder, 'uv_unposed_no_shape' + one_hot_2 + res_string, id + separator + frame_nr + '.npz')); uv_unposed_no_shape = uv_unposed_no_shape['uv_unposed_no_shape']
item['uv_unposed' + res_string] = uv_unposed_no_shape
if 'uv_body_posed' + res_string in signature.keys():
if use_no_orient:
uv_posed_body_no_orient = np.load(os.path.join(folder, uv_posed_body_no_orient_folder_name + res_string, id + separator + frame_nr + '.npz'))
uv_posed_body_no_orient = np.load(os.path.join(temp_folder, uv_posed_body_no_orient_folder_name + res_string, id + separator + frame_nr + '.npz'))
uv_posed_body_no_orient = uv_posed_body_no_orient['uv_posed_body_no_orient']
item['uv_body_posed' + res_string] = uv_posed_body_no_orient
else:
uv_body_posed = np.load(os.path.join(folder, 'uv_body_posed', id + '_' + frame_nr + '.npz')); uv_body_posed = uv_body_posed['uv_body']
uv_body_posed = np.load(os.path.join(temp_folder, 'uv_body_posed', id + '_' + frame_nr + '.npz')); uv_body_posed = uv_body_posed['uv_body']
item['uv_body_posed' + res_string] = uv_body_posed
if 'uv_posed' + res_string in signature.keys():
if use_no_orient:
uv_posed = np.load(os.path.join(folder, 'uv_posed_no_orient' + res_string, id + separator + frame_nr + '.npz')); uv_posed = uv_posed['uv_posed_no_orient']
uv_posed = np.load(os.path.join(temp_folder, 'uv_posed_no_orient' + res_string, id + separator + frame_nr + '.npz')); uv_posed = uv_posed['uv_posed_no_orient']
item['uv_posed' + res_string] = uv_posed
else:
uv_posed = np.load(os.path.join(folder, 'uv_posed' + res_string, id + separator + frame_nr + '.npz')); uv_posed = uv_posed['uv_gt']
uv_posed = np.load(os.path.join(temp_folder, 'uv_posed' + res_string, id + separator + frame_nr + '.npz')); uv_posed = uv_posed['uv_gt']
item['uv_posed' + res_string] = uv_posed
# print('here')
+24
View File
@@ -0,0 +1,24 @@
name: "lhunor_iccv23"
services:
lhunor_tf:
image: lhunor_tf:2023.02.21
container_name: lhunor_iccv23
#command: python -c "import tensorflow as tf;tf.test.gpu_device_name()"
ipc: host
user: 11017:11000
tty: true
ulimits:
memlock: -1
stack: 67108864
volumes:
- '~/workspace:/workspace'
- '/data-net/guest/lhunor/data:/data-net'
- '/data-fast/126-data1/lhunor/data:/data-local/126'
- '/data-fast/127-data1/lhunor/data:/data-local/127'
- '/data-fast/128-data1/lhunor/data:/data-local/128'
working_dir: /data-net
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
+6 -4
View File
@@ -1,6 +1,6 @@
import os
import sys
from configs.config_abl_all_post import config
from configs.iccv.config_abl_all import config
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
import tensorflow as tf
@@ -103,11 +103,13 @@ if __name__ == '__main__':
ids = set(ids)
iteration = ''
load_model(model, 'checkpoints/post/' + checkpoint_name, iteration=iteration)
if iteration == '':
iteration = load_model(model, 'checkpoints/iccv/' + checkpoint_name, return_iteration=True)
else:
load_model(model, 'checkpoints/iccv/' + checkpoint_name, iteration=iteration)
# load_model(model, 'checkpoints/' + 'abl_all_120k')
output_folder = '/home/workspace/data/results/post/' + checkpoint_name + '-' + iteration
output_folder = '/home/workspace/local-data_128/results/iccv/' + checkpoint_name + '-' + iteration
os.makedirs(output_folder, exist_ok=True)
+1 -1
View File
@@ -1,6 +1,6 @@
import os
import sys
from configs.iccv.config_abl_pyr_64_128_cape_f import config
from configs.iccv.config_abl_pyr_32_64_128_tshirt_skirt import config
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
import tensorflow as tf
+191
View File
@@ -0,0 +1,191 @@
import os
import sys
from configs.iccv.config_abl_pyr_64_cape_m_00032_SL import config
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
# Currently, memory growth needs to be the same across GPUs
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
# Memory growth must be set before GPUs have been initialized
print(e)
import glob
import time
import argparse
import wandb
import tqdm
import random
import numpy as np
import plotly.graph_objects as go
import plotly.express as ex
from PIL import Image
from postprocessing import fix_collision
if config['is_skirt']:
from losses import edge_loss_skirt as edge_loss
else:
from losses import edge_loss
from losses import collision_ratio, kl_loss #, concept_loss
# from losses import collision_penalty as collision_penalty
from losses import collision_loss as collision_penalty
from custom_utils.custom_utils import batch_to_dict, load_model, plot_3d, UV2Mesh, get_summary_html, maskFacesBatch, _maskFaces, plot_3d_collision
from dataset import DatasetFactory, StaticDataset
from custom_utils.smpl import SMPL
from models.pyramid_model_optimized import PyramidNew as Pyramid
from custom_utils.supersmpl_io import writeOBJ
from unif_metric import chamfer_and_score
uv2mesh = UV2Mesh(res=256, is_skirt=config['is_skirt'], is_adaptive=False, is_smpl_orig=config['is_cape'])
def group_inputs_for_levels(batch):
levels_input = []
for res in config['pyramid']['resolutions']:
res_modifier = '_' + str(res) if res != 512 else ''
levels_input.append([batch['uv_unposed' + res_modifier], batch['uv_static' + res_modifier], batch['uv_body_posed' + res_modifier], batch['uv_curvature' + res_modifier], batch['uv_mask' + res_modifier], batch['uv_mask']])
conds = [batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature']]
return levels_input, conds
@tf.function
def step(batch):
levels_input, conds = group_inputs_for_levels(batch)
out_levels = model([levels_input, conds], training=False)
pred = uv2mesh(out_levels[-1][0])
mesh_pred = uv2mesh(pred)
# if config['use_skinning']:
# shape = batch['pose_shape'][:, 72:]
# gender = tf.cast(tf.greater_equal(shape[:, 10] , 0.5), tf.int32)
# shape_offsets = tf.stack([tf.gather(tf.tensordot(shape[i,:10][tf.newaxis, :], smpl.shapedirs[gender[i]], axes=[[1], [2]])[0,:,:], smpl.to_keep, axis=0) for i in range(shape.shape[0])])
# mesh_pred_shaped = mesh_pred + shape_offsets * batch['mesh_mask'][:,:,tf.newaxis]
# mesh_pred_posed = smpl.run_garment(batch['pose_shape'][:, :72], batch['pose_shape'][:, 72:], mesh_pred_shaped)
# else:
# mesh_pred_posed = mesh_pred
# mesh_pred_posed_fixed = fix_collision(mesh_pred_posed, batch['mesh_body_posed'], batch['mesh_mask'])
# return mesh_pred_posed, None #mesh_pred_posed_fixed
return mesh_pred
if __name__ == '__main__':
# init_wandb()
parser = argparse.ArgumentParser(description='')
parser.add_argument('--name', type=str)
args = vars(parser.parse_args())
skirt_modifier = '_skirt' if config['is_skirt'] else ''
folder = config['test_dir']
smpl = SMPL(use_one_hot=False, orig_smpl=config['is_cape'])
model = Pyramid(config)
# str_split = config['name'].split('_')
# test_idx = str_split.index('test')
# checkpoint_name = '_'.join(str_split[:test_idx])
checkpoint_name = config['name']
if config['is_cape']:
F = np.load("custom_utils/smpl_faces_orig.npy").astype(np.int32)
else:
F = np.load("custom_utils/smpl_faces" + skirt_modifier + ".npy").astype(np.int32)
# ids = os.listdir(os.path.join(folder, 'pose_shape'))
# ids = [id.split('_')[0] for id in ids]
# ids = set(ids)
iteration = ''
if iteration == '':
iteration = load_model(model, 'checkpoints/iccv/' + checkpoint_name, return_iteration=True)
else:
load_model(model, 'checkpoints/iccv/' + checkpoint_name, iteration=iteration)
output_folder = '/home/workspace/data/results/' + checkpoint_name + '-' + iteration
# os.makedirs(output_folder, exist_ok=True)
# if config['use_skinning']:
# config['signature_dynamic'].pop('mesh_posed')
# config['signature_dynamic'].pop('mesh_unposed')
# config['signature_dynamic'].pop('mesh_body_posed')
dataset_resolutions = config['pyramid']['resolutions'].copy()
if 512 not in dataset_resolutions:
dataset_resolutions.append(512)
factory = DatasetFactory()
# dataset_test = factory.get_dataset(folder=config['test_dir'],
# batch_size=config['batch_size'],
# signature=config['signature_dynamic'],
# resolutions=[config['resolution']],
# in_memory=False,
# do_repeat=False,
# use_no_orient=config['remove_global_orientation'],
# frames_file=config['frames_file_test'] if 'frames_file_test' in config.keys() else None,
# is_cape=config['is_cape'])
# static_dataset_test = StaticDataset(folder=config['test_dir'],
# signature=config['signature_static'],
# resolutions=[config['resolution']],
# in_memory=True,
# is_cape=config['is_cape'])
dataset_test = factory.get_dataset(folder=config['test_dir'],
batch_size=config['batch_size'],
signature=config['signature_dynamic'],
resolutions=dataset_resolutions,
in_memory=False,
do_repeat=False,
use_no_orient=True,
frames_file=config['frames_file_test'] if 'frames_file_test' in config.keys() else None,
is_cape=config['is_cape'])
static_dataset_test = StaticDataset(folder=config['test_dir'],
signature=config['signature_static'],
resolutions=dataset_resolutions,
in_memory=True,
is_cape=config['is_cape'])
# faces_folder = '/home/workspace/data/results/support/faces' + ('_skirt' if config['is_skirt'] else '')
# ids = os.listdir(faces_folder)
# ids = [id.split('.')[0] for id in ids]
# faces = {id : np.load(faces_folder + '/' + id + '.npy') for id in ids }
errors = []
euclid = []
for batch in tqdm.tqdm(dataset_test):
batch = static_dataset_test.expand_batch(batch_to_dict(batch, config['signature_dynamic']))
mesh_pred = step(batch)
# mesh_pred_posed, mesh_pred_posed_fixed = mesh_pred_posed.numpy(), mesh_pred_posed_fixed.numpy()
mask = batch['mesh_mask'].numpy().astype(bool)
for i in range(mask.shape[0]):
id, frame_nr = batch['id'][i].numpy().decode("utf-8"), batch['frame_nr'][i].numpy().decode("utf-8")
x = chamfer_and_score(mesh_pred.numpy()[i, mask[i], :], batch['mesh_unposed'].numpy()[i, mask[i], :])
y = np.mean(np.sqrt(np.sum((mesh_pred.numpy()[i, mask[i], :] - batch['mesh_unposed'].numpy()[i, mask[i], :])**2, axis=-1)))
errors.append(x[1])
euclid.append(y)
# writeOBJ(os.path.join(output_folder, id + '_' + frame_nr + '.obj'), mesh_pred_posed[i, mask[i], :], faces[id])
# np.save(os.path.join(output_folder, id + '_' + frame_nr + '.npy'), mesh_pred_posed[i, mask[i], :])
# np.save(os.path.join(output_folder, id + '_' + frame_nr + '_fixed_coll.npy'), mesh_pred_posed_fixed[i, mask[i], :])
# writeOBJ(os.path.join(output_folder, id + '_' + frame_nr + '_fixed_coll.obj'), mesh_pred_posed_fixed[i, mask[i], :], faces[id])
print(np.mean(errors))
print(np.mean(euclid))
print()
+19 -19
View File
@@ -1,5 +1,6 @@
import os
import csv
import glob
import numpy as np
@@ -7,15 +8,12 @@ if __name__ == '__main__':
garment_type_table = np.load('custom_data/garment_type_table_test.npy', allow_pickle=True).item()
folder = '/home/workspace/data/results/errors/iccv'
checkpoint_name = 'iccv_pyr_32_64_curv'
checkpoint_name_skirt = 'iccv_pyr_32_64_curv_skirt'
iteration = '100000'
iteration_skirt : str = '60000'
checkpoint_name = 'iccv_pyr_32_64_128_2'
checkpoint_name_skirt = 'iccv_pyr_32_64_128_skirt_dress'
iteration = '125' + '000'
iteration_skirt : str = '175' + '000'
error_type = '-euclidean' # '-euclidean' '-collision' -edge -normal
# checkpoint_name = 'abl_skin'
# checkpoint_name_skirt = checkpoint_name + '_skirt'
# iteration = '70000'
# iteration_skirt : str = iteration
errors = []
errors_skirt = []
@@ -23,28 +21,30 @@ if __name__ == '__main__':
per_garment_errors_skirt = { 'Tshirt': [], 'Dress': [], 'Skirt': [], 'Top': [] }
with open(os.path.join(folder, checkpoint_name + '-' + iteration + '.csv'), 'r') as f:
csv_reader = csv.reader(f, delimiter=',')
for row in csv_reader:
per_garment_errors[garment_type_table[row[0].split('_')[0]]].append(float(row[1]))
# with open(os.path.join(folder, f'{checkpoint_name}-{iteration}{error_type}.csv'), 'r') as f:
# csv_reader = csv.reader(f, delimiter=',')
# for row in csv_reader:
# per_garment_errors[garment_type_table[row[0].split('_')[0]]].append(float(row[1]))
with open(os.path.join(folder, checkpoint_name_skirt + '-' + iteration_skirt + '.csv'), 'r') as f:
# print('\nNon-skirt:')
# for key in per_garment_errors.keys():
# avg = np.mean(per_garment_errors[key])
# errors.append(avg)
# print(key + ': ' + str(avg))
# print('\nAvg non-skirt: ' + str(np.mean(errors)))
with open(os.path.join(folder, f'{checkpoint_name_skirt}-{iteration_skirt}{error_type}.csv'), 'r') as f:
csv_reader = csv.reader(f, delimiter=',')
for row in csv_reader:
per_garment_errors_skirt[garment_type_table[row[0].split('_')[0]]].append(float(row[1]))
print('\nNon-skirt:')
for key in per_garment_errors.keys():
avg = np.mean(per_garment_errors[key])
errors.append(avg)
print(key + ': ' + str(avg))
print('\nSkirt:')
for key in per_garment_errors_skirt.keys():
avg = np.mean(per_garment_errors_skirt[key])
errors_skirt.append(avg)
print(key + ': ' + str(avg))
print('\nAvg non-skirt: ' + str(np.mean(errors)))
print('Avg skirt: ' + str(np.mean(errors_skirt)))
cum_avg_shirt = np.mean(per_garment_errors['Tshirt'] + per_garment_errors_skirt['Tshirt'])
+5 -3
View File
@@ -44,7 +44,7 @@ def _nearest_neighbour(V, B):
def _tf_nn_parallel(V, B):
return tf.map_fn(fn=lambda elem: tf.py_function(func=_nearest_neighbour, inp=elem, Tout=tf.int32), elems=(V,B), fn_output_signature=tf.int32, parallel_iterations=V.shape[0])
# @tf.function
@tf.function
def collision_loss(V, B, mask, thr=.004):
B_vn = vertex_normals(B, tf.tile(F_coll[None], [B.shape[0], 1, 1]))
@@ -96,6 +96,7 @@ edges_skirt = np.stack(np.nonzero(laplacian_loss.todense())).transpose()
def get_edge_mask(masks):
return tf.reduce_min(tf.gather(masks, edges, axis=1), axis=-1)
@tf.function
def edge_loss(x, y, mask):
e_mask = get_edge_mask(mask)
x_e = tf.gather(x, edges[:,0], axis=1) - tf.gather(x, edges[:,1], axis=1)
@@ -237,13 +238,14 @@ def kl_loss(mean, logvar):
kl_loss *= -0.5
return kl_loss
@tf.function
def normal_loss(pred, gt, mask, is_skirt=False, is_smpl_orig=False):
f_norm = None
if not is_skirt and not is_smpl_orig:
f_norm = F_norm
elif is_skirt:
f_norm = F_norm_skirt
# f_norm = F_norm_skirt
f_norm = tf.tile(F_coll_skirt[None,:,:], [pred.shape[0],1,1])
elif is_smpl_orig:
f_norm = F_norm_orig
else:
+16 -3
View File
@@ -50,7 +50,7 @@ class CVAE(tf.keras.Model):
# @tf.function
def sample_single(self, uv_template, uv_body_posed, uv_mask, eps=None, nr_of_samples=4):
if eps is None:
eps = tf.random.normal(shape=(nr_of_samples, self.latent_dim))
eps = tf.random.normal(shape=(nr_of_samples, 8, 4, self.latent_dim))
uv_template = tf.tile(tf.transpose(uv_template, [1,2,0])[tf.newaxis,:,:,:], [nr_of_samples,1,1,1])
uv_body_posed = tf.tile(tf.transpose(uv_body_posed, [1,2,0])[tf.newaxis,:,:,:], [nr_of_samples,1,1,1])
@@ -79,16 +79,17 @@ class CVAE(tf.keras.Model):
return z_cond
def sample(self, uv_template, uv_body_posed, uv_mask, noise=None):
if noise is None:
eps = tf.random.normal(shape=(uv_template.shape[0], self.latent_dim))
eps = tf.random.normal(shape=(uv_template.shape[0], 8, 4, self.latent_dim))
else:
eps = noise
z_cond = self.encode_conds(uv_template, uv_body_posed, training=False)
z = tf.concat([eps, z_cond], axis=-1)
x = self.decoder(z, training=False)
x = self.decoder([z, uv_mask], training=False)
# x = x * uv_mask[:,:,:,tf.newaxis]
@@ -148,3 +149,15 @@ class CVAE(tf.keras.Model):
# x = tf.math.softmax(x)
return x, mean, logvar
def call_sample(self, inputs):
uv_template, uv_body_posed, uv_curv, uv_mask = inputs
z = tf.random.normal(shape=(uv_template.shape[0], 8, 4, self.latent_dim))
z_cond = self.encode_conds(uv_template, uv_body_posed, training=False)
z = tf.concat([z, z_cond], axis=-1)
x = self.decoder([z, uv_mask], training=False)
return x
+1 -1
View File
@@ -203,7 +203,7 @@ class CVAENew(tf.keras.Model):
# @tf.function
def sample(self, uv_template, uv_body_posed, uv_curv, uv_mask, noise=None, add_noise=False):
if noise is None:
eps = tf.random.normal(shape=(uv_template.shape[0], self.latent_dim))
eps = tf.random.normal(shape=(uv_template.shape[0], 8, 4, self.latent_dim))
else:
eps = noise
+3 -3
View File
@@ -101,6 +101,7 @@ class PyramidLevelNew(tf.keras.Model):
def __init__(self, config):
super(PyramidLevelNew, self).__init__()
self.size = config['resolution']
self.latent_dim=config['latent_dim']
self.encoder = VariationalEncoderNew(config['encoder_depths'], config['encoder_dims'], kernel_size=config['kernel_size'], latent_dim=config['latent_dim'])
self.decoder = DecoderNew(config['decoder_depths'], config['decoder_dims'], config['kernel_size'])
@@ -126,13 +127,12 @@ class PyramidLevelNew(tf.keras.Model):
def sample(self, z_cond, uv_mask, noise=None):
if noise is None:
eps = tf.random.normal(shape=(uv_mask.shape[0], self.latent_dim))
eps = tf.random.normal(shape=(uv_mask.shape[0], 8, 4, self.latent_dim))
else:
eps = noise
z = tf.concat([eps, z_cond], axis=-1)
x = self.decoder(z)
x = self.decoder(z, training=False)
if self.avg_garment is not None:
x = x + self.avg_garment[tf.newaxis,:,:,:]
+84 -2
View File
@@ -320,6 +320,87 @@ class PyramidNew(tf.keras.Model):
return z_cond
def sample(self, inputs):
levels_input, conds = inputs
uv_static, uv_body, uv_curv = conds[0], conds[1], conds[2]
z_cond = self.encode_conds(uv_static, uv_body, uv_curv, training=False)
pred = [None, None, None, None, None]
for i in range(len(self.levels)):
pred[i] = self.levels[i].sample(z_cond, levels_input[i][-2])
pred_1 = pred[0]
pred_2 = pred[1]
pred_3 = pred[2]
pred_4 = pred[3]
pred_5 = pred[4]
pred_1 = self.levels[0].enhance(pred_1, levels_input[0][-2], training=False)
pred_1 = tf.image.resize(pred_1, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.BILINEAR)
pred_1 = pred_1 * levels_input[1][-2][:,:,:,tf.newaxis]
pred_2 = pred_1 + pred_2
pred_2 = self.levels[1].enhance(pred_2, levels_input[1][-2], training=False)
pred_2 = tf.image.resize(pred_2, (self.levels[2].size, self.levels[2].size//2), tf.image.ResizeMethod.BILINEAR)
pred_2 = pred_2 * levels_input[2][-2][:,:,:,tf.newaxis]
pred_3 = pred_2 + pred_3
pred_3 = self.levels[2].enhance(pred_3, levels_input[2][-2], training=False)
pred_3 = tf.image.resize(pred_3, (self.levels[3].size, self.levels[3].size//2), tf.image.ResizeMethod.BILINEAR)
pred_3 = pred_3 * levels_input[3][-2][:,:,:,tf.newaxis]
pred_4 = pred_3 + pred_4
pred_4 = self.levels[3].enhance(pred_4, levels_input[3][-2], training=False)
pred_4 = tf.image.resize(pred_4, (self.levels[4].size, self.levels[4].size//2), tf.image.ResizeMethod.BILINEAR)
pred_4 = pred_4 * levels_input[4][-2][:,:,:,tf.newaxis]
pred_5 = pred_4 + pred_5
pred_5 = pred_5 * levels_input[4][-2][:,:,:,tf.newaxis]
return pred_5
def sample_seq(self, inputs):
levels_input, conds = inputs
uv_static, uv_body, uv_curv = conds[0], conds[1], conds[2]
z_cond = self.encode_conds(uv_static, uv_body, uv_curv, training=False)
# level 1
pred_1 = self.levels[0].sample(z_cond, levels_input[0][-2])
pred_1 = self.levels[0].enhance(pred_1, levels_input[0][-2], training=False)
pred_1 = tf.image.resize(pred_1, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.BILINEAR)
pred_1 = pred_1 * levels_input[1][-2][:,:,:,tf.newaxis]
# level 2
pred_2 = self.levels[1].sample(z_cond, levels_input[1][-2])
pred_2 = pred_1 + pred_2
pred_2 = self.levels[1].enhance(pred_2, levels_input[1][-2], training=False)
pred_2 = tf.image.resize(pred_2, (self.levels[2].size, self.levels[2].size//2), tf.image.ResizeMethod.BILINEAR)
pred_2 = pred_2 * levels_input[2][-2][:,:,:,tf.newaxis]
# level 3
pred_3 = self.levels[2].sample(z_cond, levels_input[2][-2])
pred_3 = pred_2 + pred_3
pred_3 = self.levels[2].enhance(pred_3, levels_input[2][-2], training=False)
pred_3 = tf.image.resize(pred_3, (self.levels[3].size, self.levels[3].size//2), tf.image.ResizeMethod.BILINEAR)
pred_3 = pred_3 * levels_input[3][-2][:,:,:,tf.newaxis]
# level 4
pred_4 = self.levels[3].sample(z_cond, levels_input[3][-2])
pred_4 = pred_3 + pred_4
pred_4 = self.levels[3].enhance(pred_4, levels_input[3][-2], training=False)
pred_4 = tf.image.resize(pred_4, (self.levels[4].size, self.levels[4].size//2), tf.image.ResizeMethod.BILINEAR)
pred_4 = pred_4 * levels_input[4][-2][:,:,:,tf.newaxis]
# level 5
pred_5 = self.levels[4].sample(z_cond, levels_input[4][-2])
pred_5 = pred_5 * levels_input[4][-2][:,:,:,tf.newaxis]
pred_5 = pred_4 + pred_5
return pred_5
def call(self, inputs, training):
levels_input, conds = inputs
uv_static, uv_body, uv_curv = conds[0], conds[1], conds[2]
@@ -358,8 +439,9 @@ class PyramidNew(tf.keras.Model):
else:
# if self.upscale_enhancer is not None:
# pred = self.enhance(pred, levels_input[-1][-2], training=training)
pred = self.levels[-1].enhance(pred, levels_input[-1][-2], training=training)
pred = tf.image.resize(pred, (512, 256), tf.image.ResizeMethod.BILINEAR)
if len(self.levels) != 5:
pred = self.levels[-1].enhance(pred, levels_input[-1][-2], training=training)
pred = tf.image.resize(pred, (512, 256), tf.image.ResizeMethod.BILINEAR)
pred = pred * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
out_levels.append([pred, mean, logvar])
+27 -19
View File
@@ -1,5 +1,5 @@
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "6"
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import sys
import time
import cv2
@@ -128,7 +128,11 @@ def get_experiment_plots(folder, frames, experiments, skirt_mods, bodies, faces,
frame_out = []
id = frame.split('_')[0]
for exp in experiments:
garment = np.load(os.path.join(folder, exp[0] + skirt_mods[id] + '-' + exp[1], frame + '.npy'))
path = os.path.join(folder, exp[0] + skirt_mods[id] + '-' + exp[1], frame + '.npy')
if not os.path.exists(path):
path = os.path.join('/home/workspace/local-data_128/results/iccv', exp[0] + skirt_mods[id] + '-' + exp[1], frame + '.npy')
assert os.path.exists(path), path
garment = np.load(path)
if exp == 'abl_orient':
garment = deorient(garment, frame, skirt_mods[id] == '_skirt')
garment = postprocess(garment, bodies[frame], id, skirt_mods[id] == '_skirt')
@@ -190,11 +194,11 @@ if __name__ == '__main__':
faces = get_faces()
frames = ['00079_135']
frames = ['00079_135', '00505_23', '00688_25', '01693_128', '00408_34']
# frames = [ '00075_4', '00475_273', '00761_295', '00793_3', '00993_220', '01134_112', '01278_108', '00718_38', '00951_34', '00962_60','01065_38','01191_83','01240_168']
# rand_frames = [frame.split('.')[0] for frame in os.listdir('/home/workspace/data/dataset/test_ready/pose_shape')]
# random.shuffle(rand_frames)
# rand_frames = rand_frames[:25]
rand_frames = [frame.split('.')[0] for frame in os.listdir('/home/workspace/data/dataset/test_ready/pose_shape')]
random.shuffle(rand_frames)
rand_frames = rand_frames[:25]
# frames.extend(rand_frames)
# rand_frames = [frame.split('.')[0] for frame in os.listdir('/home/workspace/data/dataset/test_skirt_ready_2/pose_shape')]
# random.shuffle(rand_frames)
@@ -207,34 +211,38 @@ if __name__ == '__main__':
cameras = {frame: camera_1 for frame in frames}
# abl_all replace abl_norm maybe
experiments = [['iccv_pyr_32', '335000'], ['iccv_pyr_32_skin', '330000'], ['iccv_pyr_32_curv', '155000'], ['iccv_pyr_32_reg', '150000']] # , 'pyra_32_res'
# experiments = [['iccv_pyr_32_64_128_256_512', '120000'], ['iccv_pyr_32_64_128_256_512_curv', '80000'], ['iccv_pyr_32_64_128_256_512_skin', '115000'], ['iccv_pyr_32_64_128_256_512_reg', '75000']] # , 'pyra_32_res'
# experiments = [['iccv_pyr_32_64_128_256_512', '120000'], ['iccv_pyr_32_64_128_256_curv', '80000'], ['iccv_pyr_32_64_128_256_skin', '145000'], ['iccv_pyr_32_64_128_256_reg', '35000']] # , 'pyra_32_res'
# experiments = [['iccv_pyr_32_64_128_256_512', '120000'], ['iccv_pyr_32_64_128_curv', '20000'], ['iccv_pyr_32_64_128_skin_2', '20000'], ['iccv_pyr_32_64_128_reg_2', '80000']] # , 'pyra_32_res'
experiments = [['abl_all_3', '130000']] # , 'pyra_32_res'
skirt_mods = { frame.split('_')[0]: ('_skirt' if os.path.exists('/home/workspace/data/dataset/test_skirt_ready_2/pose_shape/' + frame + '.npy') else '') for frame in frames }
bodies = get_bodies(frames, skirt_mods)
# gts = get_gt_image(frames, bodies, faces, cameras, skirt_mods)
gts = get_gt_meshes(frames, bodies, faces, cameras, skirt_mods)
results_folder_base = '/home/workspace/data/results/iccv/'
output_folder = os.path.join(results_folder_base, 'ablation_plots')
output_folder = os.path.join('examples/ablation/img_3')
output_folder_stl = os.path.join('examples/ablation/stl_3')
os.makedirs(output_folder, exist_ok=True)
os.makedirs(output_folder_stl, exist_ok=True)
# gts_img = get_gt_image(frames, bodies, faces, cameras, skirt_mods)
# images = get_experiment_plots(results_folder_base, frames, experiments, skirt_mods, bodies, faces, cameras)
# rows = [np.concatenate((gt, exp), axis=1) for gt, exp in zip(gts_img, images)]
# for frame, row in zip(frames, rows):
# custom_imshow(row).write_image(os.path.join(output_folder, frame + '_ablation.png'))
gts = get_gt_meshes(frames, bodies, faces, cameras, skirt_mods)
meshes = get_experiment_meshes(results_folder_base, frames, experiments, skirt_mods, bodies, faces, cameras)
for mesh, frame in zip(meshes, frames):
for exp, (garment, body, faces) in zip(experiments, mesh):
save_stl(f'examples/{frame}_{exp[0]}_garment.stl', garment, faces)
save_stl(f'examples/{frame}_{exp[0]}_body.stl', body, F)
save_stl(f'{output_folder_stl}/{frame}_{exp[0]}_garment.stl', garment, faces)
save_stl(f'{output_folder_stl}/{frame}_{exp[0]}_body.stl', body, F)
for mesh, frame in zip(gts, frames):
garment, body, faces = mesh
save_stl(f'examples/{frame}_gt_garment.stl', garment, faces)
save_stl(f'examples/{frame}_gt_body.stl', body, F)
save_stl(f'{output_folder_stl}/{frame}_gt_garment.stl', garment, faces)
save_stl(f'{output_folder_stl}/{frame}_gt_body.stl', body, F)
# rows = [np.concatenate((gt, exp), axis=1) for gt, exp in zip(gts, images)]
# for frame, row in zip(frames, rows):
# custom_imshow(row).write_image(os.path.join(output_folder, frame + '_ablation.png'))
# final = np.concatenate(rows, axis=0)
+29 -18
View File
@@ -1,5 +1,5 @@
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "5"
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
import tensorflow as tf
@@ -30,15 +30,15 @@ from plotly.subplots import make_subplots
from scipy.spatial.transform import Rotation
from dataset import DatasetFactory, StaticDataset
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model, group_inputs_for_levels
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model, group_inputs_for_levels, save_stl
from custom_utils.smpl import SMPL
from convert_to_uv_api import convert_to_uv_api
from models.upscaler import UpscalerBasicConv as Upscaler
from postprocessing import fix_collision
from models.pyramid_model_optimized import Pyramid
from models.pyramid_model_optimized import PyramidNew as Pyramid
from configs.config_abl_2_pyr_32_64_128_256_512 import config as config_regular
from configs.config_abl_2_pyr_32_64_128_256_512_skirt import config as config_skirt
from configs.iccv.config_abl_pyr_32_64_128_256_512 import config as config_regular
from configs.iccv.config_abl_pyr_32_64_128_256_512_skirt import config as config_skirt
def color_labels(img):
@@ -182,7 +182,7 @@ def convert_to_mesh(uvs, is_skirt, mask):
out = []
for i in range(len(uvs)):
if uvs[i].shape[1] != 512:
uvs[i] = tf.image.resize(uvs[i], (512, 256), tf.image.ResizeMethod.LANCZOS5)
uvs[i] = tf.image.resize(uvs[i], (512, 256), tf.image.ResizeMethod.BILINEAR)
if is_skirt:
mesh = uv2mesh_skirt(uvs[i])
else:
@@ -239,9 +239,9 @@ def get_closest_n_points(verts, idx, n):
def get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras):
model: Pyramid = Pyramid(config_regular)
load_model(model, 'checkpoints/' + config_regular['name'])
load_model(model, 'checkpoints/iccv/' + config_regular['name'])
model_skirt: Pyramid = Pyramid(config_skirt)
load_model(model_skirt, 'checkpoints/' + config_skirt['name'])
load_model(model_skirt, 'checkpoints/iccv/' + config_skirt['name'])
result = []
for frame in frames:
id = frame.split('_')[0]
@@ -267,6 +267,10 @@ def get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras):
img = cv2.imread('/tmp/exp_temp.png')
frame_out.append(img[:, 50:-50, :])
for i, mesh in enumerate(meshes):
save_stl(os.path.join(output_folder, f'{frame}_{i+1}.stl'), mesh, faces[id].astype(np.int32))
save_stl(os.path.join(output_folder, f'{frame}_final.stl'), final_mesh_fixed, faces[id].astype(np.int32))
# fig = plot_fixed(final_mesh, faces[id], cameras[frame], bodies[frame])
# fig.write_image('/tmp/exp_temp.png')
# img = cv2.imread('/tmp/exp_temp.png')
@@ -297,6 +301,10 @@ def get_gt_image(frames, bodies, faces, cameras, skirt_mods):
fig.write_image('/tmp/exp_temp.png')
img_unposed = cv2.imread('/tmp/exp_temp.png')
save_stl(os.path.join(output_folder, f'{frame}_gt.stl'), gt_unposed[mask,:], faces[id].astype(np.int32))
save_stl(os.path.join(output_folder, f'{frame}_gt_unposed.stl'), gt[mask,:], faces[id].astype(np.int32))
save_stl(os.path.join(output_folder, f'{frame}_body.stl'), bodies[frame], F)
out.append(np.concatenate((img[:, 50:-50, :], img_unposed[:, 50:-50, :]), axis=1))
return out
@@ -322,33 +330,36 @@ if __name__ == '__main__':
# garment_type_table = np.load('custom_data/garment_type_table_test.npy', allow_pickle=True).item()
garment_type_table = np.load('custom_data/garment_type_table_train.npy', allow_pickle=True).item()
camera_1 = dict(up=dict(x=0, y=0, z=1), center=dict(x=0, y=0, z=-0.05), eye=dict(x=0.3, y=1.0, z=0.05))
camera_2 = dict(up=dict(x=0, y=0, z=1), center=dict(x=0, y=0, z=-0.05), eye=dict(x=-0.9, y=0.7, z=0.05))
frames = ['05656_221', '00300_69', '06955_117']
frames = ['01070_13']
cameras = {'01070_13': camera_1}
# frames = ['05656_221', '00300_69', '06955_117']
# frames = ['02184_157', '02241_142', '06955_117', '06804_192']
# frames = ['01763_259', '007292_282', '00539_296', '00075_4']
# frames = [ '01763_259']
camera_1 = dict(up=dict(x=0, y=0, z=1), center=dict(x=0, y=0, z=-0.05), eye=dict(x=0.3, y=1.0, z=0.05))
camera_2 = dict(up=dict(x=0, y=0, z=1), center=dict(x=0, y=0, z=-0.05), eye=dict(x=-0.9, y=0.7, z=0.05))
# cameras = {'01763_259': camera_1, '007292_282': camera_1, '00539_296': camera_1, '00075_4': camera_2}
cameras = {'05656_221': camera_1, '00300_69': camera_1, '06955_117': camera_1}
# cameras = {'05656_221': camera_1, '00300_69': camera_1, '06955_117': camera_1}
# cameras = {'02184_157': camera_1, '02241_142': camera_1, '06955_117': camera_1, '06804_192': camera_1}
# abl_all replace abl_norm maybe
experiment = 'abl_2_pyr_32_64_128_256_512'
experiment = 'abl_pyr_32_64_128_256_512'
skirt_mods = { frame.split('_')[0]: ('_skirt' if (garment_type_table[frame.split('_')[0]] == 'Skirt' or garment_type_table[frame.split('_')[0]] == 'Dress') else '') for frame in frames }
data_folder = '/home/workspace/local-data/train'
data_folder_skirt = '/home/workspace/local-data/train_skirt'
data_folder_skirt = '/home/workspace/local-data_128/train_skirt'
results_folder_base = 'examples/pyramid'
output_folder = os.path.join(results_folder_base)
os.makedirs(output_folder, exist_ok=True)
bodies = get_bodies(frames, skirt_mods)
masks = get_masks(frames)
faces = { frame.split('_')[0]: _maskFaces(np.zeros((14475,3)), F_skirt if skirt_mods[frame.split('_')[0]] == '_skirt' else F, masks[frame.split('_')[0]])[1] for frame in frames }
gts = get_gt_image(frames, bodies, faces, cameras, skirt_mods)
results_folder_base = '/home/workspace/data/results'
output_folder = os.path.join(results_folder_base, 'ablation_plots')
os.makedirs(output_folder, exist_ok=True)
images = get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras)
+95 -26
View File
@@ -11,10 +11,11 @@ import tensorflow as tf
import cmapy as cm
import plotly.graph_objects as go
import plotly.express as ex
import scipy.io as sio
from plotly.subplots import make_subplots
from dataset import DatasetFactory, StaticDataset
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model, save_stl
from custom_utils.smpl import SMPL
from convert_to_uv_api import convert_to_uv_api
from models.upscaler import UpscalerBasicConv as Upscaler
@@ -121,6 +122,69 @@ def uv_mapping_example(mesh, faces, colors, mask):
print()
def faces2graph(F, v=None):
if v: v = set(v) # Only this verts
G = {}
for f in F:
for i in f:
if v and i not in v: continue
if not i in G:
G[i] = {}
for j in f:
if v and j not in v: continue
if i == j: continue
G[i][j] = 1
return G
SMOOTH_IT = 100
SMOOTH_EXHAUST_IT = 100
def smooth(M, F, segm):
f_skirt = []
for f in F:
f_skirt.append(f[0])
G = faces2graph(f_skirt)
# Segmentation for skirt smoothing
# Laplacian smoothing
for _ in range(SMOOTH_EXHAUST_IT):
for v in segm['exhaustive'].reshape(-1):
M[v] = M[list(G[v].keys())].mean(0)
for _ in range(SMOOTH_IT):
# aux = M.copy()
# FRONT
for v in segm['front'].reshape(-1):
M[v] = M[list(G[v].keys())].mean(0)
for v in segm['frontBoundary'].reshape(-1):
M[v,:2] = M[list(G[v].keys()),:2].mean(0) # No z-smoothing
# BACK
for v in segm['back'].reshape(-1):
M[v] = M[list(G[v].keys())].mean(0)
for v in segm['backBoundary'].reshape(-1):
M[v,:2] = M[list(G[v].keys()),:2].mean(0) # No z-smoothing
# M = aux.copy()
return M
def uv_mapping_example_skirt(mesh, faces, colors, mask):
segm = sio.loadmat('custom_utils/vg_skirt_smoothing')
F = sio.loadmat("custom_utils/faces_skirt.mat")['F'][0]
faces = np.load('custom_utils/smpl_faces_skirt.npy')
mesh = smooth(mesh, F, segm)
fig = plot_fixed(mesh, faces, colors)
fig.write_image('examples/' + type + '_' + id_str + '_' + frame_nr + '_body.png')
# stop inbetween
uv = convert_to_uv_api(mesh, mask, is_skirt=True)
plot = custom_imshow((uv+1)/2)
# plot = custom_imshow(result)
# plot.write_image('examples/' + type + '_' + id_str + '_' + frame_nr + '_uv_body_pre.png')
plot.write_image('examples/' + type + '_' + id_str + '_' + frame_nr + '_uv_body_inpainted.png')
print()
def curvature_example(mesh_curvature, uv_curvature, posed, faces, mask):
colors = np.array([cm.color('jet', 1 - i) for i in np.linspace(0, 1, mesh_curvature.max()+1)]) / 255.0
color_mesh = np.zeros((mesh_curvature.shape[0], 3), np.float32)
@@ -172,7 +236,7 @@ def plot_upscaling(uv_low, uv_high, uv_mask_low, uv_mask_high, faces, color, mas
print()
if __name__ == '__main__':
if __name__ == '__main__':
uv2mesh = UV2Mesh()
smpl = SMPL()
@@ -209,8 +273,9 @@ def plot_upscaling(uv_low, uv_high, uv_mask_low, uv_mask_high, faces, color, mas
do_repeat=False,
resolutions=[512, 32],
# frames_file='/home/workspace/data/dataset/test_ready/frames_pose_cluster_20_sample_10.txt',
# frames_file='/home/workspace/data/dataset/test_ready/frames_00438_146.txt',
frames_file='/home/workspace/data/dataset/test_ready/frames_00228_137.txt',
frames_file='/home/workspace/data/dataset/test_ready/frames_00438_146.txt',
# frames_file='/home/workspace/data/dataset/test_ready/frames_00228_137.txt',
# frames_file='/home/workspace/data/dataset/test_ready/frames_02572_1.txt',
)
static_dataset = StaticDataset(folder='/home/workspace/data/dataset/test_ready',
resolutions=[512, 32],
@@ -264,30 +329,33 @@ def plot_upscaling(uv_low, uv_high, uv_mask_low, uv_mask_high, faces, color, mas
x = np.concatenate((body, posed), axis=0)
# calcualte the sum of face ares of posed mesh that has faces_garment faces
# face_areas = np.linalg.norm(np.cross((x[faces[:,0],:] - x[faces[:,1],:]), (x[faces[:,0],:] - x[faces[:,2],:])), axis=1)
# m = tm.Trimesh(x, faces, process=False, validate=False, vertex_colors=colors)
# x = posed
# x_1 = unposed.copy()
# x_1[:, 0] = x_1[:, 0] + 0.75
# x_2 = unposed_shaped.copy()
# x_2[:, 0] = x_2[:, 0] + 1.75
# garments = np.concatenate((x, x_1, x_2), axis=0)
# all_faces = np.concatenate((faces_garment, faces_garment + x.shape[0], faces_garment + 2*x.shape[0]), axis=0).astype(np.int32)
# mesh = garments
# faces = all_faces
# fig = go.Figure()
# fig.add_trace(go.Mesh3d(
# x=mesh[:,0],
# y=mesh[:,2],
# z=mesh[:,1],
# i = faces[:,0],
# j = faces[:,1],
# k = faces[:,2],
# text="",
# lighting={ 'ambient':0.8, 'diffuse':0.5, 'roughness':0.5 },
x = posed
x_1 = unposed.copy()
x_1[:, 0] = x_1[:, 0] + 0.75
x_2 = unposed_shaped.copy()
x_2[:, 0] = x_2[:, 0] + 1.75
garments = np.concatenate((x, x_1, x_2), axis=0)
all_faces = np.concatenate((faces_garment, faces_garment + x.shape[0], faces_garment + 2*x.shape[0]), axis=0).astype(np.int32)
mesh = garments
faces = all_faces
fig = go.Figure()
fig.add_trace(go.Mesh3d(
x=mesh[:,0],
y=mesh[:,2],
z=mesh[:,1],
i = faces[:,0],
j = faces[:,1],
k = faces[:,2],
text="",
lighting={ 'ambient':0.8, 'diffuse':0.5, 'roughness':0.5 },
# ),)
# fig.show()
),)
fig.show()
# fig = plot_fixed(x, faces, colors)
@@ -302,7 +370,8 @@ def plot_upscaling(uv_low, uv_high, uv_mask_low, uv_mask_high, faces, color, mas
# fig.write_image('examples/' + type + '_' + id_str + '_' + frame_nr + '_unposed_shaped.svg')
# uv_mapping_example(body, F, colors[:14475, :], np.ones((14475), bool))
# uv_mapping_example_skirt(body, F, colors[:14475, :], np.ones((14475), bool))
# curvature_example(batch['mesh_curvature'][0].numpy(), uv_curvature, posed, faces_garment, mask)
plot_upscaling(batch['uv_unposed_32'].numpy()[0], batch['uv_unposed'].numpy()[0], batch['uv_mask_32'].numpy()[0], batch['uv_mask'].numpy()[0], faces_garment, colors_garment, mask)
# plot_upscaling(batch['uv_unposed_32'].numpy()[0], batch['uv_unposed'].numpy()[0], batch['uv_mask_32'].numpy()[0], batch['uv_mask'].numpy()[0], faces_garment, colors_garment, mask)
print()
+17 -7
View File
@@ -216,7 +216,7 @@ def generate_faces():
np.save(os.path.join(output_folder, id + '.npy'), faces.astype(np.int32))
def generate_frames_file(folder, ratio=0.1):
def generate_frames_file(folder, ratio=0.1, garment='', file_name='frames.txt'):
all_frames = os.listdir(os.path.join(folder, 'pose_shape'))
ids = [frame.split('_')[0] for frame in all_frames]
all_frames = [frame.split('.')[0] for frame in all_frames]
@@ -232,17 +232,15 @@ def generate_frames_file(folder, ratio=0.1):
selected = []
for id in tqdm.tqdm(sub_ids):
if garment_type_table[id] != 'Dress':
if garment_type_table[id] != garment:
continue
if len(selected) > 30000:
break
# frames = glob.glob(os.path.join(folder, 'pose_shape', id + '_*'))
frames = [frame for frame in all_frames if frame.startswith(id + '_')]
frames = [frame.split('/')[-1].split('.')[0] for frame in frames]
selected.extend(frames)
with open(os.path.join(folder, 'frames_dress_30k.txt'), 'w') as f:
with open(os.path.join(folder, file_name), 'w') as f:
for i, frame in enumerate(selected):
f.write(frame + '\n')
@@ -293,7 +291,7 @@ def generate_frames_file_filtered_cape():
if __name__ == '__main__':
src_folder = '/home/workspace/local-data/train_skirt' #cloth3d_skirt
src_folder = '/home/workspace/local-data/train' #cloth3d_skirt
# src_folder = r'D:\Work\Dataset\validation_2'
dest_folder = '/home/workspace/data/dataset/validation'
@@ -306,5 +304,17 @@ if __name__ == '__main__':
# verify_poses(src_folder)
# create_garment_type_table()
# generate_faces()
generate_frames_file(src_folder, ratio=1)
# generate_frames_file(src_folder, ratio=1)
# generate_frames_file_filtered_cape()
# # folders = ['/home/workspace/local-data/train', '/home/workspace/local-data/test_ready', '/home/workspace/local-data/valid']
# folders = ['/home/workspace/local-data/valid_skirt']
# # garments = ['Jumpsuit', 'Trousers', 'Tshirt', 'Top']
# # filename = ['frames_jumpsuit.txt', 'frames_trousers.txt', 'frames_tshirt.txt', 'frames_top.txt']
# garments = ['Skirt', 'Dress', 'Tshirt', 'Top']
# filename = ['frames_skirt.txt', 'frames_dress.txt', 'frames_tshirt.txt', 'frames_top.txt']
# for folder in folders:
# for garment, file in zip(garments, filename):
# generate_frames_file(folder, garment=garment, file_name=file, ratio=1)
+78 -43
View File
@@ -1,5 +1,5 @@
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "6"
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
@@ -31,7 +31,7 @@ from PIL import Image
from plotly.subplots import make_subplots
from custom_utils.smpl import SMPL
from custom_utils.custom_utils import load_model
from custom_utils.custom_utils import load_model, save_stl
from plotly.subplots import make_subplots
from scipy.spatial.transform import Rotation
@@ -41,13 +41,17 @@ from custom_utils.smpl import SMPL
from convert_to_uv_api import convert_to_uv_api
from models.upscaler import UpscalerBasicConv as Upscaler
from postprocessing import fix_collision
from models.pyramid_model_optimized import Pyramid
# from models.pyramid_model_optimized import Pyramid
# from configs.config_abl_overfit_dress_var_3 import config as config_main
from configs.config_abl_overfit_jumpsuit_2 import config as config_main
from configs.config_cvae_curv import config as config_curv
# from configs.config_abl_overfit_jumpsuit_2 import config as config_main
# from configs.config_cvae_curv import config as config_curv
# from configs.iccv.config_abl_all_skirt_var import config as config_main
# from configs.iccv.config_abl_all_skirt import config as config_main
from configs.iccv.config_abl_all import config as config_main
from configs.iccv.config_cvae_curv import config as config_curv
# from models.cvae_model_overfit_jumpsuit import CVAE
from models.cvae_model import CVAE
from models.cvae_model import CVAENew as CVAE
from models.cvae_curv_model import CVAE as CVAECurv
from convert_to_uv_api import convert_to_uv_api
from tensorflow_graphics.geometry.representation.mesh.normals import vertex_normals
@@ -287,45 +291,60 @@ def postprocess(mesh, body, faces, mask, do_smoothing=True):
return mesh
def sampling_example(frame, camera, nr=10):
def sampling_example(frame, camera, nr=15):
batch = get_temp_batch(frame, config_main)
mask = batch['mesh_mask'][0].numpy().astype(bool)
_, faces = _maskFaces(np.zeros((14475, 3)), F, mask)
noise = tf.random.normal(shape=(nr, 128))
out = model.sample(tf.tile(batch['uv_static'], [nr,1,1,1]), tf.tile(batch['uv_body_posed'], [nr,1,1,1]), tf.tile(batch['uv_curvature'], [nr,1,1,1]), tf.tile(batch['uv_mask'], [nr,1,1]), noise)
# out,_,_ = model([tf.tile(batch['uv_unposed'], [nr,1,1,1]), tf.tile(batch['uv_static'], [nr,1,1,1]), tf.tile(batch['uv_body_posed'], [nr,1,1,1]), tf.tile(batch['uv_curvature'], [nr,1,1,1]), tf.tile(batch['uv_mask'], [nr,1,1])], training=False)
# noise = tf.random.normal(shape=(nr, 8, 4, 128))
# out = model.sample(tf.tile(batch['uv_static'], [nr,1,1,1]), tf.tile(batch['uv_body_posed'], [nr,1,1,1]), tf.tile(batch['uv_curvature'], [nr,1,1,1]), tf.tile(batch['uv_mask'], [nr,1,1]), noise)
# # out,_,_ = model([tf.tile(batch['uv_unposed'], [nr,1,1,1]), tf.tile(batch['uv_static'], [nr,1,1,1]), tf.tile(batch['uv_body_posed'], [nr,1,1,1]), tf.tile(batch['uv_curvature'], [nr,1,1,1]), tf.tile(batch['uv_mask'], [nr,1,1])], training=False)
posed_mesh = [get_posed_mesh(uv, batch['pose_shape'], batch['mesh_body_posed'], mask) for uv in tf.unstack(out)]
# posed_mesh = [uv2mesh(uv[tf.newaxis,:,:,:]) for uv in tf.unstack(out)]
gt_mesh = batch['mesh_posed'][0].numpy()[mask, :]
# if config_main['use_skinning']:
# posed_mesh = [get_posed_mesh(uv, batch['pose_shape'], batch['mesh_body_posed'], mask) for uv in tf.unstack(out)]
# else:
# posed_mesh = [uv2mesh(uv[tf.newaxis,:,:,:]) for uv in tf.unstack(out)]
# gt_mesh = batch['mesh_posed'][0].numpy()[mask, :]
body = batch['mesh_body_posed'][0].numpy()
posed_mesh_fixed = [postprocess(mesh, body, faces, mask, do_smoothing=False) for mesh in posed_mesh]
# posed_mesh_fixed = [mesh[0].numpy()[mask, :] for mesh in posed_mesh]
# posed_mesh_fixed = [postprocess(mesh, body, faces, mask, do_smoothing=True) for mesh in posed_mesh]
# # posed_mesh_fixed = [mesh[0].numpy()[mask, :] for mesh in posed_mesh]
# error = [np.sqrt(((gt_mesh-m) ** 2).sum(-1)).mean() for m in posed_mesh_fixed]
# # error = [np.sqrt(((gt_mesh-m) ** 2).sum(-1)).mean() for m in posed_mesh_fixed]
# row_sampling = []
# fig = plot_fixed(gt_mesh, body, faces, camera)
# fig.write_image('/tmp/exp_temp_7.png')
# img = cv2.imread('/tmp/exp_temp_7.png')
# row_sampling.append(img[:, 100:700, :])
# for mesh in posed_mesh_fixed:
# fig = plot_fixed(mesh, body, faces, camera)
# fig.write_image('/tmp/exp_temp_7.png')
# img = cv2.imread('/tmp/exp_temp_7.png')
# row_sampling.append(img[:, 100:700, :])
# # row_sampling = []
# # fig = plot_fixed(gt_mesh, body, faces, camera)
# # fig.write_image('/tmp/exp_temp_7.png')
# # img = cv2.imread('/tmp/exp_temp_7.png')
# # row_sampling.append(img[:, 100:700, :])
# # for mesh in posed_mesh_fixed:
# # fig = plot_fixed(mesh, body, faces, camera)
# # fig.write_image('/tmp/exp_temp_7.png')
# # img = cv2.imread('/tmp/exp_temp_7.png')
# # row_sampling.append(img[:, 100:700, :])
# custom_imshow(np.concatenate(row_sampling, axis=1)).show()
# os.makedirs(os.path.join(out_folder, frame), exist_ok=True)
plot_fixed(np.zeros_like(gt_mesh), body, faces, camera).write_image(os.path.join(out_folder, frame + '_body.png'))
plot_fixed(gt_mesh, body, faces, camera).write_image(os.path.join(out_folder, frame + '_gt.png'))
for i in range(nr):
plot_fixed(posed_mesh_fixed[i], body, faces, camera).write_image(os.path.join(out_folder, frame + '_' + str(i) + '.png'))
# plot_fixed(np.zeros_like(gt_mesh), body, faces, camera).write_image(os.path.join(out_folder, frame, frame + '_body.png'))
# plot_fixed(gt_mesh, body, faces, camera).write_image(os.path.join(out_folder, frame, frame + '_gt.png'))
# for i in range(nr):
# plot_fixed(posed_mesh_fixed[i], body, faces, camera).write_image(os.path.join(out_folder, frame, frame + '_' + str(i) + '.png'))
# save_stl(os.path.join(out_folder, frame, frame + '_body.stl'), body, F_body)
# save_stl(os.path.join(out_folder, frame, frame + '_gt.stl'), gt_mesh, faces.astype(np.int32))
# for i in range(nr):
# save_stl(os.path.join(out_folder, frame, frame + '_' + str(i) + '.stl'), posed_mesh_fixed[i], faces.astype(np.int32))
# np.save(os.path.join(out_folder, frame, frame + '_gt.npy'), gt_mesh)
# np.save(os.path.join(out_folder, frame, frame + '_body.npy'), body)
# np.save(os.path.join(out_folder, frame, frame + '_faces.npy'), faces.astype(np.int32))
# for i in range(nr):
# np.save(os.path.join(out_folder, frame, frame + '_' + str(i) + '.npy'), posed_mesh_fixed[i])
save_stl(os.path.join(out_folder, frame + '_gt_body.stl'), body, F_body)
save_stl(os.path.join(out_folder, frame + '_posed_body.stl'), body, F_body)
# custom_imshow(np.concatenate(row_sampling, axis=1)).write_image(os.path.join(out_folder, frame + '_sampling.png'))
print()
@@ -401,25 +420,32 @@ def sampling_garment(frame, camera):
print()
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='')
parser.add_argument('--name', type=str)
args = vars(parser.parse_args())
smpl = SMPL()
F = np.load("custom_utils/smpl_faces.npy")
if config_main['is_skirt']:
F = np.load("custom_utils/smpl_faces_skirt.npy")
folder = os.path.join('/home/workspace/local-data_128/train_skirt')
else:
F = np.load("custom_utils/smpl_faces.npy")
folder = os.path.join('/home/workspace/local-data/train')
# F = np.load("custom_utils/smpl_faces_skirt.npy")
F_body = np.load("custom_utils/smpl_faces.npy")
# folder = os.path.join('/home/workspace/data/dataset', ('test_skirt_ready_2' if is_skirt else 'test_ready'))
# folder = os.path.join('/home/workspace/local-data/train_skirt')
folder = os.path.join('/home/workspace/local-data/train')
model = CVAE(config_main)
curv_model = CVAECurv(config_curv)
# curv_model = CVAECurv(config_curv)
load_model(model, 'checkpoints/' + config_main['name'])
load_model(curv_model, 'checkpoints/' + config_curv['name'])
load_model(model, 'checkpoints/iccv/' + config_main['name'])
# load_model(curv_model, 'checkpoints/iccv/' + config_curv['name'])
camera_1 = dict(up=dict(x=0, y=0, z=1), center=dict(x=0, y=0, z=-0.05), eye=dict(x=0.3, y=1.0, z=0.05))
# faces_folder = '/home/workspace/data/results/support/faces'
@@ -432,12 +458,12 @@ if __name__ == '__main__':
curv_frames = ['01763_259' , '007292_282']
static_frames = ['01763_259' , '007292_282']
with open('/home/workspace/local-data/train_skirt/frames_dress_30k.txt') as f:
frames = f.readlines()
# with open('/home/workspace/local-data/train_skirt/frames_dress_30k.txt') as f:
# frames = f.readlines()
random.shuffle(frames)
frames = [frame.strip() for frame in frames]
frames = frames[:150]
# random.shuffle(frames)
# frames = [frame.strip() for frame in frames]
# frames = frames[:150]
# input_batch = get_temp_batch(frame, config_main)
# _, faces = _maskFaces(np.zeros((14475, 3)), F, input_batch['mesh_mask'][0].numpy().astype(bool))
@@ -453,8 +479,17 @@ if __name__ == '__main__':
# camera_01082_109 = dict(up=dict(x=0.0, y=0, z=1), center=dict(x=-0.15, y=0, z=-0.05), eye=dict(x=0.9, y=0.8, z=-0.1))
# frame = '04925_272'
frames = ['01070_13']
out_folder = '/home/workspace/local-data/results/sampling_plots_jumpsuits'
# frames = ['01070_13', '02276_232', '02978_242', '04008_295', '04173_193']
# frames = ['00073_160', '00073_217', '00096_86', \
# '04347_100', '04360_2', '04404_41', '04442_85', '04466_59', '04620_68', '04620_129', \
# '04655_28', '04668_255', '04682_96', '04709_37', '06117_123', '06141_162']
# frames = ['00265_257', '04070_263', '00239_9', '04608_170', '04372_289', '00077_106', '00205_164', '00323_97', '00185_7', '00079_250', \
# '04143_56', '00240_136', '00185_33']
frames = ['009042_205', '009152_33', '010352_168', '012002_4', '03316_168', '03365_230']
out_folder = 'examples/qualitative/bodies3'
os.makedirs(out_folder, exist_ok=True)
for frame in tqdm.tqdm(frames):
sampling_example(frame, camera_1)
+3 -3
View File
@@ -1,5 +1,5 @@
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
@@ -36,10 +36,10 @@ from models.upscaler import UpscalerBasicConv as Upscaler
# !!!!!!!!!! CHANGE SKIRT OR NOT
low_res = 128
low_res = 256
is_skirt = False
is_cape = True
is_male = False
is_male = True
skirt_modifier = '_skirt' if is_skirt else ''
cape_modifier = '_cape' if is_cape else ''
gender_modifier = '' if not is_cape else ('_m' if is_male else '_f')