This repository contains a compact training and evaluation implementation for CURVE: Learning Causality-Inspired Invariant Representations for Robust Scene Understanding via Uncertainty-Guided Regularization.
The implementation covers the core components of CURVE, including:
- Object-level feature construction
- Variational scene graph generation
- Uncertainty-aware relational intervention
- Differentiable structure learning
- Temporal aggregation and prediction
The code supports the experimental regimes reported in the paper, including in-distribution evaluation, zero-shot out-of-distribution generalization, and sim-to-real transfer under varying supervision levels.
Use a Python environment with:
- PyTorch
- PyTorch Geometric
- scikit-learn
- pandas
- matplotlib
- wandb
- pytorch-nlp
You can install the minimal Python dependencies with:
pip install -r requirements.txtRun training and evaluation with:
python scripts/train.py --yaml_path config/main_config.yaml --input_path /path/to/dataset.pklTo force CPU execution:
python scripts/train.py --yaml_path config/main_config.yaml --device cpu --input_path /path/to/dataset.pklTo evaluate a saved checkpoint:
python scripts/train.py \
--yaml_path config/main_config.yaml \
--input_path /path/to/dataset.pkl \
--model_load_path /path/to/model.ptIf your dataset pickle depends on classes from another repository, expose that code with:
export CURVE_EXTRA_PYTHONPATH=/path/to/external/repoThe transfer learning entrypoint remains available at scripts/transfer.py and uses config/transfer_config.yaml.
This codebase follows the RS2G pipeline and uses RoadScene2Vec-style preprocessing for scene graph construction.
- The source-domain training setup follows the same processing protocol as RS2G.
- DeepAccident is used for zero-shot out-of-distribution evaluation.
- DoTA is used for sim-to-real transfer evaluation.
The processed datasets are not included in this repository. DeepAccident and DoTA cannot be redistributed here because we do not have permission to open-source them.