Method, device and medium for evaluating written hanzi
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI ZELINXUN INFORMATION TECH CO LTD
- Filing Date
- 2023-03-23
- Publication Date
- 2026-06-23
Smart Images

Figure CN116503874B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an evaluation method, device, and medium for writing Chinese characters. Background Technology
[0002] Calligraphy is a unique traditional art form in China. To master calligraphy, one needs not only extensive practice but also an understanding of the strengths and weaknesses of one's own writing.
[0003] Currently, while Chinese character evaluation systems exist, they primarily assign a score to the written characters, failing to provide a comprehensive and objective assessment of their quality. Furthermore, existing systems evaluate handwritten characters or their components and strokes, neglecting the evaluation of radicals, character roots, and the arrangement of characters. However, radicals, character roots, and character arrangements are crucial aspects of Chinese character writing. For instance, even if each character is written well individually, inconsistent size and spacing can result in an overall messy appearance. Existing evaluation systems may still assign high scores, leading to misguided guidance and negatively impacting users' calligraphy practice.
[0004] Accordingly, a new solution is needed in this field to address the aforementioned problems. Summary of the Invention
[0005] In order to overcome the above-mentioned defects, this invention is proposed to solve or at least partially solve the technical problem of unreasonable scoring of written Chinese characters.
[0006] In the first aspect, a method for evaluating handwritten Chinese characters is provided, the method including:
[0007] Acquire images of written Chinese characters and identify each written Chinese character in the images;
[0008] Acquire standard Chinese character images and identify the standard Chinese character corresponding to each written Chinese character in the standard Chinese character images;
[0009] Based on the standard Chinese character corresponding to each written Chinese character, the composition layout score, font structure score, and font stroke score of each written Chinese character are evaluated separately, and the font score of each written Chinese character is obtained based on the composition layout score, font structure score, and font stroke score.
[0010] Based on the font score of each written Chinese character, determine and output writing evaluation information, which includes at least the font score, writing problems and their solutions.
[0011] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the method further includes evaluating the first composition layout score of the written Chinese characters through the following means:
[0012] The composition and layout features of the written Chinese characters and their corresponding standard Chinese characters are obtained respectively;
[0013] To obtain the amount of variation between the compositional layout features of written Chinese characters and their corresponding standard Chinese characters;
[0014] Based on the amount of change, assess the first chapter layout score of the written Chinese characters;
[0015] Among them, the score for the first chapter's layout is negatively correlated with the amount of change.
[0016] In one technical solution of the above-mentioned evaluation method for Chinese character writing, the method further includes obtaining the layout features of the composition through the following means:
[0017] Obtain the bounding box of the target Chinese character in the target image. The target Chinese character is a written Chinese character or a standard Chinese character, and the target image is an image of a written Chinese character or a standard Chinese character.
[0018] Based on the size of the Chinese character bounding box and / or the center of gravity and / or the tilt angle, obtain the size features and / or center of gravity features and / or tilt angle features of the target Chinese character respectively.
[0019] In one technical solution of the above-mentioned evaluation method for Chinese characters, the step of "obtaining the amount of change between the compositional layout features of the written Chinese characters and their corresponding standard Chinese characters" includes:
[0020] The relative change in dimensional features can be obtained using the following formula:
[0021] r1 represents the relative change in dimensional characteristics, B w and B h d1 represents the width and height of the bounding box corresponding to the standard Chinese character, respectively, and d2 represents the absolute change in the dimensional feature. b w and b h These represent the width and height of the bounding box corresponding to the written Chinese character, respectively, and abs represents the operator for obtaining the absolute value;
[0022] And / or, the relative change in the center of gravity feature can be obtained using the following formula.
[0023] r² represents the relative change in the centroid feature, and d² represents the absolute change in the centroid feature. c(b) represents the center of gravity of the written Chinese character, and c(B) represents the center of gravity of the standard Chinese character.
[0024] And / or,
[0025] The relative change in tilt angle is obtained in the following ways:
[0026] r3 = 2*abs(s(B)-s(b)) / π, where r3 represents the relative change in the tilt angle, π represents pi, s(B) represents the tilt angle of the standard Chinese character, and s(b) represents the tilt angle of the written Chinese character.
[0027] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the step of "evaluating the first compositional layout score of the written Chinese characters based on the amount of change" specifically includes:
[0028] Determine the range of values within which the change falls;
[0029] Obtain the first chapter layout score corresponding to the numerical range.
[0030] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the method further includes evaluating the second-chapter layout score of the written Chinese characters in the following manner:
[0031] Based on the vertex position of the bounding box corresponding to the written Chinese character in the written Chinese character image, the first bounding box feature of the written Chinese character is obtained;
[0032] Based on the vertex positions of the bounding boxes corresponding to the standard Chinese characters in the standard Chinese character image, the second bounding box features of the standard Chinese characters are obtained;
[0033] To obtain the image features of written Chinese characters in images of written Chinese characters;
[0034] The first bounding box feature, the second bounding box feature, and the image feature are concatenated to form the first concatenated feature;
[0035] A pre-set Chinese character shape scoring network is used to evaluate the second composition layout score of written Chinese characters based on the first splicing feature.
[0036] In one technical solution of the above-mentioned evaluation method for written Chinese characters, before evaluating the composition and layout score of each written Chinese character, the method further includes:
[0037] The system identifies whether a grid exists at the position of each written Chinese character in the image, with each written Chinese character corresponding to a grid and the written Chinese character located within the grid.
[0038] If so, identify the first bounding box of the grid corresponding to each written Chinese character, obtain the second bounding box of the grid corresponding to each standard Chinese character, scale the first bounding box to make the size of the first bounding box the same as that of the second bounding box, and then evaluate the composition layout score of each written Chinese character.
[0039] If not, then directly evaluate the composition and layout score of each written Chinese character.
[0040] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the method further includes evaluating the font structure score through the following means:
[0041] Identify the font structure of handwritten characters;
[0042] Based on the font structure, the bounding boxes of each radical in the written Chinese character and the corresponding radicals in the standard Chinese character are obtained. A pre-defined first font structure scoring network is used to evaluate the first font structure score of the written font based on the bounding boxes of the written Chinese character and the corresponding standard Chinese character; and / or,
[0043] Based on the font structure, the image features of each radical in the written Chinese character are obtained in the written Chinese character image. A pre-set second font structure scoring network is used to evaluate the second font structure score of each radical in the written font based on the image features of each radical.
[0044] The final font structure score is obtained based on the first font structure score and / or the second font structure score.
[0045] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the step of "obtaining the final font structure score based on the first font structure score and / or the second font structure score" specifically includes:
[0046] Determine whether a character is a single-component character based on its structure.
[0047] If so, the second font structure score will be used as the final font structure score;
[0048] If not, the average of the first font structure score and the second font structure score will be used as the final font structure score.
[0049] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the step of "using a preset first font structure scoring network and evaluating the first font structure score of the written font based on the radical boundary frame of the written Chinese character and the corresponding standard Chinese character" specifically includes: using a preset first font structure scoring network and evaluating the scores of avoidance, interpenetration, slant, shape and density of the written font based on the radical boundary frame of the written Chinese character and the corresponding standard Chinese character.
[0050] The steps of “using a preset second font structure scoring network and evaluating the second font structure score of each radical in the written font according to the image features of each radical” specifically include: using a preset second font structure scoring network and evaluating the scores of each radical’s avoidance, interweaving, slant, shape and density according to the image features of each radical.
[0051] In one technical solution of the above-mentioned evaluation method for writing Chinese characters, the method further includes obtaining a stroke score for the font through the following means:
[0052] Obtain the first pixel covered by each stroke in the standard font in the standard Chinese character image and form the first pixel image;
[0053] Identify the second pixel covered by each stroke in the written font within the image of the written Chinese character;
[0054] The handwritten font is registered with the standard font to determine the correspondence between the first pixel and the second pixel;
[0055] Based on the correspondence and according to the second pixel, a second pixel image corresponding to the first pixel image is formed, wherein the first pixel and the second pixel located at the same position in the first pixel image and the second pixel image respectively have a correspondence relationship;
[0056] A preset stroke scoring network is used to evaluate the font stroke score of each stroke in the written font based on the first pixel image and the second pixel image.
[0057] In one technical solution of the above-mentioned evaluation method for Chinese character writing, the step of "using a preset stroke scoring network and evaluating the font stroke score of each stroke in the written font based on the first pixel image and the second pixel image" specifically includes:
[0058] Using a preset stroke scoring network and based on the first pixel image and the second pixel image, the angle, curvature, length, completeness, and start and end points of each stroke in the written font are evaluated.
[0059] Get a score for each stroke based on its angle, curvature, length, completeness, and start and end points, and get the average score for all strokes based on their angle, curvature, length, completeness, and start and end points.
[0060] In one technical solution of the above-mentioned evaluation method for Chinese character writing, the method further includes determining writing problems and their solutions through a series of methods:
[0061] The written Chinese characters are sorted according to their font scores, either from smallest to largest or largest to smallest. The top or bottom written Chinese characters are selected as the problem fonts.
[0062] Based on the composition layout score, font structure score, and font stroke score of the problematic font, the writing problems of the problematic font and its solutions are determined. The solutions include at least an instructional video of the problematic font.
[0063] And / or,
[0064] The scores of each indicator are sorted in ascending or descending order of scores. The top or bottom indicators are selected as the problem indicators. The indicators are the layout, font structure, or font strokes.
[0065] Identify writing problems and their solutions based on problem indicators. The solutions should include at least instructional videos on the problem indicators.
[0066] In one technical solution of the above-mentioned method for evaluating Chinese character writing, the method further includes determining and outputting writing evaluation information through the following means:
[0067] Obtain the average font score for each written Chinese character in the image of the written Chinese characters;
[0068] Based on the average value, obtain the writing ranking of users who provided images of written Chinese characters within a preset user range;
[0069] Based on the writing ranking, determine and output writing evaluation information.
[0070] In a second aspect, a computer device is provided, comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to perform the evaluation method for writing Chinese characters as described in any of the above-described technical solutions.
[0071] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, the program codes being adapted to be loaded and run by a processor to perform the evaluation method for writing Chinese characters as described in any of the above-described technical solutions.
[0072] The above-described technical solutions of the present invention have at least one or more of the following beneficial effects:
[0073] In implementing the technical solution of this invention, the first step is to obtain the written Chinese characters and their corresponding standard characters from the image of the written Chinese characters. Then, based on the written Chinese characters and the standard characters, multi-angle font scores are obtained for the written Chinese characters in terms of composition layout, font structure, and font strokes. After obtaining the multi-angle font scores, writing evaluation information can be accurately output based on the font scores, avoiding the distortion of writing evaluation information caused by considering only a single angle of scoring. Users can more accurately understand the strengths and weaknesses of their own writing, preventing them from losing motivation and becoming mentally exhausted during long-term practice because they don't know where they need to improve. After understanding their own shortcomings in writing, users can conduct targeted writing training based on the solutions output by the system, quickly improving their writing level. Attached Figure Description
[0074] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:
[0075] Figure 1 This is a schematic flowchart of the main steps of an evaluation method for writing Chinese characters according to an embodiment of the present invention;
[0076] Figure 2 This is a flowchart illustrating the main steps of a method for determining writing problems and their solutions according to an embodiment of the present invention;
[0077] Figure 3 This is a schematic diagram of the main structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0078] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0079] In the description of the present invention, a "processor" may include hardware, software, or a combination of both. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing capabilities. The processor may be implemented in software, in hardware, or in a combination of both. A non-transitory computer-readable storage medium includes any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memories, read-only memories, random access memories, and the like. The term "A and / or B" represents all possible combinations of A and B, such as only A, only B, or A and B. The terms "first", "second", etc. are used to distinguish similar objects and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here.
[0080] First, the terms related to the present invention will be explained.
[0081] Avoidance refers to shrinking or shifting a certain part of a character to deliberately leave space for another part, so as to make the overall glyph layout reasonable. Interpenetration means that in a character, a part of the strokes enters the range of another part and is inserted into the gaps of that part. Positive and oblique refer to writing differently according to the obliqueness of the glyph. For example, for the character "朋", the glyph is required to be oblique, while for the character "黨", the glyph is required to be upright. Density refers to the density in the writing layout and the density in the structure.
[0082] First, refer to the attached Figure 1 , Figure 1 is a schematic diagram of the main step flow of a method for evaluating the writing of Chinese characters according to an embodiment of the present invention. As Figure 1 shown, the method for evaluating the writing of Chinese characters in the embodiments of the present invention mainly includes the following steps S101 to step S104.
[0083] Step S101: Obtain a written Chinese character image and recognize each written Chinese character in the written Chinese character image.
[0084] The acquisition of the written Chinese character image can be obtained by using an image acquisition device or uploaded by the user himself, or other methods can be used to obtain the written Chinese character image. The present invention does not limit the specific method for obtaining the written Chinese character image. If the image obtained by the image acquisition device or the image uploaded by the user himself is an image including other images besides the written Chinese character image, then the position recognition and image segmentation of the written Chinese character image in the image need to be performed, and then the written Chinese character image is obtained. Among them, the position recognition of the written Chinese character image can adopt neural networks such as YOLO, SSD, etc. The present invention does not limit the type and structure of the neural network adopted in the embodiments.
[0085] After acquiring the image of the written Chinese characters, traditional OCR can be used to recognize the characters in the image, or a neural network can be used for recognition. For example, a ResNet50 neural network or a Transformer neural network can be used. This invention does not limit the type or specific structure of the network used for written Chinese character recognition. After recognizing the written Chinese characters, the standard Chinese character corresponding to each written character can be determined.
[0086] Step S102: Obtain standard Chinese character images and identify the standard Chinese characters corresponding to each written Chinese character in the standard Chinese character images.
[0087] The acquisition and recognition of standard Chinese character images are similar to the acquisition and recognition of written Chinese character images in step S101 above, and will not be repeated here.
[0088] Step S103: Based on the standard Chinese character corresponding to each written Chinese character, evaluate the composition layout score, font structure score, and font stroke score of each written Chinese character respectively, and obtain the font score of each written Chinese character based on the composition layout score, font structure score, and font stroke score.
[0089] After determining the standard Chinese character corresponding to the written Chinese character, the similarity between the written Chinese character and the standard Chinese character can be obtained. The more similar the written Chinese character is to the standard Chinese character, the higher the font score of the written Chinese character. The composition layout score, font structure score, and font stroke score are the standards for scoring the font of the written Chinese character. Those skilled in the art can add or remove the types of the above font scoring standards according to actual needs. After obtaining the scores for the composition layout score, font structure score, and font stroke score, the font score of each written Chinese character can be determined by averaging or calculating the average score according to weights. Those skilled in the art can determine the method of font scoring for each written Chinese character according to actual needs; this embodiment of the invention does not limit this method.
[0090] Step S104: Based on the font score of each written Chinese character, determine and output the writing evaluation information, which includes at least the font score, writing problems and their solutions.
[0091] Writing problems refer to deficiencies in the writing of Chinese characters as determined by the font score. For example, if the score for the composition and layout of the written Chinese characters is low, it means that there are deficiencies in the composition and layout of the written Chinese characters, so solutions can be provided to the user to improve the composition and layout of the written Chinese characters.
[0092] Based on the methods described in steps S101 to S104 above, the system first obtains the written Chinese characters and their corresponding standard characters from the image of the written Chinese characters. Then, it obtains multi-angle font scores for the written Chinese characters based on the written Chinese characters and the standard characters, including scores for composition layout, font structure, and font strokes. After obtaining the multi-angle font scores, the system can accurately output writing evaluation information, avoiding the distortion of writing evaluation information caused by considering only a single angle of scoring. This allows users to more accurately understand the strengths and weaknesses of their own handwriting, preventing them from losing motivation and becoming mentally exhausted during long-term practice because they are unaware of areas for improvement. After understanding their shortcomings in handwriting, users can conduct targeted writing training based on the solutions output by the system, quickly improving their handwriting level.
[0093] The following sections will further explain the methods for obtaining the composition layout score, font structure score, and font stroke score in step S103.
[0094] I. Methods for Obtaining the Composition and Layout Score
[0095] The more closely the user writes Chinese characters, the more standard the user's writing is considered, and the higher the score should be.
[0096] In one possible implementation of an embodiment of the present invention, the first compositional layout score of the written Chinese characters is further evaluated through the following steps 11 to 13:
[0097] Step 11: Obtain the composition and layout features of the written Chinese characters and their corresponding standard Chinese characters.
[0098] The composition and layout refers to the indicators for evaluating Chinese characters as a whole. To obtain the composition and layout characteristics of Chinese characters, it is necessary to start from the size, center of gravity, uprightness, slant, and shape of the characters and comprehensively determine the final composition and layout characteristics.
[0099] Step 12: Obtain the amount of variation between the compositional layout features of the written Chinese characters and their corresponding standard Chinese characters.
[0100] The amount of variation between the composition and layout features of the written Chinese characters and their corresponding standard Chinese characters represents the degree of difference between the user's written characters and the standard Chinese characters. The greater the variation, the greater the potential for improvement in the composition and layout of the user's written Chinese characters.
[0101] Step 13: Evaluate the first composition layout score of the written Chinese characters based on the amount of change. The first composition layout score is negatively correlated with the amount of change.
[0102] The greater the change, the greater the potential for improvement in the layout of the user's Chinese characters, and the lower the user's initial layout score for writing Chinese characters.
[0103] Through steps 11 to 13 above, we can start from the size, center of gravity, slant, and shape of Chinese characters, and compare the changes in the composition and layout features of the written Chinese characters and their corresponding standard Chinese characters. This enables a quantitative score of the user's written Chinese characters from the perspective of composition and layout, making the score more objective and accurate.
[0104] In one possible implementation of an embodiment of the present invention, the step of obtaining the layout features specifically includes the following steps 21 to 22:
[0105] Step 21: Obtain the bounding box of the target Chinese character in the target image. The target Chinese character is a written Chinese character or a standard Chinese character, and the target image is an image of a written Chinese character or a standard Chinese character.
[0106] The bounding box of a target Chinese character in a target image refers to the smallest rectangle that covers all the strokes of the target Chinese character. This bounding box can be obtained using a neural network. For example, the UNet network can be used. Through neural network recognition, the coordinates of the four corners of the rectangle covering all the strokes of the target Chinese character can be determined, and the bounding box can be determined based on these coordinates. Of course, other neural networks used for image segmentation, such as SegNet and FCN, can also be used; this embodiment of the invention is not limited to any particular method. Alternatively, traditional image segmentation methods such as texture segmentation and thresholding can also be used to obtain the bounding box of the target Chinese character in the target image. Again, this embodiment of the invention does not specifically limit the method for obtaining the bounding box of the target Chinese character in the target image.
[0107] Step 22: Based on the size of the Chinese character bounding box and / or the center of gravity and / or the tilt angle, obtain the size features and / or center of gravity features and / or tilt angle features of the target Chinese character respectively.
[0108] Since the bounding box of a Chinese character refers to the smallest rectangular box that can cover all the strokes of the target Chinese character, the size and center of gravity of the target Chinese character can be determined based on the size and center of gravity of the bounding box, and the tilt angle of the Chinese character can be determined based on the tilt angle of the edge of the bounding box.
[0109] Through steps 21 to 22 above, the target Chinese character is surrounded by a Chinese character bounding box, and then the size features, center of gravity features, and tilt angle features of the target Chinese character are converted into the size, center of gravity, and tilt angle of the Chinese character bounding box, so that the composition layout features of the target Chinese character can be obtained more easily and quickly.
[0110] In one possible implementation of an embodiment of the present invention, the step of "obtaining the amount of change between the compositional layout features of the written Chinese characters and their corresponding standard Chinese characters (the aforementioned step 12)" includes:
[0111] The relative change in dimensional features can be obtained using the following formula:
[0112] r1 represents the relative change in dimensional characteristics, B w and B h d1 represents the width and height of the bounding box corresponding to the standard Chinese character, respectively, and d2 represents the absolute change in the dimensional feature. b w and b h These represent the width and height of the bounding box corresponding to the written Chinese character, respectively, and abs represents the operator for obtaining the absolute value.
[0113] In one possible implementation of an embodiment of the present invention, the step of "obtaining the amount of change between the compositional layout features of the written Chinese characters and their corresponding standard Chinese characters (the aforementioned step 12)" includes:
[0114] The relative change in the center of gravity feature is obtained using the following formula:
[0115] r² represents the relative change in the centroid feature, and d² represents the absolute change in the centroid feature. c(b) represents the center of gravity of the written Chinese character, and c(B) represents the center of gravity of the standard Chinese character.
[0116] As an example, the center of gravity of the target Chinese character can be calculated using the following formula:
[0117] c(b)=(b 1 +b 2 +b 3 +b 4 ) / 4, c(b) represents the center of gravity of the target Chinese character, b 1 b represents the coordinates of the top-left corner of the bounding box corresponding to the target Chinese character. 2 b represents the coordinates of the bottom left corner of the bounding box corresponding to the target Chinese character. 3 b represents the coordinates of the top right corner of the bounding box corresponding to the target Chinese character. 4 This represents the coordinates of the bottom right corner of the bounding box corresponding to the target Chinese character.
[0118] In one possible implementation of an embodiment of the present invention, the step of "obtaining the amount of change between the compositional layout features of the written Chinese characters and their corresponding standard Chinese characters (the aforementioned step 12)" includes:
[0119] The relative change in tilt angle is obtained in the following ways:
[0120] r3 = 2*abs(s(B)-s(b)) / π, where r3 represents the relative change in the tilt angle, π represents pi, s(B) represents the tilt angle of the standard Chinese character, and s(b) represents the tilt angle of the written Chinese character.
[0121] As an example, the tilt angle of the target Chinese character can be obtained using the following formula:
[0122] s(B)=0.5*(a(B 1 B 3 )+a(B 2 B 4 ))
[0123] Among them, B 1 B represents the coordinates of the top-left corner of the bounding box corresponding to the target Chinese character. 2 B represents the coordinates of the bottom left corner of the bounding box corresponding to the target Chinese character. 3 B represents the coordinates of the top right corner of the bounding box corresponding to the target Chinese character. 4 This represents the coordinates of the bottom right corner of the bounding box corresponding to the target Chinese character. The function a(p,q) = arctanx((p...) x -q x ) / (p y -q y arctanx represents the arctangent function, where p and q are formal parameters representing any two points, p x This represents the x-coordinate of point p. y q represents the y-coordinate of point P. x Let q represent the x-coordinate of point q. y This represents the y-coordinate of point q.
[0124] After obtaining the variation in the composition and layout characteristics between the written Chinese characters and their corresponding standard Chinese characters, a score can be assigned to the written Chinese characters in order to give users an intuitive understanding of their writing level.
[0125] In one possible implementation of an embodiment of the present invention, the step of "evaluating the first compositional layout score of the written Chinese characters based on the amount of change (the aforementioned step 13)" specifically includes:
[0126] Determine the range of values within which the change falls.
[0127] Different changes should correspond to different numerical ranges. The number of numerical ranges and the method of division can be set by those skilled in the art according to actual needs. This embodiment of the invention does not limit the method of dividing numerical ranges.
[0128] Obtain the first chapter layout score corresponding to the numerical range.
[0129] Different numerical ranges should correspond to different first chapter layout scores. The larger the value within the numerical range, the lower the first chapter layout score.
[0130] By dividing the amount of change into different numerical intervals and setting a corresponding first composition layout score for each numerical interval, after obtaining the amount of change between the composition layout characteristics of the written Chinese characters and their corresponding standard Chinese characters, a score for the written Chinese characters can be obtained, so that users can intuitively and quickly understand the composition layout of their own written Chinese characters.
[0131] The first chapter layout score is mainly determined by obtaining the size characteristics and / or center of gravity characteristics and / or tilt angle characteristics of the target Chinese character, while the evaluation of the layout of written Chinese characters also includes the evaluation of the shape of the written Chinese characters.
[0132] In one possible implementation of an embodiment of the present invention, the steps for evaluating the second chapter layout score of written Chinese characters mainly include the following steps 31 to 35:
[0133] Step 31: Obtain the first bounding box feature of the written Chinese character based on the vertex position of the bounding box corresponding to the written Chinese character in the written Chinese character image.
[0134] Step 32: Obtain the second bounding box features of the labeled Chinese characters based on the vertex positions of the bounding boxes of the corresponding Chinese characters in the standard Chinese character image.
[0135] Step 33: Obtain the image features of the written Chinese characters in the image of the written Chinese characters.
[0136] Image features of written Chinese characters in images of written Chinese characters can be obtained using ResNet50 or other classification neural networks.
[0137] Step 34: Perform feature concatenation on the first bounding box feature, the second bounding box feature, and the image feature to form the first concatenated feature.
[0138] Step 35: Using a pre-set Chinese character shape scoring network and based on the first splicing feature, evaluate the second composition layout score of the written Chinese characters.
[0139] The preset Chinese character shape scoring network can use a multilayer perceptron (MLP). The number of hidden layer neurons in the MLP can be adjusted according to the splicing features. Of course, other neural networks can also be used for Chinese character shape scoring. This invention does not limit the type of preset Chinese character shape scoring network.
[0140] Using the methods described in steps 31 to 35 above, the image features of the written Chinese characters and the image features of standard Chinese characters can be spliced together. Then, the spliced features are input into a preset Chinese character shape scoring network to obtain a second compositional layout score for the written Chinese characters. By obtaining the compositional layout score of the written Chinese characters using the image features of both the written and standard characters, the quality of the compositional layout from a shape perspective can be determined, facilitating users to train and improve their writing based on the compositional layout score.
[0141] In the early stages of calligraphy practice, users typically practice within a grid, which consists of squares. Each Chinese character can only be written within one square, thus helping to practice the standardization of letter or character size, shape, and spacing. If a user practices calligraphy within a grid, the grid corresponding to their written character can be scaled to the same size as the grid corresponding to a standard Chinese character before scoring the composition and layout of the written character.
[0142] In one possible implementation of an embodiment of the present invention, before evaluating the compositional layout score of each written Chinese character, the following steps 41 to 43 are further included:
[0143] Step 41: Identify whether there is a grid at the position of each written Chinese character in the image, with each written Chinese character corresponding to each grid and the written Chinese character located within the grid.
[0144] The YOLO neural network can be used to identify whether a written Chinese character is within a grid. The presence of a grid in a written Chinese character means that the written Chinese character is completely within the grid and no strokes exceed the grid's boundaries.
[0145] Step 42: If yes, identify the first bounding box of the grid corresponding to each written Chinese character, obtain the second bounding box of the grid corresponding to each standard Chinese character, scale the first bounding box so that the size of the first bounding box and the second bounding box are the same, and then evaluate the composition layout score of each written Chinese character.
[0146] The purpose of scaling the first bounding box to make it the same size as the second bounding box is to facilitate the comparison of the changes between standard Chinese characters and written Chinese characters when the bounding box sizes are the same.
[0147] Step 43: If not, directly evaluate the composition and layout score of each written Chinese character.
[0148] If there is no corresponding grid for the written Chinese character or if the strokes of the written Chinese character exceed the range of the grid, it is impossible to unify the written Chinese character with the standard Chinese character by adjusting the size of the bounding box. Therefore, the composition and layout score of each written Chinese character can be directly evaluated.
[0149] Through steps 41 to 43 above, when there is a grid in the writing position of Chinese characters, the size of the writing Chinese characters can be adjusted to make the writing Chinese characters the same size as the standard Chinese characters, thereby facilitating the scoring of the writing Chinese characters.
[0150] The above are the steps for obtaining the composition and layout score of written Chinese characters. The following explains the steps for obtaining the font structure of written Chinese characters.
[0151] II. Methods for Obtaining Font Structure Scores
[0152] In one possible implementation of an embodiment of the present invention, the method further includes evaluating the font structure score through the following steps 51 to 52:
[0153] Step 51: Identify the font structure of the written Chinese characters.
[0154] The font structure of written Chinese characters includes single-component characters, left-right structures, left-middle-right structures, top-bottom structures, top-middle-bottom structures, enclosed structures, and compound structures. The recognition of these font structures can employ a YOLO neural network or other neural networks, such as the SSD network. This embodiment of the invention does not limit the network used for recognizing the font structure of written Chinese characters.
[0155] Step 52: Based on the font structure, obtain the radical bounding box corresponding to each radical in the written Chinese character in the written Chinese character image and the radical bounding box corresponding to each radical in the corresponding standard Chinese character in the standard Chinese character image. Use the preset first font structure scoring network and evaluate the first font structure score of the written font based on the radical bounding boxes of the written Chinese character and the corresponding standard Chinese character.
[0156] Taking the Chinese character "tree" with a left-middle-right structure as an example, three radical bounding boxes are needed to enclose the left radical "wood", the middle "you", and the right "cun" respectively. If the written Chinese character is of a composite structure, the written Chinese character is regarded as one of the closest left-right structure, left-middle-right structure, up-down structure, and up-middle-down structure. If a Chinese character has only two radicals, the content of the unused radical bounding box can be set to blank. The first font structure scoring network can adopt a multi-layer perceptron. As an example, the number of radical bounding boxes is 3, and each radical bounding box has four corner points. According to the coordinates of all 12 corner points, the structural feature vector of the target Chinese character can be obtained. Through the above method, the structural feature vectors of the written Chinese character and the standard Chinese character can be obtained respectively, and then the structural feature vectors of the written Chinese character and the standard Chinese character are concatenated and input into the first font structure scoring network, and the first font structure score output by the first font structure scoring network can be obtained.
[0157] Through the above steps 51 to 52, first identify the font structure of the Chinese character, then use radical bounding boxes to enclose the radicals of the Chinese character according to the font structure of the Chinese character. The structural feature vector of the written Chinese character can be obtained through the coordinates of the radical bounding boxes, and then the structural feature vector of the Chinese character is input into the first font structure scoring network, and the structural score of the written Chinese character can be accurately obtained. By using radical bounding boxes to assist in obtaining the structural score of the written Chinese character, the structural score of the written Chinese character can be obtained more simply and accurately, enabling users to conveniently understand whether the structure of their written Chinese characters needs to be improved.
[0158] In a possible implementation manner according to an embodiment of the present invention, the step of "adopting a preset first font structure scoring network and evaluating the first font structure score of the written font according to the radical bounding boxes of the written Chinese character and the corresponding standard Chinese character (the aforementioned step 52)" specifically includes: adopting a preset first font structure scoring network and respectively evaluating the scores of avoidance, interpenetration, positive and oblique, shape, and density corresponding to the written font according to the radical bounding boxes of the written Chinese character and the corresponding standard Chinese character.
[0159] When obtaining the scores of avoidance, interpenetration, positive and oblique, shape, and density corresponding to the written font, the output layer of the first font structure scoring network can be set to 5, and the 5 outputs of the output layer respectively correspond to the scores of avoidance, interpenetration, positive and oblique, shape, and density.
[0160] In a possible implementation manner according to an embodiment of the present invention, the method further includes evaluating the font structure score through the following methods of steps 61 to 62:
[0161] Step 61: Obtain the image features of the written Chinese character in the written Chinese character image, and adopt a preset second font structure scoring network and evaluate the second font structure score of the written font according to the image features.
[0162] The second font structure scoring network can be ResNet50 or other classification neural networks, and the radicals or single-component characters and their scores can be used as the training set to train the second font structure scoring network.
[0163] Step 62: Obtain the final font structure score based on the first font structure score and / or the second font structure score.
[0164] After obtaining the first font structure score and / or the second font structure score, those skilled in the art can determine the rules for determining the second font structure score according to actual needs, such as using only the first font structure score, using only the second font structure score, or obtaining the average score of the first font structure score and the second font structure score as the final font structure score.
[0165] By using the methods in steps 61 to 62 above, the image of the written Chinese character is input into the second font structure scoring network, and a score for the second font structure of the written Chinese character can be obtained. Since the second font structure scoring network can directly score the font structure based on the image of the written Chinese character without dividing the font into radicals, a font structure score for a single radical or a single character can be obtained.
[0166] In one possible implementation of an embodiment of the present invention, the step of “using a preset second font structure scoring network and evaluating the second font structure score of the written font based on image features (the aforementioned step 61)” specifically includes: using a preset second font structure scoring network and evaluating the scores of avoidance, interpenetration, slant, shape and density of the written font based on image features.
[0167] The output layer of the classification neural network used in the second font structure scoring network also needs to be set to 5. The five outputs of the output layer correspond to the scores for avoidance, interpenetration, slant, shape, and density, respectively.
[0168] If the Chinese characters are written as single-component characters, they cannot obtain the first font structure score because they do not have radicals.
[0169] In one possible implementation of an embodiment of the present invention, the step of "obtaining the final font structure score based on the first font structure score and / or the second font structure score (the aforementioned step 62)" specifically includes steps 71 to 73:
[0170] Step 71: Determine whether the written character is a single-component character based on its structure.
[0171] The method and steps for determining whether the written character is a single-component character are the same as those in step 51 above, and will not be repeated here.
[0172] Step 72: If so, the second font structure score is used as the final font structure score.
[0173] Since single-component characters do not have radicals, they cannot obtain the first font structure score. In this case, the second font structure score needs to be used as the final font structure score for the single-component character.
[0174] Step 73: If not, then take the average of the first font structure score and the second font structure score as the final font structure score.
[0175] Through steps 71 to 73 above, when writing Chinese characters as single-component characters, the second font structure score is used as the final font structure score, so that the font structure score can be obtained for single-component characters without obtaining the radical, thereby improving the method for determining the font structure score.
[0176] The above explains the methods and steps for obtaining the font structure score of written Chinese characters. The following explains the methods and steps for obtaining the stroke score of written Chinese characters.
[0177] III. Methods for Obtaining Font Stroke Scores
[0178] In one possible implementation of an embodiment of the present invention, the method further includes obtaining a font stroke score through the following steps 81 to 85:
[0179] Step 81: Obtain the first pixel covered by each stroke in the standard font in the labeled Chinese character image and form the first pixel image.
[0180] The first pixel covered by each stroke in the standard font in the labeled Chinese character image can be obtained using the Unet neural network. In this step, the Unet neural network uses the Chinese character image and the pixels it covers as the training set.
[0181] Step 82: Identify the second pixel covered by each stroke in the written font in the image of the written Chinese character.
[0182] The method for recognizing the strokes of handwritten characters is the same as the method for recognizing the strokes of standard characters in step 81 above, and will not be repeated here.
[0183] Step 83: Register the written font with the standard font to determine the correspondence between the first pixel and the second pixel.
[0184] The method for registering a handwritten font with a standard font can employ the Demons algorithm, or other non-rigid registration methods. This type of registration method performs non-rigid registration between the handwritten font and its corresponding standard font. After registration, the correspondence between each pixel of the handwritten font and the standard font can be obtained.
[0185] Step 84: Based on the correspondence and according to the second pixel, form a second pixel image corresponding to the first pixel image, wherein the first pixel and the second pixel located at the same position in the first pixel image and the second pixel image respectively have a correspondence.
[0186] After obtaining the number of pixels covered by each stroke in the written font in the image of the written Chinese character, the number of pixels for each stroke in the standard font can be determined based on the correspondence.
[0187] Step 85: Using a preset stroke scoring network and based on the first pixel image and the second pixel image, evaluate the stroke score of the written font.
[0188] The preset stroke scoring network can use a ResNet50 classification neural network, or other classification neural networks. The training set can consist of standard font pixel images, handwritten font pixel images, and scores. When evaluating the stroke scores of the handwritten font, the first pixel image and the second pixel image can be concatenated and input into the preset stroke scoring network to obtain the stroke scores of the handwritten font.
[0189] By using steps 81 to 85 above, the written font is registered with a standard font to determine the correspondence between the stroke pixels of the written font and the stroke pixels of the standard font. Since the stroke composition of the standard font is known, the stroke pixels of the written font can be accurately obtained based on the correspondence. The stroke pixels of the written font are then input into a preset stroke scoring network to obtain a stroke score for the written font. Compared to using neural networks to recognize the strokes of a written font, the method used in this embodiment is faster and more accurate.
[0190] In one possible implementation of an embodiment of the present invention, the step of "evaluating the stroke score of the handwritten font using a preset stroke scoring network and based on the first pixel image and the second pixel image (the aforementioned step 85)" specifically includes the following steps 91 to 92:
[0191] Step 91: Using a preset stroke scoring network and based on the first pixel image and the second pixel image, evaluate the angle, curvature, length, completeness, and start and end points of the written font respectively;
[0192] To evaluate the angle, curvature, length, completeness, and start and end points of the written font, the final classification layer of the preset stroke scoring network can be set to have 5 outputs, corresponding to the angle, curvature, length, completeness, and start and end points of the written font.
[0193] Step 92: Obtain the average score of angle, curvature, length, completeness, and start and end points, and use the average score as the final font stroke score.
[0194] Through steps 91 to 92 above, the strokes of the user's handwriting can be scored from multiple angles, thus obtaining a more complete and objective score for the strokes of the user's handwriting.
[0195] After receiving a rating for their handwriting, users may not accurately recognize their shortcomings and areas for improvement. Therefore, to help users improve their calligraphy skills, we can provide them with information on problems in their calligraphy and corresponding solutions.
[0196] See appendix Figure 2 , Figure 2 This is a schematic flowchart illustrating the main steps of a method for determining a writing problem and its solution according to an embodiment of the present invention. The method for determining a writing problem and its solution in this embodiment of the present invention further includes the following steps S201 to S202:
[0197] Step S201: Sort the written Chinese characters according to the font score from smallest to largest or from largest to smallest, and select the written Chinese characters at the top or bottom as the problem fonts.
[0198] The lower the font score of a user's handwriting of Chinese characters, the greater the shortcomings in that character and the more improvement and practice are needed.
[0199] Step S202: Based on the composition layout score, font structure score, and font stroke score of the problematic font, determine the writing problems of the problematic font and its solutions. The solutions should include at least an instructional video for the problematic font.
[0200] After identifying the most problematic Chinese characters in handwriting, the system can find the lowest score among the three categories: layout score, character structure score, and stroke score. This identifies the writing issues of the problematic character and the corresponding solutions. For example, if a user's handwriting score for a particular character is the lowest in the character structure score, a tutorial video on the character's structure will be provided.
[0201] Through the above steps S201 to S202, users can identify the Chinese characters with the most problems in their writing and obtain tutorials for those characters. This allows users to practice the characters with the most problems in a targeted manner during writing practice, thereby quickly improving their writing skills.
[0202] In one possible implementation of an embodiment of the present invention, the method further includes determining the writing problem and its solution through the following steps 101 to 102:
[0203] Step 101: Sort the scores of each indicator in ascending or descending order of scores, and select the top or bottom indicators as the problem indicators. The indicators are the layout, font structure, or font strokes.
[0204] When evaluating each written Chinese character, a score is obtained for its composition, structure, or strokes. By averaging the scores of all written Chinese characters in each category, the user's most deficient aspects in composition, structure, or strokes can be identified.
[0205] Step 102: Determine the writing problem and its solution based on the problem indicators. The solution should include at least an instructional video for the problem indicators.
[0206] Through steps 101 to 102 above, users can clearly understand the overall shortcomings of their calligraphy, and thus make targeted adjustments and training, greatly improving learning efficiency.
[0207] After identifying the one or more problem indicators that received the lowest scores in a user's Chinese character writing, corresponding solutions can be output based on these indicators. For example, if a user received the lowest score in the composition and layout section, then instructional videos on composition and layout can be provided to the user.
[0208] In one possible implementation of an embodiment of the present invention, the method further includes determining and outputting writing evaluation information through the following steps 111 to 113:
[0209] Step 111: Obtain the average font score of each written Chinese character in the image of the written Chinese characters.
[0210] Step 112: Based on the average value, obtain the writing ranking of users who provided images of Chinese characters within a preset user range.
[0211] The preset user range can be all users in the current user's region, or all users of the same age as the current user. The handwriting ranking can be a specific ranking based on the user's handwriting style. For example, if a user scores 10th out of 100 people, then the user's handwriting ranking is 10th.
[0212] Step 113: Based on the writing ranking, determine and output the writing evaluation information.
[0213] Writing evaluation information can include the percentage of users whose writing scores exceed those of their peers or their region. For example, if a user scores 10th out of 100 users of the same age and 1st out of 100 users in the same region, then the writing evaluation information could be: the user outperformed 100% of people in their region and 90% of their peers.
[0214] Through steps 111 to 113 above, users can accurately understand their own writing level compared to their peers in the same region, thereby motivating them to practice writing more actively and improve their writing skills.
[0215] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not necessarily have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders, and these variations are all within the scope of protection of the present invention.
[0216] Those skilled in the art will understand that all or part of the processes in the method of the above embodiment of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0217] See appendix Figure 3 , Figure 3 This is a schematic diagram of the main structure of a computer device according to an embodiment of the present invention. Figure 3 As shown, the computer device in this embodiment of the invention mainly includes a storage device 31 and a processor 32. The storage device 31 can be configured to store a program for executing the evaluation method of writing Chinese characters in the above-described method embodiments. The processor 32 can be configured to execute the program in the storage device, which includes, but is not limited to, the program for executing the evaluation method of writing Chinese characters in the above-described method embodiments. For ease of explanation, only the parts related to the embodiments of the present invention are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of the present invention.
[0218] In embodiments of the present invention, the computer device may be a control device comprising various electronic devices. In some possible implementations, the computer device may include multiple storage devices 31 and multiple processors 32. The program executing the method for evaluating the written Chinese characters described in the above method embodiments may be divided into multiple subroutines, each subroutine being loaded and run by a processor to execute different steps of the method for evaluating the written Chinese characters described in the above method embodiments. Specifically, each subroutine may be stored in different storage devices 31, and each processor 32 may be configured to execute programs in one or more storage devices 31 to jointly implement the method for evaluating the written Chinese characters described in the above method embodiments, that is, each processor 32 executes different steps of the method for evaluating the written Chinese characters described in the above method embodiments to jointly implement the method for evaluating the written Chinese characters described in the above method embodiments.
[0219] The aforementioned multiple processors 32 can be processors deployed on the same device. For example, the aforementioned computer device can be a high-performance device composed of multiple processors, and the aforementioned multiple processors 32 can be processors configured on that high-performance device. Alternatively, the aforementioned multiple processors 32 can also be processors deployed on different devices. For example, the aforementioned computer device can be a server cluster, and the aforementioned multiple processors 32 can be processors on different servers within the server cluster.
[0220] Furthermore, the present invention also provides a computer-readable storage medium.
[0221] In one embodiment of the computer-readable storage medium according to the present invention, the computer-readable storage medium may be configured to store a program for performing the evaluation method for writing Chinese characters as described in the above-described method embodiments. This program may be loaded and run by a processor to implement the evaluation method for writing Chinese characters. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The computer-readable storage medium may be a storage device comprising various electronic devices. Optionally, in the embodiments of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.
[0222] The technical solution of the present invention has been described above with reference to one embodiment shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions resulting from such changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A method of evaluating written Chinese characters, characterized by, The method includes: Acquire images of written Chinese characters and identify each written Chinese character in the images; Acquire standard Chinese character images and identify the standard Chinese character corresponding to each written Chinese character in the standard Chinese character images; Based on the standard Chinese character corresponding to each written Chinese character, the composition layout score, font structure score, and font stroke score of each written Chinese character are evaluated separately, and the font score of each written Chinese character is obtained based on the composition layout score, font structure score, and font stroke score. Based on the font score of each written Chinese character, writing evaluation information is determined and output. The writing evaluation information includes at least the font score, writing problems and their solutions. in, The scoring of the composition layout includes the first composition layout score and the second composition layout score; The first composition layout score is obtained by: acquiring the composition layout features of the written Chinese characters and their corresponding standard Chinese characters; acquiring the amount of change between the composition layout features of the written Chinese characters and their corresponding standard Chinese characters; evaluating the first composition layout score of the written Chinese characters based on the amount of change; the first composition layout score is negatively correlated with the amount of change. The second composition layout score is obtained as follows: First bounding box features of the written Chinese character are obtained based on the vertex positions of the bounding boxes corresponding to the written Chinese character in the written Chinese character image; second bounding box features of the standard Chinese character are obtained based on the vertex positions of the bounding boxes corresponding to the standard Chinese character in the standard Chinese character image; image features of the written Chinese character in the written Chinese character image are obtained; the first bounding box features, the second bounding box features, and the image features are concatenated to form a first concatenated feature; a preset Chinese character shape scoring network is used, and the second composition layout score of the written Chinese character is evaluated based on the first concatenated feature.
2. The evaluation method of Chinese characters for writing according to claim 1, characterized by, The method also includes obtaining layout features through the following methods: Obtain the bounding box of the target Chinese character in the target image. The target Chinese character is a written Chinese character or a standard Chinese character, and the target image is an image of a written Chinese character or a standard Chinese character. Based on the size of the Chinese character bounding box and / or the center of gravity and / or the tilt angle, obtain the size features and / or center of gravity features and / or tilt angle features of the target Chinese character respectively.
3. The evaluation method for writing Chinese characters according to claim 2, characterized in that, The steps for "obtaining the variation in the compositional layout features between written Chinese characters and their corresponding standard Chinese characters" include: The relative change in dimensional features can be obtained using the following formula: , Indicates the relative change in dimensional characteristics. and These represent the width and height of the bounding box corresponding to the standard Chinese character, respectively. Represents the absolute change in dimensional characteristics and , and These represent the width and height of the bounding box corresponding to the written Chinese character, respectively. The operator that represents the absolute value; And / or, the relative change in the center of gravity feature can be obtained using the following formula: r2= r² represents the relative change in the center of gravity feature, and d² represents the absolute change in the center of gravity feature. , , ; And / or, The relative change in tilt angle is obtained in the following ways: r3= r3 represents the relative change in tilt angle. Indicates the slant angle of standard Chinese characters. Indicates the angle of inclination when writing Chinese characters.
4. The evaluation method for writing Chinese characters according to claim 1, characterized in that, The steps for "evaluating the first-order layout score of written Chinese characters based on the stated amount of change" specifically include: Determine the numerical range into which the change falls; Obtain the first chapter layout score corresponding to the numerical range.
5. The evaluation method for writing Chinese characters according to claim 1, characterized in that, Before evaluating the composition and layout score of each written Chinese character, the method further includes: The system identifies whether a grid exists at the position of each written Chinese character in the image, with each written Chinese character corresponding to a grid and the written Chinese character located within the grid. If so, identify the first bounding box of the grid corresponding to each written Chinese character, obtain the second bounding box of the grid corresponding to each standard Chinese character, scale the first bounding box to make the size of the first bounding box the same as that of the second bounding box, and then evaluate the composition layout score of each written Chinese character. If not, then directly evaluate the composition and layout score of each written Chinese character.
6. The method for evaluating the writing of Chinese characters according to claim 1, characterized in that, The method also includes evaluating font structure scores in the following ways: Recognize the font structure of written Chinese characters; Based on the font structure, the bounding boxes of each radical in the written Chinese character and the corresponding radicals in the standard Chinese character are obtained respectively. A preset first font structure scoring network is used to evaluate the first font structure score of the written Chinese character based on the bounding boxes of the written Chinese character and the corresponding standard Chinese character; and / or, Based on the font structure, the image features of each radical in the written Chinese character are obtained in the written Chinese character image. A preset second font structure scoring network is used to evaluate the second font structure score of each radical in the written Chinese character based on the image features of each radical. The final font structure score is obtained based on the first font structure score and / or the second font structure score.
7. The evaluation method for writing Chinese characters according to claim 6, characterized in that, The step of "obtaining the final font structure score based on the first font structure score and / or the second font structure score" specifically includes: Determine whether a written Chinese character is a single-component character based on its font structure. If so, the second font structure score will be used as the final font structure score; If not, the average of the first font structure score and the second font structure score will be used as the final font structure score.
8. The method for evaluating the writing of Chinese characters according to claim 6, characterized in that, The steps of "using a preset first font structure scoring network and evaluating the first font structure score of the written Chinese characters based on the radical boundary boxes of the written Chinese characters and the corresponding standard Chinese characters" specifically include: using a preset first font structure scoring network and evaluating the scores of avoidance, interpenetration, uprightness, slant, shape and density of the written Chinese characters based on the radical boundary boxes of the written Chinese characters and the corresponding standard Chinese characters respectively. The steps of "using a preset second font structure scoring network and evaluating the second font structure score of each radical in the written Chinese character according to the image features of each radical" specifically include: using a preset second font structure scoring network and evaluating the scores of each radical for avoidance, interweaving, slant, shape and density according to the image features of each radical.
9. The evaluation method for writing Chinese characters according to claim 1, characterized in that, The method also includes obtaining font stroke scores through the following methods: Obtain the first pixel covered by each stroke of a standard Chinese character in the standard Chinese character image and form the first pixel image; Identify the second pixel covered by each stroke in the written Chinese character image; The written Chinese characters are registered with the standard Chinese characters to determine the correspondence between the first pixel and the second pixel; Based on the correspondence and according to the second pixel, a second pixel image corresponding to the first pixel image is formed, wherein the first pixel and the second pixel located at the same position in the first pixel image and the second pixel image respectively have a correspondence relationship; A preset stroke scoring network is used to evaluate the font stroke score of each stroke in the written Chinese character based on the first pixel image and the second pixel image.
10. The method for evaluating the writing of Chinese characters according to claim 9, characterized in that, The steps of "evaluating the font stroke score of each stroke in the written Chinese character using a preset stroke scoring network and based on the first pixel image and the second pixel image" specifically include: A preset stroke scoring network is used, and the angle, curvature, length, completeness, and start and end scores of each stroke are evaluated based on the first pixel image and the second pixel image. Get a score for each stroke based on its angle, curvature, length, completeness, and start and end points, and get the average score for all strokes based on their angle, curvature, length, completeness, and start and end points.
11. The evaluation method for writing Chinese characters according to claim 1, characterized in that, The method also includes identifying writing problems and their solutions through the following methods: The written Chinese characters are sorted according to their font scores, either from smallest to largest or largest to smallest. The top or bottom written Chinese characters are selected as the problem fonts. Based on the composition layout score, font structure score, and font stroke score of the problematic font, the writing problems of the problematic font and their solutions are determined, and the solutions include at least an instructional video of the problematic font; And / or, The scores of each indicator are sorted in ascending or descending order of scores, and the top or bottom indicators are selected as the problem indicators. The indicators are the layout, font structure, or font strokes. The writing problems and their solutions are determined based on the problem indicators, and the solutions include at least instructional videos for the problem indicators.
12. The method for evaluating the writing of Chinese characters according to claim 1, characterized in that, The method also includes determining and outputting writing evaluation information through the following methods: Obtain the average font score for each written Chinese character in the image of the written Chinese characters; Based on the average value, obtain the writing ranking of users who provided images of written Chinese characters within a preset user range; Based on the writing ranking, writing evaluation information is determined and output.
13. A computer device comprising a processor and a storage device, said storage device being adapted to store a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to perform the evaluation method for writing Chinese characters as described in any one of claims 1 to 12.
14. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform the evaluation method for writing Chinese characters as described in any one of claims 1 to 12.