Writing scoring method and device, storage medium, electronic equipment and program product
By performing feature extraction and scoring model evaluation on the target text line image, the problem of difficulty in evaluating the writing standardization of a single Chinese character in the existing technology is solved, and accurate prediction score evaluation of Chinese characters is achieved, improving the accuracy of the evaluation.
Patent Information
- Application Number
- CN202410174055.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2024-08-23
AI Technical Summary
It is difficult to score the writing standardness of a single Chinese character with the existing technology. It is usually judged by the page smear area and the alignment of rows and columns, and it is impossible to accurately evaluate the standardity of a single character.
By obtaining the target text line image, calling the target image encoding model for feature extraction, the feature vector of the target text line is obtained, and each word is scored based on the vector and the target scoring model to obtain the prediction score of each word.
The accurate prediction score evaluation of a single Chinese character in the target text line image is achieved, and the accuracy of the evaluation accuracy of the standardization of single character writing is improved.
Smart Images

Figure CN118537863A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a writing scoring method, device, storage medium, electronic equipment and program product. Background Art
[0002] At present, the standardization of Chinese character writing has received widespread attention, such as the focus of parents and teachers; however, related technologies usually judge the standardization of writing based on the page smear area and the overall alignment of rows and columns, and it is difficult to score a single Chinese character. Based on this, there is currently no good solution for how to obtain the prediction score of a single word in the target text line image. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure provide a writing scoring method, device, storage medium, electronic device and program product to solve the problem that the related technology is difficult to score a single Chinese character; that is, the embodiments of the present disclosure can score the single Chinese characters in the target text prediction results, thereby obtaining the prediction score of each word in the target text prediction results, so as to obtain the prediction score of the single word in the target text line image.
[0004] According to one aspect of an embodiment of the present disclosure, a writing scoring method is provided, the method comprising:
[0005] Acquire a target text line image, where a text line image includes at least one word;
[0006] Calling a target image coding model to perform feature extraction on the target text line image to obtain a target image feature vector of the target text line image, and determining a target text prediction result of the target text line image based on the target image feature vector;
[0007] The target scoring model is called, and based on the target image feature vector and the target text prediction result, each word in the target text prediction result is scored to obtain a prediction score for each word in the target text prediction result.
[0008] According to another aspect of an embodiment of the present disclosure, a writing scoring device is provided, the device comprising:
[0009] An acquisition unit, used for acquiring a target text line image, wherein a text line image includes at least one word;
[0010] A processing unit, configured to call a target image coding model, perform feature extraction on the target text line image, obtain a target image feature vector of the target text line image, and determine a target text prediction result of the target text line image based on the target image feature vector;
[0011] The processing unit is also used to call the target scoring model, score each word in the target text prediction result based on the target image feature vector and the target text prediction result, and obtain the prediction score of each word in the target text prediction result.
[0012] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to perform the above-mentioned method.
[0013] According to another aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.
[0014] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program performs the above-mentioned method when executed by a processor.
[0015] After acquiring the target text line image, the disclosed embodiment may call the target image encoding model, perform feature extraction on the target text line image, obtain the target image feature vector of the target text line image, and determine the target text prediction result of the target text line image based on the target image feature vector, so as to obtain a target text prediction result with higher accuracy. Furthermore, the target scoring model may be called to score each character in the target text prediction result based on the target image feature vector and the target text prediction result, so as to obtain the prediction score of each character in the target text prediction result. It can be seen that the disclosed embodiment may obtain the prediction score of each character in the target text prediction result by scoring the single Chinese characters in the target text prediction result, so as to achieve the acquisition of the prediction score of a single character in the target text line image. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0017] Figure 1 A schematic diagram of a writing scoring method according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 2 A schematic diagram showing a flow chart of another writing scoring method according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 3 A schematic diagram showing a flow chart of another writing scoring method according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 4 A schematic diagram of contrast learning according to an exemplary embodiment of the present disclosure is shown;
[0021] Figure 5 A schematic diagram of model training according to an exemplary embodiment of the present disclosure is shown;
[0022] Figure 6a A schematic diagram of scoring a short text line according to an exemplary embodiment of the present disclosure is shown;
[0023] Figure 6b A schematic diagram of scoring a long text line according to an exemplary embodiment of the present disclosure is shown;
[0024] Figure 7 A schematic block diagram of a writing scoring device according to an exemplary embodiment of the present disclosure is shown;
[0025] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0031] It should be noted that the execution subject of the writing scoring method provided in the embodiment of the present disclosure may be one or more electronic devices, which is not limited in the embodiment of the present disclosure; wherein, the electronic device may be a terminal (i.e., a client) or a server, then when the execution subject includes multiple electronic devices, and the multiple electronic devices include at least one terminal and at least one server, the writing scoring method provided in the embodiment of the present disclosure may be jointly executed by the terminal and the server. Accordingly, the terminals mentioned here may include but are not limited to: smart phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, learning machines, and the like. The server mentioned here may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, and the like.
[0032] Based on the above description, the present disclosure provides a writing scoring method, which can be executed by the electronic device (terminal or server) mentioned above; or, the writing scoring method can be executed by the terminal and the server together. For the sake of convenience, the following description will be given by taking the electronic device executing the writing scoring method as an example; Figure 1 As shown, the writing scoring method may include the following steps S101-S103:
[0033] S101, obtaining a target text line image, where a text line image includes at least one word.
[0034] The number of target text line images may be one or more, which is not limited in the embodiments of the present disclosure; it should be understood that when the number of target text line images is multiple, the electronic device may perform writing scoring on each of the multiple target text line images in turn, thereby obtaining a prediction score for each word in the target text prediction result corresponding to each target text line image. For ease of explanation, the following description will be made using one target text line image as an example.
[0035] In the embodiments of the present disclosure, the target text line image may be obtained in the following ways, including but not limited to:
[0036] The first acquisition method: the electronic device may have a shooting component. In this case, the electronic device may shoot a text line image through the shooting component and use the shot text line image as the target text line image.
[0037] The second acquisition method: the electronic device can have a specific writing area. In this case, the user can write Chinese characters in the writing area of the electronic device, and the electronic device can then capture images of the writing area, thereby using the captured images as the target text line images.
[0038] The third acquisition method: the electronic device can receive an image sent by the user through other devices (such as a mobile phone or a computer, etc.), and use the received image as a target text line image, and so on.
[0039] S102, calling a target image coding model, performing feature extraction on a target text line image, obtaining a target image feature vector of the target text line image, and determining a target text prediction result of the target text line image based on the target image feature vector.
[0040] Optionally, the image coding model may be a convolutional neural network model, or a Transformer (a self-attention mechanism model, i.e., a deep learning model based on the self-attention mechanism), etc.; the present disclosure embodiment does not limit this. Optionally, the present disclosure embodiment may also refer to the image coding model as a backbone model.
[0041] It should be noted that before calling the target image coding model and performing feature extraction on the target text line image, the electronic device may also obtain the target image coding model. Optionally, the target image coding model may be stored in the electronic device's own storage space. In this case, the electronic device may obtain the target image coding model from its own storage space; or, the electronic device may obtain an image coding model download link, and use the model downloaded based on the image coding model download link as the target image coding model; or, the electronic device may perform model training on the initial image coding model to obtain the target image coding model, so as to obtain the target image coding model, and so on; the embodiments of the present disclosure are not limited to this. Among them, the specific implementation method of model training for the initial image coding model is shown below, and the embodiments of the present disclosure will not be repeated here.
[0042] Specifically, the electronic device can extract features from the target text line image through the target image encoding model to obtain the target image feature vector, thereby processing the target image feature vector into a probability form of the prediction result, that is, the target image feature vector can be converted into target probability data, and the target probability data can include the probability vectors of each image segmentation result in the target text line image, and a probability vector can be used to indicate that the corresponding image segmentation result is the probability value of each Chinese character in the Chinese character library; based on this, the electronic device can obtain the target text prediction result based on the target probability data through methods such as beam search or greedy search. Among them, beam search can also be called beam search, which is an effective search algorithm between brute force search and greedy search, and is usually used for OCR (Optical Character Recognition) prediction results.
[0043] In the disclosed embodiment, the target text line image may include one or more image text lines. Optionally, when the target text line image includes multiple image text lines, the electronic device may combine the multiple image text lines into one image text line to obtain a combined image text line, and call the target image coding model to perform feature extraction on the combined image text line to obtain a target image feature vector, in which case the target text prediction result may be a combination result of the text prediction results of each image text line in the multiple image text lines; or, feature extraction may be performed on each image text line to obtain an image feature vector of each image text line, in which case the target image feature vector may include the image feature vector of each image text line, and the target text prediction result may include the text prediction result of each image text line, and so on; in this case, each word in any image text line may be scored based on the image feature vector of any image text line and the text prediction result of any image text line, respectively, to obtain a prediction score for each word in the text prediction result of any image text line.
[0044] S103, calling the target scoring model, scoring each word in the target text prediction result based on the target image feature vector and the target text prediction result, and obtaining a prediction score for each word in the target text prediction result.
[0045] Optionally, the scoring model may include a decoder in a Transformer, and may also include a cross-attention network (i.e., cross-attention), etc., which is not limited in the embodiments of the present disclosure.
[0046] It should be noted that before calling the target scoring model and scoring each word in the target text prediction result based on the target image feature vector and the target text prediction result, the electronic device may also obtain the target scoring model. Optionally, the target scoring model may be stored in the electronic device's own storage space, and the target scoring model may be obtained from its own storage space; or, the electronic device may obtain a scoring model download link, and use the model downloaded based on the scoring model download link as the target scoring model; or, the electronic device may also perform model training on the initial scoring model to obtain the target scoring model, and so on; the embodiments of the present disclosure are not limited to this. Among them, the specific implementation method of model training the initial scoring model can be seen as shown below, and the embodiments of the present disclosure will not be repeated here.
[0047] In summary, the electronic device can send the target text prediction result and the target image feature vector together into the target scoring model for scoring, and finally obtain the prediction score (i.e., scoring result) of each word (i.e., each Chinese character) in the target text prediction result, thereby obtaining the font standardization scoring result of a single word, such as Figure 2 shown.
[0048] After acquiring the target text line image, the disclosed embodiment may call the target image encoding model, perform feature extraction on the target text line image, obtain the target image feature vector of the target text line image, and determine the target text prediction result of the target text line image based on the target image feature vector, so as to obtain a target text prediction result with higher accuracy. Furthermore, the target scoring model may be called to score each character in the target text prediction result based on the target image feature vector and the target text prediction result, so as to obtain the prediction score of each character in the target text prediction result. It can be seen that the disclosed embodiment may obtain the prediction score of each character in the target text prediction result by scoring the single Chinese characters in the target text prediction result, so as to achieve the acquisition of the prediction score of a single character in the target text line image.
[0049] Based on the above description, the embodiment of the present disclosure also proposes a more specific writing scoring method. Accordingly, the writing scoring method can be executed by the electronic device (terminal or server) mentioned above; or, the writing scoring method can be executed by the terminal and the server together. For the sake of convenience, the following description will be given by taking the electronic device executing the writing scoring method as an example; please refer to Figure 3 The writing scoring method may include the following steps S301-S308:
[0050] S301, obtaining a first training image set and a stroke sequence corresponding to each first training image in the first training image set, wherein the first training image set includes at least one first training image.
[0051] Among them, a first training image may be a single Chinese character image, that is to say, a first training image may include a single Chinese character. Optionally, the Chinese character in a first training image may be a printed Chinese character, that is, the first training image may also be referred to as a printed Chinese character image. Optionally, the printed font may be selected from relatively standard Song typeface, Kai typeface, and Hei typeface, etc., and the embodiments of the present disclosure do not limit this.
[0052] In the embodiments of the present disclosure, a stroke sequence can be used to indicate the strokes of the Chinese character in the corresponding first training image; optionally, the embodiments of the present disclosure can divide the basic Chinese character strokes into H categories, and can label each category of strokes in the H categories with a stroke identifier, where H is a positive integer; for example, the value of H can be 28, and at this time, the basic Chinese character strokes can be divided into 28 categories. Optionally, a stroke identifier can be a letter identifier or a digital identifier (such as a serial number), etc., and the embodiments of the present disclosure do not limit this; for example, (1) can be the stroke identifier for the horizontal stroke, (2) can be the stroke identifier for the vertical stroke, (3) can be the stroke identifier for the left-falling stroke, etc. Exemplarily, assuming that the Chinese character in a first training image is "十" (ten), and the horizontal stroke can be represented by (1), and the vertical stroke can be represented by (2), then the stroke sequence corresponding to this first training image can be (1)(2), and so on. Optionally, the embodiments of the present disclosure may not consider the stroke order, that is, the order of the stroke identifiers in the stroke sequence of a Chinese character may not be limited.
[0053] Optionally, the first training image set and the stroke sequences corresponding to each first training image may be stored in the own storage space of the electronic device, then the first training image set and the stroke sequences corresponding to each first training image can be obtained from the own storage space; or, the electronic device can obtain a first download link and download the first training image set and the stroke sequences corresponding to each first training image based on the first download link, and so on.
[0054] S302: Invoke the initial image encoding model to respectively extract features from each first training image to obtain the image feature vectors of each first training image.
[0055] Optionally, before invoking the initial image encoding model to respectively extract features from each first training image, the electronic device can obtain the initial image encoding model. Specifically, the initial image encoding model may be stored in the own storage space of the electronic device, then the initial image encoding model can be obtained from the own storage space; or, the initial image encoding model download link can be obtained, and the initial image encoding model can be downloaded based on the initial image encoding model download link to obtain the initial image encoding model, and so on.
[0056] S303, calling the initial text encoding model, respectively extracting features of the stroke sequences corresponding to the first training images, and obtaining text feature vectors of the stroke sequences corresponding to the first training images.
[0057] Optionally, before calling the initial text encoding model and performing feature extraction on the stroke sequences corresponding to each first training image, the initial text encoding model can be obtained. Specifically, the initial text encoding model can be stored in the storage space of the electronic device itself, and the initial text encoding model can be obtained from the storage space itself; or, the initial text encoding model download link can be obtained, and the initial text encoding model can be downloaded based on the initial text encoding model download link to obtain the initial text encoding model, etc. Optionally, the text encoding model can be a Transformer model.
[0058] S304: Calculate a first model loss value based on the difference between the image feature vector of each first training image and the text feature vector of the stroke sequence corresponding to the corresponding first training image.
[0059] Specifically, the electronic device may use the image feature vectors of each first training image and the text feature vectors of the stroke sequence corresponding to the corresponding first training image to calculate the loss function, thereby calculating the first model loss value based on the difference between the image feature vectors of each first training image and the text feature vectors of the stroke sequence corresponding to the corresponding first training image, such as Figure 4 Based on this, the calculation of the loss value of the first model can be achieved through contrastive learning.
[0060] S305, optimizing the model parameters in the initial image coding model in the direction of reducing the loss value of the first model, obtaining the initial image coding model after model optimization, and determining the target image coding model based on the initial image coding model after model optimization.
[0061] In one embodiment, when determining the target image coding model based on the initial image coding model after model optimization, the electronic device may determine the intermediate image coding model based on the initial image coding model after model optimization, so as to determine the target image coding model based on the intermediate image coding model. Specifically, the electronic device may use the first training image set and the stroke sequence corresponding to each first training image to continue model training on the initial image coding model after model optimization until the first convergence condition is reached (such as the number of iterations reaches the first iteration threshold or the model loss value is less than the first model loss threshold, etc.), and obtain the intermediate image coding model, that is, the image coding model when the first convergence condition is reached can be used as the intermediate image coding model. Optionally, the first iteration threshold and the first model loss threshold can be set according to experience or according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0062] Furthermore, the electronic device may obtain the annotated text of each second training image in the second training image set and the second training image set, wherein the second training image set includes at least one second training image; and may call the intermediate image coding model to perform feature extraction on each second training image respectively to obtain the image feature vector of each second training image. Based on this, the probability prediction result (i.e., the probability form of the prediction result) of each second training image may be determined based on the image feature vector of each second training image, and the second model loss value may be calculated based on the probability prediction result of each second training image and the annotated text of the corresponding second training image. Among them, a probability prediction result may include the probability vector of each image segmentation result in the corresponding second training image, and a probability prediction result supports the determination of the text prediction result of the corresponding second training image, so that the text prediction result of each second training image may be determined based on the probability prediction result of each second training image. That is to say, the electronic device may determine the text prediction result of each second training image based on the image feature vector of each second training image, such as Figure 5 shown.
[0063] Optionally, when calculating the second model loss value based on the probability prediction results of each second training image and the annotated text of the corresponding second training image, the electronic device may calculate the CTC (Connectionist Temporal Classification, a method to avoid manual alignment of input and output) loss of the probability prediction results of each second training image and the annotated text of the corresponding second training image, thereby obtaining the second model loss value.
[0064] Based on this, the electronic device can optimize the model parameters in the intermediate image coding model based on the second model loss value to obtain the intermediate image coding model after model optimization, so as to determine the target image coding model based on the intermediate image coding model after model optimization; in this case, the electronic device can optimize and fine-tune the intermediate image coding model through the second model loss value. It should be noted that the electronic device can use the second training image set and the annotated text of each second training image to continue model training for the intermediate image coding model after model optimization until the second convergence condition is reached (such as the number of iterations reaches the second iteration threshold or the model loss value is less than the second model loss threshold, etc.), and the target image coding model is obtained; that is, the image coding model when the second convergence condition is reached can be used as the target image coding model. Optionally, the second iteration threshold and the second model loss threshold can be set according to experience or according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0065] In a specific implementation, the electronic device may also obtain an initial scoring model, and call the initial scoring model, and score each word in the annotated text of the corresponding second training image based on the image feature vector and the annotated text of each second training image, and obtain the predicted score of each word in the annotated text of each second training image. Specifically, for any second training image in the second training image set, the electronic device may determine the vector representation of each word in the annotated text of any second training image, thereby calling the initial scoring model, and scoring each word in the annotated text of any second training image based on the image feature vector of any second training image and the vector representation of each word in the annotated text of any second training image, and obtain the predicted score of each word in the annotated text of any second training image. Optionally, the vector representation of each word in the annotated text of any second training image can be used to determine the parameter Q (Query Vector, query vector matrix) in the scoring model, and the image feature vector of any second training image can be used to determine the parameters K (Key Vector, key vector matrix) and V (Value Vector, value vector matrix) in the scoring model, and these three parameters can all be parameters in the self-attention mechanism.
[0066] Furthermore, the electronic device may calculate the third model loss value based on the prediction score and annotation score of each word in the annotated text of each second training image; specifically, for any second training image in the second training image set, the electronic device may perform cross-entropy loss calculation on the prediction score and annotation score of each word in the annotated text of any second training image to obtain the cross-entropy loss value of any second training image, and thus perform a weighted sum (such as a mean operation or a summation operation, etc.) on the cross-entropy loss values of each second training image to obtain the third model loss value, so as to calculate the third model loss value.
[0067] Then correspondingly, when optimizing the model parameters in the intermediate image coding model based on the second model loss value to obtain the intermediate image coding model after model optimization, the electronic device can perform weighted summation on the second model loss value and the third model loss value to obtain the fourth model loss value, and optimize the model parameters in the intermediate image coding model in the direction of reducing the fourth model loss value to obtain the intermediate image coding model after model optimization. Optionally, the weight value of the second model loss value and the weight value of the third model loss value can be set according to experience or according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0068] Optionally, the target scoring model can also be determined based on the initial scoring model and the third model loss value, and the third model loss value can be determined based on the prediction score and the annotation score of each word in the annotated text of each second training image in the second training image set. Based on this, the electronic device can determine the fifth model loss value based on the third model loss value, and the fifth model loss value can be the third model loss value or the fourth model loss value. The fourth model loss value is the weighted summation result between the second model loss value and the third model loss value. The second model loss value can be determined based on the probability prediction results of each second training image and the annotated text of the corresponding second training image; and the model parameters in the initial scoring model can be optimized in the direction of reducing the fifth model loss value to obtain the initial scoring model after model optimization, so as to determine the target scoring model based on the initial scoring model after model optimization. It should be understood that the electronic device can continue to use the second training image set to perform model training on the initial scoring model after model optimization until the third convergence condition is reached, thereby obtaining the target scoring model; optionally, the third convergence condition can be the same as the second convergence condition, or it can be different, and the embodiment of the present disclosure is not limited to this.
[0069] In another specific implementation, when optimizing the model parameters in the intermediate image coding model based on the second model loss value to obtain the intermediate image coding model after model optimization, the electronic device may also optimize the model parameters in the intermediate image coding model in the direction of reducing the second model loss value to obtain the intermediate image coding model after model optimization, and so on.
[0070] In summary, the embodiment of the present disclosure can complete the model training of the image coding model and the model training of the scoring model in one training process, which is an end-to-end model. In addition, the embodiment of the present disclosure can use the intermediate image coding model for transfer learning to obtain the target image coding model.
[0071] In another embodiment, when determining the target image coding model based on the initial image coding model after model optimization, the electronic device may also continue to use the first training image set and the stroke sequence corresponding to each first training image to perform model training on the initial image coding model after model optimization until the first convergence condition is reached to obtain the target image coding model; that is, the image coding model when the first convergence condition is reached can be used as the target image coding model, and so on.
[0072] In summary, the disclosed embodiment can use a contrastive learning model (i.e., an image coding model and a text coding model) to obtain a better image coding model (such as an intermediate image coding model, which can also be referred to as a pre-trained image coding model) based on each first training image and the stroke sequence corresponding to each first training image. That is to say, the disclosed embodiment can use each first training image and the stroke sequence corresponding to each first training image as pre-training data to train the image coding model to recognize the stroke structure of Chinese characters, thereby obtaining an intermediate image coding model; based on this, an intermediate image coding model can be obtained for encoding an image feature vector (i.e., feature coding) suitable for identifying the neatness of Chinese characters, thereby facilitating the subsequent neatness scoring of Chinese characters. Among them, the process of using the first training image set to train the image coding model can also be referred to as the pre-training process of the image coding model.
[0073] Optionally, the electronic device can also optimize the model parameters in the initial text encoding model in the direction of reducing the loss value of the first model to obtain the initial text encoding model after model optimization; that is, the text encoding model can also be optimized during the pre-training process of the image encoding model. Based on this, the electronic device can call the initial text encoding model after model optimization, perform feature extraction on the stroke sequence corresponding to each first training image, obtain the text feature vector of the stroke sequence corresponding to each first training image, and continue to perform model training on the initial image encoding model after model optimization and the initial text encoding model after model optimization based on the text feature vector of the stroke sequence corresponding to each first training image, until the first convergence condition is reached.
[0074] In the disclosed embodiment, the target image encoding model and the target scoring model may be determined based on the second training image set, and each second training image in the second training image set corresponds to an annotated text. For any second training image in the second training image set, if the annotated text of any second training image is a short text line, the annotation score of the annotated text of any second training image may be obtained, and the annotation score of the annotated text of any second training image may be used as the annotation score of each word in the annotated text of any second training image, such as Figure 6a As shown. Then, accordingly, if the annotated text of any second training image is a long text line, the annotated text of any second training image can be cut to obtain multiple text cutting results of the annotated text of any second training image, and one text cutting result is a short text line; and the annotation score of each text cutting result in the multiple text cutting results is obtained, so that the annotation score of each text cutting result is used as the annotation score of each word in the corresponding text cutting result, thereby obtaining the annotation score of each word in the annotated text of any second training image, as shown in FIG. Figure 6b shown.
[0075] Optionally, if the number of words in the annotated text of any second training image is less than a preset word count threshold, the electronic device may determine that the annotated text of any second training image is a short text line; if the number of words in the annotated text of any second training image is greater than or equal to the preset word count threshold, the annotated text of any second training image may be determined to be a long text line. Alternatively, the electronic device may perform word segmentation processing on the annotated text of any second training image to obtain a word segmentation result of any second training image. If the number of words in the word segmentation result of any second training image is less than a preset word segmentation number threshold, the annotated text of any second training image may be determined to be a short text line; if the number of words in the word segmentation result of any second training image is greater than or equal to a preset word segmentation number threshold, the annotated text of any second training image may be determined to be a long text line, and so on. Optionally, the preset word count threshold and the preset word segmentation number threshold may be set according to experience or according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0076] It should be understood that the scores of words written by a user at similar times are not much different, so short text lines can be scored by text line; for long text lines, they can be cut into several short text lines, and the cut short text lines can be scored separately, so that each word in the short text line has the same score as the text line. Based on this, the annotation time cost is saved and the consistency is guaranteed, that is, the scores of words written at similar times are not much different; accordingly, the embodiment of the present disclosure can construct a target scoring model for a single Chinese character at an effective annotation cost and time cost.
[0077] For example, assuming that the annotation score of a short text line is 0.8, the annotation score of each word in the short text line can be 0.8, etc. It can be seen that the embodiment of the present disclosure can implement a fast and effective single-word scoring and annotation method by classifying long and short text lines.
[0078] S306, obtaining a target text line image, where a text line image includes at least one word.
[0079] S307, calling the target image coding model, performing feature extraction on the target text line image, obtaining a target image feature vector of the target text line image, and determining a target text prediction result of the target text line image based on the target image feature vector.
[0080] S308, calling the target scoring model, scoring each word in the target text prediction result based on the target image feature vector and the target text prediction result, and obtaining a prediction score for each word in the target text prediction result.
[0081] Accordingly, the vector representation of each word in the target text prediction result can be used to determine the parameter Q in the target scoring model, the icon image feature vector can be used to determine the parameters K and V in the target scoring model, and so on.
[0082] The disclosed embodiment can obtain the first training image set and the stroke sequence corresponding to each first training image in the first training image set; call the initial image coding model to extract features from each first training image respectively to obtain the image feature vector of each first training image; and call the initial text coding model to extract features from the stroke sequence corresponding to each first training image respectively to obtain the text feature vector of the stroke sequence corresponding to each first training image. Then, correspondingly, the first model loss value can be calculated based on the difference between the image feature vector of each first training image and the text feature vector of the stroke sequence corresponding to the corresponding first training image; and optimize the model parameters in the initial image coding model in the direction of reducing the first model loss value to obtain the model-optimized initial image coding model, so as to determine the target image coding model based on the model-optimized initial image coding model. Based on this, after obtaining the target text line image, the target image encoding model can be called to perform feature extraction on the target text line image to obtain the target image feature vector of the target text line image, and based on the target image feature vector, the target text prediction result of the target text line image can be determined; further, the target scoring model can be called to score each word in the target text prediction result based on the target image feature vector and the target text prediction result to obtain the prediction score of each word in the target text prediction result. It can be seen that the embodiment of the present disclosure can score the individual Chinese characters in the target text prediction results to obtain the prediction score of each character in the target text prediction results, so as to obtain the prediction score of the single word in the target text line image, thereby successfully verifying the feasibility of scoring the writing standardization of each Chinese character in the image field, filling the gap in this part of the technology; and, the embodiment of the present disclosure can successfully pre-train an effective image encoder through the multimodal contrastive learning method, so as to encode an image feature vector suitable for identifying the neatness of Chinese characters, and then obtain a target image encoding model with better model performance, which can effectively improve the model performance of the target image encoding model and improve the accuracy of the target text prediction results, so as to improve the accuracy of the prediction score of the single word in the target text line image.
[0083] Based on the description of the above-mentioned related embodiments of the writing scoring method, the present disclosure also proposes a writing scoring device, which can be a computer program (including program code) running in an electronic device; Figure 7 As shown, the writing scoring device may include an acquisition unit 701 and a processing unit 702. The writing scoring device may execute Figure 1 or Figure 3The writing scoring method shown, i.e., the writing scoring device can run the above-mentioned units:
[0084] An acquisition unit 701 is used to acquire a target text line image, where a text line image includes at least one word;
[0085] The processing unit 702 is used to call the target image coding model, perform feature extraction on the target text line image, obtain a target image feature vector of the target text line image, and determine a target text prediction result of the target text line image based on the target image feature vector;
[0086] The processing unit 702 is further used to call the target scoring model, and score each word in the target text prediction result based on the target image feature vector and the target text prediction result to obtain a prediction score for each word in the target text prediction result.
[0087] In one implementation, the acquisition unit 701 may also be used to:
[0088] Acquire a first training image set and a stroke sequence corresponding to each first training image in the first training image set, wherein the first training image set includes at least one first training image;
[0089] The processing unit 702 may also be used to:
[0090] Calling the initial image coding model to extract features from each of the first training images to obtain image feature vectors of each of the first training images;
[0091] Calling the initial text encoding model to extract features of the stroke sequences corresponding to the first training images respectively, and obtaining text feature vectors of the stroke sequences corresponding to the first training images;
[0092] Calculating a first model loss value based on a difference between an image feature vector of each first training image and a text feature vector of a stroke sequence corresponding to the corresponding first training image;
[0093] In the direction of reducing the loss value of the first model, the model parameters in the initial image coding model are optimized to obtain the initial image coding model after model optimization, so as to determine the target image coding model based on the initial image coding model after model optimization.
[0094] In another implementation manner, when the processing unit 702 determines the target image coding model based on the initial image coding model optimized by the model, it may be specifically configured to:
[0095] Based on the initial image coding model optimized by the model, an intermediate image coding model is determined, and a second training image set and annotated text of each second training image in the second training image set are obtained, wherein the second training image set includes at least one second training image;
[0096] Calling the intermediate image coding model to perform feature extraction on each of the second training images respectively to obtain image feature vectors of each of the second training images;
[0097] Determine the probability prediction results of each second training image based on the image feature vectors of each second training image, and calculate the second model loss value based on the probability prediction results of each second training image and the annotated text of the corresponding second training image;
[0098] Based on the second model loss value, the model parameters in the intermediate image coding model are optimized to obtain the intermediate image coding model after model optimization, so as to determine the target image coding model based on the intermediate image coding model after model optimization.
[0099] In another implementation, the acquisition unit 701 may also be used to:
[0100] Obtain an initial scoring model;
[0101] The processing unit 702 may also be used to:
[0102] Calling the initial scoring model, and scoring each word in the annotated text of the corresponding second training image based on the image feature vector and the annotated text of each second training image, to obtain a predicted score for each word in the annotated text of each second training image;
[0103] Calculating a third model loss value based on the prediction score and the annotation score of each word in the annotated text of each second training image;
[0104] When the processing unit 702 optimizes the model parameters in the intermediate image coding model based on the second model loss value to obtain the intermediate image coding model after model optimization, it can be specifically used to:
[0105] The second model loss value and the third model loss value are weightedly summed to obtain a fourth model loss value, and the model parameters in the intermediate image coding model are optimized in the direction of reducing the fourth model loss value to obtain the intermediate image coding model after model optimization.
[0106] In another embodiment, the target scoring model is determined based on the initial scoring model and the third model loss value, and the third model loss value is determined based on the predicted score and the annotation score of each word in the annotated text of each second training image in the second training image set; the processing unit 702 can also be used to:
[0107] Based on the third model loss value, determine a fifth model loss value, the fifth model loss value being the third model loss value or the fourth model loss value, the fourth model loss value being a weighted sum of the second model loss value and the third model loss value, the second model loss value being determined based on the probability prediction results of the respective second training images and the annotated text of the corresponding second training image;
[0108] In the direction of reducing the loss value of the fifth model, the model parameters in the initial scoring model are optimized to obtain the initial scoring model after model optimization, so as to determine the target scoring model based on the initial scoring model after model optimization.
[0109] In another implementation manner, the target image encoding model and the target scoring model are determined based on a second training image set, and each second training image in the second training image set corresponds to a labeled text; the acquisition unit 701 may also be used to:
[0110] For any second training image in the second training image set, if the annotated text of any second training image is a short text line, obtaining an annotation score of the annotated text of any second training image;
[0111] The processing unit 702 may also be used to:
[0112] Using the annotation score of the annotated text of any second training image as the annotation score of each word in the annotated text of any second training image;
[0113] If the annotated text of any of the second training images is a long text line, segmenting the annotated text of any of the second training images to obtain a plurality of text segmentation results of the annotated text of any of the second training images, wherein one text segmentation result is a short text line;
[0114] The acquisition unit 701 may also be used for:
[0115] Obtaining a labeling score for each of the multiple text segmentation results;
[0116] The processing unit 702 may also be used to:
[0117] The annotation scores of the respective text segmentation results are respectively used as the annotation scores of each character in the corresponding text segmentation results, thereby obtaining the annotation score of each character in the annotated text of any second training image.
[0118] According to one embodiment of the present disclosure, Figure 1 or Figure 3 Each step involved in the method shown can be Figure 7 The writing scoring device shown in the figure is executed by each unit. For example, Figure 1 The step S101 shown in FIG. 1 can be performed by Figure 7 The acquisition unit 701 shown in FIG. 1 is executed, and steps S102 and S103 can be performed by Figure 7 The processing unit 702 shown in is executed. For example, Figure 3 The steps S301 and S306 shown in FIG. 1 can be performed by Figure 7 The acquisition unit 701 shown in FIG. 1 is executed, and steps S302-S305, S307 and S308 can all be performed by Figure 7 The processing unit 702 shown in executes, and so on.
[0119] According to another embodiment of the present disclosure, Figure 7 Each unit in the writing scoring device shown can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present disclosure. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present disclosure, any writing scoring device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0120] According to another embodiment of the present disclosure, the program can be executed by running a program on a general electronic device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 1 or Figure 3 A computer program (including program code) for each step involved in the corresponding method shown in Figure 7 The writing scoring device shown in the embodiment of the present disclosure is used to implement the writing scoring method of the embodiment of the present disclosure. The computer program can be recorded on a computer storage medium, for example, and loaded into the above-mentioned electronic device through the computer storage medium and run therein.
[0121] After acquiring the target text line image, the disclosed embodiment may call the target image encoding model, perform feature extraction on the target text line image, obtain the target image feature vector of the target text line image, and determine the target text prediction result of the target text line image based on the target image feature vector, so as to obtain a target text prediction result with higher accuracy. Furthermore, the target scoring model may be called to score each character in the target text prediction result based on the target image feature vector and the target text prediction result, so as to obtain the prediction score of each character in the target text prediction result. It can be seen that the disclosed embodiment may obtain the prediction score of each character in the target text prediction result by scoring the single Chinese characters in the target text prediction result, so as to achieve the acquisition of the prediction score of a single character in the target text line image.
[0122] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present disclosure further provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present disclosure when executed by the at least one processor.
[0123] The exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform the method according to the embodiments of the present disclosure.
[0124] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform the method according to the embodiments of the present disclosure.
[0125] refer to Figure 8 , a block diagram of an electronic device 800 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0126] like Figure 8As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0127] A plurality of components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the electronic device 800, and the input unit 806 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 807 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 may include, but is not limited to, a disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0128] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above. For example, in some embodiments, the configuration conversion method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. In some embodiments, the computing unit 801 may be configured to perform the configuration conversion method in any other appropriate manner (e.g., by means of firmware).
[0129] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0130] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0133] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0134] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0135] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present disclosure, and certainly cannot be used to limit the scope of rights of the present disclosure. Therefore, equivalent changes made according to the claims of the present disclosure are still within the scope covered by the present disclosure.
Claims
1. A writing scoring method, characterized in that: include: Acquire a target text line image, where a text line image includes at least one word; Calling a target image coding model to perform feature extraction on the target text line image to obtain a target image feature vector of the target text line image, and determining a target text prediction result of the target text line image based on the target image feature vector; The target scoring model is called, and based on the target image feature vector and the target text prediction result, each word in the target text prediction result is scored to obtain a prediction score for each word in the target text prediction result.
2. The method according to claim 1, characterized in that The method further comprises: Acquire a first training image set and a stroke sequence corresponding to each first training image in the first training image set, wherein the first training image set includes at least one first training image; Calling the initial image coding model to extract features from each of the first training images to obtain image feature vectors of each of the first training images; Calling the initial text encoding model to extract features of the stroke sequences corresponding to the first training images respectively, and obtaining text feature vectors of the stroke sequences corresponding to the first training images; Calculating a first model loss value based on a difference between an image feature vector of each first training image and a text feature vector of a stroke sequence corresponding to the corresponding first training image; In the direction of reducing the loss value of the first model, the model parameters in the initial image coding model are optimized to obtain the initial image coding model after model optimization, so as to determine the target image coding model based on the initial image coding model after model optimization.
3. The method according to claim 2, characterized in that The step of determining a target image coding model based on the initial image coding model optimized by the model comprises: Based on the initial image coding model optimized by the model, an intermediate image coding model is determined, and a second training image set and annotated text of each second training image in the second training image set are obtained, wherein the second training image set includes at least one second training image; Calling the intermediate image coding model to perform feature extraction on each of the second training images respectively to obtain image feature vectors of each of the second training images; Determine the probability prediction results of each second training image based on the image feature vectors of each second training image, and calculate the second model loss value based on the probability prediction results of each second training image and the annotated text of the corresponding second training image; Based on the second model loss value, the model parameters in the intermediate image coding model are optimized to obtain the intermediate image coding model after model optimization, so as to determine the target image coding model based on the intermediate image coding model after model optimization.
4. The method according to claim 3, characterized in that The method further comprises: Acquire an initial scoring model, call the initial scoring model, and score each word in the annotated text of the corresponding second training image based on the image feature vector and the annotated text of each second training image to obtain a predicted score for each word in the annotated text of each second training image; Calculating a third model loss value based on the prediction score and the annotation score of each word in the annotated text of each second training image; The step of optimizing the model parameters in the intermediate image coding model based on the second model loss value to obtain the intermediate image coding model after model optimization includes: The second model loss value and the third model loss value are weightedly summed to obtain a fourth model loss value, and the model parameters in the intermediate image coding model are optimized in the direction of reducing the fourth model loss value to obtain the intermediate image coding model after model optimization.
5. The method according to any one of claims 1 to 4, characterized in that: The target scoring model is determined based on the initial scoring model and a third model loss value, and the third model loss value is determined based on the predicted score and the annotation score of each word in the annotated text of each second training image in the second training image set; the method also includes: Based on the third model loss value, determine a fifth model loss value, the fifth model loss value being the third model loss value or the fourth model loss value, the fourth model loss value being a weighted sum of the second model loss value and the third model loss value, the second model loss value being determined based on the probability prediction results of the respective second training images and the annotated text of the corresponding second training image; In the direction of reducing the loss value of the fifth model, the model parameters in the initial scoring model are optimized to obtain the initial scoring model after model optimization, so as to determine the target scoring model based on the initial scoring model after model optimization.
6. The method according to any one of claims 1 to 4, characterized in that: The target image encoding model and the target scoring model are determined based on a second training image set, and each second training image in the second training image set corresponds to a labeled text respectively; The method further comprises: For any second training image in the second training image set, if the annotated text of any second training image is a short text line, obtaining an annotation score of the annotated text of any second training image, and using the annotation score of the annotated text of any second training image as the annotation score of each word in the annotated text of any second training image; If the annotated text of any of the second training images is a long text line, the annotated text of any of the second training images is cut to obtain multiple text cutting results of the annotated text of any of the second training images, where one text cutting result is a short text line; and the annotation score of each of the multiple text cutting results is obtained, so that the annotation score of each text cutting result is used as the annotation score of each word in the corresponding text cutting result, thereby obtaining the annotation score of each word in the annotated text of any of the second training images.
7. A writing scoring device, characterized in that: The device comprises: An acquisition unit, used for acquiring a target text line image, wherein a text line image includes at least one word; A processing unit, configured to call a target image coding model, perform feature extraction on the target text line image, obtain a target image feature vector of the target text line image, and determine a target text prediction result of the target text line image based on the target image feature vector; The processing unit is also used to call the target scoring model, score each word in the target text prediction result based on the target image feature vector and the target text prediction result, and obtain the prediction score of each word in the target text prediction result.
8. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.
10. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Calligraphy quality detection method and device based on artificial intelligence, and electronic equipment
CN108734165A
Artificial intelligence scoring system and method for copybook calligraphy practice
CN110232377A
Character pattern evaluation method, device and equipment, and computer readable storage medium
CN110503101A
Handwritten text neatness evaluation method and evaluation device based on neural network
CN111144270A
Intelligent handwritten Chinese character flat measurement algorithm
CN112016419A
