Calculation question correction method, storage medium and equipment
By aligning the feature of the template images and the answered test paper images in the unanswered state and detecting the calculation questions targets, combined with text recognition and handwriting answer results, the problem of low accuracy of calculation questions in the prior art is solved, and automatic correction of high accuracy is achieved.
Patent Information
- Application Number
- CN202411740570.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The existing calculation and correction methods based on text recognition results are likely to cause errors in the identification of the question stem or unrecognition when filling in and counting out during the students' answering process, which can easily lead to incorrect identification of the content of the question stem, affecting the accuracy of the correction.
By obtaining the template image and the answered test paper image in the unanswered state, the feature alignment and calculation of the question target detection are performed, the coordinates of the question are extracted and matched, and the result of the text recognition and handwriting answer is corrected.
The accurate correction of calculation questions is achieved, manual intervention is reduced, the accuracy of correction is improved, and labor costs are saved.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent grading, and in particular to a calculation problem grading method, storage medium and device. Background Art
[0002] This year, through the use of artificial intelligence technology, especially text recognition technology, we have achieved automated homework grading, which has greatly improved teachers' work efficiency and freed teachers from the tedious task of homework grading, so that they can better devote themselves to teaching.
[0003] Currently, calculation questions are mainly graded based on text recognition results, that is, the content of the calculation question stem is detected and calculated to obtain the first answer to the question, and then the student's answer is identified as the second answer to the question. When the first answer and the second answer are consistent, the grading result is correct, and when they are inconsistent, the grading result is incorrect.
[0004] However, since students often fill in, reduce fractions, and perform other operations in the question stem area while answering the questions, the grading of calculation questions based on text recognition results often results in incorrect or unrecognizable question stem content, resulting in incorrect or uncalculated first answers, which seriously affects the accuracy of grading of calculation questions based on text recognition results. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention aims to provide a method, storage medium and device for correcting calculation problems.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A method for correcting calculation problems comprises the following steps:
[0008] S1. Obtain a template image corresponding to the test paper or teaching supplementary page to be corrected; the template image is the original image of the test paper or teaching supplementary page to be corrected in an unanswered state;
[0009] S2, obtaining the image of the test paper to be corrected or the teaching aid page;
[0010] S3, aligning the features of the image of the test paper to be corrected or the supplementary teaching page with the template image to achieve correction of the image of the test paper to be corrected or the supplementary teaching page;
[0011] S4, extracting calculation questions from the template image and the image of the test paper to be corrected or the supplementary teaching page, and obtaining the title information of the calculation questions of the template image as the first information, and the title information of the calculation questions of the test paper to be corrected or the supplementary teaching page image as the second information; the title information in the first information includes the stem of the calculation question and the coordinates of the title area of the calculation question, and the title information in the second information includes the coordinates of the title area of the calculation question;
[0012] S5, calculating the stem of each calculation question extracted from the template image to obtain a calculation result and using it as the first answer of each calculation question, and then associating the first answer of each calculation question with the coordinates of the question area in the template image;
[0013] S6. In the question area of each calculation question extracted from the image of the test paper to be corrected or the supplementary teaching page, a handwritten answer result is identified as a second answer to each calculation question, and the second answer to each calculation question is associated with the coordinates of the question area in the image of the test paper to be corrected or the supplementary teaching page;
[0014] S7, matching the coordinates of the question area in the second information with the coordinates of the question area in the first information, so as to correspond each calculation question in the template image with each calculation question in the test paper to be corrected or the teaching supplementary page image;
[0015] S8. Compare the first answer of each calculation question in the template image with the second answer of the corresponding calculation question in the test paper to be corrected or the teaching supplementary page image. When the first answer and the second answer are consistent, the correction result is correct; when they are inconsistent, the correction result is wrong.
[0016] Furthermore, in step S4, a calculation question object detection model is used to detect the question area of each calculation question on the template image and the image of the test paper to be corrected or the teaching aid page, and the question area of each calculation question is located and extracted respectively to obtain the question area image and the question area coordinates; for the template image, text recognition is further performed on the question area image to obtain the stem of the calculation question.
[0017] Furthermore, in step S7, when a certain question area in the second information overlaps with a certain question area in the first information, it is considered that the two corresponding calculation questions correspond.
[0018] Furthermore, in step S7, if a certain topic area in the second information overlaps with a plurality of topic areas in the first information, the intersection-and-union ratios of the topic area in the second information and each overlapping topic area in the first information are calculated respectively, and the topic area in the second information is matched with the topic area in the first information corresponding to the calculated maximum intersection-and-union ratio;
[0019] Intersection-over-union ratio = M(A∩B) / M(A∪B), where A is a certain question area in the second information, B is a certain question area in the first information, A∩B represents the overlapping area of A and B, A∪B represents the area after A and B are merged, and M represents the area.
[0020] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0021] The present invention also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the above method is implemented.
[0022] The beneficial effects of the present invention are as follows: the present invention can accurately obtain the correct answer to the calculation question by identifying and calculating the stem of the calculation question in the template image in the unanswered state, effectively reducing manual intervention, saving labor costs, and ensuring the accuracy of automatic correction of the calculation question. In addition, the present invention can accurately establish the corresponding relationship between the template image and each calculation question in the image to be corrected by matching the question area. DETAILED DESCRIPTION
[0023] The present invention will be further described below. It should be noted that this embodiment is based on the technical solution and provides a detailed implementation method and a specific operation process, but the protection scope of the present invention is not limited to this embodiment.
[0024] This embodiment provides a method for correcting calculation problems, comprising the following steps:
[0025] S1. Obtain a template image corresponding to the test paper or supplementary teaching page to be corrected; the template image is the original image of the test paper or supplementary teaching page to be corrected in the unanswered state. It can be an electronic image directly obtained after typesetting on a computer, or it can be obtained by scanning.
[0026] S2. Obtaining an image of the test paper or supplementary teaching page to be corrected. The image of the test paper or supplementary teaching page to be corrected is an image of the test paper or supplementary teaching page on which the student has completed the answering, and can be obtained by taking a photo, scanning, or the like.
[0027] S3, aligning the features of the test paper or supplementary teaching page image with the template image to achieve correction of the test paper or supplementary teaching page image. After the feature alignment, the test paper or supplementary teaching page image and the template image can achieve the area range of each question to be basically consistent.
[0028] S4. Extract calculation questions from the template image and the image of the test paper to be corrected or the image of the supplementary teaching page respectively, and obtain the title information of the calculation questions of the template image as the first information, and the title information of the calculation questions of the test paper to be corrected or the image of the supplementary teaching page as the second information; the title information in the first information includes the stem of the calculation question and the coordinates of the title area of the calculation question, and the title information in the second information includes the coordinates of the title area of the calculation question.
[0029] Specifically, in step S4, a calculation problem object detection model is used to detect the problem area of each calculation problem on the template image and the image of the test paper to be corrected or the supplementary teaching page, and the problem area of each calculation problem is located and extracted respectively to obtain the problem area image and the problem area coordinates; for the template image, the problem area image is further subjected to text recognition to obtain the problem stem of the calculation problem. The calculation problem object detection model can adopt a YOLOv model based on deep learning and is pre-trained and optimized.
[0030] S5. Calculate the stem of each calculation question extracted from the template image to obtain a calculation result and use it as the first answer of each calculation question, and then associate the first answer of each calculation question with the coordinates of the question area in the template image.
[0031] S6. In the question area of each calculation question extracted from the test paper to be corrected or the teaching supplementary page image, identify the handwritten answer result as the second answer of each calculation question, and associate the second answer of each calculation question with its question area coordinates in the test paper to be corrected or the teaching supplementary page image.
[0032] In order to improve the recognition accuracy of the handwritten answer results, constraints may be added to the handwritten answer results. For example, the handwritten answer results should be located on the right side of the "=" in the question area.
[0033] S7. Match the coordinates of the question area in the second information with the coordinates of the question area in the first information, so as to correspond each calculation question in the template image with each calculation question in the test paper to be corrected or the teaching supplementary page image.
[0034] Specifically, when a certain question area in the second information overlaps with a certain question area in the first information, it can be considered that the corresponding two calculation questions correspond.
[0035] More specifically, if a certain topic area in the second information overlaps with a plurality of topic areas in the first information, the intersection-and-union ratios of the topic area in the second information and each overlapping topic area in the first information are calculated respectively, and the topic area in the second information is matched with the topic area in the first information corresponding to the calculated maximum intersection-and-union ratio;
[0036] Intersection-over-union ratio = M(A∩B) / M(A∪B), where A is a certain question area in the second information, B is a certain question area in the first information, A∩B represents the overlapping area of A and B, A∪B represents the area after A and B are merged, and M represents the area.
[0037] S8. Compare the first answer of each calculation question in the template image with the second answer of the corresponding calculation question in the test paper to be corrected or the teaching supplementary page image. When the first answer and the second answer are consistent, the correction result is correct; when they are inconsistent, the correction result is wrong.
[0038] For those skilled in the art, various corresponding changes and modifications can be made according to the above technical solutions and concepts, and all of these changes and modifications should be included in the protection scope of the claims of the present invention.
Claims
1. A method for correcting calculation problems, characterized in that: The steps include: S1. Obtain a template image corresponding to the test paper or teaching supplementary page to be corrected; the template image is the original image of the test paper or teaching supplementary page to be corrected in an unanswered state; S2, obtaining the image of the test paper to be corrected or the teaching aid page; S3, aligning the features of the image of the test paper to be corrected or the supplementary teaching page with the template image to achieve correction of the image of the test paper to be corrected or the supplementary teaching page; S4, extracting calculation questions from the template image and the image of the test paper to be corrected or the supplementary teaching page, and obtaining the title information of the calculation questions of the template image as the first information, and the title information of the calculation questions of the test paper to be corrected or the supplementary teaching page image as the second information; the title information in the first information includes the stem of the calculation question and the coordinates of the title area of the calculation question, and the title information in the second information includes the coordinates of the title area of the calculation question; S5, calculating the stem of each calculation question extracted from the template image to obtain a calculation result and using it as the first answer of each calculation question, and then associating the first answer of each calculation question with the coordinates of the question area in the template image; S6. In the question area of each calculation question extracted from the image of the test paper to be corrected or the supplementary teaching page, a handwritten answer result is identified as a second answer to each calculation question, and the second answer to each calculation question is associated with the coordinates of the question area in the image of the test paper to be corrected or the supplementary teaching page; S7, matching the coordinates of the question area in the second information with the coordinates of the question area in the first information, so as to correspond each calculation question in the template image with each calculation question in the test paper to be corrected or the teaching supplementary page image; S8. Compare the first answer of each calculation question in the template image with the second answer of the corresponding calculation question in the test paper to be corrected or the teaching supplementary page image. When the first answer and the second answer are consistent, the correction result is correct; when they are inconsistent, the correction result is wrong.
2. The method according to claim 1, characterized in that In step S4, a calculation question object detection model is used to detect the question area of each calculation question on the template image and the image of the test paper to be corrected or the teaching aid page, and the question area of each calculation question is located and extracted respectively to obtain the question area image and the question area coordinates; for the template image, text recognition is further performed on the question area image to obtain the question stem of the calculation question.
3. The method according to claim 1, characterized in that In step S7, when a certain question area in the second information overlaps with a certain question area in the first information, it is considered that the two corresponding calculation questions correspond.
4. The method according to claim 3, characterized in that In step S7, if a certain topic area in the second information overlaps with a plurality of topic areas in the first information, the intersection-and-union ratios of the topic area in the second information and each overlapping topic area in the first information are calculated respectively, and the topic area in the second information is matched with the topic area in the first information corresponding to the calculated maximum intersection-and-union ratio; Intersection-over-union ratio = M(A∩B) / M(A∪B), where A is a certain question area in the second information, B is a certain question area in the first information, A∩B represents the overlapping area of A and B, A∪B represents the area after A and B are merged, and M represents the area.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
6. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program; when the processor is used to execute the computer program, the method described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Template-based homework correction method and device, computer equipment and storage medium
CN111680480A
Test paper correction method based on image feature matching and alignment
CN113095187A
Education question automatic correction method and device and electronic equipment
CN113407675A
Teaching-assistant homework identification and correction analysis method and analysis system
CN114299523A
Information matching question correcting method, storage medium and equipment
CN119580286A