A deep learning-based ancient seal seal script recognition method and system

By artificially synthesizing ancient seal images and employing automatic data augmentation strategies, and using deep neural networks for fine-tuning training, the problem of insufficient training samples in the recognition of seal script was solved, improving recognition accuracy and robustness, and supporting the digitization of ancient books.

CN115439863BActive Publication Date: 2026-06-26WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2022-08-09
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for recognizing ancient seal script rely on manually designed features, which are complex and inflexible. Deep learning algorithms suffer from low accuracy due to insufficient training samples and uneven distribution of character numbers.

Method used

By artificially synthesizing images of ancient seals, a single-character dataset was constructed. A pre-trained model and an automatic data augmentation strategy were used, and a deep neural network was used for fine-tuning training to obtain a model for recognizing seal script characters.

Benefits of technology

It improves the accuracy and robustness of ancient seal script recognition, realizes end-to-end automatic recognition of ancient seal script, and assists in the digitization process of ancient books.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115439863B_ABST
    Figure CN115439863B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on deep learning's ancient seal seal script recognition method and system, the recognition method in which obtains seal ancient Chinese character recognition dataset by network crawler, and carries out the pre-processing operation of frame removal, character segmentation, uses the automatic data enhancement method of joint loss optimization to optimize the distribution of ancient seal seal script data, using KL divergence loss replaces cross-entropy loss, and using pre-training model parameter as initial parameter in the recognition process, fine-tuning training is carried out on the data enhanced dataset on depth neural network, obtains the final seal ancient Chinese character recognition model.The application is based on depth neural network, utilizes automatic data enhancement strategy, improves the accuracy of ancient seal seal script recognition and model performance, to realize the recognition of seal ancient Chinese character provides more robust recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ancient Chinese character recognition technology, and in particular to a method and system for recognizing ancient seal script based on deep learning. Background Technology

[0002] Seals, serving as symbols of personal or official status in ancient times, record a wealth of historical information and are a treasure of traditional Chinese culture. As symbols of identity and status, ancient seals are widely found in ancient books, calligraphy, and paintings. Statistics show that there are 215 collector's seals on rubbings of the *Preface to the Poems Composed at the Orchid Pavilion* alone. The inscriptions on ancient seals are mostly ideographic Chinese characters. Identifying these characters can support literary appreciation and the digitization of ancient books, playing a vital role in the inheritance of traditional Chinese culture. However, manually deciphering ancient seal characters is complex, requires professional expertise, and involves a tedious transcription process. Therefore, the automatic identification of seal inscriptions is essential.

[0003] The ancient Chinese characters in ancient seals are primarily in the seal script style, with a large character set and complex structure. Furthermore, the differences in composition, seal script techniques, and engraving methods in seal carving art distinguish ancient seal script from traditional seal script. Due to historical reasons, authentic sample images are difficult to obtain, and existing samples generally suffer from image degradation and border decorations. These characteristics make the recognition of ancient seal script difficult. Existing methods utilize machine learning based on prior knowledge, such as template matching to identify seal characters. Traditional methods for recognizing ancient seal script rely on manually designed features, including only color, texture, and spatial information. This process is complex, inflexible, and ineffective, hindering the achievement of high accuracy on large character sets.

[0004] In the process of implementing this invention, the inventors of this application discovered that the methods of the prior art have at least the following technical problems:

[0005] Deep learning extracts deep image features by building deep neural networks and assigning different weights to neurons, resulting in stronger robustness and classification capabilities. However, the implementation of deep learning relies on a large amount of well-labeled and effective data, and also requires a better classifier to distinguish sample regions and fully extract features. The existing samples of ancient seal script are very limited, and the insufficient number of effective training samples and the uneven distribution of character counts will reduce the performance of deep learning algorithms. Summary of the Invention

[0006] This invention provides a method and system for recognizing ancient seal script based on deep learning, which solves or at least partially solves the technical problem of low recognition accuracy in the prior art.

[0007] To address the aforementioned technical problems, the first aspect of this invention provides a method for recognizing ancient seal script based on deep learning, comprising:

[0008] S1: Obtain the ancient seal script recognition dataset;

[0009] S2: Artificially synthesized ancient seal images. Based on the real ancient seal images and artificially synthesized ancient seal images contained in the acquired ancient seal script recognition dataset, a manually generated single-character dataset is constructed.

[0010] S3: Perform border removal and character segmentation on the ancient seal script recognition dataset to obtain the segmented single-character dataset;

[0011] S4: Use the manually generated single-character dataset as the source domain, and pre-train the manually generated single-character dataset using a preset deep neural network to obtain the pre-trained model parameters;

[0012] S5: Select the optimal automatic data augmentation strategy for the segmented single-character dataset and obtain the data-augmented dataset;

[0013] S6: Using the pre-trained model parameters as initial parameter values, fine-tune and train the data-enhanced dataset on a preset deep neural network to obtain an ancient seal script recognition model.

[0014] S7: Used for recognizing ancient seal script using an ancient seal script recognition model.

[0015] In one embodiment, the artificial synthesis of the ancient seal image in step S2 includes:

[0016] Ancient Chinese seal script recognition datasets are used to select ancient Chinese character seal script font files and synthesize ancient Chinese character images of the required characters.

[0017] The ancient Chinese character image is randomly cropped at the edges to simulate changes in character position, and the color is randomly inverted to simulate different seal engraving styles.

[0018] By controlling the parameter values, salt and pepper noise, dilation, and erosion are randomly added to the ancient Chinese character images after color inversion processing to simulate different degrees of image degradation and handwriting changes.

[0019] By randomly adding borders or similar patterns in the four directions of the stamp, the interference of the background on the characters can be simulated.

[0020] In one implementation, step S3 involves character segmentation of the ancient seal script recognition dataset, including:

[0021] The OTSU algorithm was used to binarize the seal images in the ancient seal script recognition dataset, and the opening operation was used for noise reduction.

[0022] Based on the projection characteristics of the image pixels after denoising, the border width is determined by the probability density distribution of the image edge pixels, and the seal border is removed.

[0023] Based on the vertical pixel projection features, horizontal pixel projection features, and the number of characters, the segmentation point between two adjacent characters in the image after border removal is located. Single character segmentation is performed by first segmenting the column and then the row.

[0024] In one implementation, the preset deep neural network in step S4 is a ResNet-50 network.

[0025] In one implementation, the optimal data augmentation strategy in step S5 is obtained as follows:

[0026] In the iterative training of the pre-defined deep neural network, the distribution of the unbiased validation set and the biased dataset are matched, and the distribution parameters of the data augmentation are automatically estimated by using KL divergence instead of cross-entropy loss. The unbiased validation set is real ancient seal images, and the biased dataset is artificially synthesized ancient seal images.

[0027] The optimal data augmentation strategy is automatically estimated and selected based on the distribution parameters. The data augmentation strategy includes the data augmentation operation type, operation probability, and operation magnitude.

[0028] In one implementation, during the fine-tuning training process in step S6, an initial learning rate and a termination learning rate are set, an exponential decay method is used, the RMSProp algorithm is used as the optimization function in the fine-tuning process, and soft labels and loss weights are propagated by comparing with the true labels to calculate the weighted KL divergence loss.

[0029] Based on the same inventive concept, a second aspect of this invention provides a deep learning-based system for recognizing ancient seal script characters, comprising:

[0030] The dataset acquisition module is used to acquire ancient seal script recognition datasets;

[0031] The single-character dataset generation module is used to artificially synthesize ancient seal images. Based on the real ancient seal images and artificially synthesized ancient seal images contained in the acquired ancient seal script recognition dataset, it constructs a manually generated single-character dataset.

[0032] The image preprocessing module is used to remove borders and segment characters from the ancient seal script recognition dataset to obtain segmented single-character datasets.

[0033] The pre-training module is used to take a manually generated single-character dataset as the source domain, and use a preset deep neural network to pre-train the manually generated single-character dataset to obtain the pre-trained model parameters.

[0034] The data augmentation module is used to select the optimal automatic data augmentation strategy for the segmented single-character dataset and obtain the data-augmented dataset.

[0035] The fine-tuning module is used to fine-tune the data-enhanced dataset on a preset deep neural network, using the pre-trained model parameters as initial parameter values, to obtain an ancient seal script recognition model.

[0036] The recognition module is used to recognize ancient seal script characters using an ancient seal script character recognition model.

[0037] In one embodiment, the system further includes a result feedback module for outputting recognition results, including segmented single-character images, character label prediction results that meet preset conditions, confidence scores, and ancient seals in the database that are identical to the seal script recognition results.

[0038] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described in the first aspect.

[0039] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.

[0040] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:

[0041] (1) The ancient seal script recognition method provided by the present invention applies deep learning to the recognition of ancient seal script, utilizes automatic data augmentation based on joint optimization, and optimizes the distribution of training data using the optimal data augmentation strategy, which helps to improve the accuracy of text recognition and enhance the robustness of the recognizer.

[0042] (2) This invention solves the problem of difficulty in obtaining ancient seal script data and annotations by artificially synthesizing single-character sample images, and fine-tunes the entire network to obtain the final classification model, thereby overcoming the problem of insufficient network learning caused by insufficient training samples corresponding to some characters, and improving the overall recognition accuracy.

[0043] (3) The ancient seal script recognition system designed in this invention can realize end-to-end ancient seal script recognition. The ancient seal image acquisition module inputs the seal sample to be recognized. In addition, the result feedback module can simultaneously acquire the simplified Chinese character recognition result of the ancient seal script, the recognition confidence level, and the image of the ancient seal with the same character. This system can assist in reading ancient seal script, help researchers improve the reading efficiency of ancient books, and promote the digitization process of related ancient books. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a flowchart illustrating the method for recognizing ancient seal script based on deep learning in an embodiment of the present invention.

[0046] Figure 2 This is a framework diagram of the ancient seal script recognition system based on deep learning in an embodiment of the present invention. Detailed Implementation

[0047] This invention provides a method and system for recognizing ancient seal script characters based on deep learning. The method acquires a dataset of ancient Chinese characters for seal recognition through web crawling, performs preprocessing operations such as border removal and character segmentation, constructs manually generated single-character datasets using both synthetic and real images, optimizes the distribution of the ancient seal script character data using an automatic data augmentation method with joint loss optimization, replaces cross-entropy loss with KL divergence loss, and uses pre-trained model parameters as initial parameters during the recognition process. The augmented dataset is then fine-tuned and trained on a deep neural network to obtain the final ancient seal script character recognition model. This invention, based on deep neural networks and utilizing automatic data augmentation strategies, improves the accuracy and model performance of ancient seal script character recognition, providing more robust recognition results for ancient Chinese characters on seals.

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] Example 1

[0050] This invention provides a method for recognizing ancient seal script based on deep learning, including:

[0051] S1: Obtain the ancient seal script recognition dataset;

[0052] S2: Artificially synthesized ancient seal images. Based on the real ancient seal images and artificially synthesized ancient seal images contained in the acquired ancient seal script recognition dataset, a manually generated single-character dataset is constructed.

[0053] S3: Perform border removal and character segmentation on the ancient seal script recognition dataset to obtain the segmented single-character dataset;

[0054] S4: Use the manually generated single-character dataset as the source domain, and pre-train the manually generated single-character dataset using a preset deep neural network to obtain the pre-trained model parameters;

[0055] S5: Select the optimal automatic data augmentation strategy for the segmented single-character dataset and obtain the data-augmented dataset;

[0056] S6: Using the pre-trained model parameters as initial parameter values, fine-tune and train the data-enhanced dataset on a preset deep neural network to obtain an ancient seal script recognition model.

[0057] S7: Use an ancient seal script recognition model to recognize ancient seal script.

[0058] Please see Figure 1 This is a flowchart illustrating the ancient seal script recognition method based on deep learning in this embodiment of the invention. The synthesized dataset is the manually generated single-character dataset in S2, and the original data is the ancient seal script recognition dataset in S1. The pre-trained network is a preset deep neural network, and the enhancement module is an automatic data augmentation strategy.

[0059] In the specific implementation process, the ancient seal script recognition dataset in step S1 is sourced from historically transmitted or modernly copied images of ancient seal rubbings, obtained through web crawling and photography. It includes five seal script styles: Greater Seal Script, Lesser Seal Script, Miao Seal Script, Nine-Fold Seal Script, and Flower-and-Bird Seal Script. Due to insufficient training data, the network's feature learning may be inadequate. Artificially synthesized samples can possess structural features similar to real seal samples. Therefore, ancient seal images are artificially synthesized, and a manually generated single-character dataset is constructed based on hand-designed rules as pre-training samples to obtain more effective features.

[0060] In one embodiment, the artificial synthesis of the ancient seal image in step S2 includes:

[0061] Ancient Chinese seal script recognition datasets are used to select ancient Chinese character seal script font files and synthesize ancient Chinese character images of the required characters.

[0062] The ancient Chinese character image is randomly cropped at the edges to simulate changes in character position, and the color is randomly inverted to simulate different seal engraving styles.

[0063] By controlling the parameter values, salt and pepper noise, dilation, and erosion are randomly added to the ancient Chinese character images after color inversion processing to simulate different degrees of image degradation and handwriting changes.

[0064] By randomly adding borders or similar patterns in the four directions of the stamp, the interference of the background on the characters can be simulated.

[0065] In one implementation, step S3 involves character segmentation of the ancient seal script recognition dataset, including:

[0066] The OTSU algorithm was used to binarize the seal images in the ancient seal script recognition dataset, and the opening operation was used for noise reduction.

[0067] Based on the projection characteristics of the image pixels after denoising, the border width is determined by the probability density distribution of the image edge pixels, and the seal border is removed.

[0068] Based on the vertical pixel projection features, horizontal pixel projection features, and the number of characters, the segmentation point between two adjacent characters in the image after border removal is located. Single character segmentation is performed by first segmenting the column and then the row.

[0069] In one implementation, the preset deep neural network in step S4 is a ResNet-50 network.

[0070] In one implementation, the optimal data augmentation strategy in step S5 is obtained as follows:

[0071] In the iterative training of the pre-defined deep neural network, the distribution of the unbiased validation set and the biased dataset are matched, and the distribution parameters of the data augmentation are automatically estimated by using KL divergence instead of cross-entropy loss. The unbiased validation set is real ancient seal images, and the biased dataset is artificially synthesized ancient seal images.

[0072] The optimal data augmentation strategy is automatically estimated and selected based on the distribution parameters. The data augmentation strategy includes the data augmentation operation type, operation probability, and operation magnitude.

[0073] Specifically, since the features of artificially synthesized datasets differ from those of real datasets, they are biased. Data augmentation can be used to make them closer to real images.

[0074] KL divergence can be used to calculate the difference between features in an unbiased validation set and a biased dataset. Augmentation methods include random edge cropping, color inversion, noise, Gaussian blur, dilation, and erosion. Depending on the selection of these methods and the frequency and magnitude of their operation, there are many augmentation strategies. The strategy with the smallest distribution parameter is the optimal augmentation strategy.

[0075] In this embodiment, automatic data augmentation is employed. The process involves: augmenting the dataset (adjusting the augmentation method, frequency, and magnitude); then extracting features and calculating the KL divergence using a model (a pre-set deep neural network); repeating this process to obtain the optimal automatic data augmentation strategy. Training iteration refers to the repetition of this process until the optimal strategy is achieved.

[0076] In one implementation, during the fine-tuning training process in step S6, an initial learning rate and a termination learning rate are set, an exponential decay method is used, the RMSProp algorithm is used as the optimization function in the fine-tuning process, and soft labels and loss weights are propagated by comparing with the true labels to calculate the weighted KL divergence loss.

[0077] In a specific embodiment, the ancient seal script recognition dataset was obtained through web crawling and photography, with the main data source being the Chinese Historical Figures' Seal Database, etc. Specifically, in step S1, 27,520 valid seal samples with corresponding truth labels were acquired, encompassing 2,602 categories of Chinese characters. Using 26 ancient seal script font files, 106,631 artificially synthesized single-character samples were constructed, with a size controlled at 80×80 pixels, all used for pre-training.

[0078] In step S2, 96,845 single-character samples were segmented, with 87,003 in the training set and 9,842 in the test set, and corresponding character labels were added to the images. For border removal, the width of image edge pixels with a probability greater than 50% was defined as the width to be removed. The segmentation method used was a projection-based and statistical approach, with text portions marked as black and background portions as white. Each column and row of the image was traversed, and the segmentation position was determined by combining the number of characters and the projection gap of the white portion. Simultaneously, character labels were assigned to the segmented single-character images.

[0079] Step S3 uses a ResNet-50 network to extract features from the source domain. The ResNet-50 network extracts deep features while avoiding overfitting by constructing residual units. The pre-training conditions are as follows: the initial learning rate is set to 0.01, the termination learning rate is set to 0.0001, the decay factor is 0.94, and the exponential decay step is set to 4 × 10⁻⁶. 5 Set the batch size to 64 and the number of iterations to 100,000. Save the model parameter matrix as initial parameters.

[0080] Step S4 automatic data augmentation operation types include random edge cropping, color inversion, noise, Gaussian blur, dilation and erosion, with an operation probability range of 0.1 to 1 and an operation amplitude controlled between 0.1 and 0.65.

[0081] Step S5 uses Softmax as the classifier and KL divergence as the loss function, and backpropagates to update the gradient.

[0082] Example 2

[0083] Based on the same inventive concept, this embodiment provides a deep learning-based system for recognizing ancient seal script characters, including:

[0084] The dataset acquisition module 201 is used to acquire the ancient seal script recognition dataset.

[0085] The single-character dataset generation module 202 is used to artificially synthesize ancient seal images. Based on the real ancient seal images and artificially synthesized ancient seal images contained in the acquired ancient seal script recognition dataset, a manually generated single-character dataset is constructed.

[0086] Image preprocessing module 203 is used to remove borders and segment characters in the ancient seal script recognition dataset to obtain segmented single-character datasets;

[0087] Pre-training module 204 is used to take the manually generated single-character dataset as the source domain, and pre-train the manually generated single-character dataset using a preset deep neural network to obtain the pre-trained model parameters.

[0088] The data augmentation module 205 is used to select the optimal automatic data augmentation strategy for the segmented single-character dataset and obtain the data-augmented dataset.

[0089] The fine-tuning module 206 is used to use the pre-trained model parameters as initial parameter values ​​to fine-tune and train the data-enhanced dataset on a preset deep neural network to obtain an ancient seal script recognition model.

[0090] The recognition module 207 is used to recognize ancient seal script using an ancient seal script recognition model.

[0091] Please see Figure 2 This is a framework diagram of the ancient seal script recognition system based on deep learning in an embodiment of the present invention.

[0092] In one embodiment, the system further includes a result feedback module for outputting recognition results, including segmented single-character images, character label prediction results that meet preset conditions, confidence scores, and ancient seals in the database that are identical to the seal script recognition results.

[0093] The preset conditions can be set according to the actual situation, such as the character tag prediction results ranked 10th, 8th, or 5th.

[0094] Specifically, the ancient seal image acquisition module is used to acquire the image of the ancient seal to be identified and the number of seal characters; the image preprocessing module is used to segment the seal image to be identified into single-character images and normalize the image size; the ancient seal seal classification and prediction module is used to extract convertible features from the preprocessed single-character images through a convolutional network, and then pass them through an average pooling layer and a fully connected layer in sequence, and finally input them into the classification layer to obtain label predictions using an exponential normalization function; the result feedback module is used to output the recognition results, including the segmented single-character images, the predicted labels of the top five characters, the confidence scores, and the ancient seal images that match the recognition results.

[0095] In the specific implementation process, the recognition module includes an ancient seal image acquisition module, an image preprocessing module, and an ancient seal script classification and prediction module. The ancient seal image acquisition module acquires the user-uploaded image of the ancient seal to be recognized and the number of characters; the image is read in RGB format. The image preprocessing module removes the border based on the image's border projection features, adaptively segments the seal into single-character samples using the number of characters uploaded by the user and vertical and horizontal projection features, and performs smoothing, denoising, and normalization processing on the segmentation results. The ancient seal script classification and prediction module loads the trained model, sequentially inputs the preprocessed image into the model for feature extraction, then obtains a one-dimensional feature vector through average pooling and fully connected layers, and finally inputs it into the softmax function to calculate the classification prediction probability.

[0096] The results feedback module first sorts the predicted probabilities (i.e., confidence scores) of the above category labels, then extracts the Simplified Chinese characters corresponding to the top five ranked labels based on the correspondence between the labels and Simplified Chinese, and finally returns the corresponding Simplified Chinese characters and predicted confidence scores to the user.

[0097] Given that the same seal text on an ancient seal may have different engraving or arrangement methods, the actual labels in the ancient seal dataset are compared with the recognition results. If there is an ancient seal image in the database with the same text as the recognition result, the ancient seal with the unified size is returned to the user for reference.

[0098] In this embodiment, the execution entity of the ancient seal script recognition system is the user terminal, including but not limited to mobile phones, PCs, tablets, and other devices.

[0099] Since the system described in Embodiment 2 of this invention is the same system used to implement the deep learning-based ancient seal script recognition method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0100] Example 3

[0101] Based on the same inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described in Embodiment 1.

[0102] Since the computer-readable storage medium described in Embodiment 3 of this invention is the same computer-readable storage medium used in implementing the deep learning-based ancient seal script recognition method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer-readable storage medium based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable storage media used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0103] Example 4

[0104] Based on the same inventive concept, this application also provides a computer device, including storage, a processor, and a computer program stored in the storage and executable on the processor, wherein the processor executes the program to implement the method in Embodiment 1.

[0105] Since the computer device described in Embodiment 4 of this invention is the same computer device used to implement the deep learning-based ancient seal script recognition method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0106] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0108] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0109] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations to the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A method for recognizing ancient seal script based on deep learning, characterized in that, include: S1: Obtain the ancient seal script recognition dataset; S2: Artificially synthesized ancient seal images. Based on the real ancient seal images and artificially synthesized ancient seal images contained in the acquired ancient seal script recognition dataset, a manually generated single-character dataset is constructed. S3: Perform border removal and character segmentation on the ancient seal script recognition dataset to obtain the segmented single-character dataset; S4: Use the manually generated single-character dataset as the source domain, and pre-train the manually generated single-character dataset using a preset deep neural network to obtain the pre-trained model parameters; S5: Select the optimal automatic data augmentation strategy for the segmented single-character dataset and obtain the data-augmented dataset; S6: Using the pre-trained model parameters as initial parameter values, fine-tune and train the data-enhanced dataset on a preset deep neural network to obtain an ancient seal script recognition model. S7: Used for recognizing ancient seal script using an ancient seal script recognition model; Step S3 involves character segmentation of the ancient seal script recognition dataset, including: The OTSU algorithm was used to binarize the seal images in the ancient seal script recognition dataset, and the opening operation was used for noise reduction. Based on the projection characteristics of the image pixels after denoising, the border width is determined by the probability density distribution of the image edge pixels, and the seal border is removed. Based on the vertical pixel projection features, horizontal pixel projection features, and the number of characters, the segmentation point between two adjacent characters in the image after border removal is located. Single character segmentation is performed by first segmenting the columns and then the rows. The optimal data augmentation strategy in step S5 is obtained as follows: In the iterative training of the pre-defined deep neural network, the distribution of the unbiased validation set and the biased dataset are matched, and the distribution parameters of the data augmentation are automatically estimated by using KL divergence instead of cross-entropy loss. The unbiased validation set is real ancient seal images, and the biased dataset is artificially synthesized ancient seal images. The optimal data augmentation strategy is automatically estimated and selected based on the distribution parameters. The data augmentation strategy includes the data augmentation operation type, operation probability, and operation magnitude.

2. The method for recognizing ancient seal script based on deep learning as described in claim 1, characterized in that, Step S2 involves artificially synthesizing an ancient seal image, including: Ancient Chinese seal script recognition datasets are used to select ancient Chinese character seal script font files and synthesize ancient Chinese character images of the required characters. The ancient Chinese character image is randomly cropped at the edges to simulate changes in character position, and the color is randomly inverted to simulate different seal engraving styles. By controlling the parameter values, salt and pepper noise, dilation, and erosion are randomly added to the ancient Chinese character images after color inversion processing to simulate different degrees of image degradation and handwriting changes. The background interference on the characters is simulated by randomly adding border patterns in the four directions of the seal: top, bottom, left, and right.

3. The method for recognizing ancient seal script based on deep learning as described in claim 1, characterized in that, The preset deep neural network in step S4 is the ResNet-50 network.

4. The method for recognizing ancient seal script based on deep learning as described in claim 1, characterized in that, In the fine-tuning training process of step S6, the initial learning rate and the termination learning rate are set, the decay method is exponential decay, the RMSProp algorithm is used as the optimization function in the fine-tuning process, and the soft label and loss weight are propagated by comparing with the true label to calculate the weighted KL divergence loss.

5. A deep learning-based system for recognizing ancient seal script characters, characterized in that, The method for recognizing ancient seal script based on deep learning as described in claim 1 includes: The dataset acquisition module is used to acquire ancient seal script recognition datasets; The single-character dataset generation module is used to artificially synthesize ancient seal images. Based on the real ancient seal images and artificially synthesized ancient seal images contained in the acquired ancient seal script recognition dataset, it constructs a manually generated single-character dataset. The image preprocessing module is used to remove borders and segment characters from the ancient seal script recognition dataset to obtain segmented single-character datasets. The pre-training module is used to take a manually generated single-character dataset as the source domain, and use a preset deep neural network to pre-train the manually generated single-character dataset to obtain the pre-trained model parameters. The data augmentation module is used to select the optimal automatic data augmentation strategy for the segmented single-character dataset and obtain the data-augmented dataset. The fine-tuning module is used to fine-tune the data-enhanced dataset on a preset deep neural network, using the pre-trained model parameters as initial parameter values, to obtain an ancient seal script recognition model. The recognition module is used to recognize ancient seal script characters using an ancient seal script character recognition model.

6. The ancient seal script recognition system based on deep learning as described in claim 5, characterized in that, The system also includes a result feedback module for outputting recognition results, including segmented single-character images, character label prediction results that meet preset conditions, confidence scores, and ancient seals in the database that are identical to the seal script recognition results.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed, it implements the method as described in any one of claims 1 to 4.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 4.