Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- diffusion
|
| 5 |
+
- trajectory-generation
|
| 6 |
+
- conditional-generation
|
| 7 |
+
- pytorch
|
| 8 |
+
library_name: pytorch
|
| 9 |
+
pipeline_tag: other
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# Sketch-Guided Trajectory Diffusion
|
| 13 |
+
|
| 14 |
+
A diffusion model for generating smooth and diverse trajectories conditioned on sparse sketch guidance.
|
| 15 |
+
|
| 16 |
+
This model explores sketch-conditioned trajectory simulation using denoising diffusion techniques. Given a coarse spatial sketch or trajectory prior, the model generates realistic trajectory samples that preserve the intended global structure while allowing stochastic local variation.
|
| 17 |
+
|
| 18 |
+
Blog post:
|
| 19 |
+
https://wezteoh.github.io/posts/diffusion-for-sketch-guided-trajectory-simulation/
|
| 20 |
+
|
| 21 |
+
Code base:
|
| 22 |
+
Model - https://github.com/wezteoh/gameplay-trajectory-diffusion
|
| 23 |
+
Sketch canvas - https://github.com/wezteoh/gameplay-trajectory-canvas
|
| 24 |
+
|
| 25 |
+
## Overview
|
| 26 |
+
|
| 27 |
+
The model learns a conditional diffusion process over trajectory sequences:
|
| 28 |
+
|
| 29 |
+
- Encode partially observed trajectory guidance
|
| 30 |
+
- Add noise to trajectories during training
|
| 31 |
+
- Learn iterative denoising conditioned on sketches
|
| 32 |
+
- Sample plausible trajectories at inference time
|
| 33 |
+
|
| 34 |
+
Applications include:
|
| 35 |
+
|
| 36 |
+
- game AI movement simulation
|
| 37 |
+
- multi-agent gameplay strategy simulation
|
| 38 |
+
- synthetic behavior generation
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## Model Details
|
| 43 |
+
|
| 44 |
+
### Inputs
|
| 45 |
+
|
| 46 |
+
- sparse trajectory sketches
|
| 47 |
+
- trajectory masks
|
| 48 |
+
|
| 49 |
+
### Outputs
|
| 50 |
+
|
| 51 |
+
- generated trajectory sequences
|
| 52 |
+
|
| 53 |
+
### Architecture
|
| 54 |
+
|
| 55 |
+
- diffusion transformer backbone adapted for spatiotemporal task
|
| 56 |
+
- DPM-solver / iterative DDPM-style sampling
|
| 57 |
+
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
## Usage
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
python scripts/sample_trajectory_ddpm.py \
|
| 64 |
+
--checkpoint ckpt_file_path \
|
| 65 |
+
--num-samples 8 \
|
| 66 |
+
--input-dir sketches_dir_path \
|
| 67 |
+
--save-videos
|
| 68 |
+
```
|