magic0 commited on
Commit
0bd9846
·
verified ·
1 Parent(s): d2ecc99

Add files using upload-large-folder tool

Browse files
README.md CHANGED
@@ -14,8 +14,12 @@ Reactive Diffusion Policy trained on `real_single_flexiv_tactar_flipbox`.
14
 
15
  - `checkpoints/at/latest.ckpt`: final Action Tokenizer checkpoint (epoch 600).
16
  - `checkpoints/ldp/latest.ckpt`: final Latent Diffusion Policy checkpoint (epoch 400, global step 21252).
17
- - `config/task/*.yaml`: task shape and action-index configuration used for training.
 
 
 
18
 
19
  The observation camera is the single wrist view `wrist_img1`. The policy action has 10 dimensions, selected from the converted 20-dimensional VRR action with indices `[0,1,2,3,4,5,6,7,8,19]`.
20
 
21
  Both AT and LDP checkpoints are required by the RDP runtime.
 
 
14
 
15
  - `checkpoints/at/latest.ckpt`: final Action Tokenizer checkpoint (epoch 600).
16
  - `checkpoints/ldp/latest.ckpt`: final Latent Diffusion Policy checkpoint (epoch 400, global step 21252).
17
+ - `normalization/normalizer.pkl`: exact LDP normalizer computed during training, including action, pose, gripper, wrench, wrist-image and latent-action fields.
18
+ - `config/resolved/{at,ldp}/config.yaml`: fully resolved Hydra configurations saved by each training stage.
19
+ - `config/task/*.yaml`: source task shape and action-index configuration.
20
+ - `config/deployment_config.yaml`: portable relative checkpoint paths and endpoint input contract.
21
 
22
  The observation camera is the single wrist view `wrist_img1`. The policy action has 10 dimensions, selected from the converted 20-dimensional VRR action with indices `[0,1,2,3,4,5,6,7,8,19]`.
23
 
24
  Both AT and LDP checkpoints are required by the RDP runtime.
25
+ When using the resolved LDP Hydra config after download, override its original absolute `at_load_dir` with `checkpoints/at/latest.ckpt` and set the LDP checkpoint path to `checkpoints/ldp/latest.ckpt`.
config/deployment_config.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model: rdp
2
+ task: real_single_flexiv_tactar_flipbox
3
+ camera_keys:
4
+ - wrist_img1
5
+ checkpoint_paths:
6
+ at: checkpoints/at/latest.ckpt
7
+ ldp: checkpoints/ldp/latest.ckpt
8
+ normalizer_path: normalization/normalizer.pkl
9
+ runtime:
10
+ num_inference_steps: 8
11
+ horizon: 16
12
+ n_obs_steps: 2
13
+ observation_temporal_downsample_ratio: 2
14
+ action:
15
+ shape: 10
16
+ source_vrr_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 19]
17
+ observation_shapes:
18
+ wrist_img1: [3, 480, 640]
19
+ left_robot_tcp_pose: [9]
20
+ left_robot_gripper_width: [1]
21
+ left_robot_tcp_wrench: [6]
22
+
config/resolved/at/config.yaml ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ task:
2
+ name: real_tactar_flipbox_wrist_wrench_at_10fps
3
+ dataset_path: /inspire/qb-ilm2/project/robot-body/xuzijun-253108540220/real_single_flexiv_tactar_flipbox_vrr_zarr
4
+ shape_meta:
5
+ obs:
6
+ left_robot_tcp_pose:
7
+ shape:
8
+ - 9
9
+ type: low_dim
10
+ left_robot_gripper_width:
11
+ shape:
12
+ - 1
13
+ type: low_dim
14
+ left_robot_tcp_wrench:
15
+ shape:
16
+ - 6
17
+ type: low_dim
18
+ extended_obs:
19
+ left_robot_tcp_wrench:
20
+ shape:
21
+ - 6
22
+ type: low_dim
23
+ action:
24
+ shape:
25
+ - 10
26
+ dataset:
27
+ _target_: reactive_diffusion_policy.dataset.real_image_tactile_dataset.RealImageTactileDataset
28
+ shape_meta:
29
+ obs:
30
+ left_robot_tcp_pose:
31
+ shape:
32
+ - 9
33
+ type: low_dim
34
+ left_robot_gripper_width:
35
+ shape:
36
+ - 1
37
+ type: low_dim
38
+ left_robot_tcp_wrench:
39
+ shape:
40
+ - 6
41
+ type: low_dim
42
+ extended_obs:
43
+ left_robot_tcp_wrench:
44
+ shape:
45
+ - 6
46
+ type: low_dim
47
+ action:
48
+ shape:
49
+ - 10
50
+ dataset_path: ${task.dataset_path}
51
+ horizon: ${horizon}
52
+ pad_before: ${eval:'${dataset_obs_steps}-1+${n_latency_steps}'}
53
+ pad_after: ${eval:'${n_action_steps}-1'}
54
+ n_obs_steps: ${dataset_obs_steps}
55
+ obs_temporal_downsample_ratio: ${dataset_obs_temporal_downsample_ratio}
56
+ n_latency_steps: ${n_latency_steps}
57
+ seed: 42
58
+ val_ratio: 0.05
59
+ max_train_episodes: null
60
+ delta_action: false
61
+ relative_action: true
62
+ transform_params: null
63
+ action_indices:
64
+ - 0
65
+ - 1
66
+ - 2
67
+ - 3
68
+ - 4
69
+ - 5
70
+ - 6
71
+ - 7
72
+ - 8
73
+ - 19
74
+ at:
75
+ horizon: 16
76
+ n_obs_steps: 2
77
+ dataset_obs_temporal_downsample_ratio: 1
78
+ policy:
79
+ horizon: ${horizon}
80
+ n_latent_dims: 8
81
+ mlp_layer_num: 1
82
+ use_conv_encoder: true
83
+ conv_latent_dims: 32
84
+ conv_layer_num: 1
85
+ use_rnn_decoder: true
86
+ rnn_latent_dims: 32
87
+ rnn_layer_num: 1
88
+ kl_multiplier: 1.0e-06
89
+ n_embed: 16
90
+ use_vq: false
91
+ vqvae_groups: 4
92
+ eval: false
93
+ act_scale: 1
94
+ name: train_vae
95
+ _target_: reactive_diffusion_policy.workspace.train_at_workspace.TrainATWorkspace
96
+ task_name: ${task.name}
97
+ shape_meta: ${task.shape_meta}
98
+ exp_name: default
99
+ horizon: ${at.horizon}
100
+ n_obs_steps: ${at.n_obs_steps}
101
+ n_latency_steps: 0
102
+ dataset_obs_steps: ${eval:'${n_obs_steps}*${at.dataset_obs_temporal_downsample_ratio}'}
103
+ dataset_obs_temporal_downsample_ratio: ${at.dataset_obs_temporal_downsample_ratio}
104
+ n_action_steps: ${eval:'${horizon}-${dataset_obs_steps}+1'}
105
+ policy:
106
+ _target_: reactive_diffusion_policy.model.vae.model.VAE
107
+ shape_meta: ${task.shape_meta}
108
+ horizon: ${horizon}
109
+ n_latent_dims: ${at.policy.n_latent_dims}
110
+ mlp_layer_num: ${at.policy.mlp_layer_num}
111
+ use_conv_encoder: ${at.policy.use_conv_encoder}
112
+ conv_latent_dims: ${at.policy.conv_latent_dims}
113
+ conv_layer_num: ${at.policy.conv_layer_num}
114
+ use_rnn_decoder: ${at.policy.use_rnn_decoder}
115
+ rnn_latent_dims: ${at.policy.rnn_latent_dims}
116
+ rnn_layer_num: ${at.policy.rnn_layer_num}
117
+ kl_multiplier: ${at.policy.kl_multiplier}
118
+ n_embed: ${at.policy.n_embed}
119
+ use_vq: ${at.policy.use_vq}
120
+ vqvae_groups: ${at.policy.vqvae_groups}
121
+ eval: ${at.policy.eval}
122
+ act_scale: ${at.policy.act_scale}
123
+ dataloader:
124
+ batch_size: 64
125
+ num_workers: 4
126
+ shuffle: true
127
+ pin_memory: true
128
+ persistent_workers: true
129
+ val_dataloader:
130
+ batch_size: 64
131
+ num_workers: 4
132
+ shuffle: false
133
+ pin_memory: true
134
+ persistent_workers: true
135
+ optimizer:
136
+ _target_: torch.optim.AdamW
137
+ lr: 0.001
138
+ weight_decay: 0.0001
139
+ training:
140
+ device: cuda:0
141
+ seed: 42
142
+ debug: false
143
+ resume: true
144
+ lr_scheduler: cosine
145
+ lr_warmup_steps: 100
146
+ num_epochs: 601
147
+ gradient_accumulate_every: 1
148
+ use_ema: false
149
+ freeze_encoder: false
150
+ rollout_every: -1
151
+ checkpoint_every: 10
152
+ val_every: 1
153
+ sample_every: -1
154
+ max_train_steps: null
155
+ max_val_steps: null
156
+ tqdm_interval_sec: 1.0
157
+ logging:
158
+ project: at
159
+ resume: true
160
+ mode: offline
161
+ name: ${now:%Y.%m.%d-%H.%M.%S}_${name}_${task_name}
162
+ tags:
163
+ - ${name}
164
+ - ${task_name}
165
+ - ${exp_name}
166
+ id: null
167
+ group: null
168
+ checkpoint:
169
+ topk:
170
+ monitor_key: train_loss
171
+ mode: min
172
+ k: 1
173
+ format_str: epoch={epoch:04d}-train_loss={train_loss:.6f}.ckpt
174
+ save_last_ckpt: true
175
+ save_last_snapshot: false
config/resolved/at/overrides.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ - task=real_tactar_flipbox_wrist_wrench_at_10fps
2
+ - at=at_tactar_10fps
3
+ - task.dataset_path=/inspire/qb-ilm2/project/robot-body/xuzijun-253108540220/real_single_flexiv_tactar_flipbox_vrr_zarr
4
+ - logging.mode=offline
config/resolved/ldp/config.yaml ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ task:
2
+ name: real_tactar_flipbox_wrist_wrench_ldp_10fps
3
+ dataset_path: /inspire/qb-ilm2/project/robot-body/xuzijun-253108540220/real_single_flexiv_tactar_flipbox_vrr_zarr
4
+ image_shape:
5
+ - 3
6
+ - 480
7
+ - 640
8
+ shape_meta:
9
+ obs:
10
+ wrist_img1:
11
+ shape: ${task.image_shape}
12
+ type: rgb
13
+ left_robot_tcp_pose:
14
+ shape:
15
+ - 9
16
+ type: low_dim
17
+ left_robot_gripper_width:
18
+ shape:
19
+ - 1
20
+ type: low_dim
21
+ left_robot_tcp_wrench:
22
+ shape:
23
+ - 6
24
+ type: low_dim
25
+ extended_obs:
26
+ left_robot_tcp_wrench:
27
+ shape:
28
+ - 6
29
+ type: low_dim
30
+ action:
31
+ shape:
32
+ - 10
33
+ dataset:
34
+ _target_: reactive_diffusion_policy.dataset.real_image_tactile_latent_diffusion_dataset.RealImageTactileLatentDiffusionDataset
35
+ shape_meta:
36
+ obs:
37
+ wrist_img1:
38
+ shape: ${task.image_shape}
39
+ type: rgb
40
+ left_robot_tcp_pose:
41
+ shape:
42
+ - 9
43
+ type: low_dim
44
+ left_robot_gripper_width:
45
+ shape:
46
+ - 1
47
+ type: low_dim
48
+ left_robot_tcp_wrench:
49
+ shape:
50
+ - 6
51
+ type: low_dim
52
+ extended_obs:
53
+ left_robot_tcp_wrench:
54
+ shape:
55
+ - 6
56
+ type: low_dim
57
+ action:
58
+ shape:
59
+ - 10
60
+ dataset_path: ${task.dataset_path}
61
+ horizon: ${horizon}
62
+ pad_before: ${eval:'${dataset_obs_steps}-1+${n_latency_steps}'}
63
+ pad_after: ${eval:'${n_action_steps}-1'}
64
+ n_obs_steps: ${dataset_obs_steps}
65
+ obs_temporal_downsample_ratio: ${dataset_obs_temporal_downsample_ratio}
66
+ n_latency_steps: ${n_latency_steps}
67
+ seed: 42
68
+ val_ratio: 0.05
69
+ max_train_episodes: null
70
+ delta_action: false
71
+ relative_action: true
72
+ transform_params: null
73
+ action_indices:
74
+ - 0
75
+ - 1
76
+ - 2
77
+ - 3
78
+ - 4
79
+ - 5
80
+ - 6
81
+ - 7
82
+ - 8
83
+ - 19
84
+ use_latent_action_before_vq: false
85
+ at:
86
+ _target_: reactive_diffusion_policy.model.vae.model.VAE
87
+ shape_meta: ${shape_meta}
88
+ horizon: ${at.policy.horizon}
89
+ n_latent_dims: ${at.policy.n_latent_dims}
90
+ mlp_layer_num: ${at.policy.mlp_layer_num}
91
+ use_conv_encoder: ${at.policy.use_conv_encoder}
92
+ conv_latent_dims: ${at.policy.conv_latent_dims}
93
+ conv_layer_num: ${at.policy.conv_layer_num}
94
+ use_rnn_decoder: ${at.policy.use_rnn_decoder}
95
+ rnn_latent_dims: ${at.policy.rnn_latent_dims}
96
+ rnn_layer_num: ${at.policy.rnn_layer_num}
97
+ use_vq: ${at.policy.use_vq}
98
+ n_embed: ${at.policy.n_embed}
99
+ vqvae_groups: ${at.policy.vqvae_groups}
100
+ eval: true
101
+ load_dir: ${at_load_dir}
102
+ act_scale: ${at.policy.act_scale}
103
+ at:
104
+ horizon: 16
105
+ n_obs_steps: 2
106
+ dataset_obs_temporal_downsample_ratio: 1
107
+ policy:
108
+ horizon: ${horizon}
109
+ n_latent_dims: 8
110
+ mlp_layer_num: 1
111
+ use_conv_encoder: true
112
+ conv_latent_dims: 32
113
+ conv_layer_num: 1
114
+ use_rnn_decoder: true
115
+ rnn_latent_dims: 32
116
+ rnn_layer_num: 1
117
+ kl_multiplier: 1.0e-06
118
+ n_embed: 16
119
+ use_vq: false
120
+ vqvae_groups: 4
121
+ eval: false
122
+ act_scale: 1
123
+ name: train_latent_diffusion_unet_image
124
+ _target_: reactive_diffusion_policy.workspace.train_diffusion_unet_image_workspace.TrainDiffusionUnetImageWorkspace
125
+ task_name: ${task.name}
126
+ shape_meta: ${task.shape_meta}
127
+ exp_name: default
128
+ horizon: ${at.horizon}
129
+ n_obs_steps: ${at.n_obs_steps}
130
+ n_latency_steps: 0
131
+ obs_temporal_downsample_ratio: 2
132
+ dataset_obs_steps: ${eval:'${at.n_obs_steps}*${at.dataset_obs_temporal_downsample_ratio}'}
133
+ dataset_obs_temporal_downsample_ratio: ${at.dataset_obs_temporal_downsample_ratio}
134
+ n_action_steps: ${eval:'${horizon}-${dataset_obs_steps}+1'}
135
+ past_action_visible: false
136
+ keypoint_visible_rate: 1.0
137
+ at_load_dir: /inspire/qb-ilm2/project/robot-body/xuzijun-253108540220/reactive_diffusion_policy/runs/tactar_flipbox_rdp/20260801_0458/at/checkpoints/latest.ckpt
138
+ use_latent_action_before_vq: false
139
+ obs_as_global_cond: true
140
+ policy:
141
+ _target_: reactive_diffusion_policy.policy.latent_diffusion_unet_image_policy.LatentDiffusionUnetImagePolicy
142
+ shape_meta: ${shape_meta}
143
+ noise_scheduler:
144
+ _target_: diffusers.schedulers.scheduling_ddim.DDIMScheduler
145
+ num_train_timesteps: 100
146
+ beta_start: 0.0001
147
+ beta_end: 0.02
148
+ beta_schedule: squaredcos_cap_v2
149
+ clip_sample: true
150
+ set_alpha_to_one: true
151
+ steps_offset: 0
152
+ prediction_type: epsilon
153
+ obs_encoder:
154
+ _target_: reactive_diffusion_policy.model.vision.multi_image_obs_encoder.MultiImageObsEncoder
155
+ shape_meta: ${shape_meta}
156
+ rgb_model:
157
+ _target_: reactive_diffusion_policy.model.vision.model_getter.get_resnet
158
+ name: resnet18
159
+ weights: null
160
+ resize_shape:
161
+ - 240
162
+ - 320
163
+ random_transforms:
164
+ - type: RandomCrop
165
+ ratio: 0.9
166
+ use_group_norm: true
167
+ share_rgb_model: false
168
+ imagenet_norm: true
169
+ use_latent_action_before_vq: ${use_latent_action_before_vq}
170
+ at:
171
+ _target_: reactive_diffusion_policy.model.vae.model.VAE
172
+ shape_meta: ${shape_meta}
173
+ horizon: ${at.policy.horizon}
174
+ n_latent_dims: ${at.policy.n_latent_dims}
175
+ mlp_layer_num: ${at.policy.mlp_layer_num}
176
+ use_conv_encoder: ${at.policy.use_conv_encoder}
177
+ conv_latent_dims: ${at.policy.conv_latent_dims}
178
+ conv_layer_num: ${at.policy.conv_layer_num}
179
+ use_rnn_decoder: ${at.policy.use_rnn_decoder}
180
+ rnn_latent_dims: ${at.policy.rnn_latent_dims}
181
+ rnn_layer_num: ${at.policy.rnn_layer_num}
182
+ use_vq: ${at.policy.use_vq}
183
+ n_embed: ${at.policy.n_embed}
184
+ vqvae_groups: ${at.policy.vqvae_groups}
185
+ eval: true
186
+ load_dir: ${at_load_dir}
187
+ act_scale: ${at.policy.act_scale}
188
+ horizon: ${horizon}
189
+ n_action_steps: ${eval:'${n_action_steps}+${n_latency_steps}'}
190
+ n_obs_steps: ${n_obs_steps}
191
+ num_inference_steps: 100
192
+ obs_as_global_cond: ${obs_as_global_cond}
193
+ diffusion_step_embed_dim: 128
194
+ down_dims:
195
+ - 512
196
+ - 1024
197
+ - 2048
198
+ kernel_size: 5
199
+ n_groups: 8
200
+ cond_predict_scale: true
201
+ ema:
202
+ _target_: reactive_diffusion_policy.model.diffusion.ema_model.EMAModel
203
+ update_after_step: 0
204
+ inv_gamma: 1.0
205
+ power: 0.75
206
+ min_value: 0.0
207
+ max_value: 0.9999
208
+ dataloader:
209
+ batch_size: 64
210
+ num_workers: 0
211
+ shuffle: true
212
+ pin_memory: true
213
+ persistent_workers: false
214
+ val_dataloader:
215
+ batch_size: 64
216
+ num_workers: 0
217
+ shuffle: false
218
+ pin_memory: true
219
+ persistent_workers: false
220
+ optimizer:
221
+ _target_: torch.optim.AdamW
222
+ lr: 0.0001
223
+ betas:
224
+ - 0.95
225
+ - 0.999
226
+ eps: 1.0e-08
227
+ weight_decay: 1.0e-06
228
+ encoder_weight_decay: 1.0e-06
229
+ training:
230
+ device: cuda:0
231
+ seed: 42
232
+ debug: false
233
+ resume: true
234
+ lr_scheduler: cosine
235
+ lr_warmup_steps: 500
236
+ num_epochs: 401
237
+ gradient_accumulate_every: 1
238
+ use_ema: true
239
+ freeze_encoder: false
240
+ rollout_every: 50
241
+ checkpoint_every: 10
242
+ val_every: 1
243
+ sample_every: 10
244
+ max_train_steps: null
245
+ max_val_steps: null
246
+ tqdm_interval_sec: 1.0
247
+ layer_decay: 1.0
248
+ encoder_lr_coefficient: 0.1
249
+ logging:
250
+ project: latent_diffusion_policy_tactile
251
+ resume: true
252
+ mode: offline
253
+ name: ${now:%Y.%m.%d-%H.%M.%S}_${name}_${task_name}
254
+ tags:
255
+ - ${name}
256
+ - ${task_name}
257
+ - ${exp_name}
258
+ id: null
259
+ group: null
260
+ checkpoint:
261
+ topk:
262
+ monitor_key: train_loss
263
+ mode: min
264
+ k: 1
265
+ format_str: epoch={epoch:04d}-train_loss={train_loss:.3f}.ckpt
266
+ save_last_ckpt: true
267
+ save_last_snapshot: false
268
+ multi_run:
269
+ run_dir: data/outputs/${now:%Y.%m.%d}/${now:%H.%M.%S}_${name}_${task_name}
270
+ wandb_name_base: ${now:%Y.%m.%d-%H.%M.%S}_${name}_${task_name}
config/resolved/ldp/overrides.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ - task=real_tactar_flipbox_wrist_wrench_ldp_10fps
2
+ - at=at_tactar_10fps
3
+ - at_load_dir=/inspire/qb-ilm2/project/robot-body/xuzijun-253108540220/reactive_diffusion_policy/runs/tactar_flipbox_rdp/20260801_0458/at/checkpoints/latest.ckpt
4
+ - task.dataset_path=/inspire/qb-ilm2/project/robot-body/xuzijun-253108540220/real_single_flexiv_tactar_flipbox_vrr_zarr
5
+ - dataloader.num_workers=0
6
+ - dataloader.persistent_workers=False
7
+ - val_dataloader.num_workers=0
8
+ - val_dataloader.persistent_workers=False
9
+ - logging.mode=offline
normalization/normalizer.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5552adfe78956d6973aefc76121ded8bcc6b0447a02d8b28d1b3fcf7c93073b1
3
+ size 14383