File size: 2,910 Bytes
7574f4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
library_name: lerobot
pipeline_tag: robotics
tags:
- lerobot
- robotics
- so101
- imitation-learning
- parcel-sorting
- diffusion
---

# diffusion_parcel_b_80k

Diffusion Policy, trained from scratch on 99 pick-and-place demos (dataset B).

This model is part of the project **Parcel sorting with a LeRobot
SO-101 arm**. The code and the full results are in the
[GitHub repository](https://github.com/TimeisGold5168/Parcel_task_VLA_s0_101_arm). The project page is
[https://timeisgold5168.github.io/](https://timeisgold5168.github.io/).

## Task

One SO-101 arm picks a parcel from a heap and places it in a flip zone.
If the label is up, the arm flips the parcel. Then it pushes the parcel
off the table, label down. One parcel is one episode.

## Training

| Item | Value |
|---|---|
| Policy | Diffusion Policy, 1D U-Net (256, 512, 1024), 89M parameters |
| Init | from scratch |
| Data | dataset B: 99 demos, 73,444 frames |
| Training | 80k steps, batch 16, AMP, 9.4 h |
| Inference | DDIM, 10 steps |
| Checkpoint | step 80k |
| LeRobot | commit `64b23178` |
| GPU | one laptop GPU, 6 GB |

## Inputs and outputs

- `observation.images.top`: 848×480, above the tray, 30 fps.
- `observation.images.wrist`: 640×480, on the gripper, 30 fps.
- `observation.images.side`: 640×480, beside the table, 30 fps.
- `observation.state`: the 6 joint positions of the SO-101 follower.
- Task text: "sort the parcel so the label faces down and push it off the table".
- Output: joint targets of the 6 joints.

The cameras have different sizes. Diffusion stacks the images before the resize, so the repository resizes each camera first (`patch_diffusion()` in `parcel_vla/training/train_mixed.py`). Plain `lerobot-rollout` does not do this.

## Results

- Offline action error on training episodes (5 arm joints, next 1 s): 2.02°.
- Its B-spline version, `diffusion_bsp_parcel_b_40k`, gave the best robot runs.

## Use

NOTE: This model learned one scene: my tray, my camera poses, my
lighting and my self-made parcels. On another setup it will likely not
work as it is. Use it to test the code, or as a start point to
fine-tune on your own demos.

1. Install LeRobot at commit `64b23178` and the repository. See the
   [installation steps](https://github.com/TimeisGold5168/Parcel_task_VLA_s0_101_arm#installation).
2. Download the model into the checkpoint layout of the scripts:

   ```bash
   hf download Low101/diffusion_parcel_b_80k --local-dir outputs/train/diffusion_parcel_b_80k/checkpoints/last/pretrained_model
   ```

3. Put the arm at the home pose, and build the heap.
4. Run the model (model name `diffusion_b` in the scripts):

   ```bash
   bash parcel_vla/robot/run_parcel.sh diffusion_b
   ```

## Limits

- One scene, one operator and a small dataset.
- Most robot tests have few trials and one heap for each model. They
  give an indication, not a controlled comparison.