Skip to content

Fabisser/stylesdf

Repository files navigation

StyleSDF

Alt Text

Description

This repository contains the project created for my Masters thesis Neural 3D Reconstruction and Stylization.

Using IDR, we create a 3D reconstruction which we then style using NNFM from ARF or the original NST style approach.

Installation Requirements

The code was run using python 3.9, and requires packages which can be installed by running

pip install -r requirements.txt

Usage

Create a 3D reconstruction using IDR of the BK dataset by running

cd opt
python run_IDR.py --conf DTU_style.conf --scan_id 105

Once this has been completed the result is stored in the created exp folder. The result can be styled by running

cd opt
python run_style.py --conf DTU_style.conf --scan_id 24 --style vangogh_starry_night

Datasets

Dataset from IDR.

We have also created a dataset of the TU Delft Architecture building, included in the repository.

Preprocessing

To create your own dataset, camera information is required which can be calculated using COLMAP. As input the following is required

- <data_folder>
    - images      # input images
    - masks       # mask data of the input images

Run COLMAP using the following command-lines

colmap feature_extractor \
    --database_path <data_folder>/database.db \
    --image_path <data_folder>/image

colmap exhaustive_matcher \
    --database_path <data_folder>/database.db

mkdir <data_folder>/sparse

colmap mapper \
    --database_path <data_folder>/database.db \
    --image_path <data_folder>/image \
    --output_path <data_folder>/sparse

colmap model_converter \
    --input_path <data_folder>/sparse/0 \
    --output_path <data_folder>/sparse \
    --output_type TXT

To create the required camera paremeters as well as normalized camera parameters (see IDR), run the following

python colmap2idr.py --dense_folder <data_folder> --max_d 256 --convert_format

python3 preprocess_cameras.py --source_dir <data_folder>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published