Journal of Textile Research ›› 2026, Vol. 47 ›› Issue (07): 228-238.doi: 10.13475/j.fzxb.20251002201

• Apparel Engineering • Previous Articles     Next Articles

Automatic generation method for T-shirt pattern design based on YOLOv8 keypoint detection and size-driven approach

LI Xiechen1, ZHENG Xiaohu1,2,3(), HU Jun1,2,3   

  1. 1 School of Information and Intelligent Science, Donghua University, Shanghai 201620, China
    2 Engineering Research Center of Artificial Intelligence for Textile Industry, Ministry of Education, Shanghai 201620, China
    3 Shanghai Industrial Big Data and Intelligent Systems Engineering Technology Center, Shanghai 201620, China
  • Received:2025-10-14 Revised:2026-05-13 Online:2026-07-15 Published:2026-07-29
  • Contact: ZHENG Xiaohu E-mail:xhzheng@dhu.edu.cn

Abstract:

Objective In order to address the low efficiency in conventional clothing pattern making methods and the limitation of existing AIGC-based generation methods which only output images without binding process dimension information, this study aims to develop a method for automatically generating digital clothing patterns with both visual accuracy and production usability, so as to connect the design and subsequent production links (such as grading, marker making and cutting) in the clothing manufacturing process and provide a feasible solution for the engineering application of intelligent garment pattern making.

Method A two-stage pattern generation framework integrating YOLOv8 key-point recognition and parametric dimension constraints was proposed. First, based on the YOLOv8-pose model, optimizations were made according to the characteristics of T-shirt patterns: three groups of anchor boxes (small anchor box 12×12, medium anchor box 24×24, large anchor box 48×48) suitable for the scale of pattern were generated by re-clustering to replace the default anchor boxes. On the basis of the original bounding box loss (CIoU) + key-point loss (MSE), a line consistency constraint loss was added to force key-points to fit the structural lines of the pattern, so as to realize the accurate positioning of the contour and internal structural key-points of the clothing back sheet pattern. Then, a size-driven generation module was adopted to convert discrete key-points into structured patterns. Parametric basic templates were constructed based on clothing pattern making principles, and the coordinates of template vertices were dynamically calculated by input key size variables (such as garment length, half bust, shoulder width, collar width, sleeve length, cuff width). Skeleton alignment and key-point mapping were carried out (including bilateral filtering for denoising, Otsu threshold method for converting to binary images, morphological thinning for extracting skeleton, KD-tree nearest-neighbor search for adsorbing key-points to skeleton lines) to eliminate image noise and recognition deviation. Adjacency matrices were built to quantify topological relationships through connection validity judgment, subgraph division and adjacency matrix generation, so as to convert discrete key-points into structured connections. Finally, smooth contours were generated using quadratic Bezier curves, and a dual-slider interactive mechanism was introduced to realize the dynamic adjustment of size parameters and curve shapes.

Results The experimental results showed that the optimized key-point detection model achieved a key-point localization accuracy (KLA) of 96.8%, which was significantly higher than the original YOLOv8-pose model with an mAP50 of 0.93. The generated T-shirt patterns had a structural similarity index (SSIM) of 0.85 and a key-point connection accuracy (CA) of 96.2%, which effectively ensured the accuracy of the contour and the rationality of the topological relationship. In terms of efficiency, the average time consumption of the entire processing flow was only 1.2 s per pattern (based on NVIDIA RTX 4060 GPU), which was much faster than the conventional manual CAD pattern making that usually takes tens of minutes per pattern. Compared with GAN-based methods (SSIM=0.76) and diffusion-based methods (SSIM=0.82) that only output static images, the output of this method was a parametric and editable digital pattern that could be directly connected to subsequent production links such as grading, marker making and cutting. In addition, through the developed dual-slider interactive interface, users could dynamically adjust size parameters and curve control points, and the system would update the pattern shape in real time, meeting the needs of fine-tuning the pattern in actual production.

Conclusion The proposed automatic generation method for T-shirt patterns integrating YOLOv8 key-point recognition and parametric dimension constraints, effectively solves the problems of low efficiency in traditional pattern making and the inability of existing AIGC methods to output results directly applicable to production. The optimized detection model realizes the accurate positioning of pattern key-points with an accuracy of 96.8%, and the introduction of adjacency matrices to construct topological relationships enables the generation of parametric digital patterns with reasonable structure and smooth contour under size driving. Experiments show that while maintaining high structural similarity and connection compliance rate, the output results of the proposed method can be directly connected to subsequent production links, realizing the effective connection from design to production. The core value of this study lies in providing an intelligent front-end solution for the conventional CAD parametric design process, significantly reducing the professional threshold and manual dependence. Although the current method still relies on predefined templates when dealing with garment categories with very different structures (which ensures the standardization and production usability of the output results), future research will focus on expanding the coverage of the template library and exploring template adaptive generation technology based on few-shot learning, so as to promote the development of intelligent garment pattern making systems towards more universal and efficient directions.

Key words: clothing pattern making, dimensional constraint, keypoint detection, parametric modeling, Bezier curves

CLC Number: 

  • TS941.26

Fig.1

Optimized YOLOv8-Pose keypoint detection framework for clothing patterns"

Fig.2

Illustration of keypoints distribution on back sheet of clothing"

Fig.3

Size-driven layout generation module flowchart"

Fig.4

Back sheet pattern layout topological relationship. (a) No darts; (b) Center dart"

Fig.5

Display of key links results in clothing back sheet pattern generation. (a) No darts; (b) Center dart; (c) Underarm dart; (d) Double darts; (e) Hem dart; (f) Bias side dart"

Tab.1

Comparison of image quality generated by various methods"

方法 SSIM 输出格式 生成可用性
(是否含尺寸/可编辑)
CAD 0.93 参数化样板
基于GAN 0.76 图像
基于扩散 0.82 图像
本文方法 0.85 参数化样板

Fig.6

Schematic diagram of interactive interface for dynamic adjustment of size and curve shape and keypoint connection"

Fig.7

Actual production drawings from CAD software"

Fig.8

Comparison of GPU and CPU processing time duration at different resolutions"

Tab.2

Influence of each optimization component on keypoint localization accuracy"

实验组 优化组件 关键点定位
准确率/%
相对基线
提升/%
A 93.00±0.25
B 仅锚框调整 95.15±0.18 +2.15
C 仅线条损失 94.72±0.22 +1.72
D 完整优化 96.80±0.15 +3.80
[1] 李涛, 杜磊, 黄振华, 等. 服装款式图识别与样板转换技术研究进展[J]. 纺织学报, 2020, 41(8): 145-151.
LI Tao, DU Lei, HUANG Zhenhua, et al. Review on pattern conversion technology based on garment flat recognition[J]. Journal of Textile Research, 2020, 41(8): 145-151.
[2] 黄小源, 侯珏, 杨阳, 等. 基于改进深度学习模型的高精度服装样板自动生成[J]. 纺织学报, 2025, 46(2): 236-243.
HUANG Xiaoyuan, HOU Jue, YANG Yang, et al. Automatic generation of high-precision garment patterns based on improved deep learning model[J]. Journal of Textile Research, 2025, 46(2): 236-243.
[3] KOROSTELEVA M, LEE S H. NeuralTailor: reconstructing sewing pattern structures from 3D point clouds of garments[J]. ACM Transactions on Graphics, 2022, 41(4): 1-16.
[4] 余承志, 徐增波, 鲍禹辰, 等. 基于关键点检测的服装尺寸测量方法[J]. 东华大学学报 (自然科学版), 2026, 52(2):154-163.
YU C Z, XU Z B, BAO Y C, et al. Clothing size measurement method based on keypoint detection[J]. Journal of Donghua University (Natural Science), 2026, 52(2):154-163.
[5] 李梦, 陈敏之. 基于YOLOv8的女裤结构特征识别方法[J]. 浙江理工大学学报(自然科学版), 2025, 53(4): 507-514.
LI Meng, CHEN Minzhi. A structural feature recognition method of women's pants based on YOLOv8[J]. Journal of Zhejiang Sci-Tech University (Natural Sciences), 2025, 53(4): 507-514.
[6] 付君健, 耿照俊, 孟令盼, 等. 基于图像处理的服装样板轮廓快速生成方法[J/OL]. 智能计算机与应用, 2025, 5(3):1-7 (2025-09-18)[2026-06-17].
FU Junjian, GENG Zhaojun, MENG Lingpan, et al. Image processing based fast generation method forgarment sample outline[J/OL]. Intelligent Computer and Applications, 2025, 5(3):1-7 (2025-09-18)[2026-06-17].
[7] 侯斐斐, 彭应昊, 董健, 等. 基于双重YOLOv8-pose模型的探地雷达双曲线关键点检测与目标定位[J]. 电子与信息学报, 2024, 46(11): 4305-4316.
HOU Feifei, PENG Yinghao, DONG Jian, et al. Ground penetrating radar hyperbolic keypoint detection and object localization based on dual YOLOv8-pose model[J]. Journal of Electronics & Information Technology, 2024, 46(11): 4305-4316.
[8] 胡志霖, 陈敏之. 基于深度学习的男装款式图制版要素识别[J]. 染整技术, 2024, 46(9): 66-72, 115.
HU Zhilin, CHEN Minzhi. Identification of pattern elements in men's fashion design sketches based on deep learning[J]. Textile Dyeing and Finishing Journal, 2024, 46(9): 66-72, 115.
[9] 张伶俐, 张皋鹏. 应用MatLab的服装纸样参数化平面制版[J]. 纺织学报, 2019, 40(1): 130-135.
ZHANG Lingli, ZHANG Gaopeng. Parametric flat pattern design for clothing based on MatLab[J]. Journal of Textile Research, 2019, 40(1): 130-135.
[10] SHEN W, ZHAO K, JIANG Y, et al. Object skeleton extraction in natural images by fusing scale-associated deep side outputs[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2016: 222-230.
[11] NORIS G, HORNUNG A, SUMNER R W, et al. Topology-driven vectorization of clean line drawings[J]. ACM Transactions on Graphics, 2013, 32(1): 1-11.
[12] 段欣瑜, 吴巧英. 基于MatLab的女裤参数化制版方法[J]. 浙江理工大学学报, 2024, 51(3): 220-228.
DUAN Xinyu, WU Qiaoying. Parameterized plate making method for women’s pants based on MatLab[J]. Journal of Zhejiang Institute of Science and Technology, 2024, 51(3): 220-228.
[1] XIE Yali, LI Xiaohui. Clothing size extraction based on two-dimensional human body images [J]. Journal of Textile Research, 2026, 47(07): 219-227.
[2] TAO Jinzhi, XIA Ming, WANG Wei. Clothing silhouette recognition based on detection of key points [J]. Journal of Textile Research, 2024, 45(06): 142-148.
[3] REN Ze, ZHONG Anhua. Digital pattern making of underwear based on NURBS surface model of male waist, hip and crotch [J]. Journal of Textile Research, 2023, 44(08): 167-173.
[4] WANG Xu, DU Zengfeng, WANG Cuie, NI Qingqing, LIU Xinhua. Parametric three-dimensional modeling on through-thickness orthogonal woven fabric structure [J]. Journal of Textile Research, 2019, 40(11): 57-63.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!