This repository keeps three feed-forward Gaussian reconstruction variants under one training pipeline so they can be trained and compared directly.
| Variant | Student | Teacher / pseudo-supervision | Config name |
|---|---|---|---|
| AnySplat | VGGT | VGGT | anysplat |
| GenSplat | VGGT | Pi3 | gensplat |
| GenSplatPi3 | Pi3 | Pi3 | gensplatpi3 |
Source layout:
src/model/encoder/anysplat.py: preservedVGGT student + VGGT teachersrc/model/encoder/gensplat.py: mainVGGT student + Pi3 teachersrc/model/encoder/gensplatpi3.py: comparisonPi3 student + Pi3 teacher
This repository follows the same environment style as AnySplat, with one extra dependency required by the Pi3-based paths: utils3d.
The commands below are a practical Linux baseline for Python 3.10, PyTorch 2.2, and CUDA 12.1.
conda create -y -n gensplat python=3.10
conda activate gensplat
pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121
pip install \
numpy==1.25.0 wheel tqdm lightning black ruff hydra-core jaxtyping beartype \
einops colorama scikit-image colorspacious matplotlib moviepy imageio timm \
dacite lpips e3nn plyfile tabulate svg.py scikit-video swanlab tyro viser \
pycolmap opencv-python Pillow huggingface_hub gradio xformers==0.0.24 \
torch_scatter==2.1.2 pydantic open3d safetensors utils3d
pip install git+https://github.com/facebookresearch/pytorch3d.git
pip install https://github.com/nerfstudio-project/gsplat/releases/download/v1.4.0/gsplat-1.4.0%2Bpt22cu121-cp310-cp310-linux_x86_64.whlNotes:
- If your CUDA or PyTorch version differs, adjust the
torch,xformers,torch_scatter, andgsplatwheels accordingly. - The training entry point is
src/main.py. - The default training preset in this repository is
+experiment=droid.
Before launching training:
- Set the dataset root in
config/dataset/droid.yaml, or override it from the command line. - Decide whether you want to initialize from an existing checkpoint or start from the default Hugging Face weights.
- Be explicit about
checkpointing.load, becauseconfig/experiment/droid.yamlcontains a sample checkpoint path.
Useful checkpoint arguments:
model.encoder.pretrained_weights: initialize the student or the full model from a local checkpointmodel.encoder.distiller_pretrained_weights: initialize the Pi3 teacher in thegensplatvariantcheckpointing.load: resume or override from an existing full checkpoint
If you do not want to resume from an existing run, set:
checkpointing.load=nullThis is the preserved original baseline.
CUDA_VISIBLE_DEVICES=0,1,2,3 python src/main.py \
+experiment=droid \
model/encoder=anysplat \
checkpointing.load=null \
model.encoder.pretrained_weights=/path/to/anysplat_model.safetensors \
swanlab.mode=offlineIf you want to start from the default VGGT Hugging Face weights only, omit model.encoder.pretrained_weights.
This is the main variant in this repository.
Recommended initialization:
- student initialized from an AnySplat checkpoint
- teacher initialized from a Pi3 checkpoint
CUDA_VISIBLE_DEVICES=0,1,2,3 python src/main.py \
+experiment=droid \
model/encoder=gensplat \
checkpointing.load=null \
model.encoder.pretrained_weights=/path/to/anysplat_model.safetensors \
model.encoder.distiller_pretrained_weights=/path/to/pi3_checkpoint.pt \
swanlab.mode=offlineIf model.encoder.distiller_pretrained_weights is omitted, the teacher falls back to yyfz233/Pi3 through Pi3.from_pretrained(...).
This variant is kept as a comparison model.
CUDA_VISIBLE_DEVICES=0,1,2,3 python src/main.py \
+experiment=droid \
model/encoder=gensplatpi3 \
checkpointing.load=null \
swanlab.mode=offlineYou can still provide model.encoder.pretrained_weights or checkpointing.load if you have a compatible full checkpoint.
With +experiment=droid, training outputs are written under:
output/exp_<swanlab.name>/<timestamp>/
The default checkpoint directory is:
output/exp_<swanlab.name>/<timestamp>/checkpoints/
The repository includes augment_parquet.py for parquet-based data augmentation with single-view GenSplat novel-view synthesis.
The script:
- reads all
.parquetfiles from--input_dir - processes
observation.image1andobservation.image2independently - reconstructs each image as a single-view Gaussian scene
- perturbs the predicted camera translation by
--trans_noise - renders a new view
- writes the rendered PNG bytes back to the parquet rows
- keeps
observation.image3unchanged
python augment_parquet.py \
--input_dir /data/chunk-000 \
--output_dir /data/chunk-000-new \
--ckpt /path/to/gensplat_hf_export \
--trans_noise 0.02Arguments:
--input_dir: directory containing input parquet files--output_dir: directory for augmented parquet files; defaults to<input_dir>-new--ckpt: model path or Hugging Face identifier accepted byGenSplat.from_pretrained(...)--trans_noise: translation noise magnitude applied to the predicted pose before rendering
The script currently assumes each parquet row contains these columns:
observation.image1observation.image2observation.image3
It also assumes each of these columns is dict-like and contains at least:
["bytes"]: encoded image bytes
The script center-crops each processed image so that height and width are multiples of 14, which matches the model patch size.
The output directory mirrors the input directory at the file level:
input_dir/
part-000.parquet
part-001.parquet
output_dir/
part-000.parquet
part-001.parquet
For every output parquet file:
- the file name is unchanged
- the row count is unchanged
- all non-image columns are preserved
observation.image3is preservedobservation.image1["bytes"]is replaced by rendered PNG bytesobservation.image2["bytes"]is replaced by rendered PNG bytes
The schema is preserved; only the payload inside the selected image columns is updated.
Each row keeps the same top-level layout:
row
|- observation.image1
| \- bytes <- replaced
|- observation.image2
| \- bytes <- replaced
\- observation.image3
\- bytes <- unchanged
If observation.image1 or observation.image2 contains additional metadata keys, the script keeps that dictionary and only overwrites the bytes field.
For a clean comparison:
- Train
anysplatas the preserved baseline. - Train
gensplatwith the AnySplat student checkpoint and the Pi3 teacher checkpoint. - Train
gensplatpi3as the Pi3-only comparison model. - Run
augment_parquet.pyonly after you have a trainedgensplatcheckpoint exported in a format compatible withGenSplat.from_pretrained(...).
src/main.py: training entry pointconfig/experiment/droid.yaml: main training presetconfig/model/encoder/anysplat.yaml: AnySplat encoder configconfig/model/encoder/gensplat.yaml: GenSplat encoder configconfig/model/encoder/gensplatpi3.yaml: GenSplatPi3 encoder configaugment_parquet.py: parquet augmentation utility