A method for evaluating the fuzziness of straight strokes in digital images of cadre personnel files
Through the deep learning model and the entropy weight coefficient method, the automation problem of the ambiguity evaluation of the straight strokes of the digital image of the cadre and personnel files is solved, and the global evaluation is achieved without manual assistance is achieved, which improves the comprehensiveness and accuracy of image quality evaluation.
Patent Information
- Application Number
- CN202210010840.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-05
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-01-05
AI Technical Summary
In the prior art, the evaluation of straight stroke ambiguity of digitized images of cadre personnel files requires manual assistance, which cannot be automated and the overall image cannot be comprehensively evaluated.
The Hough straight line detection and image edge extraction methods are used to form the label data trained by deep learning algorithms, and the straight strokes in the image are detected by deep learning models, and the ambiguity evaluation is performed through grid division and entropy weight coefficient methods to achieve automated global straightness. Stroke ambiguity assessment.
It realizes automated straight stroke ambiguity evaluation without manual assistance, and can conduct global quality evaluation of the entire image, improving the comprehensiveness and accuracy of image quality evaluation.
Smart Images

Figure CN114463276B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of computer vision recognition, and in particular to a method for evaluating the fuzziness of straight strokes in a digital image of a cadre personnel file. Background Art
[0002] The digitization of cadres' personnel files includes the process of digitizing them using scanners and other equipment. During the digitization process, due to the influence of some environmental factors or the poor image quality of old cadres' personnel files, it is necessary to optimize the digitized images.
[0003] The standard provides an evaluation method for straight stroke blur, but it requires manual assistance. At the same time, the selected area cannot cover the entire image, which may lead to incomplete evaluation of the overall image quality. At the same time, it is also impossible to automatically evaluate and identify. Summary of the invention
[0004] 1. Technical issues to be solved
[0005] In order to solve the problems existing in the current straight stroke fuzziness evaluation of digitalized cadres' personnel files, such as the need for manual assistance, the inability to be automated, and the inability to evaluate the entire image, the present invention proposes a straight stroke fuzziness evaluation method for digitalized images of cadres' personnel files, which can automatically identify digitalized images of cadres' personnel files, perform global straight stroke fuzziness evaluation on the image, and finally output the global straight stroke fuzziness evaluation result of the image, so as to achieve the purpose of not requiring manual assistance, being able to be automated, and being able to perform global straight stroke fuzziness evaluation.
[0006] (II) Technical solution
[0007] To achieve the above purpose, the present invention is implemented by the following technical scheme: a method for evaluating the fuzziness of straight strokes in a digitized image of a cadre personnel file, comprising the following steps:
[0008] S1. Receive the digitized images of the cadres’ personnel files;
[0009] S2, using Hough line detection and image edge extraction methods to form label data for deep learning algorithm training;
[0010] S3, using deep learning methods to train, test and verify these data to obtain a straight stroke detection model based on deep learning;
[0011] S4, using a straight stroke detection model based on deep learning to detect the digitalized image of the archive to be evaluated, then dividing the image into grids, binarizing the image, adjusting it using image morphology methods, clarifying the position of the straight strokes, and then evaluating the fuzziness of multiple straight strokes in each grid area;
[0012] S5. Determine the weight for the grid area using the entropy weight coefficient method, and calculate the final straight stroke blur comprehensive evaluation value of the image.
[0013] Preferably, step S1 specifically includes the following steps:
[0014] S11. Acquire a digital image of the cadre personnel file, wherein the image is a digitalized and optimized image of the cadre personnel file, and is an image to be evaluated and accepted as specified in the national standard Technical Specification for Digitalization of Cadre Personnel Files (GB / T 33870-2017);
[0015] S12. Use Python's OpenCV3 algorithm library to receive digitized images, unify the file format into png image file type, and unify the image resolution; it is characterized in that Python's OpenCV3 algorithm library is used to save non-png type images into png type, and the image resolution generally exceeds 640×480 (unit: pixel).
[0016] Preferably, step S2 specifically includes the following steps:
[0017] S21, dividing the image by gridding. The grid size can be set according to the actual image, with a minimum of 100×100 (unit: pixel). In the subsequent calculation process, the grid area is a local calculation area, not an actual segmented image.
[0018] S22, performing edge extraction on the image using a horizontal and vertical single-direction sharpening algorithm, performing edge extraction on the entire image using a horizontal and vertical single-direction sharpening algorithm, the original image cannot be changed, and the image after edge extraction is saved as a new image;
[0019] S23, after edge extraction, perform Hough line detection on each grid area, extract and mark the straight lines whose average inclination angle with the image coordinate axis (horizontal axis and vertical axis) does not exceed 25 degrees, and these marked straight lines correspond to the straight strokes to be evaluated in the image. For the new image after edge extraction in step S22, perform Hough line detection in combination with the grid divided in step S21, extract and mark the straight lines whose average inclination angle with the image coordinate axis (horizontal axis and vertical axis) does not exceed 25 degrees;
[0020] S24, recording these straight stroke areas, generating label data and recording them according to the deep learning label format, using the deep learning label format to record the straight stroke areas marked in S23 in the form of rectangular label areas, and saving them in the corresponding XML format according to the deep learning training requirements;
[0021] S25. Perform the above operations on the series of digitized images to be trained, record the images and label data to generate a training data set corresponding to deep learning, and perform the processing of S21-S24 on the digitized images to be trained for deep learning to form a training data set corresponding to deep learning.
[0022] Preferably, step S3 specifically includes the following steps:
[0023] S31, randomly assigning the data set into a training data set, a verification data set, and a test data set, and randomly assigning the sequence number of the data set to be trained in S25 to form the training set, verification set, and test set required for deep learning;
[0024] S32, adding random noise, rotating and other data augmentation processing to the training images, adding random noise (salt and pepper noise, Gaussian noise), rotating (clockwise rotation of 30°C, clockwise rotation of 60°C, clockwise rotation of 90°C, clockwise rotation of 120°C), enlarging (1 times), reducing (1 times) and other data augmentation processing to the divided training set and validation set image data, to increase the amount of data;
[0025] S33, using the Pytorch algorithm library in Python to establish a Yolo v3 deep learning model, characterized in that the Yolo v3 deep learning model is used for learning and training;
[0026] S34, using the deep learning model to train the training set, to obtain a Yolo v3 deep learning image detection model that can detect straight strokes, using the Yolo v3 deep learning algorithm of S33, after training and learning, to obtain a corresponding straight stroke detection deep learning image detection model, wherein the image detection category is 1 (straight strokes);
[0027] S35. Evaluate the results of the above Yolo v3 deep learning image detection model based on the test set data. The recognition accuracy is required to be above 90%. After training, the model recognition detection accuracy is above 90%. Repeated training is required to ensure that the average accuracy exceeds 90%.
[0028] Preferably, step S4 specifically includes the following steps:
[0029] S41, using the Yolo v3 deep learning straight stroke detection model to detect the digital image to be evaluated, obtaining a number of straight stroke detection result areas, using S31-S35 training to obtain the Yolo v3 deep learning straight stroke detection model to detect the image to be evaluated, and recording the identified straight strokes in the form of rectangular areas;
[0030] S42, dividing the image into grids, the division is consistent with S21, and the same division method and size are used as S21;
[0031] S43, using Python's OpenCV3 algorithm library, binarizing the detected straight stroke area in the image, the non-straight stroke range is directly used as the background, and the detected straight stroke area is binarized;
[0032] S43, in each grid area, using image morphology opening and closing operations to process the image 2-3 times, and performing opening and closing operations 2-3 times on the binary processed image, and the order of each processing is to perform opening operation first and then closing operation;
[0033] S44, using the binary image to determine the detection range of different straight strokes, after being processed in S43, all background areas are white areas, and black areas are straight strokes at different positions;
[0034] S45, using the straight stroke fuzziness evaluation method in the national standard "Technical Specification for Digitalization of Cadre and Personnel Files" (GB / T 33870-2017) to evaluate each straight stroke, which uses the straight stroke fuzziness evaluation method in the national standard "Technical Specification for Digitalization of Cadre and Personnel Files" (GB / T 33870-2017) to evaluate each straight stroke;
[0035] S46, calculating an average value of the fuzziness evaluation results of multiple straight strokes in each grid area, and calculating an average value of the fuzziness evaluation results of multiple straight strokes in each grid area divided in S42;
[0036] Preferably, step S5 specifically includes the following steps:
[0037] S51, obtaining an average value of the straight stroke fuzziness evaluation for each grid area, using the entropy weight coefficient method to determine the weight value of each grid area in the comprehensive evaluation of the straight stroke fuzziness of the image, using the traditional entropy weight coefficient method combined with the average value of the straight stroke fuzziness evaluation of each grid area, and comprehensively calculating the weight value of each grid area in the comprehensive evaluation of the straight stroke fuzziness of the entire image;
[0038] S52. Calculate the comprehensive evaluation result of the blurriness of straight strokes of the whole image by using weights, and use this as the straight stroke quality evaluation method of the digitized image. Determine the weights by using S51, and perform the weighted sum of the average straight stroke blurriness evaluation values of each grid area, and finally obtain a comprehensive evaluation value, which is used as the comprehensive evaluation value of the blurriness of straight strokes of the whole image, so as to perform a comprehensive evaluation of the blurriness of straight strokes of the image.
[0039] (III) Beneficial effects
[0040] The invention provides a method for evaluating the fuzziness of straight strokes in a digitized image of a cadre personnel file.
[0041] It has the following beneficial effects:
[0042] 1. The present invention proposes a method for evaluating the fuzziness of straight strokes in digitized images of cadre personnel files, which can automatically identify digitized images of cadre personnel files, perform global straight stroke fuzziness evaluation on the images, and finally output the results of global straight stroke fuzziness evaluation on the images, so as to achieve the purpose of global straight stroke fuzziness evaluation without manual assistance and automatic performance.
[0043] 2. The present invention automatically generates label data: deep learning training label data can be automatically generated; straight strokes can be automatically identified: deep learning can be used to quickly detect the range of straight strokes without manual determination; the straight stroke blurriness of the entire image can be comprehensively evaluated: in the present invention, gridding and entropy weight coefficient method are used to obtain a comprehensive evaluation result of the straight stroke blurriness of the entire image, which provides a more comprehensive assessment of image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 The present invention is a flow chart of a method for evaluating the fuzziness of straight strokes in a digitized image of a cadre personnel file.
[0045] Figure 2 This is a flowchart of step S2.
[0046] Figure 3 This is a flowchart of step S3.
[0047] Figure 4 This is a flowchart of step S4.
[0048] Figure 5 This is a flowchart of step S5. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Example:
[0051] like Figure 1-5 As shown, the embodiment of the present invention provides a method for evaluating the fuzziness of straight strokes in a digitized image of a cadre personnel file, comprising the following steps:
[0052] S1. Receive the digitized images of the cadres’ personnel files;
[0053] S2, using Hough line detection and image edge extraction methods to form label data for deep learning algorithm training;
[0054] S3, using deep learning methods to train, test and verify these data to obtain a straight stroke detection model based on deep learning;
[0055] S4, using a straight stroke detection model based on deep learning to detect the digitalized image of the archive to be evaluated, then dividing the image into grids, binarizing the image, adjusting it using image morphology methods, clarifying the position of the straight strokes, and then evaluating the fuzziness of multiple straight strokes in each grid area;
[0056] S5. Determine the weight for the grid area using the entropy weight coefficient method, and calculate the final straight stroke blur comprehensive evaluation value of the image.
[0057] Step S1 specifically includes the following steps:
[0058] S11. Acquire a digital image of the cadre personnel file, wherein the image is a digitalized and optimized image of the cadre personnel file, and is an image to be evaluated and accepted as specified in the national standard Technical Specification for Digitalization of Cadre Personnel Files (GB / T 33870-2017);
[0059] S12. Use Python's OpenCV3 algorithm library to receive digitized images, unify the file format into png image file type, and unify the image resolution; it is characterized in that Python's OpenCV3 algorithm library is used to save non-png type images into png type, and the image resolution generally exceeds 640×480 (unit: pixel).
[0060] Step S2 specifically includes the following steps:
[0061] S21, dividing the image by gridding. The grid size can be set according to the actual image, with a minimum of 100×100 (unit: pixel). In the subsequent calculation process, the grid area is a local calculation area, not an actual segmented image.
[0062] S22, performing edge extraction on the image using a horizontal and vertical single-direction sharpening algorithm, performing edge extraction on the entire image using a horizontal and vertical single-direction sharpening algorithm, the original image cannot be changed, and the image after edge extraction is saved as a new image;
[0063] S23, after edge extraction, perform Hough line detection on each grid area, extract and mark the straight lines whose average inclination angle with the image coordinate axis (horizontal axis and vertical axis) does not exceed 25 degrees, and these marked straight lines correspond to the straight strokes to be evaluated in the image. For the new image after edge extraction in step S22, perform Hough line detection in combination with the grid divided in step S21, extract and mark the straight lines whose average inclination angle with the image coordinate axis (horizontal axis and vertical axis) does not exceed 25 degrees;
[0064] S24, recording these straight stroke areas, generating label data and recording them according to the deep learning label format, using the deep learning label format to record the straight stroke areas marked in S23 in the form of rectangular label areas, and saving them in the corresponding XML format according to the deep learning training requirements;
[0065] S25, performing the above operations on the series of digitized images to be trained, recording the images and label data to generate a training data set corresponding to deep learning, and performing the processes of S21-S24 on the digitized images to be trained selected as deep learning to form a training data set corresponding to deep learning;
[0066] Step S3 specifically includes the following steps:
[0067] S31, randomly assigning the data set into a training data set, a verification data set, and a test data set, and randomly assigning the sequence number of the data set to be trained in S25 to form the training set, verification set, and test set required for deep learning;
[0068] S32, adding random noise, rotating and other data augmentation processing to the training images, adding random noise (salt and pepper noise, Gaussian noise), rotating (clockwise rotation of 30°C, clockwise rotation of 60°C, clockwise rotation of 90°C, clockwise rotation of 120°C), enlarging (1 times), reducing (1 times) and other data augmentation processing to the divided training set and validation set image data, to increase the amount of data;
[0069] S33, using the Pytorch algorithm library in Python to establish a Yolo v3 deep learning model, characterized in that the Yolo v3 deep learning model is used for learning and training;
[0070] S34, using the deep learning model to train the training set, to obtain a Yolo v3 deep learning image detection model that can detect straight strokes, using the Yolo v3 deep learning algorithm of S33, after training and learning, to obtain a corresponding straight stroke detection deep learning image detection model, wherein the image detection category is 1 (straight strokes);
[0071] S35. Evaluate the results of the above Yolo v3 deep learning image detection model based on the test set data. The recognition accuracy is required to be above 90%. After training, the model recognition detection accuracy is above 90%. Repeated training is required to ensure that the average accuracy exceeds 90%.
[0072] Step S4 specifically includes the following steps:
[0073] S41, using the Yolo v3 deep learning straight stroke detection model to detect the digital image to be evaluated, obtaining a number of straight stroke detection result areas, using S31-S35 training to obtain the Yolo v3 deep learning straight stroke detection model to detect the image to be evaluated, and recording the identified straight strokes in the form of rectangular areas;
[0074] S42, dividing the image into grids, the division is consistent with S21, and the same division method and size are used as S21;
[0075] S43, using Python's OpenCV3 algorithm library, binarizing the detected straight stroke area in the image, the non-straight stroke range is directly used as the background, and the detected straight stroke area is binarized;
[0076] S43, in each grid area, using image morphology opening and closing operations to process the image 2-3 times, and performing opening and closing operations 2-3 times on the binary processed image, and the order of each processing is to perform opening operation first and then closing operation;
[0077] S44, using the binary image to determine the detection range of different straight strokes, after being processed in S43, all background areas are white areas, and black areas are straight strokes at different positions;
[0078] S45, using the straight stroke fuzziness evaluation method in the national standard "Technical Specification for Digitalization of Cadre and Personnel Files" (GB / T 33870-2017) to evaluate each straight stroke, which uses the straight stroke fuzziness evaluation method in the national standard "Technical Specification for Digitalization of Cadre and Personnel Files" (GB / T 33870-2017) to evaluate each straight stroke;
[0079] S46, calculating an average value of the fuzziness evaluation results of multiple straight strokes in each grid area, and calculating an average value of the fuzziness evaluation results of multiple straight strokes in each grid area divided in S42;
[0080] Step S5 specifically includes the following steps:
[0081] S51, obtaining an average value of the straight stroke fuzziness evaluation for each grid area, using the entropy weight coefficient method to determine the weight value of each grid area in the comprehensive evaluation of the straight stroke fuzziness of the image, using the traditional entropy weight coefficient method combined with the average value of the straight stroke fuzziness evaluation of each grid area, and comprehensively calculating the weight value of each grid area in the comprehensive evaluation of the straight stroke fuzziness of the entire image;
[0082] S52. Calculate the comprehensive evaluation result of the blurriness of straight strokes of the whole image by using weights, and use this as the straight stroke quality evaluation method of the digitized image. Determine the weights by using S51, and perform the weighted sum of the average straight stroke blurriness evaluation values of each grid area, and finally obtain a comprehensive evaluation value, which is used as the comprehensive evaluation value of the blurriness of straight strokes of the whole image, so as to perform a comprehensive evaluation of the blurriness of straight strokes of the image.
[0083] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprising a reference structure" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0084] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for evaluating the fuzziness of straight strokes in digital images of cadre personnel files, characterized in that: The following steps are involved: S1. Receive the digitized images of the cadres’ personnel files; S2, using Hough line detection and image edge extraction methods to form label data for deep learning algorithm training; S3, using deep learning methods to train, test and verify these data to obtain a straight stroke detection model based on deep learning; S4, using a straight stroke detection model based on deep learning to detect the digitalized image of the archive to be evaluated, then dividing the image into grids, binarizing the image, adjusting it using image morphology methods, clarifying the position of the straight strokes, and then evaluating the fuzziness of multiple straight strokes in each grid area; S5, using the entropy weight coefficient method to determine the weight for the grid area, and calculating the final straight stroke fuzziness comprehensive evaluation value of the image; Step S4 specifically includes the following steps: S41, using the Yolo v3 deep learning model to detect the digital image to be evaluated, obtaining a number of straight stroke detection result areas, and recording the identified straight stroke areas; S42, dividing the image into grids; S43, using Python's OpenCV3 algorithm library, binarizing the straight stroke area detected in the image; S44, in each grid area, using image morphology opening and closing operations to process the image 2-3 times; S45, using the binary image to determine the detection range of different straight strokes; S46. Use the straight stroke fuzziness evaluation method in the national standard "Technical Specifications for Digitalization of Cadre Personnel Files" (GB / T 33870-2017) to evaluate each straight stroke; S47, calculating an average value of the blur evaluation results of multiple straight strokes in each grid area.
2. The method for evaluating the fuzziness of straight strokes in digital images of cadre personnel files according to claim 1 is characterized in that: Step S1 specifically includes the following steps: S11, obtaining the digitized and optimized images of the cadre personnel files; S12. Use Python's OpenCV3 algorithm library to receive digitized images, unify the file format into png image file type, and unify the image resolution.
3. The method for evaluating the fuzziness of straight strokes in digital images of cadre personnel files according to claim 1, characterized in that: Step S2 specifically includes the following steps: S21, dividing the image into grids, with the grid size set according to the actual image, and the minimum size being 100×100 (unit: pixel); S22, performing edge extraction on the image using a horizontal and vertical single-direction sharpening algorithm, the original image cannot be changed, and the image after edge extraction is saved as a new image; S23, after edge extraction, perform Hough line detection on each grid area, extract and mark the straight lines whose average inclination angle with the image coordinate axis does not exceed 25 degrees, and these marked straight lines correspond to the straight strokes to be evaluated in the image; S24, recording these straight stroke areas, generating label data in the form of deep learning labels, and recording them; S25, performing the above operations on the digital image series to be trained, and recording the image and label data to generate a training data set corresponding to deep learning.
4. The method for evaluating the fuzziness of straight strokes in a digitized image of a cadre personnel file according to claim 1, characterized in that: Step S3 specifically includes the following steps: S31, randomly assigning the data set to a training data set, a validation data set, and a test data set; S32, performing data augmentation processing such as adding random noise, rotating, enlarging and reducing the training image to increase the amount of data; S33. Use the Pytorch algorithm library in Python to build the Yolo v3 deep learning model; S34, using the deep learning model to train the training set, and obtain a Yolo v3 deep learning model that can detect straight strokes, wherein the image detection category is 1; S35. Evaluate the results of the above Yolo v3 deep learning model based on the test set data, and the recognition accuracy is required to be above 90%.
5. The method for evaluating the fuzziness of straight strokes in digital images of cadre personnel files according to claim 1, characterized in that: Step S5 specifically includes the following steps: S51, obtaining an average value of the straight stroke fuzziness evaluation for each grid area, and determining a weight value of each grid area in the comprehensive evaluation of the straight stroke fuzziness of the image by using an entropy weight coefficient method; S52, using the weights, calculating a comprehensive evaluation result of the blurriness of the straight strokes of the entire image, and using this as a method for evaluating the straight stroke quality of the digitized image.
