- CUDA-compatible GPU
- Conda package manager
-
Clone the repository:
git clone https://github.com/bernard0047/style-splat --recursive
-
Set up the Conda environment:
conda create -n style-splat python=3.8 -y conda activate style-splat conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch pip install plyfile==0.8.1 tqdm scipy wandb opencv-python scikit-learn lpips pip install submodules/diff-gaussian-rasterization pip install submodules/simple-knn
-
Install DEVA tracking:
cd style-splat git clone https://github.com/hkchengrex/Tracking-Anything-with-DEVA.git cd Tracking-Anything-with-DEVA pip install -e . bash scripts/download_models.sh cd ../..
Before training or applying style transfer, you need to prepare pseudo labels for your dataset.
-
Edit
scripts/prepare_pseudo_label.sh
:- Set the
DATASET_ROOT
variable to your dataset's root folder - Adjust the
SCALE
variable as needed for your dataset
Example:
DATASET_ROOT="/path/to/your/dataset" SCALE=2
- Set the
-
Generate object masks:
bash scripts/prepare_pseudo_label.sh
- This will create an object_mask folder in your dataset directory.
- Train the model to group Gaussians:
python train.py -s data/your_scene -r 2 \ --config config/gaussian_dataset/train.json --port 8000 \ -m outputs/your_scene_output
- Create a configuration file:
- Copy config/object_style_transfer/bear.json for your scene
- Use Image Color Picker to select object IDs
- Update select_obj_id in your configuration file
- Run style transfer:
- Use edit_object_style_transfer.py for single object
- Use edit_object_style_transfer_multiple.py for multiple objects
- See transfer_style.sh for example usage
- DEVA Tracking
- Image Color Picker: An online tool to help identify object IDs from your mask images.
We would like to express our gratitude to the following projects that have significantly contributed to the development of Style-Splat:
This project is licensed under the Apache License 2.0. See the LICENSE file for details.