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>
Example:
./scripts/unified_gen_and_train.py configs/X.json models/X
Instructions:
Training parameters can be changed by editing <config>.json
.
After training has completed, the model can be run using src/AutoDefRuntime/build/bin/AutoDefRuntime <model_dir>
.
Continuing from the example above
./src/AutoDefRuntime/build/bin/AutoDefRuntime models/X_example
Instructions:
The simulation parameters (such as the type of reduced space) can be changed by editing <model_dir>/sim_config.json
MIT License
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.