Junhao Cai1*, Yuji Yang2*, Weihao Yuan3†, Yisheng He3, Zilong Dong3, Liefeng Bo3, Hui Cheng2, Qifeng Chen1
1The Hong Kong University of Science and Technology, 2Sun Yat-sen University, 3Alibaba Group
*Equal contribution, order determined by coin toss.
†Corresponding author
Accepted at Conference on Neural Information Processing Systems, 2024 (Oral)
The code has been tested on Ubuntun 22.04 with CUDA Tookit 12.1. Please ensure that you have correctly installed the CUDA Toolkit 12.1 before running the following commands to install the remaining dependencies.
git clone https://github.com/Jukgei/gic
cd gic
conda env create --file environment.yml
conda activate gicWe used the same segmentation model as PAC-NeRF for segmentation. We validated our algorithm using the PAC-NeRF dataset and the Spring-Gaus dataset.
The structure of the dataset and model files in the root directory is as follows:
├── data
│ | checkpoint
│ ├── pytorch_resnet101.pth
│ | pacnerf
│ ├── bird
│ ├── cat
│ ├── ...
│ | sgs
│ ├── apple
│ ├── C
│ ├── cream
│ ├── ...
If you're running it for the first time, you need to perform foreground-background segmentation on the dataset first.
python prepare_pacnerf_data.py --data_folder=data/pacnerf/torus
python train_dynamic.py -c config/pacnerf/torus.json -s data/pacnerf/torus -m output/pacnerf/torus --reg_scale --reg_alpha
The results of the parameter estimation and the related settings will be saved in the {config_id}-pred.json file located in the output/pacnerf/torus directory.
After estimating the parameters, we can modify different materials or physical parameters (such as gravity, Young's modulus, etc.) to generate new videos. For example, For example, we change the Young's modulus of the torus.
python new_trajectory.py -c config/predict/elastic.json -s data/pacnerf/torus -m output/pacnerf/torus -vid 3 -cid 0 --reg_alpha
Command-Line Arguments Explanation
-
vid: camera id.
-
cid: estimated result file id.
The new video output.mp4 will be generated in the output/pacnerf/torus directory.
We sincerely thank the authors of Deformable Gaussians, PAC-NeRF, Spring-Gaus, whose codes and datasets were used in our work.
@article{cai2024gaussian,
title={Gaussian-Informed Continuum for Physical Property Identification and Simulation},
author={Cai, Junhao and Yang, Yuji and Yuan, Weihao and He, Yisheng and Dong, Zilong and Bo, Liefeng and Cheng, Hui and Chen, Qifeng},
journal={Advances in Neural Information Processing Systems},
year={2024}
}