Skip to content

MMintLab/neural_deforming_contact_fields

Repository files navigation

Neural Deforming Contact Fields

Model, training, and inference code for Neural Deforming Contact Fields project.

Setup

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:

Data/Models

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.

  • Pretrained object model: here (0.63 GB)
  • Full model: here (1.7 GB).

See cfg/example_v1.yaml for expected locations in order to run with the pretrained models.

Training

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.

Pretraining

python scripts/pretrain_model.py cfg/example_v1.yaml

Training

python scripts/train_model.py cfg/example_v1.yaml

Inference

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>

About

Model code for Neural Deforming Contact Fields (NDCF), presented at RSS 2023

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published