This repository contains the implementation of Neural Visibility of Point Sets.
This code has been tested on Ubuntu 20.04 with 4 Nvidia 4090 GPUs (24GB memory).
-
Install Conda and create a Conda environment
conda create --name neuvis python=3.13 conda activate neuvis
-
Clone this repository and Install the required packages.
git clone https://github.com/Timekisser/NeuVis.git conda install ocnn thsolver tqdm tensorboard
-
Install PyTorch=2.6.0 with conda according to the official documentation.
pip3 install torch torchvision torchaudio
-
Download the ShapeNetV2 dataset and extract it to the data directory. You could also use other dataset, as long as the folder is organized as:
--ShapeNet --class1 --model1 --model_normalized.obj ... --model2 --model_normalized.obj ... ... --class2 ...
Then run the script:
python prepare_data.py --in_path [inpath] --out_path [outpath]
We provide the filelist of ShapeNetV2 in the
data
folder, which is defaultly used as the--out_path
in the above command. If you want to use other datasets, please generate the filelist by yourself. -
Run the training script
python train.py --config vis_shapenet.yaml SOLVER.gpu 0,1,2,3
-
Evaluate the model by:
python train.py --config vis_shapenet.yaml SOLVER.gpu 0, SOLVER.run test DATA.test.takes [numofpoints]
If you want to evaluate on each category on ShapeNet, you could run the script:
python script.py
See the
script.py
for more details. We also provide our pretrained model at Huggingface. You can download and put it in thelogs/depth8/checkpoints
folder, then run the script above to evaluate it.
-
Download our pretrained model at Huggingface.
-
Install the required packages.
pip install -r requirements.txt
-
Prepare the data as .npz file.
We provide a script to convert the .obj files to .npz files. Run it by:
python sample.py --name [path-to-obj-file] --num_pts [number-of-points]
-
Run the UI script.
python ui.py --model_path [path-to-model-weights]
You could drag and drop the .npz file to the UI window to visualize the result.