Installation
June 19, 2025 ยท View on GitHub
Local paths setup
Create system.json file in the root of this directory with your machine's file paths using system.template.json as a template.
system.json should include the following:
-
Path for creating logs for one-off scripts (
'output') -
Path to the folder with (generated) datasets of sewing patterns (
'datasets_path') -
Path to the folder with simulation results on the datasets of sewing patterns (
'datasets_sim') -
Data generation & Simulation resources
- path to folder with simulation\rendering configurations (
'sim_configs_path') - path to folder containing body files for neutral body and other base body models (
'bodies_default_path') - path to folder containing datasets of body shape samples (
'body_samples_path')
- path to folder with simulation\rendering configurations (
Installing simulator
We use our own version of the NVIDIA warp simulator. It should be installed manually to use our library correctly.
See the instructions in the NvidiaWarp-GarmentCode repo.
Using pip
With pip, you can install the core pygarment library and its dependencies to start writing your own garment programs!
pip install pygarment
Manual Installation
If required, you could install the library and dependecies manually
pygarment uses the following dependencies:
These dependencies are installed through setup.cfg.
- Python 3.9
- numpy<2
- scipy
- pyyaml >= 6.0
- svgwrite
- psutil
- matplotlib
- svgpathtools
- cairoSVG
NOTE: this lib has some quirks on Windows, which we resolve with including needed dlls in
./pygarment/pattern/cairo_dllsand adding the ditrectory to PATH in runtime - NiceGUI
- trimesh
- libigl
- pyrender
- CGAL
All python dependencies can be installed with pip install / conda install:
conda create -n garmentcode python=3.9
conda activate garmentcode
pip install -e . # installs in editable mode, installs requirements from setup.cfg
<build and install warp for GarmentCode>
Add the root repository to PYTHONPATH.
=> The code is ready to run
NOTE: check out a full environment setup and running process from our early adopter: https://github.com/maria-korosteleva/GarmentCode/issues/17