Intelligent scoring method and device for calligraphy works

文档序号:1832035 发布日期:2021-11-12 浏览:6次 中文

阅读说明:本技术 一种书法作品智能评分方法和装置 (Intelligent scoring method and device for calligraphy works ) 是由 李芃 黄维度 郑为 黄怡立 于 2021-08-25 设计创作,主要内容包括:本申请公开了一种书法作品智能评分方法和装置,该方法包括:获取书法作品的第一图像,其中,第一图像是对书法作品进行拍摄得到的;将图像拆分成至少一张第二图像,其中,每张第二图像中均包括一个书写的汉字;将每个第二图像中的汉字进行提取得到每个第二图像对应第一汉字;确定每个第一汉字对应的字体;根据每个第一汉字与标准字库中的第二汉字进行比较,并确定第一汉字的得分,其中,第二汉字与第一汉字为同一汉字,第二汉字与第一汉字的字体相同。通过本申请解决了现有技术中书法测评主要依靠人工来进行测评所导致的问题,从而提高了书法测评的便利性和效率,节约了人工成本。(The application discloses a calligraphy work intelligent scoring method and device, and the method comprises the following steps: acquiring a first image of a calligraphy work, wherein the first image is obtained by shooting the calligraphy work; splitting the image into at least one second image, wherein each second image comprises a written Chinese character; extracting the Chinese characters in each second image to obtain a first Chinese character corresponding to each second image; determining the font corresponding to each first Chinese character; and comparing each first Chinese character with a second Chinese character in the standard character library, and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character. Through the method and the device, the problem caused by manual evaluation mainly depending on calligraphy evaluation in the prior art is solved, so that the convenience and efficiency of calligraphy evaluation are improved, and the labor cost is saved.)

1. An intelligent scoring method for calligraphy works is characterized by comprising the following steps:

acquiring a first image of a calligraphy work, wherein the first image is obtained by shooting the calligraphy work;

splitting the image into at least one second image, wherein each second image comprises a written Chinese character;

extracting the Chinese characters in each second image to obtain a first Chinese character corresponding to each second image;

determining the font corresponding to each first Chinese character;

and comparing each first Chinese character with a second Chinese character in a standard character library, and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character.

2. The method of claim 1, wherein determining the font corresponding to each first Chinese character comprises:

comparing the first Chinese character with different fonts corresponding to the Chinese characters in the standard character library;

and taking the font with the highest similarity as the font of the first Chinese character.

3. The method of claim 1, wherein comparing each of the first Chinese characters to the second Chinese characters in a standard word library and determining the score for the first Chinese character comprises:

inputting the first Chinese character into a first machine learning model, wherein the first machine learning model is obtained by training a plurality of groups of training data, each group of training data comprises input data and output data, the input data comprises two same Chinese characters, one of the two same Chinese characters is a Chinese character obtained by writing, the other one of the two same Chinese characters is a Chinese character in a standard word stock, and the two same Chinese characters are of the same font; the output data is scores of the Chinese characters obtained by writing, and the scores are used for indicating the difference between the Chinese characters obtained by writing and the Chinese characters in the standard word stock;

and taking the output in the first machine learning model as the score of the first Chinese character.

4. The method of claim 3,

after training the first machine learning model using the plurality of sets of training data; validating the first machine learning model using validation data, wherein the validation data is identical in composition to the training data;

after the first machine learning model is verified, the first Chinese character is input into the first machine learning model.

5. The method of claim 4, further comprising:

after the first learning model passes the verification, acquiring at least one additional set of training data;

incrementally training the first machine learning model using the added at least one set of training data;

and (4) grading the Chinese characters by using the first machine learning model after the incremental training.

6. An intelligent scoring device for calligraphy works, comprising:

the calligraphy work acquiring device comprises a first acquiring module, a second acquiring module and a processing module, wherein the first acquiring module is used for acquiring a first image of a calligraphy work, and the first image is obtained by shooting the calligraphy work;

the splitting module is used for splitting the image into at least one second image, wherein each second image comprises a written Chinese character;

the extraction module is used for extracting the Chinese characters in each second image to obtain the first Chinese characters corresponding to each second image;

the first determining module is used for determining the font corresponding to each first Chinese character;

and the second determining module is used for comparing each first Chinese character with a second Chinese character in a standard character library and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character.

7. The apparatus of claim 6, wherein the first determining module is configured to:

comparing the first Chinese character with different fonts corresponding to the Chinese characters in the standard character library;

and taking the font with the highest similarity as the font of the first Chinese character.

8. The apparatus of claim 6, wherein the second determining module is configured to:

inputting the first Chinese character into a first machine learning model, wherein the first machine learning model is obtained by training a plurality of groups of training data, each group of training data comprises input data and output data, the input data comprises two same Chinese characters, one of the two same Chinese characters is a Chinese character obtained by writing, the other one of the two same Chinese characters is a Chinese character in a standard word stock, and the two same Chinese characters are of the same font; the output data is scores of the Chinese characters obtained by writing, and the scores are used for indicating the difference between the Chinese characters obtained by writing and the Chinese characters in the standard word stock;

and taking the output in the first machine learning model as the score of the first Chinese character.

9. The apparatus of claim 8,

further comprising: a validation module to train the first machine learning model using the plurality of sets of training data; validating the first machine learning model using validation data, wherein the validation data is identical in composition to the training data;

the second determining module is used for inputting the first Chinese character into the first machine learning model after the first machine learning model passes verification.

10. The apparatus of claim 9, further comprising:

the second acquisition module is used for acquiring at least one additional group of training data after the first learning model passes the verification;

an incremental training module to incrementally train the first machine learning model using the added at least one set of training data; and the first machine learning model after the incremental training is used for grading the Chinese characters.

Technical Field

The application relates to the field of image processing, in particular to a calligraphy work intelligent scoring method and device.

Background

Along with the rapid development of economy and the progress of science and technology, Chinese traditional culture is concerned by more and more people, calligraphy is an important expression form and a propagation carrier of the Chinese traditional culture, and the calligraphy is written by corresponding calligraphy, structures and nutation according to the character characteristics and meanings thereof, so that the calligraphy becomes an artistic work with rich aesthetic feeling and plays an irreplaceable important role in inheriting and carrying forward the Chinese traditional culture.

In calligraphy teaching, the calligraphy learning effect needs to be evaluated, and the evaluation is performed by a calligraphy teaching teacher at present, so that the burden of the calligraphy teaching teacher is increased, and certain subjective factors exist in the evaluation method. Therefore, the traditional calligraphy evaluation cannot completely meet the requirement of calligraphy evaluation, and application research aiming at writing brush calligraphy evaluation is not available in the market.

Disclosure of Invention

The embodiment of the application provides an intelligent scoring method and device for calligraphy works, and aims to at least solve the problem caused by manual scoring mainly in the prior art.

According to one aspect of the application, an intelligent scoring method for calligraphy works is provided, and comprises the following steps: acquiring a first image of a calligraphy work, wherein the first image is obtained by shooting the calligraphy work; splitting the image into at least one second image, wherein each second image comprises a written Chinese character; extracting the Chinese characters in each second image to obtain a first Chinese character corresponding to each second image; determining the font corresponding to each first Chinese character; and comparing each first Chinese character with a second Chinese character in a standard character library, and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character.

Further, determining the font corresponding to each first chinese character includes: comparing the first Chinese character with different fonts corresponding to the Chinese characters in the standard character library; and taking the font with the highest similarity as the font of the first Chinese character.

Further, comparing each of the first Chinese characters to the second Chinese characters in a standard word library and determining the score of the first Chinese character comprises: inputting the first Chinese character into a first machine learning model, wherein the first machine learning model is obtained by training a plurality of groups of training data, each group of training data comprises input data and output data, the input data comprises two same Chinese characters, one of the two same Chinese characters is a Chinese character obtained by writing, the other one of the two same Chinese characters is a Chinese character in a standard word stock, and the two same Chinese characters are of the same font; the output data is scores of the Chinese characters obtained by writing, and the scores are used for indicating the difference between the Chinese characters obtained by writing and the Chinese characters in the standard word stock; and taking the output in the first machine learning model as the score of the first Chinese character.

Further, after the first machine learning model is trained using the plurality of sets of training data; validating the first machine learning model using validation data, wherein the validation data is identical in composition to the training data; after the first machine learning model is verified, the first Chinese character is input into the first machine learning model.

Further, still include: after the first learning model passes the verification, acquiring at least one additional set of training data; incrementally training the first machine learning model using the added at least one set of training data; and (4) grading the Chinese characters by using the first machine learning model after the incremental training.

According to another aspect of the application, a calligraphy work intelligent scoring device is also provided, and comprises: the calligraphy work acquiring device comprises a first acquiring module, a second acquiring module and a processing module, wherein the first acquiring module is used for acquiring a first image of a calligraphy work, and the first image is obtained by shooting the calligraphy work; the splitting module is used for splitting the image into at least one second image, wherein each second image comprises a written Chinese character; the extraction module is used for extracting the Chinese characters in each second image to obtain the first Chinese characters corresponding to each second image; the first determining module is used for determining the font corresponding to each first Chinese character; and the second determining module is used for comparing each first Chinese character with a second Chinese character in a standard character library and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character.

Further, the first determining module is configured to: comparing the first Chinese character with different fonts corresponding to the Chinese characters in the standard character library; and taking the font with the highest similarity as the font of the first Chinese character.

Further, the second determination module is configured to: inputting the first Chinese character into a first machine learning model, wherein the first machine learning model is obtained by training a plurality of groups of training data, each group of training data comprises input data and output data, the input data comprises two same Chinese characters, one of the two same Chinese characters is a Chinese character obtained by writing, the other one of the two same Chinese characters is a Chinese character in a standard word stock, and the two same Chinese characters are of the same font; the output data is scores of the Chinese characters obtained by writing, and the scores are used for indicating the difference between the Chinese characters obtained by writing and the Chinese characters in the standard word stock; and taking the output in the first machine learning model as the score of the first Chinese character.

Further, still include: a validation module to train the first machine learning model using the plurality of sets of training data; validating the first machine learning model using validation data, wherein the validation data is identical in composition to the training data; the second determining module is used for inputting the first Chinese character into the first machine learning model after the first machine learning model passes verification.

Further, still include: the second acquisition module is used for acquiring at least one additional group of training data after the first learning model passes the verification; an incremental training module to incrementally train the first machine learning model using the added at least one set of training data; and the first machine learning model after the incremental training is used for grading the Chinese characters.

In the embodiment of the application, a first image for acquiring a calligraphy work is adopted, wherein the first image is obtained by shooting the calligraphy work; splitting the image into at least one second image, wherein each second image comprises a written Chinese character; extracting the Chinese characters in each second image to obtain a first Chinese character corresponding to each second image; determining the font corresponding to each first Chinese character; and comparing each first Chinese character with a second Chinese character in a standard character library, and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character. Through the method and the device, the problem caused by manual evaluation mainly depending on calligraphy evaluation in the prior art is solved, so that the convenience and efficiency of calligraphy evaluation are improved, and the labor cost is saved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:

FIG. 1 is a schematic diagram of an original calligraphy image obtained according to an embodiment of the present application;

FIG. 2 is a diagram of a cropped single-word image according to an embodiment of the application;

FIG. 3 is a diagram illustrating a result of individual character recognition of a partial calligraphic work according to an embodiment of the present application;

FIG. 4 is a schematic diagram of single-word image recognition according to an embodiment of the present application;

FIG. 5 is an ACC trend graph of a process of initial training of a calligraphic single-word dataset according to an embodiment of the present application;

FIG. 6 is a loss trend graph of the initial training process of a calligraphic single-word dataset according to an embodiment of the present application;

FIG. 7a is a schematic diagram of a first-time training model structure and output dimensions according to an embodiment of the present application;

FIG. 7b is a schematic diagram of an incremental learning structure and output dimensions of an incremental learning model implemented in accordance with the present application;

FIG. 8 is a plot of the loss trend before and after incremental learning of a garbage classification dataset according to an embodiment of the present application;

FIG. 9 is an Acc trend graph before and after incremental learning of a garbage classification dataset according to an embodiment of the application; and the number of the first and second groups,

FIG. 10 is a flowchart of a method for intelligently scoring calligraphic works according to an embodiment of the application.

Detailed Description

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.

In this embodiment, an intelligent scoring method for calligraphy works is provided, and fig. 10 is a flowchart of the intelligent scoring method for calligraphy works according to the embodiment of the present application, and as shown in fig. 10, the flowchart includes the following steps:

step S102, acquiring a first image of a calligraphy work, wherein the first image is obtained by shooting the calligraphy work;

step S104, splitting the image into at least one second image, wherein each second image comprises a written Chinese character;

step S106, extracting Chinese characters in each second image to obtain first Chinese characters corresponding to each second image;

the first Chinese character is a written Chinese character. The extraction method may use image processing to convert the second image into a binarized image and then extract the chinese characters in the binarized image.

Or, a machine learning model may be trained, which is called a second machine learning model, where the second machine learning model is obtained by training using multiple sets of training data, each set of training data in the multiple sets of training data includes input data and output data, where the input data is a picture with a chinese character, and the output data is a vector character formed by extracting the chinese character from the picture. And after training, inputting the second image into the second machine learning model to obtain a first Chinese character corresponding to the second image.

Step S108, determining the font corresponding to each first Chinese character;

in this step, there are many ways to determine the font corresponding to the first chinese character, for example, comparing the first chinese character with different fonts corresponding to the chinese characters in the standard word stock; and taking the font with the highest similarity as the font of the first Chinese character.

Or, as another alternative implementation, another machine learning model may be trained, where the machine learning model may be referred to as a third machine learning model, the third machine learning model is trained by using multiple sets of training data, each set of training data in the multiple sets of training data includes input data and output data, where the input data is a written chinese character, and the output data is a font corresponding to the chinese character. And after training, inputting the first Chinese character into the third machine learning model to obtain a font corresponding to the first Chinese character.

And step S110, comparing each first Chinese character with a second Chinese character in a standard character library, and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character.

In this embodiment, the implementation may be performed using machine learning. The first Chinese character can be input into a first machine learning model, wherein the first machine learning model is obtained by training a plurality of groups of training data, each group of training data comprises input data and output data, the input data are two same Chinese characters, one of the two same Chinese characters is a Chinese character obtained by writing, the other one of the two same Chinese characters is a Chinese character in a standard word stock, and the two same Chinese characters are of the same font; the output data is scores of the Chinese characters obtained by writing, and the scores are used for indicating the difference between the Chinese characters obtained by writing and the Chinese characters in the standard word stock; and taking the output in the first machine learning model as the score of the first Chinese character.

After training the first machine learning model using the plurality of sets of training data; validating the first machine learning model using validation data, wherein the validation data is identical in composition to the training data; after the first machine learning model is verified, the first Chinese character is input into the first machine learning model.

The machine learning model may be a model supporting incremental training, i.e. after the first learning model passes verification, at least one additional set of training data is obtained; incrementally training the first machine learning model using the added at least one set of training data; and (4) grading the Chinese characters by using the first machine learning model after the incremental training.

After the above steps, the overall score of the calligraphy work can also be obtained according to the score of each word, for example, the average value of the scores of each word can be used as the score of the calligraphy work.

As another alternative, the above method may be implemented in a server, and a client may be provided, where the client may be a web page or an application or software, and the application is used to represent the client for convenience of description. The user can log in the application and then upload own written calligraphy works, after a first Chinese character in the calligraphy works is identified, the Chinese character which is uploaded by the user in history and scored and is the same as the first Chinese character is obtained, the first Chinese character, the corresponding score and the score corresponding to the Chinese character which is the same as the first Chinese character are displayed to the user, and the history score and the score of the first Chinese character are displayed as curves, so that the user can see the progress or the step back of the user.

Through the steps, the problems caused by the fact that the calligraphy evaluation mainly depends on manual work in the prior art are solved, so that the convenience and the efficiency of the calligraphy evaluation are improved, and the labor cost is saved.

This is described below in connection with an alternative embodiment. The optional embodiment is suitable for calligraphy teaching and calligraphy learning effect evaluation, the atmosphere of calligraphy learning is improved, the workload of calligraphy teaching and evaluation is reduced, the artificial intelligence evaluation of writing brush calligraphy is realized by applying an informatization means and combining image acquisition, image cutting and big data analysis, the full-age coverage calligraphy evaluation from children to adults is supported, and simultaneously single-word evaluation and multi-word evaluation are supported. The dimensions such as strokes, structures, laws and the like are analyzed and scored, and corresponding learning improvement opinions are given.

In the embodiment, image acquisition is required to be firstly carried out, for example, the image acquisition can be carried out by using a wireless high-definition video recording and live broadcasting system, the acquisition standard is 1920 × 1080, and the frame rate is 25. And (3) camera authority assignment: and each camera in the classroom is assigned with authority, the teacher can control all the cameras, and the students can only control the camera corresponding to the seat number. After the capture using the camera, an image or picture of the calligraphy work is acquired from the captured video.

After the acquisition, the acquired image is transmitted to a file server, for example, the image generation code stream may be transmitted to the file server by using a web service (web service).

The method includes the steps that a work image can be cut and extracted at a file server, and the cutting and extraction modes are various, for example, according to the background and foreground characteristics of the work image, color range filtering can be carried out on the shot work image, the work image is positioned in the area where paper is located, binarization is carried out to obtain a binary image, vertical projection and horizontal projection are carried out on the binary image to obtain vertical projection histograms and horizontal projection histograms, the boundaries between characters can be accurately distinguished according to the numerical characteristics of the histograms, the histogram numerical value of an effective writing area is large, and the numerical value of the histogram of the boundary part approaches to 0. According to the numerical value change of the histogram, the number of rows and columns of the calligraphy work can be dynamically calculated, and the division of lines and columns in a two-dimensional space is realized, wherein a specific calculation formula is as follows:

Row=count(Rows)/2

Col=count(Cols)/2

rows and Cols in the formula store the start and end coordinates of each Row and column, respectively, Row and Col represent the number of actual Rows and columns in the calligraphic work, and count () is used to identify the count.

The test data of this embodiment is a complete calligraphy work image shown in fig. 1 and shot by a camera, the format is 3 rows and 4 columns of a grid, the specification of the grid is 9cm × 9cm, the calligraphy work image needs to be cut, and then a single character image meeting the input requirement of the recognition model is obtained, and the cut single character image is shown in fig. 2.

In another alternative embodiment, the picture may be cropped by way of machine learning. The method comprises the steps of training by using multiple groups of training data to obtain a machine learning model, wherein each group of data in the multiple groups of training data comprises input data and output data, the input data is a calligraphy work written with multiple Chinese characters, the output data is multiple pictures obtained by cutting the multiple Chinese characters, and each picture comprises one Chinese character in the calligraphy work.

After the cropping is performed, Chinese character recognition is performed for each image resulting from the cropping. There are many ways of Chinese character recognition, for example, a single character data set including a plurality of (in this embodiment, 3757) common characters can be established, wherein each character includes a plurality of (in this embodiment, about 100) font styles including simplified and traditional characters. These data are used as training data (in this embodiment, referred to as chinese character training data), and an incremental learning method based on a machine learning training calligraphy work individual character recognition model is used for training. The trained model can be used for Chinese character recognition. The incremental learning method is convenient for model expansion in the actual training process, improves the utilization rate of the preorder training weight, and consumes shorter time to achieve the training effect which is the same as or even better than that of preorder training in the model expansion process; a series of processes from cutting to recognition of the Chinese character calligraphy works based on the standard Chinese character grids are described in detail, a calligraphy work cutting and handwritten Chinese character recognition algorithm with high compatibility and accuracy is provided (for example, in the figure 4, Buddhist characters are recognized by using a classifier), and a more optimized thought is provided for calligraphy work image processing.

In order to ensure the consistency of the gray scale range of input data and the visual effect of image binarization output and further improve the robustness of the calligraphy work single character recognition algorithm, gray scale normalization processing is carried out on all test pictures before testing, and the gray scale values of the pictures are uniformly scaled to the interval of 0-255.

The accuracy of the single character recognition model of the calligraphy work is that a test set containing 1840 single character pictures of different styles is constructed in the embodiment for testing, because the color information of the Chinese characters is not the main basis in the recognition process, all the pictures are adjusted to be single channels and subjected to binarization processing in order to simplify the calculation process, because the collection of the data set of the calligraphy work is difficult, part of the Chinese characters may not be contained in the test set, the recognition accuracy is 97.02%, and part of the test results are shown in fig. 3.

In an alternative embodiment, for better data analysis, the data (e.g., the chinese character training data mentioned above) may be divided into two parts, i.e., a training set and a verification set, and in addition, test data may be collected for testing. The Chinese character training data mainly comes from a font library in a preset operating system to generate a ttf format file, and about 260000 pieces of RGB three-channel jpg files containing a plurality of fonts are generated aiming at 3755 common Chinese characters, and the Chinese character training data can be approximately considered to be consistent with the fonts of calligraphy works. The verification set is consistent with the training set, and the accuracy of 80 sample verification models is randomly selected from the training set after each epoch training is finished. The test data is derived from calligraphy work practice samples collected on site, about 1800 pictures are contained in total, all samples in the test data do not participate in training in order to fully verify the generalization capability of the model, and the test data are all converted into single-channel jpg format pictures with the resolution of 256 × 256 considering that the problems involved in the embodiment are not directly related to the image colors.

Setting the picture input size to 200 × 200, the format to be Jpg of RGB three channels, setting the batch _ size to 64, setting the training step size of each epoch to 100, setting the initial learning rate to 0.01, setting the learning rate to be a dynamic attenuation mode, dynamically adjusting the learning rate according to the variation condition of loss in the training process so as to obtain a more optimal training result, selecting softmax which is widely applied in the multi-classification problem by an activation function, and setting the loss function to be category _ cross. In order to avoid overfitting in the training process, image zooming, translation and other modes can be adopted for data enhancement.

The experimental process of the initial training mainly comprises two parts of loading a pre-training model and loading training data, iterative training is carried out according to the parameter setting, the verification accuracy and the loss function value change in the training process are shown in fig. 5 and 6, and it can be seen that the verification accuracy is continuously improved and the loss function value is continuously reduced along with the increase of the iteration times, so that the training of the classification model is proved to be effective. FIG. 7a is a schematic diagram of a first-time training model structure and output dimensions according to an embodiment of the present application; fig. 7b is a schematic diagram of an incremental learning structure and output dimensions of the incremental learning model implemented according to the present application, and the comparison between the structure of the model and the output dimensions can be seen from fig. 7a and 7 b.

In order to further verify the effectiveness of the incremental learning model, in this embodiment, the garbage classification dataset may be further tested on the basis of verifying the calligraphy work dataset, and the experimental results are shown in fig. 8, fig. 9 and table 1:

TABLE 1 incremental learning experiment result comparison table

As can be seen from the above table, the training time for two data sets after incremental learning can be shortened to about 30% of the training of the preamble, and the verification accuracy is improved due to the improvement of the data richness, which shows that the efficiency of model class expansion can be obviously improved by the ResNet-50-based incremental learning mode, and the classification model adaptive to a new scene can be generated by fast iteration in practical application.

Through the model obtained through the training, the calligraphy works are scored based on the similarity degree of the input calligraphy works and the standard font style, and finally, the aim of automatically scoring the calligraphy works is fulfilled in a machine learning mode.

Aiming at the problems of positioning and segmenting specific characters of an image, the segmentation process of the traditional vertical projection segmentation algorithm can be limited by the width of the characters and the width of intervals among the characters, the problem of wrong segmentation of Chinese characters with left and right structures can be effectively solved, and the accuracy of character segmentation is improved.

Aiming at the recognition problem of handwritten characters, the Chinese character recognition problem can be converted into a multi-classification problem based on a Chinese character recognition model of a recurrent neural network, and then the classified Chinese character data set is trained by utilizing an RNN (neural network) to achieve the purpose of Chinese character recognition. The incremental learning model is extracted based on the convolutional neural network and the AM-Softmax characteristics, and a better result is obtained by testing on public data sets such as MNIST, EMNIST, CIFAR-100 and the like.

In the embodiment, a set of handwritten single character data sets containing 3757 commonly used Chinese characters is established by combining with a reality scene of continuous expansion of a Chinese character recognition model, and each character comprises about 100 font styles including simplified characters and traditional characters; the method is combined with the method to verify on the calligraphy work data set and the garbage classification data set, and proves that the efficiency and the precision of model expansion can be remarkably improved in the practical application scene of calligraphy work single word recognition and garbage classification based on the ResNet-50 incremental learning method.

In conclusion, the algorithm model can be made stronger through continuous data evaluation, rich teaching experiences are accumulated for calligraphy teaching, the workload of teachers is reduced, self-learning of students is promoted through big data and an artificial intelligence technology, and continuously changing learning requirements are met. Promotes the integration of traditional culture and high-tech technology, promotes the modernized development requirement of the traditional culture, and finally promotes the progress of the whole society.

In this embodiment, an electronic device is provided, comprising a memory in which a computer program is stored and a processor configured to run the computer program to perform the method in the above embodiments.

The programs described above may be run on a processor or may also be stored in memory (or referred to as computer-readable media), which includes both non-transitory and non-transitory, removable and non-removable media, that implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.

These computer programs may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks, and corresponding steps may be implemented by different modules.

In this embodiment, an intelligent scoring device for calligraphy works is provided, which includes: the calligraphy work acquiring device comprises a first acquiring module, a second acquiring module and a processing module, wherein the first acquiring module is used for acquiring a first image of a calligraphy work, and the first image is obtained by shooting the calligraphy work; the splitting module is used for splitting the image into at least one second image, wherein each second image comprises a written Chinese character; the extraction module is used for extracting the Chinese characters in each second image to obtain the first Chinese characters corresponding to each second image; the first determining module is used for determining the font corresponding to each first Chinese character; and the second determining module is used for comparing each first Chinese character with a second Chinese character in a standard character library and determining the score of the first Chinese character, wherein the second Chinese character and the first Chinese character are the same Chinese character, and the font of the second Chinese character is the same as that of the first Chinese character.

The device is used for realizing the functions of the method, each module in the device is used for realizing one step in the method, the modules correspond to the steps of the method one to one, and the description is already given, and is not repeated here.

For example, the first determining module is configured to: comparing the first Chinese character with different fonts corresponding to the Chinese characters in the standard character library; and taking the font with the highest similarity as the font of the first Chinese character. The second determination module is to: inputting the first Chinese character into a first machine learning model, wherein the first machine learning model is obtained by training a plurality of groups of training data, each group of training data comprises input data and output data, the input data comprises two same Chinese characters, one of the two same Chinese characters is a Chinese character obtained by writing, the other one of the two same Chinese characters is a Chinese character in a standard word stock, and the two same Chinese characters are of the same font; the output data is scores of the Chinese characters obtained by writing, and the scores are used for indicating the difference between the Chinese characters obtained by writing and the Chinese characters in the standard word stock; and taking the output in the first machine learning model as the score of the first Chinese character.

For another example, the apparatus may further include: a validation module to train the first machine learning model using the plurality of sets of training data; validating the first machine learning model using validation data, wherein the validation data is identical in composition to the training data; the second determining module is used for inputting the first Chinese character into the first machine learning model after the first machine learning model passes verification. Or may further include: the second acquisition module is used for acquiring at least one additional group of training data after the first learning model passes the verification; an incremental training module to incrementally train the first machine learning model using the added at least one set of training data; and the first machine learning model after the incremental training is used for grading the Chinese characters.

The problems caused by manual evaluation of calligraphy evaluation in the prior art are solved through the embodiment, so that the convenience and efficiency of calligraphy evaluation are improved, and the labor cost is saved.

The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于图像识别的数据解读方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!