CN115439863A - Deep learning-based ancient seal character recognition method and system - Google Patents
Deep learning-based ancient seal character recognition method and system Download PDFInfo
- Publication number
- CN115439863A CN115439863A CN202210958287.3A CN202210958287A CN115439863A CN 115439863 A CN115439863 A CN 115439863A CN 202210958287 A CN202210958287 A CN 202210958287A CN 115439863 A CN115439863 A CN 115439863A
- Authority
- CN
- China
- Prior art keywords
- seal
- ancient
- character
- data set
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/191—Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
- G06V30/19173—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/12—Detection or correction of errors, e.g. by rescanning the pattern
- G06V30/133—Evaluation of quality of the acquired characters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/15—Cutting or merging image elements, e.g. region growing, watershed or clustering-based techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/16—Image preprocessing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Character Discrimination (AREA)
Abstract
The invention discloses an ancient seal character recognition method and system based on deep learning, wherein the recognition method obtains a seal ancient Chinese character recognition data set through a web crawler, pre-processing operations of frame removal and character segmentation are carried out, the distribution of the ancient seal character data is optimized by adopting an automatic data enhancement method of combined loss optimization, KL divergence loss is used for replacing cross entropy loss, pre-training model parameters are used as initial parameters in the recognition process, and the data set after data enhancement is subjected to fine tuning training on a deep neural network to obtain a final seal ancient Chinese character recognition model. The method is based on the deep neural network, utilizes the automatic data enhancement strategy, improves the accuracy and the model performance of the seal character recognition of the ancient seal, and provides a recognition result with higher robustness for realizing the recognition of the seal ancient Chinese characters.
Description
Technical Field
The invention relates to the technical field of ancient Chinese character recognition, in particular to an ancient seal character recognition method and system based on deep learning.
Background
The seal exists in ancient times as a symbol of personal or official identity, records a large amount of historical data, and is a treasure of Chinese traditional culture. As a symbol of identity and status, ancient seals are widely present in ancient books, calligraphy and pictorial works. According to statistics, the book identification and preservation mark on the book rubbing of Lanting Ji Shu has 215 prescriptions. The seal cutting content on the ancient seal is mostly ideographic Chinese characters, and the characters in the seal can be identified to provide support for works such as literature appreciation, ancient book digitalization and the like, so that the seal cutting method has important significance for the inheritance of Chinese traditional culture. However, the manual interpretation of the ancient characters of the seal has certain complexity, needs the participation of professionals, and has a complicated transcription process, so that the automatic identification work of the seal in the ancient seal is very necessary.
The type of the ancient Chinese character font in the ancient seal is mainly the seal character body, and the character set is large and has a complex structure; in addition, the difference of seal cutting art seal cutting, seal cutting and knife cutting makes the ancient seal cutting different from the traditional seal cutting, because of historical reasons, the real sample image is difficult to obtain, and the existing sample generally has image degradation and frame ornamentation. The characteristics make the identification of the seal characters of the ancient seals difficult to realize, and the existing method is realized by machine learning based on prior knowledge, for example, the seal characters in the ancient seals are identified by adopting a template matching method. The traditional method for identifying the seal characters of the ancient seals relies on manual design characteristics, only comprises characteristics such as colors, textures, spatial information and the like, is complex in process, is not flexible and effective enough, and is not beneficial to obtaining higher accuracy on a large character set.
The inventor of the present application finds that the method in the prior art at least has the following technical problems in the process of implementing the present invention:
deep learning is realized by establishing a deep neural network and giving different weights to neurons to extract deep features of an image, so that the method has stronger robustness and classification capability, but the realization of the deep learning depends on a large amount of effective data with good labels, and a better classifier is required to distinguish sample areas to fully extract the features. The existing seal script samples of the old seals are very limited, the collected effective training samples are insufficient, the number distribution of characters is unbalanced, and the performance of a deep learning algorithm can be reduced.
Disclosure of Invention
The invention provides an ancient seal script identification method and system based on deep learning, which are used for solving or at least partially solving the technical problem of low identification accuracy in the prior art.
In order to solve the technical problem, a first aspect of the present invention provides a deep learning-based ancient seal character recognition method, including:
s1: acquiring an ancient seal character identification data set;
s2: artificially synthesizing an ancient seal image, and constructing a manually generated single character data set according to a real ancient seal image and an artificially synthesized ancient seal image which are contained in the obtained ancient seal character identification data set;
s3: removing frames and segmenting characters of the ancient seal character identification data set to obtain a segmented single character data set;
s4: taking a manually generated single-character data set as a source domain, and adopting a preset deep neural network to pre-train the manually generated single-character data set to obtain pre-training model parameters;
s5: selecting an optimal automatic data enhancement strategy for the segmented single-character data set to obtain a data set after data enhancement;
s6: taking the pre-training model parameters as initial parameter values, and carrying out fine tuning training on the data set subjected to data enhancement on a preset deep neural network to obtain an ancient seal character recognition model;
s7: the method is used for identifying the ancient seal characters by utilizing the ancient seal character identification model.
In one embodiment, the step S2 of artificially synthesizing the ancient stamp image includes:
screening an ancient Chinese character seal character font file from the obtained ancient seal character identification data set so as to synthesize an ancient Chinese character image of the required character;
randomly adding edge cutting simulation character position change to the ancient Chinese character image, and simultaneously randomly carrying out color reversal processing to simulate different seal cutting forms;
the method comprises the steps of randomly adding salt and pepper noise and expansion and corrosion treatment to an ancient Chinese character image subjected to color reversal treatment by controlling the size of parameters so as to simulate image degradation and handwriting change of different degrees;
the interference of the background on the characters is simulated by adding frames and other similar patterns in the upper, lower, left and right directions of the seal randomly.
In one embodiment, the step S3 of character-segmenting the ancient seal script identification data set includes:
carrying out binaryzation on the seal image in the ancient seal character identification data set by using an OTSU algorithm, and carrying out denoising treatment by using an opening operation;
determining the frame width by utilizing the probability density distribution of image edge pixels according to the projection characteristics of the image pixels after denoising treatment, and removing the frame part of the seal;
and according to the vertical pixel projection characteristics, the horizontal pixel projection characteristics and the number of characters, positioning a segmentation point between two adjacent characters of the image after the frame is removed, and performing single-character segmentation by adopting a mode of segmenting rows and columns.
In one embodiment, the predetermined deep neural network in step S4 is a ResNet-50 network.
In an embodiment, the optimal data enhancement policy in step S5 is obtained in the following manner:
in iterative training of a preset deep neural network, matching the distribution of an unbiased verification set and a biased data set, and automatically estimating data enhanced distribution parameters by using KL divergence instead of cross entropy loss, wherein the unbiased verification set is a real ancient seal image, and the biased data set is an artificially synthesized ancient seal image;
and automatically estimating and selecting an optimal data enhancement strategy according to the distribution parameters, wherein the data enhancement strategy comprises a data enhancement operation type, an operation probability and an operation amplitude.
In one embodiment, in the fine tuning training process of step S6, an initial learning rate and a final learning rate are set, the attenuation mode uses exponential attenuation, the RMSProp algorithm is used as an optimization function in the fine tuning process, and simultaneously, the soft label and the loss weight are propagated to calculate the weighted KL divergence loss by comparing with the real label.
Based on the same inventive concept, the second aspect of the invention provides an ancient seal character recognition system based on deep learning, which comprises:
the data set acquisition module is used for acquiring an ancient seal character identification data set;
the single character data set generating module is used for artificially synthesizing ancient seal images and constructing a manually generated single character data set according to the real ancient seal images and the artificially synthesized ancient seal images contained in the obtained ancient seal character identification data set;
the image preprocessing module is used for carrying out frame removal and character segmentation on the ancient seal character recognition data set to obtain a segmented single-character data set;
the pre-training module is used for pre-training the manually generated single character data set by using a preset deep neural network by taking the manually generated single character data set as a source domain to obtain pre-training model parameters;
the data enhancement module is used for selecting an optimal automatic data enhancement strategy for the segmented single-character data set and acquiring the data set after data enhancement;
the fine tuning module is used for carrying out fine tuning training on the data set after the data enhancement on a preset deep neural network by taking the pre-training model parameters as initial parameter values to obtain an ancient seal character recognition model;
and the identification module is used for identifying the ancient seal characters by utilizing the ancient seal character identification model.
In one embodiment, the system further comprises a result feedback module for outputting the recognition result, including the segmented single-character image, the character tag prediction result ranked to meet the preset condition, the confidence level, and the old seal in the database, which is the same as the seal character recognition result.
Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed, performs the method of the first aspect.
Based on the same inventive concept, a fourth aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of the first aspect when executing the program.
Compared with the prior art, the invention has the advantages and beneficial technical effects as follows:
(1) The ancient seal character recognition method provided by the invention applies deep learning to ancient seal character recognition, optimizes the distribution of training data by utilizing automatic data enhancement based on joint optimization and optimal data enhancement strategy, and is beneficial to improving the accuracy of text recognition and improving the robustness of a recognizer.
(2) According to the method, the problem that seal character data and labels of the ancient seals are difficult to obtain is solved by artificially synthesizing single-character sample images, and the final classification model is obtained by finely adjusting the whole network, so that the problem of insufficient network learning caused by the fact that training samples corresponding to partial characters are insufficient is solved, and the overall identification accuracy is improved.
(3) The ancient seal character recognition system can realize end-to-end ancient seal character recognition, and seal samples to be recognized are input through the ancient seal image acquisition module. In addition, the result feedback module can acquire the simplified Chinese character recognition result, the recognition confidence coefficient and the same character ancient seal image of the ancient seal character simultaneously, and the system can assist in reading the ancient seal character, helps a researcher to improve the reading efficiency of ancient books, and promotes the digital process of related ancient books.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of an ancient seal script identification method based on deep learning in an embodiment of the present invention;
fig. 2 is a frame diagram of an ancient seal character recognition system based on deep learning in the embodiment of the present invention.
Detailed Description
The invention provides an ancient seal character recognition method and system based on deep learning, wherein the method comprises the steps of obtaining a seal ancient Chinese character recognition data set through a web crawler, carrying out pre-processing operations of frame removal and character segmentation, constructing a manually generated single character data set through a manually synthesized image and a real image, optimizing distribution of ancient seal character data through an automatic data enhancement method of joint loss optimization, replacing cross entropy loss with KL divergence loss, using pre-training model parameters as initial parameters in a recognition process, and carrying out fine tuning training on the data-enhanced data set on a deep neural network to obtain a final seal ancient Chinese character recognition model. The method is based on the deep neural network, utilizes the automatic data enhancement strategy, improves the accuracy and the model performance of the seal character recognition of the ancient seal, and provides a recognition result with higher robustness for realizing the recognition of the seal ancient Chinese characters.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The embodiment of the invention provides an ancient seal character recognition method based on deep learning, which comprises the following steps:
s1: acquiring an ancient seal character identification data set;
s2: artificially synthesizing an ancient seal image, and constructing a manually generated single character data set according to a real ancient seal image and an artificially synthesized ancient seal image which are contained in the obtained ancient seal character identification data set;
s3: removing frames and segmenting characters of the ancient seal character identification data set to obtain a segmented single character data set;
s4: taking a manually generated single-character data set as a source domain, and adopting a preset deep neural network to pre-train the manually generated single-character data set to obtain pre-training model parameters;
s5: selecting an optimal automatic data enhancement strategy for the segmented single-character data set to obtain a data set after data enhancement;
s6: taking the pre-training model parameters as initial parameter values, and performing fine tuning training on the data set after data enhancement on a preset deep neural network to obtain an ancient seal character recognition model;
s7: and identifying the seal characters of the ancient seals by using the seal character identification model of the ancient seals.
Please refer to fig. 1, which is a schematic flow diagram of an ancient seal character recognition method based on deep learning in an embodiment of the present invention. The synthetic data set is a single character data set generated manually in S2, and the original data is an ancient seal character identification data set in S1. The pre-training network is a preset deep neural network, and the enhancing module is an automatic data enhancing strategy.
In a specific implementation process, the source of the ancient seal character identification data set in the step S1 is an ancient seal rubbing image of historical flow or modern copying, and the ancient seal rubbing image is obtained through a web crawler and a shooting mode and comprises five seal characters of big seal character, small seal character, muiran seal character, jiuyangzhuan seal character and flower-bird seal character. Due to the fact that the insufficient amount of part of training data can cause insufficient learning of network characteristics, the artificially synthesized sample can have structural characteristics similar to those of a real seal sample. Therefore, the ancient seal image is artificially synthesized, and a manually generated single character data set is constructed based on a manual design rule method to be used as a pre-training sample to obtain more effective characteristics.
In one embodiment, the step S2 of artificially synthesizing the ancient seal image includes:
screening an ancient Chinese character seal character font file from the obtained ancient seal character identification data set so as to synthesize an ancient Chinese character image of the required character;
randomly adding edge cutting simulation character position change to the ancient Chinese character image, and simultaneously randomly carrying out color reversal processing to simulate different seal cutting forms;
the method comprises the steps of randomly adding salt-pepper noise and expansion and corrosion treatment to an ancient Chinese character image subjected to color reversal treatment by controlling the size of parameters so as to simulate image degradation and handwriting change of different degrees;
the interference of the background on the characters is simulated by adding frames and other similar patterns in the upper, lower, left and right directions of the seal randomly.
In one embodiment, the step S3 of character-segmenting the ancient seal script identification data set includes:
carrying out binarization on the seal image in the ancient seal character identification data set by using an OTSU algorithm, and carrying out denoising treatment by using an opening operation;
determining the frame width by utilizing the probability density distribution of image edge pixels according to the projection characteristics of the image pixels after denoising treatment, and removing the frame part of the seal;
and according to the vertical pixel projection characteristics, the horizontal pixel projection characteristics and the number of characters, positioning a segmentation point between two adjacent characters of the image after the frame is removed, and performing single-character segmentation by adopting a mode of segmenting rows and columns.
In one embodiment, the predetermined deep neural network in step S4 is a ResNet-50 network.
In an embodiment, the optimal data enhancement policy in step S5 is obtained in the following manner:
in iterative training of a preset deep neural network, matching the distribution of an unbiased verification set and a biased data set, and automatically estimating data enhanced distribution parameters by using KL divergence to replace cross entropy loss, wherein the unbiased verification set is a real ancient seal image, and the biased data set is an artificially synthesized ancient seal image;
and automatically estimating and selecting an optimal data enhancement strategy according to the distribution parameters, wherein the data enhancement strategy comprises a data enhancement operation type, an operation probability and an operation amplitude.
Specifically, since the artificially synthesized data set features are different from the real data set features, it is biased that the data enhancement is performed to make it close to the real image.
The KL divergence can calculate the difference between the characteristics of an unbiased verification set and a biased data set, and the enhancement modes comprise random edge clipping, color inversion, noise, gaussian blur, expansion and corrosion, and a plurality of enhancement strategies exist according to the selection of the modes and the difference of operation frequency and amplitude, and the strategy with the minimum distribution parameter is the optimal enhancement strategy.
In this embodiment, automatic data enhancement is used, and the process is as follows: and (3) performing data enhancement (adjusting selection of an enhancement mode and operating frequency and amplitude) on the data set, then performing feature extraction and calculating KL divergence through a model (a preset deep neural network), and repeating the processes to obtain an optimal automatic data enhancement strategy. Training iteration means that the process is repeated until the optimal condition is obtained.
In one embodiment, in the fine tuning training process of step S6, an initial learning rate and a final learning rate are set, the attenuation mode uses exponential attenuation, the RMSProp algorithm is used as an optimization function in the fine tuning process, and simultaneously, the soft label and the loss weight are propagated to calculate the weighted KL divergence loss by comparing with the real label.
In the specific embodiment, the ancient seal character identification data set is obtained through web crawler and shooting, and the main data source is a Chinese historical figure seal database and the like. In the specific step, 27520 effective seal samples with corresponding truth labels are obtained in S1, and the effective seal samples comprise 2602 Chinese characters. And constructing 106631 artificially synthesized single character samples by using 26 ancient seal script font files, controlling the size to be 80 x 80 pixels, and completely using the samples for pre-training.
In step S2, 96845 single-character samples are segmented, wherein 87003 training sets and 9842 testing sets are obtained, and the character labels of the corresponding images are added. The frame is removed to set the line width probability of the image edge pixel above 50% as the width to be removed, the segmentation method is realized by adopting a method based on projection and statistics, and the character part is marked as black, and the background part is marked as white. And traversing each column and each line of the image, determining a segmentation position by combining the number of characters and the projection interval of the white part, and simultaneously allocating character labels to the segmented single-character image.
S3, extracting source domain features by adopting a ResNet-50 network, wherein the ResNet-50 network realizes extraction of depth features and avoids an overfitting phenomenon at the same time by constructing a residual error unit, and the pre-training conditions are as follows: the initial learning rate was set to 0.01, the final learning rate was set to 0.0001, the exponential decay step number was set to 4 × 10 with 0.94 as the decay factor 5 The batch size was set to 64 and the number of iterations was 10 ten thousand. The model parameter matrix is saved as initial parameters.
S4, the operation types of automatic data enhancement in the step are random edge cutting, color inversion, noise, gaussian blur, expansion and corrosion, and the operation probability range is as follows: 0.1 to 1, and the operation amplitude is controlled between 0.1 to 0.65.
And step S5, adopting Softmax as a classifier and KL divergence as a loss function, and carrying out gradient updating by back propagation.
Example two
Based on the same inventive concept, the embodiment provides an ancient seal character recognition system based on deep learning, which comprises:
a data set obtaining module 201, configured to obtain an ancient seal script identification data set;
a single character data set generating module 202, configured to artificially synthesize an ancient seal image, and construct a manually generated single character data set according to the obtained ancient seal image and the artificially synthesized ancient seal image included in the ancient seal character recognition data set;
the image preprocessing module 203 is used for performing frame removal and character segmentation on the ancient seal character recognition data set to obtain a segmented single character data set;
the pre-training module 204 is configured to pre-train the manually generated single-character data set by using a preset deep neural network with the manually generated single-character data set as a source domain, and obtain pre-training model parameters;
the data enhancement module 205 is configured to select an optimal automatic data enhancement strategy for the segmented single-character data set, and obtain a data set after data enhancement;
the fine tuning module 206 is configured to perform fine tuning training on the data set after the data enhancement on a preset deep neural network by using a pre-training model parameter as an initial parameter value to obtain an ancient seal character recognition model;
and the identification module 207 is used for identifying the ancient seal characters by utilizing the ancient seal character identification model.
Fig. 2 is a frame diagram of an ancient seal script recognition system based on deep learning in the embodiment of the present invention.
In one embodiment, the system further comprises a result feedback module for outputting the recognition result, including the segmented single-character image, the character tag prediction result ranked to meet the preset condition, the confidence level, and the old seal in the database, which is the same as the seal character recognition result.
The preset condition may be set according to actual conditions, and may be, for example, character tag prediction results ranked at 10 bits, 8 bits, and 5 bits.
Specifically, the ancient seal image acquisition module is used for acquiring the ancient seal image to be identified and the number of seal characters; the image preprocessing module is used for segmenting the ancient seal character image to be identified into single character images and normalizing the single character images to uniform the image size; the ancient seal character classification prediction module is used for extracting the preprocessed single-character image into convertible characteristics through a convolution network, sequentially passing through an average pooling layer and a full-link layer, and finally inputting the convertible characteristics into a classification layer to obtain label prediction by using an exponential normalization function; and the result feedback module is used for outputting the recognition result, including the segmented single character image, the character label prediction result ranked in the top five positions, the confidence coefficient and the ancient seal image which is the same as the recognition result.
In a specific implementation process, the identification module comprises an ancient seal image acquisition module, an image preprocessing module and an ancient seal character classification prediction module. The ancient seal image acquisition module is used for acquiring the number of the ancient seal images to be identified and characters uploaded by a user, and reading the images into an RGB format; the image preprocessing module removes frames according to the frame projection characteristics of the image, adaptively divides the seal into single character samples by utilizing the number of characters uploaded by a user and the vertical and horizontal projection characteristics, and performs smoothing, denoising and normalization processing on the division result. And the ancient seal character classification 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 a full connection layer, and finally inputs a softmax function to calculate the classification prediction probability.
The result feedback module firstly sorts the prediction probability (namely confidence) of the classification labels, then extracts simplified Chinese corresponding to the labels sorted in the first five according to the corresponding relation between the labels and the simplified Chinese, and finally returns the simplified Chinese corresponding to the simplified Chinese and the prediction confidence to the user.
And if the ancient seal image with the seal and the identification result consistent exists in the database, returning the ancient seals with unified size to the user as reference.
The execution main body of the ancient seal character recognition system in the embodiment is a user terminal, and the user terminal comprises a mobile phone, a PC (personal computer) terminal, a tablet and other devices.
Since the system introduced in the second embodiment of the present invention is a system adopted for implementing the ancient seal character recognition method for deep learning in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the system, and thus the details are not repeated herein. All systems adopted by the method in the first embodiment of the invention belong to the protection scope of the invention.
EXAMPLE III
Based on the same inventive concept, the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed performs the method as described in the first embodiment.
Since the computer-readable storage medium introduced in the third embodiment of the present invention is a computer-readable storage medium used for implementing the ancient seal character recognition method for deep learning in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, persons skilled in the art can understand the specific structure and deformation of the computer-readable storage medium, and therefore, no further description is given here. Any computer readable storage medium used in the method of the first embodiment of the present invention falls within the intended scope of the present invention.
Example four
Based on the same inventive concept, the present application further provides a computer device, which includes a storage, a processor, and a computer program stored in the storage and executable on the processor, and when the processor executes the computer program, the method in the first embodiment is implemented.
Since the computer device introduced in the fourth embodiment of the present invention is a computer device used for implementing the ancient seal character recognition method for deep learning in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, persons skilled in the art can understand the specific structure and deformation of the computer device, and thus, no further description is given here. All the computer devices used in the method of the first embodiment of the present invention are within the scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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, and the like) having computer-usable program code embodied therein.
The present 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 flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass these modifications and variations.
Claims (10)
1. A deep learning-based ancient seal character recognition method is characterized by comprising the following steps:
s1: acquiring an ancient seal character identification data set;
s2: artificially synthesizing an ancient seal image, and constructing a manually generated single character data set according to a real ancient seal image and the artificially synthesized ancient seal image which are contained in the obtained ancient seal character identification data set;
s3: performing frame removal and character segmentation on the ancient seal character recognition data set to obtain a segmented single character data set;
s4: taking the manually generated single-character data set as a source domain, and adopting a preset deep neural network to pre-train the manually generated single-character data set to obtain pre-training model parameters;
s5: selecting an optimal automatic data enhancement strategy for the segmented single character data set to obtain a data set after data enhancement;
s6: taking the pre-training model parameters as initial parameter values, and performing fine tuning training on the data set after data enhancement on a preset deep neural network to obtain an ancient seal character recognition model;
s7: the method is used for identifying the ancient seal characters by utilizing the ancient seal character identification model.
2. The method for identifying ancient seal script of claim 1, wherein the step S2 of artificially synthesizing the ancient seal image comprises:
screening an ancient Chinese character seal character font file from the obtained ancient seal character identification data set so as to synthesize an ancient Chinese character image of the required character;
randomly adding edge cutting simulation character position change to the ancient Chinese character image, and simultaneously randomly carrying out color reversal processing to simulate different seal cutting forms;
the method comprises the steps of randomly adding salt and pepper noise and expansion and corrosion treatment to an ancient Chinese character image subjected to color reversal treatment by controlling the size of parameters so as to simulate image degradation and handwriting change of different degrees;
the interference of the background on the characters is simulated by adding frames and the like in the upper, lower, left and right directions of the stamp at random.
3. The method for ancient seal script recognition of deep learning of claim 1, wherein step S3 performs character segmentation on the ancient seal script recognition dataset, comprising:
carrying out binarization on the seal image in the ancient seal character identification data set by using an OTSU algorithm, and carrying out denoising treatment by using an opening operation;
determining the frame width by utilizing the probability density distribution of image edge pixels according to the projection characteristics of the image pixels after denoising treatment, and removing the frame part of the seal;
and according to the vertical pixel projection characteristics, the horizontal pixel projection characteristics and the number of characters, positioning a segmentation point between two adjacent characters of the image after the frame is removed, and performing single-character segmentation by adopting a mode of segmenting rows and columns.
4. The method for identifying deep-learning old seal script of claim 1, wherein the preset deep neural network in step S4 is a ResNet-50 network.
5. The method for identifying ancient seal script of claim 1, wherein the optimal data enhancement strategy in step S5 is obtained by:
in iterative training of a preset deep neural network, matching the distribution of an unbiased verification set and a biased data set, and automatically estimating data enhanced distribution parameters by using KL divergence instead of cross entropy loss, wherein the unbiased verification set is a real ancient seal image, and the biased data set is an artificially synthesized ancient seal image;
and automatically estimating and selecting an optimal data enhancement strategy according to the distribution parameters, wherein the data enhancement strategy comprises a data enhancement operation type, an operation probability and an operation amplitude.
6. The method for identifying deep-learning old seal script of claim 1, wherein in the fine-tuning training process of step S6, an initial learning rate and a termination learning rate are set, the attenuation mode uses exponential attenuation, RMSProp algorithm is used as an optimization function in the fine-tuning process, and simultaneously, the soft label and the loss weight are propagated to calculate the weighted KL divergence loss by comparing with the real label.
7. The utility model provides an ancient seal script identification system based on degree of depth study which characterized in that includes:
the data set acquisition module is used for acquiring an ancient seal character identification data set;
the single character data set generating module is used for artificially synthesizing ancient seal images and constructing a manually generated single character data set according to the real ancient seal images and the artificially synthesized ancient seal images contained in the obtained ancient seal character identification data set;
the image preprocessing module is used for carrying out frame removal and character segmentation on the ancient seal character recognition data set to obtain a segmented single-character data set;
the pre-training module is used for pre-training the manually generated single-character data set by adopting a preset deep neural network to obtain pre-training model parameters by taking the manually generated single-character data set as a source domain;
the data enhancement module is used for selecting an optimal automatic data enhancement strategy for the segmented single character data set and acquiring the data set after data enhancement;
the fine tuning module is used for carrying out fine tuning training on the data set after the data enhancement on a preset deep neural network by taking the pre-training model parameters as initial parameter values to obtain an ancient seal character recognition model;
and the identification module is used for identifying the ancient seal characters by utilizing the ancient seal character identification model.
8. The deep learning ancient seal character recognition system according to claim 7, further comprising a result feedback module for outputting recognition results, including the segmented single character image, character tag prediction results ranked according to preset conditions, confidence degrees and the ancient seal in the database as same as the seal character recognition results.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed, implements the method of any one of claims 1 to 6.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210958287.3A CN115439863A (en) | 2022-08-09 | 2022-08-09 | Deep learning-based ancient seal character recognition method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210958287.3A CN115439863A (en) | 2022-08-09 | 2022-08-09 | Deep learning-based ancient seal character recognition method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115439863A true CN115439863A (en) | 2022-12-06 |
Family
ID=84243147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210958287.3A Pending CN115439863A (en) | 2022-08-09 | 2022-08-09 | Deep learning-based ancient seal character recognition method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115439863A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118430002A (en) * | 2024-07-02 | 2024-08-02 | 武汉大学 | Seal identification method and system integrating data enhancement and deep learning |
-
2022
- 2022-08-09 CN CN202210958287.3A patent/CN115439863A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118430002A (en) * | 2024-07-02 | 2024-08-02 | 武汉大学 | Seal identification method and system integrating data enhancement and deep learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12099577B2 (en) | Object recognition method and apparatus, electronic device, and readable storage medium | |
US20190180154A1 (en) | Text recognition using artificial intelligence | |
CN108304357B (en) | Chinese character library automatic generation method based on font manifold | |
CN110276402B (en) | Salt body identification method based on deep learning semantic boundary enhancement | |
CN110675339A (en) | Image restoration method and system based on edge restoration and content restoration | |
CN115661144A (en) | Self-adaptive medical image segmentation method based on deformable U-Net | |
CN114926680B (en) | Malicious software classification method and system based on AlexNet network model | |
CN113159045A (en) | Verification code identification method combining image preprocessing and convolutional neural network | |
CN110738030A (en) | Table reconstruction method and device, electronic equipment and storage medium | |
CN114444565B (en) | Image tampering detection method, terminal equipment and storage medium | |
CN112307919A (en) | Improved YOLOv 3-based digital information area identification method in document image | |
CN116612478A (en) | Off-line handwritten Chinese character scoring method, device and storage medium | |
CN109697442B (en) | Training method and device of character recognition model | |
CN115439863A (en) | Deep learning-based ancient seal character recognition method and system | |
CN115358952A (en) | Image enhancement method, system, equipment and storage medium based on meta-learning | |
CN114897884A (en) | No-reference screen content image quality evaluation method based on multi-scale edge feature fusion | |
Alshathri et al. | Denoising Letter Images from Scanned Invoices Using Stacked Autoencoders. | |
CN112597925A (en) | Handwritten handwriting recognition/extraction and erasing method, handwritten handwriting erasing system and electronic equipment | |
Versteegen et al. | Texture modelling with nested high-order Markov–Gibbs random fields | |
CN116205802A (en) | Image denoising method and device, storage medium and electronic equipment | |
CN115439850A (en) | Image-text character recognition method, device, equipment and storage medium based on examination sheet | |
CN115223033A (en) | Synthetic aperture sonar image target classification method and system | |
CN111476243A (en) | Image character recognition method and device | |
Krupiński et al. | Improved two-step binarization of degraded document images based on Gaussian mixture model | |
Kieri | Context dependent thresholding and filter selection for optical character recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |