git clone https://github.com/Herb-Wright/v-prism.git v_prism
cd v_prism
env_cpu.yml
instead):
conda env create -f environment.yml
pip install -e .
Here is an example of using the full method:
from v_prism import full_VPRISM_method
map = full_VPRISM_method(
X, # (P, 3) Tensor
y, # (P,) Tensor
num_classes,
cam_pos, # (3,) Tensor
)
Here is an example of negative sampling:
from v_prism import full_negative_sampling_method
X, y = full_negative_sampling_method(
points, # (P, 3) Tensor
seg_mask, # (P,) Tensor
ray_step_size,
object_sphere_radius,
camera_pos, # (3,) Tensor
scene_sphere_radius,
subsample_grid_size_unocc,
subsample_grid_size_occ,
):
Also checkout the example notebook: ./notebooks/example_demo.ipynb
python ./scripts/eval_sim_data.py
with desired argumentsNote. You might not be able to run objaverse experiments because I had to do some extra steps to convert certain meshes to obj files.
docs
directoryThis contains the code for the website.
notebooks
directoryThis directory contains Jupyter notebooks used for the project. Code to generate many of the figures seen in the paper can be found in a few of these notebooks.
scripts
directoryThis directory contains various scripts for the project including the following:
eval_pybullet_data.py
: evaluates a method on a pybullet datasettrain_neural_network.py
: trains a PointSDF-like neural networksrc/v_prism/data_loading
directoryThis directory contains code for loading in data and negative sampling. There are also functions provided for downloading the different datasets used in the project.
src/v_prism/mapping
directoryThis directory contains code for creating maps from data. There is code for the V-PRISM algorithm, the BHM algorithm, and variants with gradient descent.
src/v_prism/utils
directoryThis directory contains utility functions and classes for the rest of the project. Its contents range from kernel definitions, UI utilities, and RANSAC implementations.
tests
directoryThis directory contains some tests written to ensure that the code is not egregiously wrong. It requires the pytest module to run, which is not part of the conda environment. Thus, you must run pip install pytest
before running pytest ./tests
if you have not already.