A modular programming framework for designing parametric sewing patterns
Project description
GarmentCode: Programming Parametric Sewing Patterns
Official Implementation of GarmentCode: Programming Parametric Sewing Patterns and GarmentCodeData: A Dataset of 3D Made-to-Measure Garments With Sewing Patterns.
You can find the body measurements part of the project here: https://github.com/mbotsch/GarmentMeasurements
News
[April, 2025] GarmentCode online configurator demo is temporarily unavailable. We are working on bringing it back onlin!
[Nov 20, 2024] GarmentCode configurator demo is now ONLINE 🥳 Check it out: https://garmentcode.ethz.ch/ (not for mobile)
[Sept 4, 2024] We release a new version of the dataset with a few fixes and updates: GarmentCodeData (v2). See documentation for new data version for more details.
[Aug 30, 2024] Major release -- implementation of GarmentCodeData in pygarment v2.0.0, new GUI, and other updates and improvements. Basic JSON representation classes are now part of PyGarment library! See CHANGELOG for more details
[July 1, 2024] GarmentCodeData is accepted to ECCV!
[May 29, 2024] First release of GarmentCodeData dataset!
[Oct 18, 2023] First release of GarmentCode!
Documents
- Installation
- Running Configurator
- Running Data Generation (warp)
- Body measurements
- Dataset documentation
- Running Old Maya+Qualoth tools
Navigation
Library
PyGarment is the core library described in the GarmentCode paper. It contains the base types (Edge, Panel, Component, Interface, etc.), as well as edge factory and various helpers and operators that help you design sewing patterns.
See Installation instructions before use.
Examples
- assets/garment_programs/ contains the code of garment components designed using PyGarment.
- assets/design_params/, assets/bodies/ contain examples of design and body measurements presets. They can be used in both GarmentCode GUI and
test_garmentcode.pyscript.
NOTE: assets/design_params/default.yaml is the setup used by GUI on load. Changing this file results in changes in the GUI initial state =)
Citation
If you are using our system in your research, please cite our papers:
@inproceedings{GarmentCodeData:2024,
author = {Korosteleva, Maria and Kesdogan, Timur Levent and Kemper, Fabian and Wenninger, Stephan and Koller, Jasmin and Zhang, Yuhan and Botsch, Mario and Sorkine-Hornung, Olga},
title = {{GarmentCodeData}: A Dataset of 3{D} Made-to-Measure Garments With Sewing Patterns},
booktitle={Computer Vision -- ECCV 2024},
year = {2024},
keywords = {sewing patterns, garment reconstruction, dataset},
}
@article{GarmentCode2023,
author = {Korosteleva, Maria and Sorkine-Hornung, Olga},
title = {{GarmentCode}: Programming Parametric Sewing Patterns},
year = {2023},
issue_date = {December 2023},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {42},
number = {6},
doi = {10.1145/3618351},
journal = {ACM Transaction on Graphics},
note = {SIGGRAPH ASIA 2023 issue},
numpages = {16},
keywords = {sewing patterns, garment modeling}
}
Issues, questions, suggestions
Please post your issues and questions to GitHub Issues.
For other requests you can find my info on https://korosteleva.com/.
Contributors
This project is brought to life by these people:
The body measurements team developed GarmentMeasurements:
Change Log
[2.0.2] - 2025-04-18
Fixed
- UVs are now preserving the aspect ratio of the garment panels
- When
fabric_grain_texture_pathisnullor unspecified, the second texture is not generated - @phucph11's fix of UV connected components evaluation: deriving component indices of vertices from face ids
[2.0.1] - 2024-09-12
Fixed
- Allow disabling frame timeout in simulation through setting
None(nullin.yaml) asmax_frame_timeconfig value. This fixes #15. - Fix erroneous duplication of frame timeout value for all frames. Timeout is only prolonged for the first frame -- initialization requires more time compared to the following frames. Sim property files are updated to reproduce earlier behavior with erroneous timeout duplication
[2.0.0] - 2024-08-30
Major update with release of GarmentCodeData, new GUI, and a number of other improvements and library changes. For technical details, see our papers.
Added
- [Mesh generation] GarmentCode library can now generate box meshes for the sewing patterns.
- [Simulation] We integrated our version of NVIDIA warp to support simulation of GarmentCode sewing patterns. It can be run from command line and from GUI.
- [Desing Sampling] We support random sampling of sewing pattern designs from the designs spaces. Sampling can be controlled though setting probabilities of sampling default values.
- [Generating synthetic 3D data] Combining the new capabilities allows for creating diverse synthetic datasets of 3D garments. We provide high-level scripts to create such datasets from the GarmentCode-provided garment programs.
- [Labeling] We added support for assigning labels to pattern elements (edges and panels) in both GarmentCode objects and JSON serialized pattern representation. These are currently utilized to guide the cloth simulation process, but can be assigned to enrich the data labeling.
- [Stitch orientation] GarmentCode now allows explicit specification of whether a stitch should be connecting the right side of the fabric on one side to the right side of the fabric on the other or right side to wrong side. It gives explicit control to developer on resolving the stitching direction. Most stitches require the default (right-to-right) setting, hence only a few need explicit update of this parameter. Internally, the right-to-right direction is found following the manifold property of connecting two panels with specified normal direction indicating the right side of the fabric.
Changed
- [Architecture] We updated the structure of
pygarmentlibrary. It now includes new mesh generation and cloth simulation routines, as well as the pattern serialization modules (patternlibrary) and the Maya + Qualoth routines for backward compatibility. This greatly simplifies the installation process and reduces module import issues. - [GUI] We re-wrote our GUI from PySimpleGUI to NiceGUI following the change in PySimpleGUI licensing scheme and desire for better UI look. GarmentCode GUI now runs in browser. Dependency on PySimpleGUI is removed.
- [Interface matching] In addition to stitch orientation labels above, we removed extra heuristics involved in the matching of the edges in two interfaces connected by a stitch. We found that these heuristics behaved unintuitively in some cases, and it was difficult to determine the correct way to fix erroneous matched. The process is now fully controlled by the developer, making it more intuitive. As before, the default matching process should work in most cases, and only a few complex stitches require intervention.
Fixed
- [Sewing patterns quality] We have made numerous improvements to the quality of sewing patterns produced by our garment programs. They now showcase better fit, balance and 3D alignment
- [Design space] We have updated the quality of the parameter interaction in our garment programs introducing better parameter ranges, parameter dependencies, interaction between design and body shape parameters, etc. Design space now has fewer invalid parameter combinations making the exploration of parameter space more reliable.
- [Other] numerous small bugs where discovered and fixed.
[1.0.0] - 2023-10-18
Initial release -- implementation of GarmentCode MIT License
Copyright (c) 2024 Maria Korosteleva
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygarment-2.0.2.tar.gz.
File metadata
- Download URL: pygarment-2.0.2.tar.gz
- Upload date:
- Size: 132.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bd7057ec5393c311eb3f7e7f46c8572d2fb6a192862ba782985fc5e0d6c7ea3
|
|
| MD5 |
e578a084b7fbe8f0504c818b276585e8
|
|
| BLAKE2b-256 |
7f8b85514c5e9671bd9f67a02e526022bc7257bc6c28fa605b6696cac7f693b4
|
File details
Details for the file pygarment-2.0.2-py3-none-any.whl.
File metadata
- Download URL: pygarment-2.0.2-py3-none-any.whl
- Upload date:
- Size: 141.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ca2120286924d1769c591e730ec46f1aff402745ba7be8165d497a0b5f9a1b
|
|
| MD5 |
fd8a4577244db8477b396c5f1f32688c
|
|
| BLAKE2b-256 |
10a9701ffbb81ad6c8d2dc7cbb10cc2b7c07419cfac3775fdff50cae419f7675
|