How yasoz/difftraj works
DiffTraj is a GPS-trajectory diffusion model. Its documented training workflow loads trajectory coordinates and eight conditioning attributes, trains a guided U-Net denoiser, and saves periodic checkpoints. A separate notebook demonstrates generation with the supplied checkpoint and example attributes; another notebook is for trajectory-to-Parquet processing. Training and model internals are evidenced in source, while generation and Parquet details are documented only by the README and notebook names.
Main entry points: main.py Training runner · Traj_Generation.ipynb Trajectory generation · Traj_UNet.py Guided U-Net · model.pt Pretrained weights
Components 16
Trajectory workflows
- Training runner
main.py - Epoch checkpoints
- Trajectory generation
process/Traj_Generation.ipynb - Pretrained weights
model.pt - Example attributes
heads.npy - Generated trajectories
- Parquet conversion
process/Traj2parquet.ipynb
Diffusion model
- Guided U-Net
utils/Traj_UNet.py - Neural layers
utils/module.py
Training support
- Model configuration
utils/config.py - EMA weights
utils/EMA.py - Training logger
utils/logger.py - Trajectory utilities
utils/utils.py - Diffusion helpers
utils/helper.py
Other components
- Researcher
- GPS data
Connections 15
- Researcher → Training runner: runs
readme.md - GPS data → Training runner: provides arrays
main.py - Training runner → Model configuration: loads
main.py - Training runner → Guided U-Net: trains
main.py - Training runner → EMA weights: updates
main.py - Training runner → Training logger: logs through
main.py - Training runner → Epoch checkpoints: saves periodically
main.py - Researcher → Trajectory generation: follows guide
readme.md - Trajectory generation → Pretrained weights: loads
readme.md - Trajectory generation → Example attributes: uses example
readme.md - Trajectory generation → Generated trajectories: generates
readme.md - Researcher → Parquet conversion: uses
- Guided U-Net → Neural layers: uses layers
- Training runner → Trajectory utilities: may use
- Training runner → Diffusion helpers: may use