String2shape
string-based synthesis of structured shapes
Install / Use
/learn @javorkk/String2shapeREADME
string2shape
This is the implementation of the Eurographics 2019 paper: String-Based Synthesis of Structured Shapes
It contains CUDA/C++ implementation of the main procedural modeling application that is compiled into a python package.
The code builds and runs on Windows with Visual Studio 2015 or Linux with cmake, CUDA 8.0, and python 2.7.
To build the code, ensure that cudart.dll and a python executable are visible in the global environment (e.g. in PATH) and load the .sln file in Visual Studio.
The obj2string project is set up to use OpenMP as parallelization backend. To switch to CUDA or TBB right-click on the project in Visual Studio, go to CUDA C++ -> Host -> Preprocessor Definitions and set THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA (or ..._TBB) The same can be done with cmake via USE_OPENMP
After succesfull build, the code can be tested by running the "tests" project (see tests/main.cu). or in a python 2.7 environment by running the following:
Generate new shape variants using: augment_dataset.py
Be advised that this can take a while and will generate large amount of .obj files and consume a lot of disk space.
Generate a set of strings from the shapes using: create_obj_dataset.py
To create a training and validation set from the generated data use: preprocess.py
To train an autoencoder use: train.py
To sample from the latent space of the autoencoder use: sample.py or sample_graph.py
To train a sequence to sequence model for string embedding use: train_seq2seq.py
To embed a string in a shape use: graph_embedding.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
