This report focuses on accurately predicting the SDF at any location using a continuous function, enhanced by octree-based prior feature interpolation and a hash-encoded neural network output.
-
Begin by cloning this repository and all its submodules using the following command:
git clone --recursive https://github.com/qihaoqian/Accurate-SDF-Mapping.git
-
Create an anaconda environment called
AccurateSDF.conda create -n AccurateSDF python=3.10
-
Install the Pytorch manually for your hardware platform.
-
Install the dependency packages.
bash install.sh pip install -r requirements.txt
-
Install tinycudann and its pytorch extension following https://github.com/NVlabs/tiny-cuda-nn
cd third_party/tinycudann cmake . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release -j`nproc` cd bindings/torch python setup.py install cd ../../../.. cd third_party/sparse_octree python setup.py install
- Replace the filename in
src/mapping.pywith the built library
torch.classes.load_library("third_party/sparse_octree/build/lib.xxx/svo.xxx.so")- Download the data as below and the data is saved into the
./Datasets/Replicafolder.
bash scripts/download_replica.sh# take replica room0 dataset as example
python demo/run_mapping.py configs/replica/room_0.yaml --save-meshThe final reconstructed mesh will be saved in mapping/logs/{DATASET}/{DATA SEQUENCE}/{FILE_NAME}/mesh.
- Download the ground truth Replica meshes
bash scripts/download_replica_mesh.sh# assign any output_folder and gt mesh you like, here is just an example
OUTPUT_FOLDER=logs/replica/room0/FILE_NAME
GT_MESH=../Datasets/Replica/cull_replica_mesh/room0.ply
python src/evaluate.py logs/replica/room0/h2mapping-baseline/bak/config.yaml # --save mesh