Correction Method, Device, Storage Medium and Electronic Device

By identifying and erasing the corrected text content, and automatically identifying and correcting text, the problems of low correction efficiency and quality in the existing technology are solved, an efficient and accurate correction process is achieved, and the user experience is improved.

CN114821593BActive Publication Date: 2025-06-17BEIJING YUDA ORIENTAL SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210474113.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-06-17
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In the prior art, the correction efficiency and quality of in-class tests and AI live classes are low, mainly because manual correction requires a lot of manpower and time, and is easily affected by physiological fatigue and insufficient experience of the teaching assistant.

Method used

By obtaining the answer image to be corrected, determine whether it contains the corrected text content. If included, erase the corrected text content, obtain the target answer image to be identified, and perform text recognition to obtain the text content to be corrected, and finally make corrections.

Benefits of technology

The correction process is simplified, the correction efficiency and accuracy are improved, the subjective and fatigue factors of manual correction are avoided, and the writing scenarios of students' answers with paper and pen are retained, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821593B_ABST
    Figure CN114821593B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technologies, and particularly to a marking method, apparatus, storage medium, and electronic device to improve the efficiency and accuracy of marking. The method includes: obtaining an answer sheet image to be marked; determining whether the answer sheet image to be marked contains marked text content; in the case where the answer sheet image to be marked includes the marked text content, erasing the marked text content to obtain a target answer sheet image to be recognized; performing text recognition on the target answer sheet image to be recognized to obtain text content to be marked; and marking the text content to be marked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a correction method, device, storage medium and electronic device. Background Art

[0002] In-class tests are an important means to ensure teaching quality and grasp learning conditions during the teaching process. In-class tests are generally conducted in sequence during the teaching process. Knowledge points or problem-solving skills are examined in order around the overall course progress. The purpose is to understand and grasp students' mastery of the knowledge. The results of in-class tests can be used as a reference for students' self-tests, and can also be used as a basis for teachers to timely adjust the course progress and teaching rhythm.

[0003] With the continuous development of AI technology, the integration of artificial intelligence technology and educational scenarios is becoming closer and closer. AI live classes are a new teaching model that emerged under this background. This teaching method increases the interactivity and fun of learning, and can also help teachers break away from physical geographical restrictions and achieve cross-city or even cross-national teaching. However, due to the particularity of AI live classes, there may be hundreds or thousands of students in a class at the same time. For each classroom with live classes, an assistant teacher is equipped at the same time. The assistant teacher will manually correct the papers during breaks or at the end of in-class tests, and manually upload the correction results to the system for summary. The correction method of generating reports requires a lot of manpower and time, and is inefficient. In addition, when the assistant teacher is physically tired or lacks experience, the correction efficiency and quality will be further reduced. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a correction method, device, storage medium and electronic device to solve the problems of low correction efficiency and correction quality.

[0005] In order to achieve the above-mentioned purpose, a first aspect of an embodiment of the present disclosure provides a correction method, comprising:

[0006] Get the answer image to be corrected;

[0007] Determining whether the answer image to be corrected contains corrected text content;

[0008] In the case where the answer image to be corrected includes the corrected text content, erasing the corrected text content to obtain a target answer image to be identified;

[0009] Performing text recognition on the target answer image to be recognized to obtain text content to be corrected;

[0010] Optionally, determining whether the answer sheet image to be marked contains marked text content includes:

[0011] Encoding each text line in the answer sheet image to be marked to obtain the position vector and sentence vector of each text line, and obtaining the text feature vector of each text line according to the position vector and the sentence vector of each text line;

[0012] Determining the text feature of the answer sheet image to be marked according to the text feature vector of each text line;

[0013] Determining the feature similarity between the answer sheet image to be marked and the marked answer sheet image containing the marked text content obtained last time according to the text feature of the answer sheet image to be marked and the text feature of the marked answer sheet image;

[0014] When the feature similarity is greater than the similarity threshold, determining that the answer sheet image to be marked contains marked text content.

[0015] Optionally, when the answer sheet image to be marked contains the marked text content, erasing the marked text content to obtain a target answer sheet image to be recognized includes:

[0016] When the answer sheet image to be marked contains the marked text content, performing pixel alignment processing on the answer sheet image to be marked and the marked answer sheet image containing the marked text content obtained last time to obtain an aligned answer sheet image to be marked;

[0017] Erasing the marked text content in the aligned answer sheet image to be marked according to the marked answer sheet image to obtain a target answer sheet image to be recognized.

[0018] Optionally, when the answer sheet image to be marked contains the marked text content, performing pixel alignment processing on the answer sheet image to be marked and the marked answer sheet image containing the marked text content obtained last time to obtain an aligned answer sheet image to be marked includes:

[0019] Dividing the answer sheet image to be marked into grid images of N×M;

[0020] Determining the local region image corresponding to the text content in the answer sheet image to be marked according to the grid images;

[0021] Perform pixel alignment processing on the local region image and the local region image of the corrected answer sheet image containing the corrected text content obtained last time through the SURF algorithm to obtain the answer sheet image to be corrected after alignment.

[0022] Optionally, erasing the corrected text content in the answer sheet image to be corrected after alignment according to the corrected answer sheet image to obtain a target answer sheet image to be recognized includes:

[0023] Determine the gray values of each pixel point in the local region image and the local region image of the corrected answer sheet image;

[0024] Determine the pixel points corresponding in position and having the same gray value in the local region image and the local region image of the corrected answer sheet image as the pixel points to be erased;

[0025] Erase the pixel points to be erased in the answer sheet image to be corrected after alignment to obtain a target answer sheet image to be recognized.

[0026] Optionally, performing text recognition on the target answer sheet image to be recognized to obtain the text content to be corrected includes:

[0027] Determine the position of the handwritten handwriting in the target answer sheet image and mark it with a text box in the target answer sheet image according to the position;

[0028] Crop the target answer sheet image according to the text box to obtain a text image to be corrected;

[0029] Input the text image to be corrected into a trained text recognition model to obtain the text recognition result output by the text recognition model, and the text recognition result is the text content to be corrected.

[0030] Optionally, correcting the text content to be corrected includes:

[0031] Judge whether the text content to be corrected is correct or wrong according to the comparison result between the text content to be corrected and the test answer; or

[0032] Input the correction result into a trained correction model to correct the text content to be corrected through the correction model.

[0033] According to the second aspect of the embodiments of the present disclosure, a correction device is provided, including:

[0034] An acquisition module, configured to acquire an answer sheet image to be corrected;

[0035] A first determination module, configured to determine whether the answer sheet image to be marked contains marked text content;

[0036] An erasure module, configured to erase the marked text content in the answer sheet image to be marked to obtain a target answer sheet image to be recognized when the answer sheet image to be marked contains the marked text content;

[0037] A text recognition module, configured to perform text recognition on the target answer sheet image to be recognized to obtain the text content to be marked;

[0038] A marking module, configured to mark the text content to be marked.

[0039] Optionally, the first determination module is configured to:

[0040] Encode each text line in the answer sheet image to be marked to obtain a position vector and a sentence vector for each text line, and obtain a text feature vector for each text line according to the position vector and the sentence vector of each text line;

[0041] Determine the text feature of the answer sheet image to be marked according to the text feature vector of each text line;

[0042] Determine the feature similarity between the answer sheet image to be marked and the marked answer sheet image containing the marked text content according to the text feature of the answer sheet image to be marked and the text feature of the previously obtained marked answer sheet image containing the marked text content;

[0043] When the feature similarity is greater than the similarity threshold, determine that the answer sheet image to be marked contains marked text content.

[0044] Optionally, the erasure module is configured to:

[0045] When the answer sheet image to be marked contains the marked text content, perform pixel alignment processing on the answer sheet image to be marked and the previously obtained marked answer sheet image containing the marked text content to obtain an aligned answer sheet image to be marked;

[0046] Erase the marked text content in the aligned answer sheet image to be marked according to the marked answer sheet image to obtain a target answer sheet image to be recognized.

[0047] Optionally, the erasure module is configured to:

[0048] Divide the answer sheet image to be marked into N×M grid images;

[0049] Determine a local region image corresponding to the text content in the answer sheet image to be corrected according to the grid image;

[0050] Perform pixel alignment processing on the local region image and the local region image of the previously obtained corrected answer sheet image containing the corrected text content through the SURF algorithm to obtain the answer sheet image to be corrected after alignment.

[0051] Optionally, the erasing module is configured to:

[0052] Determine the gray value of each pixel point in the local region image and the local region image of the corrected answer sheet image;

[0053] Determine the pixel points with the same position and the same gray value in the local region image and the local region image of the corrected answer sheet image as the pixel points to be erased;

[0054] Erase the pixel points to be erased in the aligned answer sheet image to be corrected to obtain the target answer sheet image to be recognized.

[0055] Optionally, the text recognition module is configured to:

[0056] Determine the position of the handwritten handwriting in the target answer sheet image and mark it with a text box in the target answer sheet image;

[0057] Crop the target answer sheet image according to the text box to obtain the text image to be corrected;

[0058] Input the text image to be corrected into the trained text recognition model to obtain the text recognition result output by the text recognition model, and the text recognition result is the text content to be corrected.

[0059] Optionally, the correction module is configured to:

[0060] Determine whether the text content to be corrected is correct or wrong according to the comparison result between the text content to be corrected and the test answer; or

[0061] Input the correction result into the trained correction model to correct the text content to be corrected through the correction model.

[0062] According to the third aspect of the embodiments of the present disclosure, a non-temporary computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the correction method provided in the first aspect of the present disclosure are implemented.

[0063] According to the fourth aspect of the embodiments of the present disclosure, an electronic device is provided, including:

[0064] A memory on which a computer program is stored;

[0065] A processor for executing the computer program in the memory to implement the steps of the marking method provided in the first aspect of the present disclosure.

[0066] Through the above technical solutions, by obtaining the answer sheet image to be marked, when the answer sheet image to be marked includes the marked text content, the marked text content is erased, and then the image only including the unmarked text content is subjected to text recognition to obtain the text content to be marked and marked. In this way, on the one hand, the marking process is simplified and the marking efficiency is improved. In addition, the influence of subjective and fatigue factors of manual marking on the marking result is avoided, and the marking accuracy is improved. On the other hand, no additional limitation is imposed on the answer sheet image to be marked, the writing scene of students' pen-and-paper answering can be retained, the natural paper writing experience is restored, which is beneficial to the cultivation of students' learning habits and the adjustment and adaptation of test and examination scenarios, and the user experience is improved.

[0067] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification, and are used to explain the present disclosure together with the following specific implementation, but do not constitute a limitation to the present disclosure. In the drawings:

[0069] Figure 1 is a flowchart of a marking method shown according to an exemplary embodiment.

[0070] Figure 2 is a schematic diagram of corner point detection, paper correction and cutting shown according to an exemplary embodiment.

[0071] Figure 3 is a schematic diagram of a segmentation grid shown according to an exemplary embodiment.

[0072] Figure 4 is a schematic diagram of determining a local region image shown according to an exemplary embodiment.

[0073] Figure 5 is a schematic diagram of pixel alignment shown according to an exemplary embodiment.

[0074] Figure 6 is a schematic diagram of a text erasure result shown according to an exemplary embodiment.

[0075] Figure 7It is a flowchart of a marking method shown according to another exemplary embodiment.

[0076] Figure 8 It is a block diagram of a marking device shown according to an exemplary embodiment.

[0077] Figure 9 It is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0078] The following will describe the detailed implementation manners of the present disclosure with reference to the accompanying drawings. It should be understood that the detailed implementation manners described herein are only for explaining and illustrating the present disclosure, and are not used to limit the present disclosure.

[0079] The inventors' research found that the existing marking methods mainly rely on the hardware of the answer sheet reader to conduct real-time interactive answering. Students participating in the live class need to synchronously purchase the corresponding answer sheet reader hardware and complete the system binding. By operating the buttons or the handwriting screen on the answer sheet reader, the submission of objective questions and a small number of subjective questions can be achieved.

[0080] Although this method solves the efficiency problem of manual marking, it cannot meet the marking requirements of various question types in various disciplines. It is limited to the existing options on the answer sheet reader buttons, or can only mark the content of objective and subjective questions with a small number of characters (mostly not exceeding 4 character lengths). For example, question types such as poetry dictation, short essays, and Chinese sentence-making cannot be marked and evaluated. In addition, this marking method requires the additional purchase of a supporting answer sheet reader, with a relatively high cost. The answer sheet reader answering also cannot restore the scenario of real paper answering, which is not conducive to the cultivation of students' learning habits and the adjustment and adaptation to the test and examination scenarios.

[0081] In view of this, the embodiments of the present disclosure provide a marking method, device, storage medium, and electronic device to solve the above technical problems. In some embodiments, Figure 1 It is a flowchart of a marking method shown according to an exemplary embodiment. As Figure 1 shown, the marking method is used in a terminal or a server, and includes the following steps:

[0082] In step S11, obtain the answer sheet image to be marked;

[0083] In step S12, determine whether the answer sheet image to be marked contains the marked text content;

[0084] In step S13, in the case where the answer sheet image to be marked includes the marked text content, erase the marked text content to obtain the target answer sheet image to be recognized;

[0085] In step S14, perform text recognition on the target answer sheet image to be recognized to obtain the text content to be marked.

[0086] In step S15, mark the text content to be marked.

[0087] First, it should be understood that the embodiments of the present disclosure can be applied to in-class tests or other tests. For the scenario where students write answers by hand on paper, the students take pictures of the paper after answering to determine the answer sheet image to be marked, and the answer sheet image to be marked includes the handwritten answer content. Of course, it can also be applied to the scenario of non-handwritten answers. For example, for question types such as short essays or noun explanations, the answer sheet image to be marked can be obtained by typing and taking screenshots on a terminal device, and the answer sheet image to be marked includes the electronic answer content. The embodiments of the present disclosure do not limit this.

[0088] Exemplarily, after marking the text content to be marked, the output form of the marking result can be to mark the marking result of each sub-question below or at other positions around the question, or to generate a table of the marking results of the marked questions stored comprehensively and send it to the terminal. The embodiments of the present disclosure do not limit the output form of the marking result.

[0089] It should also be understood that the execution subject of the embodiments of the present disclosure can be a terminal, which marks the answer sheet image to be marked through the terminal and gives the marking result, or the answer sheet image to be marked can be uploaded to the server, and the server marks the answer sheet image to be marked and gives the marking result. The embodiments of the present disclosure do not limit this.

[0090] With the above technical solution, by obtaining the answer sheet image to be marked, when the answer sheet image to be marked includes the marked text content, erase the marked text content, and then perform text recognition on the image that only includes the unmarked text content to obtain the text content to be marked and mark it. In this way, on the one hand, the marking process is simplified and the marking efficiency is improved. In addition, the influence of subjective and fatigue factors of manual marking on the marking result is avoided, and the marking accuracy is improved. On the other hand, no additional restrictions are imposed on the answer sheet image to be marked, the writing scenario of students' pen-and-paper answers can be retained, the natural paper writing experience is restored, which is conducive to the cultivation of students' learning habits and the adjustment and adaptation of test and examination scenarios, and the user experience is improved.

[0091] The method provided by the embodiments of the present disclosure will be described in detail below.

[0092] It should be understood that when the user takes a photo of the answer content, due to the distance and angle of the photo, the image may include other unnecessary content, or the answer content part in the image may be tilted at a certain angle, affecting the subsequent image processing. Therefore, in a possible way, obtaining the answer image to be graded can be to first obtain the original image, input the original image into the paper corner point detection model, and obtain the paper corner point detection result output by the paper corner point detection model. Among them, the paper corner point detection result includes an annotation image marking the corner point positions of the answer sheet. Then, perform a perspective transformation on the annotation image to obtain a corrected image, and then crop the corrected image according to the corner point positions to obtain the test question image to be graded that only includes the answer content.

[0093] Exemplarily, as Figure 2 shown, the corner point positions of the answer sheet are marked in the annotation image. Perform a perspective transformation on the annotation image to correct the angle of the annotation image to obtain a corrected image. Then, determine the position contour of the answer sheet according to the corner point positions of the answer sheet, and crop the corrected image according to the position contour of the answer sheet to crop off the interfering background and obtain the test question image to be graded that only includes the answer sheet.

[0094] In a possible way, determining whether the answer image to be graded contains the text content that has been graded can be to first encode each text line in the answer image to be graded to obtain the position vector and sentence vector of each text line, and obtain the text feature vector of each text line according to the position vector and sentence vector of each text line. Then, determine the text features of the answer image to be graded according to the text feature vector of each text line, and then determine the feature similarity between the answer image to be graded and the previously obtained graded answer image containing the text content that has been graded according to the text features of the answer image to be graded and the text features of the graded answer image. When the feature similarity is greater than the similarity threshold, it is determined that the answer image to be graded contains the text content that has been graded.

[0095] It should be understood that in actual applications, the writing of answers is not restricted. One can always use the same piece of paper to answer, or replace the paper or turn it over to continue answering when the answer sheet is full. And in the scenario of answering and grading multiple times within a period of time, the answer image to be graded may contain the text content that has been graded. Therefore, this disclosure uses a combined coding method of content and position coordinates to determine whether a paper replacement operation has been performed in this answer. That is, it is determined whether the answer image to be graded contains the text content that has been graded. If a paper replacement operation has been performed in this answer, the answer image to be graded does not contain the text content that has been graded. If a paper replacement operation has not been performed in this answer, the answer image to be graded contains the text content that has been graded.

[0096] Exemplarily, for each text line in the answer sheet image to be graded, a normalization expression can be adopted based on the ratio of the image width to the height to obtain the position vector of each text line. At the same time, sentence vector embedding can be performed on the content characters of each text line in the answer sheet image to be graded to obtain the sentence vector of each text line. Then, the position vector and the sentence vector of each text line are concatenated to obtain the text feature vector of the text line. The set of text feature vectors of multiple text lines is the text feature of the answer sheet image to be graded. Then, the feature similarity between the answer sheet image to be graded and the graded answer sheet image is calculated to determine whether the answer sheet image to be graded contains the graded text content. Among them, the Euclidean distance between the text feature vectors included in the answer sheet image to be graded and the text feature vectors included in the graded answer sheet image can be calculated to determine the feature similarity between the answer sheet image to be graded and the graded answer sheet image. The cosine similarity can also be used to calculate the feature similarity between the answer sheet image to be graded and the graded answer sheet image. The embodiments of the present disclosure do not limit this.

[0097] Through the above method, the text features of the answer sheet image to be graded and the graded answer sheet image are obtained, and the feature similarity between the two is calculated, so as to determine whether the answer sheet image to be graded contains the graded text content.

[0098] In a possible way, in the case where the answer sheet image to be graded includes the graded text content, erasing the graded text content to obtain the target answer sheet image to be recognized may be to first, in the case where the answer sheet image to be graded includes the graded text content, perform pixel alignment processing on the answer sheet image to be graded and the previously obtained graded answer sheet image including the graded text content to obtain the aligned answer sheet image to be graded. Then, according to the graded answer sheet image, the graded text content is erased in the aligned answer sheet image to be graded to obtain the target answer sheet image to be recognized.

[0099] It should be understood that when it is determined that no paper replacement operation has been performed in this answer (that is, when the answer sheet image to be graded contains the graded text content), pixel-level alignment processing can be performed on the answer sheet image to be graded and the previously obtained graded answer sheet image including the graded text content to correspond the pixel points in the graded answer sheet image to the pixel points in the graded answer sheet image, so as to determine the pixel points to be erased corresponding to the pixel points corresponding to the graded text content in the answer sheet image to be graded. Then, the text content of the pixel points to be erased is erased in the aligned answer sheet image to be graded, and the ungraded text content is retained.

[0100] In addition, it should also be understood that after each correction of the answer sheet image, the system saves the image submitted each time, and when obtaining the answer sheet image to be corrected each time, it determines whether there is a corrected answer sheet image stored in the system. If there is no corrected answer sheet image stored in the system, it means that the answer sheet image to be corrected is the first answer sheet image (i.e., the first correction of the answer sheet image). In this case, there is no need to perform the alignment work of the previous and subsequent answer images, and the image after paper correction can be directly subjected to text recognition, and the text recognition result can be corrected. Among them, the corrected answer sheet image can be the corrected answer sheet image stored within a preset time period. For example, when obtaining the answer sheet image to be corrected, it can be determined whether there is a corrected answer sheet image stored in the system within the preset time period. The preset time period can be 24 hours or 1 week, and the embodiments of the present disclosure do not limit this.

[0101] Through the above method, the answer sheet image to be corrected is subjected to pixel alignment processing with the previously obtained corrected answer sheet image containing the corrected text content, so as to determine the pixel points corresponding to the corrected text content in the answer sheet image to be corrected and erase the corresponding text content, obtaining a target answer sheet image to be recognized that only contains the uncorrected text content.

[0102] In a possible way, in the case where the answer sheet image to be corrected includes the corrected text content, the answer sheet image to be corrected is subjected to pixel alignment processing with the previously obtained corrected answer sheet image containing the corrected text content. The obtained aligned answer sheet image to be corrected can be to first divide the answer sheet image to be corrected into a grid image of N×M, then determine the local region image corresponding to the text content in the answer sheet image to be corrected according to the grid image, and then perform pixel alignment processing on the local region image with the local region image of the previously obtained corrected answer sheet image containing the corrected text content through the SURF algorithm to obtain the aligned answer sheet image to be corrected.

[0103] It should be understood that due to factors such as the camera perspective and local paper distortion, it is difficult to align the entire image and the accuracy is not high. If an effective local region image can be obtained and then pixel-level alignment is performed, a better effect can be obtained. Therefore, the embodiments of the present disclosure can first determine the position corresponding to the text content in the answer sheet image to be corrected, crop the answer sheet image to be corrected according to its position to obtain the local region image corresponding to the text content, and then perform pixel alignment processing on the local region image with the local region image of the previously obtained corrected answer sheet image containing the corrected text content through the SURF algorithm to obtain the aligned answer sheet image to be corrected.

[0104] Exemplarily, the local region image corresponding to the text content in the answer sheet image to be marked can be determined by establishing a grid coordinate system for the paper. For example Figure 3 As shown in Figure 3 , for the answer sheet image to be marked, it can be divided in the horizontal direction with one-tenth of the paper width as the minimum unit, and in the vertical direction with one-twentieth of the paper width as the minimum unit, thereby dividing the entire paper into a 20×10 grid to establish a corresponding coordinate system. The embodiments of the present disclosure do not limit either the minimum unit of division or the way of establishing the coordinate system.

[0105] Then, for each text line, determine the grid where the center point of the text line is located and the grid coordinates where the text coverage area exceeds 10% of the grid area, and then determine one or more grids corresponding to the text line as the position area of the text line. For example Figure 4 As shown in Figure 4 , the dotted line area is the grid position area corresponding to the text line, and the coordinates of its corresponding grid are: [(3, 1), (3, 2), (3, 3), (4, 1), (4, 2), (4, 3)]. Store the coordinate information of the grid position area in the information record list, and crop the answer sheet image to be marked along this dotted line area, and retain the dotted line area image as the local region image of the text line. Among them, the answer sheet image to be marked may include one or more text lines, and correspondingly may include one or more local region images, or adjacent grid position areas may be merged to obtain a local region image including multiple text lines. The embodiments of the present disclosure do not limit this.

[0106] Then, as shown in Figure 5 Figure 5 , perform feature point detection, feature neighborhood description, and descriptor pairing on the local region image of the answer sheet image to be marked and the local region image of the previously obtained marked answer sheet image containing the marked text content, so as to perform pixel alignment processing on the local region image of the answer sheet image to be marked and the local region image of the previously obtained marked answer sheet image containing the marked text content, and obtain the aligned answer sheet image to be marked. Among them, the coordinates of the grid points corresponding to the local region image of the previously obtained marked answer sheet image containing the marked text content have been stored in the information record list. After determining the local region image of the answer sheet image to be marked, the local region of the answer sheet image to be marked can be made to correspond one by one with the local region image of the previously obtained marked answer sheet image containing the marked text content according to the stored grid coordinates, and then pixel alignment processing is performed. Of course, other algorithms can also be used to perform pixel alignment processing on the local region image of the answer sheet image to be marked and the local region image of the previously obtained marked answer sheet image containing the marked text content. The embodiments of the present disclosure do not limit this.

[0107] In the above manner, by establishing a grid coordinate system, a partial region image containing the unmarked text content is determined, and then the partial region image of the current partial region image is pixel-aligned with the partial region image of the previously obtained corrected answer image containing the corrected text content, improving the pixel alignment effect to facilitate the subsequent erasure of the corrected text content.

[0108] In a possible way, according to the corrected answer image, erasing the corrected text content in the answer image to be corrected after alignment to obtain the target answer image to be recognized may be to first determine the gray value of each pixel point in the partial region image and the partial region image of the corrected answer image, and then determine the pixel points with the same position and the same gray value in the partial region image and the partial region image of the corrected answer image as the pixel points to be erased, and then erase the pixel points to be erased in the answer image to be corrected after alignment to obtain the target answer image to be recognized.

[0109] It should be understood that for the partial region image of the answer image to be corrected, if the gray value of a certain pixel point is the same as that of the pixel point at the corresponding position in the partial region image of the corrected answer image, it means that the pixel point has the same image feature as the corrected answer image. Therefore, the content of the pixel point can be erased to determine the text content to be corrected in the target answer image to be recognized.

[0110] Exemplarily, the image in paint technology can be used to erase and complete the corrected text content. Specifically, according to the partial region image of the answer image to be corrected, an adaptive binarization operation is performed on the partial region image of the corrected answer image, and then a masking operation is performed on the region where the pixel value is 0 after binarization and the current partial color image to retain the background region pixels and remove the pixels in the corrected text content region. The image inpainting technology based on the fast marching method (INPAINT_TELEA) or the image completion based on hydrodynamics and using partial differential equations (INPAINT_NS) can also be used. The background pixel mean value or the medium gray pixel value (127, 127, 127) can also be used for completion. The embodiments of the present disclosure do not limit this. In the above example, erasing the corrected text content in the answer image to be corrected after alignment, the obtained target answer image to be recognized is as Figure 6 shown.

[0111] Through the above method, the corrected text content can be erased and the erased part can be completed according to the background region, only retaining the unmarked text content for subsequent text recognition of the unmarked text content.

[0112] In a possible way, text recognition is performed on the target answer image to obtain the text content to be corrected. This can be done by determining the position of the handwritten text in the target answer image, annotating it with a text box in the target answer image according to the position, then cropping the target answer image according to the text box to obtain the text image to be corrected, and then inputting the text image to be corrected into a trained text recognition model to obtain the text recognition result output by the text recognition model, where the text recognition result is the text content to be corrected.

[0113] It should be understood that since the corrected text content has been erased, the target answer image only includes the uncorrected text content. For the uncorrected text content, the embodiments of the present disclosure can use morphological processing methods to determine the position of the uncorrected text content, and then input the target answer image into the text recognition model to obtain the text recognition result output by the text recognition model.

[0114] Exemplarily, the following operations can be performed on the target answer image to obtain the outer bounding boxes of multiple text lines: grayscale transformation, binarization, image erosion, connected component labeling, connected component area calculation, connected component filtering, and minimum bounding rectangle calculation. Then, the target answer image is cropped according to the outer bounding boxes of the text lines to obtain the text image to be corrected. The text image to be corrected can include one or more text lines, and then the text image to be corrected is input into a trained text recognition model for text recognition. The text recognition model outputs the text recognition result corresponding to the text image to be corrected. The text recognition model can be a CRNN network model, and the embodiments of the present disclosure do not limit this.

[0115] Through the above method, after determining the position of the uncorrected text content, the text image to be corrected is recognized by the text recognition model to correct the answer content.

[0116] In a possible way, to correct the text content to be corrected, it can be to determine whether the text content to be corrected is correct or wrong according to the comparison result between the text content to be corrected and the test answer, or input the correction result into a trained correction model to correct the text content to be corrected through the correction model.

[0117] It should be understood that the text content to be corrected can include objective questions and subjective questions. For objective questions or subjective questions with fewer characters, the text content to be corrected can be compared with the test answers to determine whether the text content to be corrected is correct or wrong, so as to obtain the correction result. For subjective questions, the text content to be corrected can be input into a pre-trained correction model to obtain the correction result output by the correction model. Specifically, multiple correction models may be trained according to different question types, such as composition correction models, application problem correction models, question-and-answer correction models, etc. The embodiments of the present disclosure do not limit this.

[0118] Through the above method, different correction methods are adopted for different question types, which can improve the accuracy of correction and ensure the correction quality.

[0119] In some embodiments, Figure 7 is a flowchart of a correction method shown according to another exemplary embodiment, as Figure 7 shown. The correction method is used in a terminal or a server and includes the following steps:

[0120] In step S201, obtain the answer sheet image to be corrected.

[0121] In step S202, determine the position of the answer sheet in the answer sheet image to be corrected.

[0122] In step S203, determine whether the answer sheet image to be corrected contains the corrected text content. If the answer sheet image to be corrected includes the corrected text content, execute step S204; otherwise, execute step S207.

[0123] In step S204, perform pixel alignment processing on the answer sheet image to be corrected and the previously obtained corrected answer sheet image containing the corrected text content to obtain the aligned answer sheet image to be corrected.

[0124] In step S205, according to the corrected answer sheet image, erase the corrected text content in the aligned answer sheet image to be corrected to obtain the target answer sheet image to be recognized.

[0125] In step S206, perform text recognition on the target answer sheet image to be recognized to obtain the text content to be corrected.

[0126] In step S207, perform text recognition on the answer sheet image to be corrected to obtain the text content to be corrected.

[0127] In step S208, correct the text content to be corrected.

[0128] The specific implementation manners of the above processes have been described in detail by way of examples above and will not be elaborated here. In addition, it should be understood that for the above method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present disclosure is not limited by the action sequences described above. Secondly, those skilled in the art should also know that the embodiments described above are preferred embodiments, and the steps involved are not necessarily essential to the present disclosure.

[0129] Through the above technical solution, by obtaining the answer sheet image to be marked, when the answer sheet image to be marked does not include the marked text content, text recognition is performed on the answer sheet image to be marked, and the text content to be marked is marked. When the answer sheet image to be marked includes the marked text content, the marked text content is erased, and then text recognition is performed on the image only including the unmarked text content to obtain the text content to be marked and mark it. In this way, on the one hand, the marking process is simplified and the marking efficiency is improved. In addition, the influence of subjective and fatigue factors of manual marking on the marking result is avoided, and the marking accuracy is improved. On the other hand, no additional restrictions are imposed on the answer sheet image to be marked, the writing scene of students' paper-and-pencil answers can be retained, the natural paper writing experience is restored, which is beneficial to the cultivation of students' learning habits and the adjustment and adaptation of test and examination scenarios, and the user experience is improved.

[0130] Figure 8 is a block diagram of a marking device shown according to an exemplary embodiment. Refer to Figure 8 , the device 120 includes an acquisition module 121, a first determination module 122, an erasure module 123, a text recognition module 124, and a marking module 125.

[0131] The acquisition module 121 is configured to acquire an answer sheet image to be marked;

[0132] The first determination module 122 is configured to determine whether the answer sheet image to be marked contains marked text content;

[0133] The erasure module 123 is configured to erase the marked text content to obtain a target answer sheet image to be recognized when the answer sheet image to be marked includes the marked text content;

[0134] The text recognition module 124 is configured to perform text recognition on the target answer sheet image to be recognized to obtain the text content to be marked;

[0135] The marking module 125 is configured to mark the text content to be marked.

[0136] Optionally, the first determination module 122 is configured to:

[0137] Encode each text line in the answer sheet image to be graded to obtain a position vector and a sentence vector for each text line, and obtain a text feature vector for each text line according to the position vector and the sentence vector of each text line;

[0138] Determine the text feature of the answer sheet image to be graded according to the text feature vector of each text line;

[0139] Determine the feature similarity between the answer sheet image to be graded and the previously obtained graded answer sheet image containing the graded text content according to the text feature of the answer sheet image to be graded and the text feature of the graded answer sheet image;

[0140] In the case where the feature similarity is greater than the similarity threshold, determine that the answer sheet image to be graded contains the graded text content.

[0141] Optionally, the erasing module 123 is configured to:

[0142] In the case where the answer sheet image to be graded includes the graded text content, perform pixel alignment processing on the answer sheet image to be graded and the previously obtained graded answer sheet image containing the graded text content to obtain an aligned answer sheet image to be graded;

[0143] Erase the graded text content in the aligned answer sheet image to be graded according to the graded answer sheet image to obtain a target answer sheet image to be recognized.

[0144] Optionally, the erasing module 123 is configured to:

[0145] Divide the answer sheet image to be graded into N×M grid images;

[0146] Determine the local region image corresponding to the text content in the answer sheet image to be graded according to the grid image;

[0147] Perform pixel alignment processing on the local region image and the local region image of the previously obtained graded answer sheet image containing the graded text content through the SURF algorithm to obtain an aligned answer sheet image to be graded.

[0148] Optionally, the erasing module 123 is configured to:

[0149] Determine the gray value of each pixel point in the local region image and the local region image of the graded answer sheet image;

[0150] Determine the pixel points in the local area image that correspond to the local area image of the corrected answer image in position and have the same gray value as the pixel points to be erased;

[0151] Erase the pixel points to be erased in the aligned answer image to be corrected to obtain a target answer image to be recognized.

[0152] Optionally, the text recognition module 124 is configured to:

[0153] Determine the position of the handwritten handwriting in the target answer image and mark it with a text box in the target answer image;

[0154] Crop the target answer image according to the text box to obtain a text image to be corrected;

[0155] Input the text image to be corrected into a trained character recognition model to obtain the character recognition result output by the character recognition model, and the character recognition result is the text content to be corrected.

[0156] Optionally, the correction module 125 is configured to:

[0157] Determine whether the text content to be corrected is correct or wrong according to the comparison result between the text content to be corrected and the test answer; or

[0158] Input the correction result into a trained correction model to correct the text content to be corrected through the correction model.

[0159] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.

[0160] Based on the same inventive concept, an embodiment of the present disclosure also provides a non - transitory computer - readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the correction method provided by the present disclosure are implemented.

[0161] Figure 9 It is a block diagram of an electronic device 800 shown according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0162] Refer to Figure 9, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0163] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned correction method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0164] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0165] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0166] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0167] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0168] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0169] The sensor component 814 includes one or more sensors for providing status assessments of various aspects of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0170] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0171] In an exemplary embodiment, the electronic device 800 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-mentioned correction method.

[0172] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the above instructions can be executed by a processor 820 of the electronic device 800 to complete the above-mentioned correction method. For example, the non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0173] In another exemplary embodiment, a computer program product is also provided, and the computer program product includes a computer program capable of being executed by a programmable device, and the computer program has a code portion for executing the above-mentioned correction method when executed by the programmable device.

[0174] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0175] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A marking method, characterized in that, Including: Obtain an answer sheet image to be marked. Determine whether the answer sheet image to be marked contains marked text content, where the marked text content is the answer content. In the case that the answer sheet image to be marked includes the marked text content, erase the marked text content to obtain a target answer sheet image to be recognized. Perform text recognition on the target answer sheet image to be recognized to obtain text content to be marked. Mark the text content to be marked.

2. The method according to claim 1, characterized in that, The determining whether the answer sheet image to be marked contains marked text content includes: Encode each text line in the answer sheet image to be marked to obtain a position vector and a sentence vector for each text line, and obtain a text feature vector for each text line according to the position vector and the sentence vector of each text line. Determine the text feature of the answer sheet image to be marked according to the text feature vector of each text line. Determine the feature similarity between the answer sheet image to be marked and the marked answer sheet image containing the marked text content obtained last time according to the text feature of the answer sheet image to be marked and the text feature of the marked answer sheet image. In the case that the feature similarity is greater than the similarity threshold, determine that the answer sheet image to be marked contains marked text content.

3. The method according to claim 1, characterized in that, The erasing the marked text content in the answer sheet image to be marked to obtain a target answer sheet image to be recognized in the case that the answer sheet image to be marked includes the marked text content includes: In the case that the answer sheet image to be marked includes the marked text content, perform pixel alignment processing on the answer sheet image to be marked and the marked answer sheet image containing the marked text content obtained last time to obtain an aligned answer sheet image to be marked. According to the marked answer sheet image, erase the marked text content in the aligned answer sheet image to be marked to obtain a target answer sheet image to be recognized.

4. The method according to claim 3, characterized in that, The performing pixel alignment processing on the answer sheet image to be marked and the marked answer sheet image containing the marked text content obtained last time to obtain an aligned answer sheet image to be marked in the case that the answer sheet image to be marked includes the marked text content includes: Divide the answer sheet image to be marked into N×M grid images. Determine the local region image corresponding to the text content in the answer sheet image to be marked according to the grid image. Perform pixel alignment processing on the local region image and the local region image of the marked answer sheet image containing the marked text content obtained last time through the SURF algorithm to obtain an aligned answer sheet image to be marked.

5. The method according to claim 4, characterized in that, The erasing the marked text content in the aligned answer sheet image to be marked according to the marked answer sheet image to obtain a target answer sheet image to be recognized includes: Determine the gray value of each pixel point in the local region image and the local region image of the marked answer sheet image. Pixels in the local region image that correspond in position and have the same grayscale value as those in the local region image of the corrected answer image are determined as pixels to be erased. In the aligned answer image to be corrected, the pixels to be erased are erased to obtain a target answer image to be recognized.

6. The method according to claim 1, characterized in that, Performing text recognition on the target answer image to be recognized to obtain the text content to be corrected includes: Determining the position of the handwritten handwriting in the target answer image and annotating it with a text box in the target answer image according to the position. Cropping the target answer image according to the text box to obtain a text image to be corrected. Inputting the text image to be corrected into a trained character recognition model to obtain the character recognition result output by the character recognition model, and the character recognition result is the text content to be corrected.

7. The method according to claim 1, characterized in that, Correcting the text content to be corrected includes: Judging the correctness of the text content to be corrected according to the comparison result between the text content to be corrected and the test answer; or Inputting the text content to be corrected into a trained correction model to correct the text content to be corrected through the correction model.

8. A marking device, characterized in that, Including: An acquisition module configured to acquire an answer image to be corrected. A first determination module configured to determine whether the answer image to be corrected contains corrected text content, and the corrected text content is the answer content. An erasure module configured to erase the corrected text content in the answer image to be corrected to obtain a target answer image to be recognized when the answer image to be corrected contains the corrected text content. A text recognition module configured to perform text recognition on the target answer image to be recognized to obtain the text content to be corrected. A correction module configured to correct the text content to be corrected.

9. A non - transitory computer - readable storage medium, on which a computer program is stored, characterized in that, When the program is executed by a processor, the steps of the method according to any one of claims 1-7 are implemented.

10. An electronic device, characterized in that, Including: A memory having a computer program stored thereon. A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Error book generation method suitable for electronic typoscope

    CN110705534A

  • Calculation question correcting method and device, readable storage medium and electronic equipment

    CN113139472A