How mczhi/gameformer-planner works
GameFormer-Planner is an autonomous-driving prediction and planning framework evaluated in nuPlan. Its main workflow converts scenario data into model features, predicts interactive futures and an ego plan, and uses a map-aware planner to produce a refined driving trajectory. The README describes feature processing, path planning, model query, and trajectory refinement; the tree supports those subsystems, though excerpts do not establish every runtime connection. Training and benchmark evaluation are represented as separate product workflows.
Main entry points: planner.py nuPlan planner · run_nuplan_test.py Benchmark runner · data_process.py Scenario processing · train_predictor.py Model training
Components 19
Data preparation
- Scenario processing
data_process.py - Feature utilities
GameFormer/data_utils.py - Processed scenarios
Prediction and planning model
- GameFormer model
GameFormer/predictor.py - Model components
GameFormer/predictor_modules.py
Simulation planning
- Runtime features
Planner/observation.py - Lattice path search
Planner/state_lattice_path_planner.py - Planning utilities
Planner/planner_utils.py - Trajectory refinement
Planner/refinement.py - Motion smoother
Planner/smoother.py - Occupancy adapter
Planner/occupancy_adapter.py - nuPlan planner
Planner/planner.py
Training and evaluation
- Model training
train_predictor.py - Benchmark runner
run_nuplan_test.py - Metrics and reports
common_utils.py
Other components
- nuPlan data
- nuPlan maps
- nuPlan simulation
- Trained model
Connections 22
- nuPlan data → Scenario processing: scenario input
- nuPlan maps → Scenario processing: map input
- Scenario processing → Feature utilities: uses features
- Scenario processing → Processed scenarios: writes features
- Processed scenarios → Model training: training data
- Model training → GameFormer model: trains model
- Model training → Trained model: saves weights
- nuPlan planner → Runtime features: builds features
- nuPlan planner → Lattice path search: requests path
- nuPlan planner → GameFormer model: queries model
- GameFormer model → Model components: uses modules
- nuPlan planner → Trajectory refinement: refines trajectory
- nuPlan planner → Occupancy adapter: uses occupancy
- nuPlan planner → Planning utilities: uses utilities
- Lattice path search → Planning utilities: uses utilities
- Trajectory refinement → Motion smoother: smooths path
- nuPlan simulation → nuPlan planner: requests plans
- Benchmark runner → nuPlan simulation: runs scenarios
- Benchmark runner → nuPlan planner: configures planner
- Benchmark runner → Trained model: loads weights
- Benchmark runner → Metrics and reports: builds metrics
- nuPlan simulation → Metrics and reports: provides results