纺织学报 ›› 2024, Vol. 45 ›› Issue (05): 165-173.doi: 10.13475/j.fzxb.20230505901

• 服装工程 • 上一篇    下一篇

印花面料的边缘轮廓快速提取方法

文嘉琪1,2, 李新荣1,2(), 冯文倩1,2, 李瀚森1,2   

  1. 1.天津工业大学 机械工程学院, 天津 300387
    2.天津市现代机电装备技术重点实验室, 天津 300387
  • 收稿日期:2023-05-23 修回日期:2023-12-23 出版日期:2024-05-15 发布日期:2024-05-31
  • 通讯作者: 李新荣(1975—),男,教授,博士。主要研究方向为纺织服装装备智能化。E-mail:lixinrong7507@hotmail.com。
  • 作者简介:文嘉琪(1999—),女,硕士生。主要研究方向为面向鞋服行业的机器人关键技术。
  • 基金资助:
    工信部产业技术基础公共服务平台项目(2021-0173-2-1);国家重点研发计划项目(2018YFB1308801)

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 Published:2024-05-15 Online:2024-05-31

摘要:

工业协作型缝纫机器人代替操作工自动完成缝合是未来发展的必然趋势,但当前的工业协作型缝纫机器人难以快速精准地定位面料边缘轮廓信息,影响缝纫效率与缝纫质量。针对印花面料提出线下使用深度学习建立面料检测模型,线上调用面料检测模型分割面料与背景并结合传统轮廓检测算法快速准确提取面料边缘轮廓的方法。首先,建立面料图像数据集,并通过卷积拆分和融合损失函数对VGG-UNet模型进行优化,将面料数据集输入至优化的VGG-UNet模型进行训练学习并构建最优面料检测模型;其次,利用最优面料检测模型分割面料与背景;然后,采用数学形态学算法对分割后的面料图像进行自适应开运算去除面料边缘的毛边;最后,利用Canny算子对去除毛边后的面料图像进行轮廓提取。实验结果表明,本文方法可较好去除面料毛边并快速精准提取印花面料的边缘轮廓,所提取的轮廓与面料边缘轮廓高度拟合,轮廓提取精度高于99%,轮廓提取时间仅需0.216 s。本文研究可为后续机器人的轨迹规划提供快速准确的坐标信息,提高缝合质量和效率,推进无人化、自动化缝合生产线的实现。

关键词: 印花面料, 边缘轮廓提取, 机器视觉, 深度学习, VGG-UNet模型, 缝纫质量

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

中图分类号: 

  • TP317.4

图1

构建最优面料检测模型的流程"

图2

采集的面料图像与标注后的面料图像"

图3

优化的VGG-UNet模型"

图4

3×3卷积和卷积拆分"

表1

VGG-UNet与优化VGG-UNet模型性能对比"

模型
类别
精确
率/%
召回
率/%
均交
并比/
%
均像
素精度/
%
参数量/
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

图5

采集的面料图像与推理结果"

图6

数学形态学去除毛边"

图7

提取的面料边缘轮廓"

图8

面料1的提取过程及结果"

图9

面料2的提取过程及结果"

图10

印花面料原图与本文提取的边缘轮廓图像叠加对比"

图11

用传统轮廓提取方法的效果"

[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] 杨金鹏, 景军锋, 李吉国, 王渊博. 基于机器视觉的玻璃纤维合股纱缺陷检测系统设计[J]. 纺织学报, 2024, 45(05): 193-201.
[2] 白恩龙, 张周强, 郭忠超, 昝杰. 基于机器视觉的棉花颜色检测方法[J]. 纺织学报, 2024, 45(03): 36-43.
[3] 葛苏敏, 林瑞冰, 徐平华, 吴思熠, 罗芊芊. 基于机器视觉的曲面枕个性化定制方法[J]. 纺织学报, 2024, 45(02): 214-220.
[4] 池盼盼, 梅琛楠, 王焰, 肖红, 钟跃崎. 基于边缘填充的单兵迷彩伪装小目标检测[J]. 纺织学报, 2024, 45(01): 112-119.
[5] 陆伟健, 屠佳佳, 王俊茹, 韩思捷, 史伟民. 基于改进残差网络的空纱筒识别模型[J]. 纺织学报, 2024, 45(01): 194-202.
[6] 史伟民, 韩思捷, 屠佳佳, 陆伟健, 段玉堂. 基于机器视觉的空纱筒口定位方法[J]. 纺织学报, 2023, 44(11): 105-112.
[7] 陈罡, 金贵阳, 吴菁, 罗千. 智能服装缝制关键技术及成套装备研发[J]. 纺织学报, 2023, 44(08): 197-204.
[8] 陈泰芳, 周亚勤, 汪俊亮, 徐楚桥, 李冬武. 基于视觉特征强化的环锭纺细纱断头在线检测方法[J]. 纺织学报, 2023, 44(08): 63-72.
[9] 杨宏脉, 张效栋, 闫宁, 朱琳琳, 李娜娜. 一种高鲁棒性经编机上断纱在线检测算法[J]. 纺织学报, 2023, 44(05): 139-146.
[10] 纪越, 潘东, 马杰东, 宋丽梅, 董九志. 基于机器视觉的弦振动纱线张力非接触检测系统[J]. 纺织学报, 2023, 44(05): 198-204.
[11] 陶静, 汪俊亮, 徐楚桥, 张洁. 基于视觉校准的环锭纺细纱条干特征在线提取方法[J]. 纺织学报, 2023, 44(04): 70-77.
[12] 顾冰菲, 张健, 徐凯忆, 赵崧灵, 叶凡, 侯珏. 复杂背景下人体轮廓及其参数提取[J]. 纺织学报, 2023, 44(03): 168-175.
[13] 李杨, 彭来湖, 李建强, 刘建廷, 郑秋扬, 胡旭东. 基于深度信念网络的织物疵点检测[J]. 纺织学报, 2023, 44(02): 143-150.
[14] 陈佳, 杨聪聪, 刘军平, 何儒汉, 梁金星. 手绘草图到服装图像的跨域生成[J]. 纺织学报, 2023, 44(01): 171-178.
[15] 王斌, 李敏, 雷承霖, 何儒汉. 基于深度学习的织物疵点检测研究进展[J]. 纺织学报, 2023, 44(01): 219-227.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!