### Install DN-Splatter with Pixi Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for setting up the environment using the Pixi package manager. Pixi handles CUDA, PyTorch, and Nerfstudio installations. Includes commands to install, run examples, and activate the environment. ```bash git clone https://github.com/maturk/dn-splatter cd dn_splatter/ pixi install # To run an example pixi run example # To activate conda environment pixi shell ``` -------------------------------- ### Install DN-Splatter with Conda/Pip Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for setting up the environment using Conda and Pip. This involves activating a Nerfstudio environment, cloning the repository, and installing the project's Python package. ```bash conda activate nerfstudio git clone https://github.com/maturk/dn-splatter cd dn_splatter/ pip install setuptools==69.5.1 pip install -e . ``` -------------------------------- ### Process SpectacularAI Data with dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md This snippet shows how to install the SpectacularAI SDK and process captured RGB-D smartphone data into a Nerfstudio-compatible format. It requires specifying input and output folders for the data conversion. ```bash pip install spectacularAI python dn_splatter/scripts/process_sai.py [PATH_TO_SAI_INPUT_FOLDER] [PATH_TO_OUTPUT_FOLDER] ``` -------------------------------- ### Training dn-splatter and ags-mesh Models Source: https://github.com/maturk/dn-splatter/blob/main/README.md Commands to train the dn-splatter and ags-mesh models. These examples demonstrate enabling depth and normal supervision, setting depth loss weights, and specifying data paths. The ags-mesh model includes an additional flag for loading depth confidence masks. ```bash ns-train dn-splatter --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.use-normal-tv-loss True \ --pipeline.model.normal-supervision (mono/depth)\ --data PATH_TO_DATA ``` ```bash ns-train ags-mesh --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.normal-supervision (mono/depth)\ --data PATH_TO_DATA --load-depth-confidence-masks True ``` -------------------------------- ### MuSHRoom: Download Data and Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Guides for using MuSHRoom datasets, which support Kinect and iPhone RGB-D trajectories. Includes commands for downloading per-room datasets, optional reference depths, and training dn-splatter with various depth and normal supervision options. ```python python dn_splatter/data/download_scripts/mushroom_download.py --room-name [name] ``` ```python python dn_splatter/data/mushroom_utils/reference_depth_download.py ``` ```bash ns-train dn-splatter \ --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.normal-supervision (mono/depth) \ mushroom --data [DATASET_PATH] --mode [kinect/iphone] ``` ```python python dn_splatter/scripts/poses_to_colmap_sfm.py --transforms_path [path/transformations_colmap.json] --run_colmap ``` ```bash ns-train dn-splatter \ --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.use-normal-tv-loss True \ --pipeline.model.normal-supervision (mono/depth) \ mushroom --data [DATASET_PATH] --mode iphone --create_pc_from_colmap True ``` -------------------------------- ### DTU: Download Data and Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Guides for using the DTU dataset with dn-splatter. It provides a command to download the dataset and a training command using the 'gsdf' method with sequence selection. ```python python dn_splatter/data/download_scripts/dtu_download.py ``` ```bash ns-train dn-splatter gsdf --sequence scan65 --data [DATASET_PATH] ``` -------------------------------- ### Evaluate RGB/Depth Metrics Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Evaluates depth estimation and novel-view RGB metrics using the `ns-eval` tool. Requires a configuration YAML file and an output path for storing results. ```bash ns-eval --load-config [PATH_TO_YAML] --output-path [PATH_TO_JSON] ``` -------------------------------- ### Replica: Download Data and Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for using the Replica dataset with dn-splatter. It provides a command to download the dataset and a training command specifying various optional parameters for depth and normal supervision, along with sequence selection. ```python python dn_splatter/data/download_scripts/replica_download.py ``` ```bash ns-train dn-splatter --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.5 \ --pipeline.model.use-normal-loss True \ --pipeline.model.use-normal-tv-loss True \ --pipeline.model.normal-supervision (mono/depth) \ replica --data [DATASET_PATH] --sequence [office0/office1/office2/office3/office4/room0/room1/room2] ``` -------------------------------- ### Train NeusFacto with GSDF Dataparser Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Trains the NeusFacto model using the `gsdf` dataparser, which is suitable for SDFStudio data. The `--load-for-sdfstudio` flag must be set to `True`. ```bash ns-train gneusfacto --data ./datasets/DTU/scan65/ gsdf --load-for-sdfstudio True ``` -------------------------------- ### Train Nerfacto Model Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Trains the Nerfacto baseline model, which uses RGB-only supervision. Requires specifying the data path. ```bash ns-train gnerfacto --data [PATH] dtu/nrgbd/replica/scannet/mushroom ``` -------------------------------- ### Train Depth-Nerfacto Model Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Trains the Depth-Nerfacto baseline model, which utilizes both RGB and Depth supervision. Requires specifying the data path. ```bash ns-train gdepthfacto --data [PATH] dtu/nrgbd/replica/scannet/mushroom ``` -------------------------------- ### Tanks and Temples: Convert COLMAP and Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for using Tanks and Temples datasets with dn-splatter. It covers downloading advanced scenes, extracting COLMAP poses, and initiating training using the 'coolermap' dataparser. ```python python dn_splatter/scripts/convert_colmap.py --image-path [path_to_image_folder] --use-gpu / --no-use-gpu ``` ```bash ns-train dn-splatter [OPTIONS] coolermap --data [DATASET_PATH] ``` -------------------------------- ### Convert Nerfstudio to SDFStudio Data Format Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Converts datasets from Nerfstudio format to SDFStudio format. This script handles data type and scene type, and can optionally derive normals from pre-trained models or depth maps. ```bash python dn_splatter/eval/baseline_models/nerfstudio_to_sdfstudio.py --input_dir [DATA_PATH] \ --output_dir [OUTPUT_PATH] \ --data-type colmap --scene-type indoor --normal_from_pretrain/normal_from_depth ``` -------------------------------- ### Neural-RGBD: Download Data and Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for using the Neural-RGBD dataset with dn-splatter. It includes a command to download the dataset and a training command specifying the 'nrgbd' dataparser and sequence selection. ```python python dn_splatter/data/download_scripts/nrgbd_download.py ``` ```bash ns-train dn-splatter [OPTIONS] nrgbd --sequence whiteroom ``` -------------------------------- ### COLMAP Datasets: Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for using COLMAP processed datasets with the dn-splatter project. It specifies the expected directory structure and the command to initiate training using the 'coolermap' dataparser. ```bash ns-train dn-splatter [OPTIONS] coolermap --data [DATASET_PATH] ``` -------------------------------- ### Pipeline Model Configuration Options Source: https://github.com/maturk/dn-splatter/blob/main/README.md Configuration flags for the pipeline model, detailing options for depth loss, normal supervision, and Gaussian properties. These parameters control the training process and model behavior. ```APIDOC Pipeline Model Configuration: --pipeline.model.use-depth-loss (True/False): Description: Enables depth supervision during training. --pipeline.model.depth-loss-type (MSE, LogL1, HuberL1, L1, EdgeAwareLogL1, PearsonDepth): Description: Specifies the type of depth loss function to use. Recommended for sensor depth: EdgeAwareLogL1 Recommended for monocular depth: PearsonDepth --pipeline.model.depth-lambda (Float 0.2 recommended): Description: Regularizer weight for depth supervision. --pipeline.model.use-normal-loss (True/False): Description: Enables normal supervision during training. --pipeline.model.use-normal-tv-loss (True/False): Description: Enables normal smoothing loss for regularization. --pipeline.model.normal-supervision (mono/depth): Description: Specifies the source for normal supervision. 'mono' is the default. --pipeline.model.two-d-gaussians (True/False): Description: Encourages the use of 2D Gaussians in the scene representation. ``` -------------------------------- ### Train dn-splatter with Preprocessed Datasets Source: https://github.com/maturk/dn-splatter/blob/main/README.md This command trains the dn-splatter pipeline with various preprocessed datasets like mushroom, replica, scannet, etc. The dataset name and path are specified, along with optional configurations. ```bash ns-train dn-splatter [OPTIONS] [mushroom/replica/scannet/nrgbd/dtu/coolermap] --data [DATASET_PATH] --[OPTIONAL CONFIGS] ``` -------------------------------- ### Train NeusFacto Model (RGB, Depth, Normal) Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Trains the NeusFacto baseline model, supporting RGB, Depth, and Normal supervision. It includes an option to enable mono-prior. ```bash ns-train gneusfacto --data [PATH] sdfstudio-data --include-mono-prior True ``` -------------------------------- ### Evaluate RGB, Depth, Pointcloud Metrics with ns-eval Source: https://github.com/maturk/dn-splatter/blob/main/README.md Command to evaluate standard metrics like RGB, depth, and pointcloud. Requires a configuration file and specifies an output path for JSON results. An optional flag can be used to render output images. ```bash ns-eval --load-config [PATH_TO_CONFIG] --output-path [JSON_OUTPUT_PATH] ns-eval --load-config [PATH_TO_CONFIG] --output-path [JSON_OUTPUT_PATH] --render-output-path [PATH_TO_IMAGES] ``` -------------------------------- ### ScanNet++: Process and Train dn-splatter Source: https://github.com/maturk/dn-splatter/blob/main/README.md Details on using ScanNet++ datasets, including processing steps and training commands. It outlines how to extract undistorted images and iPhone frames, and then train dn-splatter with specific sequences and optional depth/normal supervision. ```bash python -m dslr.undistort_colmap dslr/configs/undistort_colmap.yml ``` ```bash python -m iphone.prepare_iphone_data iphone/configs/prepare_iphone_data.yml ``` ```bash ns-train dn-splatter \ --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.use-normal-tv-loss True scannetpp --sequence [8b5caf3398/b20a261fdf] --data [DATASET_PATH] ``` -------------------------------- ### Download Omnidata Model Weights Source: https://github.com/maturk/dn-splatter/blob/main/README.md Downloads the necessary model weights for Omnidata normal estimation. This is a prerequisite step before generating normal maps. ```bash python dn_splatter/data/download_scripts/download_omnidata.py ``` -------------------------------- ### Evaluate Mesh Metrics (Standard) Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Runs the mesh evaluation script, culling predicted meshes based on training camera view visibility. Regions not seen in training are ignored for metric computation. Metrics include accuracy, completeness, chamferL1 (lower better), and normals_correctness, F-score (higher better). ```bash python dn_splatter/eval/eval_mesh_vis_cull.py --path-to-pd-mesh [PATH_TO_PREDICTED_PLY] --path-to-gt-mesh [PATH_TO_GT_PLY] ``` -------------------------------- ### Evaluate Mesh Metrics for ScanNet++/Replica/Custom Datasets Source: https://github.com/maturk/dn-splatter/blob/main/README.md Python script for calculating mesh metrics on datasets like ScanNet++, Replica, or custom datasets. It needs paths for ground truth and predicted meshes, a transformation file (e.g., transform.json), and the dataset path. ```python python dn_splatter/eval/eval_mesh_vis_cull.py --gt-mesh-path [GT_Mesh_Path] --pred-mesh-path [Pred_Mesh_Path] --transformation_file [Path_to_transform_file] --dataset_path [Dataset path] ``` -------------------------------- ### Evaluate Mesh Metrics (MuSHRoom Dataset) Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Runs a specific mesh evaluation script tailored for the MuSHRoom dataset, culling predicted meshes based on training camera view visibility. Regions not seen in training are ignored for metric computation. Metrics include accuracy, completeness, chamferL1 (lower better), and normals_correctness, F-score (higher better). ```bash python dn_splatter/eval/eval_mesh_mushroom_vis_cull.py --path-to-pd-mesh [PATH_TO_PREDICTED_PLY] --path-to-gt-mesh [PATH_TO_GT_PLY] ``` -------------------------------- ### Mesh Extraction Commands Source: https://github.com/maturk/dn-splatter/blob/main/README.md Commands for extracting meshes from trained models using different algorithms. Includes general `gs-mesh` usage and a specific Python script for IsoOctree extraction. ```bash gs-mesh {dn, tsdf, o3dtsdf, sugar-coarse, gaussians, marching} --load-config [PATH] --output-dir [PATH] ``` ```python python dn_splatter/scripts/isooctree_dn.py --transformation_path \ --tsdf_rel 0.03 --output_mesh_file --subdivision_threshold=100 ``` -------------------------------- ### dn-splatter Dataset Training Options Source: https://github.com/maturk/dn-splatter/blob/main/README.md These are common options for training dn-splatter with specific datasets. They control depth loading, normal map loading and format, and confidence mask usage, allowing fine-tuning of data processing during training. ```APIDOC ns-train dn-splatter [DATASET_NAME] --help Common Options: --depth-mode : Options for loading depth data. Supported values: ["sensor", "mono", "all", "none"]. --load-normals : Boolean flag to enable loading of normal maps. [True/False]. --normal-format : Specifies the format of monocular normal maps used for generation. Supported values: ["omndiata", "dsine"]. Affects coordinate system differences. --load-pcd-normals : Boolean flag to initialize Gaussian scales/rotations based on estimated SfM normals. [True/False]. --load-depth-confidence-masks : Boolean flag to use depth confidence masks for filtering strategies. [True/False]. ``` -------------------------------- ### dn-splatter-big Model Variant Source: https://github.com/maturk/dn-splatter/blob/main/README.md Instructions for using the dn-splatter-big variant, which increases the number of Gaussians for potentially enhanced novel-view synthesis quality. This variant requires more training time and hardware resources. ```bash # Replace 'dn-splatter' with 'dn-splatter-big' in training commands ns-train dn-splatter-big --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.normal-supervision (mono/depth)\ --data PATH_TO_DATA ``` -------------------------------- ### Train dn-splatter with Custom Data Source: https://github.com/maturk/dn-splatter/blob/main/README.md This command trains the dn-splatter pipeline using custom data. It enables depth and normal loss, specifying the normal supervision source. The `--data` argument points to the processed dataset. ```bash ns-train dn-splatter --pipeline.model.use-depth-loss True \ --pipeline.model.depth-lambda 0.2 \ --pipeline.model.use-normal-loss True \ --pipeline.model.use-normal-tv-loss True \ --pipeline.model.normal-supervision depth \ normal-nerfstudio --data PATH_TO_DATA ``` -------------------------------- ### Mesh Exporter Details Source: https://github.com/maturk/dn-splatter/blob/main/README.md Details on supported mesh exporters for the `gs-mesh` utility, including their descriptions and requirements for normals. This provides context for choosing the appropriate mesh extraction method. ```APIDOC gs-mesh Exporters: - gs-mesh dn: Description: Backproject depth and normal maps to Poisson. Requires normals?: Yes - gs-mesh tsdf: Description: TSDF Fusion algorithm. Requires normals?: No - gs-mesh o3dtsdf: Description: TSDF Fusion algorithm used in 2DGS paper. Requires normals?: No - gs-mesh sugar-coarse: Description: Level set extractor from SuGaR (Sec 4.2 from the paper). Requires normals?: Both - gs-mesh gaussians: Description: Use Gaussian xyzs and normals to Poisson. Requires normals?: Yes - gs-mesh marching: Description: Placeholder for marching cubes or similar algorithms. Requires normals?: Varies Usage Note: Use the `--help` command with each method (e.g., `gs-mesh tsdf --help`) to see more options and settings. For small object captures, TSDF works well with 0.004 voxel size and 0.02 SDF trunc distance. ``` -------------------------------- ### Train DN-Splatter Model Source: https://github.com/maturk/dn-splatter/blob/main/dn_splatter/eval/eval_instructions.md Trains the DN-Splatter model, specifying the data path and GSDF dataparser. It includes an option to disable depth loss. ```bash ns-train dn_splatter --pipeline.model.use-depth-loss False --data ./datasets/DTU/scan65 gsdf ``` -------------------------------- ### AGS-Mesh Citation Source: https://github.com/maturk/dn-splatter/blob/main/README.md BibTeX entry for citing the AGS-Mesh paper, which is related to the project's mesh reconstruction capabilities. ```bibtex @InProceedings{ren2024agsmesh, title={AGS-Mesh: Adaptive Gaussian Splatting and Meshing with Geometric Priors for Indoor Room Reconstruction Using Smartphones}, author={Xuqian Ren and Matias Turkulainen and Jiepeng Wang and Otto Seiskari and Iaroslav Melekhov and Juho Kannala and Esa Rahtu}, booktitle={International Conference on 3D Vision (3DV)}, year={2025}, archiveprefix={arxiv}, eprint={2411.19271} } ``` -------------------------------- ### Evaluate Mesh Metrics for MuSHRoom Dataset Source: https://github.com/maturk/dn-splatter/blob/main/README.md Python script to compute mesh metrics specifically for the MuSHRoom dataset. It requires paths to ground truth and predicted meshes, and a device specification (e.g., 'iphone' or 'kinect'). ```python python dn_splatter/eval/eval_mesh_mushroom_vis_cull.py --gt_mesh_path [GT_Mesh_Path] --pred_mesh_path [Pred_Mesh_Path] --output --device [iphone/kinect] ``` -------------------------------- ### Convert Dataset to COLMAP Format Source: https://github.com/maturk/dn-splatter/blob/main/README.md Converts a dataset of images into the COLMAP format, which is necessary if the dataset lacks camera pose information. It requires the path to the images and can optionally use GPU acceleration. ```bash python dn_splatter/scripts/convert_colmap.py --image-path [data_root/images] --use-gpu/--no-use-gpu ``` -------------------------------- ### Generate Omnidata Normal Maps Source: https://github.com/maturk/dn-splatter/blob/main/README.md Generates normal maps using pre-trained Omnidata models. It requires a data directory and allows specifying image directory name and resolution. Low resolution is recommended for speed. ```bash python dn_splatter/scripts/normals_from_pretrain.py \ --data-dir (path to data root which either has a transforms.json or images/ folder) \ --img-dir-name (if transforms.json file is not found, use images in this folder (default /images)) \ --resolution {low, hd} (low default and reccommended) ``` -------------------------------- ### Generate Pseudo Ground Truth Normals Source: https://github.com/maturk/dn-splatter/blob/main/README.md Details on generating normal maps for supervision. The DN-Splatter model can be supervised using gradients from rendered depth maps or external monocular normal estimates. Supports omnidata and DSINE for prediction. ```bash # Train with monocular normals using external network # --pipeline.model.normal-supervision (mono/depth) # Supported external networks: # - omnimodel (for low and hd estimates) # - DSINE ``` -------------------------------- ### Generate DSINE Normal Maps Source: https://github.com/maturk/dn-splatter/blob/main/README.md Generates normal maps using the DSINE model. This script is similar to the Omnidata normal generation but specifies the DSINE format. It's also used with the ns-train command for normal supervision. ```bash python dn_splatter/scripts/normals_from_pretrain.py --data-dir [PATH_TO_DATA] --normal-format dsine ``` ```bash ns-train dn-splatter --pipeline.model.use-normal-loss True --pipeline.model.normal-supervision mono replica --data ./datasets/Replica/ --normal-format dsine ``` -------------------------------- ### DN-Splatter Citation Source: https://github.com/maturk/dn-splatter/blob/main/README.md BibTeX entry for citing the DN-Splatter paper in academic work. ```bibtex @InProceedings{turkulainen2024dnsplatter, title={DN-Splatter: Depth and Normal Priors for Gaussian Splatting and Meshing}, author={Matias Turkulainen and Xuqian Ren and Iaroslav Melekhov and Otto Seiskari and Esa Rahtu and Juho Kannala}, booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)}, year={2025} } ``` -------------------------------- ### Generate Scale Aligned Monocular Depth Estimates Source: https://github.com/maturk/dn-splatter/blob/main/README.md Generates scale-aligned monocular depth estimates for datasets processed with COLMAP. This script addresses the scale ambiguity between estimated depths and SfM poses, creating 'sfm_depths/' and 'mono_depth/' directories. It offers options to skip COLMAP-to-depths conversion or mono-depth creation. ```bash python dn_splatter/scripts/align_depth.py --data [path_to_data_root] \ --skip-colmap-to-depths, --no-skip-colmap-to-depths \ --skip-mono-depth-creation, --no-skip-mono-depth-creation ``` -------------------------------- ### Depth Mask Filter for AGS-Mesh Source: https://github.com/maturk/dn-splatter/blob/main/README.md Generates depth masks for the AGS-Mesh method by performing a depth-to-normal consistency check. Requires dataset path, transforms file name, and the normal format (omnidata/dsine) used. ```bash python dn_splatter/scripts/depth_normal_consistency.py --data-dir --transforms_name --normal-format [omnidata/dsine] ``` -------------------------------- ### Generate Monocular Depth Estimates (Skip SfM Alignment) Source: https://github.com/maturk/dn-splatter/blob/main/README.md Generates monocular depth estimates for a dataset without performing SfM alignment. This is useful when only depth maps are needed and SfM poses are not required for alignment. ```bash python dn_splatter/scripts/align_depth.py --data [path_to_data_root] \ --skip-colmap-to-depths --skip_alignment ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.