104 | 0 | 23 |
下载次数 | 被引频次 | 阅读次数 |
古代服饰线图提取旨在精确获取轮廓与形状信息,以助于再创作和传统服饰保护。但现有方法增加网络以提高泛化性,导致参数量大增。为此,提出了基于Transformer的两阶段边缘检测方法,旨在解决图像局部信息丢失以及模型参数量大的问题。第一阶段将图像分割成16×16粗粒度补丁,利用编码器进行全局自注意力计算以捕获补丁间依赖;第二阶段采用8×8细粒度无重叠滑动窗口覆盖图像,通过局部编码器计算窗口内注意力有效捕捉细微边缘且降低成本。设计了轻量特征融合模块,支持全局与局部特征的高效整合。实验结果表明,该方法在古代服饰和公共数据集上边缘轮廓信息提取效果优于现有方法,ODS指标平均提升15.9%。虽然OIS和AP未超过Informative Drawing,但在模型体量和耗时方面具有明显优势。
Abstract:The extraction of ancient costume line drawings aims to precisely obtain contour and shape information to aid in re-creation and traditional preservation. However, existing methods increase network depth to improve generalization, leading to a significant increase in the number of model parameters. Therefore, this paper proposes a two-stage edge detection method based on Transformer, aiming to solve the problems of local information loss in images and large model parameter sizes. The first stage divides the image into 16×16 coarse-grained patches and uses an encoder to perform global self-attention calculations to capture dependencies between patches; the second stage covers the image with an 8×8 fine-grained non-overlapping sliding window and calculates the attention within the window through a local encoder to effectively capture subtle edges and reduce costs. A lightweight feature fusion module is designed to support efficient integration of global and local features. Experimental results show that this method outperforms existing methods in extracting edge contour information on ancient costume and public datasets, with an average improvement of 15.9% in the ODS metric. Although OIS and AP does not surpass Informative Drawing, this method shows obvious advantages in model size and time consumption.
[1] SUN R,LEI T,CHEN Q,et al.Survey of image edge detection[J].Frontiers in Signal Processing,2022,2:826967.
[2] SIVAPRIYA M S,SURESH S.ViT-DexiNet:A vision transformer-based edge detection operator for small object detection in SAR images[J].International Journal of Remote Sensing,2023,44(22):7057-7084.
[3] AKBARI SEKEHRAVANI E,BABULAK E,MASOODI M.Implementing canny edge detection algorithm for noisy image[J].Bulletin of Electrical Engineering and Informatics,2020,9(4):1404-1410.
[4] MCILHAGGA W.The canny edge detector revisited[J].International Journal of Computer Vision,2011,91(3):251-261.
[5] LI Y B,LIU B L.Improved edge detection algorithm for canny operator[C]//2022 IEEE 10th Joint International Information Technology and Artificial Intelligence Conference.Chongqing,China:IEEE,2022:1-5.
[6] UY J N,VILLAVERDE J F.A durian variety identifier using canny edge and CNN[C]//2021 IEEE 7th International Conference on Control Science and Systems Engineering.Qingdao,China:IEEE,2021:293-297.
[7] OJASHWINI R N,GANGADHAR REDDY R,RANI R N,et al.Edge detection canny algorithm using adaptive threshold technique[C]//Intelligent Data Engineering and Analytics.Singapore:Springer,2020:469-477.
[8] 肖扬,周军.图像边缘检测综述[J].计算机工程与应用,2023,59(5):40-54.XIAO Y,ZHOU J.Overview of image edge detection[J].Computer Engineering and Applications,2023,59(5):40-54.
[9] YE Y F,YI R J,GAO Z R,et al.Delving into crispness:Guided label refinement for crisp edge detection[J].IEEE Transactions on Image Processing,2023,32:4199-4211.
[10] PU M Y,HUANG Y P,LIU Y M,et al.EDTER:Edge detection with transformer[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition.New Orleans,USA:IEEE,2022:1392-1402.
[11] RADFORD A,KIM J W,HALLACY C,et al.Learning transferable visual models from natural language supervision[C]//2021 International Conference on Machine Learning.ICML,2021:8748-8763.
[12] ARBELáEZ P,MAIRE M,FOWLKES C,et al.Contour detection and hierarchical image segmentation[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2011,33(5):898-916.
[13] LIU Z Y,TAN Y C,HE Q,et al.SwinNet:Swin transformer drives edge-aware RGB-D and RGB-T salient object detection[J].IEEE Transactions on Circuits and Systems for Video Technology,2022,32(7):4486-4497.
[14] XIA L G,CHEN J,LUO J C,et al.Building change detection based on an edge-guided convolutional neural network combined with a transformer[J].Remote Sensing,2022,14(18):4524.
[15] XU S C,CHEN X X,ZHENG Y H,et al.ECT:Fine-grained edge detection with learned cause tokens[J].Image and Vision Computing,2024,143:104947.
[16] MIAO,L,TAKESHI O,RYOICHI I.SWIN-RIND:Edge detection for reflectance,illumination,normal and depth discontinuity with Swin Transformer[C]//The 34th British Machine Vision Conference.Aberdeen,UK:BMVA Press,2023:1-10.
[17] LIU Z,LIN Y T,CAO Y,et al.Swin transformer:Hierarchical vision transformer using shifted windows[C]//2021 IEEE/CVF International Conference on Computer Vision.Montreal,Canada:IEEE,2021:9992-10002.
[18] SORIA X,RIBA E,SAPPA A.Dense extreme inception network:Towards a robust CNN model for edge detection[C]//2020 IEEE Winter Conference on Applications of Computer Vision.Snowmass Village,USA:IEEE,2020:1923-1932.
[19] HAN K,WANG Y H,CHEN H T,et al.A survey on vision transformer[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2023,45(1):87-110.
[20] SUBAKAN C,RAVANELLI M,CORNELL S,et al.Attention is all you need in speech separation[C]//2021 IEEE International Conference on Acoustics.Toronto,Canada:IEEE,2021:21-25.
[21] SORIA X,POMBOZA-JUNEZ G,SAPPA A D.LDC:Lightweight dense CNN for edge detection[J].IEEE Access,2022,10:68281-68290.
[22] LI C Z,LIU X T,WONG T T.Deep extraction of manga structural lines[J].ACM Transactions on Graphics,2017,36(4):1-12.
[23] CHAN C,DURAND F,ISOLA P.Learning to generate line drawings that convey geometry and semantics[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition.New Orleans,USA:IEEE,2022:7905-7915.
[24] EVERINGHAM M,VAN GOOL L,WILLIAMS C K I,et al.The pascal visual object classes (VOC) challenge[J].International Journal of Computer Vision,2010,88(2):303-338.
[25] LONG J,SHELHAMER E,DARRELL T.Fully convolutional networks for semantic segmentation[C]//2015 IEEE Conference on Computer Vision and Pattern Recognition.Boston,USA:IEEE,2015:3431-3440.
[26] YIN Z Y,WANG Z S,FAN C,et al.Edge detection via fusion difference convolution[J].Sensors,2023,23(15):6883.
[27] LE M,KAYAL S.Revisiting edge detection in convolutional neural networks[C]//2021 International Joint Conference on Neural Network.Shenzhen,China:IEEE,2021:1-9.
[28] HU J,SHEN L,SUN G.Squeeze-and-excitation networks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Salt Lake City,USA:IEEE,2018:7132-7141.
[29] XIE S N,TU Z W.Holistically-nested edge detection[C]//2015 IEEE International Conference on Computer Vision.Santiago,USA:IEEE,2015:1395-1403.
[30] KINGMA D P,JIMMY B Adam:A method for stochastic optimization[J].International Conference on Learning Representations,2014:6628106.
基本信息:
DOI:10.16152/j.cnki.xdxbzr.2025-01-006
中图分类号:TS941.12;TP391.41
引用信息:
[1]周蓬勃,冯龙,武浩东等.基于Transformer两阶段策略的古代服饰线图提取[J].西北大学学报(自然科学版),2025,55(01):75-84.DOI:10.16152/j.cnki.xdxbzr.2025-01-006.
基金信息:
国家自然科学基金(62271393); 国博文旅部重点实验室开放课题(1222000812,CRRT2021K01)