Ngseo commited on
Commit
28be235
·
verified ·
1 Parent(s): 77121f6

Uiwang-right DINOv3-ViTB16 FlowMatch diffusion policy (200k)

Browse files
README.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: lerobot
3
+ pipeline_tag: robotics
4
+ tags: [lerobot, diffusion-policy, flow-matching, dinov3, robotics, manipulation]
5
+ ---
6
+
7
+ # Hyundai Uiwang — Diffusion Policy (FlowMatch), RIGHT arm — **DINOv3 backbone**
8
+
9
+ LeRobot Diffusion Policy trained on the Hyundai Uiwang **right**-arm dataset
10
+ (118 episodes / 77,490 frames, 30 Hz), FlowMatch scheduler (`num_inference_steps=1`).
11
+ Robot: HDRB + INSPIRE-RH56. Vision encoder: **facebook/dinov3-vitb16-pretrain-lvd1689m**
12
+ (ViT-B/16), pretrained + frozen. Inputs: front_rgb + wrist_rgb + state(26) +
13
+ gripper_sensor(30) + wrist_ft_sensor(6) -> action(26).
14
+
15
+ ## Load-time requirements (important)
16
+ 1. **DINOv3 gated access**: loading constructs the backbone via
17
+ `AutoModel.from_pretrained("facebook/dinov3-vitb16-pretrain-lvd1689m")`, which is gated —
18
+ accept the license on that model page with your HF account first.
19
+ 2. **lerobot with DINOv3 register-token support**: the `Dinov2Backbone` wrapper must strip
20
+ CLS + register tokens (DINOv3 has 4 registers). Use the snu-hyundai fork branch that
21
+ includes this patch, or the loaded patch features will be misaligned.
config.json ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "observation.images.front_rgb": {
6
+ "type": "VISUAL",
7
+ "shape": [
8
+ 3,
9
+ 480,
10
+ 640
11
+ ]
12
+ },
13
+ "observation.images.wrist_rgb": {
14
+ "type": "VISUAL",
15
+ "shape": [
16
+ 3,
17
+ 480,
18
+ 640
19
+ ]
20
+ },
21
+ "observation.state": {
22
+ "type": "STATE",
23
+ "shape": [
24
+ 26
25
+ ]
26
+ },
27
+ "observation.gripper_sensor": {
28
+ "type": "STATE",
29
+ "shape": [
30
+ 30
31
+ ]
32
+ },
33
+ "observation.wrist_ft_sensor": {
34
+ "type": "STATE",
35
+ "shape": [
36
+ 6
37
+ ]
38
+ }
39
+ },
40
+ "output_features": {
41
+ "action": {
42
+ "type": "ACTION",
43
+ "shape": [
44
+ 26
45
+ ]
46
+ }
47
+ },
48
+ "device": "cuda",
49
+ "use_amp": false,
50
+ "use_peft": false,
51
+ "push_to_hub": false,
52
+ "repo_id": null,
53
+ "private": null,
54
+ "tags": null,
55
+ "license": null,
56
+ "pretrained_path": null,
57
+ "horizon": 16,
58
+ "n_action_steps": 8,
59
+ "normalization_mapping": {
60
+ "VISUAL": "IDENTITY",
61
+ "STATE": "MIN_MAX",
62
+ "ACTION": "MIN_MAX"
63
+ },
64
+ "drop_n_last_frames": 7,
65
+ "vision_backbone": "dinov2",
66
+ "theia_model_name": "theaiinstitute/theia-tiny-patch16-224-cdiv",
67
+ "dinov2_model_name": "facebook/dinov3-vitb16-pretrain-lvd1689m",
68
+ "freeze_vision_backbone": true,
69
+ "resize_shape": [
70
+ 240,
71
+ 320
72
+ ],
73
+ "crop_ratio": 0.9,
74
+ "crop_shape": [
75
+ 216,
76
+ 288
77
+ ],
78
+ "crop_is_random": true,
79
+ "pretrained_backbone_weights": null,
80
+ "use_group_norm": true,
81
+ "spatial_softmax_num_keypoints": 64,
82
+ "use_separate_rgb_encoder_per_camera": false,
83
+ "use_mask": false,
84
+ "mask_encoder_base_dim": 64,
85
+ "mask_feature_dim": 128,
86
+ "mask_height": 240,
87
+ "mask_width": 320,
88
+ "down_dims": [
89
+ 512,
90
+ 1024,
91
+ 2048
92
+ ],
93
+ "kernel_size": 5,
94
+ "n_groups": 8,
95
+ "diffusion_step_embed_dim": 128,
96
+ "use_film_scale_modulation": true,
97
+ "noise_scheduler_type": "FlowMatch",
98
+ "num_train_timesteps": 100,
99
+ "beta_schedule": "squaredcos_cap_v2",
100
+ "beta_start": 0.0001,
101
+ "beta_end": 0.02,
102
+ "prediction_type": "epsilon",
103
+ "clip_sample": true,
104
+ "clip_sample_range": 1.0,
105
+ "num_inference_steps": 1,
106
+ "use_adaflow_inference": false,
107
+ "adaflow_min_steps": 1,
108
+ "adaflow_max_steps": 4,
109
+ "adaflow_convergence_threshold": 0.01,
110
+ "use_rtc": false,
111
+ "rtc_inference_delay": 0,
112
+ "rtc_execution_horizon": 0,
113
+ "compile_model": false,
114
+ "compile_mode": "reduce-overhead",
115
+ "do_mask_loss_for_padding": false,
116
+ "optimizer_lr": 0.0001,
117
+ "optimizer_betas": [
118
+ 0.95,
119
+ 0.999
120
+ ],
121
+ "optimizer_eps": 1e-08,
122
+ "optimizer_weight_decay": 1e-06,
123
+ "scheduler_name": "cosine",
124
+ "scheduler_warmup_steps": 500
125
+ }
inference_example.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Portable inference example for the Hyundai Uiwang FlowMatch Diffusion Policy.
4
+
5
+ Runs with ONLY the Hugging Face model id — no dataset download, no robot, no
6
+ local checkpoint needed. The uploaded model bundles its normalization stats
7
+ (policy_preprocessor / policy_postprocessor), so `make_pre_post_processors`
8
+ loads everything straight from the Hub.
9
+
10
+ What you need to provide at run time:
11
+ * front_rgb : np.uint8 (H, W, 3) RGB — scene/zivid camera view
12
+ * wrist_rgb : np.uint8 (H, W, 3) RGB — wrist camera view
13
+ * state : np.float32 (26,) — arm joints (6) + hand joints (20)
14
+
15
+ The policy resizes images internally (to 240x320 then center-crops), so the
16
+ input camera resolution does not need to match training exactly — just pass the
17
+ raw RGB frames.
18
+
19
+ Output: np.float32 (26,) action = target arm joints (6) + target hand joints (20), at 30 Hz.
20
+
21
+ Usage:
22
+ # self-contained demo with synthetic frames (verifies the model loads + runs):
23
+ python examples/hyundai_uiwang/inference_example.py
24
+
25
+ # specify a different model / device:
26
+ python examples/hyundai_uiwang/inference_example.py --model-id Ngseo/hyundai-uiwang-right-flowmatch-dinov3 --device cuda
27
+
28
+ Install (once):
29
+ pip install lerobot # or use this repo with PYTHONPATH=src
30
+ """
31
+
32
+ from __future__ import annotations
33
+
34
+ import argparse
35
+
36
+ import numpy as np
37
+ import torch
38
+
39
+ from lerobot.policies.diffusion.modeling_diffusion import DiffusionPolicy
40
+ from lerobot.policies.factory import make_pre_post_processors
41
+
42
+ DEFAULT_MODEL_ID = "Ngseo/hyundai-uiwang-right-flowmatch-dinov3"
43
+ # Camera feature keys the model was trained with (see the model card / config.json).
44
+ FRONT_KEY = "observation.images.front_rgb"
45
+ WRIST_KEY = "observation.images.wrist_rgb"
46
+ STATE_KEY = "observation.state"
47
+
48
+
49
+ def load_policy(model_id: str = DEFAULT_MODEL_ID, device: str = "cuda"):
50
+ """Load the policy + pre/post processors from the Hugging Face Hub."""
51
+ device = device if (device != "cuda" or torch.cuda.is_available()) else "cpu"
52
+ policy = DiffusionPolicy.from_pretrained(model_id)
53
+ policy.config.device = device # saved config pins device=cuda; align it to the runtime device
54
+ policy.to(device)
55
+ policy.eval()
56
+ policy.reset() # clears the internal observation/action queues
57
+ # pretrained_path=model_id -> normalization stats are loaded from the Hub repo.
58
+ # Override the saved device_processor step so preprocessing targets `device` too.
59
+ preprocess, postprocess = make_pre_post_processors(
60
+ policy.config, model_id, preprocessor_overrides={"device_processor": {"device": device}}
61
+ )
62
+ return policy, preprocess, postprocess, device
63
+
64
+
65
+ @torch.no_grad()
66
+ def predict_action(
67
+ policy,
68
+ preprocess,
69
+ postprocess,
70
+ front_rgb: np.ndarray,
71
+ wrist_rgb: np.ndarray,
72
+ state: np.ndarray,
73
+ device: str = "cuda",
74
+ ) -> np.ndarray:
75
+ """Run one inference step and return a 26-d action as np.float32.
76
+
77
+ Note: the policy keeps an internal queue (n_obs_steps / n_action_steps), so
78
+ call this repeatedly at the control loop rate; `policy.reset()` starts a new
79
+ episode.
80
+ """
81
+ # Raw frame dict in the format expected by the preprocessor:
82
+ # images: uint8 (H, W, C); state: float32 (D,) — batching/normalization
83
+ # are handled by the processor pipeline.
84
+ obs = {
85
+ FRONT_KEY: torch.from_numpy(front_rgb).to(torch.float32).div(255).permute(2, 0, 1).unsqueeze(0).to(device),
86
+ WRIST_KEY: torch.from_numpy(wrist_rgb).to(torch.float32).div(255).permute(2, 0, 1).unsqueeze(0).to(device),
87
+ STATE_KEY: torch.from_numpy(state).to(torch.float32).unsqueeze(0).to(device),
88
+ "task": "",
89
+ "robot_type": "",
90
+ }
91
+ obs = preprocess(obs)
92
+ action = policy.select_action(obs) # (1, 26), normalized
93
+ action = postprocess(action) # unnormalized
94
+ return action.squeeze(0).float().cpu().numpy()
95
+
96
+
97
+ def main() -> None:
98
+ ap = argparse.ArgumentParser()
99
+ ap.add_argument("--model-id", default=DEFAULT_MODEL_ID)
100
+ ap.add_argument("--device", default="cuda", choices=["cuda", "cpu", "mps"])
101
+ ap.add_argument("--steps", type=int, default=4, help="number of demo inference steps")
102
+ args = ap.parse_args()
103
+
104
+ print(f"Loading {args.model_id} ...")
105
+ policy, preprocess, postprocess, device = load_policy(args.model_id, args.device)
106
+
107
+ # Report what the model expects (handy when porting to a new robot).
108
+ img_keys = [k for k in policy.config.input_features if "image" in k]
109
+ state_dim = policy.config.input_features[STATE_KEY].shape[0]
110
+ action_dim = policy.config.output_features["action"].shape[0]
111
+ print(f"device={device} | cameras={img_keys} | state_dim={state_dim} | action_dim={action_dim}")
112
+
113
+ # --- demo with synthetic frames (replace these with real camera/robot data) ---
114
+ rng = np.random.default_rng(0)
115
+ for t in range(args.steps):
116
+ front_rgb = rng.integers(0, 256, size=(480, 640, 3), dtype=np.uint8)
117
+ wrist_rgb = rng.integers(0, 256, size=(480, 640, 3), dtype=np.uint8)
118
+ state = rng.standard_normal(state_dim).astype(np.float32)
119
+
120
+ action = predict_action(policy, preprocess, postprocess, front_rgb, wrist_rgb, state, device)
121
+ print(f"step {t}: action[26] = {np.array2string(action, precision=3, max_line_width=120)}")
122
+
123
+ print("\nOK — model runs from the HF id alone. Swap the synthetic frames for your robot's cameras/state.")
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fa8794ffd5bd4a5aae4b9c5898b46087c92acccaa97b464994d8f67acd92eea
3
+ size 1398891600
policy_postprocessor.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_postprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "unnormalizer_processor",
6
+ "config": {
7
+ "eps": 1e-08,
8
+ "features": {
9
+ "action": {
10
+ "type": "ACTION",
11
+ "shape": [
12
+ 26
13
+ ]
14
+ }
15
+ },
16
+ "norm_map": {
17
+ "VISUAL": "IDENTITY",
18
+ "STATE": "MIN_MAX",
19
+ "ACTION": "MIN_MAX"
20
+ }
21
+ },
22
+ "state_file": "policy_postprocessor_step_0_unnormalizer_processor.safetensors"
23
+ },
24
+ {
25
+ "registry_name": "device_processor",
26
+ "config": {
27
+ "device": "cpu",
28
+ "float_dtype": null
29
+ }
30
+ }
31
+ ]
32
+ }
policy_postprocessor_step_0_unnormalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58e7433b278337b293786ff7ab0591a02bb8e2d2b2584f22aa7f95c9957fe45d
3
+ size 12320
policy_preprocessor.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_preprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "rename_observations_processor",
6
+ "config": {
7
+ "rename_map": {}
8
+ }
9
+ },
10
+ {
11
+ "registry_name": "to_batch_processor",
12
+ "config": {}
13
+ },
14
+ {
15
+ "registry_name": "device_processor",
16
+ "config": {
17
+ "device": "cuda",
18
+ "float_dtype": null
19
+ }
20
+ },
21
+ {
22
+ "registry_name": "normalizer_processor",
23
+ "config": {
24
+ "eps": 1e-08,
25
+ "features": {
26
+ "observation.images.front_rgb": {
27
+ "type": "VISUAL",
28
+ "shape": [
29
+ 3,
30
+ 480,
31
+ 640
32
+ ]
33
+ },
34
+ "observation.images.wrist_rgb": {
35
+ "type": "VISUAL",
36
+ "shape": [
37
+ 3,
38
+ 480,
39
+ 640
40
+ ]
41
+ },
42
+ "observation.state": {
43
+ "type": "STATE",
44
+ "shape": [
45
+ 26
46
+ ]
47
+ },
48
+ "observation.gripper_sensor": {
49
+ "type": "STATE",
50
+ "shape": [
51
+ 30
52
+ ]
53
+ },
54
+ "observation.wrist_ft_sensor": {
55
+ "type": "STATE",
56
+ "shape": [
57
+ 6
58
+ ]
59
+ },
60
+ "action": {
61
+ "type": "ACTION",
62
+ "shape": [
63
+ 26
64
+ ]
65
+ }
66
+ },
67
+ "norm_map": {
68
+ "VISUAL": "IDENTITY",
69
+ "STATE": "MIN_MAX",
70
+ "ACTION": "MIN_MAX"
71
+ }
72
+ },
73
+ "state_file": "policy_preprocessor_step_3_normalizer_processor.safetensors"
74
+ }
75
+ ]
76
+ }
policy_preprocessor_step_3_normalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58e7433b278337b293786ff7ab0591a02bb8e2d2b2584f22aa7f95c9957fe45d
3
+ size 12320
train_config.json ADDED
@@ -0,0 +1,376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "local/hyundai_uiwang_right",
4
+ "root": "data/lerobot/hyundai_uiwang_right",
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": false,
8
+ "max_num_transforms": 3,
9
+ "random_order": false,
10
+ "p_apply": 1.0,
11
+ "domain_randomization": false,
12
+ "tfs": {
13
+ "brightness": {
14
+ "weight": 1.0,
15
+ "type": "ColorJitter",
16
+ "kwargs": {
17
+ "brightness": [
18
+ 0.8,
19
+ 1.2
20
+ ]
21
+ }
22
+ },
23
+ "contrast": {
24
+ "weight": 1.0,
25
+ "type": "ColorJitter",
26
+ "kwargs": {
27
+ "contrast": [
28
+ 0.8,
29
+ 1.2
30
+ ]
31
+ }
32
+ },
33
+ "saturation": {
34
+ "weight": 1.0,
35
+ "type": "ColorJitter",
36
+ "kwargs": {
37
+ "saturation": [
38
+ 0.5,
39
+ 1.5
40
+ ]
41
+ }
42
+ },
43
+ "hue": {
44
+ "weight": 1.0,
45
+ "type": "ColorJitter",
46
+ "kwargs": {
47
+ "hue": [
48
+ -0.05,
49
+ 0.05
50
+ ]
51
+ }
52
+ },
53
+ "sharpness": {
54
+ "weight": 1.0,
55
+ "type": "SharpnessJitter",
56
+ "kwargs": {
57
+ "sharpness": [
58
+ 0.5,
59
+ 1.5
60
+ ]
61
+ }
62
+ },
63
+ "affine": {
64
+ "weight": 1.0,
65
+ "type": "RandomAffine",
66
+ "kwargs": {
67
+ "degrees": [
68
+ -5.0,
69
+ 5.0
70
+ ],
71
+ "translate": [
72
+ 0.05,
73
+ 0.05
74
+ ]
75
+ }
76
+ },
77
+ "lighting": {
78
+ "weight": 0.0,
79
+ "type": "RandomLighting",
80
+ "kwargs": {
81
+ "gain_range": [
82
+ 0.7,
83
+ 1.3
84
+ ]
85
+ }
86
+ },
87
+ "gamma": {
88
+ "weight": 0.0,
89
+ "type": "RandomGamma",
90
+ "kwargs": {
91
+ "gamma_range": [
92
+ 0.7,
93
+ 1.5
94
+ ]
95
+ }
96
+ },
97
+ "sensor_noise": {
98
+ "weight": 0.0,
99
+ "type": "RandomSensorNoise",
100
+ "kwargs": {
101
+ "shot_range": [
102
+ 0.0,
103
+ 0.04
104
+ ],
105
+ "read_range": [
106
+ 0.0,
107
+ 0.01
108
+ ]
109
+ }
110
+ },
111
+ "gaussian_blur": {
112
+ "weight": 0.0,
113
+ "type": "GaussianBlur",
114
+ "kwargs": {
115
+ "kernel_size": 5,
116
+ "sigma": [
117
+ 0.1,
118
+ 2.0
119
+ ]
120
+ }
121
+ },
122
+ "intrinsics": {
123
+ "weight": 0.0,
124
+ "type": "RandomIntrinsics",
125
+ "kwargs": {
126
+ "focal_scale_range": [
127
+ 0.8,
128
+ 1.2
129
+ ],
130
+ "distortion_range": [
131
+ -0.3,
132
+ 0.0
133
+ ]
134
+ }
135
+ },
136
+ "unprocessor": {
137
+ "weight": 0.0,
138
+ "type": "RandomUnprocessor",
139
+ "kwargs": {
140
+ "gamma_range": [
141
+ 1.8,
142
+ 2.6
143
+ ],
144
+ "ccm_noise": 0.05,
145
+ "shot_range": [
146
+ 0.0,
147
+ 0.0005
148
+ ],
149
+ "read_range": [
150
+ 0.0,
151
+ 0.0001
152
+ ]
153
+ }
154
+ },
155
+ "corruption": {
156
+ "weight": 0.0,
157
+ "type": "RandomCorruption",
158
+ "kwargs": {
159
+ "severity_range": [
160
+ 1,
161
+ 3
162
+ ],
163
+ "corruption_types": [
164
+ "noise",
165
+ "blur",
166
+ "digital"
167
+ ]
168
+ }
169
+ },
170
+ "corner_crop": {
171
+ "weight": 0.0,
172
+ "type": "RandomCornerCrop",
173
+ "kwargs": {
174
+ "crop_ratios": [
175
+ 0.05,
176
+ 0.1,
177
+ 0.2
178
+ ]
179
+ }
180
+ },
181
+ "warping": {
182
+ "weight": 0.0,
183
+ "type": "RandomWarp",
184
+ "kwargs": {
185
+ "distortion_scale_range": [
186
+ 0.1,
187
+ 0.4
188
+ ]
189
+ }
190
+ }
191
+ }
192
+ },
193
+ "revision": null,
194
+ "use_imagenet_stats": true,
195
+ "video_backend": "torchcodec",
196
+ "streaming": false
197
+ },
198
+ "env": null,
199
+ "policy": {
200
+ "type": "diffusion",
201
+ "n_obs_steps": 2,
202
+ "input_features": {
203
+ "observation.images.front_rgb": {
204
+ "type": "VISUAL",
205
+ "shape": [
206
+ 3,
207
+ 480,
208
+ 640
209
+ ]
210
+ },
211
+ "observation.images.wrist_rgb": {
212
+ "type": "VISUAL",
213
+ "shape": [
214
+ 3,
215
+ 480,
216
+ 640
217
+ ]
218
+ },
219
+ "observation.state": {
220
+ "type": "STATE",
221
+ "shape": [
222
+ 26
223
+ ]
224
+ },
225
+ "observation.gripper_sensor": {
226
+ "type": "STATE",
227
+ "shape": [
228
+ 30
229
+ ]
230
+ },
231
+ "observation.wrist_ft_sensor": {
232
+ "type": "STATE",
233
+ "shape": [
234
+ 6
235
+ ]
236
+ }
237
+ },
238
+ "output_features": {
239
+ "action": {
240
+ "type": "ACTION",
241
+ "shape": [
242
+ 26
243
+ ]
244
+ }
245
+ },
246
+ "device": "cuda",
247
+ "use_amp": false,
248
+ "use_peft": false,
249
+ "push_to_hub": false,
250
+ "repo_id": null,
251
+ "private": null,
252
+ "tags": null,
253
+ "license": null,
254
+ "pretrained_path": null,
255
+ "horizon": 16,
256
+ "n_action_steps": 8,
257
+ "normalization_mapping": {
258
+ "VISUAL": "IDENTITY",
259
+ "STATE": "MIN_MAX",
260
+ "ACTION": "MIN_MAX"
261
+ },
262
+ "drop_n_last_frames": 7,
263
+ "vision_backbone": "dinov2",
264
+ "theia_model_name": "theaiinstitute/theia-tiny-patch16-224-cdiv",
265
+ "dinov2_model_name": "facebook/dinov3-vitb16-pretrain-lvd1689m",
266
+ "freeze_vision_backbone": true,
267
+ "resize_shape": [
268
+ 240,
269
+ 320
270
+ ],
271
+ "crop_ratio": 0.9,
272
+ "crop_shape": [
273
+ 216,
274
+ 288
275
+ ],
276
+ "crop_is_random": true,
277
+ "pretrained_backbone_weights": null,
278
+ "use_group_norm": true,
279
+ "spatial_softmax_num_keypoints": 64,
280
+ "use_separate_rgb_encoder_per_camera": false,
281
+ "use_mask": false,
282
+ "mask_encoder_base_dim": 64,
283
+ "mask_feature_dim": 128,
284
+ "mask_height": 240,
285
+ "mask_width": 320,
286
+ "down_dims": [
287
+ 512,
288
+ 1024,
289
+ 2048
290
+ ],
291
+ "kernel_size": 5,
292
+ "n_groups": 8,
293
+ "diffusion_step_embed_dim": 128,
294
+ "use_film_scale_modulation": true,
295
+ "noise_scheduler_type": "FlowMatch",
296
+ "num_train_timesteps": 100,
297
+ "beta_schedule": "squaredcos_cap_v2",
298
+ "beta_start": 0.0001,
299
+ "beta_end": 0.02,
300
+ "prediction_type": "epsilon",
301
+ "clip_sample": true,
302
+ "clip_sample_range": 1.0,
303
+ "num_inference_steps": 1,
304
+ "use_adaflow_inference": false,
305
+ "adaflow_min_steps": 1,
306
+ "adaflow_max_steps": 4,
307
+ "adaflow_convergence_threshold": 0.01,
308
+ "use_rtc": false,
309
+ "rtc_inference_delay": 0,
310
+ "rtc_execution_horizon": 0,
311
+ "compile_model": false,
312
+ "compile_mode": "reduce-overhead",
313
+ "do_mask_loss_for_padding": false,
314
+ "optimizer_lr": 0.0001,
315
+ "optimizer_betas": [
316
+ 0.95,
317
+ 0.999
318
+ ],
319
+ "optimizer_eps": 1e-08,
320
+ "optimizer_weight_decay": 1e-06,
321
+ "scheduler_name": "cosine",
322
+ "scheduler_warmup_steps": 500
323
+ },
324
+ "output_dir": "outputs/train/uiwang_right_dinov3b_flowmatch",
325
+ "job_name": "uiwang_right_dinov3b_flowmatch",
326
+ "resume": false,
327
+ "seed": 1000,
328
+ "cudnn_deterministic": false,
329
+ "num_workers": 8,
330
+ "batch_size": 64,
331
+ "steps": 200000,
332
+ "eval_freq": 0,
333
+ "log_freq": 200,
334
+ "tolerance_s": 0.0001,
335
+ "save_checkpoint": true,
336
+ "save_freq": 20000,
337
+ "use_policy_training_preset": true,
338
+ "optimizer": {
339
+ "type": "adam",
340
+ "lr": 0.0001,
341
+ "weight_decay": 1e-06,
342
+ "grad_clip_norm": 10.0,
343
+ "betas": [
344
+ 0.95,
345
+ 0.999
346
+ ],
347
+ "eps": 1e-08
348
+ },
349
+ "scheduler": {
350
+ "type": "diffuser",
351
+ "num_warmup_steps": 500,
352
+ "name": "cosine"
353
+ },
354
+ "eval": {
355
+ "n_episodes": 50,
356
+ "batch_size": 50,
357
+ "use_async_envs": false
358
+ },
359
+ "wandb": {
360
+ "enable": false,
361
+ "disable_artifact": false,
362
+ "project": "lerobot",
363
+ "entity": null,
364
+ "notes": null,
365
+ "run_id": null,
366
+ "mode": null
367
+ },
368
+ "peft": null,
369
+ "use_rabc": false,
370
+ "rabc_progress_path": null,
371
+ "rabc_kappa": 0.01,
372
+ "rabc_epsilon": 1e-06,
373
+ "rabc_head_mode": "sparse",
374
+ "rename_map": {},
375
+ "checkpoint_path": null
376
+ }