You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notebooks/lerobot_act/README.md
+69-7Lines changed: 69 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
1
# ACT Policy → OpenVINO IR Conversion (Notebook Guide)
2
-
3
2
This README documents the current workflow implemented in `act_to_openvino.ipynb` for converting a LeRobot ACT (Action Chunking Transformer) PyTorch checkpoint into an OpenVINO IR (XML/BIN) model. The notebook presently performs FP32 export (Model Optimizer invoked with FP16 compression flag but output standardized to `act_model_fp32.xml/bin`).
4
3
5
4
@@ -10,13 +9,17 @@ Place these next to the notebook:
@@ -49,16 +52,75 @@ Artifacts are copied / renamed to:
49
52
*`act_model_fp32.xml`
50
53
*`act_model_fp32.bin`
51
54
52
-
## Directory Layout After Successful Conversion
55
+
## Direct PyTorch FX Conversion
56
+
Instead of exporting full temporal tensors via ONNX you can generate a smaller IR directly from PyTorch using OpenVINO's FX path. The wrapper internally creates placeholder temporal inputs (`action`, `action_is_pad`, history) so the IR exposes only observation features:
57
+
*`observation_state`
58
+
*`observation_images_0..N` (one input per camera)
59
+
60
+
Resulting files:
61
+
*`act_model_direct_fp32.xml/bin`
62
+
*`act_model_direct_fp16.xml/bin`
63
+
64
+
## INT8 Quantization (NNCF)
65
+
You can produce an INT8 version for reduced size / latency using NNCF post‑training quantization.
66
+
67
+
Prerequisites:
68
+
* Direct FP32 IR: `act_model_direct_fp32.xml`
69
+
* Representative dataset root (`ACT_DATASET_ROOT`) with episodes
70
+
* Normalization stats: `stats.json`
71
+
72
+
Generated files:
73
+
*`openvino_ir_outputs/int8/model_int8.xml/bin`
74
+
75
+
Tips:
76
+
* Increase calibration samples for better accuracy.
77
+
* Use `preset='accuracy'` if performance preset degrades results too much.
78
+
* Ensure OpenVINO and NNCF versions are compatible (>= 2025.0.0 for OpenVINO runtime if using latest NNCF).
79
+
80
+
81
+
## Evaluation of Variants
82
+
The notebook / helper script can compare PyTorch baseline vs IR variants (Direct FP32, FP16, MO FP32, INT8).
83
+
84
+
Environment variables (set before running evaluation cell):
85
+
| Var | Purpose |
86
+
|-----|---------|
87
+
|`OPENVINO_MODEL_PATH`| Path to IR `.xml` file to evaluate |
88
+
|`STATS_PATH`| Path to `stats.json` for normalization |
0 commit comments