More demonstrations can be found on our project page and arXiv paper.
- [24-06-25] We release the demo video rendering scripts with Blender to show the mesh.
- [24-06-20] The code of Trim2DGS is released. We have made Trim3DGS and Trim2DGS compatible in a shared environment for easier use! If you have installed
trim3dgs
environment following the older instruction, please remove it and reinstall the new environmenttrimgs
. - [24-06-18] The code of Trim3DGS is released.
git clone [email protected]:YuxueYang1204/TrimGS.git --recursive
# Here we comment out the pip install Trim2DGS/submodules/simple-knn in environment.yml, since it is the same as the one in Trim3DGS
conda env create -f environment.yml
conda activate trimgs
Note: We modify the differentiable rasterization kernel to support contribution-based trimming, which can be found in diff-gaussian-rasterization (for Trim3DGS) and diff-surfel-rasterization (for Trim2DGS).
For geometry reconstruction on DTU dataset, please download the preprocessed data (only dtu.tar.gz
is needed). You also need to download the ground truth DTU point cloud SampleSet.zip and Points.zip from the DTU official website.
mkdir data && cd data
mkdir dtu_dataset
# prepare the dtu dataset
tar -xvf dtu.tar.gz -C dtu_dataset
# prepare the ground truth
unzip SampleSet.zip
# remove the incomplete points and unzip the complete points
rm -r SampleSet/MVS\ Data/Points
unzip Points.zip -d SampleSet/MVS\ Data
mv SampleSet/MVS\ Data dtu_dataset/Official_DTU_Dataset
For novel view synthesis on MipNeRF360, please download the 360_v2.zip
and 360_extra_scenes.zip
from MipNeRF360.
cd data
mkdir MipNeRF360
# prepare the MipNeRF360 dataset
unzip 360_v2.zip -d MipNeRF360
unzip 360_extra_scenes.zip -d MipNeRF360
Now the data folder should look like this:
data
├── dtu_dataset
│ ├── DTU
│ │ ├── scan24
│ │ ├── ...
│ │ └── scan122
│ └── Official_DTU_Dataset
│ ├── Points
│ │ └── stl
│ └── ObsMask
└── MipNeRF360
├── bicycle
└── ...
Then link the data folder to the Trim3DGS and Trim2DGS:
ln -s data Trim3DGS/data
ln -s data Trim2DGS/data
cd Trim3DGS
# train DTU dataset
python scripts/run_dtu.py
# print the evaluation results
python print_results.py -o output/DTU_Trim3DGS --dataset dtu
# the extracted mesh of DTU dataset can be found in `output/DTU_Trim3DGS/scan${scene_id}/tsdf/ours_7000/mesh_post.ply`
# MiNeRF360
python scripts/run_Mipnerf360.py
# print the evaluation results
python print_results.py -o output/MipNeRF360_Trim3DGS --dataset mipnerf360
cd Trim2DGS
# train DTU dataset
python scripts/run_dtu.py
# print the evaluation results
python print_results.py -o output/DTU_Trim2DGS --dataset dtu
# the extracted mesh of DTU dataset can be found in `output/DTU_Trim2DGS/scan${scene_id}/train/ours_7000/fuse_post.ply`
# MiNeRF360
python scripts/run_Mipnerf360.py
# print the evaluation results
python print_results.py -o output/MipNeRF360_Trim2DGS --dataset mipnerf360
We provide the meshes of DTU dataset from Trim3DGS and Trim2DGS for evaluation.
Thank hbb1 for his kind suggestion on Trim2DGS in #1, resulting in a better performance.
Table Results
Chamfer distance on DTU dataset (lower is better)
24 | 37 | 40 | 55 | 63 | 65 | 69 | 83 | 97 | 105 | 106 | 110 | 114 | 118 | 122 | Mean | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2DGS (Paper) | 0.48 | 0.91 | 0.39 | 0.39 | 1.01 | 0.83 | 0.81 | 1.36 | 1.27 | 0.76 | 0.70 | 1.40 | 0.40 | 0.76 | 0.52 | 0.80 |
2DGS (Reproduce) | 0.46 | 0.80 | 0.33 | 0.37 | 0.95 | 0.86 | 0.80 | 1.25 | 1.24 | 0.67 | 0.67 | 1.24 | 0.39 | 0.64 | 0.47 | 0.74 |
Trim2DGS (Paper) | 0.48 | 0.82 | 0.44 | 0.45 | 0.95 | 0.75 | 0.74 | 1.18 | 1.13 | 0.72 | 0.70 | 0.99 | 0.42 | 0.62 | 0.50 | 0.72 |
Trim2DGS (Reproduce) | 0.45 | 0.72 | 0.33 | 0.40 | 0.97 | 0.72 | 0.73 | 1.21 | 1.14 | 0.61 | 0.67 | 1.01 | 0.41 | 0.60 | 0.44 | 0.69 |
- Release the code of Trim3DGS.
- Release the code of Trim2DGS.
- Release scripts for making demo videos.
- Integrate TrimGS into more methods such as GOF.
We sincerely thank the authors of the great works 3D Gaussian Splatting and 2D Gaussian Splatting. Our Trim3DGS and Trim2DGS are built upon these foundations.