Answer sheet filling recognition method, model building method, device and storage medium
By constructing a filling and identification model and considering a variety of influencing factors, the problem of low accuracy of filling and identification of answer sheets in the existing technology has been solved, and a higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202111677667.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing method of filling and identifying answer sheets is affected by factors such as the depth of the paper printing ink, the imaging environment of the scanner, and the filling habits of the candidates, and the recognition accuracy is low.
By constructing a filling and identification model, we will comprehensively consider the image base color, the color depth of the filling option, the filling option filling rate, the minimum color depth of the filling question and the type of the filling question, and obtain the training sample data for model training, and get the construction well fill-up identification model.
The accuracy of answer sheets is improved, and the results of filling out the answer sheets can be more effectively identified, reducing identification errors caused by objective and subjective factors.
Smart Images

Figure CN114359936B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning technology, and in particular to a method for identifying answer sheet filling, a method for constructing a filling recognition model, a computer device and a storage medium. Background Art
[0002] After the paper-based test is completed, the answer sheets filled in by the candidates need to be collected and submitted to the online evaluation system for processing. The online evaluation system uses a scanner to scan all answer sheets and identify the options filled in by the candidates. Most of the existing answer sheet filling methods use threshold parameter judgment methods. Specifically, for example, some feature parameter thresholds are set first, and then the image features of the filled options are judged. If the image features are higher or lower than these parameter thresholds, the filling recognition results are set to valid or invalid.
[0003] However, since the image generated after the answer sheet is scanned is affected by many factors, such as objective factors such as the depth of the printing ink on the answer sheet paper, the imaging environment of the scanner, and subjective factors such as the candidate's filling habits, the recognition accuracy of the threshold judgment method is low. Summary of the invention
[0004] The present application provides a method for constructing a filling recognition model, an answer sheet filling recognition method, a computer device and a storage medium, which can improve the recognition accuracy of answer sheet filling.
[0005] In a first aspect, the present application provides a method for identifying answer sheet filling, the method comprising:
[0006] Obtain the image corresponding to the answer sheet to be identified;
[0007] Obtaining target characteristic parameters of the fill option image in the image, wherein the target characteristic parameters include image background color, fill option color depth, fill option fill rate, fill question minimum color depth and fill question type;
[0008] The target feature parameters of the fill option image are input into the fill recognition model for recognition to obtain the fill option result; wherein the fill recognition model is constructed based on the image background color, fill option color depth, fill option fill rate, fill question minimum color depth and fill question type.
[0009] In a second aspect, the present application also provides a method for constructing a filling recognition model, the method comprising:
[0010] Acquire training sample data, wherein the training sample data includes a plurality of fill-in option images and a labeling result corresponding to each of the fill-in option images, each of the fill-in option images corresponds to a target feature parameter, and the target feature parameter includes image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type;
[0011] The target feature parameters and annotation results corresponding to the filling option image are input into the filling recognition model to be constructed for model training to obtain the constructed filling recognition model.
[0012] In a third aspect, the present application further provides a computer device, the computer device comprising:
[0013] Memory and processor;
[0014] Wherein, the memory is connected to the processor and is used to store programs;
[0015] The processor is used to implement the steps of the method for constructing a filling-in recognition model as described in any one of the embodiments of the present application by running the program stored in the memory, or to implement the steps of the method for filling-in recognition of an answer sheet as described in any one of the embodiments of the present application.
[0016] In a fourth aspect, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the steps of a method for constructing a filling-in recognition model as described in any one of the embodiments of the present application, or implements the steps of a method for filling-in recognition of an answer sheet as described in any one of the embodiments of the present application.
[0017] The method for constructing a filling recognition model, the answer sheet filling recognition method, the computer device and the storage medium disclosed in the present application comprehensively consider factors such as the image background color, the color depth of the filling options, the filling rate of the filling options, the minimum color depth of the filling questions and the type of filling questions, thereby solving the influence of objective factors of the answer sheet and subjective factors of the students when answering, thereby improving the recognition accuracy of the filling of the answer sheet.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a schematic diagram of the steps of a method for constructing a filling recognition model provided in an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of the effect of filling option images provided in an embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of the steps of another method for constructing a filling recognition model provided in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of the structure of a neural network model provided in an embodiment of the present application;
[0024] Figure 5 It is a schematic diagram of the steps of a method for constructing a neural network model provided in an embodiment of the present application;
[0025] Figure 6 It is a schematic diagram of the steps of a method for identifying answer sheet filling provided in an embodiment of the present application;
[0026] Figure 7 It is a schematic diagram of the steps of another answer sheet filling and recognition method provided in an embodiment of the present application;
[0027] Figure 8 This is a schematic diagram of the steps of another answer sheet filling and recognition method provided in an embodiment of the present application;
[0028] Fig. 9 It is a schematic block diagram of a computer device provided in an embodiment of the present application.
[0029] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0032] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0033] It should be understood that, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially identical functions and effects. For example, the first recognition model and the second recognition model are only used to distinguish between different callback functions, and their order of precedence is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0034] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0035] To facilitate understanding of the embodiments of the present application, some words involved in the embodiments of the present application are briefly explained below.
[0036] 1. Answer sheet: During the paper-based test, candidates mark the test questions and answer the questions in the form of separate questionnaires and answer sheets. Candidates read the questions on the test paper and write the answers on another card, which is the answer sheet. After the test, the answer sheets are collected and scanned to obtain the image of the answer sheet. Of course, the answer sheet can also be photographed to obtain the image of the answer sheet.
[0037] 2. Fill in the questions: There is a question in the answer sheet that requires the candidates to fill in all the options.
[0038] 3. Fill-in options: There are some fill-in contents in the answer sheet, such as the answers to the options of the objective questions, etc. These contents are called fill-in options. For example, option A of the first objective question. A fill-in question contains several fill-in options.
[0039] 4. Image background color: The average grayscale of the blank area (area without text or graphics) of the answer sheet image (generally a 256-level grayscale image).
[0040] 5. Fill in option parameters: The image feature parameters of the fill in option on the answer sheet are called fill in option parameters.
[0041] 6. Color depth of filling options: the average grayscale within the range of filling options on the answer sheet. Since the image of the answer sheet is generally 256 levels of grayscale, the value range is from 0 to 255. 0 represents full black, 255 represents full white, and the intermediate value represents other grayscales.
[0042] 7. Fill rate of fill options: the percentage of all black pixels (pixels darker than the image background color of the answer sheet image) in the fill options on the answer sheet occupied by the fill area.
[0043] 8. Minimum color depth for filling in questions: The color depth value of the darkest (with the smallest average grayscale) among all the filling options in the question on the answer sheet.
[0044] 9. Types of questions: single-choice questions and multiple-choice questions. Indicate whether all the options of this question can be filled in multiple times.
[0045] 10. Fill in the option results: The result of the fill in option in the question recognition, the value is 0 or 1, 0 means invalid filling, and 1 means valid filling.
[0046] 11. Fill-in option recognition probability: The fill-in recognition model determines the probability that the fill-in option result is valid based on the fill-in option parameters. The result is data between 0 and 1, where 0 means no filling at all and 1 means complete filling.
[0047] 12. Recognition credibility: An indicator used for manual verification of the recognition results of the filled-in options at a later stage, which can reflect the reliability of the recognition results.
[0048] At present, after the paper-based test is completed, a large number of answer sheets filled in by candidates need to be collected and handed over to the online evaluation system for processing. On the one hand, the online evaluation system uses the scanning function to scan all answer sheets and identify the options filled in by candidates (such as the results of the options filled in for objective questions). Since the answer sheet often contains a large number of filling options (such as objective questions), and these options need to be automatically identified by computer programs, answer sheet filling and identification often requires a huge workload.
[0049] The image generated after the answer sheet is scanned is affected by many factors, such as objective factors such as the depth of the printing ink on the answer sheet paper and the imaging environment of the scanner, subjective factors such as the candidate's filling habits, and different requirements for filling in different question types.
[0050] However, most of the existing answer sheet filling option result recognition technologies use threshold parameters for judgment. Specifically, for example, some feature parameter thresholds are first set, and then the image features of the filling options are judged. If the image features are higher or lower than these pre-set parameter thresholds, the filling option results are determined to be set as valid filling or invalid filling, where invalid filling includes no filling and unqualified filling.
[0051] The existing answer sheet filling recognition method uses the threshold parameter judgment method, which has the following disadvantages:
[0052] Due to the different levels of ink used in the answer sheet printing process or the exposure problem of the scanner, the background of the scanned image varies. If the threshold parameter is set too high, the unfilled options may be mistakenly identified as filled, and if the parameter is set too low, the lightly filled options may be mistakenly identified as not filled. Different candidates have different filling habits. For example, some candidates fill in light colors and the color depth is not enough. Valid filling is mistakenly identified as invalid filling. For some candidates, the filling area ratio is fuzzy, which makes it impossible to determine whether it is valid filling, and the filling recognition is wrong. There are differences in the filling option parameters of different options for the same question, and it is impossible to determine whether it is valid filling. It is impossible to determine whether irregular filling (insufficient filling color depth or insufficient filling area ratio) is valid from the data.
[0053] To this end, the embodiments of the present application provide a method for constructing a filling recognition model, an answer sheet filling recognition method, a computer device and a storage medium. The filling recognition model is used to identify the filling option results of the answer sheet. Since more factors affecting the recognition results are comprehensively considered, the accuracy of the filling recognition is improved.
[0054] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0055] See also Figure 1 , Figure 1 The present invention provides a flowchart of the steps of a method for constructing a fill-in recognition model provided in an embodiment of the present invention. The method can be applied to a computer device to construct a fill-in recognition model, which is used to recognize the fill-in option results of an answer sheet.
[0056] like Figure 1 As shown, the method for constructing the filling recognition model includes step S101 and step S102.
[0057] S101, obtaining training sample data, wherein the training sample data includes a plurality of fill-in option images and a labeling result corresponding to each of the fill-in option images, each of the fill-in option images corresponds to a target feature parameter, and the target feature parameter includes image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type;
[0058] S102, inputting the target feature parameters and annotation results corresponding to the filling option image into the filling recognition model to be constructed for model training, so as to obtain the constructed filling recognition model.
[0059] Since the recognition of answer sheet filling is affected by many factors, the inventors found in the practice of answer sheet filling recognition that the following five target feature parameters: image background color, filling option color depth, filling option fill rate, minimum filling question color depth and filling question type, are most strongly correlated with the recognized filling option results. Therefore, using these five target feature parameters as the input of the filling recognition model can maximize the recognition accuracy of the filling recognition model. For this reason, the embodiment of the present application constructs a model with the five target feature parameters of the filling option image of the answer sheet to obtain a filling recognition model, which can more accurately identify the filling option results of the answer sheet.
[0060] Specifically, training sample data may be obtained, wherein the training sample data includes a plurality of fill-in option images and a labeling result corresponding to each fill-in option image, and each fill-in option image also corresponds to a target feature parameter, and the target feature parameter includes image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type. The target feature parameters and the labeling result corresponding to the fill-in option image are input into the fill-in recognition model to be constructed for model training, and a constructed fill-in recognition model is obtained.
[0061] It should be noted that the fill-in recognition model to be constructed can select a suitable deep learning model. For example, the fill-in recognition model to be constructed can select a neural network model that can be used for image recognition.
[0062] The annotation results include a first annotation result and a second annotation result. The first annotation result is a valid fill, and the second annotation result is an invalid fill. The annotation result can be understood as label information, that is, label information corresponding to each fill option image. For example, the fill option image can be specifically as follows: Figure 2 As shown, the fill-in option image includes the question number "9" and the fill-in options "A, B, C, D and E". Filled in specifically includes valid filling in, and unfilled in includes invalid filling in and missing filling in.
[0063] It should be noted that an answer sheet may include multiple fill-in option images. In the embodiment of the present application, the training sample data includes multiple fill-in option images. Of course, the training sample data may also include multiple answer sheets, and each answer sheet includes multiple fill-in option images.
[0064] Specifically, the target feature parameters and annotation results corresponding to the fill option image are input into the fill recognition model to be constructed for model training. When the fill recognition model achieves a better recognition result, the parameters of the fill recognition model can be saved to obtain the constructed fill recognition model. Achieving a better recognition result can be when the model converges, or when it is manually determined that the recognition result of the model has met the requirements, the training is stopped and the parameters of the fill recognition model are saved.
[0065] In some embodiments, it is also necessary to explain that when constructing the model, not only the five target feature parameters such as image background color, fill option color depth, fill option fill rate, minimum color depth of fill question and fill question type can be used, but also other more feature parameters can be used for training together. For example, feature parameters such as image gradient, color depth and feature point vector of fill options can be selected as input of the fill recognition model to be constructed, thereby further improving the accuracy of model recognition.
[0066] It should be noted that selecting more feature parameters does not necessarily improve the accuracy of model recognition, and it will also increase the difficulty of model training.
[0067] In some embodiments, since each fill option image includes multiple feature parameters that can be extracted, such as fill question type, color depth of fill option, effective fill rate, grayscale difference with the minimum color depth of the fill question, feature point vector of fill option, image gradient, etc., in order to extract features that are more relevant to the actual results, reduce data dimensions and thus improve model building efficiency. The target feature parameters of the fill option image can also be extracted based on the decision tree feature selection algorithm of information gain.
[0068] For example, the ID3 algorithm in the decision tree algorithm can be used to extract the target feature parameters of the filling option image. The specific processing process is as follows:
[0069] Calculate the information gain of all training sample data on the annotation results (filled or unfilled); calculate the information entropy of each target feature parameter (such as the color depth of the filling option) on the annotation results in the sub-dataset; calculate the difference between the information gain of all training sample data and the information entropy of the target feature parameter to obtain the information gain of the target feature parameter; sort the target feature parameter according to its information gain, and determine the target feature parameter based on the sorting result, for example, sort the target feature parameter from high to low according to its information gain, and select several better feature parameters as the target feature parameters for filling recognition model construction, thereby improving the accuracy of the filling recognition model.
[0070] It should be noted that the sub-dataset is a data set formed by dividing the value range of the continuous feature according to the impact of the feature on the result in order to solve the information entropy of the continuous feature in the decision tree algorithm (such as using the ID3 algorithm).
[0071] In some embodiments, in order to improve the accuracy of the constructed filling recognition model, the training sample data may also be subjected to noise reduction processing, and the specific processing process is as follows:
[0072] The training sample data are grouped according to the target feature parameters to obtain multiple groups of sample data; the first number of times the target feature parameter appears in each group of sample data corresponding to the first annotation result and the second number of times the target feature parameter appears in each group of sample data corresponding to the second annotation result are obtained, wherein the first annotation result is a valid filling and the second annotation result is an invalid filling; according to the difference between the first number and the second number, determine whether to filter out the group of sample data.
[0073] Exemplarily, any one of the above five target feature parameters can be used to divide the training sample data into multiple groups, such as using the image background color to divide the training sample data into n groups of sample data, where n is a positive integer and the specific size is determined according to the actual application. The first number of times the target feature parameter (image background color) appears in each group of sample data when the annotation result is valid and the second number of times the target feature parameter (image background color) appears in the annotation result corresponding to invalid filling are calculated, and the difference in the number of times between the first number and the second number is calculated to determine whether the difference in the number of times is within a preset range. If the difference in the number of times is within the preset range, the group of sample data is identified as ambiguous data and the group of sample data is filtered out. If the difference in the number of times is not within the preset range, the group of sample data is determined to be valid and the group of sample data is retained. The preset range is used to determine whether the first number and the second number are close. Exemplarily, the preset range can be, for example, 5 times.
[0074] The model building method provided in the above embodiment takes into account that the filling and recognition of the answer sheet is easily affected by various factors, and then selects five characteristic parameters, namely, image background color, filling option color depth, filling option fill rate, minimum filling question color depth and filling question type, to construct a model to obtain a filling recognition model, thereby improving the accuracy of the filling model recognition model, and further improving the filling and recognition accuracy of the answer sheet.
[0075] See also Figure 3 , Figure 3 This is a schematic flow chart of the steps of another method for constructing a fill-in recognition model provided in an embodiment of the present application. The construction method can be applied to a computer device to construct a fill-in recognition model, which is used to recognize the fill-in option results of an answer sheet.
[0076] In an embodiment of the present application, the fill-in recognition model may include a first recognition model and a second recognition model, wherein the first recognition model is a neural network model and the second recognition model is a support vector machine model. The use of a neural network model can improve the recognition accuracy of the fill-in recognition model, and the use of a support vector machine model (Support Vector Machines, SVM) can enhance the generalization ability of the fill-in recognition model.
[0077] like Figure 3 As shown, the method for constructing the filling recognition model includes steps S201 to S204.
[0078] S201, obtaining training sample data, wherein the training sample data includes a plurality of fill-in option images and a labeling result corresponding to each of the fill-in option images, each of the fill-in option images corresponds to a target feature parameter, and the target feature parameter includes image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type;
[0079] S202, inputting the target feature parameters and the annotation results corresponding to the fill option image into the first recognition model to be constructed for model training, thereby obtaining a constructed first recognition model;
[0080] S203, inputting the target feature parameters and the annotation results corresponding to the fill option image into the second recognition model to be constructed for model training, thereby obtaining a constructed second recognition model;
[0081] S204: construct a filling recognition model using the constructed first recognition model and the second recognition model.
[0082] Among them, the neural network model is an algorithmic mathematical model that imitates the behavioral characteristics of animal neural networks and performs distributed parallel information processing. This network relies on the complexity of the system to adjust the weight parameters of the interconnections between a large number of internal neuron nodes to achieve the effect of fitting the output and the expected results. The neural network model used for filling and recognition is a neural network model generated by this application, in which the input is the filling option parameter (such as the target feature parameter) and the output is the filling option recognition probability.
[0083] The support vector machine model, also known as the SVM classifier, is a generalized classifier that classifies data in a supervised learning manner. The core of the classifier is the maximum margin hyperplane solved for the training samples, which can classify the samples. The SVM classifier generated by the embodiment of the present application specifically uses linear classification to achieve classification by solving a hyperplane between the filling and painting selection parameters. The hyperplane is a split plane, the filling and painting option parameters are input, and the filling and painting option results are output.
[0084] Specifically, the target feature parameters and annotation results corresponding to the multiple filling option images in the training sample data are input into the first recognition model to be constructed for model training to obtain the constructed first recognition model; and the target feature parameters and annotation results corresponding to the multiple filling option images in the training sample data are input into the second recognition model to be constructed for model training to obtain the constructed second recognition model; using the constructed first recognition model and the second recognition model, a filling recognition model is constructed, that is, the constructed filling recognition model includes the first recognition model and the second recognition model. When the filling of the answer sheet is recognized, the filling option results of the answer sheet can be determined according to the recognition results output by the first recognition model and the second recognition model.
[0085] In some embodiments, in order to improve the efficiency of model construction, a shallow neural network model can be selected for the first recognition model. The shallow neural network model is divided into three layers, namely, an input layer, a hidden layer, and an output layer. Figure 4 As shown, the input feature parameters include five parameters: image background color, filling option color depth, filling option fill rate, filling question minimum color depth and filling question type, and all five parameters need to be normalized before input.
[0086] In some embodiments, in order to further improve the efficiency of model construction, the input layer and hidden layer of the shallow neural network model are set with offsets, which can enable the neural network model to fit the training sample data faster. The input layer, hidden layer and input layer are all activated using the SIGMODI function to ensure that the output result range is between 0 and 1. If the output result is greater than 0.5, it is valid filling, and if the output result is less than or equal to 0.5, it is invalid filling. In addition, the neural network model can also output the recognition credibility of the filling option.
[0087] The following is based on Figure 4 The structure of the neural network model shown in FIG. 1 introduces a method for constructing a neural network model provided by an embodiment of the present application, such as Figure 5 As shown, the specific steps include:
[0088] S202a, dividing the training sample data into a training set and a test set;
[0089] S202b, randomly initializing the weight parameters of the neural network model;
[0090] S202c, obtaining target feature parameters corresponding to the filled option images in the training set, and normalizing the target feature parameters;
[0091] S202d, inputting the normalized target feature parameters into the neural network model, and performing forward propagation of the neural network model;
[0092] S202e, obtaining the output result of the neural network model and the loss function of the fill-in option recognition result;
[0093] S202f, using the loss function to perform back propagation on the neural network model to update the weight parameters of the neural network model;
[0094] S202g, determining whether the data of the training set has been acquired;
[0095] S202h, using a test set to test the neural network model, and obtaining the recognition accuracy of the neural network model;
[0096] S202i, determining whether the recognition accuracy meets the requirement;
[0097] S202g. Obtain a neural network model.
[0098] The training sample data is divided into a training set and a test set. Specifically, the training sample data can be divided into a training set and a test set according to a certain ratio, for example, the training sample data is divided into a training set and a test set according to a ratio of 5:1. Each training sample (fill option image) in the training set and the test set includes five target feature parameters, namely, image background color, fill option color depth, fill option filling rate, fill question minimum color depth, and fill question type.
[0099] After randomly initializing the weight parameters of the neural network model, some training samples can be randomly selected and the target feature parameters corresponding to the training samples can be normalized and input into the neural network model. Through the forward propagation of the neural network model, the output results of the neural network model and the loss function of the fill-in option recognition results can be obtained.
[0100] By comparing the output results of the neural network model with the actual results of the filling selection, the actual results can be the labeled results, and the loss function of the training sample is generated. Exemplarily, cross entropy (Softmax Entropy) can be used as the loss function. The neural network model parameters are updated by backpropagating the neural network model through the loss function. Exemplarily, the weights of the updated neural network model are calculated by using the stochastic gradient descent (SGD) method with momentum.
[0101] Determine whether all the training samples in the training set have been acquired. After all the training sample data have been trained, use the test set data to verify the recognition accuracy of the neural network model. When all the training samples have not been trained, return to continue executing step S202c, and stop after determining that the recognition accuracy of the model meets the requirements to obtain a neural network model with high accuracy. If the neural network model does not meet the required accuracy, continue training and testing.
[0102] In some embodiments, the SVM classifier uses a linear kernel for separation, and the five filling feature parameters corresponding to the filling option image of the answer sheet, namely, the image background color, filling option color depth, filling option filling rate, filling question minimum color depth and filling question type, and the corresponding annotation results are input for training. After the training is completed, a filling recognition SVM classifier (second recognition model) is obtained, and the segmentation plane equation and support vector of the classifier can also be obtained. The SVM classifier will be used to identify new fillings, and the segmentation plane equation can be used as one of the parameters based on which the credibility of the recognition result is judged, and the segmentation plane equation can be used to determine the segmentation plane.
[0103] In some embodiments, the first recognition model and the second recognition model can output recognition credibility in addition to the recognition result as probability. Specifically, the first recognition model can output the first credibility and the second recognition model can output the second credibility, so that when there is a difference in the recognition results of the first recognition model and the second recognition model, a prompt message is output to prompt the user to manually recheck the filling options with reference to the recognition credibility. In order to improve the efficiency of manual recheck, the user can also be prompted to recheck the filling options with low recognition credibility.
[0104] Among them, the first credibility is determined according to the output probability and the true value of the first recognition model, which can be specifically expressed as: K = 2*|θ0-θ1|, wherein K is the first credibility, θ0 is the true value of the discrimination, and θ1 is the output probability of the first recognition model. If the output probability is greater than the true value of the discrimination, it is considered to be valid filling, and if the output probability is not greater than the true value of the discrimination, it is considered to be invalid filling. The second credibility is the distance between the image feature parameter point and the segmentation plane. The image feature parameter point is a vector composed of the image background color, the color depth of the filling option, the filling rate of the filling option, the minimum color depth of the filling question, and the filling question type. The segmentation plane is determined according to the segmentation plane equation of the support vector machine model.
[0105] The model building method provided in the above embodiment uses two machine learning models to perform intelligent recognition of answer sheets, namely a neural network model and an SVM classifier, and the parts with different recognition results of the two models are handed over to manual processing. The use of a neural network model can improve the recognition accuracy of the filling recognition model, and the use of an SVM classifier can enhance the generalization ability of the filling recognition model. Compared with the existing use of threshold parameters for filling recognition, this model takes into account objective reasons such as printing or scanning imaging of the answer sheet, and also takes into account the recognition result errors caused by subjective reasons such as non-standard filling by candidates, such as insufficient filling color depth, insufficient filling rate, and color depth differences of each filling option. Because the filling recognition model takes into account more factors that affect the recognition results and has good generalization ability, the answer sheet recognition is more intelligent and self-adaptable, and the accuracy rate is higher.
[0106] See also Figure 6 , Figure 6 The present invention provides a flowchart of steps of a method for identifying answer sheet filling provided in an embodiment of the present invention. The identification method can be applied to a computer device to identify the answer sheet filling option results.
[0107] Among them, the answer sheet filling and recognition method specifically uses the filling and recognition model constructed by the above-mentioned embodiment to recognize the answer sheet. The above-constructed filling and recognition model can be pre-saved in the computer device, and of course it can also be pre-saved in the server. The computer device sends the data of the answer sheet to be recognized to the server, and the server uses the filling and recognition model to recognize it, and feeds back the recognized filling option results to the computer device.
[0108] like Figure 6 As shown, the method for constructing the filling recognition model includes steps S301 to S303.
[0109] S301, obtaining an image corresponding to the answer sheet to be identified;
[0110] S302, obtaining target characteristic parameters of the fill option image in the image, wherein the target characteristic parameters include image background color, fill option color depth, fill option fill rate, fill question minimum color depth and fill question type;
[0111] S303, inputting the target feature parameters of the fill option image into a fill recognition model for recognition to obtain a fill option result.
[0112] Scan the answer sheet to be identified, obtain the image corresponding to the answer sheet to be identified, which includes multiple filling option images, and extract the target feature parameters of the filling option image, wherein the target feature parameters include image background color, filling option color depth, filling option fill rate, filling question minimum color depth and filling question type, input the target feature parameters of the filling option image into the filling recognition model for identification, and obtain the filling option result.
[0113] In some embodiments, since the filling recognition model includes a first recognition model and a second recognition model, the target feature parameters of the filling option image need to be input into the first recognition model and the second recognition model for recognition respectively to obtain the final filling option result. The following will introduce the filling recognition process of the answer sheet by the first recognition model and the second recognition model.
[0114] For example, Figure 7 As shown, the result of filling in the answer sheet based on the first recognition model includes the following steps:
[0115] S401, obtaining an image of the answer sheet to be identified;
[0116] S402, obtaining an image of fill-in options in the image of the answer sheet;
[0117] S403, obtaining target feature parameters corresponding to the filling option image, and normalizing the target feature parameters;
[0118] S404, inputting the normalized target feature parameters into the neural network model;
[0119] S405, obtaining the output result of the neural network model;
[0120] S406, determine whether the output result is greater than θ0, θ0 is the true value of the judgment;
[0121] If the output result is greater than θ0, then execute step S407; if the output result is less than or equal to θ0, then execute step S408;
[0122] S407, determining that the recognition result is valid filling;
[0123] S408, determining that the recognition result is invalid filling;
[0124] S409, adding this option to the question recognition result;
[0125] S410, outputting recognition credibility;
[0126] S411, determining whether filling and painting recognition is completed;
[0127] If the filling recognition is completed, step S412 is executed; if the filling recognition is not completed, the process returns to step S402 to continue to recognize the filling option images in the answer sheet; wherein the filling recognition is completed may specifically be determining that the answer sheet includes a plurality of questions to be recognized, and if the neural network model outputs filling option results corresponding to the plurality of questions to be recognized, it can be determined that the filling recognition is completed;
[0128] S412, answer sheet filling and recognition are completed.
[0129] Specifically, the five parameters of image background color, color depth of filling options, filling rate of filling options, minimum color depth of filling questions and filling question types are input into the neural network model to obtain the output result of the neural network model. The output result is specifically the recognition probability of the filling options. The true value of the judgment is 0.5. If the output result is greater than 0.5, it is a valid filling, and the option is added to the question recognition result. If the output result is less than or equal to 0.5, it is an invalid filling. Of course, the recognition credibility can also be output. The recognition credibility is specifically 2*|0.5-output probability|. The recognition credibility is used for the later manual verification of the recognition results.
[0130] For example, Figure 8 As shown, the result of identifying the filling options of the answer sheet based on the second recognition model specifically includes the following steps:
[0131] S501, obtaining an image of the answer sheet to be identified;
[0132] S502, obtaining an image of fill-in options in the image of the answer sheet;
[0133] S503, obtaining target feature parameters corresponding to the filling option image;
[0134] S504, inputting the normalized target feature parameters into the SVM classifier;
[0135] S505, obtaining the output result of the SVM classifier;
[0136] S506, determining whether the output result is 1 or 0, where 1 represents true and 0 represents false;
[0137] If the output result is 1, execute step S507; if the output result is 0, execute step S508;
[0138] S507, determining that the recognition result is valid filling;
[0139] S508, determining that the recognition result is invalid filling;
[0140] S509, adding this option to the question recognition result;
[0141] S510, outputting recognition credibility;
[0142] S511, determining whether filling and painting recognition is completed;
[0143] If the filling recognition is completed, step S412 is executed; if the filling recognition is not completed, the process returns to step S402 to continue to recognize the filling option images in the answer sheet; wherein the filling recognition is completed may specifically be determining that the answer sheet includes a plurality of questions to be recognized, and if the SVM classifier outputs filling option results corresponding to the plurality of questions to be recognized, it can be determined that the filling recognition is completed;
[0144] S512: Answer sheet filling and recognition are completed.
[0145] Specifically, for all fill-in options in the question, obtain five parameters: image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type. Input the above five parameters into the SVM classifier. Obtain the output result of the fill-in recognition SVM classifier. If the output result is 1, it is determined to be a valid fill-in, and the option is added to the question recognition result. If the output result is 0, it is determined to be an invalid fill-in. Of course, the SVM classifier can also output recognition credibility, specifically, the distance between the image feature parameter point and the segmentation plane is set as the recognition credibility of the fill-in option, which is used for later manual verification of the recognition result.
[0146] The answer sheet filling recognition method provided in the above embodiment specifically uses the filling recognition model to recognize the filling options of the answer sheet, comprehensively considering objective reasons such as printing or scanning imaging of the answer sheet, as well as subjective reasons such as the non-standard filling of the examinee, such as insufficient filling color depth, insufficient filling rate, and color depth differences of various filling options. This can improve the accuracy of filling recognition.
[0147] See also Fig. 9 , Fig. 9 is a schematic block diagram of a computer device provided in an embodiment of the present application. Fig. 9 As shown, the computer device 600 includes one or more processors 601 and a memory 602. The processor 601 and the memory 602 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.
[0148] Among them, one or more processors 601 work individually or collectively to execute the steps of the method for constructing the filling-in recognition model provided in the above embodiment, or to execute the steps of the method for filling-in recognition of the answer sheet provided in the above embodiment.
[0149] Specifically, the processor 601 may be a micro-controller unit (MCU), a central processing unit (CPU) or a digital signal processor (DSP).
[0150] Specifically, the memory 602 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0151] The processor 601 is used to run the computer program stored in the memory 602, and implement the steps of the method for constructing the filling recognition model provided in the above embodiment when executing the computer program.
[0152] Exemplarily, the processor 601 is used to run the computer program stored in the memory 602, and implement the following steps when executing the computer program:
[0153] Acquire training sample data, wherein the training sample data includes multiple filling option images and annotation results corresponding to each of the filling option images, each of the filling option images corresponds to target feature parameters, and the target feature parameters include image background color, filling option color depth, filling option fill rate, minimum color depth of filling questions and filling question type; input the target feature parameters and annotation results corresponding to the filling option images into the filling recognition model to be constructed for model training, so as to obtain the constructed filling recognition model.
[0154] In some embodiments, the processor is further configured to implement:
[0155] A decision tree feature selection algorithm based on information gain is used to extract features of the fill option images in the training sample data to obtain the target feature parameters; wherein the target feature parameters are used to construct a fill recognition model, and the target feature parameters include at least image background color, fill option color depth, fill option fill rate, minimum fill question color depth and fill question type.
[0156] In some embodiments, the processor implements the information gain-based decision tree feature selection algorithm to extract features from the fill option images in the training sample data to obtain the target feature parameters, which are specifically used to implement:
[0157] Calculate the information gain of all training sample data on the labeling results; calculate the information entropy of each target feature parameter on the labeling results in the sub-data set; calculate the difference between the information gain of all training sample data and the information entropy of the target feature parameter to obtain the information gain of the target feature parameter; sort the target feature parameter according to its information gain, and determine the target feature parameter based on the sorting result.
[0158] In some embodiments, the processor is further configured to implement:
[0159] The training sample data are grouped according to the target feature parameters to obtain multiple groups of sample data; the first number of times the target feature parameter appears in each group of sample data corresponding to the first annotation result and the second number of times the target feature parameter appears in each group of sample data corresponding to the second annotation result are obtained, wherein the first annotation result is a valid filling and the second annotation result is an invalid filling; based on the difference between the first number and the second number, determine whether to filter out the group of sample data.
[0160] In some embodiments, the fill recognition model includes a first recognition model and a second recognition model, the first recognition model is a neural network model, and the second recognition model is a support vector machine model; when the processor implements the inputting of the target feature parameters and the annotation results corresponding to the fill option image into the fill recognition model to be constructed for model training, it is specifically used to implement:
[0161] The target feature parameters and annotation results corresponding to the fill option image are input into the first recognition model to be constructed for model training to obtain a constructed first recognition model; the target feature parameters and annotation results corresponding to the fill option image are input into the second recognition model to be constructed for model training to obtain a constructed second recognition model; and the fill recognition model is constructed using the constructed first recognition model and the second recognition model.
[0162] In some embodiments, the neural network model includes an input layer, a hidden layer, and an output layer, wherein the input layer and the hidden layer have offsets, and the output layer is activated using a SIGMODI function.
[0163] In some embodiments, the first recognition model further outputs a first credibility, and the second recognition model further outputs a second credibility;
[0164] Among them, the first credibility is expressed as K=2*θ0-θ1|, wherein K is the first credibility, θ0 is the discriminant true value, and θ1 is the output probability of the first recognition model; the second credibility is the distance between the image feature parameter point and the segmentation plane, and the image feature parameter point is a vector composed of the image background color, the color depth of the filling option, the filling rate of the filling option, the minimum color depth of the filling question and the filling question type, and the segmentation plane is determined according to the segmentation plane equation of the support vector machine model.
[0165] Exemplarily, the processor 601 is used to run the computer program stored in the memory 602, and implement the following steps when executing the computer program:
[0166] Obtain an image corresponding to an answer sheet to be identified; obtain target feature parameters of a fill-in option image in the image, wherein the target feature parameters include image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type; input the target feature parameters of the fill-in option image into a fill-in recognition model for identification to obtain a fill-in option result; wherein the fill-in recognition model is constructed based on the fill-in recognition model method described in any one of the embodiments of the present application.
[0167] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the steps of the method for constructing a filling-in recognition model provided in the above embodiment, or implements the steps of the method for filling-in recognition of an answer sheet provided in the above embodiment.
[0168] The computer-readable storage medium may be an internal storage unit of the computer device described in any of the above embodiments, such as a hard disk or memory of the terminal device. The computer-readable storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.
[0169] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for identifying answer sheet filling, characterized in that: The method comprises: Obtain the image corresponding to the answer sheet to be identified; Obtaining target characteristic parameters of the fill option image in the image, wherein the target characteristic parameters include image background color, fill option color depth, fill option fill rate, fill question minimum color depth and fill question type; The target feature parameters of the fill option image are input into the fill recognition model for recognition to obtain the fill option result, wherein the fill recognition model is constructed according to the target feature parameters, and the fill recognition model includes a first recognition model and a second recognition model, the first recognition model is a neural network model, and the second recognition model is a support vector machine model; the first recognition model also outputs a first credibility, and the second recognition model also outputs a second credibility, the first credibility is determined according to the output probability and the discriminant true value of the first recognition model, the second credibility is the distance between the image feature parameter point and the segmentation plane, the image feature parameter point is a vector composed of the image background color, the fill option color depth, the fill option filling rate, the minimum color depth of the fill question and the fill question type, and the segmentation plane is determined according to the segmentation plane equation of the support vector machine model.
2. The method according to claim 1, characterized in that The step of inputting the target feature parameters of the fill option image into a fill recognition model for recognition includes: Inputting target feature parameters of the image of the filled option in the image into the first recognition model to obtain a first recognition result; Inputting target feature parameters of the image of the filled option in the image into the second recognition model to obtain a second recognition result; The filling option result is obtained according to the first recognition result and the second recognition result.
3. A method for constructing a filling recognition model, characterized in that: The method comprises: Acquire training sample data, wherein the training sample data includes a plurality of fill-in option images and a labeling result corresponding to each of the fill-in option images, each of the fill-in option images corresponds to a target feature parameter, and the target feature parameter includes image background color, fill-in option color depth, fill-in option fill rate, fill-in question minimum color depth, and fill-in question type; Inputting the target feature parameters and the annotation results corresponding to the fill option image into the fill recognition model to be constructed for model training, thereby obtaining a constructed fill recognition model, wherein the fill recognition model includes a first recognition model and a second recognition model, wherein the first recognition model is a neural network model, and the second recognition model is a support vector machine model; The step of inputting the target feature parameters and the annotation results corresponding to the fill option image into the fill recognition model to be constructed for model training includes: inputting the target feature parameters and the annotation results corresponding to the fill option image into the first recognition model to be constructed for model training to obtain a constructed first recognition model; inputting the target feature parameters and the annotation results corresponding to the fill option image into the second recognition model to be constructed for model training to obtain a constructed second recognition model; and constructing a fill recognition model using the constructed first recognition model and the second recognition model. Among them, the first recognition model also outputs a first credibility, and the second recognition model also outputs a second credibility; the first credibility is determined according to the output probability and the discriminant truth value of the first recognition model; the second credibility is the distance between the image feature parameter point and the segmentation plane, and the image feature parameter point is a vector composed of the image background color, the color depth of the filling option, the filling option filling rate, the minimum color depth of the filling question and the filling question type, and the segmentation plane is determined according to the segmentation plane equation of the support vector machine model.
4. The method according to claim 3, characterized in that The method further comprises: Extracting features of the fill option images in the training sample data to obtain the target feature parameters; Among them, the target feature parameters are used to construct a filling recognition model, and the target feature parameters at least include image background color, filling option color depth, filling option fill rate, filling question minimum color depth and filling question type.
5. The method according to claim 4, characterized in that The step of extracting features from the fill option images in the training sample data to obtain the target feature parameters includes: Calculate the information gain of all training sample data on the annotation results; For each target feature parameter, calculate its information entropy on the annotation results in the sub-dataset; Calculate the difference between the information gain of all training sample data and the information entropy of the target feature parameter to obtain the information gain of the target feature parameter; The target feature parameters are sorted according to their information gains, and the target feature parameters are determined based on the sorting results.
6. The method according to claim 3, characterized in that: The method further comprises: Grouping the training sample data according to the target feature parameters to obtain multiple groups of sample data; Obtain the first number of times the target characteristic parameter appears in each set of sample data corresponding to the first annotation result and the second number of times the target characteristic parameter appears in the second annotation result, wherein the first annotation result is a valid filling and the second annotation result is an invalid filling; According to the difference between the first number of times and the second number of times, it is determined whether to filter out the group of sample data.
7. A computer device, characterized in that: The computer device comprises: Memory and processor; Wherein, the memory is connected to the processor and is used to store programs; The processor is used to implement the steps of the answer sheet filling and recognition method as described in any one of claims 1-2 by running the program stored in the memory, or to implement the steps of the method for constructing a filling and recognition model as described in any one of claims 3-6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the steps of the answer sheet filling and recognition method as described in any one of claims 1-2, or the steps of the method for constructing a filling and recognition model as described in any one of claims 3-6.
Citation Information
Patent Citations
Method for identification of answer sheet full-filling block
CN108960235A
Learning style recognition model training and recognition method and device, equipment and medium
CN113191438A