Automatic evaluation system for GSFusion
Clone the repository
git clone https://github.com/goldoak/GSFusion_eval.git --recursive
Create virtual environment
cd GSFusion_eval
conda create -n gs_eval python=3.8
conda activate gs_eval
pip install -r requirements.txt
Build differentiable Gaussian rasterizer
cd diff-gaussian-rasterization
python setup.py install
This evaluation system expects the following file structure:
<model path>
├── cfg_args
├── mesh
│ └── mesh_xxx.ply
└── point_cloud
└── iteration_xxx
└── point_cloud.ply
where cfg_args
and point_cloud.ply
should be in the same format as the files generated by official 3D Gaussian Splatting implementation. Note that mesh
folder is optional as it is generated by our GSFusion together with the 3D Gaussian map.
wget https://cvg-data.inf.ethz.ch/nice-slam/data/Replica.zip
unzip Replica.zip
Please follow the instructions on ScanNet++ website to download dataset and use the provided toolbox to undistort and downscale the DSLR images. We downscale the images by a factor of 2 to prevent memory overflow.
First render training/novel views using the trained model:
python render.py -m <model path> --iteration <#iters> --dataset_type <supported data type> --data_device cuda
To evaluate any iterations stored in the point_cloud
folder, replace <#iters>
with the actual iteration number. The evaluation system currently supports data from three types of data: Colmap (colmap
), ScanNet++ (scannetpp
), and Replica (replica
). If you want to render novel views (e.g., in ScanNet++) for evaluation, make sure to set eval=True
in cfg_args
. This command will automatically generate train
and test
(optional) folders under the <model path>
, which store the rendered images and ground truth images.
Then calculate metrics for rendered images:
python eval.py --data <training/novel view path>
This command will calculate PSNR, SSIM, and LPIPS for rendered images and save the results in metrics.json
within the same data path.
Finally, the file structure is as follows:
<model path>
├── cfg_args
├── mesh
│ └── mesh_xxx.ply
├── point_cloud
│ └── iteration_xxx
│ └── point_cloud.ply
├── train
│ └── ours_xxx
│ ├── gt
│ ├── renders
│ └── metrics.json
└── test
└── ours_xxx
├── gt
├── renders
└── metrics.json
To compute the accuracy of point cloud extracted from the trained model (for GSFusion only), use the following command:
python eval_pcd.py -m <model path> --iteration <#iters>
This project has benefited a lot from the contributions of the following open-source projects: