From 59ccf61fed4d95b7fe91bb9552f0deb2f2c75b76 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Sat, 23 Jan 2021 16:04:35 +0800 Subject: Add late start support for non-disentangling parts --- config.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config.py') diff --git a/config.py b/config.py index 991a3a6..641e8fb 100644 --- a/config.py +++ b/config.py @@ -70,6 +70,8 @@ config: Configuration = { }, 'optimizer': { # Global parameters + # Iteration start to optimize non-disentangling parts + # 'start_iter': 10, # Initial learning rate of Adam Optimizer 'lr': 1e-4, # Coefficients used for computing running averages of -- cgit v1.2.3 From 99ddd7c142a4ec97cb8bd14b204651790b3cf4ee Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Mon, 8 Feb 2021 18:11:25 +0800 Subject: Code refactoring, modifications and new features 1. Decode features outside of auto-encoder 2. Turn off HPM 1x1 conv by default 3. Change canonical feature map size from `feature_channels * 8 x 4 x 2` to `feature_channels * 2 x 16 x 8` 4. Use mean of canonical embeddings instead of mean of static features 5. Calculate static and dynamic loss separately 6. Calculate mean of parts in triplet loss instead of sum of parts 7. Add switch to log disentangled images 8. Change default configuration --- config.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'config.py') diff --git a/config.py b/config.py index 641e8fb..04a22b9 100644 --- a/config.py +++ b/config.py @@ -8,6 +8,8 @@ config: Configuration = { 'CUDA_VISIBLE_DEVICES': '0', # Directory used in training or testing for temporary storage 'save_dir': 'runs', + # Recorde disentangled image or not + 'image_log_on': False }, # Dataset settings 'dataset': { @@ -46,11 +48,13 @@ config: Configuration = { 'ae_feature_channels': 64, # Appearance, canonical and pose feature dimensions 'f_a_c_p_dims': (128, 128, 64), + # Use 1x1 convolution in dimensionality reduction + 'hpm_use_1x1conv': False, # HPM pyramid scales, of which sum is number of parts 'hpm_scales': (1, 2, 4), # Global pooling method 'hpm_use_avg_pool': True, - 'hpm_use_max_pool': True, + 'hpm_use_max_pool': False, # FConv feature channels coefficient 'fpfe_feature_channels': 32, # FConv blocks kernel sizes @@ -65,13 +69,13 @@ config: Configuration = { 'tfa_num_parts': 16, # Embedding dimension for each part 'embedding_dims': 256, - # Triplet loss margin - 'triplet_margin': 0.2, + # Triplet loss margins for HPM and PartNet + 'triplet_margins': (0.2, 0.2), }, 'optimizer': { # Global parameters # Iteration start to optimize non-disentangling parts - # 'start_iter': 10, + # 'start_iter': 0, # Initial learning rate of Adam Optimizer 'lr': 1e-4, # Coefficients used for computing running averages of -- cgit v1.2.3