File size: 1,678 Bytes
c026f6b fe72e87 c026f6b fe72e87 | 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 | ---
license: mit
tags:
- diffusion
- trajectory-generation
- conditional-generation
- pytorch
library_name: pytorch
pipeline_tag: other
---
# Sketch-Guided Trajectory Diffusion
A diffusion model for generating smooth and diverse trajectories conditioned on sparse sketch guidance.
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.
Blog post:
https://wezteoh.github.io/posts/diffusion-for-sketch-guided-trajectory-simulation/
Code base:
Model - https://github.com/wezteoh/gameplay-trajectory-diffusion
Sketch canvas - https://github.com/wezteoh/gameplay-trajectory-canvas
## Overview
The model learns a conditional diffusion process over trajectory sequences:
- Encode partially observed trajectory guidance
- Add noise to trajectories during training
- Learn iterative denoising conditioned on sketches
- Sample plausible trajectories at inference time
Applications include:
- game AI movement simulation
- multi-agent gameplay strategy simulation
- synthetic behavior generation
---
## Model Details
### Inputs
- sparse trajectory sketches
- trajectory masks
### Outputs
- generated trajectory sequences
### Architecture
- diffusion transformer backbone adapted for spatiotemporal task
- DPM-solver / iterative DDPM-style sampling
---
## Usage
```python
python scripts/sample_trajectory_ddpm.py \
--checkpoint ckpt_file_path \
--num-samples 8 \
--input-dir sketches_dir_path \
--save-videos
``` |