File size: 2,474 Bytes
9f99dae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
tags:
- diffusion-policy
- imitation-learning
- behavioral-cloning
- robotics
- push-task
library_name: pytorch
pipeline_tag: robotics
---

# Push-F Diffusion Policy

A visuomotor diffusion policy trained to push an F-shaped block into a target orientation, adapted from the [Diffusion Policy](https://diffusion-policy.cs.columbia.edu/) codebase (Chi et al., 2023).

## Model Description

- **Architecture:** Diffusion UNet with ResNet18 image encoder
- **Parameters:** 278M
- **Observations:** 96x96 RGB image + 2D agent position
- **Actions:** 2D target position for the agent
- **Training data:** 101 human demonstrations (~29,800 timesteps)
- **Training:** 250 epochs on NVIDIA H100, ~3.5 hours
- **Framework:** PyTorch 2.0.1

## Performance

Evaluated on 50 held-out environment seeds:

| Time Limit | Mean Score | Perfect Seeds (1.0) |
|:----------:|:----------:|:-------------------:|
| 30s        | 0.837      | 19/50               |
| 45s        | 0.945      | 38/50               |
| 60s        | 0.961      | 45/50               |
| 90s        | 1.000      | 50/50               |

## Usage

```bash
git clone https://github.com/bryandong24/reu_adaptation.git
cd reu_adaptation

# Set up environment
mamba env create -f conda_environment.yaml
conda activate robodiff
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
pip install -e .

# Download checkpoint and evaluate
python eval.py --checkpoint epoch=0250-test_mean_score=0.880.ckpt -o eval_output
```

## Training Details

- **Loss:** MSE denoising loss (DDPM)
- **Optimizer:** AdamW (lr=1e-4, weight_decay=1e-6)
- **LR Schedule:** Cosine with 500-step warmup
- **Batch size:** 64
- **Horizon:** 16 steps (n_obs=2, n_action=8)
- **Diffusion steps:** 100 (training), 100 (inference)
- **EMA:** Enabled

## Citation

Based on:
```bibtex
@inproceedings{chi2023diffusionpolicy,
    title={Diffusion Policy: Visuomotor Policy Learning via Action Diffusion},
    author={Chi, Cheng and Feng, Siyuan and Du, Yilun and Xu, Zhenjia and Cousineau, Eric and Burchfiel, Benjamin and Song, Shuran},
    booktitle={Proceedings of Robotics: Science and Systems (RSS)},
    year={2023}
}
```

## Links

- [Full Report](https://github.com/bryandong24/reu_adaptation/blob/main/REPORT.md)
- [Source Code](https://github.com/bryandong24/reu_adaptation)
- [W&B Training Logs](https://wandb.ai/bryandong24-stanford-university/diffusion_policy_pushf)