File size: 17,635 Bytes
89b37a5 | 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 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 | root_dir: /mnt/kostas-graid/datasets/extrinsic_contact_data
replay_buffer_size: 150000
replay_buffer_num_workers: 2
nstep: 3
batch_size: 128
seed: 0
dataset_shuffle_seed: 3
device: cuda
save_video: true
save_train_video: true
use_tb: true
use_wandb: true
wandb_run_id: '1042_0'
wandb_notes: 1042_0_restarted_5
eval: false
true_action_history: false
train_pad_after: 4
process_contact_features: ${eval}
obs_type: pixels
use_color: true
use_depth: true
use_masks: true
mask_list:
- EE_obj_mask
mask_representation: channels
crop_hw:
- 144
- 144
crop_down_offset: 48
color_crop_type: null
depth_crop_type: null
segmask_crop_type: null
add_crop_binary_mask: false
add_coord_conv_map: false
use_context_color: false
use_context_depth: false
use_context_segmask: false
context_color_crop_type: null
context_depth_crop_type: null
context_segmask_crop_type: null
context_add_crop_binary_mask: false
context_add_coord_conv_map: false
use_contact_map: true
use_sdf_maps: true
use_normals_maps: true
which_objects: both
max_contact_prob: 0.1
max_depth: 2.0
grasped_dtc_max_value: 0.2
env_dtc_max_value: 0.4
grasped_normals_mask_max_dtc_value: 0.2
env_normals_mask_max_dtc_value: 0.4
clamp_dtc: true
dtc_adaptive_normalization: false
mask_normals_within_sdf: true
adaptive_normals_mask: true
learnable_contact_preprocess_params: true
contact_model_name: local_multitask_outhd64all_home_crop_h144w144d48_mask_ctxtmask_seed_220979_epoch_9
contact_estimation_model_ckpt_path: ~/fish_leon/contact_estimation/artifacts/175604_2/checkpoints/epoch=09-val_loss=0.00.ckpt
encoder_type: small
debug_timestamps: false
open_loop: false
action_trajectories: true
stop_after_action: false
interpolation_frequency: 25
policy_frequency: 5
wait_for_new_camera_frames: true
baseline: false
train_demo_idxs_list_or_num: -1
log_train_every_steps: 25
name_of_expert_demo: 120_240x320_all_twodim_left_to_right_annotated_start_idx_5hz_zstd7_EE_pxl_coords_expert_demos_imp_act
expert_dataset_dirpath: ${root_dir}/FISH/expert_demos/${suite.name}/${task_name}/${name_of_expert_demo}
store_dataset_in_memory: false
expert_dataset: ${expert_dataset_dirpath}/demos.zarr
action_key: ${oc.if_else:${action_trajectories}, 'action_trajectory_${interpolation_frequency}hz',
'action'}
semantic_demo_grouping_name: semantic_demo_grouping.yaml
semantic_demo_grouping: ${expert_dataset_dirpath}/${semantic_demo_grouping_name}
include_groups_list: all
expert_dataset_config: ${expert_dataset_dirpath}/demo_config.yaml
name_of_valid_demo: 120_240x320_all_twodim_left_to_right_annotated_start_idx_5hz_zstd7_EE_pxl_coords_expert_demos_imp_act
valid_dataset_dir: ${root_dir}/FISH/expert_demos/${suite.name}/${task_name}/${name_of_valid_demo}/demos.zarr
valid_demo_idxs_list_or_num: null
val_num_groups: 3
load_bc: ${agent.load_checkpoint}
checkpoint_epoch_list:
- 99
- 199
- 299
- 399
- 499
- 599
- 699
- 799
- 899
- 999
- 1249
- 1499
- 1749
- 1999
- 2999
- 3999
- 4999
- 5999
- 6999
- 7999
- 8999
- 9999
snapshot_root_dir: /mnt/grasp_high_usage/leonmkim/contact_estimation/FISH
save_snapshot: true
save_last_snapshot: true
save_snapshot_when_done: true
top_k_checkpoints: 5
save_snapshot_link_to_weights_dir: deprecated
bc_regularize: false
bc_weight_type: qfilter
experiment_dir: ./exp_local/${suite.name}_${obs_type}/${task_name}/${wandb_run_id}
agent:
_target_: agent.diffusion_policy.DiffusionPolicyAgent
name: diffusion_policy
load_checkpoint: ${eval}
device: ${device}
n_obs_steps: ${.config.policy_cfg.n_obs_steps}
suite_name: ${suite.name}
obs_type: ${obs_type}
enable_arm: ${eval}
enable_camera: ${eval}
use_tb: ${use_tb}
desired_image_shape:
- 13
- 180
- 240
orig_cam_shape:
- 3
- 240
- 320
config:
_target_: agent.diffusion_policy.DiffusionPolicyAgentConfig
compile: false
device: ${device}
cam_resize_shape: ${agent.desired_image_shape}
orig_cam_shape: ${agent.orig_cam_shape}
policy_frequency: ${policy_frequency}
interpolation_frequency: ${interpolation_frequency}
policy_cfg:
_target_: lerobot.common.policies.diffusion.configuration_diffusion.DiffusionConfig
n_obs_steps: 1
horizon: 36
n_action_steps: ${agent.config.policy_cfg.horizon}
output_shapes:
action:
- 7
input_normalization_modes:
observation.image: mean_std
observation.state: min_max
observation.action_history: min_max
output_normalization_modes:
action: min_max
vision_backbone: resnet18
pretrained_backbone_weights: null
transforms:
- _target_: torchaug.transforms.RandomAffine
degrees:
- -5
- 5
translate:
- 0.05
- 0.05
batch_transform: true
num_chunks: -1
batch_inplace: true
- _target_: torchaug.transforms.RandomColorJitter
brightness: 0.3
contrast: 0.4
saturation: 0.5
hue: 0.08
batch_transform: true
num_chunks: -1
batch_inplace: true
use_group_norm: true
spatial_softmax_num_keypoints: 32
action_history_encoder_config:
_target_: lerobot.common.policies.diffusion.configuration_diffusion.Unet1dEncoderConfig
in_channels: 7
out_channels: 32
history_length: 6
kernel_size: ${agent.config.policy_cfg.kernel_size}
downsample_kernel_size: 3
downsample_stride: 2
downsample_padding: 1
down_dims:
- 256
- 512
- 1024
kernel_size: 5
n_groups: 8
diffusion_step_embed_dim: 128
use_film_scale_modulation: true
noise_scheduler_type: DDIM
beta_schedule: squaredcos_cap_v2
beta_start: 0.0001
beta_end: 0.02
prediction_type: epsilon
clip_sample: true
clip_sample_range: 1.0
num_train_timesteps: 50
num_inference_steps: 10
do_mask_loss_for_padding: false
input_shapes:
observation.image:
- 13
- 180
- 240
context_observation.image:
- 13
- 180
- 240
observation.state:
- 8
observation.action_history:
- 7
train_cfg:
_target_: utils.TrainConfig
lr: 0.0001
lr_scheduler: cosine
lr_warmup_steps: 500
adam_betas:
- 0.95
- 0.999
adam_eps: 1.0e-08
adam_weight_decay: 1.0e-06
grad_clip_norm: 10
offline_steps: ${num_train_frames_diffusion}
use_amp: true
observation_cfg:
_target_: agent.encoder.VisualFeatureSet
use_depth: ${use_depth}
use_color: ${use_color}
mask_input_dict:
_target_: agent.encoder.MaskInputDict
enable: ${use_masks}
representation: ${mask_representation}
mask_list: ${mask_list}
crop_input_config:
_target_: agent.encoder.CropInputConfig
color_crop_type: ${color_crop_type}
depth_crop_type: ${depth_crop_type}
segmask_crop_type: ${segmask_crop_type}
crop_hw: ${crop_hw}
crop_down_offset: ${crop_down_offset}
add_crop_binary_mask: ${add_crop_binary_mask}
add_coord_conv_map: ${add_coord_conv_map}
context_input_config:
_target_: agent.encoder.ContextInputConfig
use_color: ${use_context_color}
use_depth: ${use_context_depth}
mask_input_dict:
_target_: agent.encoder.MaskInputDict
enable: ${use_context_segmask}
representation: ${mask_representation}
mask_list: ${mask_list}
crop_input_config:
_target_: agent.encoder.CropInputConfig
color_crop_type: ${context_color_crop_type}
depth_crop_type: ${context_depth_crop_type}
segmask_crop_type: ${context_segmask_crop_type}
crop_hw: ${crop_hw}
crop_down_offset: ${crop_down_offset}
add_crop_binary_mask: ${context_add_crop_binary_mask}
add_coord_conv_map: ${context_add_coord_conv_map}
mask_soft_approx_scheduler_config:
_target_: agent.encoder.MaskSoftApproxSchedulerConfig
num_steps: 40000
initial_value: 10.0
final_value: 1000.0
interpolation_scheme: cosine
use_contact_map: ${use_contact_map}
use_sdf_maps: ${use_sdf_maps}
use_normals_maps: ${use_normals_maps}
which_objects: ${which_objects}
grasped_dtc_max_value: ${grasped_dtc_max_value}
env_dtc_max_value: ${env_dtc_max_value}
grasped_normals_mask_max_dtc_value: ${grasped_normals_mask_max_dtc_value}
env_normals_mask_max_dtc_value: ${env_normals_mask_max_dtc_value}
clamp_dtc: ${clamp_dtc}
max_contact_prob: ${max_contact_prob}
mask_normals_within_sdf: ${mask_normals_within_sdf}
dtc_adaptive_normalization: ${dtc_adaptive_normalization}
adaptive_normals_mask: ${adaptive_normals_mask}
max_depth: ${max_depth}
image_shape: ${agent.desired_image_shape}
learnable_contact_preprocess_params: ${learnable_contact_preprocess_params}
learning_rate: 0.0001
weight_decay: 0.0
contact_model_name: ${contact_model_name}
zero_centered: false
suite:
suite: frankagym
name: frankagym
frame_stack: ${agent.n_obs_steps}
action_repeat: 1
discount: 0.99
hidden_dim: 1024
num_train_frames: 1000000
num_seed_frames: 0
num_train_epochs: 15000
validate_every_epochs: 250
validate_diffusion_on_action_loss_every_epochs: 250
train_eval_diffusion_on_action_loss_every_epochs: 250
check_topk_every_epochs: 250
save_snapshot_every_epochs: 1500
eval_every_frames: 2000
num_eval_episodes: 5
save_snapshot: true
wait_for_user_to_start_episode: true
task_make_fn:
_target_: suite.frankagym.make
name: ${task_name}
height: 240
width: 320
frame_stack: ${suite.frame_stack}
action_repeat: ${suite.action_repeat}
seed: ${seed}
enable_arm: ${agent.enable_arm}
enable_gripper: ${enable_gripper}
start_with_gripper_open: ${start_with_gripper_open}
enable_camera: ${agent.enable_camera}
path_to_depth_extrinsics: ${path_to_depth_extrinsics}
contact_estimation_model_ckpt_path: ${contact_estimation_model_ckpt_path}
x_limit: ${x_limit}
y_limit: ${y_limit}
z_limit: ${z_limit}
device: ${device}
interpolation_frequency: ${interpolation_frequency}
policy_frequency: ${policy_frequency}
debug_timestamps: ${debug_timestamps}
stop_after_action: ${stop_after_action}
open_loop: ${open_loop}
wait_for_new_camera_frames: ${wait_for_new_camera_frames}
action_key: ${action_key}
action_trajectory_horizon: ${agent.config.policy_cfg.horizon}
action_trajectories: ${action_trajectories}
path_to_zarr_dataset: ${expert_dataset}
agent_policy_cfg:
_target_: agent.diffusion_policy.DiffusionPolicyAgentConfig
compile: false
device: ${device}
cam_resize_shape: ${agent.desired_image_shape}
orig_cam_shape: ${agent.orig_cam_shape}
policy_frequency: ${policy_frequency}
interpolation_frequency: ${interpolation_frequency}
policy_cfg:
_target_: lerobot.common.policies.diffusion.configuration_diffusion.DiffusionConfig
n_obs_steps: 1
horizon: 36
n_action_steps: ${agent.config.policy_cfg.horizon}
output_shapes:
action:
- 7
input_normalization_modes:
observation.image: mean_std
observation.state: min_max
observation.action_history: min_max
output_normalization_modes:
action: min_max
vision_backbone: resnet18
pretrained_backbone_weights: null
transforms:
- _target_: torchaug.transforms.RandomAffine
degrees:
- -5
- 5
translate:
- 0.05
- 0.05
batch_transform: true
num_chunks: -1
batch_inplace: true
- _target_: torchaug.transforms.RandomColorJitter
brightness: 0.3
contrast: 0.4
saturation: 0.5
hue: 0.08
batch_transform: true
num_chunks: -1
batch_inplace: true
use_group_norm: true
spatial_softmax_num_keypoints: 32
action_history_encoder_config:
_target_: lerobot.common.policies.diffusion.configuration_diffusion.Unet1dEncoderConfig
in_channels: 7
out_channels: 32
history_length: 6
kernel_size: ${agent.config.policy_cfg.kernel_size}
downsample_kernel_size: 3
downsample_stride: 2
downsample_padding: 1
down_dims:
- 256
- 512
- 1024
kernel_size: 5
n_groups: 8
diffusion_step_embed_dim: 128
use_film_scale_modulation: true
noise_scheduler_type: DDIM
beta_schedule: squaredcos_cap_v2
beta_start: 0.0001
beta_end: 0.02
prediction_type: epsilon
clip_sample: true
clip_sample_range: 1.0
num_train_timesteps: 50
num_inference_steps: 10
do_mask_loss_for_padding: false
input_shapes:
observation.image:
- 13
- 180
- 240
context_observation.image:
- 13
- 180
- 240
observation.state:
- 8
observation.action_history:
- 7
train_cfg:
_target_: utils.TrainConfig
lr: 0.0001
lr_scheduler: cosine
lr_warmup_steps: 500
adam_betas:
- 0.95
- 0.999
adam_eps: 1.0e-08
adam_weight_decay: 1.0e-06
grad_clip_norm: 10
offline_steps: ${num_train_frames_diffusion}
use_amp: true
observation_cfg:
_target_: agent.encoder.VisualFeatureSet
use_depth: ${use_depth}
use_color: ${use_color}
mask_input_dict:
_target_: agent.encoder.MaskInputDict
enable: ${use_masks}
representation: ${mask_representation}
mask_list: ${mask_list}
crop_input_config:
_target_: agent.encoder.CropInputConfig
color_crop_type: ${color_crop_type}
depth_crop_type: ${depth_crop_type}
segmask_crop_type: ${segmask_crop_type}
crop_hw: ${crop_hw}
crop_down_offset: ${crop_down_offset}
add_crop_binary_mask: ${add_crop_binary_mask}
add_coord_conv_map: ${add_coord_conv_map}
context_input_config:
_target_: agent.encoder.ContextInputConfig
use_color: ${use_context_color}
use_depth: ${use_context_depth}
mask_input_dict:
_target_: agent.encoder.MaskInputDict
enable: ${use_context_segmask}
representation: ${mask_representation}
mask_list: ${mask_list}
crop_input_config:
_target_: agent.encoder.CropInputConfig
color_crop_type: ${context_color_crop_type}
depth_crop_type: ${context_depth_crop_type}
segmask_crop_type: ${context_segmask_crop_type}
crop_hw: ${crop_hw}
crop_down_offset: ${crop_down_offset}
add_crop_binary_mask: ${context_add_crop_binary_mask}
add_coord_conv_map: ${context_add_coord_conv_map}
mask_soft_approx_scheduler_config:
_target_: agent.encoder.MaskSoftApproxSchedulerConfig
num_steps: 40000
initial_value: 10.0
final_value: 1000.0
interpolation_scheme: cosine
use_contact_map: ${use_contact_map}
use_sdf_maps: ${use_sdf_maps}
use_normals_maps: ${use_normals_maps}
which_objects: ${which_objects}
grasped_dtc_max_value: ${grasped_dtc_max_value}
env_dtc_max_value: ${env_dtc_max_value}
grasped_normals_mask_max_dtc_value: ${grasped_normals_mask_max_dtc_value}
env_normals_mask_max_dtc_value: ${env_normals_mask_max_dtc_value}
clamp_dtc: ${clamp_dtc}
max_contact_prob: ${max_contact_prob}
mask_normals_within_sdf: ${mask_normals_within_sdf}
dtc_adaptive_normalization: ${dtc_adaptive_normalization}
adaptive_normals_mask: ${adaptive_normals_mask}
max_depth: ${max_depth}
image_shape: ${agent.desired_image_shape}
learnable_contact_preprocess_params: ${learnable_contact_preprocess_params}
learning_rate: 0.0001
weight_decay: 0.0
contact_model_name: ${contact_model_name}
zero_centered: false
true_action_history: ${true_action_history}
num_train_frames_bc: 50000
num_train_frames_drq: 1100000
stddev_schedule_drq: linear(1.0,0.1,100000)
task_name: FrankaInsertion-v1
num_train_frames_vinn: 25000
num_train_frames_diffusion: 1000000
num_train_epochs_bc: 5000
num_train_epochs_diffusion: 15000
validate_every_epochs_bc: 5
validate_every_epochs_diffusion: 250
validate_diffusion_on_action_loss_every_epochs: 250
train_eval_diffusion_on_action_loss_every_epochs: 250
check_topk_every_epochs: 5
check_topk_every_epochs_diffusion: 250
save_snapshot_every_epochs_diffusion: 1500
x_limit:
- 0.2
- 0.7
y_limit:
- -0.4
- 0.4
z_limit:
- -0.05
- 0.55
home_displacement:
- 0.55
- 0.0
- 0.55
- 180.0
- 0.0
- 0.0
enable_gripper: true
start_with_gripper_open: true
offset_mask:
- 1
- 1
- 1
- 1
- 1
- 1
path_to_depth_extrinsics: ~/fish_leon/FISH/cfgs/camera_poses/camera_poses_L515/20240904-122305/color_tf_world.npy
feature_type: 180x240_1_RGB_D_2.0_msk_channels_EE_obj_mask_cntct_0.1_DTC_clmpd_lrnbl_nrmls_DTCmask_adpt_lrnbl_both_lr_0.0001_wd_0.0_local_multitask_outhd64all_home_crop_h144w144d48_mask_ctxtmask_seed_220979_epoch_9_acthst_hst6_out32_dwnkrnl3_dwnstrd2_dwnpd1
|