Amine Ouasfi, Adnane Boukhayma.
ECCV 2022
Please follow the instructions detailed in IF-Net. Then, install the required packages for this project by running:
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
To run our pretrained model on your own shapes, place them in a directory and create a .lst
file containing your file names. Then run ,
python demo.py -data_path [path to your data directory] -exp <exp_name> -checkpoint <checkpoint> -inner_steps 5 -pc_samples 3000 -res 128 -batch_size 8 -save_path gen_dir/
where res
is the resolution of the encoder's grid and exp_name
is the path to the folder containing the trained model checkpoints.
The data preparation process is the same as in IF-Net.
To generate ground truth Signed distance values instead of occupancies run:
python data_processing/boundary_sampling_sdf.py -sigma 0.1
python data_processing/boundary_sampling_sdf.py -sigma 0.01
To start a training please run the following command:
python train.py -res 128 -pc_samples 3000 -epochs 100 -inner_steps 5 -batch_size 8
You can add the following options -p_enc
and _p_dec
to initialize the encoder and/or the decoder with a pretrained model. Also, you can freeze the encoder during the training by adding the option -freeze
to your command.
The command:
python generate.py -res 128 -pc_samples 3000 -batch_size 8 -inner_steps 5 -exp <exp_name> -checkpoint <checkpoint>
Where exp_name
is the path to the folder containing the trained model checkpoints.
The evaluation process is the same as in IF-Net.
Pretrained models can be found here.
For questions and comments regarding the code please contact Amine Ouasfi via mail. (See Paper)