Answer text quality detection method, system, device and medium

By employing a method independent of image and text recognition systems and utilizing handwritten word detection and confidence threshold prediction models, the challenge of monitoring answer sheet quality in large-scale examinations has been solved. This enables rapid and accurate quality assessment of answer sheet images and is suitable for large-scale examination scenarios.

CN122176732APending Publication Date: 2026-06-09SHANDONG SAHNDA OUMASOFT CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG SAHNDA OUMASOFT CO LTD
Filing Date
2026-03-17
Publication Date
2026-06-09

Smart Images

  • Figure CN122176732A_ABST
    Figure CN122176732A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of answer sheet text quality detection method, system, equipment and medium, belong to examination and evaluation field.The method comprises: obtaining the test answer sheet image to be detected;It is input to handwriting word detection model, obtains the boundary box information of each handwriting word unit and corresponding confidence;Test answer sheet image is input to confidence threshold prediction model, and dynamic confidence threshold is obtained;Based on confidence and dynamic confidence threshold, each handwriting word unit is filtered, and the total number of filtered handwriting word unit is counted;According to boundary box information, the line rearrangement of each handwriting word unit after filtering is carried out to calculate effective text line number;Based on handwriting word unit total number and effective text line number, in combination with preset quality evaluation rule, the text quality of test answer sheet image is evaluated, and quality evaluation result is obtained.It is low in computational complexity, fast in processing speed, can satisfy the demand of text integrity in large-scale business scene to carry out rapid verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of examination and assessment technology, specifically to a method, system, device, and medium for detecting the quality of answer sheet text. Background Technology

[0002] With the deepening of digitalization and intelligentization in the field of examination and assessment, intelligent marking is gradually being applied to large-scale examinations. Typically, paper answer sheets are scanned, and image recognition technologies such as optical character recognition (OCR) are used to convert the handwritten characters in the images into computer-processable text data. This text is then used for automated scoring and analysis. However, in practical applications, especially when dealing with millions of cases, there is a lack of effective mechanisms for efficient and automated quality monitoring of the image recognition results.

[0003] The image acquisition conditions for exam answer sheets are complex and varied. Factors such as scanning equipment performance, paper condition, and ambient lighting often lead to image quality degradation, resulting in problems like blurriness, wrinkles, insufficient contrast, or shadow interference. Furthermore, the significant differences in candidates' handwriting styles, including illegible handwriting, characters sticking together, and broken strokes, further increase the difficulty of recognition. Existing image recognition systems, when processing such answer sheets, are not only prone to single-character recognition errors but may also miss structural elements such as lines or even blocks of text.

[0004] A more complex technical challenge lies in the fact that test takers commonly make corrections while answering questions. For example, after crossing out original text, they may write corrections in the blank spaces above or below it. Existing image and text recognition systems cannot associate these additions with the original answer lines. They typically rely solely on the absolute coordinates of the characters, mechanically classifying the additions as new, independent lines of text. This erroneous line segmentation can lead to inaccurate recognition results.

[0005] Currently, the main method for addressing the aforementioned issues is manual sampling review. However, in large-scale examination scenarios, this method suffers from drawbacks such as low coverage, low efficiency, high cost, and difficulty in standardization, making it impossible to effectively screen potentially abnormal answer sheets. Therefore, the industry urgently needs a quality inspection solution independent of image and text recognition systems to quickly detect answer sheets with potentially questionable image and text recognition results, providing precise targets for manual review and improving the overall reliability and robustness of the intelligent marking process. Summary of the Invention

[0006] The purpose of this invention is to provide a method, system, device, and medium for detecting the quality of answer sheet text. It establishes an analysis mechanism based on the underlying features of the image, independent of the specific character recognition content. By quickly and accurately counting the total number of handwritten word units in the answer sheet image and analyzing its spatial row structure, it can efficiently screen out answer sheets that may have quality risks such as missed recognition or disordered row structure in the image-text recognition results.

[0007] To achieve the above objectives, embodiments of the present invention provide a method for detecting the quality of answer sheet text, comprising: Obtain the image of the exam answer sheet to be tested; The exam answer sheet image is input into a pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit; The exam answer sheet image is input into a pre-trained confidence threshold prediction model to obtain the dynamic confidence threshold of the exam answer sheet image; Based on the confidence level of each handwritten word unit and the dynamic confidence threshold, each handwritten word unit is filtered, and the total number of filtered handwritten word units is counted; and according to the bounding box information, each filtered handwritten word unit is rearranged in rows to calculate the number of effective text lines. Based on the total number of handwritten word units and the number of valid text lines, and in conjunction with preset quality assessment rules, the text quality of the exam answer sheet image is assessed to obtain the quality assessment result.

[0008] Optionally, the training process of the handwritten word detection model includes: Construct a training dataset, wherein the training dataset contains exam answer sheet images of various writing styles and qualities; All handwritten words in the training dataset are uniformly labeled; wherein, the handwritten words are single handwritten Chinese characters in the Chinese context, and handwritten words separated by spaces in the English or Western context; all handwritten words are labeled into the same category; A pre-trained object detection model is used as the base network to detect and locate the handwritten words. The handwritten word detection model is trained using the training dataset until it converges.

[0009] Optionally, the training process of the confidence threshold prediction model includes: Construct a training dataset in which, for each sample image with the number of real handwritten word units labeled, the trained handwritten word detection model is used to perform inference to obtain multiple detection boxes and their confidence scores. Within a preset range, candidate confidence thresholds are traversed, and candidate thresholds whose deviations from the predicted number and the actual number meet the preset values ​​are determined as the confidence threshold labels for the sample image. The confidence threshold prediction model is constructed by using a feature extraction network shared with the handwritten word detection model and connecting a lightweight prediction head after the shared feature extraction network. The lightweight prediction head consists of a global average pooling layer, a fully connected layer, a ReLU activation function, a fully connected layer, and a Sigmoid activation function. The constructed confidence threshold prediction model is trained using the constructed training dataset until it converges.

[0010] Optionally, based on the bounding box information, the filtered handwritten word units are rearranged in rows to calculate the number of valid text lines, including: Sorting steps: Sort each filtered handwritten word unit according to its vertical center coordinates. Sort from top to bottom; Seed allocation steps: Initialize an empty row list and use the first character after sorting as the seed for the first row; Calculation steps: For the row currently being constructed, dynamically calculate its vertical center. and average character height ; Allocation steps: Iterate through the remaining unallocated handwritten words in order, and calculate the vertical center of the current handwritten word. Vertical center of the current row distance If the distance Less than the preset dynamic proximity threshold If the handwritten word is correct, it will be added to the current line; otherwise, it will be used as the seed for the next line, ending the construction of the current line and starting the construction of the next line. Repeat the calculation and assignment steps until all handwritten words have been assigned to rows. The final number of rows is the number of valid rows.

[0011] Optionally, the preset dynamic proximity threshold can be calculated according to the following formula. :

[0012] in, This is an empirical coefficient. The average character height of the line currently being constructed.

[0013] Optionally, the preset quality assessment rule is: Determine whether the first deviation between the total number of handwritten word units and the total number of reference handwritten word units meets a first preset threshold. Determine whether the second deviation between the number of valid text lines and a reference number of valid text lines meets a second preset threshold. If the first deviation meets the first preset threshold and the second deviation meets the second preset threshold, the quality of the answer sheet text is determined to be qualified; otherwise, it is determined to be abnormal.

[0014] Optionally, the total number of reference handwritten word units and the number of reference valid text lines are obtained from a handwritten word recognition system that recognizes the same answer sheet image.

[0015] Secondly, the present invention also provides a system for detecting the quality of answer sheet text, comprising: The image acquisition unit is used to acquire the exam answer sheet image to be detected; The handwritten word detection unit is used to input the exam answer sheet image into a pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit; The handwritten word confidence threshold prediction unit is used to input the exam answer sheet image into a pre-trained confidence threshold prediction model to obtain the dynamic confidence threshold of the exam answer sheet image. The counting and analysis unit is used to filter each handwritten word unit based on the confidence level corresponding to each handwritten word unit and the dynamic confidence threshold, and count the total number of handwritten word units after filtering; and to rearrange the rows of each handwritten word unit after filtering according to the bounding box information to calculate the number of effective text lines. The quality assessment unit is used to assess the text quality of the exam answer sheet image based on the total number of handwritten word units and the number of valid text lines, combined with preset quality assessment rules, and to obtain the quality assessment result.

[0016] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method for detecting the quality of the questionnaire text.

[0017] Fourthly, the present invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method for detecting the quality of the answer sheet text.

[0018] The above technical solution provides a lightweight, stable and reliable method for detecting the quality of answer sheet text. It is suitable for rapid screening of massive answer sheet images in large-scale examination scenarios and can effectively identify answer sheets that may have text omissions or abnormal line structures, providing an efficient and objective screening basis for subsequent manual review.

[0019] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0020] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for detecting the quality of answer sheet text provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a confidence threshold prediction model provided in an embodiment of the present invention; Figure 3 This is a detailed flowchart of a row rearrangement provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a questionnaire text quality detection system provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0021] Various embodiments of this disclosure will be described more fully in the following detailed description. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.

[0022] In the following, the terms “comprising” or “may include”, which may be used in various embodiments of this disclosure, indicate the presence of the disclosed functions or operations and do not limit the addition of one or more functions or operations. Furthermore, as used in various embodiments of this disclosure, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, or combination of the foregoing and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, or combinations of the foregoing, or the possibility of adding one or more features, numbers, steps, operations, or combinations of the foregoing.

[0023] In various embodiments of this disclosure, the expression "or" or "at least one of A and / or B" includes any combination or all combinations of the words listed simultaneously. For example, the expression "A or B" or "at least one of A and / or B" may include A, may include B, or may include both A and B.

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] To enable those skilled in the art to better understand the technical solution of this invention, a detailed and complete description of this application will be provided below in conjunction with a real-world exam marking embodiment. This embodiment involves the quality inspection of transcribed text from over 150,000 examinees and more than 600,000 answer sheet images. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of protection of this invention.

[0026] In this embodiment, the word count requirement for each question and the number of answer sheet images are shown in Table 1 below: Table 1: Word Count Requirements for Exam Questions and Number of Images for Answer Sheets

[0027] See Figure 1 The diagram shows a flowchart of a method for detecting the quality of answer sheet text in a specific embodiment, including the following execution steps: Step 100: Obtain the image of the exam answer sheet to be tested.

[0028] Specifically, the examination scanning system retrieves the answer sheet image file to be processed by the security number. The image is a JPEG image with RGB three channels.

[0029] Step 101: Input the exam answer sheet image into the pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit.

[0030] Specifically, the training process of the handwritten word detection model includes the following sub-steps: S1: Construct the training dataset.

[0031] The training dataset contains exam answer sheet images with various writing styles and qualities.

[0032] For example, simulated answer images: 200 people simulated answering questions on answer sheets of different sizes, and the images were scanned, resulting in a total of 1000 images. The 200 people were randomly divided into two groups, A and B, with 100 people in each group and 500 images in each group. Group A served as the training set, and group B served as the validation set.

[0033] S2: Perform unified annotation on all handwritten words in the training dataset.

[0034] The handwritten words and phrases are single handwritten Chinese characters in the Chinese context, and handwritten words separated by spaces in the English or Western context; all handwritten words and phrases are labeled into the same category.

[0035] Specifically, annotation tools are used to perform detailed annotations on the simulated answer images. The annotation specifications defined in this invention are strictly followed: each handwritten word unit in the image is outlined with a rectangle. In the Chinese context, each independent Chinese character (whether connected or not) is annotated with a separate box; in the English or Western context, a complete word separated by spaces is annotated with a single box, and punctuation marks are treated as one character.

[0036] Data Augmentation and Synthesis: To improve model robustness, the A group data was augmented to 5000 images. In addition, synthesis techniques were used to generate approximately 100,000 simulated answer sheet images with different paper sizes, writing styles, handwriting thicknesses, and layout noise, with annotation rules identical to the simulated answer data. Ultimately, the training set consisted of 5000 augmented simulated answer images and 100,000 synthesized images.

[0037] S3: Using a pre-trained object detection model as the base network, with the goal of detecting and locating the handwritten words, the handwritten word detection model is trained using the training dataset until it converges.

[0038] In one specific embodiment, the training of the handwritten word detection model includes: preferably using a pre-trained YOLOv11m object detection model as the base network. The training objective function is the object detection loss, which includes a weighted sum of bounding box regression loss, classification loss, and confidence loss. During training, the image size is adjusted to 640×640, the batch size is set to 32, the AdamW optimizer is used, the initial learning rate is 0.001, and a total of 50 training epochs are performed. During training, an independent validation set (500 real images in Part B) is used to monitor the model's performance on unseen real data. When the model's mean accuracy (mAP@0.5) on the validation set reaches above 99.49% and tends to stabilize, the model is considered to have converged, and the final weights are saved.

[0039] In one specific implementation, step 101 can be performed by inputting the exam answer sheet image into a pre-trained handwritten word detection model. The model performs forward inference on the image and outputs a series of detection box information. Each detection box includes: the coordinates of the top-left corner (x1, y1), the coordinates of the bottom-right corner (x2, y2), and a confidence score (range 0-1) indicating the presence of a handwritten word within the box. In this embodiment, the model uses the YOLOv11m architecture based on the PyTorch framework, and the input image is uniformly scaled to 640×640 pixels during inference.

[0040] In one specific embodiment, the image is input into the YOLOv11m network model. The model performs forward propagation calculations from the feature extraction backbone network to the multi-scale feature fusion neck network, and finally to the detection head. During this process, a series of initial predictions are generated in parallel on numerous pre-defined "anchor points" or "grids" densely distributed at different locations within the image. Each prediction contains several core pieces of information: the offset of the predicted bounding box relative to its anchor point, the height and width of the box, and the probability that the box contains handwritten word units. Based on the anchor point position and its predefined size corresponding to each prediction, combined with the predicted offset and scaling factor, the system calculates the x and y coordinates of the center point of each predicted bounding box on the 640x640 input image grid, as well as the width and height of the box. Based on the object confidence score of each predicted bounding box, a low initial threshold is set, and all predicted bounding boxes below this threshold are directly discarded. Sort all remaining predicted bounding boxes in descending order of their confidence level. First, select the box with the highest confidence level. Then, calculate the overlap area between all other boxes and the box with the highest confidence level. If the overlap exceeds a preset threshold, it is considered a duplicate detection of the same target and is discarded. Next, select the box with the highest confidence level from the remaining boxes and repeat the above process until all boxes have been processed. Finally, retain a set of non-overlapping or highly overlapping predicted bounding boxes with the highest confidence level.

[0041] Step 102: Input the exam answer sheet image into a pre-trained confidence threshold prediction model to obtain the dynamic confidence threshold of the exam answer sheet image.

[0042] Specifically, the training process of the confidence threshold prediction model includes the following sub-steps: S1: Construct the training dataset.

[0043] For each sample image with the number of real handwritten word units labeled, the trained handwritten word detection model is used to perform inference to obtain multiple detection boxes and their confidence scores.

[0044] For example, using a trained handwritten word detection model, inference is performed on all training data (5000 enhanced simulated answer images from Group A and 100,000 synthetic data images), outputting a set of detection boxes and their confidence scores for each image. Within a preset candidate threshold range [0.05, 0.95], the model iterates with a step size of 0.01. For each candidate threshold, the number of predicted boxes is counted. After iterating through all candidate thresholds, the threshold that minimizes the absolute deviation between the number of actual handwritten word units and the number of predicted boxes is determined as the confidence threshold label for that image.

[0045] S2: Traverse the candidate confidence thresholds within the preset range, and determine the candidate thresholds whose deviation between the predicted quantity and the actual quantity meets the preset value as the confidence threshold label of the sample image.

[0046] S3: The confidence threshold prediction model is constructed by using a feature extraction network shared with the handwritten word detection model and connecting a lightweight prediction head after the shared feature extraction network.

[0047] The lightweight prediction head consists of a global average pooling layer, a fully connected layer, a ReLU activation function, another fully connected layer, and a Sigmoid activation function.

[0048] In one specific embodiment, such as Figure 2 As shown, this confidence threshold prediction model reuses the feature extraction network (Backbone) of a pre-trained handwritten word detection model. The answer sheet image is input into the reused Backbone to obtain a high-level feature map. After this feature map, the original YOLO detection head is removed, and a lightweight prediction head is connected. This prediction head consists of: a global average pooling layer (GAP), a fully connected layer with an output dimension of 256 (Linear), a ReLU activation function, a fully connected layer with an output dimension of 1, and finally a Sigmoid activation function, mapping the output value to the (0, 1) interval as the predicted threshold.

[0049] S4: Using the constructed training dataset, train the constructed confidence threshold prediction model until it converges.

[0050] In one specific embodiment, the training data consists of generated (image, threshold) pairs. During training, mean squared error loss (MSE Loss) is used as the loss function, the optimizer is Adam, the learning rate is 0.0001, and training is performed for 10 epochs until the loss converges.

[0051] In one specific implementation, step 102 can be performed by inputting the same exam answer sheet image into a pre-trained confidence threshold prediction model. This model outputs a dynamic confidence threshold T (a floating-point number between 0 and 1) for the current image. This threshold will be used to filter the candidate detection boxes generated in the previous step.

[0052] Step 103: Based on the confidence level of each handwritten word unit and the dynamic confidence threshold, filter each handwritten word unit and count the total number of filtered handwritten word units; and rearrange the rows of each filtered handwritten word unit according to the bounding box information to calculate the number of effective text lines.

[0053] It should be understood that the dynamic confidence threshold calculated using the confidence threshold prediction model is used to filter the detection boxes output by the handwritten word detection model, and only detection boxes with a confidence level higher than the dynamic confidence threshold are included in the total number of handwritten word units.

[0054] Specifically, based on the bounding box information, the filtered handwritten word units are rearranged in rows to calculate the number of valid text lines, including the following sub-steps: Sorting steps: Sort each filtered handwritten word unit according to its vertical center coordinates. Sort from top to bottom; Seed allocation steps: Initialize an empty row list and use the first character after sorting as the seed for the first row; Calculation steps: For the row currently being constructed, dynamically calculate its vertical center. and average character height ; Allocation steps: Iterate through the remaining unallocated handwritten words in order, and calculate the vertical center of the current handwritten word. Vertical center of the current row distance If the distance Less than the preset dynamic proximity threshold If the handwritten word is correct, it will be added to the current line; otherwise, it will be used as the seed for the next line, ending the construction of the current line and starting the construction of the next line. Repeat the calculation and assignment steps until all handwritten words have been assigned to rows. The final number of rows is the number of valid rows.

[0055] More specifically, the preset dynamic proximity threshold is calculated according to the following formula. :

[0056] in, This is an empirical coefficient. The average character height of the line currently being constructed.

[0057] For example, the empirical coefficient β has a value range of [0.4, 0.6], and in this embodiment, it is 0.5.

[0058] The purpose of rearranging the lines of each filtered handwritten word unit according to the bounding box information to calculate the number of effective text lines is to merge spatially discrete character boxes into logical lines.

[0059] In one specific embodiment, see Figure 3 The diagram shown is a detailed flowchart of a row rearrangement provided by an embodiment of the present invention, including the following steps: S300: Sort all detected word units from top to bottom according to their vertical center coordinates.

[0060] S301: Initialize an empty list of rows and use the first character of the sorted list as the seed for the first row.

[0061] S302: Determine if there are any unassigned characters. If yes, proceed to step S303; otherwise, proceed to step S308.

[0062] S303: For the row currently being built, dynamically calculate its vertical center and average character height.

[0063] S304: Traverse the remaining unallocated characters in order and calculate the distance between the vertical center of the current character and the vertical center of the current line.

[0064] S305: Determine if the distance is less than the nearest threshold. If yes, proceed to step S306; otherwise, proceed to step S307.

[0065] S306: Add the character to the current line and continue executing S302 in a loop.

[0066] S307: Use this character as the seed for the next line, end the construction of the current line and begin the construction of the next line.

[0067] S308: Row rearrangement is complete. The number of rows in the final row list is the number of valid rows.

[0068] In one specific implementation, filtering, counting, and line rearrangement include: Filtering: Traversing all detection boxes obtained in step S102, filtering out boxes whose confidence is greater than the dynamic threshold T obtained in step S103. Counting: Counting the total number of detection boxes retained after filtering, as the total number N of handwritten word units. Line rearrangement: For only the detection boxes retained after filtering, based on their bounding box coordinate information, performing a fast sequential line rearrangement algorithm to merge all word units belonging to the same logical text line, and finally calculating the number L of valid text lines for the answer sheet.

[0069] Step 104: Based on the total number of handwritten word units and the number of valid text lines, and in conjunction with the preset quality assessment rules, evaluate the text quality of the exam answer sheet image to obtain the quality assessment result.

[0070] Specifically, the preset quality assessment rule is as follows: determine whether the first deviation between the total number of handwritten word units and the total number of reference handwritten word units meets a first preset threshold; determine whether the second deviation between the number of valid text lines and the number of reference valid text lines meets a second preset threshold; if the first deviation meets the first preset threshold and the second deviation meets the second preset threshold, then the answer sheet text quality is deemed qualified; otherwise, it is deemed abnormal.

[0071] The total number of reference handwritten word units and the number of reference valid text lines are derived from a handwritten word recognition system that recognizes the same answer sheet image.

[0072] It should be noted that the first preset threshold and the second preset threshold are dynamically determined based on the question type in the answer sheet image.

[0073] In one specific implementation, the total number N of handwritten word units and the number L of valid text lines are compared with preset quality assessment rules. Based on the rules, it is determined whether the image and text recognition quality of the answer sheet is up to standard, and the final quality inspection result of "qualified" or "abnormal" is output.

[0074] For example, over 600,000 exam answer sheet images were transcribed by a handwritten word recognition system, with each image outputting text including line breaks. Two key reference values ​​were then derived from this data: the total number of recognized words and phrases. and the total number of lines of text it divides .

[0075] Calculate the relative deviation in word count: .

[0076] Calculate the absolute deviation of the number of rows: .

[0077] In this embodiment, the following rules are preset based on the characteristics of the question type: For short answer, essay, and analytical questions: the first preset threshold (number of words) TH1 is 5%; the second preset threshold (number of lines) TH2 is 1 line.

[0078] For essay questions: the first preset threshold (number of words) TH1 is 10%; the second preset threshold (number of lines) TH2 is 2 lines.

[0079] In this embodiment, the preset thresholds for each question are shown in Table 2 below: Table 2: Preset Thresholds for Each Question

[0080] If both conditions are met , If the image recognition result of this answer sheet is deemed "qualified", then the quality of the image recognition result is determined to be "qualified".

[0081] If both conditions are met , If the result is not found, the quality of the image recognition result for this answer sheet is determined to be "abnormal".

[0082] The above system was applied to the full answer sheet testing of all four questions in this exam. Its efficiency and detection results are shown in Table 3 below: Table 3: Efficiency and Detection Effectiveness

[0083] In this embodiment, the system successfully and automatically screened out 449 answer sheets with quality issues from a massive number of answer sheets. After manual review, it was confirmed that the image and text recognition results of these answer sheets all had problems. The entire processing flow took an average of approximately 20 milliseconds per answer sheet, fully demonstrating the independent, efficient, and accurate benefits of the proposed method, and fully meeting the real-time quality inspection needs of large-scale examination scenarios.

[0084] This embodiment proposes a method for evaluating the quality of answer sheets that is independent of handwriting recognition systems. By directly analyzing the original answer sheet images, without relying on the internal output or confidence level of any specific recognition system, it can objectively evaluate the recognition results of different systems. This method mainly includes the following technical features: First, by uniformly labeling Chinese and English handwritten words as a single detection category for model training, the model becomes more focused on target localization, improving processing speed and adaptability to different writing styles.

[0085] Secondly, a dynamic confidence threshold prediction mechanism is introduced, which can adaptively adjust the filtering criteria according to the image content, thereby significantly improving the accuracy of handwritten word unit counting.

[0086] Furthermore, by employing a row rearrangement algorithm based on the spatial distribution relationship of characters, we can logically merge and correct row structure anomalies caused by answer modifications, providing more reliable row structure analysis results.

[0087] Overall, this invention provides a lightweight, stable, and reliable method for detecting the quality of answer sheet text. It is suitable for rapid screening of massive amounts of answer sheet images in large-scale examination scenarios and can effectively identify answer sheets that may have problems such as missing text or abnormal line structure, providing an efficient and objective screening basis for subsequent manual review.

[0088] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0089] like Figure 4 As shown, the following are embodiments of the questionnaire text quality detection system provided in this disclosure. The questionnaire text quality detection method belongs to the same inventive concept as the questionnaire text quality detection method in the above embodiments. For details not described in detail in the embodiments of the questionnaire text quality detection system, please refer to the embodiments of the questionnaire text quality detection method described above.

[0090] The system for detecting the quality of answer sheet text includes: The image acquisition unit is used to acquire the exam answer sheet image to be detected; The handwritten word detection unit is used to input the exam answer sheet image into a pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit; The handwritten word confidence threshold prediction unit is used to input the exam answer sheet image into a pre-trained confidence threshold prediction model to obtain the dynamic confidence threshold of the exam answer sheet image. The counting and analysis unit is used to filter each handwritten word unit based on the confidence level corresponding to each handwritten word unit and the dynamic confidence threshold, and count the total number of handwritten word units after filtering; and to rearrange the rows of each handwritten word unit after filtering according to the bounding box information to calculate the number of effective text lines. The quality assessment unit is used to assess the text quality of the exam answer sheet image based on the total number of handwritten word units and the number of valid text lines, combined with preset quality assessment rules, and to obtain the quality assessment result.

[0091] Figure 5 This is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.

[0092] The method for detecting the quality of questionnaire text provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.

[0093] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.

[0094] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0095] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0096] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0097] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.

[0098] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.

[0099] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0100] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.

[0101] Electronic devices can achieve display functions through GPUs, displays, and application processors.

[0102] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.

[0103] A display screen is used to display images, videos, etc. A display screen includes a display panel.

[0104] The storage medium provided in this application stores a program product capable of implementing a method for detecting the quality of answer sheet text.

[0105] The method for detecting the quality of exam answer sheet text includes: acquiring an image of the exam answer sheet to be detected; inputting the exam answer sheet image into a pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit; inputting the exam answer sheet image into a pre-trained confidence threshold prediction model to obtain a dynamic confidence threshold for the exam answer sheet image; filtering each handwritten word unit based on its corresponding confidence score and the dynamic confidence threshold, and counting the total number of filtered handwritten word units; rearranging the rows of each filtered handwritten word unit according to the bounding box information to calculate the number of effective text lines; and evaluating the text quality of the exam answer sheet image based on the total number of handwritten word units and the number of effective text lines, combined with preset quality assessment rules, to obtain a quality assessment result.

[0106] In some possible implementations, the subject matter of this disclosure, the method and system for detecting the quality of questionnaire text, can be implemented as a program product comprising program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of this disclosure.

[0107] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0108] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting the quality of answer sheet text, characterized in that, include: Obtain the image of the exam answer sheet to be tested; The exam answer sheet image is input into a pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit; The exam answer sheet image is input into a pre-trained confidence threshold prediction model to obtain the dynamic confidence threshold of the exam answer sheet image; Based on the confidence level of each handwritten word unit and the dynamic confidence threshold, each handwritten word unit is filtered, and the total number of filtered handwritten word units is counted. Based on the bounding box information, the filtered handwritten word units are rearranged in rows to calculate the number of valid text lines; Based on the total number of handwritten word units and the number of valid text lines, and in conjunction with preset quality assessment rules, the text quality of the exam answer sheet image is assessed to obtain the quality assessment result.

2. The method for detecting the quality of answer sheet text according to claim 1, characterized in that, The training process of the handwritten word detection model includes: Construct a training dataset, wherein the training dataset contains exam answer sheet images of various writing styles and qualities; All handwritten words in the training dataset are uniformly labeled; wherein, the handwritten words are single handwritten Chinese characters in the Chinese context, and handwritten words separated by spaces in the English or Western context; all handwritten words are labeled into the same category; A pre-trained object detection model is used as the base network to detect and locate the handwritten words. The handwritten word detection model is trained using the training dataset until it converges.

3. The method for detecting the quality of answer sheet text according to claim 2, characterized in that, The training process of the confidence threshold prediction model includes: Construct a training dataset in which, for each sample image with the number of real handwritten word units labeled, the trained handwritten word detection model is used to perform inference to obtain multiple detection boxes and their confidence scores. Within a preset range, candidate confidence thresholds are traversed, and candidate thresholds whose deviations from the predicted number and the actual number meet the preset values ​​are determined as the confidence threshold labels for the sample image. The confidence threshold prediction model is constructed by using a feature extraction network shared with the handwritten word detection model and connecting a lightweight prediction head after the shared feature extraction network. The lightweight prediction head consists of a global average pooling layer, a fully connected layer, a ReLU activation function, a fully connected layer, and a Sigmoid activation function. The constructed confidence threshold prediction model is trained using the constructed training dataset until it converges.

4. The method for detecting the quality of answer sheet text according to claim 1, characterized in that, Based on the bounding box information, the filtered handwritten word units are rearranged in rows to calculate the number of valid text lines, including: Sorting steps: Sort each filtered handwritten word unit according to its vertical center coordinates. Sort from top to bottom; Seed allocation steps: Initialize an empty row list and use the first character after sorting as the seed for the first row; Calculation steps: For the row currently being constructed, dynamically calculate its vertical center. and average character height ; Allocation steps: Iterate through the remaining unallocated handwritten words in order, and calculate the vertical center of the current handwritten word. Vertical center of the current row distance If the distance Less than the preset dynamic proximity threshold If the handwritten word is correct, it will be added to the current line; otherwise, it will be used as the seed for the next line, ending the construction of the current line and starting the construction of the next line. Repeat the calculation and assignment steps until all handwritten words have been assigned to rows. The final number of rows is the number of valid rows.

5. The method for detecting the quality of answer sheet text according to claim 4, characterized in that, The preset dynamic proximity threshold is calculated according to the following formula. : in, This is an empirical coefficient. The average character height of the line currently being constructed.

6. The method for detecting the quality of answer sheet text according to claim 1, characterized in that, The preset quality assessment rules are as follows: Determine whether the first deviation between the total number of handwritten word units and the total number of reference handwritten word units meets a first preset threshold. Determine whether the second deviation between the number of valid text lines and a reference number of valid text lines meets a second preset threshold. If the first deviation meets the first preset threshold and the second deviation meets the second preset threshold, the quality of the answer sheet text is determined to be qualified; otherwise, it is determined to be abnormal.

7. The method for detecting the quality of answer sheet text according to claim 6, characterized in that, The total number of reference handwritten word units and the number of reference valid text lines are obtained from a handwritten word recognition system that recognizes the same answer sheet image.

8. A system for detecting the quality of answer sheet text, characterized in that, include: The image acquisition unit is used to acquire the exam answer sheet image to be detected; The handwritten word detection unit is used to input the exam answer sheet image into a pre-trained handwritten word detection model to obtain the bounding box information and corresponding confidence scores of each handwritten word unit; The handwritten word confidence threshold prediction unit is used to input the exam answer sheet image into a pre-trained confidence threshold prediction model to obtain the dynamic confidence threshold of the exam answer sheet image. The counting and analysis unit is used to filter each handwritten word unit based on the confidence level corresponding to each handwritten word unit and the dynamic confidence level threshold, and to count the total number of handwritten word units after filtering. Based on the bounding box information, the filtered handwritten word units are rearranged in rows to calculate the number of valid text lines; The quality assessment unit is used to assess the text quality of the exam answer sheet image based on the total number of handwritten word units and the number of valid text lines, combined with preset quality assessment rules, and to obtain the quality assessment result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method for detecting the quality of the answer sheet text as described in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for detecting the quality of the answer sheet text as described in any one of claims 1 to 7.