Code and data of the machine learning framework described in the publication "Inverse designing Surface Curvatures by Deep Learning", Advanced Intelligent Systems, 2300789 (2024).
If you use this code, please cite the following publication: Y. Guo, S. Sharma, and S. Kumar, Inverse designing Surface Curvatures by Deep Learning, Advanced Intelligent Systems, 2300789 (2024). DOI: https://doi.org/10.1002/aisy.202300789
Note the codes were tested on the following package versions. Incompatibility issues may arise with different pacakge version (specifically, with pytorch versions higher than the one listed here).
- python 3.7.1
- pytorch 1.7.0
- cudatoolkit 11.0
- torchvision
- torchaudio
- matplotlib
- numpy-stl
- geomloss
- pickle5
- nibabel
- scikit-image
- sympy
- filesplit
- To generate curvature-based metamaterials, we use a curvature functional method from Anna Song (A. Song, Generation of Tubular and Membranous Shape Textures with Curvature Functionals, J Math Imaging Vis 64, 17–40 (2022). https://doi.org/10.1007/s10851-021-01049-9.). Code: https://github.com/annasongmaths/curvatubes. Curvatubes can be generated by running 'python create_cvtub.py'.
- Dataset used in this project can be found in folder './data/'. Large data files are split into smaller ones. Before using the dataset for training, please combine the data files by running 'decompress_data.py'.
- Before doing inverse design, users need to train their own models by running 'fwd_train.py' and 'inv_train.py'. The trained model and loss histories will be stored in folder './model/'. Expected training time on 3 GPUs is about 24 hours for forward model and 10 hours for inverse model, duration may vary on different devices.
- Once the inverse and forward models are trained, users can use them to do inverse design for demos under folder './benchmarks/'.
- Further instructions are provided in README files inside each sub-directory.
- For obtaining pre-trained models, please contact the authors of the publication (email: Sid.Kumar@tudelft.nl). Codes for loading pre-trained models can be found in fwd_train.py line 62-69 and inv_train.py line 72-79.