Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a6d8fa79a | ||
|
|
7b34f082cc | ||
|
|
8666d90312 |
+8
-72
@@ -23,11 +23,9 @@ 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" > 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_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_2.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_skirt" > nohup/iccv/ablation/abl_all_skirt.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" > 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_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 &
|
nohup python cvae.py --name="lhunor_abl_skin" > nohup/iccv/ablation/abl_skin.out 2>&1 &
|
||||||
@@ -41,10 +39,7 @@ 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_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.py --name="lhunor_abl_skin_var" > nohup/iccv/ablation/abl_skin_var.out 2>&1 &
|
||||||
|
|
||||||
nohup python evaluate_ae.py --name abl_all > nohup/iccv/evaluate/abl_all.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_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_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 &
|
nohup python upscale_test.py --name="iccv_64_2" > nohup/iccv/upscale/iccv_64_2.out 2>&1 &
|
||||||
@@ -75,26 +70,14 @@ 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_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" > 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_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_64" > nohup/iccv/pyr/iccv_pyr_32_64.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_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" > 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_skirt" > nohup/iccv/pyr/iccv_pyr_32_64_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" > 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_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" > 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_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_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_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 &
|
nohup python cvae_pyramid.py --name="lhunor_iccv_pyr_64_cape_m" > nohup/iccv/pyr/iccv_pyr_64_cape_m.out 2>&1 &
|
||||||
@@ -102,38 +85,16 @@ 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_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_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_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_32_64_128_pre_cape_f" > nohup/iccv/pyr/iccv_pyr_32_64_128_pre_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" > 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_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_2.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_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.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_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_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_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_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_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_seq" > nohup/iccv/pyr/iccv_pyr_32_64_128_256_seq.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 > 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 &
|
nohup python evaluate_ae_pyramid.py --name evaluate_ae_iccv_pyr_32_skirt > nohup/iccv/evaluate/iccv_pyr_32_skirt.out 2>&1 &
|
||||||
@@ -143,43 +104,18 @@ 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_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 > 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_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 > 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 > 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_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_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 > 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_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 > 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_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_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_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_seq > nohup/iccv/evaluate/iccv_pyr_32_64_128_256_seq.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 &
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+23
-53
@@ -1,37 +1,37 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from configs.iccv.config_abl_pyr_32_64_128_seq import config
|
from configs.iccv.config_abl_pyr_32_64_128_skirt import config
|
||||||
|
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
||||||
import tensorflow as tf
|
# import tensorflow as tf
|
||||||
|
|
||||||
gpus = tf.config.experimental.list_physical_devices('GPU')
|
# gpus = tf.config.experimental.list_physical_devices('GPU')
|
||||||
if gpus:
|
# if gpus:
|
||||||
try:
|
# try:
|
||||||
# Currently, memory growth needs to be the same across GPUs
|
# # Currently, memory growth needs to be the same across GPUs
|
||||||
for gpu in gpus:
|
# for gpu in gpus:
|
||||||
tf.config.experimental.set_memory_growth(gpu, True)
|
# tf.config.experimental.set_memory_growth(gpu, True)
|
||||||
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
|
# logical_gpus = tf.config.experimental.list_logical_devices('GPU')
|
||||||
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
|
# print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
|
||||||
except RuntimeError as e:
|
# except RuntimeError as e:
|
||||||
# Memory growth must be set before GPUs have been initialized
|
# # Memory growth must be set before GPUs have been initialized
|
||||||
print(e)
|
# print(e)
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
import glob
|
import glob
|
||||||
import time
|
import time
|
||||||
import argparse
|
import argparse
|
||||||
import wandb
|
import wandb
|
||||||
from tqdm import tqdm
|
import tqdm
|
||||||
import random
|
import random
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import plotly.graph_objects as go
|
import plotly.graph_objects as go
|
||||||
import plotly.express as ex
|
import plotly.express as ex
|
||||||
from losses import collision_loss, normal_loss
|
|
||||||
if config['is_skirt']:
|
# if config['is_skirt']:
|
||||||
from losses import edge_loss_skirt as edge_loss
|
# from losses import edge_loss_skirt as edge_loss
|
||||||
else:
|
# else:
|
||||||
from losses import edge_loss
|
# from losses import edge_loss
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -53,13 +53,9 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('--name', type=str)
|
parser.add_argument('--name', type=str)
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|
||||||
print(config['name'])
|
|
||||||
|
|
||||||
# smpl = SMPL(use_one_hot=config['use_one_hot'])
|
# smpl = SMPL(use_one_hot=config['use_one_hot'])
|
||||||
skirt_modifier = '_skirt' if config['is_skirt'] else ''
|
skirt_modifier = '_skirt' if config['is_skirt'] else ''
|
||||||
|
|
||||||
error_type = 'euclidean' # 'euclidean' 'collision' edge normal
|
|
||||||
|
|
||||||
folder = config['test_dir']
|
folder = config['test_dir']
|
||||||
|
|
||||||
checkpoint_name = config['name']
|
checkpoint_name = config['name']
|
||||||
@@ -72,7 +68,7 @@ if __name__ == '__main__':
|
|||||||
output_folder = '/home/workspace/local-data/results/iccv/' + checkpoint_name + '-'
|
output_folder = '/home/workspace/local-data/results/iccv/' + checkpoint_name + '-'
|
||||||
# check if there is a folder that starts with this name using glob
|
# check if there is a folder that starts with this name using glob
|
||||||
folders = glob.glob(output_folder + '*')
|
folders = glob.glob(output_folder + '*')
|
||||||
assert len(folders) == 1, f'There should be only one checkpoint that starts with this name, but found {len(folders)}'
|
assert len(folders) == 1, 'There should be only one checkpoint that starts with this name'
|
||||||
output_folder = folders[0]
|
output_folder = folders[0]
|
||||||
iteration = output_folder.split('-')[-1]
|
iteration = output_folder.split('-')[-1]
|
||||||
|
|
||||||
@@ -82,7 +78,6 @@ if __name__ == '__main__':
|
|||||||
# ids = [id.split('.')[0] for id in ids]
|
# ids = [id.split('.')[0] for id in ids]
|
||||||
# faces = {id : np.load(faces_folder + '/' + id + '.npy') 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'
|
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 = os.listdir(masks_folder)
|
||||||
ids = [id.split('.')[0] for id in ids]
|
ids = [id.split('.')[0] for id in ids]
|
||||||
@@ -90,11 +85,6 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
frames = os.listdir(output_folder)
|
frames = os.listdir(output_folder)
|
||||||
frames = [frame for frame in frames if not frame.endswith('_fixed_coll.npy')]
|
frames = [frame for frame in frames if not frame.endswith('_fixed_coll.npy')]
|
||||||
# frames = frames[:100]
|
|
||||||
|
|
||||||
# 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']:
|
if config['remove_global_orientation']:
|
||||||
gt_name = 'mesh_posed_no_orient'
|
gt_name = 'mesh_posed_no_orient'
|
||||||
@@ -109,32 +99,12 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
per_garment_errors = { 'Tshirt': [], 'Jumpsuit': [], 'Trousers': [], 'Top': [] }
|
per_garment_errors = { 'Tshirt': [], 'Jumpsuit': [], 'Trousers': [], 'Top': [] }
|
||||||
|
|
||||||
for frame in tqdm(frames):
|
for frame in tqdm.tqdm(frames):
|
||||||
id = frame.split('_')[0]
|
id = frame.split('_')[0]
|
||||||
frame_nr = frame.split('.')[0].split('_')[1]
|
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)
|
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'))
|
pred = np.load(os.path.join(output_folder, id + '_' + frame_nr + '.npy'))
|
||||||
if error_type == 'edge':
|
metric = np.mean(np.sqrt(np.sum((gt - pred) ** 2, axis=-1)))
|
||||||
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
|
errors[id + '_' + frame_nr] = metric
|
||||||
per_garment_errors[garment_type_table[id]].append(metric)
|
per_garment_errors[garment_type_table[id]].append(metric)
|
||||||
|
|
||||||
@@ -142,7 +112,7 @@ if __name__ == '__main__':
|
|||||||
for key in per_garment_errors.keys():
|
for key in per_garment_errors.keys():
|
||||||
print(key + ': ' + str(np.mean(per_garment_errors[key])))
|
print(key + ': ' + str(np.mean(per_garment_errors[key])))
|
||||||
|
|
||||||
with open(f'/home/workspace/data/results/errors/iccv/{checkpoint_name}-{iteration}-{error_type}.csv', mode='w') as f:
|
with open('/home/workspace/data/results/errors/iccv/' + checkpoint_name + '-' + iteration + '.csv', mode='w') as f:
|
||||||
file_writer = csv.writer(f, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
|
file_writer = csv.writer(f, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
|
||||||
|
|
||||||
for key in sorted(errors.keys()):
|
for key in sorted(errors.keys()):
|
||||||
|
|||||||
+12
-23
@@ -23,7 +23,7 @@ import numpy as np
|
|||||||
import trimesh as tm
|
import trimesh as tm
|
||||||
import plotly.express as ex
|
import plotly.express as ex
|
||||||
import plotly.graph_objects as go
|
import plotly.graph_objects as go
|
||||||
from custom_utils.custom_utils import _maskFaces, save_stl
|
from custom_utils.custom_utils import _maskFaces
|
||||||
from custom_utils.smpl import SMPL
|
from custom_utils.smpl import SMPL
|
||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
from scipy.spatial.transform import Rotation as R
|
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 = 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_cape_m = dict(reversed(sorted(errors_cape_m.items(), key=lambda item: item[1])))
|
||||||
|
|
||||||
errors_f = get_errors('temp/archive/error_abl_2_pyr_64_128_256_512_cape_f.txt')
|
errors_f = get_errors('temp/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')
|
errors_m = get_errors('temp/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_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'
|
folder_pyr_m = '/home/workspace/data/results/cape/abl_2_pyr_64_128_256_512_cape_m'
|
||||||
@@ -238,10 +238,9 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
|
|
||||||
_, faces = _maskFaces(np.zeros((3638, 3)), np.load('custom_utils/smpl_faces_orig.npy'), cape_mask)
|
_, 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
|
colors = np.ones((3627, 3), np.int8) * 230
|
||||||
|
|
||||||
gender = 'female'
|
gender = 'male'
|
||||||
|
|
||||||
if gender == 'male':
|
if gender == 'male':
|
||||||
folder_cape = folder_m
|
folder_cape = folder_m
|
||||||
@@ -263,18 +262,11 @@ if __name__ == '__main__':
|
|||||||
all_errors_1 = []
|
all_errors_1 = []
|
||||||
all_errors_2 = []
|
all_errors_2 = []
|
||||||
|
|
||||||
for key in tqdm.tqdm(errors_cape.keys()):
|
# for key in tqdm.tqdm(errors_cape.keys()):
|
||||||
# count = 0
|
count = 0
|
||||||
# while True:
|
while True:
|
||||||
if os.path.exists(f'temp/cape_stl/{key}_gt.stl'):
|
key = random.choice(list(errors_cape.keys()))
|
||||||
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, :]
|
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)
|
cape = add_global_orientation(cape, key, pose_folder, inverse=True)
|
||||||
if not os.path.exists(os.path.join(folder, key + '_posed.npy')):
|
if not os.path.exists(os.path.join(folder, key + '_posed.npy')):
|
||||||
continue
|
continue
|
||||||
@@ -292,13 +284,10 @@ if __name__ == '__main__':
|
|||||||
# print(np.mean(all_errors_1))
|
# print(np.mean(all_errors_1))
|
||||||
# print(np.mean(all_errors_2))
|
# print(np.mean(all_errors_2))
|
||||||
|
|
||||||
# fig = plot_fixed_all(gt, cape, ours, errors_cape[key], errors[key], faces, colors)
|
fig = plot_fixed_all(gt, cape, ours, errors_cape[key], errors[key], faces, colors)
|
||||||
# fig.write_image('temp/cape_2/' + key + '.png')
|
fig.write_image('temp/cape/' + 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)
|
print(count)
|
||||||
# count += 1
|
count += 1
|
||||||
|
|
||||||
print()
|
print()
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -35,9 +35,9 @@ config['is_skirt'] = False
|
|||||||
config['dataset_in_memory'] = False
|
config['dataset_in_memory'] = False
|
||||||
config['is_cape'] = False
|
config['is_cape'] = False
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data_127/train'
|
config['train_dir'] = '/home/workspace/local-data/train'
|
||||||
config['valid_dir'] = '/home/workspace/local-data/valid'
|
config['valid_dir'] = '/home/workspace/local-data/valid'
|
||||||
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
config['test_dir'] = '/home/workspace/data/dataset/test_ready'
|
||||||
|
|
||||||
config['static_model'] = 'checkpoints/iccv/static_iccv_1'
|
config['static_model'] = 'checkpoints/iccv/static_iccv_1'
|
||||||
config['body_model'] = 'checkpoints/iccv/body_iccv_1'
|
config['body_model'] = 'checkpoints/iccv/body_iccv_1'
|
||||||
|
|||||||
@@ -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)
|
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
|
assert ablation_count == 1 or ablation_count == 0
|
||||||
|
|
||||||
config['gpu'] = '2'
|
config['gpu'] = '6'
|
||||||
config['name'] = 'abl_all_cape_f_2'
|
config['name'] = 'abl_all_cape_f'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['iccv', 'abl_all']
|
config['tags'] = ['iccv', 'abl_all']
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ if config['is_cape']:
|
|||||||
|
|
||||||
config['latent_dim'] = 128
|
config['latent_dim'] = 128
|
||||||
|
|
||||||
config['pretrained_model'] = 'checkpoints/iccv/abl_all_cape_f'
|
config['pretrained_model'] = ''
|
||||||
|
|
||||||
###############
|
###############
|
||||||
config['lr'] = 0.0001# 0.0001
|
config['lr'] = 0.0001# 0.0001
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -37,7 +37,7 @@ config['is_cape'] = False
|
|||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data/train_skirt'
|
config['train_dir'] = '/home/workspace/local-data/train_skirt'
|
||||||
config['valid_dir'] = '/home/workspace/local-data_127/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['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2'
|
||||||
|
|
||||||
config['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
|
config['static_model'] = 'checkpoints/iccv/static_iccv_1_skirt'
|
||||||
config['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
|
config['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
|
||||||
|
|||||||
@@ -1,125 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -33,7 +33,6 @@ config['pyramid']['final_upscale_enhancer'] = ''
|
|||||||
config['train_dir'] = '/home/workspace/local-data/train'
|
config['train_dir'] = '/home/workspace/local-data/train'
|
||||||
config['valid_dir'] = '/home/workspace/local-data/valid'
|
config['valid_dir'] = '/home/workspace/local-data/valid'
|
||||||
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
||||||
|
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = False
|
config['is_skirt'] = False
|
||||||
config['is_cape'] = False
|
config['is_cape'] = False
|
||||||
@@ -94,10 +93,11 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 512
|
level['resolution'] = 512
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 7
|
level['kernel_size'] = 7
|
||||||
level['encoder_depths'] = [3, 3, 3, 9, 3]
|
level['encoder_depths'] = [3, 3, 9, 3]
|
||||||
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (16, 8, 80)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [3, 3, 9, 3]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = ''
|
level['upscale_enhancer'] = ''
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
@@ -106,12 +106,13 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 256
|
level['resolution'] = 256
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [3, 3, 9, 3]
|
level['encoder_depths'] = [9, 9, 9, 9]
|
||||||
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (8, 4, 128)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [9, 9, 9, 9]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2'#'checkpoints/up_3_d256_512_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 128:
|
elif res == 128:
|
||||||
@@ -119,12 +120,13 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 128
|
level['resolution'] = 128
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [9, 9, 9]
|
level['encoder_depths'] = [16, 9, 9, 9]
|
||||||
level['encoder_dims'] = [128, 128, level['latent_dim']]
|
level['encoder_dims'] = [64, 128, 128, 64]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (4, 2, 128)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [16, 9, 9, 9]
|
||||||
|
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2'#'checkpoints/up_3_d128_256_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 64:
|
elif res == 64:
|
||||||
@@ -137,7 +139,7 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_depths'] = level['encoder_depths']
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_dims'] = level['encoder_dims']
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_64_2'#checkpoints/up_3_d64_128_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#checkpoints/up_3_d64_128_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 32:
|
elif res == 32:
|
||||||
|
|||||||
@@ -1,189 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,189 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,189 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '1'
|
config['gpu'] = '3'
|
||||||
config['name'] = 'iccv_pyr_32_64_128_256_2'
|
config['name'] = 'iccv_pyr_32_64_128_256'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv']
|
config['tags'] = ['pyr', 'iccv']
|
||||||
|
|
||||||
@@ -22,13 +22,13 @@ config['use_offsets'] = False
|
|||||||
config['use_norm_loss'] = True
|
config['use_norm_loss'] = True
|
||||||
config['use_curvature'] = True
|
config['use_curvature'] = True
|
||||||
|
|
||||||
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256'
|
config['pretrained_model'] = ''
|
||||||
config['pretrained_model_iteration'] = ''
|
config['pretrained_model_iteration'] = ''
|
||||||
|
|
||||||
config['pyramid'] = dict()
|
config['pyramid'] = dict()
|
||||||
config['pyramid']['resolutions'] = [32, 64, 128, 256]
|
config['pyramid']['resolutions'] = [32, 64, 128, 256]
|
||||||
config['pyramid']['pretrained_pyramid'] = ''
|
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_2'
|
||||||
config['pyramid']['pretrained_pyramid_iteration'] = ''
|
config['pyramid']['pretrained_pyramid_iteration'] = '125000'
|
||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data/train'
|
config['train_dir'] = '/home/workspace/local-data/train'
|
||||||
|
|||||||
@@ -1,189 +0,0 @@
|
|||||||
config = dict()
|
|
||||||
|
|
||||||
config['gpu'] = '4'
|
|
||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,195 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
config = dict()
|
|
||||||
|
|
||||||
config['gpu'] = '4'
|
|
||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
config = dict()
|
|
||||||
|
|
||||||
config['gpu'] = '3'
|
|
||||||
config['name'] = 'iccv_pyr_32_64_128_256_seq_2'
|
|
||||||
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]
|
|
||||||
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_seq_2'
|
|
||||||
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),
|
|
||||||
}
|
|
||||||
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'
|
|
||||||
@@ -1,195 +0,0 @@
|
|||||||
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 = dict()
|
||||||
|
|
||||||
config['gpu'] = '3'
|
config['gpu'] = '0'
|
||||||
config['name'] = 'iccv_pyr_32_64_128_256_skirt_2'
|
config['name'] = 'iccv_pyr_32_64_128_256_skirt'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv']
|
config['tags'] = ['pyr', 'iccv']
|
||||||
|
|
||||||
@@ -22,13 +22,13 @@ config['use_offsets'] = False
|
|||||||
config['use_norm_loss'] = True
|
config['use_norm_loss'] = True
|
||||||
config['use_curvature'] = True
|
config['use_curvature'] = True
|
||||||
|
|
||||||
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_256_skirt'
|
config['pretrained_model'] = ''
|
||||||
config['pretrained_model_iteration'] = ''
|
config['pretrained_model_iteration'] = ''
|
||||||
|
|
||||||
config['pyramid'] = dict()
|
config['pyramid'] = dict()
|
||||||
config['pyramid']['resolutions'] = [32, 64, 128, 256]
|
config['pyramid']['resolutions'] = [32, 64, 128, 256]
|
||||||
config['pyramid']['pretrained_pyramid'] = ''
|
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_128_skirt'
|
||||||
config['pyramid']['pretrained_pyramid_iteration'] = ''
|
config['pyramid']['pretrained_pyramid_iteration'] = '175000'
|
||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
|
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
|
||||||
@@ -94,10 +94,11 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 512
|
level['resolution'] = 512
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 7
|
level['kernel_size'] = 7
|
||||||
level['encoder_depths'] = [3, 3, 3, 9, 3]
|
level['encoder_depths'] = [3, 3, 9, 3]
|
||||||
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (16, 8, 80)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [3, 3, 9, 3]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = ''
|
level['upscale_enhancer'] = ''
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
|
|||||||
@@ -1,189 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
+10
-13
@@ -1,8 +1,8 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '1'
|
config['gpu'] = '2'
|
||||||
config['name'] = 'iccv_pyr_64_128_cape_f_03223_SS'
|
config['name'] = 'iccv_pyr_32_64_128_pre_cape_f_2'
|
||||||
config['notes'] = ''
|
config['notes'] = 'load pretrained on cloth3d'
|
||||||
config['tags'] = ['pyr', 'iccv', 'cape_f']
|
config['tags'] = ['pyr', 'iccv', 'cape_f']
|
||||||
|
|
||||||
# DON'T FORGET TO RESET SSIM LOSS USAGE
|
# DON'T FORGET TO RESET SSIM LOSS USAGE
|
||||||
@@ -22,23 +22,20 @@ config['use_offsets'] = False
|
|||||||
config['use_norm_loss'] = True
|
config['use_norm_loss'] = True
|
||||||
config['use_curvature'] = True
|
config['use_curvature'] = True
|
||||||
|
|
||||||
config['pretrained_model'] = ''
|
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128'
|
||||||
config['pretrained_model_iteration'] = ''
|
config['pretrained_model_iteration'] = ''
|
||||||
|
|
||||||
config['pyramid'] = dict()
|
config['pyramid'] = dict()
|
||||||
config['pyramid']['resolutions'] = [64, 128]
|
config['pyramid']['resolutions'] = [32, 64, 128]
|
||||||
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_64_cape_f_03223_SS'
|
config['pyramid']['pretrained_pyramid'] = ''
|
||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female'
|
config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female'
|
||||||
config['valid_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/train/female'
|
config['test_dir'] = '/home/workspace/local-data_127/cape_processed/test/female'
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = False
|
config['is_skirt'] = False
|
||||||
config['is_cape'] = True
|
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['dataset_in_memory'] = False
|
||||||
config['resolution'] = None
|
config['resolution'] = None
|
||||||
@@ -47,7 +44,7 @@ config['smpl_res'] = 14475
|
|||||||
if config['is_cape']:
|
if config['is_cape']:
|
||||||
config['smpl_res'] = 3638
|
config['smpl_res'] = 3638
|
||||||
|
|
||||||
config['lr'] = 0.0001
|
config['lr'] = 0.00001
|
||||||
config['starting_balancing_coeff'] = 0.001
|
config['starting_balancing_coeff'] = 0.001
|
||||||
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
|
config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision
|
||||||
config['avg_garment_path'] = ''
|
config['avg_garment_path'] = ''
|
||||||
@@ -124,7 +121,7 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [9, 9, 9]
|
level['encoder_depths'] = [9, 9, 9]
|
||||||
level['encoder_dims'] = [64, 128, level['latent_dim']]
|
level['encoder_dims'] = [128, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_depths'] = level['encoder_depths']
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_dims'] = level['encoder_dims']
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '0'
|
config['gpu'] = '4'
|
||||||
config['name'] = 'iccv_pyr_32_64_128_reg_2'
|
config['name'] = 'iccv_pyr_32_64_128_reg'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv', 'reg']
|
config['tags'] = ['pyr', 'iccv', 'reg']
|
||||||
|
|
||||||
@@ -22,17 +22,17 @@ config['use_offsets'] = False
|
|||||||
config['use_norm_loss'] = False
|
config['use_norm_loss'] = False
|
||||||
config['use_curvature'] = True
|
config['use_curvature'] = True
|
||||||
|
|
||||||
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_reg'
|
config['pretrained_model'] = ''
|
||||||
config['pretrained_model_iteration'] = ''
|
config['pretrained_model_iteration'] = ''
|
||||||
|
|
||||||
config['pyramid'] = dict()
|
config['pyramid'] = dict()
|
||||||
config['pyramid']['resolutions'] = [32, 64, 128]
|
config['pyramid']['resolutions'] = [32, 64, 128]
|
||||||
config['pyramid']['pretrained_pyramid'] = ''
|
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_reg'
|
||||||
config['pyramid']['pretrained_pyramid_iteration'] = ''
|
config['pyramid']['pretrained_pyramid_iteration'] = '120000'
|
||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data_127/train'
|
config['train_dir'] = '/home/workspace/local-data/train'
|
||||||
config['valid_dir'] = '/home/workspace/local-data_127/valid'
|
config['valid_dir'] = '/home/workspace/local-data/valid'
|
||||||
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = False
|
config['is_skirt'] = False
|
||||||
|
|||||||
@@ -1,187 +0,0 @@
|
|||||||
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,187 +0,0 @@
|
|||||||
config = dict()
|
|
||||||
|
|
||||||
config['gpu'] = '1'
|
|
||||||
config['name'] = 'iccv_pyr_32_64_128_seq_2'
|
|
||||||
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_seq_2'
|
|
||||||
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),
|
|
||||||
}
|
|
||||||
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'
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '4'
|
config['gpu'] = '5'
|
||||||
config['name'] = 'iccv_pyr_32_64_128_skin_2'
|
config['name'] = 'iccv_pyr_32_64_128_skin'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv']
|
config['tags'] = ['pyr', 'iccv']
|
||||||
|
|
||||||
@@ -22,17 +22,17 @@ config['use_offsets'] = False
|
|||||||
config['use_norm_loss'] = True
|
config['use_norm_loss'] = True
|
||||||
config['use_curvature'] = True
|
config['use_curvature'] = True
|
||||||
|
|
||||||
config['pretrained_model'] = 'checkpoints/iccv/iccv_pyr_32_64_128_skin'
|
config['pretrained_model'] = ''
|
||||||
config['pretrained_model_iteration'] = ''
|
config['pretrained_model_iteration'] = ''
|
||||||
|
|
||||||
config['pyramid'] = dict()
|
config['pyramid'] = dict()
|
||||||
config['pyramid']['resolutions'] = [32, 64, 128]
|
config['pyramid']['resolutions'] = [32, 64, 128]
|
||||||
config['pyramid']['pretrained_pyramid'] = ''
|
config['pyramid']['pretrained_pyramid'] = 'checkpoints/iccv/iccv_pyr_32_64_skin'
|
||||||
config['pyramid']['pretrained_pyramid_iteration'] = ''
|
config['pyramid']['pretrained_pyramid_iteration'] = '130000'
|
||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
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['valid_dir'] = '/home/workspace/local-data_127/valid'
|
||||||
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = False
|
config['is_skirt'] = False
|
||||||
|
|||||||
@@ -1,193 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,189 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -86,6 +86,7 @@ config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
|
|||||||
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
|
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
|
||||||
config['pyramid']['freeze_encoders'] = True
|
config['pyramid']['freeze_encoders'] = True
|
||||||
|
|
||||||
|
|
||||||
config['pyramid']['levels'] = []
|
config['pyramid']['levels'] = []
|
||||||
for res in config['pyramid']['resolutions']:
|
for res in config['pyramid']['resolutions']:
|
||||||
if res == 512:
|
if res == 512:
|
||||||
@@ -93,10 +94,11 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 512
|
level['resolution'] = 512
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 7
|
level['kernel_size'] = 7
|
||||||
level['encoder_depths'] = [3, 3, 3, 9, 3]
|
level['encoder_depths'] = [3, 3, 9, 3]
|
||||||
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (16, 8, 80)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [3, 3, 9, 3]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = ''
|
level['upscale_enhancer'] = ''
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
@@ -105,12 +107,13 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 256
|
level['resolution'] = 256
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [3, 3, 9, 3]
|
level['encoder_depths'] = [9, 9, 9, 9]
|
||||||
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (8, 4, 128)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [9, 9, 9, 9]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 128:
|
elif res == 128:
|
||||||
@@ -118,12 +121,13 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 128
|
level['resolution'] = 128
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [9, 9, 9]
|
level['encoder_depths'] = [16, 9, 9, 9]
|
||||||
level['encoder_dims'] = [64, 128, level['latent_dim']]
|
level['encoder_dims'] = [64, 128, 128, 64]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (4, 2, 128)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [16, 9, 9, 9]
|
||||||
|
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 64:
|
elif res == 64:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '3'
|
config['gpu'] = '1'
|
||||||
config['name'] = 'iccv_pyr_32_64_reg'
|
config['name'] = 'iccv_pyr_32_64_reg'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv', 'reg']
|
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']['pretrained_pyramid_iteration'] = '150000'
|
||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data_127/train'
|
config['train_dir'] = '/home/workspace/local-data/train'
|
||||||
config['valid_dir'] = '/home/workspace/local-data_127/valid'
|
config['valid_dir'] = '/home/workspace/local-data/valid'
|
||||||
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
config['test_dir'] = '/home/workspace/local-data_127/test_ready'
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = False
|
config['is_skirt'] = False
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '3'
|
config['gpu'] = '2'
|
||||||
config['name'] = 'iccv_pyr_32_64_reg_skirt'
|
config['name'] = 'iccv_pyr_32_64_reg_skirt'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv', 'reg']
|
config['tags'] = ['pyr', 'iccv', 'reg']
|
||||||
@@ -32,7 +32,7 @@ config['pyramid']['pretrained_pyramid_iteration'] = '190000'
|
|||||||
config['pyramid']['final_upscale_enhancer'] = ''
|
config['pyramid']['final_upscale_enhancer'] = ''
|
||||||
|
|
||||||
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
|
config['train_dir'] = '/home/workspace/local-data_128/train_skirt'
|
||||||
config['valid_dir'] = '/home/workspace/local-data_127/valid_skirt'
|
config['valid_dir'] = '/home/workspace/local-data/valid_skirt'
|
||||||
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
|
config['test_dir'] = '/home/workspace/local-data_128/test_skirt_ready_2'
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = True
|
config['is_skirt'] = True
|
||||||
@@ -86,6 +86,7 @@ config['pyramid']['body_model'] = 'checkpoints/iccv/body_iccv_1_skirt'
|
|||||||
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
|
config['pyramid']['curvature_model'] = 'checkpoints/iccv/curv_iccv_1_skirt'
|
||||||
config['pyramid']['freeze_encoders'] = True
|
config['pyramid']['freeze_encoders'] = True
|
||||||
|
|
||||||
|
|
||||||
config['pyramid']['levels'] = []
|
config['pyramid']['levels'] = []
|
||||||
for res in config['pyramid']['resolutions']:
|
for res in config['pyramid']['resolutions']:
|
||||||
if res == 512:
|
if res == 512:
|
||||||
@@ -93,10 +94,11 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 512
|
level['resolution'] = 512
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 7
|
level['kernel_size'] = 7
|
||||||
level['encoder_depths'] = [3, 3, 3, 9, 3]
|
level['encoder_depths'] = [3, 3, 9, 3]
|
||||||
level['encoder_dims'] = [16, 32, 64, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (16, 8, 80)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [3, 3, 9, 3]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = ''
|
level['upscale_enhancer'] = ''
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
@@ -105,12 +107,13 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 256
|
level['resolution'] = 256
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [3, 3, 9, 3]
|
level['encoder_depths'] = [9, 9, 9, 9]
|
||||||
level['encoder_dims'] = [64, 128, 128, level['latent_dim']]
|
level['encoder_dims'] = [32, 64, 128, level['latent_dim']]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (8, 4, 128)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [9, 9, 9, 9]
|
||||||
|
level['decoder_dims'] = [256, 128, 64, 16]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_256_2_skirt'#'checkpoints/up_3_d256_512_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d256_512_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 128:
|
elif res == 128:
|
||||||
@@ -118,12 +121,13 @@ for res in config['pyramid']['resolutions']:
|
|||||||
level['resolution'] = 128
|
level['resolution'] = 128
|
||||||
level['latent_dim'] = 64 * config['bottleneck_scale']
|
level['latent_dim'] = 64 * config['bottleneck_scale']
|
||||||
level['kernel_size'] = 5
|
level['kernel_size'] = 5
|
||||||
level['encoder_depths'] = [9, 9, 9]
|
level['encoder_depths'] = [16, 9, 9, 9]
|
||||||
level['encoder_dims'] = [64, 128, level['latent_dim']]
|
level['encoder_dims'] = [64, 128, 128, 64]
|
||||||
level['decoder_depths'] = level['encoder_depths']
|
level['decoder_input'] = (4, 2, 128)
|
||||||
level['decoder_dims'] = level['encoder_dims']
|
level['decoder_depths'] = [16, 9, 9, 9]
|
||||||
|
level['decoder_dims'] = [256, 128, 128, level['latent_dim']]
|
||||||
level['avg_garment_path'] = ''
|
level['avg_garment_path'] = ''
|
||||||
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_128_2_skirt'#'checkpoints/up_3_d128_256_2'
|
level['upscale_enhancer'] = 'checkpoints/iccv/iccv_'#'checkpoints/up_3_d128_256_2'
|
||||||
level['upscale_enhancer_freeze'] = True
|
level['upscale_enhancer_freeze'] = True
|
||||||
config['pyramid']['levels'].append(level)
|
config['pyramid']['levels'].append(level)
|
||||||
elif res == 64:
|
elif res == 64:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
config = dict()
|
config = dict()
|
||||||
|
|
||||||
config['gpu'] = '2'
|
config['gpu'] = '1'
|
||||||
config['name'] = 'iccv_pyr_32_64_skin'
|
config['name'] = 'iccv_pyr_32_64_skin'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['pyr', 'iccv']
|
config['tags'] = ['pyr', 'iccv']
|
||||||
|
|||||||
@@ -1,193 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,190 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
config = dict()
|
|
||||||
|
|
||||||
config['gpu'] = '4'
|
|
||||||
config['name'] = 'iccv_pyr_32_seq_2'
|
|
||||||
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'
|
|
||||||
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),
|
|
||||||
}
|
|
||||||
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'
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,190 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,190 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,190 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,191 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
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'
|
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
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['train_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
|
||||||
config['valid_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/cape_processed/train/male'
|
config['test_dir'] = '/home/workspace/local-data_127/cape_processed/train/male'
|
||||||
config['batch_size'] = 4
|
config['batch_size'] = 4
|
||||||
config['is_skirt'] = False
|
config['is_skirt'] = False
|
||||||
config['is_cape'] = True
|
config['is_cape'] = True
|
||||||
|
|||||||
@@ -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)
|
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
|
assert ablation_count == 1 or ablation_count == 0
|
||||||
|
|
||||||
config['gpu'] = '0'
|
config['gpu'] = '5'
|
||||||
config['name'] = 'cvae_curv_3'
|
config['name'] = 'cvae_curv'
|
||||||
config['notes'] = ''
|
config['notes'] = ''
|
||||||
config['tags'] = ['iccv', 'cvae_curv']
|
config['tags'] = ['iccv', 'cvae_curv']
|
||||||
|
|
||||||
@@ -35,9 +35,9 @@ config['is_skirt'] = False
|
|||||||
config['dataset_in_memory'] = False
|
config['dataset_in_memory'] = False
|
||||||
config['is_cape'] = 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['valid_dir'] = '/home/workspace/local-data_127/valid'
|
||||||
config['test_dir'] = '/home/workspace/local-data/test_ready'
|
config['test_dir'] = '/home/workspace/data/dataset/test_ready'
|
||||||
|
|
||||||
config['static_model'] = 'checkpoints/iccv/static_iccv_1'
|
config['static_model'] = 'checkpoints/iccv/static_iccv_1'
|
||||||
config['body_model'] = 'checkpoints/iccv/body_iccv_1'
|
config['body_model'] = 'checkpoints/iccv/body_iccv_1'
|
||||||
@@ -50,13 +50,12 @@ if config['is_cape']:
|
|||||||
|
|
||||||
config['latent_dim'] = 128
|
config['latent_dim'] = 128
|
||||||
|
|
||||||
config['pretrained_model'] = 'checkpoints/iccv/cvae_curv'
|
config['pretrained_model'] = ''
|
||||||
config['pretrained_model_iteration'] = ''
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
config['lr'] = 0.0001# 0.0001
|
config['lr'] = 0.0001# 0.0001
|
||||||
###############
|
###############
|
||||||
config['starting_balancing_coeff'] = 1.0
|
config['starting_balancing_coeff'] = 0.01
|
||||||
|
|
||||||
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
|
config['signature_dynamic'] = { 'id': (), 'frame_nr': (),
|
||||||
'pose_shape': (72 + 11,),
|
'pose_shape': (72 + 11,),
|
||||||
|
|||||||
@@ -1,381 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -443,13 +443,3 @@ def save_stl(file, mesh, faces):
|
|||||||
obj.vectors[i][j] = mesh[f[j],:]
|
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.
@@ -1,8 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from configs.iccv.config_abl_all_skirt_var import config
|
from configs.iccv.config_abl_all_cape_f import config
|
||||||
|
|
||||||
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
|
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
@@ -480,7 +479,7 @@ def test():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# init_wandb()
|
init_wandb()
|
||||||
parser = argparse.ArgumentParser(description='')
|
parser = argparse.ArgumentParser(description='')
|
||||||
parser.add_argument('--name', type=str)
|
parser.add_argument('--name', type=str)
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|||||||
+81
-47
@@ -153,11 +153,11 @@ def dice_dense(prediction, ground_truth, weight_map=None):
|
|||||||
return tf.reduce_mean(dice_score)
|
return tf.reduce_mean(dice_score)
|
||||||
|
|
||||||
|
|
||||||
@tf.function
|
# @tf.function
|
||||||
def train_step(batch):
|
def train_step(batch):
|
||||||
with tf.GradientTape() as tape:
|
with tf.GradientTape() as tape:
|
||||||
|
|
||||||
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=True)
|
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
|
||||||
|
|
||||||
ce_uv_loss = scce(tf.math.argmax(batch['uv_curvature'], axis=-1), pred)
|
ce_uv_loss = scce(tf.math.argmax(batch['uv_curvature'], axis=-1), pred)
|
||||||
dice = dice_dense(pred, batch['uv_curvature'])
|
dice = dice_dense(pred, batch['uv_curvature'])
|
||||||
@@ -189,7 +189,7 @@ def train_step(batch):
|
|||||||
|
|
||||||
@tf.function
|
@tf.function
|
||||||
def valid_step(batch):
|
def valid_step(batch):
|
||||||
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=False)
|
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
|
||||||
|
|
||||||
ce_uv_loss = scce(tf.math.argmax(batch['uv_curvature'], axis=-1), pred)
|
ce_uv_loss = scce(tf.math.argmax(batch['uv_curvature'], axis=-1), pred)
|
||||||
loss = ce_uv_loss
|
loss = ce_uv_loss
|
||||||
@@ -216,7 +216,7 @@ def valid_step(batch):
|
|||||||
|
|
||||||
|
|
||||||
def plot_everything(batch: dict, type: str):
|
def plot_everything(batch: dict, type: str):
|
||||||
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=False)
|
pred, mean, logvar = model([batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']])
|
||||||
|
|
||||||
pred = np.argmax(pred.numpy(), axis=-1)
|
pred = np.argmax(pred.numpy(), axis=-1)
|
||||||
mesh_pred = uv2mesh(pred)
|
mesh_pred = uv2mesh(pred)
|
||||||
@@ -251,54 +251,90 @@ def plot_everything(batch: dict, type: str):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def sample():
|
def sample(folder):
|
||||||
iteration = load_model(model, f'checkpoints/iccv/cvae_curv_3', return_iteration=True)
|
load_model(model,folder)
|
||||||
for batch in dataset_train:
|
for batch in dataset_train:
|
||||||
batch = static_dataset_train.expand_batch(batch_to_dict(batch, config['signature_dynamic']))
|
batch = static_dataset_train.expand_batch(batch_to_dict(batch, signature_dynamic))
|
||||||
nr_of_samples = 4
|
uv_curvature = tf.one_hot(batch['uv_curvature'], 7)
|
||||||
|
nr_of_samples = 16
|
||||||
|
|
||||||
for i in range(4):
|
# pred = model.sample(batch['uv_static'], batch['uv_body_posed'], batch['uv_mask'])
|
||||||
# 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_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)
|
ce_uv_loss = scce(tf.tile(batch['uv_curvature'][0][tf.newaxis,:,:], [nr_of_samples,1,1]), pred)
|
||||||
pred_img = np.argmax(pred.numpy(), axis=-1)
|
|
||||||
img = np.concatenate((orig_img, np.concatenate(pred_img, axis=1)), axis=1)
|
|
||||||
|
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)
|
||||||
|
|
||||||
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()
|
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__':
|
if __name__ == '__main__':
|
||||||
# init_wandb()
|
init_wandb()
|
||||||
parser = argparse.ArgumentParser(description='')
|
parser = argparse.ArgumentParser(description='')
|
||||||
parser.add_argument('--name', type=str)
|
parser.add_argument('--name', type=str)
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
@@ -336,8 +372,6 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
model = CVAE(config)
|
model = CVAE(config)
|
||||||
|
|
||||||
sample()
|
|
||||||
|
|
||||||
# lr_schedule = tf.keras.optimizers.schedules.ExponentialDecay(0.0001, decay_steps=30000, decay_rate=0.1, staircase=False)
|
# 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
|
optimizer = tf.optimizers.Adam(learning_rate=config['lr']) #0.0001
|
||||||
g_balancing_coeff = config['starting_balancing_coeff']
|
g_balancing_coeff = config['starting_balancing_coeff']
|
||||||
|
|||||||
+130
-144
@@ -1,8 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from configs.iccv.config_abl_pyr_32_tshirt import config
|
from configs.iccv.config_abl_pyr_32_64_128_pre_cape_f import config
|
||||||
|
|
||||||
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
|
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
@@ -221,20 +220,104 @@ def train_step(batch):
|
|||||||
out_levels = model([levels_input, conds], training=True)
|
out_levels = model([levels_input, conds], training=True)
|
||||||
|
|
||||||
if config['use_skinning']:
|
if config['use_skinning']:
|
||||||
mesh_orig, uv_orig = batch['mesh_unposed'], batch['uv_unposed']
|
mesh_orig = batch['mesh_unposed']
|
||||||
else:
|
else:
|
||||||
mesh_orig, uv_orig = batch['mesh_posed'], batch['uv_posed']
|
mesh_orig = batch['mesh_posed']
|
||||||
|
|
||||||
output = dict()
|
output = dict()
|
||||||
reconstr_loss_total = 0
|
reconstr_loss_total = 0
|
||||||
kl_total = 0
|
kl_total = 0
|
||||||
|
|
||||||
#for i, res in enumerate(config['pyramid']['resolutions']):
|
for i, res in enumerate(config['pyramid']['resolutions']):
|
||||||
i = -1
|
# i = -1
|
||||||
res = config['pyramid']['resolutions'][-1]
|
res = config['pyramid']['resolutions'][i] if i != len(config['pyramid']['resolutions']) - 1 else 512
|
||||||
|
res_modifier = '_' + str(res) if res != 512 else ''
|
||||||
|
pred, mean, logvar = out_levels[i]
|
||||||
|
|
||||||
|
if config['use_skinning']:
|
||||||
|
uv_orig = batch['uv_unposed' + res_modifier]
|
||||||
|
else:
|
||||||
|
uv_orig = batch['uv_posed' + res_modifier]
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# is the output already masked?
|
||||||
|
|
||||||
|
e_loss = tf.reduce_mean(edge_loss(mesh_pred, mesh_orig, batch['mesh_mask']))
|
||||||
|
c_loss, c_ratio = collision_penalty(mesh_pred_posed, batch['mesh_body_posed'], batch['mesh_mask'])
|
||||||
|
c_loss, c_ratio = tf.reduce_mean(c_loss), tf.reduce_mean(c_ratio)
|
||||||
|
l2_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(((uv_orig - pred) ** 2), axis=-1) * batch['uv_mask' + res_modifier], axis=[1, 2]))
|
||||||
|
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 5, batch['uv_unposed'] + 5, max_val=10, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
||||||
|
# ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_unposed'] + 1, max_val=3))
|
||||||
|
l2_mesh_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (batch['mesh_posed'] - mesh_pred_posed) ** 2, axis=-1), axis=-1))
|
||||||
|
n_loss = normal_loss(mesh_pred_posed, batch['mesh_posed'], batch['mesh_mask'], is_skirt=config['is_skirt'])
|
||||||
|
kl = kl_loss(mean, logvar)
|
||||||
|
|
||||||
|
if config['use_extra_losses']:
|
||||||
|
reconstr_loss_total = reconstr_loss_total + config['pyramid']['loss_weights'][i] * (l2_loss + l2_mesh_loss)
|
||||||
|
if not config['is_cape']:
|
||||||
|
reconstr_loss_total = reconstr_loss_total + config['pyramid']['loss_weights'][i] * (e_loss + c_loss) * config['reg_loss_coeff']
|
||||||
|
else:
|
||||||
|
reconstr_loss_total = reconstr_loss_total + config['pyramid']['loss_weights'][i] * (l2_loss)
|
||||||
|
|
||||||
|
if config['use_norm_loss'] and step > 2000:
|
||||||
|
reconstr_loss_total = reconstr_loss_total + n_loss * config['reg_loss_coeff']
|
||||||
|
|
||||||
|
kl_total += kl
|
||||||
|
|
||||||
|
mean = tf.reduce_mean(mean)
|
||||||
|
logvar = tf.reduce_mean(logvar)
|
||||||
|
|
||||||
|
metric = tf.reduce_sum(tf.math.sqrt(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (mesh_orig - mesh_pred) ** 2, axis=-1))) / tf.reduce_sum(batch['mesh_mask'])
|
||||||
|
|
||||||
|
output = { **output, **{ 'train/edge_loss' + res_modifier: e_loss, 'train/collision_loss' + res_modifier: c_loss,'train/euclid_error' + res_modifier: metric,
|
||||||
|
'train/mean' + res_modifier: mean, 'train/logvar' + res_modifier: logvar, 'train/kl_loss' + res_modifier: kl,
|
||||||
|
'train/var' + res_modifier: np.e ** logvar, 'train/l2_loss' + res_modifier: l2_loss, 'train/normal_loss': n_loss,
|
||||||
|
'train/euclid_error': metric, 'train/l2_mesh_loss': l2_mesh_loss } } # 'train/ms_ssim' + res_modifier: ms_ssim,
|
||||||
|
|
||||||
|
loss = reconstr_loss_total + balancing_coeff * kl_total
|
||||||
|
|
||||||
|
gradients = tape.gradient(loss, model.trainable_variables)
|
||||||
|
optimizer.apply_gradients(zip(gradients, model.trainable_variables))
|
||||||
|
return { **{ 'train/loss': loss, 'train/reconstr_loss_total': reconstr_loss_total, 'train/kl_total': kl_total }, **output }
|
||||||
|
|
||||||
|
|
||||||
|
@tf.function
|
||||||
|
def valid_step(batch):
|
||||||
|
levels_input, conds = group_inputs_for_levels(batch, config)
|
||||||
|
out_levels = model([levels_input, conds], training=False)
|
||||||
|
|
||||||
|
|
||||||
|
if config['use_skinning']:
|
||||||
|
mesh_orig = batch['mesh_unposed']
|
||||||
|
else:
|
||||||
|
mesh_orig = batch['mesh_posed']
|
||||||
|
|
||||||
|
output = dict()
|
||||||
|
reconstr_loss_total = 0
|
||||||
|
kl_total = 0
|
||||||
|
|
||||||
|
for i, res in enumerate(config['pyramid']['resolutions']):
|
||||||
|
# i = -1
|
||||||
|
res = config['pyramid']['resolutions'][i] if i != len(config['pyramid']['resolutions']) - 1 else 512
|
||||||
res_modifier = '_' + str(res) if res != 512 else ''
|
res_modifier = '_' + str(res) if res != 512 else ''
|
||||||
pred, mean, logvar = out_levels[i]
|
pred, mean, logvar = out_levels[i]
|
||||||
|
|
||||||
|
if config['use_skinning']:
|
||||||
|
uv_orig = batch['uv_unposed' + res_modifier]
|
||||||
|
else:
|
||||||
|
uv_orig = batch['uv_posed' + res_modifier]
|
||||||
|
|
||||||
mesh_pred = uv2mesh(pred)
|
mesh_pred = uv2mesh(pred)
|
||||||
|
|
||||||
if config['use_skinning']:
|
if config['use_skinning']:
|
||||||
@@ -246,13 +329,12 @@ def train_step(batch):
|
|||||||
mesh_pred_posed = smpl.run_garment(batch['pose_shape'][:, :72], batch['pose_shape'][:, 72:], mesh_pred_shaped)
|
mesh_pred_posed = smpl.run_garment(batch['pose_shape'][:, :72], batch['pose_shape'][:, 72:], mesh_pred_shaped)
|
||||||
else:
|
else:
|
||||||
mesh_pred_posed = mesh_pred
|
mesh_pred_posed = mesh_pred
|
||||||
|
|
||||||
# is the output already masked?
|
# is the output already masked?
|
||||||
|
|
||||||
e_loss = tf.reduce_mean(edge_loss(mesh_pred, mesh_orig, batch['mesh_mask']))
|
e_loss = tf.reduce_mean(edge_loss(mesh_pred, mesh_orig, batch['mesh_mask']))
|
||||||
c_loss, c_ratio = collision_penalty(mesh_pred_posed, batch['mesh_body_posed'], batch['mesh_mask'])
|
c_loss, c_ratio = collision_penalty(mesh_pred_posed, batch['mesh_body_posed'], batch['mesh_mask'])
|
||||||
c_loss, c_ratio = tf.reduce_mean(c_loss), tf.reduce_mean(c_ratio)
|
c_loss, c_ratio = tf.reduce_mean(c_loss), tf.reduce_mean(c_ratio)
|
||||||
l2_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(((uv_orig - pred) ** 2), axis=-1), axis=[1, 2]))
|
l2_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(((uv_orig - pred) ** 2), axis=-1) * batch['uv_mask' + res_modifier], axis=[1, 2]))
|
||||||
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 5, batch['uv_unposed'] + 5, max_val=10, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 5, batch['uv_unposed'] + 5, max_val=10, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
||||||
# ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_unposed'] + 1, max_val=3))
|
# ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_unposed'] + 1, max_val=3))
|
||||||
l2_mesh_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (batch['mesh_posed'] - mesh_pred_posed) ** 2, axis=-1), axis=-1))
|
l2_mesh_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (batch['mesh_posed'] - mesh_pred_posed) ** 2, axis=-1), axis=-1))
|
||||||
@@ -276,83 +358,10 @@ def train_step(batch):
|
|||||||
|
|
||||||
metric = tf.reduce_sum(tf.math.sqrt(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (mesh_orig - mesh_pred) ** 2, axis=-1))) / tf.reduce_sum(batch['mesh_mask'])
|
metric = tf.reduce_sum(tf.math.sqrt(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (mesh_orig - mesh_pred) ** 2, axis=-1))) / tf.reduce_sum(batch['mesh_mask'])
|
||||||
|
|
||||||
output = { **output, **{ 'train/edge_loss' + res_modifier: e_loss, 'train/collision_loss' + res_modifier: c_loss,'train/euclid_error' + res_modifier: metric,
|
output = { **output, **{ 'valid/edge_loss' + res_modifier: e_loss, 'valid/collision_loss' + res_modifier: c_loss,'valid/euclid_error' + res_modifier: metric,
|
||||||
'train/mean' + res_modifier: mean, 'train/logvar' + res_modifier: logvar, 'train/kl_loss' + res_modifier: kl,
|
'valid/mean' + res_modifier: mean, 'valid/logvar' + res_modifier: logvar, 'valid/kl_loss' + res_modifier: kl,
|
||||||
'train/var' + res_modifier: np.e ** logvar, 'train/l2_loss' + res_modifier: l2_loss, 'train/normal_loss': n_loss,
|
'valid/var' + res_modifier: np.e ** logvar, 'valid/l2_loss' + res_modifier: l2_loss, 'valid/normal_loss': n_loss,
|
||||||
'train/euclid_error': metric, 'train/l2_mesh_loss': l2_mesh_loss } } # 'train/ms_ssim' + res_modifier: ms_ssim,
|
'valid/euclid_error': metric, 'valid/l2_mesh_loss': l2_mesh_loss } } # 'valid/ms_ssim' + res_modifier: ms_ssim,
|
||||||
|
|
||||||
loss = reconstr_loss_total + balancing_coeff * kl_total
|
|
||||||
|
|
||||||
gradients = tape.gradient(loss, model.trainable_variables)
|
|
||||||
optimizer.apply_gradients(zip(gradients, model.trainable_variables))
|
|
||||||
return { **{ 'train/loss': loss, 'train/reconstr_loss_total': reconstr_loss_total, 'train/kl_total': kl_total }, **output }
|
|
||||||
|
|
||||||
|
|
||||||
@tf.function
|
|
||||||
def valid_step(batch):
|
|
||||||
levels_input, conds = group_inputs_for_levels(batch, config)
|
|
||||||
out_levels = model([levels_input, conds], training=False)
|
|
||||||
|
|
||||||
|
|
||||||
if config['use_skinning']:
|
|
||||||
mesh_orig, uv_orig = batch['mesh_unposed'], batch['uv_unposed']
|
|
||||||
else:
|
|
||||||
mesh_orig, uv_orig = batch['mesh_posed'], batch['uv_posed']
|
|
||||||
|
|
||||||
output = dict()
|
|
||||||
reconstr_loss_total = 0
|
|
||||||
kl_total = 0
|
|
||||||
|
|
||||||
#for i, res in enumerate(config['pyramid']['resolutions']):
|
|
||||||
i = -1
|
|
||||||
res = config['pyramid']['resolutions'][-1]
|
|
||||||
res_modifier = '_' + str(res) if res != 512 else ''
|
|
||||||
pred, mean, logvar = out_levels[i]
|
|
||||||
|
|
||||||
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
|
|
||||||
# is the output already masked?
|
|
||||||
|
|
||||||
e_loss = tf.reduce_mean(edge_loss(mesh_pred, mesh_orig, batch['mesh_mask']))
|
|
||||||
c_loss, c_ratio = collision_penalty(mesh_pred_posed, batch['mesh_body_posed'], batch['mesh_mask'])
|
|
||||||
c_loss, c_ratio = tf.reduce_mean(c_loss), tf.reduce_mean(c_ratio)
|
|
||||||
l2_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(((uv_orig - pred) ** 2), axis=-1), axis=[1, 2]))
|
|
||||||
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 5, batch['uv_unposed'] + 5, max_val=10, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
|
||||||
# ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_unposed'] + 1, max_val=3))
|
|
||||||
l2_mesh_loss = tf.reduce_mean(1e3 * tf.reduce_mean(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (batch['mesh_posed'] - mesh_pred_posed) ** 2, axis=-1), axis=-1))
|
|
||||||
n_loss = normal_loss(mesh_pred_posed, batch['mesh_posed'], batch['mesh_mask'], is_skirt=config['is_skirt'])
|
|
||||||
kl = kl_loss(mean, logvar)
|
|
||||||
|
|
||||||
if config['use_extra_losses']:
|
|
||||||
reconstr_loss_total = reconstr_loss_total + config['pyramid']['loss_weights'][i] * (l2_loss + l2_mesh_loss)
|
|
||||||
if not config['is_cape']:
|
|
||||||
reconstr_loss_total = reconstr_loss_total + config['pyramid']['loss_weights'][i] * (e_loss + c_loss) * config['reg_loss_coeff']
|
|
||||||
else:
|
|
||||||
reconstr_loss_total = reconstr_loss_total + config['pyramid']['loss_weights'][i] * (l2_loss)
|
|
||||||
|
|
||||||
if config['use_norm_loss'] and step > 2000:
|
|
||||||
reconstr_loss_total = reconstr_loss_total + n_loss * config['reg_loss_coeff']
|
|
||||||
|
|
||||||
kl_total += kl
|
|
||||||
|
|
||||||
mean = tf.reduce_mean(mean)
|
|
||||||
logvar = tf.reduce_mean(logvar)
|
|
||||||
|
|
||||||
metric = tf.reduce_sum(tf.math.sqrt(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (mesh_orig - mesh_pred) ** 2, axis=-1))) / tf.reduce_sum(batch['mesh_mask'])
|
|
||||||
|
|
||||||
output = { **output, **{ 'valid/edge_loss' + res_modifier: e_loss, 'valid/collision_loss' + res_modifier: c_loss,'valid/euclid_error' + res_modifier: metric,
|
|
||||||
'valid/mean' + res_modifier: mean, 'valid/logvar' + res_modifier: logvar, 'valid/kl_loss' + res_modifier: kl,
|
|
||||||
'valid/var' + res_modifier: np.e ** logvar, 'valid/l2_loss' + res_modifier: l2_loss, 'valid/normal_loss': n_loss,
|
|
||||||
'valid/euclid_error': metric, 'valid/l2_mesh_loss': l2_mesh_loss } } # 'valid/ms_ssim' + res_modifier: ms_ssim,
|
|
||||||
|
|
||||||
loss = reconstr_loss_total + balancing_coeff * kl_total
|
loss = reconstr_loss_total + balancing_coeff * kl_total
|
||||||
|
|
||||||
@@ -418,7 +427,6 @@ def test_step(batch):
|
|||||||
|
|
||||||
|
|
||||||
def plot_everything(batch: dict, type: str):
|
def plot_everything(batch: dict, type: str):
|
||||||
nr_to_plot = 4
|
|
||||||
if config['use_skinning']:
|
if config['use_skinning']:
|
||||||
mesh_orig, uv_orig = batch['mesh_unposed'].numpy(), batch['uv_unposed'].numpy()
|
mesh_orig, uv_orig = batch['mesh_unposed'].numpy(), batch['uv_unposed'].numpy()
|
||||||
else:
|
else:
|
||||||
@@ -428,8 +436,8 @@ def plot_everything(batch: dict, type: str):
|
|||||||
output_levels = model(levels_input, training=False)
|
output_levels = model(levels_input, training=False)
|
||||||
|
|
||||||
mesh_pred_levels = [uv2mesh(output_levels[i][0]).numpy() for i in range(len(output_levels))]
|
mesh_pred_levels = [uv2mesh(output_levels[i][0]).numpy() for i in range(len(output_levels))]
|
||||||
mesh_orig_posed = batch['mesh_posed'].numpy()[:nr_to_plot]
|
mesh_orig_posed = batch['mesh_posed'].numpy()
|
||||||
body = batch['mesh_body_posed'].numpy()[:nr_to_plot]
|
body = batch['mesh_body_posed'].numpy()
|
||||||
|
|
||||||
orig_img = (uv_orig + 1) / 2
|
orig_img = (uv_orig + 1) / 2
|
||||||
uv_static_img = (batch['uv_static'].numpy() + 1) / 2
|
uv_static_img = (batch['uv_static'].numpy() + 1) / 2
|
||||||
@@ -438,10 +446,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 = 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])
|
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)
|
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(nr_to_plot)]
|
imgs = [wandb.Image(img[i]) for i in range(4)]
|
||||||
|
|
||||||
F = np.load("custom_utils/smpl_faces" + skirt_modifier + ("_orig" if config['is_cape'] else "") + ".npy")
|
F = np.load("custom_utils/smpl_faces" + skirt_modifier + ("_orig" if config['is_cape'] else "") + ".npy")
|
||||||
mask = batch['mesh_mask'].numpy().astype(bool)[:nr_to_plot]
|
mask = batch['mesh_mask'].numpy().astype(bool)
|
||||||
_, faces = maskFacesBatch(np.ones_like(mesh_orig), F, mask)
|
_, faces = maskFacesBatch(np.ones_like(mesh_orig), F, mask)
|
||||||
|
|
||||||
if config['use_skinning']:
|
if config['use_skinning']:
|
||||||
@@ -450,30 +458,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()
|
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(nr_to_plot)]
|
gt = [mesh_orig[i][mask[i], :] + shape_offsets[i, mask[i], :] for i in range(mask.shape[0])]
|
||||||
|
|
||||||
mesh_unposed_shaped_levels = [[] for _ in range(nr_to_plot)]
|
mesh_unposed_shaped_levels = [[] for _ in range(mask.shape[0])]
|
||||||
for i in range(len(output_levels)):
|
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(nr_to_plot)]
|
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(nr_to_plot):
|
for k in range(mask.shape[0]):
|
||||||
mesh_unposed_shaped_levels[k].append(mesh_unposed_shaped[k])
|
mesh_unposed_shaped_levels[k].append(mesh_unposed_shaped[k])
|
||||||
|
|
||||||
# full res version
|
# full res version
|
||||||
mesh_unposed_shaped_full = np.zeros((nr_to_plot, config['smpl_res'], 3), dtype=np.float32)
|
mesh_unposed_shaped_full = np.zeros((mask.shape[0], config['smpl_res'], 3), dtype=np.float32)
|
||||||
for i in range(nr_to_plot):
|
for i in range(mask.shape[0]):
|
||||||
mesh_unposed_shaped_full[i, mask[i], :] = mesh_unposed_shaped[i]
|
mesh_unposed_shaped_full[i, mask[i], :] = mesh_unposed_shaped[i]
|
||||||
|
|
||||||
mesh_posed = smpl.run_garment(batch['pose_shape'][:nr_to_plot, :72], batch['pose_shape'][:nr_to_plot, 72:], mesh_unposed_shaped_full).numpy()
|
mesh_posed = smpl.run_garment(batch['pose_shape'][:, :72], batch['pose_shape'][:, 72:], mesh_unposed_shaped_full).numpy()
|
||||||
else:
|
else:
|
||||||
mesh_posed = mesh_pred_levels[-1]
|
mesh_posed = mesh_pred_levels[-1]
|
||||||
gt = [mesh_orig[i][mask[i], :] for i in range(nr_to_plot)]
|
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(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(mask.shape[0])]
|
||||||
|
|
||||||
|
|
||||||
gt_posed = [mesh_orig_posed[i, mask[i], :] for i in range(nr_to_plot)]
|
gt_posed = [mesh_orig_posed[i, mask[i], :] for i in range(mask.shape[0])]
|
||||||
mesh_posed_fixed = fix_collision(mesh_posed, body, mask).numpy()
|
mesh_posed_fixed = fix_collision(mesh_posed, body, mask).numpy()
|
||||||
|
|
||||||
mesh_posed = [mesh_posed[j, mask[j], :] for j in range(nr_to_plot)]
|
mesh_posed = [mesh_posed[j, mask[j], :] for j in range(mask.shape[0])]
|
||||||
|
|
||||||
if config['is_cape']:
|
if config['is_cape']:
|
||||||
collision = mesh_posed
|
collision = mesh_posed
|
||||||
@@ -489,11 +497,11 @@ def plot_everything(batch: dict, type: str):
|
|||||||
if config['is_cape']:
|
if config['is_cape']:
|
||||||
figs_coll = dict()
|
figs_coll = dict()
|
||||||
else:
|
else:
|
||||||
garment_posed_fixed = [mesh_posed_fixed[i, mask[i], :] for i in range(nr_to_plot)]
|
garment_posed_fixed = [mesh_posed_fixed[i, mask[i], :] for i in range(body.shape[0])]
|
||||||
collision_fixed = [np.concatenate((body[i], garment_posed_fixed[i]), axis=0) for i in range(len(mesh_posed))]
|
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(nr_to_plot)]
|
gt_posed = [batch['mesh_posed'].numpy()[i, mask[i], :] for i in range(mask.shape[0])]
|
||||||
collision_gt = [np.concatenate((body[i], gt_posed[i]), axis=0) for i in range(len(gt_posed))]
|
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(nr_to_plot) }
|
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) }
|
||||||
|
|
||||||
return { **figs, **figs_coll, **{ type + '/images': imgs, } }
|
return { **figs, **figs_coll, **{ type + '/images': imgs, } }
|
||||||
|
|
||||||
@@ -730,18 +738,9 @@ def generate_results():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@tf.function
|
@tf.function
|
||||||
def speed_step(levels_input, conds, pose_shape, mask):
|
def speed_step(levels_input, conds):
|
||||||
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])])
|
|
||||||
|
|
||||||
# pred = model.sample([levels_input, conds])
|
return model.sample([levels_input, conds], training=False)
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -771,12 +770,8 @@ if __name__ == '__main__':
|
|||||||
resolutions=dataset_resolutions,
|
resolutions=dataset_resolutions,
|
||||||
in_memory=config['dataset_in_memory'],
|
in_memory=config['dataset_in_memory'],
|
||||||
is_cape=config['is_cape'],
|
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'] if 'frames_file' 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'],
|
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'],
|
signature=config['signature_static'],
|
||||||
resolutions=dataset_resolutions,
|
resolutions=dataset_resolutions,
|
||||||
in_memory=True,
|
in_memory=True,
|
||||||
@@ -787,12 +782,8 @@ if __name__ == '__main__':
|
|||||||
resolutions=dataset_resolutions,
|
resolutions=dataset_resolutions,
|
||||||
in_memory=config['dataset_in_memory'],
|
in_memory=config['dataset_in_memory'],
|
||||||
is_cape=config['is_cape'],
|
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'] if 'frames_file_valid' 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'],
|
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'],
|
signature=config['signature_static'],
|
||||||
resolutions=dataset_resolutions,
|
resolutions=dataset_resolutions,
|
||||||
in_memory=True,
|
in_memory=True,
|
||||||
@@ -822,38 +813,33 @@ if __name__ == '__main__':
|
|||||||
if config['pretrained_model'] != '':
|
if config['pretrained_model'] != '':
|
||||||
# assert len(config['pyramid']['resolutions']) == 1
|
# assert len(config['pyramid']['resolutions']) == 1
|
||||||
load_model(model, config['pretrained_model'], iteration=config['pretrained_model_iteration'])
|
load_model(model, config['pretrained_model'], iteration=config['pretrained_model_iteration'])
|
||||||
|
|
||||||
|
if len(config['pyramid']['resolutions']) == 1:
|
||||||
model.static_enc.trainable = False
|
model.static_enc.trainable = False
|
||||||
model.body_enc.trainable = False
|
model.body_enc.trainable = False
|
||||||
if config['use_curvature']:
|
if config['use_curvature']:
|
||||||
model.curv_enc.trainable = False
|
model.curv_enc.trainable = False
|
||||||
else:
|
else:
|
||||||
if len(config['pyramid']['resolutions']) == 1:
|
# 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.static_enc.trainable = False
|
||||||
model.body_enc.trainable = False
|
model.body_enc.trainable = False
|
||||||
if config['use_curvature']:
|
if config['use_curvature']:
|
||||||
model.curv_enc.trainable = False
|
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'])
|
# load_model(model.levels[0].upscale_enhancer, config['pyramid']['levels'][0]['upscale_enhancer'])
|
||||||
# model.levels[0].upscale_enhancer.trainable = False
|
# model.levels[0].upscale_enhancer.trainable = False
|
||||||
|
|
||||||
|
|
||||||
for i in range(len(model.levels)-1):
|
for i in range(len(model.levels)):
|
||||||
load_model(model.levels[i].upscale_enhancer, config['pyramid']['levels'][i]['upscale_enhancer'])
|
load_model(model.levels[i].upscale_enhancer, config['pyramid']['levels'][i]['upscale_enhancer'])
|
||||||
model.levels[i].upscale_enhancer.trainable = False
|
model.levels[i].upscale_enhancer.trainable = False
|
||||||
# if config['pyramid']['resolutions'][-1] != 512:
|
# if config['pyramid']['resolutions'][-1] != 512:
|
||||||
# load_model(model.upscale_enhancer, config['pyramid']['final_upscale_enhancer'])
|
# load_model(model.upscale_enhancer, config['pyramid']['final_upscale_enhancer'])
|
||||||
# model.upscale_enhancer.trainable = False
|
# model.upscale_enhancer.trainable = False
|
||||||
|
|
||||||
for i in range(len(model.levels)-1):
|
# for i in range(len(model.levels)-1):
|
||||||
model.levels[i].trainable = False
|
# model.levels[i].trainable = False
|
||||||
|
|
||||||
# load_model(model.cond_encoder, config['pyramid']['pretrained_pyramid'])
|
# load_model(model.cond_encoder, config['pyramid']['pretrained_pyramid'])
|
||||||
# load_model(model.levels[0], config['pyramid']['pretrained_pyramid'])
|
# load_model(model.levels[0], config['pyramid']['pretrained_pyramid'])
|
||||||
@@ -865,10 +851,10 @@ if __name__ == '__main__':
|
|||||||
for batch in dataset_train:
|
for batch in dataset_train:
|
||||||
batch = static_dataset_train.expand_batch(batch_to_dict(batch, config['signature_dynamic']))
|
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()
|
# start = time.perf_counter()
|
||||||
# out = speed_step(levels_input, conds, batch['pose_shape'] ,batch['mesh_mask'])
|
# out = speed_step(levels_input, conds)
|
||||||
# t = time.perf_counter() - start
|
# t = time.perf_counter() - start
|
||||||
# print(t)
|
# print(t)
|
||||||
# times.append(t)
|
# times.append(t)
|
||||||
@@ -913,4 +899,4 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
step += 1
|
step += 1
|
||||||
# print('mean:')
|
# print('mean:')
|
||||||
# print(np.mean(times[10:]))
|
# print(np.mean(times[1:]))
|
||||||
+22
-39
@@ -54,11 +54,10 @@ from custom_utils.custom_utils import nest_conditions, batch_to_dict
|
|||||||
|
|
||||||
|
|
||||||
class StaticDataset():
|
class StaticDataset():
|
||||||
def __init__(self, folder, signature, folder_skirt='', use_filled=False, resolutions=[512], in_memory=True, is_cape=False) -> None:
|
def __init__(self, folder, signature, use_filled=False, resolutions=[512], in_memory=True, is_cape=False) -> None:
|
||||||
self.store = dict()
|
self.store = dict()
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
self.folder = folder
|
self.folder = folder
|
||||||
self.folder_skirt = folder_skirt
|
|
||||||
self.in_memory = in_memory
|
self.in_memory = in_memory
|
||||||
assert set(resolutions).issubset(set([32, 64, 128, 256, 512]))
|
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',
|
self.possible_keys = ['uv_static', 'uv_static_32', 'uv_static_64', 'uv_static_128', 'uv_static_256',
|
||||||
@@ -86,9 +85,6 @@ class StaticDataset():
|
|||||||
|
|
||||||
def read(self, id):
|
def read(self, id):
|
||||||
data = dict()
|
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:
|
for res in self.resolutions:
|
||||||
res_string = ''
|
res_string = ''
|
||||||
@@ -96,23 +92,23 @@ class StaticDataset():
|
|||||||
res_string = '_' + str(res)
|
res_string = '_' + str(res)
|
||||||
|
|
||||||
if 'uv_static' + res_string in self.signature.keys():
|
if 'uv_static' + res_string in self.signature.keys():
|
||||||
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
|
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
|
||||||
if 'uv_mask' + res_string in self.signature.keys():
|
if 'uv_mask' + res_string in self.signature.keys():
|
||||||
if self.is_cape:
|
if self.is_cape:
|
||||||
data['uv_mask' + res_string] = self.uv_masks[res]
|
data['uv_mask' + res_string] = self.uv_masks[res]
|
||||||
else:
|
else:
|
||||||
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
|
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
|
||||||
|
|
||||||
|
|
||||||
if 'mesh_static' in self.signature.keys():
|
if 'mesh_static' in self.signature.keys():
|
||||||
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)
|
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)
|
||||||
if 'mesh_mask' in self.signature.keys():
|
if 'mesh_mask' in self.signature.keys():
|
||||||
if self.is_cape:
|
if self.is_cape:
|
||||||
data['mesh_mask'] = np.ones((3638), np.float32)
|
data['mesh_mask'] = np.ones((3638), np.float32)
|
||||||
else:
|
else:
|
||||||
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
|
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
|
||||||
if 'uv_shaped_body' in self.signature.keys():
|
if 'uv_shaped_body' in self.signature.keys():
|
||||||
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
|
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
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@@ -139,7 +135,7 @@ class StaticDataset():
|
|||||||
|
|
||||||
class DatasetIdx(tf.data.Dataset):
|
class DatasetIdx(tf.data.Dataset):
|
||||||
|
|
||||||
def __new__(cls, folder, shuffle=True, is_cape=False, testing=False, frames_file=None, folder_skirt=None, frames_file_skirt=''):
|
def __new__(cls, folder, shuffle=True, is_cape=False, testing=False, frames_file=None):
|
||||||
if frames_file is None:
|
if frames_file is None:
|
||||||
uv_static_folder = os.path.join(folder, 'pose_shape')
|
uv_static_folder = os.path.join(folder, 'pose_shape')
|
||||||
frames = sorted(os.listdir(uv_static_folder))
|
frames = sorted(os.listdir(uv_static_folder))
|
||||||
@@ -160,12 +156,6 @@ class DatasetIdx(tf.data.Dataset):
|
|||||||
lines = [line.strip() for line in lines]
|
lines = [line.strip() for line in lines]
|
||||||
frames = 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:
|
if shuffle:
|
||||||
random.shuffle(frames)
|
random.shuffle(frames)
|
||||||
|
|
||||||
@@ -204,12 +194,10 @@ class DatasetFactory():
|
|||||||
use_one_hot=False,
|
use_one_hot=False,
|
||||||
use_no_orient=True,
|
use_no_orient=True,
|
||||||
testing=False,
|
testing=False,
|
||||||
frames_file=None,
|
frames_file=None):
|
||||||
frames_file_skirt='',
|
|
||||||
folder_skirt='',):
|
|
||||||
assert set(resolutions).issubset(set([32, 64, 128, 256, 512]))
|
assert set(resolutions).issubset(set([32, 64, 128, 256, 512]))
|
||||||
|
|
||||||
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)
|
dataset_idx = DatasetIdx(folder, shuffle, is_cape=is_cape, testing=testing, frames_file=frames_file)
|
||||||
|
|
||||||
separator = '_'
|
separator = '_'
|
||||||
if is_cape:
|
if is_cape:
|
||||||
@@ -234,11 +222,6 @@ 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().decode("utf-8"), frame_split[1].numpy().decode("utf-8")
|
||||||
# id, frame_nr = frame_split[0].numpy(), frame_split[1].numpy()
|
# id, frame_nr = frame_split[0].numpy(), frame_split[1].numpy()
|
||||||
# static_info = static_data[id]
|
# 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()
|
item = dict()
|
||||||
|
|
||||||
if 'id' in signature.keys():
|
if 'id' in signature.keys():
|
||||||
@@ -246,23 +229,23 @@ class DatasetFactory():
|
|||||||
if 'frame_nr' in signature.keys():
|
if 'frame_nr' in signature.keys():
|
||||||
item['frame_nr'] = frame_nr
|
item['frame_nr'] = frame_nr
|
||||||
if 'pose_shape' in signature.keys():
|
if 'pose_shape' in signature.keys():
|
||||||
pose_shape = np.load(os.path.join(temp_folder, 'pose_shape', id + separator + frame_nr + '.npy'))
|
pose_shape = np.load(os.path.join(folder, 'pose_shape', id + separator + frame_nr + '.npy'))
|
||||||
if use_no_orient:
|
if use_no_orient:
|
||||||
pose_shape[:3] = 0
|
pose_shape[:3] = 0
|
||||||
item['pose_shape'] = pose_shape
|
item['pose_shape'] = pose_shape
|
||||||
if 'mesh_body_posed' in signature.keys():
|
if 'mesh_body_posed' in signature.keys():
|
||||||
if use_no_orient:
|
if use_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']
|
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']
|
||||||
item['mesh_body_posed'] = mesh_posed_body_no_orient
|
item['mesh_body_posed'] = mesh_posed_body_no_orient
|
||||||
else:
|
else:
|
||||||
mesh_body_posed = np.load(os.path.join(temp_folder, 'mesh_body_posed', id + '_' + frame_nr + '.npy'))
|
mesh_body_posed = np.load(os.path.join(folder, 'mesh_body_posed', id + '_' + frame_nr + '.npy'))
|
||||||
item['mesh_body_posed'] = mesh_body_posed
|
item['mesh_body_posed'] = mesh_body_posed
|
||||||
if 'mesh_posed' in signature.keys():
|
if 'mesh_posed' in signature.keys():
|
||||||
if use_no_orient:
|
if use_no_orient:
|
||||||
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)
|
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)
|
||||||
item['mesh_posed'] = mesh_posed
|
item['mesh_posed'] = mesh_posed
|
||||||
else:
|
else:
|
||||||
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)
|
mesh_posed = np.load(os.path.join(folder, 'mesh_posed', id + separator + frame_nr + '.npz')); mesh_posed = mesh_posed['mesh_posed'].astype(np.float32)
|
||||||
item['mesh_posed'] = mesh_posed
|
item['mesh_posed'] = mesh_posed
|
||||||
# if 'mesh_unposed' in signature.keys():
|
# 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']
|
# mesh_unposed = np.load(os.path.join(folder, 'mesh_unposed', id + '_' + frame_nr + '.npz')); mesh_unposed = mesh_unposed['mesh_unposed']
|
||||||
@@ -272,12 +255,12 @@ class DatasetFactory():
|
|||||||
# item['uv_unposed'] = uv_unposed
|
# item['uv_unposed'] = uv_unposed
|
||||||
if 'mesh_unposed' in signature.keys():
|
if 'mesh_unposed' in signature.keys():
|
||||||
# print('one_hot')
|
# print('one_hot')
|
||||||
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']
|
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']
|
||||||
item['mesh_unposed'] = mesh_unposed_no_shape
|
item['mesh_unposed'] = mesh_unposed_no_shape
|
||||||
|
|
||||||
|
|
||||||
if 'mesh_curvature' in signature.keys():
|
if 'mesh_curvature' in signature.keys():
|
||||||
mesh_curvature = np.load(os.path.join(temp_folder, 'mesh_curvature', id + separator + frame_nr + '.npz')); mesh_curvature = mesh_curvature['mesh_curvature']
|
mesh_curvature = np.load(os.path.join(folder, 'mesh_curvature', id + separator + frame_nr + '.npz')); mesh_curvature = mesh_curvature['mesh_curvature']
|
||||||
item['mesh_curvature'] = mesh_curvature.astype(np.int32)
|
item['mesh_curvature'] = mesh_curvature.astype(np.int32)
|
||||||
|
|
||||||
|
|
||||||
@@ -287,7 +270,7 @@ class DatasetFactory():
|
|||||||
res_string = '_' + str(res)
|
res_string = '_' + str(res)
|
||||||
|
|
||||||
if 'uv_curvature' + res_string in signature.keys():
|
if 'uv_curvature' + res_string in signature.keys():
|
||||||
uv_curvature = np.load(os.path.join(temp_folder, 'uv_curvature' + res_string, id + separator + frame_nr + '.npz'));
|
uv_curvature = np.load(os.path.join(folder, 'uv_curvature' + res_string, id + separator + frame_nr + '.npz'));
|
||||||
if res_string != '':
|
if res_string != '':
|
||||||
uv_curvature = uv_curvature['uv_curvature']
|
uv_curvature = uv_curvature['uv_curvature']
|
||||||
else:
|
else:
|
||||||
@@ -296,24 +279,24 @@ class DatasetFactory():
|
|||||||
item['uv_curvature' + res_string] = uv_curvature
|
item['uv_curvature' + res_string] = uv_curvature
|
||||||
|
|
||||||
if 'uv_unposed' + res_string in signature.keys():
|
if 'uv_unposed' + res_string in signature.keys():
|
||||||
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']
|
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']
|
||||||
item['uv_unposed' + res_string] = uv_unposed_no_shape
|
item['uv_unposed' + res_string] = uv_unposed_no_shape
|
||||||
|
|
||||||
if 'uv_body_posed' + res_string in signature.keys():
|
if 'uv_body_posed' + res_string in signature.keys():
|
||||||
if use_no_orient:
|
if use_no_orient:
|
||||||
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 = 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 = uv_posed_body_no_orient['uv_posed_body_no_orient']
|
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
|
item['uv_body_posed' + res_string] = uv_posed_body_no_orient
|
||||||
else:
|
else:
|
||||||
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']
|
uv_body_posed = np.load(os.path.join(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
|
item['uv_body_posed' + res_string] = uv_body_posed
|
||||||
|
|
||||||
if 'uv_posed' + res_string in signature.keys():
|
if 'uv_posed' + res_string in signature.keys():
|
||||||
if use_no_orient:
|
if use_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']
|
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']
|
||||||
item['uv_posed' + res_string] = uv_posed
|
item['uv_posed' + res_string] = uv_posed
|
||||||
else:
|
else:
|
||||||
uv_posed = np.load(os.path.join(temp_folder, 'uv_posed' + res_string, id + separator + frame_nr + '.npz')); uv_posed = uv_posed['uv_gt']
|
uv_posed = np.load(os.path.join(folder, 'uv_posed' + res_string, id + separator + frame_nr + '.npz')); uv_posed = uv_posed['uv_gt']
|
||||||
item['uv_posed' + res_string] = uv_posed
|
item['uv_posed' + res_string] = uv_posed
|
||||||
|
|
||||||
# print('here')
|
# print('here')
|
||||||
|
|||||||
+4
-6
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from configs.iccv.config_abl_all import config
|
from configs.config_abl_all_post import config
|
||||||
|
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
@@ -103,13 +103,11 @@ if __name__ == '__main__':
|
|||||||
ids = set(ids)
|
ids = set(ids)
|
||||||
|
|
||||||
iteration = ''
|
iteration = ''
|
||||||
if iteration == '':
|
|
||||||
iteration = load_model(model, 'checkpoints/iccv/' + checkpoint_name, return_iteration=True)
|
load_model(model, 'checkpoints/post/' + checkpoint_name, iteration=iteration)
|
||||||
else:
|
|
||||||
load_model(model, 'checkpoints/iccv/' + checkpoint_name, iteration=iteration)
|
|
||||||
# load_model(model, 'checkpoints/' + 'abl_all_120k')
|
# load_model(model, 'checkpoints/' + 'abl_all_120k')
|
||||||
|
|
||||||
output_folder = '/home/workspace/local-data_128/results/iccv/' + checkpoint_name + '-' + iteration
|
output_folder = '/home/workspace/data/results/post/' + checkpoint_name + '-' + iteration
|
||||||
|
|
||||||
|
|
||||||
os.makedirs(output_folder, exist_ok=True)
|
os.makedirs(output_folder, exist_ok=True)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from configs.iccv.config_abl_pyr_32_64_128_seq import config
|
from configs.iccv.config_abl_pyr_64_128_cape_f import config
|
||||||
|
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu']
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|||||||
@@ -1,191 +0,0 @@
|
|||||||
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()
|
|
||||||
|
|
||||||
+36
-36
@@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import csv
|
import csv
|
||||||
import glob
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
@@ -8,12 +7,15 @@ 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_test.npy', allow_pickle=True).item()
|
||||||
folder = '/home/workspace/data/results/errors/iccv'
|
folder = '/home/workspace/data/results/errors/iccv'
|
||||||
|
|
||||||
checkpoint_name = 'iccv_pyr_32_64_128_256_seq_2'
|
checkpoint_name = 'iccv_pyr_32_64_curv'
|
||||||
checkpoint_name_skirt = 'iccv_pyr_32_64_128_skin_skirt'
|
checkpoint_name_skirt = 'iccv_pyr_32_64_curv_skirt'
|
||||||
iteration = '185' + '000'
|
iteration = '100000'
|
||||||
iteration_skirt : str = '155' + '000'
|
iteration_skirt : str = '60000'
|
||||||
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 = []
|
||||||
errors_skirt = []
|
errors_skirt = []
|
||||||
@@ -21,50 +23,48 @@ if __name__ == '__main__':
|
|||||||
per_garment_errors_skirt = { 'Tshirt': [], 'Dress': [], 'Skirt': [], 'Top': [] }
|
per_garment_errors_skirt = { 'Tshirt': [], 'Dress': [], 'Skirt': [], 'Top': [] }
|
||||||
|
|
||||||
|
|
||||||
with open(os.path.join(folder, f'{checkpoint_name}-{iteration}-{error_type}.csv'), 'r') as f:
|
with open(os.path.join(folder, checkpoint_name + '-' + iteration + '.csv'), 'r') as f:
|
||||||
csv_reader = csv.reader(f, delimiter=',')
|
csv_reader = csv.reader(f, delimiter=',')
|
||||||
for row in csv_reader:
|
for row in csv_reader:
|
||||||
per_garment_errors[garment_type_table[row[0].split('_')[0]]].append(float(row[1]))
|
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:
|
||||||
|
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:')
|
print('\nNon-skirt:')
|
||||||
for key in per_garment_errors.keys():
|
for key in per_garment_errors.keys():
|
||||||
avg = np.mean(per_garment_errors[key])
|
avg = np.mean(per_garment_errors[key])
|
||||||
errors.append(avg)
|
errors.append(avg)
|
||||||
print(key + ': ' + str(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('\nAvg non-skirt: ' + str(np.mean(errors)))
|
||||||
|
print('Avg skirt: ' + str(np.mean(errors_skirt)))
|
||||||
|
|
||||||
# with open(os.path.join(folder, f'{checkpoint_name_skirt}-{iteration_skirt}-{error_type}.csv'), 'r') as f:
|
cum_avg_shirt = np.mean(per_garment_errors['Tshirt'] + per_garment_errors_skirt['Tshirt'])
|
||||||
# csv_reader = csv.reader(f, delimiter=',')
|
cum_avg_top = np.mean(per_garment_errors['Top'] + per_garment_errors_skirt['Top'])
|
||||||
# for row in csv_reader:
|
|
||||||
# per_garment_errors_skirt[garment_type_table[row[0].split('_')[0]]].append(float(row[1]))
|
|
||||||
|
|
||||||
# print('\nSkirt:')
|
print('Global tshirt avg: ' + str(cum_avg_shirt))
|
||||||
# for key in per_garment_errors_skirt.keys():
|
print('Global top avg: ' + str(cum_avg_top))
|
||||||
# avg = np.mean(per_garment_errors_skirt[key])
|
|
||||||
# errors_skirt.append(avg)
|
|
||||||
# print(key + ': ' + str(avg))
|
|
||||||
|
|
||||||
# print('Avg skirt: ' + str(np.mean(errors_skirt)))
|
print('\nGlobal per garment: ')
|
||||||
|
|
||||||
# cum_avg_shirt = np.mean(per_garment_errors['Tshirt'] + per_garment_errors_skirt['Tshirt'])
|
global_errors = []
|
||||||
# cum_avg_top = np.mean(per_garment_errors['Top'] + per_garment_errors_skirt['Top'])
|
per_garment_errors['Tshirt'].extend(per_garment_errors_skirt['Tshirt'])
|
||||||
|
per_garment_errors['Top'].extend(per_garment_errors_skirt['Top'])
|
||||||
|
per_garment_errors['Skirt'] = per_garment_errors_skirt['Skirt']
|
||||||
|
per_garment_errors['Dress'] = per_garment_errors_skirt['Dress']
|
||||||
|
for key in per_garment_errors.keys():
|
||||||
|
avg = np.mean(per_garment_errors[key])
|
||||||
|
global_errors.append(avg)
|
||||||
|
print(key + ': ' + str(avg), 'samples: ' + str(len(per_garment_errors[key])))
|
||||||
|
|
||||||
# print('Global tshirt avg: ' + str(cum_avg_shirt))
|
print('Global avg: ' + str(np.mean(global_errors)))
|
||||||
# print('Global top avg: ' + str(cum_avg_top))
|
print(len(global_errors))
|
||||||
|
|
||||||
# print('\nGlobal per garment: ')
|
|
||||||
|
|
||||||
# global_errors = []
|
|
||||||
# per_garment_errors['Tshirt'].extend(per_garment_errors_skirt['Tshirt'])
|
|
||||||
# per_garment_errors['Top'].extend(per_garment_errors_skirt['Top'])
|
|
||||||
# per_garment_errors['Skirt'] = per_garment_errors_skirt['Skirt']
|
|
||||||
# per_garment_errors['Dress'] = per_garment_errors_skirt['Dress']
|
|
||||||
# for key in per_garment_errors.keys():
|
|
||||||
# avg = np.mean(per_garment_errors[key])
|
|
||||||
# global_errors.append(avg)
|
|
||||||
# print(key + ': ' + str(avg), 'samples: ' + str(len(per_garment_errors[key])))
|
|
||||||
|
|
||||||
# print('Global avg: ' + str(np.mean(global_errors)))
|
|
||||||
# print(len(global_errors))
|
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ def _nearest_neighbour(V, B):
|
|||||||
def _tf_nn_parallel(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])
|
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):
|
def collision_loss(V, B, mask, thr=.004):
|
||||||
B_vn = vertex_normals(B, tf.tile(F_coll[None], [B.shape[0], 1, 1]))
|
B_vn = vertex_normals(B, tf.tile(F_coll[None], [B.shape[0], 1, 1]))
|
||||||
|
|
||||||
@@ -96,7 +96,6 @@ edges_skirt = np.stack(np.nonzero(laplacian_loss.todense())).transpose()
|
|||||||
def get_edge_mask(masks):
|
def get_edge_mask(masks):
|
||||||
return tf.reduce_min(tf.gather(masks, edges, axis=1), axis=-1)
|
return tf.reduce_min(tf.gather(masks, edges, axis=1), axis=-1)
|
||||||
|
|
||||||
@tf.function
|
|
||||||
def edge_loss(x, y, mask):
|
def edge_loss(x, y, mask):
|
||||||
e_mask = get_edge_mask(mask)
|
e_mask = get_edge_mask(mask)
|
||||||
x_e = tf.gather(x, edges[:,0], axis=1) - tf.gather(x, edges[:,1], axis=1)
|
x_e = tf.gather(x, edges[:,0], axis=1) - tf.gather(x, edges[:,1], axis=1)
|
||||||
@@ -238,14 +237,13 @@ def kl_loss(mean, logvar):
|
|||||||
kl_loss *= -0.5
|
kl_loss *= -0.5
|
||||||
return kl_loss
|
return kl_loss
|
||||||
|
|
||||||
@tf.function
|
|
||||||
def normal_loss(pred, gt, mask, is_skirt=False, is_smpl_orig=False):
|
def normal_loss(pred, gt, mask, is_skirt=False, is_smpl_orig=False):
|
||||||
f_norm = None
|
f_norm = None
|
||||||
if not is_skirt and not is_smpl_orig:
|
if not is_skirt and not is_smpl_orig:
|
||||||
f_norm = F_norm
|
f_norm = F_norm
|
||||||
elif is_skirt:
|
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:
|
elif is_smpl_orig:
|
||||||
f_norm = F_norm_orig
|
f_norm = F_norm_orig
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class CVAE(tf.keras.Model):
|
|||||||
# @tf.function
|
# @tf.function
|
||||||
def sample_single(self, uv_template, uv_body_posed, uv_mask, eps=None, nr_of_samples=4):
|
def sample_single(self, uv_template, uv_body_posed, uv_mask, eps=None, nr_of_samples=4):
|
||||||
if eps is None:
|
if eps is None:
|
||||||
eps = tf.random.normal(shape=(nr_of_samples, 8, 4, self.latent_dim))
|
eps = tf.random.normal(shape=(nr_of_samples, self.latent_dim))
|
||||||
|
|
||||||
uv_template = tf.tile(tf.transpose(uv_template, [1,2,0])[tf.newaxis,:,:,:], [nr_of_samples,1,1,1])
|
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])
|
uv_body_posed = tf.tile(tf.transpose(uv_body_posed, [1,2,0])[tf.newaxis,:,:,:], [nr_of_samples,1,1,1])
|
||||||
@@ -79,17 +79,16 @@ class CVAE(tf.keras.Model):
|
|||||||
|
|
||||||
return z_cond
|
return z_cond
|
||||||
|
|
||||||
|
|
||||||
def sample(self, uv_template, uv_body_posed, uv_mask, noise=None):
|
def sample(self, uv_template, uv_body_posed, uv_mask, noise=None):
|
||||||
if noise is None:
|
if noise is None:
|
||||||
eps = tf.random.normal(shape=(uv_template.shape[0], 8, 4, self.latent_dim))
|
eps = tf.random.normal(shape=(uv_template.shape[0], self.latent_dim))
|
||||||
else:
|
else:
|
||||||
eps = noise
|
eps = noise
|
||||||
|
|
||||||
z_cond = self.encode_conds(uv_template, uv_body_posed, training=False)
|
z_cond = self.encode_conds(uv_template, uv_body_posed, training=False)
|
||||||
z = tf.concat([eps, z_cond], axis=-1)
|
z = tf.concat([eps, z_cond], axis=-1)
|
||||||
|
|
||||||
x = self.decoder([z, uv_mask], training=False)
|
x = self.decoder(z, training=False)
|
||||||
|
|
||||||
# x = x * uv_mask[:,:,:,tf.newaxis]
|
# x = x * uv_mask[:,:,:,tf.newaxis]
|
||||||
|
|
||||||
@@ -149,15 +148,3 @@ class CVAE(tf.keras.Model):
|
|||||||
# x = tf.math.softmax(x)
|
# x = tf.math.softmax(x)
|
||||||
|
|
||||||
return x, mean, logvar
|
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
|
|
||||||
@@ -203,7 +203,7 @@ class CVAENew(tf.keras.Model):
|
|||||||
# @tf.function
|
# @tf.function
|
||||||
def sample(self, uv_template, uv_body_posed, uv_curv, uv_mask, noise=None, add_noise=False):
|
def sample(self, uv_template, uv_body_posed, uv_curv, uv_mask, noise=None, add_noise=False):
|
||||||
if noise is None:
|
if noise is None:
|
||||||
eps = tf.random.normal(shape=(uv_template.shape[0], 8, 4, self.latent_dim))
|
eps = tf.random.normal(shape=(uv_template.shape[0], self.latent_dim))
|
||||||
else:
|
else:
|
||||||
eps = noise
|
eps = noise
|
||||||
|
|
||||||
|
|||||||
+7
-10
@@ -101,7 +101,6 @@ class PyramidLevelNew(tf.keras.Model):
|
|||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
super(PyramidLevelNew, self).__init__()
|
super(PyramidLevelNew, self).__init__()
|
||||||
self.size = config['resolution']
|
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.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'])
|
self.decoder = DecoderNew(config['decoder_depths'], config['decoder_dims'], config['kernel_size'])
|
||||||
@@ -127,12 +126,13 @@ class PyramidLevelNew(tf.keras.Model):
|
|||||||
|
|
||||||
def sample(self, z_cond, uv_mask, noise=None):
|
def sample(self, z_cond, uv_mask, noise=None):
|
||||||
if noise is None:
|
if noise is None:
|
||||||
eps = tf.random.normal(shape=(uv_mask.shape[0], 8, 4, self.latent_dim))
|
eps = tf.random.normal(shape=(uv_mask.shape[0], self.latent_dim))
|
||||||
else:
|
else:
|
||||||
eps = noise
|
eps = noise
|
||||||
|
|
||||||
z = tf.concat([eps, z_cond], axis=-1)
|
z = tf.concat([eps, z_cond], axis=-1)
|
||||||
x = self.decoder(z, training=False)
|
|
||||||
|
x = self.decoder(z)
|
||||||
|
|
||||||
if self.avg_garment is not None:
|
if self.avg_garment is not None:
|
||||||
x = x + self.avg_garment[tf.newaxis,:,:,:]
|
x = x + self.avg_garment[tf.newaxis,:,:,:]
|
||||||
@@ -155,18 +155,15 @@ class PyramidLevelNew(tf.keras.Model):
|
|||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
def call(self, inputs, z_cond, prev_latent=None, training=None):
|
def call(self, inputs, z_cond, training=None):
|
||||||
uv_unposed, uv_template, uv_body_posed, uv_curv, uv_mask, uv_mask_high = inputs
|
uv_unposed, uv_template, uv_body_posed, uv_curv, uv_mask, uv_mask_high = inputs
|
||||||
|
|
||||||
x = tf.concat([uv_unposed, uv_template, uv_body_posed, uv_curv], axis=-1)
|
x = tf.concat([uv_unposed, uv_template, uv_body_posed, uv_curv], axis=-1)
|
||||||
mean, logvar = self.encoder(x, training=training)
|
mean, logvar = self.encoder(x, training=training)
|
||||||
z = self.reparameterize(mean, logvar, training)
|
z = self.reparameterize(mean, logvar, training)
|
||||||
z_latent = self.reshape(z)
|
z = self.reshape(z)
|
||||||
|
|
||||||
if prev_latent is not None:
|
z = tf.concat([z, z_cond], axis=-1)
|
||||||
z_latent = tf.concat([z_latent, prev_latent], axis=-1)
|
|
||||||
|
|
||||||
z = tf.concat([z_latent, z_cond], axis=-1)
|
|
||||||
x = self.decoder(z, training=training)
|
x = self.decoder(z, training=training)
|
||||||
|
|
||||||
if self.avg_garment is not None:
|
if self.avg_garment is not None:
|
||||||
@@ -180,4 +177,4 @@ class PyramidLevelNew(tf.keras.Model):
|
|||||||
|
|
||||||
# x = x * uv_mask_high[:,:,:,tf.newaxis]
|
# x = x * uv_mask_high[:,:,:,tf.newaxis]
|
||||||
|
|
||||||
return x, mean, logvar, z_latent
|
return x, mean, logvar
|
||||||
@@ -12,6 +12,244 @@ from models.pyramid_level import PyramidLevel, PyramidLevelNew
|
|||||||
from models.upscaler import UpscalerBasic, UpscalerBasicConv, UpscalerBasicNew
|
from models.upscaler import UpscalerBasic, UpscalerBasicConv, UpscalerBasicNew
|
||||||
|
|
||||||
|
|
||||||
|
class Pyramid(tf.keras.Model):
|
||||||
|
|
||||||
|
def __init__(self, config):
|
||||||
|
super(Pyramid, self).__init__()
|
||||||
|
|
||||||
|
self.static_enc : AEEncoder = AEEncoder(config['cond_ae']['latent_dim'], config['cond_ae']['encoder_depths'], config['cond_ae']['encoder_dims'], config['cond_ae']['bottleneck_size'], config['cond_ae']['kernel_size'])
|
||||||
|
if config['pyramid']['static_model'] != '':
|
||||||
|
load_model(self.static_enc, config['pyramid']['static_model'] + '_enc')
|
||||||
|
|
||||||
|
self.body_enc : AEEncoder = AEEncoder(config['cond_ae_body']['latent_dim'], config['cond_ae_body']['encoder_depths'], config['cond_ae_body']['encoder_dims'], config['cond_ae_body']['bottleneck_size'], config['cond_ae_body']['kernel_size'])
|
||||||
|
if config['pyramid']['body_model'] != '':
|
||||||
|
load_model(self.body_enc, config['pyramid']['body_model'] + '_enc')
|
||||||
|
|
||||||
|
self.curv_enc : AEEncoder = AEEncoder(config['cond_ae']['latent_dim'], config['cond_ae']['encoder_depths'], config['cond_ae']['encoder_dims'], config['cond_ae']['bottleneck_size'], config['cond_ae']['kernel_size'])
|
||||||
|
if config['pyramid']['curvature_model'] != '':
|
||||||
|
load_model(self.curv_enc, config['pyramid']['curvature_model'] + '_enc')
|
||||||
|
|
||||||
|
if config['pyramid']['freeze_encoders']:
|
||||||
|
self.static_enc.trainable = False
|
||||||
|
self.body_enc.trainable = False
|
||||||
|
self.curv_enc.trainable = False
|
||||||
|
|
||||||
|
self.cond_encoder = tf.keras.Sequential([tf.keras.layers.Dense(512, activation='relu'),
|
||||||
|
tf.keras.layers.Dense(256, activation='relu'),
|
||||||
|
tf.keras.layers.Dense(128, activation='relu'),
|
||||||
|
tf.keras.layers.Dense(config['pyramid']['latent_dim'], activation='tanh'),])
|
||||||
|
|
||||||
|
self.levels = [PyramidLevel({ **config['pyramid']['levels'][i], **{ 'cond_ae': config['cond_ae']} }) for i in range(len(config['pyramid']['levels']))]
|
||||||
|
|
||||||
|
# if config['is_cape']:
|
||||||
|
# if len(config['pyramid']['resolutions']) == 2:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# if len(config['pyramid']['resolutions']) == 3:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# if len(config['pyramid']['resolutions']) == 4:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# self.levels[-3].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# else:
|
||||||
|
if len(config['pyramid']['resolutions']) == 2:
|
||||||
|
self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
if len(config['pyramid']['resolutions']) == 3:
|
||||||
|
self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 1000)])
|
||||||
|
self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
if len(config['pyramid']['resolutions']) == 4:
|
||||||
|
self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 10000)])
|
||||||
|
self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 1000)])
|
||||||
|
self.levels[-3].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
if len(config['pyramid']['resolutions']) == 5:
|
||||||
|
self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100000)])
|
||||||
|
self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 10000)])
|
||||||
|
self.levels[-3].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 1000)])
|
||||||
|
self.levels[-4].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
|
||||||
|
self.add_noise = config['pyramid']['add_noise']
|
||||||
|
self.noise_amount = config['pyramid']['noise_amount']
|
||||||
|
self.use_offsets = config['use_offsets']
|
||||||
|
|
||||||
|
self.upscale_enhancer = None
|
||||||
|
if config['pyramid']['final_upscale_enhancer'] != '':
|
||||||
|
k_size = config['pyramid']['final_upscale_enhancer_kernel_size'] if 'final_upscale_enhancer_kernel_size' in config['pyramid'].keys() else ((3 if config['pyramid']['resolutions'][-1] <= 64 else 5))
|
||||||
|
self.upscale_enhancer = UpscalerBasicConv(low_res=config['pyramid']['resolutions'][-1], kernel_size=k_size)
|
||||||
|
load_model(self.upscale_enhancer, config['pyramid']['final_upscale_enhancer'])
|
||||||
|
self.upscale_enhancer.trainable = False
|
||||||
|
|
||||||
|
def enhance(self, low, mask, training):
|
||||||
|
x = self.upscale_enhancer([low, mask], training=training)
|
||||||
|
return x
|
||||||
|
|
||||||
|
def encode_conds(self, uv_template, uv_body_posed, uv_curv, training):
|
||||||
|
z_static = self.static_enc(uv_template, training)
|
||||||
|
z_body = self.body_enc(uv_body_posed, training)
|
||||||
|
z_curv = self.curv_enc(uv_curv, training)
|
||||||
|
|
||||||
|
z_cond = tf.concat([z_static, z_body, z_curv], axis=-1)
|
||||||
|
z_cond = self.cond_encoder(z_cond, training=training)
|
||||||
|
|
||||||
|
return z_cond
|
||||||
|
|
||||||
|
def call(self, inputs, training):
|
||||||
|
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)
|
||||||
|
|
||||||
|
if self.add_noise == True and training == True:
|
||||||
|
z_cond = z_cond + (tf.random.uniform(z_cond.shape, maxval=self.noise_amount * 2) - self.noise_amount)
|
||||||
|
|
||||||
|
out_levels = []
|
||||||
|
pred, mean, logvar = self.levels[0](levels_input[0], z_cond, training=training)
|
||||||
|
if self.use_offsets:
|
||||||
|
pred = pred + levels_input[0][2] # uv_body_posed_32
|
||||||
|
if 1 != len(self.levels):
|
||||||
|
pred = self.levels[0].enhance(pred, levels_input[0][-2], training=training) # levels_input[i][-2]=uv_mask_res
|
||||||
|
pred = tf.image.resize(pred, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
out_levels.append([pred, mean, logvar])
|
||||||
|
pred = pred * levels_input[1][-2][:,:,:,tf.newaxis]
|
||||||
|
else:
|
||||||
|
pred = self.enhance(pred, levels_input[0][-2], training=training)
|
||||||
|
pred = tf.image.resize(pred, (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
pred = pred * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
||||||
|
out_levels.append([pred, mean, logvar])
|
||||||
|
|
||||||
|
for i in range(1, len(self.levels)):
|
||||||
|
pred_level, mean, logvar = self.levels[i](levels_input[i], z_cond, training=training)
|
||||||
|
pred = pred + pred_level
|
||||||
|
if i != len(self.levels) - 1:
|
||||||
|
pred = self.levels[i].enhance(pred, levels_input[i][-2], training=training)
|
||||||
|
out_levels.append([pred, mean, logvar])
|
||||||
|
pred = tf.image.resize(pred, (self.levels[i+1].size, self.levels[i+1].size//2), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
pred = pred * levels_input[i+1][-2][:,:,:,tf.newaxis]
|
||||||
|
else:
|
||||||
|
if self.upscale_enhancer is not None:
|
||||||
|
pred = self.enhance(pred, levels_input[-1][-2], training=training)
|
||||||
|
pred = tf.image.resize(pred, (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
pred = pred * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
||||||
|
out_levels.append([pred, mean, logvar])
|
||||||
|
|
||||||
|
return out_levels
|
||||||
|
|
||||||
|
# # 32
|
||||||
|
# pred_0, mean_0, logvar_0 = self.levels[0](levels_input[0], z_cond, training=training)
|
||||||
|
# pred_0 = self.enhance(pred_0, levels_input[0][-2], training=training)
|
||||||
|
# pred_0 = tf.image.resize(pred_0, (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# pred_0 = pred_0 * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
||||||
|
# return [ [pred_0, mean_0, logvar_0] ]
|
||||||
|
|
||||||
|
# # 32 64
|
||||||
|
# pred_0, mean_0, logvar_0 = self.levels[0](levels_input[0], z_cond, training=training)
|
||||||
|
# pred_0 = self.levels[0].enhance(pred_0, levels_input[0][-2], training=training) # levels_input[i][-2]=uv_mask_res
|
||||||
|
# pred_0 = tf.image.resize(pred_0, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# pred = pred_0 * levels_input[1][-2][:,:,:,tf.newaxis]
|
||||||
|
|
||||||
|
# pred_1, mean_1, logvar_1 = self.levels[1](levels_input[1], z_cond, training=training)
|
||||||
|
# pred_1 = pred + pred_1
|
||||||
|
# pred_1 = self.enhance(pred_1, levels_input[-1][-2], training=training)
|
||||||
|
# pred_1 = tf.image.resize(pred_1, (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# pred_1 = pred_1 * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
||||||
|
|
||||||
|
# return [ [pred_0, mean_0, logvar_0], [pred_1, mean_1, logvar_1] ]
|
||||||
|
|
||||||
|
|
||||||
|
# class Pyramid(tf.keras.Model):
|
||||||
|
|
||||||
|
# def __init__(self, config):
|
||||||
|
# super(Pyramid, self).__init__()
|
||||||
|
|
||||||
|
# self.static_enc : AEEncoder = AEEncoder(config['cond_ae']['latent_dim'], config['cond_ae']['encoder_depths'], config['cond_ae']['encoder_dims'], config['cond_ae']['bottleneck_size'], config['cond_ae']['kernel_size'])
|
||||||
|
# if config['pyramid']['static_model'] != '':
|
||||||
|
# load_model(self.static_enc, config['pyramid']['static_model'] + '_enc')
|
||||||
|
|
||||||
|
# self.body_enc : AEEncoder = AEEncoder(config['cond_ae']['latent_dim'], config['cond_ae']['encoder_depths'], config['cond_ae']['encoder_dims'], config['cond_ae']['bottleneck_size'], config['cond_ae']['kernel_size'])
|
||||||
|
# if config['pyramid']['body_model'] != '':
|
||||||
|
# load_model(self.body_enc, config['pyramid']['body_model'] + '_enc')
|
||||||
|
|
||||||
|
# self.curv_enc : AEEncoder = AEEncoder(config['cond_ae']['latent_dim'], config['cond_ae']['encoder_depths'], config['cond_ae']['encoder_dims'], config['cond_ae']['bottleneck_size'], config['cond_ae']['kernel_size'])
|
||||||
|
# if config['pyramid']['curvature_model'] != '':
|
||||||
|
# load_model(self.curv_enc, config['pyramid']['curvature_model'] + '_enc')
|
||||||
|
|
||||||
|
# if config['pyramid']['freeze_encoders']:
|
||||||
|
# self.static_enc.trainable = False
|
||||||
|
# self.body_enc.trainable = False
|
||||||
|
# self.curv_enc.trainable = False
|
||||||
|
|
||||||
|
# self.cond_encoder = tf.keras.Sequential([tf.keras.layers.Dense(512, activation='relu'),
|
||||||
|
# tf.keras.layers.Dense(256, activation='relu'),
|
||||||
|
# tf.keras.layers.Dense(128, activation='relu'),
|
||||||
|
# tf.keras.layers.Dense(config['pyramid']['latent_dim']),])
|
||||||
|
|
||||||
|
# self.levels = [PyramidLevel({ **config['pyramid']['levels'][i], **{ 'cond_ae': config['cond_ae']} }) for i in range(len(config['pyramid']['levels']))]
|
||||||
|
|
||||||
|
|
||||||
|
# self.upscale_enhancer = None
|
||||||
|
# if config['pyramid']['final_upscale_enhancer'] != '':
|
||||||
|
# self.upscale_enhancer = UpscalerBasicNew(low_res=config['pyramid']['resolutions'][-1])
|
||||||
|
# load_model(self.upscale_enhancer, config['pyramid']['final_upscale_enhancer'])
|
||||||
|
# self.upscale_enhancer.trainable = False
|
||||||
|
|
||||||
|
# def enhance(self, low, mask, training):
|
||||||
|
# x = self.upscale_enhancer([low, mask], training=training)
|
||||||
|
# return x
|
||||||
|
|
||||||
|
# def encode_conds(self, uv_template, uv_body_posed, uv_curv):
|
||||||
|
# z_static = self.static_enc(uv_template)
|
||||||
|
# z_body = self.body_enc(uv_body_posed)
|
||||||
|
# z_curv = self.curv_enc(uv_curv)
|
||||||
|
|
||||||
|
# z_cond = tf.concat([z_static, z_body, z_curv], axis=-1)
|
||||||
|
# z_cond = self.cond_encoder(z_cond)
|
||||||
|
|
||||||
|
# return z_cond
|
||||||
|
|
||||||
|
# def call(self, inputs, training):
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
# out_levels = []
|
||||||
|
# pred_0, mean_0, logvar_0 = self.levels[0](levels_input[0], z_cond, training=training)
|
||||||
|
# pred_0 = self.levels[0].enhance(pred_0, levels_input[0][-2], training=training) # levels_input[i][-2]=uv_mask_res
|
||||||
|
# # pred_0 = self.enhance(pred_0, levels_input[0][-2], training=training)
|
||||||
|
|
||||||
|
# ##################
|
||||||
|
# # if more than 1 level
|
||||||
|
# # x = tf.image.resize(pred_0, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# # x = x * levels_input[1][-2][:,:,:,tf.newaxis]
|
||||||
|
|
||||||
|
# # if only 1 level
|
||||||
|
# pred_0 = tf.image.resize(pred_0, (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# ##################
|
||||||
|
|
||||||
|
|
||||||
|
# # pred_1, mean_1, logvar_1 = self.levels[1](levels_input[1], z_cond, training=training)
|
||||||
|
# # pred_1 = pred_0 + pred_1
|
||||||
|
# # pred_1 = self.levels[1].enhance(pred, levels_input[1][-2], training=training)
|
||||||
|
|
||||||
|
# # for i in range(1, len(self.levels)):
|
||||||
|
# # pred_level, mean, logvar = self.levels[i](levels_input[i], z_cond, training=training)
|
||||||
|
# # pred = pred + pred_level
|
||||||
|
# # if i != len(self.levels) - 1:
|
||||||
|
# # pred = self.levels[i].enhance(pred, levels_input[i][-2], training=training)
|
||||||
|
# # out_levels.append([pred, mean, logvar])
|
||||||
|
# # pred = tf.image.resize(pred, (self.levels[i+1].size, self.levels[i+1].size//2), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# # pred = pred * levels_input[i+1][-2][:,:,:,tf.newaxis]
|
||||||
|
# # else:
|
||||||
|
# # if self.upscale_enhancer is not None:
|
||||||
|
# # pred = self.enhance(pred, levels_input[-1][-2], training=training)
|
||||||
|
# # pred = tf.image.resize(pred, (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
|
# # out_levels.append([pred, mean, logvar])
|
||||||
|
# # pred = pred * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
||||||
|
|
||||||
|
# out_levels = [
|
||||||
|
# [pred_0, mean_0, logvar_0]
|
||||||
|
# ]
|
||||||
|
|
||||||
|
# return out_levels
|
||||||
|
|
||||||
|
|
||||||
class PyramidNew(tf.keras.Model):
|
class PyramidNew(tf.keras.Model):
|
||||||
|
|
||||||
@@ -40,6 +278,21 @@ class PyramidNew(tf.keras.Model):
|
|||||||
self.levels = [PyramidLevelNew({ **config['pyramid']['levels'][i] }) for i in range(len(config['pyramid']['levels']))]
|
self.levels = [PyramidLevelNew({ **config['pyramid']['levels'][i] }) for i in range(len(config['pyramid']['levels']))]
|
||||||
|
|
||||||
|
|
||||||
|
# if len(config['pyramid']['resolutions']) == 2:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# if len(config['pyramid']['resolutions']) == 3:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 1000)])
|
||||||
|
# self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# if len(config['pyramid']['resolutions']) == 4:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 10000)])
|
||||||
|
# self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 1000)])
|
||||||
|
# self.levels[-3].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
# if len(config['pyramid']['resolutions']) == 5:
|
||||||
|
# self.levels[-1].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100000)])
|
||||||
|
# self.levels[-2].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 10000)])
|
||||||
|
# self.levels[-3].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 1000)])
|
||||||
|
# self.levels[-4].decoder.decoder.last = tf.keras.Sequential([tf.keras.layers.Dense(3), tf.keras.layers.Lambda(lambda x: x / 100)])
|
||||||
|
|
||||||
self.add_noise = config['pyramid']['add_noise']
|
self.add_noise = config['pyramid']['add_noise']
|
||||||
self.noise_amount = config['pyramid']['noise_amount']
|
self.noise_amount = config['pyramid']['noise_amount']
|
||||||
self.use_offsets = config['use_offsets']
|
self.use_offsets = config['use_offsets']
|
||||||
@@ -67,87 +320,6 @@ class PyramidNew(tf.keras.Model):
|
|||||||
|
|
||||||
return z_cond
|
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):
|
def call(self, inputs, training):
|
||||||
levels_input, conds = inputs
|
levels_input, conds = inputs
|
||||||
uv_static, uv_body, uv_curv = conds[0], conds[1], conds[2]
|
uv_static, uv_body, uv_curv = conds[0], conds[1], conds[2]
|
||||||
@@ -158,13 +330,13 @@ class PyramidNew(tf.keras.Model):
|
|||||||
z_cond = z_cond + (tf.random.uniform(z_cond.shape, maxval=self.noise_amount * 2) - self.noise_amount)
|
z_cond = z_cond + (tf.random.uniform(z_cond.shape, maxval=self.noise_amount * 2) - self.noise_amount)
|
||||||
|
|
||||||
out_levels = []
|
out_levels = []
|
||||||
pred, mean, logvar, z_latent = self.levels[0](levels_input[0], z_cond, training=training)
|
pred, mean, logvar = self.levels[0](levels_input[0], z_cond, training=training)
|
||||||
if self.use_offsets:
|
if self.use_offsets:
|
||||||
pred = pred + levels_input[0][2] # uv_body_posed_32
|
pred = pred + levels_input[0][2] # uv_body_posed_32
|
||||||
if 1 != len(self.levels):
|
if 1 != len(self.levels):
|
||||||
pred = self.levels[0].enhance(pred, levels_input[0][-2], training=training) # levels_input[i][-2]=uv_mask_res
|
pred = self.levels[0].enhance(pred, levels_input[0][-2], training=training) # levels_input[i][-2]=uv_mask_res
|
||||||
pred = tf.image.resize(pred, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.BILINEAR)
|
|
||||||
out_levels.append([pred, mean, logvar])
|
out_levels.append([pred, mean, logvar])
|
||||||
|
pred = tf.image.resize(pred, (self.levels[1].size, self.levels[1].size//2), tf.image.ResizeMethod.BILINEAR)
|
||||||
pred = pred * levels_input[1][-2][:,:,:,tf.newaxis]
|
pred = pred * levels_input[1][-2][:,:,:,tf.newaxis]
|
||||||
else:
|
else:
|
||||||
# pred = self.enhance(pred, levels_input[0][-2], training=training)
|
# pred = self.enhance(pred, levels_input[0][-2], training=training)
|
||||||
@@ -176,7 +348,7 @@ class PyramidNew(tf.keras.Model):
|
|||||||
for i in range(1, len(self.levels)):
|
for i in range(1, len(self.levels)):
|
||||||
input = levels_input[i]
|
input = levels_input[i]
|
||||||
input[0] = input[0] - pred
|
input[0] = input[0] - pred
|
||||||
pred_level, mean, logvar, z_latent = self.levels[i](input, z_cond, z_latent, training=training)
|
pred_level, mean, logvar = self.levels[i](input, z_cond, training=training)
|
||||||
pred = pred + pred_level
|
pred = pred + pred_level
|
||||||
if i != len(self.levels) - 1:
|
if i != len(self.levels) - 1:
|
||||||
pred = self.levels[i].enhance(pred, levels_input[i][-2], training=training)
|
pred = self.levels[i].enhance(pred, levels_input[i][-2], training=training)
|
||||||
@@ -186,9 +358,8 @@ class PyramidNew(tf.keras.Model):
|
|||||||
else:
|
else:
|
||||||
# if self.upscale_enhancer is not None:
|
# if self.upscale_enhancer is not None:
|
||||||
# pred = self.enhance(pred, levels_input[-1][-2], training=training)
|
# pred = self.enhance(pred, levels_input[-1][-2], training=training)
|
||||||
if len(self.levels) != 5:
|
pred = self.levels[-1].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)
|
||||||
pred = tf.image.resize(pred, (512, 256), tf.image.ResizeMethod.BILINEAR)
|
|
||||||
pred = pred * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
pred = pred * levels_input[-1][-1][:,:,:,tf.newaxis] # full res uv mask
|
||||||
out_levels.append([pred, mean, logvar])
|
out_levels.append([pred, mean, logvar])
|
||||||
|
|
||||||
|
|||||||
+19
-27
@@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
|
os.environ["CUDA_VISIBLE_DEVICES"] = "6"
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import cv2
|
import cv2
|
||||||
@@ -128,11 +128,7 @@ def get_experiment_plots(folder, frames, experiments, skirt_mods, bodies, faces,
|
|||||||
frame_out = []
|
frame_out = []
|
||||||
id = frame.split('_')[0]
|
id = frame.split('_')[0]
|
||||||
for exp in experiments:
|
for exp in experiments:
|
||||||
path = os.path.join(folder, exp[0] + skirt_mods[id] + '-' + exp[1], frame + '.npy')
|
garment = np.load(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':
|
if exp == 'abl_orient':
|
||||||
garment = deorient(garment, frame, skirt_mods[id] == '_skirt')
|
garment = deorient(garment, frame, skirt_mods[id] == '_skirt')
|
||||||
garment = postprocess(garment, bodies[frame], id, skirt_mods[id] == '_skirt')
|
garment = postprocess(garment, bodies[frame], id, skirt_mods[id] == '_skirt')
|
||||||
@@ -194,11 +190,11 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
faces = get_faces()
|
faces = get_faces()
|
||||||
|
|
||||||
frames = ['00079_135', '00505_23', '00688_25', '01693_128', '00408_34']
|
frames = ['00079_135']
|
||||||
# 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']
|
# 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')]
|
# rand_frames = [frame.split('.')[0] for frame in os.listdir('/home/workspace/data/dataset/test_ready/pose_shape')]
|
||||||
random.shuffle(rand_frames)
|
# random.shuffle(rand_frames)
|
||||||
rand_frames = rand_frames[:25]
|
# rand_frames = rand_frames[:25]
|
||||||
# frames.extend(rand_frames)
|
# frames.extend(rand_frames)
|
||||||
# rand_frames = [frame.split('.')[0] for frame in os.listdir('/home/workspace/data/dataset/test_skirt_ready_2/pose_shape')]
|
# rand_frames = [frame.split('.')[0] for frame in os.listdir('/home/workspace/data/dataset/test_skirt_ready_2/pose_shape')]
|
||||||
# random.shuffle(rand_frames)
|
# random.shuffle(rand_frames)
|
||||||
@@ -211,38 +207,34 @@ if __name__ == '__main__':
|
|||||||
cameras = {frame: camera_1 for frame in frames}
|
cameras = {frame: camera_1 for frame in frames}
|
||||||
|
|
||||||
# abl_all replace abl_norm maybe
|
# abl_all replace abl_norm maybe
|
||||||
# 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', '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_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 }
|
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)
|
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/'
|
results_folder_base = '/home/workspace/data/results/iccv/'
|
||||||
|
|
||||||
output_folder = os.path.join('examples/ablation/img_3')
|
output_folder = os.path.join(results_folder_base, 'ablation_plots')
|
||||||
output_folder_stl = os.path.join('examples/ablation/stl_3')
|
|
||||||
os.makedirs(output_folder, exist_ok=True)
|
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)
|
# 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)
|
meshes = get_experiment_meshes(results_folder_base, frames, experiments, skirt_mods, bodies, faces, cameras)
|
||||||
for mesh, frame in zip(meshes, frames):
|
for mesh, frame in zip(meshes, frames):
|
||||||
for exp, (garment, body, faces) in zip(experiments, mesh):
|
for exp, (garment, body, faces) in zip(experiments, mesh):
|
||||||
save_stl(f'{output_folder_stl}/{frame}_{exp[0]}_garment.stl', garment, faces)
|
save_stl(f'examples/{frame}_{exp[0]}_garment.stl', garment, faces)
|
||||||
save_stl(f'{output_folder_stl}/{frame}_{exp[0]}_body.stl', body, F)
|
save_stl(f'examples/{frame}_{exp[0]}_body.stl', body, F)
|
||||||
|
|
||||||
for mesh, frame in zip(gts, frames):
|
for mesh, frame in zip(gts, frames):
|
||||||
garment, body, faces = mesh
|
garment, body, faces = mesh
|
||||||
save_stl(f'{output_folder_stl}/{frame}_gt_garment.stl', garment, faces)
|
save_stl(f'examples/{frame}_gt_garment.stl', garment, faces)
|
||||||
save_stl(f'{output_folder_stl}/{frame}_gt_body.stl', body, F)
|
save_stl(f'examples/{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)
|
# final = np.concatenate(rows, axis=0)
|
||||||
|
|
||||||
|
|||||||
+18
-29
@@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
|
os.environ["CUDA_VISIBLE_DEVICES"] = "5"
|
||||||
|
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
@@ -30,15 +30,15 @@ from plotly.subplots import make_subplots
|
|||||||
from scipy.spatial.transform import Rotation
|
from scipy.spatial.transform import Rotation
|
||||||
|
|
||||||
from dataset import DatasetFactory, StaticDataset
|
from dataset import DatasetFactory, StaticDataset
|
||||||
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model, group_inputs_for_levels, save_stl
|
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model, group_inputs_for_levels
|
||||||
from custom_utils.smpl import SMPL
|
from custom_utils.smpl import SMPL
|
||||||
from convert_to_uv_api import convert_to_uv_api
|
from convert_to_uv_api import convert_to_uv_api
|
||||||
from models.upscaler import UpscalerBasicConv as Upscaler
|
from models.upscaler import UpscalerBasicConv as Upscaler
|
||||||
from postprocessing import fix_collision
|
from postprocessing import fix_collision
|
||||||
from models.pyramid_model_optimized import PyramidNew as Pyramid
|
from models.pyramid_model_optimized import Pyramid
|
||||||
|
|
||||||
from configs.iccv.config_abl_pyr_32_64_128_256_512 import config as config_regular
|
from configs.config_abl_2_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
|
from configs.config_abl_2_pyr_32_64_128_256_512_skirt import config as config_skirt
|
||||||
|
|
||||||
|
|
||||||
def color_labels(img):
|
def color_labels(img):
|
||||||
@@ -182,7 +182,7 @@ def convert_to_mesh(uvs, is_skirt, mask):
|
|||||||
out = []
|
out = []
|
||||||
for i in range(len(uvs)):
|
for i in range(len(uvs)):
|
||||||
if uvs[i].shape[1] != 512:
|
if uvs[i].shape[1] != 512:
|
||||||
uvs[i] = tf.image.resize(uvs[i], (512, 256), tf.image.ResizeMethod.BILINEAR)
|
uvs[i] = tf.image.resize(uvs[i], (512, 256), tf.image.ResizeMethod.LANCZOS5)
|
||||||
if is_skirt:
|
if is_skirt:
|
||||||
mesh = uv2mesh_skirt(uvs[i])
|
mesh = uv2mesh_skirt(uvs[i])
|
||||||
else:
|
else:
|
||||||
@@ -239,9 +239,9 @@ def get_closest_n_points(verts, idx, n):
|
|||||||
|
|
||||||
def get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras):
|
def get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras):
|
||||||
model: Pyramid = Pyramid(config_regular)
|
model: Pyramid = Pyramid(config_regular)
|
||||||
load_model(model, 'checkpoints/iccv/' + config_regular['name'])
|
load_model(model, 'checkpoints/' + config_regular['name'])
|
||||||
model_skirt: Pyramid = Pyramid(config_skirt)
|
model_skirt: Pyramid = Pyramid(config_skirt)
|
||||||
load_model(model_skirt, 'checkpoints/iccv/' + config_skirt['name'])
|
load_model(model_skirt, 'checkpoints/' + config_skirt['name'])
|
||||||
result = []
|
result = []
|
||||||
for frame in frames:
|
for frame in frames:
|
||||||
id = frame.split('_')[0]
|
id = frame.split('_')[0]
|
||||||
@@ -267,10 +267,6 @@ def get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras):
|
|||||||
img = cv2.imread('/tmp/exp_temp.png')
|
img = cv2.imread('/tmp/exp_temp.png')
|
||||||
frame_out.append(img[:, 50:-50, :])
|
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 = plot_fixed(final_mesh, faces[id], cameras[frame], bodies[frame])
|
||||||
# fig.write_image('/tmp/exp_temp.png')
|
# fig.write_image('/tmp/exp_temp.png')
|
||||||
# img = cv2.imread('/tmp/exp_temp.png')
|
# img = cv2.imread('/tmp/exp_temp.png')
|
||||||
@@ -301,10 +297,6 @@ def get_gt_image(frames, bodies, faces, cameras, skirt_mods):
|
|||||||
fig.write_image('/tmp/exp_temp.png')
|
fig.write_image('/tmp/exp_temp.png')
|
||||||
img_unposed = cv2.imread('/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))
|
out.append(np.concatenate((img[:, 50:-50, :], img_unposed[:, 50:-50, :]), axis=1))
|
||||||
|
|
||||||
return out
|
return out
|
||||||
@@ -330,36 +322,33 @@ 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_test.npy', allow_pickle=True).item()
|
||||||
garment_type_table = np.load('custom_data/garment_type_table_train.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 = ['01070_13']
|
frames = ['05656_221', '00300_69', '06955_117']
|
||||||
cameras = {'01070_13': camera_1}
|
|
||||||
# frames = ['05656_221', '00300_69', '06955_117']
|
|
||||||
# frames = ['02184_157', '02241_142', '06955_117', '06804_192']
|
# frames = ['02184_157', '02241_142', '06955_117', '06804_192']
|
||||||
# frames = ['01763_259', '007292_282', '00539_296', '00075_4']
|
# frames = ['01763_259', '007292_282', '00539_296', '00075_4']
|
||||||
# frames = [ '01763_259']
|
# 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 = {'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}
|
# cameras = {'02184_157': camera_1, '02241_142': camera_1, '06955_117': camera_1, '06804_192': camera_1}
|
||||||
|
|
||||||
# abl_all replace abl_norm maybe
|
# abl_all replace abl_norm maybe
|
||||||
experiment = 'abl_pyr_32_64_128_256_512'
|
experiment = 'abl_2_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 }
|
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 = '/home/workspace/local-data/train'
|
||||||
data_folder_skirt = '/home/workspace/local-data_128/train_skirt'
|
data_folder_skirt = '/home/workspace/local-data/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)
|
bodies = get_bodies(frames, skirt_mods)
|
||||||
masks = get_masks(frames)
|
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 }
|
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)
|
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)
|
images = get_experiment_plots(frames, skirt_mods, bodies, faces, masks, cameras)
|
||||||
|
|
||||||
|
|||||||
+26
-95
@@ -11,11 +11,10 @@ import tensorflow as tf
|
|||||||
import cmapy as cm
|
import cmapy as cm
|
||||||
import plotly.graph_objects as go
|
import plotly.graph_objects as go
|
||||||
import plotly.express as ex
|
import plotly.express as ex
|
||||||
import scipy.io as sio
|
|
||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
|
|
||||||
from dataset import DatasetFactory, StaticDataset
|
from dataset import DatasetFactory, StaticDataset
|
||||||
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model, save_stl
|
from custom_utils.custom_utils import batch_to_dict, UV2Mesh, _maskFaces, load_model
|
||||||
from custom_utils.smpl import SMPL
|
from custom_utils.smpl import SMPL
|
||||||
from convert_to_uv_api import convert_to_uv_api
|
from convert_to_uv_api import convert_to_uv_api
|
||||||
from models.upscaler import UpscalerBasicConv as Upscaler
|
from models.upscaler import UpscalerBasicConv as Upscaler
|
||||||
@@ -122,69 +121,6 @@ def uv_mapping_example(mesh, faces, colors, mask):
|
|||||||
print()
|
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):
|
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
|
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)
|
color_mesh = np.zeros((mesh_curvature.shape[0], 3), np.float32)
|
||||||
@@ -236,7 +172,7 @@ def plot_upscaling(uv_low, uv_high, uv_mask_low, uv_mask_high, faces, color, mas
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
uv2mesh = UV2Mesh()
|
uv2mesh = UV2Mesh()
|
||||||
smpl = SMPL()
|
smpl = SMPL()
|
||||||
@@ -273,9 +209,8 @@ if __name__ == '__main__':
|
|||||||
do_repeat=False,
|
do_repeat=False,
|
||||||
resolutions=[512, 32],
|
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_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_00438_146.txt',
|
||||||
# frames_file='/home/workspace/data/dataset/test_ready/frames_00228_137.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',
|
static_dataset = StaticDataset(folder='/home/workspace/data/dataset/test_ready',
|
||||||
resolutions=[512, 32],
|
resolutions=[512, 32],
|
||||||
@@ -329,33 +264,30 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
x = np.concatenate((body, posed), axis=0)
|
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)
|
# m = tm.Trimesh(x, faces, process=False, validate=False, vertex_colors=colors)
|
||||||
|
|
||||||
x = posed
|
# x = posed
|
||||||
x_1 = unposed.copy()
|
# x_1 = unposed.copy()
|
||||||
x_1[:, 0] = x_1[:, 0] + 0.75
|
# x_1[:, 0] = x_1[:, 0] + 0.75
|
||||||
x_2 = unposed_shaped.copy()
|
# x_2 = unposed_shaped.copy()
|
||||||
x_2[:, 0] = x_2[:, 0] + 1.75
|
# x_2[:, 0] = x_2[:, 0] + 1.75
|
||||||
garments = np.concatenate((x, x_1, x_2), axis=0)
|
# 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)
|
# all_faces = np.concatenate((faces_garment, faces_garment + x.shape[0], faces_garment + 2*x.shape[0]), axis=0).astype(np.int32)
|
||||||
mesh = garments
|
# mesh = garments
|
||||||
faces = all_faces
|
# faces = all_faces
|
||||||
fig = go.Figure()
|
# fig = go.Figure()
|
||||||
fig.add_trace(go.Mesh3d(
|
# fig.add_trace(go.Mesh3d(
|
||||||
x=mesh[:,0],
|
# x=mesh[:,0],
|
||||||
y=mesh[:,2],
|
# y=mesh[:,2],
|
||||||
z=mesh[:,1],
|
# z=mesh[:,1],
|
||||||
i = faces[:,0],
|
# i = faces[:,0],
|
||||||
j = faces[:,1],
|
# j = faces[:,1],
|
||||||
k = faces[:,2],
|
# k = faces[:,2],
|
||||||
text="",
|
# text="",
|
||||||
lighting={ 'ambient':0.8, 'diffuse':0.5, 'roughness':0.5 },
|
# lighting={ 'ambient':0.8, 'diffuse':0.5, 'roughness':0.5 },
|
||||||
|
|
||||||
),)
|
# ),)
|
||||||
fig.show()
|
# fig.show()
|
||||||
|
|
||||||
|
|
||||||
# fig = plot_fixed(x, faces, colors)
|
# fig = plot_fixed(x, faces, colors)
|
||||||
@@ -370,8 +302,7 @@ if __name__ == '__main__':
|
|||||||
# fig.write_image('examples/' + type + '_' + id_str + '_' + frame_nr + '_unposed_shaped.svg')
|
# 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(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)
|
# 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()
|
print()
|
||||||
+7
-17
@@ -216,7 +216,7 @@ def generate_faces():
|
|||||||
np.save(os.path.join(output_folder, id + '.npy'), faces.astype(np.int32))
|
np.save(os.path.join(output_folder, id + '.npy'), faces.astype(np.int32))
|
||||||
|
|
||||||
|
|
||||||
def generate_frames_file(folder, ratio=0.1, garment='', file_name='frames.txt'):
|
def generate_frames_file(folder, ratio=0.1):
|
||||||
all_frames = os.listdir(os.path.join(folder, 'pose_shape'))
|
all_frames = os.listdir(os.path.join(folder, 'pose_shape'))
|
||||||
ids = [frame.split('_')[0] for frame in all_frames]
|
ids = [frame.split('_')[0] for frame in all_frames]
|
||||||
all_frames = [frame.split('.')[0] for frame in all_frames]
|
all_frames = [frame.split('.')[0] for frame in all_frames]
|
||||||
@@ -232,15 +232,17 @@ def generate_frames_file(folder, ratio=0.1, garment='', file_name='frames.txt'):
|
|||||||
selected = []
|
selected = []
|
||||||
|
|
||||||
for id in tqdm.tqdm(sub_ids):
|
for id in tqdm.tqdm(sub_ids):
|
||||||
if garment_type_table[id] != garment:
|
if garment_type_table[id] != 'Dress':
|
||||||
continue
|
continue
|
||||||
|
if len(selected) > 30000:
|
||||||
|
break
|
||||||
|
|
||||||
# frames = glob.glob(os.path.join(folder, 'pose_shape', id + '_*'))
|
# frames = glob.glob(os.path.join(folder, 'pose_shape', id + '_*'))
|
||||||
frames = [frame for frame in all_frames if frame.startswith(id + '_')]
|
frames = [frame for frame in all_frames if frame.startswith(id + '_')]
|
||||||
frames = [frame.split('/')[-1].split('.')[0] for frame in frames]
|
frames = [frame.split('/')[-1].split('.')[0] for frame in frames]
|
||||||
selected.extend(frames)
|
selected.extend(frames)
|
||||||
|
|
||||||
with open(os.path.join(folder, file_name), 'w') as f:
|
with open(os.path.join(folder, 'frames_dress_30k.txt'), 'w') as f:
|
||||||
for i, frame in enumerate(selected):
|
for i, frame in enumerate(selected):
|
||||||
f.write(frame + '\n')
|
f.write(frame + '\n')
|
||||||
|
|
||||||
@@ -291,7 +293,7 @@ def generate_frames_file_filtered_cape():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
src_folder = '/home/workspace/local-data/train' #cloth3d_skirt
|
src_folder = '/home/workspace/local-data/train_skirt' #cloth3d_skirt
|
||||||
# src_folder = r'D:\Work\Dataset\validation_2'
|
# src_folder = r'D:\Work\Dataset\validation_2'
|
||||||
dest_folder = '/home/workspace/data/dataset/validation'
|
dest_folder = '/home/workspace/data/dataset/validation'
|
||||||
|
|
||||||
@@ -304,17 +306,5 @@ if __name__ == '__main__':
|
|||||||
# verify_poses(src_folder)
|
# verify_poses(src_folder)
|
||||||
# create_garment_type_table()
|
# create_garment_type_table()
|
||||||
# generate_faces()
|
# generate_faces()
|
||||||
# generate_frames_file(src_folder, ratio=1)
|
generate_frames_file(src_folder, ratio=1)
|
||||||
# generate_frames_file_filtered_cape()
|
# 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)
|
|
||||||
|
|||||||
+26
-50
@@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
|
os.environ["CUDA_VISIBLE_DEVICES"] = "6"
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
gpus = tf.config.experimental.list_physical_devices('GPU')
|
gpus = tf.config.experimental.list_physical_devices('GPU')
|
||||||
@@ -31,7 +31,7 @@ from PIL import Image
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
|
|
||||||
from custom_utils.smpl import SMPL
|
from custom_utils.smpl import SMPL
|
||||||
from custom_utils.custom_utils import load_model, save_stl
|
from custom_utils.custom_utils import load_model
|
||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
from scipy.spatial.transform import Rotation
|
from scipy.spatial.transform import Rotation
|
||||||
|
|
||||||
@@ -44,13 +44,10 @@ 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_dress_var_3 import config as config_main
|
||||||
# from configs.config_abl_overfit_jumpsuit_2 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_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_skin_var 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_overfit_jumpsuit import CVAE
|
||||||
from models.cvae_model import CVAENew as CVAE
|
from models.cvae_model import CVAE
|
||||||
from models.cvae_curv_model import CVAE as CVAECurv
|
from models.cvae_curv_model import CVAE as CVAECurv
|
||||||
from convert_to_uv_api import convert_to_uv_api
|
from convert_to_uv_api import convert_to_uv_api
|
||||||
from tensorflow_graphics.geometry.representation.mesh.normals import vertex_normals
|
from tensorflow_graphics.geometry.representation.mesh.normals import vertex_normals
|
||||||
@@ -290,24 +287,23 @@ def postprocess(mesh, body, faces, mask, do_smoothing=True):
|
|||||||
return mesh
|
return mesh
|
||||||
|
|
||||||
|
|
||||||
def sampling_example(frame, camera, nr=15):
|
def sampling_example(frame, camera, nr=10):
|
||||||
|
|
||||||
batch = get_temp_batch(frame, config_main)
|
batch = get_temp_batch(frame, config_main)
|
||||||
mask = batch['mesh_mask'][0].numpy().astype(bool)
|
mask = batch['mesh_mask'][0].numpy().astype(bool)
|
||||||
_, faces = _maskFaces(np.zeros((14475, 3)), F, mask)
|
_, faces = _maskFaces(np.zeros((14475, 3)), F, mask)
|
||||||
|
|
||||||
noise = tf.random.normal(shape=(nr, 8, 4, 128))
|
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.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)
|
# 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)
|
||||||
|
|
||||||
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)]
|
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)]
|
||||||
posed_mesh = [uv2mesh(uv[tf.newaxis,:,:,:]) for uv in tf.unstack(out)]
|
|
||||||
gt_mesh = batch['mesh_posed'][0].numpy()[mask, :]
|
gt_mesh = batch['mesh_posed'][0].numpy()[mask, :]
|
||||||
|
|
||||||
body = batch['mesh_body_posed'][0].numpy()
|
body = batch['mesh_body_posed'][0].numpy()
|
||||||
posed_mesh_fixed = [postprocess(mesh, body, faces, mask, do_smoothing=True) for mesh in posed_mesh]
|
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 = [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]
|
||||||
@@ -325,23 +321,11 @@ def sampling_example(frame, camera, nr=15):
|
|||||||
|
|
||||||
|
|
||||||
# custom_imshow(np.concatenate(row_sampling, axis=1)).show()
|
# 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, frame + '_body.png'))
|
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, frame + '_gt.png'))
|
plot_fixed(gt_mesh, body, faces, camera).write_image(os.path.join(out_folder, frame + '_gt.png'))
|
||||||
for i in range(nr):
|
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'))
|
plot_fixed(posed_mesh_fixed[i], body, faces, camera).write_image(os.path.join(out_folder, 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])
|
|
||||||
|
|
||||||
|
|
||||||
# custom_imshow(np.concatenate(row_sampling, axis=1)).write_image(os.path.join(out_folder, frame + '_sampling.png'))
|
# custom_imshow(np.concatenate(row_sampling, axis=1)).write_image(os.path.join(out_folder, frame + '_sampling.png'))
|
||||||
print()
|
print()
|
||||||
@@ -423,25 +407,19 @@ if __name__ == '__main__':
|
|||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|
||||||
smpl = SMPL()
|
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 = np.load("custom_utils/smpl_faces_skirt.npy")
|
||||||
F_body = np.load("custom_utils/smpl_faces.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/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_skirt')
|
||||||
|
folder = os.path.join('/home/workspace/local-data/train')
|
||||||
|
|
||||||
|
|
||||||
model = CVAE(config_main)
|
model = CVAE(config_main)
|
||||||
# curv_model = CVAECurv(config_curv)
|
curv_model = CVAECurv(config_curv)
|
||||||
|
|
||||||
load_model(model, 'checkpoints/iccv/' + config_main['name'])
|
|
||||||
# load_model(curv_model, 'checkpoints/iccv/' + config_curv['name'])
|
|
||||||
|
|
||||||
|
load_model(model, 'checkpoints/' + config_main['name'])
|
||||||
|
load_model(curv_model, 'checkpoints/' + 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))
|
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'
|
# faces_folder = '/home/workspace/data/results/support/faces'
|
||||||
@@ -454,12 +432,12 @@ if __name__ == '__main__':
|
|||||||
curv_frames = ['01763_259' , '007292_282']
|
curv_frames = ['01763_259' , '007292_282']
|
||||||
static_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:
|
with open('/home/workspace/local-data/train_skirt/frames_dress_30k.txt') as f:
|
||||||
# frames = f.readlines()
|
frames = f.readlines()
|
||||||
|
|
||||||
# random.shuffle(frames)
|
random.shuffle(frames)
|
||||||
# frames = [frame.strip() for frame in frames]
|
frames = [frame.strip() for frame in frames]
|
||||||
# frames = frames[:150]
|
frames = frames[:150]
|
||||||
|
|
||||||
# input_batch = get_temp_batch(frame, config_main)
|
# input_batch = get_temp_batch(frame, config_main)
|
||||||
# _, faces = _maskFaces(np.zeros((14475, 3)), F, input_batch['mesh_mask'][0].numpy().astype(bool))
|
# _, faces = _maskFaces(np.zeros((14475, 3)), F, input_batch['mesh_mask'][0].numpy().astype(bool))
|
||||||
@@ -475,10 +453,8 @@ 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))
|
# 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'
|
# frame = '04925_272'
|
||||||
|
|
||||||
# frames = ['01070_13', '02276_232', '02978_242', '04008_295', '04173_193']
|
frames = ['01070_13']
|
||||||
frames = ['02276_232', '02978_242', '04173_193']
|
out_folder = '/home/workspace/local-data/results/sampling_plots_jumpsuits'
|
||||||
|
|
||||||
out_folder = 'examples/sampling_analysis'
|
|
||||||
os.makedirs(out_folder, exist_ok=True)
|
os.makedirs(out_folder, exist_ok=True)
|
||||||
for frame in tqdm.tqdm(frames):
|
for frame in tqdm.tqdm(frames):
|
||||||
sampling_example(frame, camera_1)
|
sampling_example(frame, camera_1)
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
|
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
gpus = tf.config.experimental.list_physical_devices('GPU')
|
gpus = tf.config.experimental.list_physical_devices('GPU')
|
||||||
@@ -36,10 +36,10 @@ from models.upscaler import UpscalerBasicConv as Upscaler
|
|||||||
# !!!!!!!!!! CHANGE SKIRT OR NOT
|
# !!!!!!!!!! CHANGE SKIRT OR NOT
|
||||||
|
|
||||||
|
|
||||||
low_res = 256
|
low_res = 128
|
||||||
is_skirt = False
|
is_skirt = False
|
||||||
is_cape = True
|
is_cape = True
|
||||||
is_male = True
|
is_male = False
|
||||||
skirt_modifier = '_skirt' if is_skirt else ''
|
skirt_modifier = '_skirt' if is_skirt else ''
|
||||||
cape_modifier = '_cape' if is_cape else ''
|
cape_modifier = '_cape' if is_cape else ''
|
||||||
gender_modifier = '' if not is_cape else ('_m' if is_male else '_f')
|
gender_modifier = '' if not is_cape else ('_m' if is_male else '_f')
|
||||||
|
|||||||
Reference in New Issue
Block a user