Skip to content

Commit

Permalink
simple_trainer.py -> simple_trainer.py default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruilong Li committed Aug 10, 2024
1 parent e0ac93d commit 92530e1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion EXPLORATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| `--absgrad --grow_grad2d 2e-4` | 8m30s | 0.018s/im | 2.21 GB | 0.6251 | 20.68 | 0.587 | 0.89M |
| `--absgrad --grow_grad2d 2e-4` (30k) | -- | 0.030s/im | 5.25 GB | 0.7442 | 24.12 | 0.291 | 2.62M |

Note: default args means running `CUDA_VISIBLE_DEVICES=0 python simple_trainer.py --data_dir <DATA_DIR>` with:
Note: default args means running `CUDA_VISIBLE_DEVICES=0 python simple_trainer.py default --data_dir <DATA_DIR>` with:

- Garden ([Source](https://jonbarron.info/mipnerf360/)): `--result_dir results/garden`
- U1 (a.k.a University 1 from [Source](https://localrf.github.io/)): `--result_dir results/u1 --data_factor 1 --grow_scale3d 0.001`
Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/colmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Fit a COLMAP Capture

.. currentmodule:: gsplat

The :code:`examples/simple_trainer.py` script allows you train a
The :code:`examples/simple_trainer.py default` script allows you train a
`3D Gaussian Splatting <https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/>`_
model for novel view synthesis, on a COLMAP processed capture. This script follows the
exact same logic with the `official implementation
Expand All @@ -15,7 +15,7 @@ Simply run the script under `examples/`:

.. code-block:: bash
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py \
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py default \
--data_dir data/360_v2/garden/ --data_factor 4 \
--result_dir ./results/garden
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/large_scale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The code for this example can be found under `examples/`:
.. code-block:: bash
# First train a 3DGS model
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py \
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py default \
--data_dir data/360_v2/garden/ --data_factor 4 \
--result_dir ./results/garden
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tests/eval.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Evaluation
| gsplat-30k (4 GPUs) | 28.91 | 0.871 | 0.135 | **2.0 GB** | **11m28s** |
+---------------------+-------+-------+-------+------------------+------------+

This repo comes with a standalone script (:code:`examples/simple_trainer.py`) that reproduces
This repo comes with a standalone script (:code:`examples/simple_trainer.py default`) that reproduces
the `Gaussian Splatting <https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/>`_ with
exactly the same performance on PSNR, SSIM, LPIPS, and converged number of Gaussians.
Powered by `gsplat`'s efficient CUDA implementation, the training takes up to
Expand Down
4 changes: 2 additions & 2 deletions examples/benchmarks/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ do
echo "Running $SCENE"

# train without eval
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py --eval_steps -1 --disable_viewer --data_factor $DATA_FACTOR \
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py default --eval_steps -1 --disable_viewer --data_factor $DATA_FACTOR \
--data_dir data/360_v2/$SCENE/ \
--result_dir $RESULT_DIR/$SCENE/

# run eval and render
for CKPT in $RESULT_DIR/$SCENE/ckpts/*;
do
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py --disable_viewer --data_factor $DATA_FACTOR \
CUDA_VISIBLE_DEVICES=0 python simple_trainer.py default --disable_viewer --data_factor $DATA_FACTOR \
--data_dir data/360_v2/$SCENE/ \
--result_dir $RESULT_DIR/$SCENE/ \
--ckpt $CKPT
Expand Down
2 changes: 1 addition & 1 deletion examples/benchmarks/basic_4gpus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ do
echo "Running $SCENE"

# train and eval at the last step
CUDA_VISIBLE_DEVICES=0,1,2,3 python simple_trainer.py --eval_steps -1 --disable_viewer --data_factor $DATA_FACTOR \
CUDA_VISIBLE_DEVICES=0,1,2,3 python simple_trainer.py default --eval_steps -1 --disable_viewer --data_factor $DATA_FACTOR \
# 4 GPUs is effectively 4x batch size so we scale down the steps by 4x as well.
# "--packed" reduces the data transfer between GPUs, which leads to faster training.
--steps_scaler 0.25 --packed \
Expand Down

0 comments on commit 92530e1

Please sign in to comment.