Journal of Textile Research ›› 2024, Vol. 45 ›› Issue (05): 165-173.doi: 10.13475/j.fzxb.20230505901

• Apparel Engineering • Previous Articles     Next Articles

Rapid extraction of edge contours of printed fabrics

WEN Jiaqi1,2, LI Xinrong1,2(), FENG Wenqian1,2, LI Hansen1,2   

  1. 1. School of Mechanical Engineering, Tiangong University, Tianjin 300387, China
    2. Key Laboratory of Modern Mechanical and Electrical Equipment Technology, Tianjin 300387, China
  • Received:2023-05-23 Revised:2023-12-23 Online:2024-05-15 Published:2024-05-31

Abstract:

Objective The industrial sewing robot based on contour extraction detects fabric edge contours with visual aids and works out the robot's movement trajectory based on the fabric edge contour information to achieve the sewing of the fabric in conjunction with the sewing machine. However, the large number of raw edges of the fabric after cutting, the print pattern of the fabric and the background of the fabric image acquisition all affect the accuracy of the fabric edge contour extraction, and the extraction time directly affects the sewing efficiency.

Method The conventional VGG-UNet model was optimized by convolutional splitting and fusion loss functions to improve the inference speed and segmentation accuracy of the model. The optimal fabric detection model was then constructed and trained using the optimized VGG-UNet to segment quickly and accurately the printed fabric and the desktop background, and the fabric burrs were removed using adaptive open operations before the Canny operator was used for edge detection to obtain accurate fabric edge contours.

Results The optimized VGG-Unet optimal training results were 0.79%, 0.79%, 1.6%, 0.79% higher than those of the VGG-UNet model in each index, and the inference speed was reduced by 10.368 ms, and the number of total parameters of the optimized VGG-UNet model was greatly reduced. The optimal fabric detection model that was trained and constructed showed obvious advantages in terms of memory resource consumption and detection efficiency. The superimposed image showed that the contour extraction accuracy was not affected even though the printed fabric was similar in color to the desktop background and the lighting was not uniform. In addition, the contour lines were hand-drawn on the original image, and the fabric edge contour lines extracted in this paper were computed by OpenCV to find out the overlap of the two contour lines, and the accuracy of the contour line extraction was more than 99%. The complete algorithm was obtained by pytorch programming on a computer with Windows 11 operating system, GPU using NVIDIAGerforce GTX 1650 and 16 G memory, and it took only 0.216 s to extract the edge contour of the fabric in a fabric image, while the proposed conventional contour extraction method took 2.852 s. The edge contour of the printed fabric was the worst when the fabric color is close to the background color of the desktop and when the reflection of the desktop was severe. In addition, the conventional contour extraction method does not consider the burr problem generated by the fabric cutting, so the conventional contour extraction algorithm not only has a long extraction time but also cannot remove the noise and the burr efficiently, making it difficult to accurately extract the edge contour of the printed fabric.

Conclusion This paper proposes the use of deep learning combined with conventional contour detection algorithms to extract fabric edge contours for the first time. It solves the problem that traditional fabric contour extraction methods are affected by fabric color, print pattern, fabric texture and desktop background, and has excellent performance in extracting edge contours of fabrics with complex prints. In this paper, we consider the large number of raw edges generated by the fabric edges after cutting the fabric. This method can effectively remove the raw edges and extract the fabric edge contours quickly and accurately, and the extraction process is not affected by the print pattern, table background, color, fabric texture and light source, the method is good in generality and the extraction results fit the fabric edge contours highly.

Key words: printed fabric, edge contouring extraction, machine vision, deep learning, VGG-UNet model, sewing quality

CLC Number: 

  • TP317.4

Fig.1

Flow of building optimal fabric inspection model"

Fig.2

Collected fabric image (a) and annotated fabric image (b)"

Fig.3

Optimized VGG-UNet model"

Fig.4

3×3 convolution(a) and convolution splitting (b)"

Tab.1

Performance comparison of VGG-UNet and optimized VGG-UNet models"

模型
类别
精确
率/%
召回
率/%
均交
并比/
%
均像
素精度/
%
参数量/
M
推理
时间/
ms
模型1 98.83 98.83 97.64 98.83 2 489
2 437
40.479
模型2 99.62 99.62 99.24 99.62 2 432
5 429
30.111

Fig.5

Collected fabric images(a) and inference result(b)"

Fig.6

Raw edges removal by mathematical morphology"

Fig.7

Extracted fabric edge contour"

Fig.8

Experimental process and results of fabric 1. (a) Original image; (b)Semantic segmentation result; (c)Deburring result; (d)Edge contour"

Fig.9

Experimental process and results of fabric 2. (a) Original image; (b)Semantic segmentation result; (c)Deburring result; (d)Edge contour"

Fig.10

Comparison between original image of printed fabric and superimposed edge contour image extracted in this paper. (a) Superposition of Fig.5 and Fig.7; (b) Superposition of Fig.8 (a) and 8 (d); (c) Superposition of Fig.9 (a) and 9(d)"

Fig.11

traditional contour extraction method. (a) Fig.5 fabric image; (b) Original image of Fig.8(a) fabric; (c) Original image of Fig.9(a) fabric"

[1] 吴柳波, 李新荣, 杜金丽. 基于轮廓提取的缝纫机器人运动轨迹规划研究进展[J]. 纺织学报, 2021, 42(4):191-200.
WU Liubo, LI Xinrong, DU Jinli. Research progress on contour extraction-based trajectory plan-ning for sewing robots[J]. Journal of Textile Research, 2021, 42(4):191-200.
[2] 王晓华, 王育合, 张蕾, 等. 缝纫机器人对织物张力与位置的模糊阻抗控制[J]. 纺织学报, 2021, 42(11):173-178.
doi: 10.13475/j.fzxb.20200605706
WANG Xiaohua, WANG Yuhe, ZHANG Lei, et al. Fuzzy impedance control of fabric tension and position by a sewing robot[J]. Journal of Textile Research, 2021, 42(11):173-178.
doi: 10.13475/j.fzxb.20200605706
[3] 安立新, 李炜. 一种带有印花图案服装图像的轮廓提取[J]. 纺织学报, 2013, 34(3):132-136.
AN Lixin, LI Wei. An outline extraction of garment images with printed patterns[J]. Journal of Textile Research, 2013, 34(3):132-136.
[4] 周佳, 宗雅倩, 刘其思, 等. 基于图像处理的服装样板轮廓提取[J]. 纺织科学与工程学报, 2018, 35(4):133-136,157.
ZHOU Jia, ZONG Yaqian, LIU Qisi, et al. Image processing based garment sample outline extraction[J]. Journal of Textile Science and Engineering, 2018, 35(4):133-136,157.
[5] 李东, 万贤福, 汪军. 采用傅里叶描述子和支持向量机的服装款式识别方法[J]. 纺织学报, 2017, 38(5):122-127.
LI Dong, WAN Xianfu, WANG Jun. A clothing style recognition method using Fourier descriptors and support vector machines[J]. Journal of Textile Research, 2017, 38(5):122-127.
[6] JIA X, LIU Z. Element extraction and convolutional neural network-based classification for blue calico[J]. Textile Research Journal, 2020.DOI:0.1177/0040517520939573.
[7] LIU ZH, CHENG F, ZHANG W. A novel segmentation algorithm for clustered flexional agricultural products based on image analysis[J]. Computers and Electronics in Agriculture, 2016(126): 44-54.
[8] FU Leiyang, LI Shaowen. A new semantic segmentation framewok based on UNet[J]. Sensors, 2023, 23(19):8123.
[9] WENG W, ZHU X. U-Net: convolutional networks for biomedical image segmentation[J]. IEEE Access, 2021(99):1-10.
[10] 徐欢, 任沂斌. 基于混合损失U-Net的SAR图像渤海海冰检测研究[J]. 海洋学报, 2021, 43(6):157-170.
XU Huan, REN Yibin. Research on sea ice detection in Bohai sea based on mixed-loss U-Net for SAR images[J]. Acta Oceanological Sincia, 2021, 43(6):157-170.
[11] HOU Yuewu, LIU Zhaoying, ZHANG Ting, et al. C-UNet: complement UNet for remote sensing road extraction[J]. Sensors, 2021, 21(6):2153.
[12] SGASHIDHAR R, SUDARSHAN Patilkulkarni. Visual speech recognition for small scale dataset using VGG16 convolution neural network[J]. Multimedia Tools and Applications, 2021, 80(19):28941-28952.
[13] SHI Jiyuan, JI Dang, CUI Mida, et al. Improvement of damage segmentation based on pixel-level data balance using VGG-UNet[J]. Applied Sciences, 2021.DOI: 10.3390/app11020518.
[14] DING Xiaohan, GUO Yuchen, DING Guiguang, et al. ACNet: strengthening the kernel skeletons for powerful CNN via asymmetric convolution blocks[C]// IEEE /CVF International Conference on Computer Vision(ICCV 2019).[S.l.]:IEEE, 2019:1911-1920.
[15] 张占军, 彭艳兵, 程光. 基于CIFAR-10的图像分类模型优化[J]. 计算机应用与软件, 2018, 35(3):177-181.
ZHANG Zhanjun, PENG Yanbing, CHENG Guang. Opti-mization of image classification model based on CIFAR-10[J]. Computer Applications and Software, 2018, 35(3):177-181.
[16] 张达, 熊凌. 基于改进PSPNet的氩花图像分割算法[J]. 计算机工程与设计, 2022, 43(10):2843-2849.
ZHANG Da, XIONG Ling. Semantic segmentation algori-thm of flower image based on improved PSPNet[J]. Computer Engineering and Design, 2022, 43(10): 2843-2849.
[17] 王欣, 王美丽, 边党伟. 融合MobileNetv2和注意力机制的轻量级人像分割算法[J]. 计算机工程与应用, 2022, 58(7):220-228.
doi: 10.3778/j.issn.1002-8331.2106-0334
WANG Xin, WANG Meili, BIAN Dangwei. A lightweight portrait segmentation algorithm incurporating MobileNetv2 and attention mechanism[J]. Computer Engineering and Applications, 2022, 58(7):220-228.
doi: 10.3778/j.issn.1002-8331.2106-0334
[18] 崔丽群, 张月, 田鑫. 融合双阈值和改进形态学的边缘检测[J]. 计算机工程与应用, 2017, 53(9): 190-194,200.
doi: 10.3778/j.issn.1002-8331.1510-0223
CUI Liqun, ZHANG Yue, TIAN Xin. Fusion of double thresholding and improved morphology for edge detec-tion[J]. Computer Engineering and Applications, 2017, 53(9):190-194,200.
doi: 10.3778/j.issn.1002-8331.1510-0223
[19] 冯文倩, 李新荣, 杨帅. 人体轮廓机器视觉检测算法的研究进展[J]. 纺织学报, 2021, 42 (3): 190-196.
FENG Wenqian, LI Xinrong, YANG Shuai. Research progress of machine vision detection algorithms for human contours[J]. Journal of Textile Research, 2021, 42(3):190-196.
[20] FUENTES-ALVENTOSA A, GOMEZ-LUNA J, MEDINA-CARNICER R. GUD-Canny: a real-time GPU-based unsupervised and distributed Canny edge detector[J]. Journal of Real-Time Image Processing, 2022, 19(3):591-605.
[1] YANG Jinpeng, JING Junfeng, LI Jiguo, WANG Yuanbo. Design of defect detection system for glass fiber plied yarn based on machine vision [J]. Journal of Textile Research, 2024, 45(05): 193-201.
[2] BAI Enlong, ZHANG Zhouqiang, GUO Zhongchao, ZAN Jie. Cotton color detection method based on machine vision [J]. Journal of Textile Research, 2024, 45(03): 36-43.
[3] GE Sumin, LIN Ruibing, XU Pinghua, WU Siyi, LUO Qianqian. Personalized customization of curved surface pillows based on machine vision [J]. Journal of Textile Research, 2024, 45(02): 214-220.
[4] CHI Panpan, MEI Chennan, WANG Yan, XIAO Hong, ZHONG Yueqi. Single soldier camouflage small target detection based on boundary-filling [J]. Journal of Textile Research, 2024, 45(01): 112-119.
[5] LU Weijian, TU Jiajia, WANG Junru, HAN Sijie, SHI Weimin. Model for empty bobbin recognition based on improved residual network [J]. Journal of Textile Research, 2024, 45(01): 194-202.
[6] SHI Weimin, HAN Sijie, TU Jiajia, LU Weijian, DUAN Yutang. Empty yarn bobbin positioning method based on machine vision [J]. Journal of Textile Research, 2023, 44(11): 105-112.
[7] CHEN Gang, JIN Guiyang, WU Jing, LUO Qian. Research and development of key technologies and whole-set equipment for intelligent sewing [J]. Journal of Textile Research, 2023, 44(08): 197-204.
[8] CHEN Taifang, ZHOU Yaqin, WANG Junliang, XU Chuqiao, LI Dongwu. Online detection of yarn breakage based on visual feature enhancement and extraction [J]. Journal of Textile Research, 2023, 44(08): 63-72.
[9] YANG Hongmai, ZHANG Xiaodong, YAN Ning, ZHU Linlin, LI Na'na. Robustness algorithm for online yarn breakage detection in warp knitting machines [J]. Journal of Textile Research, 2023, 44(05): 139-146.
[10] JI Yue, PAN Dong, MA Jiedong, SONG Limei, DONG Jiuzhi. Yarn tension non-contacts detection system on string vibration based on machine vision [J]. Journal of Textile Research, 2023, 44(05): 198-204.
[11] TAO Jing, WANG Junliang, XU Chuqiao, ZHANG Jie. Feature extraction method for ring-spun-yarn evenness online detection based on visual calibration [J]. Journal of Textile Research, 2023, 44(04): 70-77.
[12] GU Bingfei, ZHANG Jian, XU Kaiyi, ZHAO Songling, YE Fan, HOU Jue. Human contour and parameter extraction from complex background [J]. Journal of Textile Research, 2023, 44(03): 168-175.
[13] LI Yang, PENG Laihu, LI Jianqiang, LIU Jianting, ZHENG Qiuyang, HU Xudong. Fabric defect detection based on deep-belief network [J]. Journal of Textile Research, 2023, 44(02): 143-150.
[14] ZHANG Diandian, LI Min, GUAN Yu, WANG Sixiang, HU Huanchuan, FU Shaohai. Preparation and performance of disperse dye printed fabrics with characteristics of vegetation-like Vis-NIR reflectance spectrum [J]. Journal of Textile Research, 2023, 44(01): 142-148.
[15] CHEN Jia, YANG Congcong, LIU Junping, HE Ruhan, LIANG Jinxing. Cross-domain generation for transferring hand-drawn sketches to garment images [J]. Journal of Textile Research, 2023, 44(01): 171-178.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!