CN111797822A - Character object evaluation method and device and electronic equipment - Google Patents

Character object evaluation method and device and electronic equipment Download PDF

Info

Publication number
CN111797822A
CN111797822A CN202010637434.8A CN202010637434A CN111797822A CN 111797822 A CN111797822 A CN 111797822A CN 202010637434 A CN202010637434 A CN 202010637434A CN 111797822 A CN111797822 A CN 111797822A
Authority
CN
China
Prior art keywords
evaluated
character object
structural
strokes
difference values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010637434.8A
Other languages
Chinese (zh)
Other versions
CN111797822B (en
Inventor
冯瑞丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010637434.8A priority Critical patent/CN111797822B/en
Publication of CN111797822A publication Critical patent/CN111797822A/en
Application granted granted Critical
Publication of CN111797822B publication Critical patent/CN111797822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/242Division of the character sequences into groups prior to recognition; Selection of dictionaries
    • G06V30/244Division of the character sequences into groups prior to recognition; Selection of dictionaries using graphical properties, e.g. alphabet type or font
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Abstract

The embodiment of the disclosure discloses a character object evaluation method and device and electronic equipment. One embodiment of the method comprises: receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font; determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated; responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated writes irregularly to a user based on the irregular writing strokes, the components and the structure intervals. The implementation method carries out comprehensive evaluation on the character object to be evaluated according to the strokes, the components and the structural spacing.

Description

Character object evaluation method and device and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a character object evaluation method and device and electronic equipment.
Background
In daily life, there are many people who prefer to practice calligraphy. In order to improve the writing level of the calligraphic characters, people need to know the nonstandard parts of the calligraphic characters written by themselves and improve the parts so as to improve the writing level of themselves. Therefore, how to evaluate the calligraphy characters written by the user is important.
In the related art, whether a calligraphic character is normalized or not is evaluated by analyzing strokes of the calligraphic character provided by a user.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a character object evaluation method, a character object evaluation device and electronic equipment, wherein the character object to be evaluated is comprehensively evaluated according to strokes, components and structural distances.
In a first aspect, an embodiment of the present disclosure provides a method for evaluating a textual object, where the method includes: receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font; determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated; responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated writes irregularly to a user based on the irregular writing strokes, the components and the structure intervals.
In a second aspect, an embodiment of the present disclosure provides a text object evaluation apparatus, including: the receiving unit is used for receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font; the determining unit is used for determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated; and the first feedback unit is used for responding to the irregular writing strokes, the components and the structure intervals in the character object to be evaluated, and feeding back the writing evaluation information representing that the character object to be evaluated writes the irregular writing to the user based on the irregular writing strokes, the components and the structure intervals.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the textual object evaluation method according to the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the textual object evaluation method according to the first aspect.
The character object evaluation method, the character object evaluation device and the electronic equipment can receive the image to be evaluated uploaded by a user. Here, the image to be evaluated includes a text object to be evaluated in a predetermined calligraphy font. Further, whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated or not can be determined. And further, responding to the existence of irregular writing strokes, components and structure intervals in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated writes irregularly to the user based on the irregular writing strokes, components and structure intervals. Therefore, the character object to be evaluated is comprehensively evaluated according to the strokes, the components and the structural spacing.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of some embodiments of a textual object evaluation method according to the present disclosure;
FIG. 2 is a schematic diagram of an application scenario of a textual object evaluation method according to the present disclosure;
FIG. 3 is a flow diagram of still further embodiments of textual object evaluation methods according to the present disclosure;
FIG. 4 is a schematic block diagram of some embodiments of a textual object evaluation device according to the present disclosure;
FIG. 5 is an exemplary system architecture to which the textual object evaluation methods of some embodiments of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided in accordance with some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to fig. 1, a flow diagram of some embodiments of a textual object evaluation method according to the present disclosure is shown. As shown in fig. 1, the character object evaluation method includes the following steps:
step 101, receiving an image to be evaluated uploaded by a user.
In this embodiment, an execution subject of the text object evaluation method (for example, the server 504 shown in fig. 5) may receive an image to be evaluated uploaded by a user.
The image to be evaluated comprises a character object to be evaluated of a preset calligraphy font. It is understood that the text object to be evaluated may be a text object whose writing is to be evaluated as normal. It should be understood that a textual object may be an object that characterizes text. In practice, a word object may contain at least one stroke.
The predetermined calligraphy font may be various calligraphy fonts. For example, the predetermined calligraphy font may be a regular script font, a cursive script font, an clerical script font, an seal script font, and the like.
In some scenarios, the execution subject may receive an image to be evaluated uploaded by a user through a terminal device (e.g., terminals 501, 502 shown in fig. 5).
And 102, determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated.
In this embodiment, the execution subject may determine whether irregular strokes, components and structural distances exist in the text object to be evaluated.
The structure pitch may be a pitch of a sub-structure included in the text object to be evaluated. The sub-structures may be respective portions of a textual structure to which the textual object to be evaluated belongs.
For example, the text object to be evaluated "good" belongs to the left and right structure. The textual object "good" to be evaluated includes the sub-structure "woman" and the sub-structure "child". The structure pitch may then be the pitch of the substructure "woman" and the substructure "son".
In practice, the textual objects to be evaluated may belong to various textual structures. For example, the text object to be evaluated may belong to a single structure, an upper and lower structure, a left and right structure, an upper and middle and lower structure, and the like.
In some scenarios, the execution body may determine a similarity between the strokes of the textual object to be evaluated and the strokes of the reference textual object. In response to the determined similarity being greater than or equal to a preset similarity threshold, the executing body may determine a stroke writing specification of the text object to be evaluated. In response to the determined similarity being less than the preset similarity threshold, the executing body may determine that the stroke writing of the text object to be evaluated is irregular. Therefore, whether irregular strokes exist in the character object to be evaluated or not can be determined.
By adopting a similar method, the execution main body can determine whether the character object to be evaluated has irregular written components and structural spacing, and details are not repeated here.
And 103, responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing the irregular writing of the character object to be evaluated to a user based on the irregular writing strokes, components and structure intervals.
In this embodiment, in response to that the text object to be evaluated is written irregularly, the execution main body may feed back, to the user, writing evaluation information representing that the text object to be evaluated is written irregularly, based on the strokes, radicals, and structural intervals that are written irregularly.
The writing evaluation information may be information for evaluating a character object to be evaluated. In practice, the writing evaluation information may include at least one of: text information, images, audio, video.
In some scenarios, in response to the presence of irregular written strokes, components and structural spacings in the textual object to be evaluated, the executive body may identify irregular written strokes, components and structural spacings in the image to be evaluated. Further, the execution subject may generate a video including the identified image to be evaluated. Still further, the execution subject may feed back the generated video to the user.
As described in the background section, in order to evaluate whether a user-provided calligraphic character is writing a specification, in the related art, whether the calligraphic character is writing a specification is evaluated by analyzing strokes of the user-provided calligraphic character. Therefore, it is impossible to perform a comprehensive evaluation of the calligraphic characters provided by the user.
In this embodiment, it can be realized that the character object to be evaluated is comprehensively evaluated from the strokes, the components and the structural intervals by determining whether the character object to be evaluated included in the image to be evaluated has the strokes, the components and the structural intervals which are written irregularly. Responding to irregular writing strokes, components and structure intervals in the character object to be evaluated, and feeding back and representing the irregular writing evaluation information of the character object to be evaluated to a user based on the irregular writing strokes, the components and the structure intervals, so that the user can clearly know the irregular writing strokes, the components and the structure intervals in the character object to be evaluated according to the received writing evaluation information.
In some embodiments, the reference texture atlas of the reference textual object is selected from a predetermined set of texture atlases. Thus, the reference structure map including more character objects in the structure map set can realize the evaluation of more character objects.
In some embodiments, the execution subject of the text object evaluation method may feed back writing evaluation information representing that the text object to be evaluated is written irregularly to the user as follows.
Firstly, determining stroke evaluation information, radical evaluation information and structure interval evaluation information corresponding to irregular writing strokes, radicals and structure intervals.
The stroke evaluation information may be information indicating that the stroke writing is irregular. Accordingly, the radical evaluation information may be information that characterizes the irregularity of the radical writing. The structure pitch evaluation information may be information indicating that the structure pitch writing is irregular.
In some scenes, aiming at the characters represented by the character objects to be evaluated, a plurality of evaluation information representing irregular stroke writing is preset. Therefore, the execution main body can determine stroke evaluation information of irregular strokes written in the character object to be evaluated from a plurality of preset evaluation information.
By adopting a similar method, the execution main body can determine the component evaluation information and the structure interval evaluation information, and details are not repeated here.
And secondly, feeding back writing evaluation information representing that the character object to be evaluated is written irregularly to the user based on the stroke evaluation information, the radical evaluation information and the structure interval evaluation information.
In some scenarios, the execution body may convert the stroke evaluation information, the radical evaluation information, and the structural interval evaluation information into audio. Further, the execution body may feed back the converted audio to the user.
In these embodiments, based on the stroke evaluation information, the radical evaluation information, and the structure distance evaluation information, writing evaluation information of the text object to be evaluated is fed back to the user, which means that irregular strokes, radicals, and structure distances written in the text object to be evaluated are fed back to the user.
In some embodiments, the execution subject of the textual object evaluation method may perform the following steps.
Specifically, in response to the fact that irregular writing strokes, components and structural intervals do not exist in the character object to be evaluated, writing evaluation information representing the writing specifications of the character object to be evaluated is fed back to the user.
In the embodiments, when the strokes, the components and the characters which are written irregularly do not exist in the character object to be evaluated, writing evaluation information which represents the writing specification of the character object to be evaluated is fed back to the user.
Referring to fig. 2, an application scenario of the text object evaluation method according to an embodiment of the disclosure is shown. As shown in fig. 2, the server 201 may receive an image 203 to be evaluated uploaded by a user through the terminal device 202. Here, the image to be evaluated 203 includes a character object to be evaluated 204 of a predetermined writing style. The textual object 204 to be evaluated is, for example, the textual object "all" shown in FIG. 2. Here, the literal object 204 contains a substructure 2041 and a substructure 2042. The substructure 2041 is, for example, "human" as shown in fig. 2. Substructure 2042 is, for example, a "king" as shown in fig. 2. Further, the server 201 may determine whether irregular written strokes, components, and structural spacing are present in the textual object 204 to be evaluated. In response to that the distance between the substructure 2041 and the substructure 2042 in the textual object 204 to be evaluated is smaller than the preset value, the server 201 may feed back written evaluation information representing that the distance between the substructure 2041 and the substructure 2042 is smaller to the user.
Continuing to refer to FIG. 3, a flow diagram of still further embodiments of textual object evaluation methods according to the present disclosure is shown. As shown in fig. 3, the character object evaluation method includes the steps of:
step 301, receiving an image to be evaluated uploaded by a user.
The image to be evaluated comprises a character object to be evaluated of a preset calligraphy font.
Step 301 may be performed in a similar manner as step 101 in the embodiment shown in fig. 1, and the above description for step 101 also applies to step 301, which is not described herein again.
Step 302, determining stroke difference values, radical difference values and structure spacing difference values of the character object to be evaluated and the reference character object based on the structure map of the character object to be evaluated and the reference structure map of the reference character object.
In this embodiment, an executing entity (for example, the server 504 shown in fig. 5) of the text object evaluation method may determine a stroke difference value, a radical difference value, and a structure distance difference value of the text object to be evaluated and the reference text object based on the structure map of the text object to be evaluated and the reference structure map of the reference text object.
The reference character object may be a reference for evaluating the character object to be evaluated. In practice, the reference character object and the character object to be evaluated represent the same character.
The structure map may be a map for describing a structure of the textual object to be evaluated. In practice, the structural map includes strokes, components and structural distances of the character objects to be evaluated. Accordingly, the reference structure map may be a map for describing the structure of the reference character object. In practice, the reference structure map includes strokes, components and structure distances of the reference character objects.
The stroke difference value represents the difference degree between the strokes of the character object to be evaluated and the corresponding strokes in the reference character object. In practice, the stroke difference value may include a difference value between each stroke of the text object to be evaluated and the corresponding stroke in the reference text object.
The component difference value represents the difference degree between the component of the character object to be evaluated and the component of the reference character object.
The structural distance difference value represents the difference degree between the structural distance of the character object to be evaluated and the structural distance of the reference character object. In practice, the structure distance difference value may include a structure distance of each character object to be evaluated and a structure difference value of a corresponding structure distance in the reference character object.
In some scenarios, the executive body may determine a similarity between a stroke in the structural map and a corresponding stroke in the reference structural map. Further, the execution main body may convert the determined similarity into the stroke difference value according to a preset conversion rule.
In a similar manner, the execution main body may determine the component difference value and the structure interval difference value, which is not described herein again.
And step 303, determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated according to the stroke difference value, the component difference value and the structural interval difference value.
In this embodiment, the execution main body may determine whether there are irregular strokes, components and structural intervals in the text object to be evaluated according to the stroke difference value, the component difference value and the structural interval difference value.
In some scenarios, in response to the stroke difference value being greater than or equal to a predetermined deviation threshold, the execution body may determine that the stroke writing indicated by the stroke difference value is not normal. In response to the stroke difference value being less than a preset deviation threshold, the execution subject may determine a stroke writing specification indicated by the stroke difference value. Therefore, whether irregular strokes exist in the character object to be evaluated or not can be determined.
By adopting a similar method, the execution main body can determine whether the character object to be evaluated has irregular written components and structural spacing, and details are not repeated here.
And 304, responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated is written irregularly to the user based on the irregular writing strokes, components and structure intervals.
Step 304 may be performed in a similar manner as step 103 in the embodiment shown in fig. 1, and the above description for step 103 also applies to step 304, which is not described herein again.
In this embodiment, the structure chart includes strokes, components, and structure distances of the text object to be evaluated. In the process of determining the stroke difference value, the radical difference value and the structure distance difference value of the character object to be evaluated and the reference character object, the stroke, the radical and the structure distance of the reference character object can be directly extracted from the reference structure map. Because strokes, components and structural spacing of the reference character object do not need to be extracted from the image containing the reference character object, the efficiency of determining stroke difference values, component difference values and structural spacing difference values can be improved to a certain extent. Further, the efficiency of determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated can be improved.
In some embodiments, the main body for executing the character object evaluation method may determine the stroke difference value, the radical difference value, and the structure distance difference value as follows.
Specifically, stroke difference values, radical difference values and structure space difference values of the character object to be evaluated and the reference character object are determined based on a pre-trained analysis model.
The classification model may be a machine learning model constructed by an artificial neural network. In practice, the classification model determines the stroke difference value, the radical difference value and the structural distance difference value based on the structural map and the reference structural map.
In some scenarios, the execution subject may extract strokes, components, and structural distances of the text object to be evaluated from the image to be evaluated. Further, the execution body may construct a structural map containing the extracted strokes, components and structural distances. Still further, the execution subject may input the constructed structural map into the analysis model.
In some scenarios, the analysis model may determine a similarity between the strokes in the structural map and the strokes in the reference structural map. Further, the analysis model may convert the determined similarity into the stroke difference value according to a preset conversion rule.
By using a similar method, the analysis model can determine the component difference value and the structure distance difference value, which is not described herein again.
In the embodiments, since the calculation speed of the machine learning model is high, the stroke difference value, the radical difference value and the structure distance difference value of the character object to be evaluated and the reference character object can be determined in a short time. Therefore, the evaluation of the character object to be evaluated is realized in a short time.
In some embodiments, the training samples of the analytical model include sample images and sample difference values. The sample image includes a sample textual object. The sample difference values include sample stroke difference values, sample component difference values and sample structure spacing difference values of the sample textual objects and the sample reference textual objects.
It will be appreciated that the sample reference textual object may be a reference for evaluating the sample textual object. In practice, the sample literal object and the sample reference literal object may represent the same literal.
The sample stroke difference value characterizes a degree of difference between the strokes of the sample textual object and corresponding strokes in the sample reference textual object. In practice, the sample stroke difference values may include sample stroke difference values for individual strokes of the sample textual object and corresponding strokes of the sample reference textual object.
The sample radical difference value ensures the degree of difference between the radicals of the sample textual object and the radicals of the sample reference textual object.
The sample structure spacing difference value represents the difference degree between the structure spacing of the sample literal object and the structure spacing of the sample reference literal object. In practice, the sample structure pitch difference values may include structure pitch difference values for each structure pitch of the sample textual object and the corresponding structure pitch in the sample reference textual object.
In some scenarios, an executive who trains an analytical model may train the analytical model as follows.
Step S1, selecting a training sample from the training sample set, and performing the training steps shown in steps S2 to S5 on the selected training sample.
Step S2, the sample images included in the selected training samples are input into the initial model, and the output difference value of the initial model is determined.
It will be appreciated that the output disparity value may be the disparity value output by the initial model. The output difference value includes a stroke difference value, a radical difference value and a structure distance difference value of the sample literal object and the sample reference literal object contained in the sample image.
The initial model may be a model constructed by an artificial neural network.
In some scenarios, the initial model may extract strokes, components, and structural spacings from sample textual objects contained in the sample images. Further, the initial model may construct a sample structural atlas containing the extracted strokes, components, and structural spacings. Still further, the initial model may determine a similarity between the strokes in the sample structural map and the strokes in the sample reference structural map. Further, the initial model may convert the determined similarity into the stroke difference value according to a preset conversion rule.
By adopting a similar method, the initial model can determine the component difference value and the structure distance difference value of the sample character object and the sample reference character object, which is not described herein again.
Step S3, determining a difference degree between the output difference value of the initial model and the sample difference value included in the selected training sample by using a preset loss function.
Specifically, with a loss function set in advance, the following degrees of difference are determined: the difference degree between the stroke difference value output by the initial model and the sample stroke difference value; the difference degree between the radical difference value output by the initial model and the sample radical difference value; and the difference degree between the structure interval difference value output by the initial model and the sample structure interval difference value.
Step S4, adjusting the structural parameters of the initial model according to the difference between the output difference value of the initial model and the sample difference value.
In some scenarios, the executing entity for training the analysis model may adjust the structural parameters of the initial model by using a Back Propagation (BP) algorithm, a Gradient component (GD) algorithm, or the like.
In step S5, in response to reaching the preset training end condition, the training of the initial model is ended.
Here, the training end condition may include at least one of: the training time exceeds the preset duration, the training times exceeds the preset times, and the difference degree between the output difference value of the initial model and the sample difference value is smaller than the preset difference threshold value.
In step S6, in response to the training end condition not being met, a training sample is selected from the training sample set, and the training steps shown in steps S2 to S5 are continuously performed on the selected training sample.
The execution subject of the training and analyzing model may be the same as or different from the execution subject of the character object evaluation method. When the two are the same, the executive agent who trains the analysis model may store the structural information and parameter values of the trained analysis model locally. When the two are different, the execution main body of the training analysis model may send the structure information and the parameter value of the trained analysis model to the execution main body of the character object evaluation method.
In these embodiments, when the number of training samples is large, the accuracy of the trained analysis model can be improved by training the initial model with the training samples.
In some embodiments, the structure pitch difference value comprises: and the difference value between the structural spacing of the character object to be evaluated and the structural spacing of the reference character object.
For example, the textual object "good" to be evaluated includes substructure A1 (e.g., substructure "woman") and substructure A2 (e.g., substructure "child"). And the distance between substructure a1 and substructure a2 was L1. Similarly, the reference literal object "good" includes a sub-structure B1 (e.g., sub-structure "woman") and a sub-structure B2 (e.g., sub-structure "child"). And the distance between substructure B1 and substructure B2 was L2. Accordingly, the structural pitch of the character object to be evaluated "good" is L1, and the structural pitch of the reference character object "good" is L2. The difference value of the structural spacing is a difference value between L1 and L2.
In the embodiments, the difference degree of the structural spacing between the text object to be evaluated and the reference text object is represented by the difference value between the structural spacing of the text object to be evaluated and the structural spacing of the reference text object.
In some embodiments, the structural map of the text object to be evaluated is constructed by the analysis model for the image to be evaluated.
In some scenarios, the executing body of the character object evaluation method may input the image to be evaluated into the analysis model. Further, the analysis model can extract strokes, components and structural distances from the character objects to be evaluated contained in the images to be evaluated. Still further, the analysis model may construct a structural map containing the extracted strokes, components, and structural spacings.
Because the calculation speed of the machine learning model is high, the structural map of the character object to be evaluated is constructed through the analysis model, and whether irregular strokes, components and structural intervals exist in the character object to be evaluated or not can be determined in a short time.
With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides some embodiments of a text object evaluation apparatus, which correspond to the method embodiment shown in fig. 1, and which may be specifically applied to various electronic devices.
As shown in fig. 4, the character object evaluation device of the present embodiment includes: receiving section 401, determining section 402, and first feedback section 403. The receiving unit 401 is configured to: and receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font. The determining unit 402 is configured to: and determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated. The first feedback unit 403 is configured to: responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated writes irregularly to a user based on the irregular writing strokes, the components and the structure intervals.
In this embodiment, the detailed processing of the receiving unit 401, the determining unit 402, and the first feedback unit 403 of the character object evaluation apparatus and the technical effects thereof can refer to the related descriptions of step 101, step 102, and step 103 in the corresponding embodiment of fig. 1, which are not described herein again.
In some embodiments, the determining unit 402 is further configured to: determining stroke difference values, radical difference values and structure space difference values of the character object to be evaluated and a reference character object based on a structure map of the character object to be evaluated and a reference structure map of the reference character object, wherein the reference character object and the character object to be evaluated represent the same character, and the structure map comprises strokes, radicals and the distance between two adjacent structure spaces of the character object to be evaluated; and determining whether irregular writing strokes, components and structure intervals exist in the character object to be evaluated according to the stroke difference value, the component difference value and the structure interval difference value.
In some embodiments, the determining unit 402 is further configured to: determining stroke difference values, radical difference values and structure distance difference values of the character object to be evaluated and the reference character object based on a pre-trained analysis model, wherein the classification model determines the stroke difference values, the radical difference values and the structure distance difference values based on a structure map and a reference structure map.
In some embodiments, the training sample of the analysis model includes a sample image including the sample textual object and sample difference values including a sample stroke difference value, a sample radical difference value, and a sample structure spacing difference value for the sample textual object and the sample reference textual object.
In some embodiments, the structure pitch difference value comprises: and the difference value between the structural spacing of the character object to be evaluated and the structural spacing of the reference character object.
In some embodiments, the structural map is constructed by an analytical model for the image to be evaluated.
In some embodiments, the reference structural map is selected from a predetermined set of structural maps.
In some embodiments, the first feedback unit 403 is further configured to: determining stroke evaluation information, radical evaluation information and structure interval evaluation information corresponding to irregular writing strokes, radicals and structure intervals; and feeding back writing evaluation information representing that the character object to be evaluated is written irregularly to the user based on the stroke evaluation information, the radical evaluation information and the structure interval evaluation information.
In some embodiments, the text object evaluation device may further include a second feedback unit (not shown in the figure). The second feedback unit is used for: and responding to the situation that the character object to be evaluated does not have irregular writing strokes, components and structural intervals, and feeding back writing evaluation information representing the writing specifications of the character object to be evaluated to the user.
With further reference to fig. 5, fig. 5 illustrates an exemplary system architecture to which the textual object evaluation methods of some embodiments of the present disclosure may be applied.
As shown in fig. 5, the system architecture may include terminal devices 501, 502, a network 503, and a server 504. The network 503 is the medium used to provide communication links between the terminal devices 501, 502 and the server 504. Network 503 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 501, 502 may interact with a server 504 via a network 503. Various client applications may be installed on the terminal devices 501, 502. For example, the terminal apparatuses 501 and 502 may have an image processing application, a character recognition application, and the like installed thereon. In some scenarios, the terminal devices 501, 502 may receive an image to be evaluated input by a user. The image to be evaluated comprises a character object to be evaluated of a preset calligraphy font.
The terminal devices 501 and 502 may be hardware or software. When the terminal devices 501 and 502 are hardware, they may be various electronic devices having a display screen and supporting information interaction, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal devices 501 and 502 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules, or as a single piece of software or software module. And is not particularly limited herein.
The server 504 may be a server that provides various services. In some scenarios, the server 504 may receive images to be evaluated uploaded by users via the terminal devices 501, 502. The image to be evaluated comprises a character object to be evaluated of a preset calligraphy font. Further, in response to the irregular writing strokes, components and structural spaces in the textual object to be evaluated, the server 504 may feed back, to the user, writing evaluation information that characterizes the irregular writing of the textual object to be evaluated.
The server 504 may be hardware or software. When the server 504 is hardware, it can be implemented as a distributed server cluster composed of a plurality of servers, or as a single server. When the server 504 is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the character object evaluation method provided in the embodiment of the present disclosure may be executed by the server 504, and accordingly, the character object evaluation device may be provided in the server 504.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the server of fig. 5) suitable for use in implementing some embodiments of the present disclosure is shown. The terminal device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be included in the electronic device or may exist separately without being incorporated in the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font; determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated; responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated writes irregularly to a user based on the irregular writing strokes, the components and the structure intervals.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the receiving unit may also be described as a unit that "receives an image to be evaluated uploaded by a user".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the present disclosure is not limited to the particular combination of the above-described features, but also encompasses other embodiments in which any combination of the above-described features or their equivalents is possible without departing from the scope of the present disclosure. For example, the above features may be interchanged with other features disclosed in this disclosure (but not limited to) those having similar functions.

Claims (12)

1. A character object evaluation method is characterized by comprising the following steps:
receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font;
determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated;
and responding to the fact that irregular writing strokes, components and structure intervals exist in the character object to be evaluated, and feeding back writing evaluation information representing that the character object to be evaluated writes irregularly to the user based on the irregular writing strokes, components and structure intervals.
2. The method of claim 1, wherein the determining whether irregular written strokes, radicals and structural distances exist in the text object to be evaluated comprises:
determining stroke difference values, radical difference values and structure space difference values of the character object to be evaluated and a reference character object based on the structure map of the character object to be evaluated and the reference structure map of the reference character object, wherein the reference character object and the character object to be evaluated represent the same character, and the structure map comprises the strokes, the radicals and the structure spaces of the character object to be evaluated;
and determining whether irregular writing strokes, components and structure intervals exist in the character object to be evaluated according to the stroke difference value, the component difference value and the structure interval difference value.
3. The method according to claim 2, wherein the determining stroke difference values, radical difference values and structure distance difference values of the textual object to be evaluated and the reference textual object based on the structural map of the textual object to be evaluated and the reference structural map of the reference textual object comprises:
determining stroke difference values, radical difference values and structural spacing difference values of the character object to be evaluated and the reference character object based on a pre-trained analysis model, wherein the classification model determines the stroke difference values, the radical difference values and the structural spacing difference values based on the structural map and the reference structural map.
4. The method of claim 2, wherein the training samples of the analytical model comprise sample images and sample difference values, wherein the sample images comprise sample textual objects, and wherein the sample difference values comprise sample stroke difference values, sample radical difference values, and sample inter-structure distance difference values of the sample textual objects and sample reference textual objects.
5. The method of claim 2, wherein the structure pitch difference values comprise: and the difference value between the structural spacing of the character object to be evaluated and the structural spacing of the reference character object.
6. The method according to claim 3, characterized in that the structural map is constructed by the analytical model for the image to be evaluated.
7. The method of claim 1, wherein the reference structural atlas is selected from a predetermined set of structural atlas.
8. The method according to claim 1, wherein the feeding back, to the user, writing evaluation information that characterizes the irregular writing of the text object to be evaluated based on the irregular writing strokes, the components and the structural spacing comprises:
determining stroke evaluation information, radical evaluation information and structure interval evaluation information corresponding to the irregular writing strokes, radicals and structure intervals;
and feeding back writing evaluation information representing that the character object to be evaluated is written irregularly to the user based on the stroke evaluation information, the radical evaluation information and the structure interval evaluation information.
9. The method of claim 1, further comprising:
and responding to the situation that the character object to be evaluated does not have irregular writing strokes, components and structural intervals, and feeding back writing evaluation information representing the writing specifications of the character object to be evaluated to the user.
10. A character object evaluation device is characterized by comprising:
the receiving unit is used for receiving an image to be evaluated uploaded by a user, wherein the image to be evaluated comprises a character object to be evaluated of a preset calligraphy font;
the determining unit is used for determining whether irregular writing strokes, components and structural intervals exist in the character object to be evaluated;
and the first feedback unit is used for responding to the existence of irregular writing strokes, components and structure intervals in the character object to be evaluated and feeding back the writing evaluation information representing that the character object to be evaluated writes irregularly to the user based on the irregular writing strokes, components and structure intervals.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202010637434.8A 2020-07-03 2020-07-03 Text object evaluation method and device and electronic equipment Active CN111797822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010637434.8A CN111797822B (en) 2020-07-03 2020-07-03 Text object evaluation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010637434.8A CN111797822B (en) 2020-07-03 2020-07-03 Text object evaluation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111797822A true CN111797822A (en) 2020-10-20
CN111797822B CN111797822B (en) 2024-01-23

Family

ID=72811248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010637434.8A Active CN111797822B (en) 2020-07-03 2020-07-03 Text object evaluation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111797822B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686848A (en) * 2020-12-23 2021-04-20 合肥联宝信息技术有限公司 Object detection method and device
CN112784845A (en) * 2021-01-12 2021-05-11 安徽淘云科技有限公司 Handwritten character detection method, electronic equipment and storage device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706682A (en) * 2008-08-28 2010-05-12 杨春华 Method for inputting Chinese characters by utilizing etymon stroke codes
CN110188362A (en) * 2019-06-10 2019-08-30 北京百度网讯科技有限公司 Text handling method and device
CN110555403A (en) * 2019-08-29 2019-12-10 韶关市启之信息技术有限公司 handwritten character evaluation method and system
CN111145052A (en) * 2019-12-26 2020-05-12 北京法意科技有限公司 Structured analysis method and system of judicial documents

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706682A (en) * 2008-08-28 2010-05-12 杨春华 Method for inputting Chinese characters by utilizing etymon stroke codes
CN110188362A (en) * 2019-06-10 2019-08-30 北京百度网讯科技有限公司 Text handling method and device
CN110555403A (en) * 2019-08-29 2019-12-10 韶关市启之信息技术有限公司 handwritten character evaluation method and system
CN111145052A (en) * 2019-12-26 2020-05-12 北京法意科技有限公司 Structured analysis method and system of judicial documents

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686848A (en) * 2020-12-23 2021-04-20 合肥联宝信息技术有限公司 Object detection method and device
CN112686848B (en) * 2020-12-23 2022-02-01 合肥联宝信息技术有限公司 Object detection method and device
CN112784845A (en) * 2021-01-12 2021-05-11 安徽淘云科技有限公司 Handwritten character detection method, electronic equipment and storage device

Also Published As

Publication number Publication date
CN111797822B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN109961032B (en) Method and apparatus for generating classification model
CN111680761B (en) Information feedback method and device and electronic equipment
CN111831855B (en) Method, apparatus, electronic device, and medium for matching videos
CN110826567B (en) Optical character recognition method, device, equipment and storage medium
CN112364860A (en) Training method and device of character recognition model and electronic equipment
CN112650841A (en) Information processing method and device and electronic equipment
CN113313064A (en) Character recognition method and device, readable medium and electronic equipment
CN112434620B (en) Scene text recognition method, device, equipment and computer readable medium
CN111797822B (en) Text object evaluation method and device and electronic equipment
CN114004905B (en) Method, device, equipment and storage medium for generating character style pictogram
CN114420135A (en) Attention mechanism-based voiceprint recognition method and device
CN112241761B (en) Model training method and device and electronic equipment
CN110674813B (en) Chinese character recognition method and device, computer readable medium and electronic equipment
CN110300329B (en) Video pushing method and device based on discrete features and electronic equipment
CN113191257B (en) Order of strokes detection method and device and electronic equipment
CN114004229A (en) Text recognition method and device, readable medium and electronic equipment
CN113255812A (en) Video frame detection method and device and electronic equipment
CN112308745A (en) Method and apparatus for generating information
CN110852042A (en) Character type conversion method and device
CN111026983B (en) Method, device, medium and electronic equipment for realizing hyperlink
CN111950572A (en) Method, apparatus, electronic device and computer-readable storage medium for training classifier
CN111582376B (en) Visualization method and device for neural network, electronic equipment and medium
CN113283115B (en) Image model generation method and device and electronic equipment
CN116974684B (en) Map page layout method, map page layout device, electronic equipment and computer readable medium
CN112990349B (en) Writing quality evaluation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant