Model, training, and inference code for Neural Deforming Contact Fields project.
Using conda:
conda env create -f environment.yaml
conda activate ncf
Our code also relies on the following libraries. Install each to the ncf
environment using pip install
:
Datasets contain full simulated data including geometry, contact patches and force responses, generated with Isaac Gym. Code to generate data can be found here.
- Pretrain dataset: download here (1.4 MB)
- Training dataset: download here (26 GB)
- Test dataset: download here (2.6 GB)
The final model used in our experiments can be downloaded from the following places.
See cfg/example_v1.yaml
for expected locations in order to run with the pretrained models.
Model training is split into a pretraining and training step. Training options are specified by
yaml
config files. See cfg/example_v1.yaml
for an example config. You can specify which
dataset to use for pretraining/training, model choice and hyper-parameters, loss weights, etc.
python scripts/pretrain_model.py cfg/example_v1.yaml
python scripts/train_model.py cfg/example_v1.yaml
To generate results:
python scripts/generate.py cfg/example_v1.yaml -m test -o <out dir>
To visualize results:
python scripts/vis_results.py cfg/example_v1.yaml -m test <out dir>
To evaluate results:
python scripts/eval_results.py cfg/example_v1.yaml -m test <out dir>