This is the code for the paper Latent-space Dynamics for Reduced Deformable Simulation
This has been tested to work on a clean install of Ubuntu 18.04. If your system is not a clean install, there may be dependency conflicts.
git clone --recursive https://github.com/zero-impact/AutoDef.git cd AutoDef sudo ./installDependencies.sh # This could take a while (building tensorflow from source) # Now build the main project cd src/AutoDefRuntime mkdir build && cd build cmake .. && make -j8
WARNING: installDependencies.sh will overwrite your
~/.keras/keras.json file if it is present. The default float type will be set to 64 bi+ts from the default 32.
The build process may take a long time (30-60 minutes) depending on your hardware. This is due to the fact that we use a modified version of Tensorflow and must build from source.
Uncomment #define EIGEN_USE_MKL_ALL in src/AutoDefRuntime/src/main.cpp if MKL is installed you want to enable MKL support.
To interactively generate training data and subsequently train a reduced model, use the script
scripts/unified_gen_and_train.py <config>.json <model_output_dir>
./scripts/unified_gen_and_train.py configs/X.json models/X
- When the opengl viewer opens, press 'a' to start recording the low resolution simulation.
- Click and drag on the model to interact. Click and drag on the background to change viewing angle.
- Press 'q' to end recording (Do not close the window manually!). A new viewer will open and show the full-resolution model being played-back.
- Wait for simulation to finish. Training will begin and finish automatically.
Training parameters can be changed by editing
After training has completed, the model can be run using
Continuing from the example above
- Press 'a' to start the simulation.
- Click and drag the model to interact.
The simulation parameters (such as the type of reduced space) can be changed by editing
Copyright (c) 2019 Lawson Fulton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.