Authors’ overview
Harnessing the power of artificial intelligence(AI) approaches to innovatively generating the vector graphics of fine-grained patterns has become an important task in image edge extraction, particularly on the domain of intangible cultural heritage (ICH) images where they are typically fine-grained and having the complex edges. With higher autonomy, the machine learning algorithms are able to accurately extract the image information, understand and convey the concept contained in it. In this paper, we take Qiang embroidery patterns as an example due to containing fine-grained patterns, which is more suitable for the study of image processing and pattern recognition techniques. We firstly adopt appropriate pre-processing methods, improved adaptive median filtering(IAMF) and non-local mean for the two different types of Qiang embroidery patterns to reduce image noise. Then, the Xception algorithm based on convolutional neural networks(CNNs) is used for edge detection and extraction to generate vector graphics of the patterns. Experimental results show that Qiang embroidery patterns, after denoising and edge extraction, can be clearly identified the shape characteristics of the patterns. Based on this approach, the images can be converted into vector graphics for the digital preservation and further artistic reinterpretation. The use of the Xception algorithm effectively solves the problem of extraction of Qiang embroidery in two-dimensional vectorial images. In addition, our proposed method provides a reliable practical reference for the preservation of other related ICH images.
Introduction
Intangible Cultural Heritage (referred to as “ICH” hereinafter) embodies the rich civilization of human society and constitutes an essential component of global cultural diversity. In the era of globalization, the preservation, inheritance, and development of ICH are facing unprecedented challenges, underscoring their immense significance and value. Advanced digital technologies offer new avenues for collecting, processing, storing, and particularly disseminating ICH data, effectively advancing the endeavors of ICH cultural industries and providing diverse means to safeguard and promote ICH culture.
The Qiang ethnic group, an ancient minority in China, primarily resides in the northwest of Sichuan Province. Through their long-standing production practices and daily activities, the Qiang people have created a culturally distinctive art form. Qiang embroidery, a representative cultural expression of the Qiang people, was officially recognized as a national ICH in 2008. The intricate patterns found in Qiang embroidery encapsulate the material and spiritual aspects of the Qiang people’s cultural life, embodying their aesthetic ideals and artistic ingenuity. To be specific, Qiang embroidery patterns derive inspiration from a diverse array of sources, including trees, flowers, fruits, grains, birds, animals, insects, and fish. These patterns encompass the material environment and spiritual beliefs of the Qiang people, commonly found in daily objects, with a predominant presence in clothing decorations. For instance, Qiang embroidery patterns can be categorized into three main groups: totemism, animals and plants motifs, and geometric designs, as illustrated in Fig 1.
Currently, the preservation of Qiang embroidery has encountered certain threats due to various factors, including social development, human activities, environmental changes, and natural disasters. For example, the devastating 2008 Wenchuan earthquake had a profound impact on Qiang ethnic culture, resulting in the destruction of major Qiang settlements and the unfortunate loss of over 80% of cultural inheritors and research experts at the Beichuan Qiang Research Institute. This tragedy also destroyed a substantial amount of materials and electronic data stored within the institute. Hence, this paper explores the state of digital preservation measures by focusing on the stylistic features and modern inheritance dilemma of Qiang embroidery patterns. It elucidates the value of vectorization in digitally preserving Qiang embroidery patterns and underscores the pressing need for novel vectorization techniques in digital image processing for Qiang embroidery. Furthermore, it investigates the feasibility of employing edge detection techniques in the vectorization process of Qiang embroidery patterns. By utilizing the Xception deep learning algorithm for edge detection, this study holds significant implications for the digital preservation and modern inheritance of Qiang embroidery, the support of ICH cultural industry development, and the promotion of relevant ICH cultural database construction [–]. In addition, we compared the Xception to the other common edge detection approaches and demonstrated that the Xception achieves the best results. The contributions of this paper includes: (1) The use of the Xception algorithm based on convolutional neural networks effectively solves the problem of extraction the shape of Qiang embroidery in two-dimensional vectorial images, providing a practical solution for processing fine-grained and complex-edge images. (2) It is clearly evident that effective pre-processing techniques play a crucial role in the removal of isolated noise points within blank areas and the enhancement of pixel consistency throughout the entire image. (3) The proposed method offers a reliable practical reference for the preservation of other related intangible cultural heritage images, promoting the application of AI in the field of ICH preservation.
The status Quo of Qiang embroidery patterns preservation
Since its inclusion in the national ICH list in 2008, Qiang embroidery has garnered attention from local governments and the wider public. In recent years, official efforts to support and promote the inheritance and development of Qiang embroidery have increased. These initiatives encompass the establishment of Qiang ethnic cultural ecological protection experimental zones, the creation of ICH experience centers, and the organization of training programs to disseminate skills related to Qiang embroidery and other ICH practices.
In the digital preservation of Qiang embroidery patterns, digital processing plays a crucial role in various stages, including the presentation of digitized resources such as texts, audio, and videos related to Qiang embroidery in the early stage, the classification and integration of digital resources in the storage phase, and the diversity of digital dissemination and display in the later stage. Within the entire digital processing stage, the process of vectorization holds significant importance. Typically, the original image resources of Qiang embroidery patterns are in bitmap format. However, bitmap images have limitations such as resolution constraints, susceptibility to distortion during scaling and editing, large file sizes, and the lack of support for transparency. In contrast, vectorized images obtained through vectorization processing offer several advantages. They possess recognizability, editability, and replicability. Vectorized images allow for rapid identification and searching of specific Qiang embroidery patterns, distortion-free editing and scaling, and occupy less file space. This makes them highly suitable for preservation, application, restoration, or modification purposes.
Vectorized Qiang embroidery patterns can be disassembled into pattern parts as needed, enabling rotation, arrangement, repetition, and combination to achieve various types of storage archiving. This provides resource support for the development and utilization of modern creative Qiang embroidery pattern designs. Furthermore, vectorization meets the requirements of digital dissemination in various forms, such as virtual reality and augmented reality interactive displays, and facilitates the sharing of digital resources related to ICH. It also contributes to the promotion and dissemination of multimedia and multi-platform Qiang embroidery patterns.
The SOTA of image edge detection
Image edges indicate areas in an image where pixel variations are the most pronounced. They contain valuable inherent information and play a crucial role in extracting image features for image recognition. Edge detection has been a significant research focus since its inception, as it forms a fundamental step in image pre-processing. It serves as a solid foundation for subsequent deep-level image processing and finds applications in various fields such as image segmentation, scene recognition and object detection.
With the advancement of AI algorithms in image processing, CNNs have emerged as a prominent research area, gradually replacing traditional algorithms and achieving remarkable results in edge extraction. However, limited research has been conducted on applying edge extraction techniques to Qiang embroidery. Traditional edge detection algorithms, such as Canny, Sobel, Roberts operator, and Log operator, mainly rely on low-level local cues (such as color and texture) for edge extraction. These methods face challenges in accurately representing complex scenes and are often affected by noise and texture clarity, resulting in intermittent and incomplete edge maps. Qiang embroidery patterns are renowned for their intricate details and complex patterns. Experimental findings have indicated that traditional edge extraction algorithms fail to meet the requirements for accurately extracting edges in embroidery patterns. Therefore, it is crucial to enhance traditional algorithms and conduct in-depth research by combining them with CNN methods. For example, Ray etc. A cited study introduced an advanced CNN to retain more edge pixels over conventional edge detection algorithms. Inspired by deep learning, in this paper, we aim to extract more high-level semantic information from embroidery images, thereby enhancing the clarity and completeness of the patterns. We would like to harness the power of image edge detection techniques on the Qiang embroidery patterns and explore an innovative idea to preserve such patterns, as well as give empirical practice for other ICH images.
Edge extraction neural network based on Xception
The model in this paper is trained end-to-end, eliminating the need for weight initialization from pre-processing detection models, which is typically required by most deep learning-based edge detectors. However, the deep learning model with a number of layers faces the problem of vanishing gradient. To address the issue of edge features being lost in deeper layers, an Xception-based architecture is adopted in this study. This architecture utilizes parallel connections to capture edge information across different layers. Considering the substantial amount of information contained in images, batch processing of images can significantly increase computational costs. Therefore, factors such as model performance, complexity, computational resources, and data size are taken into account when selecting a model for this paper. A model with fewer than 0.7 million parameters is chosen to strike a balance, ensuring ease of use and deployment in resource-constrained environments while maintaining effective edge extraction. The overall network architecture of the model can be visualized as an edge extraction network with an upsampling sub-network, as illustrated in Figs 2 and 3. The edge extraction structure takes an image as input, undergoes pre-processing, and then passes through different blocks for convolutional processing.
The edge extraction network comprises four output blocks (Block-1 to Block-4), drawing inspiration from the Xception network. Each block consists of sub-blocks containing convolutional layers, and parallel connections connect the blocks and sub-blocks. Each sub-block consists of a stack of two convolutional layers, followed by batch normalization and the ReLU activation function (except for the last convolutional layer in the final sub-block, which lacks this activation).
Due to the numerous convolutions performed, crucial edge features can be lost within each deep block, rendering a single main connection insufficient. To address this, starting from Block-3, the output of each sub-block is averaged using edge connections before being combined with the main connection, as depicted in Fig 2. Following the max pooling operation, the edge connections are configured to average the output of each sub-block. The feature maps generated at each block are then fed back into a separate upsampling network, producing intermediate edge maps. These intermediate edge maps are concatenated to form a stack of learned filters. Finally, at the end of the model, these features are fused into a single edge map.
Data pre-processing
Three datasets have been used for training the proposed model: MDBD, BIPED, and BRIND. We directly use the pre-trained model for our experiments due to the limited size of training data. We collected the Qiang embroidery patterns data from the Internet, the datasize is 33. Considering the limited availability of texture samples in the application scenario and the effectiveness of traditional denoising methods, such as mean filtering, median filtering, and Gaussian filtering, we have employed these methods in our study. However, spatial domain denoising techniques often involve a trade-off between noise removal and preserving image details. We have utilized IAMF and non-local mean filtering for denoising purposes on the two types of images respectively. After pre-processing of the image, the color original is converted into a denoised grayscale image for input to the model.
We adapt IAMF and select the sliding window sizes based on the spatial correlation principle of image processing. As the window size increases to its maximum value in the algorithm, IAMF effectively removes noise while preserving fine details in the image edges. For physical image, we chose non-local mean filtering to denoise, it calculates weights based on similarity measures and leverages redundant information in the image. This approach not only reduces noise but also preserves detailed image features to the maximum extent. In Fig 4, we provide two examples of pre-processed images by the use of different pre-processing approaches, which shows the effects of the employed denoising techniques. For both digital images and physical images, choosing a specific denoising approach would improve the quality of feature extraction.
In addition, it can be observed that the pre-processing edge map reduces noise in the low saturation regions, as shown in Fig 5 (a) and (b), enhancing the continuity and visibility of the texture edge map. It effectively reduces the loss of some isolated edges, as seen in Fig 5 (c) and (d), making the information of texture edges more abundant.
Edge extraction
In this study, we utilized the Xception deep learning model for edge extraction of Qiang embroidery patterns. As a comparative analysis, we conducted reference experiments using traditional edge detection operators, specifically Roberts, Sobel, Prewitt, and Canny, on both digital images and physical images, as depicted in Figs 6 and 7.
From the aforementioned figures, it can be observed that the Roberts operator exhibits sensitivity to noise, rendering it ineffective in eliminating local interference. Furthermore, it struggles to detect and identify weak edges characterized by subtle grayscale differences between the target and the background, resulting in fragmented extracted edges. Additionally, manual threshold setting is required for this operator, limiting its efficacy in extracting various object contours.
The Sobel operator performs well in processing images with grayscale gradients and high noise levels. However, it relies on directional templates for edge extraction, making it less suitable for accurately capturing contours in images with complex textures and diagonal edges. The Prewitt operator shares similar principles and effects with the Sobel operator, but it may yield incomplete edge detection outcomes. Conversely, the Canny operator exhibits reduced susceptibility to noise interference and demonstrates the ability to detect faint edges. Nevertheless, it is sensitive to gradient calculations and necessitates manual adjustment of the Gaussian filter’s variance, potentially leading to missed detections.
Deep learning methods
In the comparative experiments, we implemented the HED (Holistically-Nested Edge Detection) algorithm based on the VGG16 network. HED utilizes a multi-scale network architecture that combines feature maps of different resolutions, ranging from fine to coarse. This design allows the network to capture edge information at various scales, including both subtle edge details and broad structural edges, thereby enhancing the accuracy and robustness of edge detection. The purpose of this comparison is to validate the advantages of the Xception algorithm over other deep learning algorithms in extracting image edge information, particularly concerning edge accuracy and detail preservation.
Fig 8 presents a comparison of the edge detection results of the two algorithms on two representative images. The first digital image contains rich texture details and a complex background, while the second real-world image focuses on the object’s contours and fine structures. As illustrated, although the HED algorithm performs well in overall contour detection, it exhibits some breakages and discontinuities when processing fine edges and texture regions, leading to less-than-ideal edge continuity. In contrast, the algorithm based on the Xception architecture not only maintains edge continuity but also better captures the fine edges and texture details of the images. The edge lines are smoother and more precise, especially at the junctions between object edges and complex backgrounds, where its performance is particularly outstanding.
Analysis of results
Given the diverse range of Qiang embroidery patterns encountered in daily life, traditional edge detection methods may not be suitable for all types of images. To address this challenge, we adopted an edge detection approach based on the Xception deep learning algorithm. In this study, we conducted experiments on a sequence of images, including digital images (Group (a): images 1 and 2) and physical images (images 3 and 4). As depicted in Fig 9, after applying distinct pre-processing techniques to each image type, notable observations can be made. The fused edge images in Group (b) exhibit edge aliasing and a loss of details in less prominent areas. However, after merging the intermediate edge maps, the final edge images in Group (c) showcase enhanced edge connectivity, effectively minimizing edge fragmentation and misidentification. By converting the resulting edge images into SVG format using an online conversion tool, they can be infinitely scaled, satisfying the quality requirements for accurately depicting Qiang embroidery patterns. These findings carry substantial academic research significance and offer practical value in digitally preserving Qiang embroidery patterns, such as for Qiang cultural promotion posters, brochures, and other tourism-related materials.
Conclusions
The utilization of edge detection techniques for rapid vectorization of Qiang embroidery patterns not only increases their recognition and acceptance among the general public but also offers new insights for updating vectorization techniques and applying their outcomes to communication and innovative design in other domains of traditional culture and intangible heritage.


