--- 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 ```