This repository contains programs for reconstructing space using OpenSfM and Gaussian Splatting. For original repositories of OpenSfM and Gaussian Splatting, please refer to the links provided.
Clone the repository with the following command:
git clone --recursive -b render_from_panorama_and_multiple_reconstruction https://github.com/inuex35/360-gaussian-splatting
In addition to the original repository, install the following module as well:
pip3 install pyproj
First, generate point clouds using images from a 360-degree camera with OpenSfM. Refer to the following repository and use this command for reconstruction:
bin/opensfm_run_all your_data
Make sure the camera model is set to spherical. It is possible to use both spherical and perspective camera models simultaneously.
After reconstruction, a reconstruction.json
file will be generated. You can use opensfm viewer for visualization.
Assuming you are creating directories within data
, place them as follows:
data/your_data/images/*jpg
data/your_data/reconstruction.json
Next, convert the images from equirectangular to cubemap format excluding the top and bottom, using the following command. Do not forget to save the original images in another location as this command overwrites them.
python3 opensfm_convert.py data/your_data/images/
Then, start the training with the following command:
python3 train.py -s data/your_data --panorama
After training, results will be saved in the output
directory. For training parameters and more details, refer to the Gaussian Splatting repository.
23.mp4
Parameters for 360 Gaussian Splatting are provided with default values in 360-gaussian-splatting/arguments/init.py.
According to the original repository, it might be beneficial to adjust position_lr_init, position_lr_final, and scaling_lr.
Reducing densify_grad_threshold can increase the number of splats, but it will also increase VRAM usage.
densify_from_iter and densify_until_iter are also related to densification.