Stroke extraction method based on multi-level deep feature fusion
By combining ResNet, BiLSTM, and GCN in a multi-level deep feature fusion method, the problem of inaccurate Chinese character stroke extraction in existing technologies is solved, achieving more efficient extraction and classification of Chinese character stroke information.
Patent Information
- Application Number
- CN202310829791.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Existing methods for extracting Chinese character strokes rely on manually designed feature extractors, which have insufficient feature extraction capabilities and cannot fully capture the temporal and spatial information of Chinese character strokes, resulting in low extraction accuracy.
A multi-level deep feature fusion method is adopted, which combines convolutional neural networks (ResNet), recurrent neural networks (BiLSTM), and graph convolutional networks (GCN) to extract information on Chinese character strokes from different levels, including global, visual, temporal, and spatial features, and classifies them through fully connected layers and softmax function.
It improves the accuracy and robustness of Chinese character stroke extraction, better represents the characteristics of Chinese character strokes, enhances classification and segmentation performance, and adapts to multimodal data processing of complex Chinese character strokes.
Smart Images

Figure CN116994255B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of Chinese character processing methods, and relates to a stroke extraction method based on multi-level deep feature fusion. Background Technology
[0002] As a treasure of China, Chinese characters have played a vital role in inheriting and promoting Chinese culture. The complex structure of Chinese characters, encompassing various stroke combinations and connections, significantly increases the difficulty of stroke extraction, especially when dealing with characters with multi-layered structures such as radicals, components, and composite structures. Furthermore, the diverse variations and writing styles of Chinese characters further complicate the task, requiring robustness and adaptability. Stroke extraction technology plays a crucial role in researching Chinese character structure, Chinese character education, calligraphy style analysis, and cultural heritage preservation. Strokes contain key information about the writing process, such as stroke direction, turns, and thickness. This information encompasses both dynamic and static characteristics of Chinese character writing, serving as an important basis for font design and aesthetic evaluation. Fine-tuning and optimizing strokes can also improve the readability and aesthetics of fonts. For calligraphy education, understanding and mastering the characteristics and sequence of strokes is essential for correctly writing Chinese characters. Accurately extracting and displaying stroke information can help students correctly write and recognize Chinese characters, improving the effectiveness and efficiency of Chinese character learning. In the fields of computer vision and artificial intelligence, accurately extracting and utilizing stroke information is of great significance for tasks such as image recognition, natural language processing, and intelligent interaction. By analyzing and understanding the features and sequence of strokes, computer systems can better understand and process Chinese character images and text.
[0003] Current methods for extracting Chinese character strokes rely too heavily on manually designed feature extractors, which have limited feature extraction capabilities and produce features that are neither robust nor comprehensive enough. Furthermore, traditional feature extractors often fail to capture the temporal and spatial information within Chinese character strokes, ignoring the correlations between multimodal data. This results in unsatisfactory stroke extraction performance for complex Chinese characters, failing to achieve satisfactory results in both accuracy and efficiency. Summary of the Invention
[0004] The purpose of this invention is to provide a stroke extraction method based on multi-level deep feature fusion, which solves the problem of low extraction accuracy in the prior art.
[0005] The technical solution adopted in this invention is a stroke extraction method based on multi-level deep feature fusion, which includes the following steps:
[0006] Step 1: Obtain Chinese character images, construct Chinese character stroke segmentation dataset, annotate the strokes on the Chinese character images, and use the stroke mask, stroke length, and the rectangle of the stroke mask as label information;
[0007] Step 2: Build a stroke segmentation model. The stroke segmentation model includes a Chinese character image preprocessing module, a global feature extraction network, a main visual feature extraction network, a temporal feature extraction network, and a spatial feature extraction network.
[0008] Step 3: Train and test the stroke segmentation model;
[0009] Step 4: Input the image of the Chinese character to be tested into the stroke segmentation model obtained in Step 3 to obtain the stroke segmentation extraction result.
[0010] The invention is further characterized by:
[0011] Stroke types include five categories: horizontal, vertical, left-falling, right-falling, and turning.
[0012] Step 2 specifically includes the following steps:
[0013] Step 2.1: The Chinese character image preprocessing module performs standardized processing on the Chinese character images;
[0014] Step 2.2: The global feature extraction network extracts the bounding box and stroke length of the stroke mask as global features for each stroke;
[0015] Step 2.3: The main visual feature extraction network extracts feature vectors, and concatenates the global features of each stroke with the feature vectors to obtain a combined feature vector;
[0016] Step 2.4: Use a temporal feature extraction network to extract features from the combined feature vector to obtain the temporal features of the stroke sequence;
[0017] Step 2.5: Use a spatial feature extraction network to extract the spatial features of strokes, obtain the stroke spatial features, concatenate the stroke spatial features with the temporal features of the stroke sequence to obtain the fused features, and input the fused features into a fully connected layer and a softmax function to obtain the stroke classification.
[0018] Step 2.2 specifically involves the global feature extraction network using the stroke length as the first element of the global feature vector and the four vertices of the rectangle of the stroke mask as the last four elements of the global feature vector, forming a five-dimensional vector.
[0019] Step 2.4 specifically involves using a bidirectional long short-term memory network to extract features from the combined feature vector. The calculation process is as follows:
[0020] First, the forward feature vector and the backward feature vector are extracted using the forward long short-term memory model and the backward long short-term memory model, respectively:
[0021] The forward and backward feature vectors are then combined to obtain the temporal features.
[0022] The process of extracting stroke spatial features in step 2.5 is as follows: Construct a graph structure based on the stroke sequence of Chinese characters, with each stroke corresponding to a node. The connection between nodes is constructed by building undirected edges based on the relationship between strokes. If there is an intersection between the rectangles of strokes, connect the undirected edges between the corresponding vertices in the graph to obtain the edge matrix, which is the spatial feature.
[0023] Step 2.5 specifically includes the following steps:
[0024] Step 2.5.1: Establish the edge matrix and identity matrix;
[0025] Step 2.5.2: Initialize the edge matrix to obtain the adjacency matrix, and initialize the temporal features;
[0026] Step 2.5.3: Aggregate the features of neighboring nodes in the adjacency matrix to obtain the feature vector of the previous layer;
[0027] Step 2.5.4: Perform a nonlinear transformation on the feature vectors of the previous layer to obtain the updated feature vectors;
[0028] Step 2.5.5: Propagate the updated feature vector to the neighboring nodes of each node;
[0029] Step 2.5.6: Repeat steps 2.5.3-2.5.5 until four GCN layers are reached, and output the spatial features;
[0030] Step 2.5.7: Concatenate the spatial features and temporal features to obtain the fused features. Input the fused features into the fully connected layer and the softmax function to obtain the probability distribution of each stroke category. Select the stroke label with the highest probability to achieve stroke classification.
[0031] In step 2.5.7, the processing procedure for the fully connected layer is as follows: FC(R) i ) = W·R i +b, where FC represents a fully connected operation, W is the weight matrix, and b is the bias vector.
[0032] The formula for calculating the softmax function in step 2.5.7 is as follows:
[0033]
[0034] Where, x i Let x represent the i-th element of the input vector x, and C represent the number of categories.
[0035] The beneficial effects of this invention are as follows: This invention is based on a multi-level deep feature fusion-based stroke extraction method. Compared to traditional methods, this method combines convolutional neural networks (ResNet), recurrent neural networks (BiLSTM), and graph convolutional networks (GCN) to extract features from different levels. This allows for a more comprehensive capture of information about Chinese character strokes, such as temporal and spatial information, improving the accuracy and robustness of extraction. It also performs multi-modal data processing: the ResNet+BiLSTM+GCN method can simultaneously process both image and sequence data contained in Chinese character strokes. By effectively integrating and fusing image and sequence features, it can better express the characteristics of Chinese character strokes, improving classification and segmentation performance. Furthermore, the ResNet+BiLSTM+GCN method combines three different network structures, each with unique capabilities and expressive power. This combination provides greater model capacity and expressive power, enabling the model to better adapt to complex Chinese character stroke features. Attached Figure Description
[0036] Figure 1 This is a flowchart of the stroke extraction method based on multi-level deep feature fusion of the present invention;
[0037] Figure 2 This is a structural diagram of the main visual feature extraction network in the stroke extraction method based on multi-level deep feature fusion of the present invention;
[0038] Figure 3 This is a diagram of the unit structure of the LSTM network in the stroke extraction method based on multi-level deep feature fusion of this invention.
[0039] Figure 4 This is a structural diagram of BiLSTM in the stroke extraction method based on multi-level deep feature fusion in this invention;
[0040] Figure 5 This is a schematic diagram of the stroke extraction result based on the multi-level deep feature fusion method of the present invention. Detailed Implementation
[0041] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0042] Example 1
[0043] Stroke extraction methods based on multi-level deep feature fusion, such as Figure 1 As shown, the feature is that it includes the following steps:
[0044] Step 1: Obtain Chinese character images, construct Chinese character stroke segmentation dataset, annotate the strokes on the Chinese character images, and use the stroke mask, stroke length, and the rectangle of the stroke mask as label information;
[0045] Step 2: Build a stroke segmentation model. The stroke segmentation model includes a Chinese character image preprocessing module, a global feature extraction network, a main visual feature extraction network, a temporal feature extraction network, and a spatial feature extraction network.
[0046] Step 3: Train and test the stroke segmentation model;
[0047] Step 4: Input the image of the Chinese character to be tested into the stroke segmentation model obtained in Step 3 to obtain the stroke segmentation extraction result.
[0048] Example 2
[0049] The stroke extraction method based on multi-level deep feature fusion includes the following steps:
[0050] Step 1: Obtain Chinese character images, construct a Chinese character stroke segmentation dataset, and annotate the strokes on the Chinese character images. The stroke types include five categories: horizontal, vertical, left-falling, right-falling, and turning. At the same time, store the label information of each stroke mask, stroke length, and the rectangle of the stroke mask in a JSON file. Divide the annotated stroke segmentation dataset into a training set and a test set in a 7:3 ratio.
[0051] Step 2: Build a stroke segmentation model. The stroke segmentation model includes a Chinese character image preprocessing module, a global feature extraction network, a main visual feature extraction network, a temporal feature extraction network, and a spatial feature extraction network.
[0052] Step 2 specifically includes the following steps:
[0053] Step 2.1: Perform unified and standardized processing through the Chinese character image preprocessing module, and crop it to a size of 256×256×3;
[0054] Step 2.2: The global feature extraction network extracts the global features of each stroke;
[0055] Specifically, the global feature extraction network uses the bounding box of the stroke mask and the stroke length as global features for each stroke. More specifically, it uses the stroke length as the first element of the global feature vector and the four corner coordinates of the four vertices of the stroke mask as the last four elements, forming a five-dimensional vector.
[0056] Step 2.3: The main visual feature extraction network extracts feature vectors, and concatenates the global features of each stroke with the feature vectors to obtain a combined feature vector;
[0057] like Figure 2As shown, the structure of the main visual feature extraction network includes a first convolutional layer, a max pooling layer, four residual blocks, a global average pooling layer, and a fully connected layer arranged in sequence. Each residual block includes several residual units, and each residual unit includes two second convolutional layers, using Batch Normalization and ReLU activation functions.
[0058] Step 2.4: Use a temporal feature extraction network to extract features from the combined feature vector to obtain the temporal features of the stroke sequence;
[0059] like Figure 3 As shown, the learning process of a single-layer LSTM network can be described as follows:
[0060] (1) Input gate i t : Responsible for processing the input at the current sequence position and controlling the information flow to the memory cells, which can be expressed mathematically as:
[0061] i t =σ(W iu ·u t +W ih h t-1 +W ic c t-1 +b i )
[0062] Among them, W iu W ih W ic These represent the weights from the network input, the previous time step input, and the memory cell to the input gate, respectively; b i σ is the offset of the input gate; σ(·) is the logarithmic sigmoid activation function, and all instances of it below refer to the same function.
[0063] (2) Forget Gate f t The process controls the internal circulation of memory cells, determining which information is selected and discarded within them. Mathematically, this can be expressed as:
[0064] f t =σ(W fu ·u t +W fh h t-1 +W fc c t +b f )
[0065] Among them, W fu W fh W fc These represent the weights of the network input, the previous time step output, and the weights from the memory cell to the forget gate, respectively; b f It is the offset of the forget gate.
[0066] (3) LSTM state update: The results of the forget gate and the input gate will affect the cell state c. i This updates the cell state, as shown in the following mathematical expression:
[0067] c t =f t *c t-1 +i t *tanh(W cu u t +W ch h t-1 +b c )
[0068] (4) Output gate: Controls the information flow from the memory cell network to other structural units and outputs the network's results. The mathematical expression is:
[0069] o t =σ(W ou ·u t +W oh h t-1 +W oc c t +b o )
[0070] h t =o t *tanh(c t )
[0071] Among them, W ou W oh and W oc These represent the weights of the network input, the output at the previous time step, and the weights from the memory cell to the output gate, respectively; b o It is the offset of the output gate.
[0072] The workflow of a single-layer LSTM involves state transmission sequentially from front to back. Therefore, the structure of each step allows the network to understand that the predicted output at the next moment is influenced by the inputs of multiple previous moments. However, in some problems, the network's output state depends not only on previous states but also on subsequent states. Therefore, this invention employs a bidirectional long short-term memory (BiLSTM) network to extract features from the combined feature vectors, such as... Figure 4 As shown, the BiLSTM model network includes a forward long short-term memory model and a backward long short-term memory model. The output of the BiLSTM model network is a combination of the forward long short-term memory model and the backward long short-term memory model. The specific calculation process is as follows:
[0073] The formula for calculating the feedforward network layer is:
[0074] The formula for calculating the feedback network layer is:
[0075] In the above formula, u t Let be the combined feature vector of a single stroke at time t. This represents the output vector of the hidden unit in the previous time step of the feedforward LSTM network. c represents the output vector of the backward LSTM hidden unit. t-1 b represents the cell state at the previous moment. t-1 This represents the bias vector, and Hid represents the hidden layer operation of the short-time network model;
[0076] The forward and backward eigenvectors are combined using the following formula:
[0077]
[0078]
[0079] in This represents a single stroke feature vector obtained from the BiLSTM feedforward network layer. This represents a single stroke feature vector obtained from the BiLSTM feedforward network layer, where m represents the number of strokes in each Chinese character, and L... f L represents the set of forward feature vectors of all strokes of a single Chinese character. b The set of backward feature vectors representing all strokes of a single Chinese character;
[0080] The forward and backward feature vectors are then combined to obtain the temporal feature h of each stroke. k This leads to the output of the BiLSTM module, which is the temporal feature of each Chinese character: H t =[h1,h2,...,h k ]; where t represents the sequence number of the Chinese character image,
[0081] Step 2.5: Use a spatial feature extraction network (GCN) to extract the spatial features of the strokes, and then concatenate the spatial features of the strokes with the temporal features of the stroke sequence to obtain the fused features. Input the fused features into a fully connected layer and a softmax function to obtain the stroke classification.
[0082] The process of extracting stroke spatial features is as follows: a graph structure is constructed based on the stroke sequence of Chinese characters, with each stroke corresponding to a node. The connection between nodes is constructed by constructing undirected edges based on the relationship between strokes. If the rectangles between strokes intersect, the undirected edges between corresponding vertices in the graph are connected to obtain the edge matrix, i.e., the spatial features.
[0083] Specifically, step 2.5.1: Establish the edge matrix E (adjacency matrix) and the identity matrix I;
[0084] Create an N×N zero matrix, where N represents the number of strokes, and each stroke corresponds to a node. Iterate through the relationships between any two strokes; if two strokes are connected (rectangles intersect), set the corresponding element in the adjacency matrix to 1, indicating a connection. Create an N×N identity matrix I, defined as having all diagonal elements set to 1 and all other elements set to 0. The identity matrix represents the connection between each node and itself; since each diagonal element is 1, it means each node is connected to itself.
[0085] Step 2.5.2: Initialize the edge matrix to obtain the adjacency matrix. I is a matrix defined as having all elements on the diagonal equal to 1, and all other elements equal to 0; initialize the eigenvector h. k , as the input feature vector of the graph convolutional layer:
[0086] Step 2.5.3: Aggregate the features of neighboring nodes to obtain the aggregation result: Z l This represents the aggregation result of the l-th layer. To construct the matrix obtained in the graph structure, P (l-1) This represents the feature vector of the (l-1)th layer;
[0087] Step 2.5.4: Perform a nonlinear transformation on the aggregation result to obtain the updated feature vector H. (l) =ReLU(Z) (l) W (l) ), where H (l) It is the eigenvector after nonlinear transformation. W (l) This represents the learnable weight matrix of the l-th layer;
[0088] Step 2.5.5: Propagate the updated feature vector to the neighboring nodes of each node: Where H (l+1) H represents the feature vector of layer l+1. (l) This represents the feature vector of layer l. To construct the matrix obtained in the graph structure.
[0089] Step 2.5.6: Repeat steps 2.5.3-2.5.5 until four GCN layers are reached, and output the spatial features.
[0090] Step 2.5.7: Concatenate the spatial features and temporal features to obtain the fused feature R.i R i =concat(P,h k Where P represents the spatial features extracted by GCN; the fused features R i The input is fed into a fully connected layer and a softmax function to obtain the probability distribution of each stroke category. The stroke label with the highest probability is selected to achieve stroke classification.
[0091] The processing procedure of the fully connected layer is as follows: FC(R) i ) = W·R i +b, where FC represents a fully connected operation, W is the weight matrix, and b is the bias vector.
[0092] The formula for calculating the softmax function is as follows:
[0093]
[0094] Where, x i Let x represent the i-th element of the input vector x, and C represent the number of categories.
[0095] Step 3: Train and test the stroke segmentation model to obtain the Chinese character stroke extraction model;
[0096] Specifically, the training set is fed into the stroke segmentation model for training. The network parameters are updated using the training set and optimized using the validation set. The optimized model is then tested using the test set to obtain the Chinese character stroke extraction model. The Chinese character image to be tested is input into the trained network model to obtain the stroke segmentation extraction result.
[0097] During training, the cross-entropy loss function is used as the training loss function:
[0098]
[0099] In the above formula, Yi is the actual stroke label. Let w represent the probability predicted by the stroke segmentation model. To address the long-tail distribution problem for each category, we assign a weight w to each category c. c The formula is the ratio of the median class frequency to the class frequency of c. Therefore, classes with lower frequencies have higher weights.
[0100] The network model was optimized using the minimum batch gradient descent algorithm, with training parameters of 50 epochs, 64 batch sizes, and 0.0001, resulting in a Chinese character stroke extraction model.
[0101] Example 3
[0102] In this embodiment, step 2.1 uses the Chinese character image preprocessing module to uniformly crop the text images to a size of 256×256×3;
[0103] The structure of the main visual feature extraction network in step 2.3 includes a first convolutional layer, a max pooling layer, four residual blocks, a global average pooling layer, and a fully connected layer arranged in sequence. Each residual block includes several residual units, and each residual unit includes two second convolutional layers, using Batch Normalization and ReLU activation functions.
[0104] The first convolutional layer has a 7×7 kernel size, 64 kernels, and a stride of 2, outputting a 112×112×64 feature map. The max-pooling layer has one kernel size, a 2×2 kernel size, and a stride of 2, outputting a 56×56×64 feature map. The two second convolutional layers each have one kernel size, 3×3. The stride of the second convolutional layer in the first residual unit of each residual block is 2, and the stride of the second convolutional layers in the remaining residual units is 1. Each residual block outputs feature maps of 56×56×256, 28×28×512, 14×14×1024, and 7×7×2048, corresponding to the outputs of the 1st, 2nd, 3rd, and 4th residual blocks, respectively. These outputs are fed into a global average pooling layer, which sums and averages the values of each channel of each feature map to obtain a 2048-dimensional vector.
[0105] The processing procedure for a fully connected layer is as follows:
[0106] Assuming the original 2048-dimensional vector is x, it can be represented as:
[0107] Use a weight matrix and a bias vector The linear mapping is calculated using the formula: z = Wx + b, where z represents the result of the linear mapping.
[0108] Applying a nonlinear activation function to z yields a 256-dimensional vector.
[0109] For example, the ReLU activation function performs the following calculation: y = ReLU(z), where y represents the final 256-dimensional vector. Through the above steps, the original 2048-dimensional vector is mapped and reduced to a 256-dimensional vector;
[0110] The splicing formula is: f i =concat(f i len ,f i box ,f icnn ), where f i f represents the feature vector of a single stroke. i len The feature vector f represents the length of a single stroke. i box f represents the feature vector of the rectangular bounding box of a single stroke mask. i cnn Indicate the main visual features of a single stroke;
[0111] The feature vectors of individual strokes are combined to form the feature vector of each Chinese character: F = [f1, f2, ..., f m ], where f represents the feature vector of a single stroke and m represents the number of strokes.
[0112] The extraction result after processing in this embodiment is as follows: Figure 5 As shown.
[0113] Through the above methods, this invention presents a stroke extraction method based on multi-level deep feature fusion. Compared with traditional methods, this method combines convolutional neural networks (ResNet), recurrent neural networks (BiLSTM), and graph convolutional networks (GCN) to extract features from different levels. This allows for a more comprehensive capture of information about Chinese character strokes, such as temporal and spatial information, improving the accuracy and robustness of extraction. Furthermore, it performs multimodal data processing: the ResNet+BiLSTM+GCN method can simultaneously process both image and sequence data contained in Chinese character strokes. By effectively integrating and fusing image and sequence features, it can better express the characteristics of Chinese character strokes, improving classification and segmentation performance. The ResNet+BiLSTM+GCN method combines three different network structures, each with unique capabilities and expressive power. This combination provides greater model capacity and expressive power, enabling the model to better adapt to complex Chinese character stroke features.
Claims
1. A stroke extraction method based on multi-level deep feature fusion, characterized in that, Includes the following steps: Step 1: Obtain Chinese character images, construct Chinese character stroke segmentation dataset, annotate the strokes on the Chinese character images, and use the stroke mask, stroke length, and the rectangular box of the stroke mask as label information; The stroke types include five categories: horizontal, vertical, left-falling, right-falling, and turning. Step 2: Construct a stroke segmentation model, which includes a Chinese character image preprocessing module, a global feature extraction network, a main visual feature extraction network, a temporal feature extraction network, and a spatial feature extraction network; specifically, it includes the following steps: Step 2.1: The Chinese character image preprocessing module performs unified and standardized processing on the Chinese character image; Step 2.2: The global feature extraction network extracts the bounding box of the stroke mask and the stroke length as the global features of each stroke. Specifically, the global feature extraction network takes the stroke length as the first element of the global feature vector and the four corner coordinates of the four vertices of the bounding box of the stroke mask as the last four elements of the global feature vector to form a five-dimensional vector. Step 2.3: The main visual feature extraction network extracts feature vectors, and concatenates the global features of each stroke with the feature vectors to obtain a combined feature vector; Step 2.4: Use a temporal feature extraction network to extract features from the combined feature vector to obtain the temporal features of the stroke sequence; Step 2.5: Use a spatial feature extraction network to extract the spatial features of strokes, obtain the spatial features of strokes, concatenate the spatial features of strokes with the temporal features of the stroke sequence to obtain the fused features, and input the fused features into a fully connected layer and a softmax function to obtain the stroke classification. The process of extracting stroke spatial features is as follows: a graph structure is constructed based on the stroke sequence of Chinese characters, with each stroke corresponding to a node. The connection between nodes is constructed by constructing undirected edges based on the relationship between strokes. If the rectangles between strokes intersect, the undirected edges between the corresponding vertices in the graph are connected to obtain the edge matrix, i.e., the spatial features. Step 2.5.1: Establish the edge matrix and the identity matrix; Step 2.5.2: Initialize the edge matrix to obtain the adjacency matrix, and initialize the temporal features; Step 2.5.3: Aggregate the features of neighbor nodes in the adjacency matrix to obtain the feature vector of the previous layer; Step 2.5.4: Perform a nonlinear transformation on the feature vectors of the previous layer to obtain the updated feature vectors; Step 2.5.5: Propagate the updated feature vector to the neighboring nodes of each node; Step 2.5.6: Repeat steps 2.5.3-2.5.5 until four GCN layers are reached, and output the spatial features; Step 2.5.7: Concatenate the spatial features and temporal features to obtain fused features. Input the fused features into a fully connected layer and a softmax function to obtain the probability distribution of each stroke category. Select the stroke label with the highest probability to achieve stroke classification. In step 2.5.7, the processing procedure for the fully connected layer is as follows: Where FC represents a fully connected operation, W is the weight matrix, and b is the bias vector; Step 3: Train and test the stroke segmentation model; Step 4: Input the image of the Chinese character to be tested into the stroke segmentation model obtained in Step 3 to obtain the stroke segmentation extraction result.
2. The stroke extraction method based on multi-level deep feature fusion according to claim 1, characterized in that, Step 2.4 specifically involves using a bidirectional long short-term memory network to extract features from the combined feature vector. The calculation process is as follows: First, the forward feature vector and the backward feature vector are extracted using the forward long short-term memory model and the backward long short-term memory model, respectively: The forward and backward feature vectors are then combined to obtain the temporal features.
3. The stroke extraction method based on multi-level deep feature fusion according to claim 1, characterized in that, The formula for calculating the softmax function in step 2.5.7 is as follows: in, Let x represent the i-th element of the input vector x, and C represent the number of categories.
Citation Information
Patent Citations
Font feature extraction method and device
CN110070053A
MaskRCNN-based Chinese character stroke segmentation and extraction method and system
CN113011431A
Cited By
Calligraphy stroke feature extraction method and system based on grids with fixed size
CN121999501A