TL;DR: We propose a method to build compact and fast 3D Gaussian feature fields by effectively compressing and sparsifying Gaussians, achieving competitive performance with significantly fewer gaussians.
Our default, provided install method is based on Conda package and environment management:
conda create --name cf3 python=3.9
conda activate cf3PyTorch (Please check your CUDA version, we used 12.4)
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124Required packages
pip install -r requirements.txtSubmodules
pip install submodules/diff-gaussian-rasterization-feature # Rasterizer for RGB, n-dim feature, depth
pip install submodules/diff-gaussian-rasterization # vanilla rasterizer
pip install submodules/simple-knnWe organize the datasets as follows:
├── dataset
│ ├──Pre-trained 3DGS
│ ├──images
│ ├──frame_0000
│ ...
│ ├──sparse/0
│ ...
│ ├──{foundation_model}_features (ex. langsplat_features, lseg_features)
│ ├──frame_0000_fmap_CxHxW.pt
│ ...
Please refer to LangSplat for SAM + CLIP feature maps, and to Feature 3DGS for LSeg and SAM feature maps. In addition, any feature map from a desired foundation model can be used, as long as it is stored in the CĂ—HĂ—W format.
python langsplat_feature_convert.py\
/dataset/language_features \
/dataset/langsplat_features \
3 #We use SAM level 3 for all experiments
python fast_lifting.py -m "${GS_PATH}" -f {foundation_model}\
--output "${OUTPUT_PATH}" \
--antialiasing
Command Line Arguments for fast_lifting.py
Path to the source directory containing a COLMAP or Synthetic NeRF data set.
Path to the pretrained 3DGS model
Foundation model encoders, for example lseg for LSeg
Alternative subdirectory for COLMAP images (images by default).
Path where the output feature lifted 3DGS model is stored (model path by default).
Add this flag to use a MipNeRF360-style training/test split for evaluation.
Add this flag to use mip filter for antialiasing.
Enables debug mode if you experience erros. If the rasterizer fails, a dump file is created that you may forward to us in an issue so we can take a look.
python compact_feature_field.py \
-m "${PATH_TO_3DGS}" \
-f "${FOUNDATION_MODEL}" \
-o "${OUTPUT_PATH}" \
The compact feature field would be saved as "{OUTPUT_PATH}/point_cloud/iteration_33000/feature_field.ply".
Command Line Arguments for compact_feature_field.py
Path to the pretrained 3DGS model (feature-lifted 3DGS can be also used)
Foundation model encoders, for example lseg for LSeg
Path where the output feature lifted 3DGS model is stored (model path by default).
Add this flag to use a MipNeRF360-style training/test split for evaluation.
Enables debug mode if you experience erros. If the rasterizer fails, a dump file is created that you may forward to us in an issue so we can take a look.
Add this flag to use mip filter for antialiasing.
Enables to filter out the features with high variance during training the autoencoder
Enables merging gaussians
Enables pruning gaussians based on importance score
Enables to use high resolution rendered feature during adaptive sparsification
Enables to finetune feature decoder during adaptive sparsification
Add this flag to normalize feature in the adaptive sparsification pipeline.
Enables to use gt feature during adaptive sparsification
Enables to use depth regularization from rendered depth during adaptive sparsification
Iterations for the adaptive sparsification pipeline
Batch size of training the auto encoder
Epoch of training the auto encoder
learning rate of training the auto encoder
iterations where to stop merging gaussians
iterations interval to merge gaussians
gradient threshold for the criterion to choose which gaussians to merge
coef for cosine similarity loss for auto encoder
coef for metric loss for auto encoder
coef for norm regularization loss during adaptive sparsification pipeline.
coef for depth regularization loss during adaptive sparsification pipeline.
global contribution threshold for the criterion to choose which gaussians to merge
opacity (alpha) threshold for the criterion to choose which gaussians to merge
feature cosine similarity threshold for the criterion to choose which gaussians to merge
python vectree/vectree.py \
--input_path "${OUTPUT_PATH}/point_cloud/iteration_33000" \
--save_path "${OUTPUT_PATH}/point_cloud/iteration_34000" \
--vq_ratio ${VQ_RATIO} \
--codebook_size ${CODEBOOK_SIZE} \
--sh_degree 0
You can customize NUM_SEMANTIC_CHANNELS in submodules/diff-gaussian-rasterization-feature/cuda_rasterizer/config.h for any number of feature dimension that you want:
- Customize
NUM_SEMANTIC_CHANNELSinconfig.h.
The NUM_SEMANTIC_CHANNELS matches the visual foundation model dimensions.
For example, 512 for LSeg and CLIP, and 384 for DINO.
Everytime after modifying any CUDA code, make sure to delete submodules/diff-gaussian-rasterization-feature/build and compile again:
pip install submodules/diff-gaussian-rasterization-feature
In CF3, a 3-dimensional latent feature is stored in place of the RGB color values, allowing the vanilla 3DGS rasterizersubmodules/diff-gaussian-rasterization to be used directly without modification.
For downstream tasks, these RGB-encoded latent features can simply be decoded back into the full feature dimension using the decoder before being utilized.
We followed the Feature 3DGS protocol for the LSeg experiments, and the LangSplat protocol for the SAM + CLIP experiments.
python 3d_seg.py \
--cf3_path {OUTPUT_PATH}\
--text_queries {text queries}
Adjusting the threshold can yield cleaner instance boundaries.
@inproceedings{Lee_CF3_ICCV_2025,
Title={CF3: Compact and Fast 3D Feature Fields},
Author={Hyunjoon Lee and Joonkyu Min and Jaesik Park},
Booktitle={Proceedings of the Int. Conf. on Computer Vision (ICCV)},
Year={2025}
}
Our code is based on 3D Gaussian Splatting, Feature 3DGS, LangSplat, LightGaussian
