File size: 6,196 Bytes
710e818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
general {

    base_exp_dir = exp/CASE_NAME/wmask

    tag = "train_retargeted_shadow_hand_seq_102_diffhand_model_"

    recording = [
        ./,
        ./models
    ]
}


dataset {
    data_dir = public_data/CASE_NAME/
    render_cameras_name = cameras_sphere.npz
    object_cameras_name = cameras_sphere.npz

    obj_idx = 102
}

train {
    learning_rate = 5e-4
    # learning_rate = 5e-6
    learning_rate_actions = 5e-6
    learning_rate_alpha = 0.05
    end_iter = 300000

    # batch_size = 128 #  64
    # batch_size = 4000
    # batch_size = 3096 #  64
    batch_size = 1024
    validate_resolution_level = 4
    warm_up_end = 5000
    anneal_end = 0
    use_white_bkgd = False

    # save_freq = 10000
    save_freq = 10000
    val_freq = 20 #  2500
    val_mesh_freq = 20 #  5000
    report_freq = 10
    ### igr weight ###
    igr_weight = 0.1
    mask_weight = 0.1
}
 
model {
    

    load_redmax_robot_actions = ""
    penetrating_depth_penalty = 0.0
    train_states = True

    minn_dist_threshold = 0.000
    obj_mass = 100.0
    obj_mass = 30.0

    # use_mano_hand_for_test = False
    use_mano_hand_for_test = True

    # train_residual_friction = False
    train_residual_friction = True

    # use_LBFGS = True
    use_LBFGS = False


    use_mano_hand_for_test = False
    train_residual_friction = True 
    
    extract_delta_mesh = False
    freeze_weights = True
    # gt_act_xs_def = True
    gt_act_xs_def = False
    use_bending_network =  True
    use_delta_bending = True

    use_passive_nets = True
    use_split_network = True

    n_timesteps = 60


    # using_delta_glb_trans = True
    using_delta_glb_trans = False
    # train_multi_seqs = True


    # optimize_with_intermediates = False
    optimize_with_intermediates = True


    loss_tangential_diff_coef = 1000
    loss_tangential_diff_coef = 0

    

    optimize_active_object = True

    no_friction_constraint = False

    optimize_glb_transformations = True


    sim_model_path = "DiffHand/assets/hand_sphere_only_hand_testt.xml"
    mano_sim_model_path = "rsc/mano/mano_mean_wcollision_scaled_scaled_0_9507_nroot.urdf"
    mano_mult_const_after_cent = 1.0
    sim_num_steps = 1000000

    bending_net_type = "active_force_field_v18"    


    ### try to train the residual friction ? ###
    train_residual_friction = True
    optimize_rules = True

    load_optimized_init_actions = ""


    use_optimizable_params = True


    ### grab train seq 224 ###
    penetration_determining = "sdf_of_canon"
    train_with_forces_to_active = False
    loss_scale_coef = 1000.0
    # penetration_proj_k_to_robot_friction = 40000000.0
    # penetration_proj_k_to_robot_friction = 100000000.0 # as friction coefs here #
    use_same_contact_spring_k = False


    # sim_model_path = "/home/xueyi/diffsim/DiffHand/assets/hand_sphere_only_hand_testt.xml"
    sim_model_path = "rsc/shadow_hand_description/shadowhand_new.urdf"


    optimize_rules = False

    penetration_determining = "sdf_of_canon"

    optimize_rules = False

    optim_sim_model_params_from_mano = False
    optimize_rules = False    


    penetration_proj_k_to_robot_friction = 100000000.0 # as friction coefs here # ## confs ##
    penetration_proj_k_to_robot = 40000000.0 #


    penetrating_depth_penalty = 1

    minn_dist_threshold_robot_to_obj = 0.0


    minn_dist_threshold_robot_to_obj = 0.1

    optim_sim_model_params_from_mano = False
    optimize_rules = False    

    optim_sim_model_params_from_mano = True
    optimize_rules = True    
    minn_dist_threshold_robot_to_obj = 0.0

    optim_sim_model_params_from_mano = False
    optimize_rules = False    
    minn_dist_threshold_robot_to_obj = 0.1


    ### kinematics confgs ###
    obj_sdf_fn = "data/grab/102/102_obj.npy" 
    kinematic_mano_gt_sv_fn = "data/grab/102/102_sv_dict.npy"
    scaled_obj_mesh_fn = "data/grab/102/102_obj.obj"
    # ckpt_fn = ""
    # load_optimized_init_transformations = ""
    optim_sim_model_params_from_mano = True
    optimize_rules = True    
    minn_dist_threshold_robot_to_obj = 0.0

    optim_sim_model_params_from_mano = False
    optimize_rules = False    
    optimize_rules = True

    ckpt_fn = "ckpts/grab/102/retargeted_shadow.pth"
    load_optimized_init_transformations = "ckpts/grab/102/retargeted_shadow.pth"
    optimize_rules = False

    optimize_rules = True
    
    ## opt roboto ##
    opt_robo_glb_trans = True
    opt_robo_glb_rot = False # opt rot # ## opt rot ##
    opt_robo_states = True
    

    use_multi_stages = False

    minn_dist_threshold_robot_to_obj = 0.1

    penetration_proj_k_to_robot = 40000
    penetration_proj_k_to_robot_friction = 100000

    drive_robot = "actions"
    opt_robo_glb_trans = False
    opt_robo_states = True
    opt_robo_glb_rot = False 

    train_with_forces_to_active = True



    load_redmax_robot_actions_fn  = ""


    optimize_rules = False
    


    loss_scale_coef = 1.0



    use_opt_rigid_translations=True

    train_def = True


    optimizable_rigid_translations=True
    
    nerf {
        D = 8,
        d_in = 4,
        d_in_view = 3,
        W = 256,
        multires = 10,
        multires_view = 4,
        output_ch = 4,
        skips=[4],
        use_viewdirs=True
    }

    sdf_network {
        d_out = 257,
        d_in = 3,
        d_hidden = 256,
        n_layers = 8,
        skip_in = [4],
        multires = 6,
        bias = 0.5,
        scale = 1.0,
        geometric_init = True,
        weight_norm = True,
    } 

    variance_network {
        init_val = 0.3
    }

    rendering_network {
        d_feature = 256,
        mode = idr,
        d_in = 9,
        d_out = 3,
        d_hidden = 256,
        n_layers = 4,
        weight_norm = True,
        multires_view = 4,
        squeeze_out = True,
    }

    neus_renderer {
        n_samples = 64,
        n_importance = 64,
        n_outside = 0,
        up_sample_steps = 4 ,
        perturb = 1.0,
    }

    bending_network {
        multires = 6,
        bending_latent_size = 32,
        d_in = 3,
        rigidity_hidden_dimensions = 64,
        rigidity_network_depth = 5,
        use_rigidity_network = False,
        bending_n_timesteps = 10,
    }
}