Image quality inspection method and device, electronic equipment and storage medium

By identifying and adjusting the display angle of the image and segmentation processing, the problem of low quality inspection efficiency caused by poor image display quality is solved, and more efficient and accurate image quality inspection results are achieved.

CN119228775APending Publication Date: 2024-12-31PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411389494.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, the image quality inspection model caused by poor image display quality cannot be effectively inspected, resulting in low quality inspection efficiency.

Method used

By acquiring the target image, identifying its text content, adjusting the display angle, performing secondary quality inspection, including flipping and segmentation processing, to ensure the accuracy of the quality inspection results.

Benefits of technology

The quality inspection efficiency of image quality inspection is improved, the problem of inability to quality inspection is avoided due to poor image display quality is ensured, and the accuracy and reliability of quality inspection results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228775A_ABST
    Figure CN119228775A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image quality inspection method and device, electronic equipment and a storage medium, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a target image, wherein the target image is an image of which a quality inspection result cannot be obtained after preliminary quality inspection; identifying the text content in the target image to obtain an identification result; performing display angle adjustment on the target image based on the identification result to obtain at least two target images after display angle adjustment; performing quality inspection on the target image after adjustment of each display angle; and when it is detected that a quality inspection result is obtained in any target image after adjustment of the display angle, determining the quality inspection result as the quality inspection result of the target image. Therefore, text content recognition is carried out on the target image of which the preliminary quality inspection is abnormal, and display angle adjustment is carried out on the target image through the recognition result, so that secondary quality inspection is carried out, the problem that quality inspection cannot be carried out due to poor image display quality can be avoided, and the quality inspection efficiency of image quality inspection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image quality inspection method, device, electronic device and storage medium. Background Art

[0002] Image quality inspection is the process of quality inspection and control using artificial intelligence technologies such as machine learning and deep learning. It can be applied to a variety of different industries and fields, including manufacturing, logistics, energy, healthcare, finance, etc. Based on the collected images, videos and other information, the quality inspection system can identify defects in products or services and provide timely feedback and suggestions to help companies improve product quality, improve service quality and reduce costs.

[0003] In the related art, when the image display quality of the collected images is poor, for example, the image shooting angle changes greatly, the image is flipped, and other problems will cause the quality inspection model to be unable to perform quality inspection on the low-quality images, and subsequent manual verification will be required, and the quality inspection efficiency is low. Therefore, it is urgent to provide an image quality inspection method to solve the above technical problems. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose an image quality inspection method, device, electronic device and storage medium, which can avoid the problem of being unable to inspect due to poor image display quality and improve the inspection efficiency of image quality inspection.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes an image quality inspection method, the method comprising:

[0006] Acquire a target image, wherein the target image is an image for which no quality inspection result can be obtained after preliminary quality inspection;

[0007] Recognize the text content in the target image to obtain a recognition result;

[0008] Adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted;

[0009] Performing quality inspection on each target image after the display angle is adjusted;

[0010] When it is detected that a quality inspection result is obtained in any of the target images after the display angle is adjusted, the quality inspection result is determined as the quality inspection result of the target image.

[0011] In some embodiments, adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted includes:

[0012] When the recognition result indicates that text content is recognized in the target image, determining a target display angle of the target image;

[0013] The target image is adjusted from the target display angle to at least two preset display angles respectively to obtain at least two target images after the display angles are adjusted.

[0014] In some embodiments, the method further comprises:

[0015] When the recognition result indicates that no text content is recognized in the target image, the display angle of the target image is rotated by at least two preset rotation angles respectively to obtain at least two target images with adjusted display angles.

[0016] In some embodiments, the method further comprises:

[0017] When no quality inspection result is obtained in the target image after the display angle is adjusted, flipping the target image to obtain a flipped target image;

[0018] Performing quality inspection on the flipped target image;

[0019] When a quality inspection result is obtained in the flipped target image, the quality inspection result is determined as the quality inspection result of the target image.

[0020] In some embodiments, the method further comprises:

[0021] When no quality inspection result is obtained in the flipped target image, obtaining a target size of the target image;

[0022] Determine the segmentation size according to the target size and the preset reduction ratio;

[0023] Segmenting the target image according to the segmentation size to obtain a plurality of segmented images;

[0024] Performing quality inspection on each of the segmented images to obtain multiple segmentation quality inspection results;

[0025] A quality inspection result of the target image is determined according to the plurality of segmentation quality inspection results.

[0026] In some embodiments, the target size includes a target length and a target width, and determining the segmentation size according to the target size and a preset reduction ratio includes:

[0027] Calculating the product of the target length and the preset reduction ratio to obtain a segmentation length;

[0028] Calculating the product of the target width and the preset reduction ratio to obtain a segmentation width;

[0029] The segmentation length and the segmentation width are determined as segmentation sizes.

[0030] In some embodiments, determining the quality inspection result of the target image according to the plurality of segmentation quality inspection results includes:

[0031] When there is a segmentation quality inspection result indicating unqualified among the plurality of segmentation quality inspection results, determining that the quality inspection result of the target image is unqualified;

[0032] When there is no unqualified segmentation quality inspection result among the plurality of segmentation quality inspection results, it is determined that the quality inspection result of the target image is qualified.

[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an image quality inspection device, comprising:

[0034] A first acquisition unit, used to acquire a target image, wherein the target image is an image for which a quality inspection result cannot be obtained after a preliminary quality inspection;

[0035] A recognition unit, used to recognize the text content in the target image and obtain a recognition result;

[0036] an adjusting unit, configured to adjust the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted;

[0037] A quality inspection unit, used for performing quality inspection on each target image after the display angle is adjusted;

[0038] A determination unit is used to determine the quality inspection result as the quality inspection result of the target image when it is detected that a quality inspection result is obtained in any target image after the display angle is adjusted.

[0039] In some embodiments, the adjustment unit includes:

[0040] a determination subunit, configured to determine a target display angle of the target image when the recognition result indicates that text content is recognized in the target image;

[0041] The first adjustment subunit is used to adjust the target image from the target display angle to at least two preset display angles respectively, so as to obtain at least two target images after the display angles are adjusted.

[0042] In some embodiments, the adjustment unit further includes:

[0043] The second adjustment subunit is used to rotate the display angle of the target image by at least two preset rotation angles to obtain at least two target images with adjusted display angles when the recognition result indicates that no text content is recognized in the target image.

[0044] In some embodiments, the image quality inspection device further includes:

[0045] A flipping unit, configured to flip the target image to obtain a flipped target image when no quality inspection result is obtained in the target image after the display angle is adjusted;

[0046] A second quality inspection unit, used for performing quality inspection on the flipped target image;

[0047] The second determining unit is configured to determine, when a quality inspection result is obtained in the flipped target image, the quality inspection result as the quality inspection result of the target image.

[0048] In some embodiments, the image quality inspection device further includes:

[0049] A third determining unit, configured to determine a segmentation size according to the target size and a preset reduction ratio;

[0050] A segmentation unit, used for segmenting the target image according to the segmentation size to obtain a plurality of segmented images;

[0051] A third quality inspection unit, used to perform quality inspection on each of the segmented images to obtain a plurality of segmentation quality inspection results;

[0052] A fourth determining unit is used to determine a quality inspection result of the target image according to the plurality of segmentation quality inspection results.

[0053] In some embodiments, the target size includes a target length and a target width, and the third determining unit is configured to:

[0054] Calculating the product of the target length and the preset reduction ratio to obtain a segmentation length;

[0055] Calculating the product of the target width and the preset reduction ratio to obtain a segmentation width;

[0056] The segmentation length and the segmentation width are determined as segmentation sizes.

[0057] In some embodiments, the fourth determining unit is configured to:

[0058] When there is a segmentation quality inspection result indicating unqualified among the plurality of segmentation quality inspection results, determining that the quality inspection result of the target image is unqualified;

[0059] When there is no unqualified segmentation quality inspection result among the plurality of segmentation quality inspection results, it is determined that the quality inspection result of the target image is qualified.

[0060] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0061] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0062] The image quality inspection method, device, electronic device and storage medium proposed in the present application obtain a target image, which is an image that cannot obtain a quality inspection result after preliminary quality inspection; recognize the text content in the target image to obtain a recognition result; adjust the display angle of the target image based on the recognition result to obtain at least two target images after the display angle adjustment; perform quality inspection on each of the target images after the display angle adjustment; when a quality inspection result is obtained in any of the target images after the display angle adjustment, the quality inspection result is determined as the quality inspection result of the target image. In this way, the text content is recognized for the target image with abnormal preliminary quality inspection, so that the display angle of the target image is adjusted according to the recognition result, so as to perform a secondary quality inspection, which can avoid the problem of being unable to perform quality inspection due to poor image display quality and improve the quality inspection efficiency of image quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 is a flow chart of the image quality inspection method provided in an embodiment of the present application;

[0064] Figure 2 yes Figure 1 Flow chart of step S103 in FIG.

[0065] Figure 3 yes Figure 1 Another flow chart of step S103 in ;

[0066] Figure 4 is another flow chart of the image quality inspection method provided in the embodiment of the present application;

[0067] Figure 5 is another flow chart of the image quality inspection method provided in the embodiment of the present application;

[0068] Figure 6 yes Figure 5 Flow chart of step S502 in FIG.

[0069] Figure 7 yes Figure 5 Flow chart of step S505 in FIG.

[0070] Figure 8 is a structural schematic diagram of an image quality inspection device provided in an embodiment of the present application;

[0071] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0073] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0075] First, some nouns involved in this application are analyzed:

[0076] Image quality inspection: It is a method of using artificial intelligence technology to detect the quality of images. In image quality inspection, deep learning algorithms and computer vision technology are usually used to automatically analyze and evaluate images. Specifically, image quality inspection can achieve the following functions: 1. Defect detection: Detect various defects in the image, such as scratches, stains, cracks, etc. By training a large number of images marked with defects, the network model can learn the characteristics of different types of defects, so that it can accurately identify the defects in the image. 2. Dimension measurement: Measure the size of objects in the image, such as length, width, height, etc. Using computer vision technology, edge detection and contour extraction can be performed on objects in the image, and then the size information of the object can be obtained by calculation. 3. Color detection: Detect whether the color in the image meets the requirements. For example, in the printing industry, image quality inspection can be used to detect whether the color of the printed product is consistent with the design draft. 4. Content recognition: Identify the content in the image, such as text, numbers, graphics, etc. Through optical character recognition (OCR) technology and image recognition algorithms, the content in the image can be extracted and analyzed to ensure that the information in the image is accurate.

[0077] Image quality inspection can quickly inspect a large number of images, greatly improving production efficiency. Compared with manual quality inspection, image quality inspection has higher accuracy and stability, and can reduce the influence of human factors. It is not affected by subjective factors and can objectively evaluate images. The quality inspection results of each image can be recorded to facilitate subsequent quality tracing and problem analysis. In short, image quality inspection is an advanced quality inspection method that can help companies improve production efficiency, reduce costs, and improve product quality.

[0078] Optical Character Recognition (OCR): is a technology that converts text in an image into editable text. Its working principles include: 1. Image acquisition: First, images containing text are acquired through devices such as scanners and cameras. These images can be paper documents, photos, screenshots, etc. 2. Preprocessing: The acquired images are preprocessed to improve the accuracy of subsequent recognition. Preprocessing steps may include image denoising, binarization, and tilt correction. 3. Image denoising can remove noise in the image, such as salt and pepper noise, Gaussian noise, etc., to make the image clearer. Binarization converts the image into a black and white binary image to better identify the outline of the text. Tilt correction detects and corrects the tilt angle in the image to ensure that the text is in a horizontal or vertical direction. 4. Character segmentation: The text in the preprocessed image is segmented into individual characters. This step usually uses image processing techniques such as connected region analysis and projection method. Connected region analysis can identify connected regions (i.e., sets of pixels with the same color or grayscale value) in an image as characters. The projection rule determines the boundaries of characters by projecting the image horizontally and vertically. 5. Feature extraction: Extract features from the segmented characters, which can be used to identify the characters. Common features include the shape, structure, and strokes of the characters. 6. Character recognition: Use the trained character recognition model to identify the extracted features and determine the category of each character. The character recognition model can be a classifier based on machine learning, such as support vector machines, neural networks, etc. Training a character recognition model requires a large amount of labeled data, that is, images containing known characters and corresponding character labels. By learning from the labeled data, the model can learn to recognize different types of characters. 7. Post-processing: Post-process the recognized characters to improve the readability and accuracy of the text. Post-processing steps may include spelling checking, grammar checking, text typesetting, etc. Spelling checking can detect and correct spelling errors in the recognized text. Grammar checking can check whether the text is grammatically correct.

[0079] OCR technology is a very useful technology that can convert text in images into editable text, improving work efficiency and information management. With the continuous development of artificial intelligence technology, the accuracy and efficiency of OCR technology will continue to improve.

[0080] Practical Ultra-lightweight OCR (PP-OCR): It mainly uses the direction classifier to identify the placement angle of the image. The working principle includes: 1. Data input: The polygon information of the text area obtained by text detection is input into the direction classifier. The text detection part uses algorithms such as the segmentation-based text detection algorithm (Differentiable Binarization Network, DBnet) to obtain the four-point information of the text area in the image. These text areas may be at different angles and directions. 2. Feature extraction: The direction classifier uses a lightweight backbone network to extract features from the input text area image. The backbone network can learn various features of the image, such as texture, edge, shape and other information. These features are very important for determining the direction of the text. In the feature extraction process, the image information is converted into a feature vector that can be understood and processed by the computer. 3. Direction classification: Based on the extracted features, the direction classifier classifies the direction of the text. In PP-OCR, two directions of 0 degrees and 180 degrees are usually considered to determine whether the text is in the forward or reverse direction. By learning from a large amount of labeled data, the direction classifier can determine the direction category of the text region based on the feature vector.

[0081] PP-OCR learns and classifies the features of the text area through the direction classifier, thereby identifying the image placement angle and making corresponding corrections to improve the accuracy of text recognition. This method has high adaptability and accuracy when processing text images at various angles.

[0082] Based on this, the embodiments of the present application provide an image quality inspection method, device, electronic device and storage medium, aiming to avoid the problem of being unable to inspect quality due to poor image display quality and improve the quality inspection efficiency of image quality inspection.

[0083] The image quality inspection method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the image quality inspection method in the embodiments of the present application is described.

[0084] The image quality inspection method provided in the embodiment of the present application relates to the field of image processing technology. The image quality inspection method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the image quality inspection method, etc., but is not limited to the above forms.

[0085] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0086] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0087] Figure 1 is an optional flow chart of the image quality inspection method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.

[0088] Step S101, obtaining a target image, where the target image is an image for which no quality inspection result can be obtained after preliminary quality inspection.

[0089] Among them, the preliminary quality inspection is to extract the text content in the image through OCR by means of image quality inspection, and compare it with the preset illegal content, so as to determine the image containing the text content of the preset illegal content as an unqualified image; or determine the image containing the text content that does not contain the preset illegal content as a qualified image.

[0090] Specifically, due to large changes in image shooting angles when collecting images, quality inspection points being flipped, and a small area occupied by quality inspection points, the text content extracted during the preliminary quality inspection may be flipped or at a large angle, making it impossible to compare with the preset illegal content, or to extract the text content. Therefore, for such images, the preliminary quality inspection cannot give quality inspection results, and such images are target images.

[0091] For example, in the insurance promotion scenario, there is an insurance promotion image. Under normal circumstances, OCR can accurately extract the text content and compare it with the preset violation content to determine whether it is qualified. However, if the angle of this image changes greatly when it is shot, such as the image is tilted, OCR may make recognition errors when extracting text content, making the extracted text content difficult to understand or unable to extract any text content at all. Or the quality inspection point (key text area) in the image is flipped, making it impossible for OCR to correctly identify the direction of the text. It is also possible that the quality inspection point occupies a small area, and it is difficult for OCR to accurately identify the key text. Or the key text "insurance income is stable, and the annualized rate of return is as high as 10%" that should have been clearly presented in the image, due to the problem of the image shooting angle, the content extracted by OCR becomes an illegible character combination, which cannot be compared with the preset violation content, so this image cannot get the quality inspection result during the preliminary quality inspection, and it becomes the target image, which needs to be further processed by a special quality inspection solution.

[0092] Step S102, recognizing the text content in the target image to obtain a recognition result.

[0093] Among them, since there are two abnormal situations in the preliminary quality inspection stage of the target image, that is, the text content can be extracted but cannot be compared, or the text content cannot be extracted, different quality inspection schemes are used for quality inspection according to different abnormal situations. Therefore, it is necessary to identify the text content in the target image here to determine whether the text content can be identified from the target image and obtain the recognition result.

[0094] Specifically, there are two types of recognition results. The first type of recognition result is used to indicate that text content is recognized in the target image; the second type of recognition result is used to indicate that text content is not recognized in the target image.

[0095] For example, in the preliminary quality inspection stage, due to the problem of shooting angle, the extracted text content of the target image is difficult to compare with the preset illegal content. Now perform text content recognition in step S102. Through the OCR algorithm or after adjusting the parameters, the text content in the image is successfully identified as "This insurance product provides comprehensive protection, low risk and stable returns." In this case, the recognition result obtained is the first recognition result, which indicates that the text content is recognized in the target image. Or the target image is very blurry and the text part occupies a very small area. When performing the recognition in step S102, no recognizable text content can be extracted from the image no matter what method is used. At this time, the recognition result obtained is the second recognition result, which indicates that no text content is recognized in the target image.

[0096] Step S103: adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted.

[0097] Among them, after the recognition result is obtained in step S102, no matter how the recognition result is characterized, the display angle of the target image will be adjusted. The only difference is that the adjustment method of the display angle is different, and when the display angle is adjusted, it will be adjusted at least twice, and the adjustment angle is different each time, so as to obtain at least two target images after the display angle is adjusted.

[0098] Step S104, performing quality inspection on each target image after the display angle is adjusted.

[0099] In step S103, after adjusting the display angle of the target image to obtain at least two target images after the display angle is adjusted, a secondary quality inspection is performed on each target image after the display angle is adjusted to determine whether a quality inspection result can be obtained from the adjusted target image.

[0100] Step S105 , when it is detected that a quality inspection result is obtained in any target image after the display angle is adjusted, the quality inspection result is determined as the quality inspection result of the target image.

[0101] Among them, if a quality inspection result is detected in the target image after any display angle adjustment, it means that a qualified or unqualified quality inspection result has been obtained for the target image, and the target image at this time is not an abnormal image, and the quality inspection result is determined as the quality inspection result of the target image.

[0102] For example, an insurance promotion image is used as the target image. During the preliminary quality inspection, it is impossible to determine whether it is qualified due to the shooting angle problem. After the display angle is adjusted in step S103, three target images at different angles are obtained. For the adjusted image, OCR is used to extract the text content again and compare it with the preset illegal content. Assume that the preset illegal content includes exaggerated expressions such as "super high returns" and "no risk". After recognition, it is found that the text in the image is "The returns of this insurance product are stable and the risks are controllable", and there is no illegal content. It is preliminarily judged that the image may be a qualified image. Since qualified quality inspection results are obtained in the adjusted target images, it can be determined that the target image is no longer an abnormal image. And the qualified result is determined as the quality inspection result of the target image. In this way, by performing quality inspection on the target images adjusted at different display angles, the final quality inspection result of the target image, which was originally unable to determine the result in the preliminary quality inspection, is successfully determined.

[0103] Steps S101 to S105 shown in the embodiment of the present application are as follows: acquiring a target image, wherein the target image is an image for which a quality inspection result cannot be obtained after a preliminary quality inspection; recognizing the text content in the target image to obtain a recognition result; adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted; performing a quality inspection on each of the target images after the display angles are adjusted; and when a quality inspection result is obtained in any of the target images after the display angles are adjusted, determining the quality inspection result as the quality inspection result of the target image. In this way, text content recognition is performed on the target image with an abnormal preliminary quality inspection, so that the display angle of the target image is adjusted according to the recognition result, thereby performing a secondary quality inspection, and re-inspecting the target image by adjusting the display angle, which can avoid the problem of being unable to perform quality inspection due to poor image display quality and improve the quality inspection efficiency of image quality inspection.

[0104] See also Figure 2 In some embodiments, step S103 may include but is not limited to steps S201 to S202:

[0105] Step S201 : when the recognition result indicates that text content is recognized in the target image, determining a target display angle of the target image.

[0106] If the recognition result indicates that text content is recognized in the target image, a targeted display angle adjustment can be performed based on the target display angle of the target image, thereby determining the target display angle of the target image.

[0107] Specifically, the target display angle can be determined by analyzing the text content in the target image through the PP-OCR model. The specific determination method is: extracting features of the text content through the PP-OCR model to obtain text features; processing the text features accordingly through the direction classifier to classify the direction of the text, thereby determining the display direction of the text area, which corresponds to the display direction of the target image, thereby obtaining the target display angle.

[0108] Step S202: adjusting the target image from the target display angle to at least two preset display angles respectively, to obtain at least two target images after the display angles are adjusted.

[0109] After determining the target display angle of the target image in step S201, the target image can be specifically adjusted from the target display angle to at least two preset display angles to obtain at least two target images after the display angles are adjusted. The purpose of adjusting to at least two preset display angles is to avoid the situation where the quality inspection result cannot be obtained after only one display angle adjustment, and to improve the probability of obtaining the quality inspection result by performing quality inspection on target images with multiple different preset display angles.

[0110] Specifically, the preset display angle is a pre-set display angle that is convenient for quality inspection, such as 0°, 90°, 180°, etc.

[0111] For example, an insurance promotion image is used as the target image, and its target display angle is determined to be 30 degrees in step S201. The preset display angles are set to 0°, 90°, and 180°. First, adjust the target image from the current 30-degree display angle to 0°. At this time, the text in the image may be more horizontal, easier to read and inspect. A target image with adjusted display angle is obtained, in which the insurance slogan "Peace of mind insurance, protection for life" and other text are clearer and more regular.

[0112] Specifically, for the positive and negative angle values ​​of the target display angle, the adjustment strategies are different when adjusting to at least two preset display angles. When the angle value of the target display angle is positive, the difference between the preset display angle and the target display angle is calculated to obtain a rotation angle, and the image is rotated clockwise according to the rotation angle to obtain a target image after the display angle is adjusted.

[0113] For example, if the target display angle is 30° and the preset display angle is 90°, the rotation angle is 60°. For the target image, the target image is rotated 60° clockwise from the original 30° to the preset display angle of 90°, thereby obtaining the target image after the display angle is adjusted.

[0114] When the angle value of the target display angle is negative, determine the absolute value of the target display angle, calculate the sum of the absolute values ​​of the preset display angle and the target display angle, obtain the rotation angle, rotate clockwise according to the rotation angle, and obtain the target image after the display angle is adjusted.

[0115] For example, the angle value of the target display angle is -30°, the absolute value of the target display angle is 30°, the preset display angle is 90°, and the rotation angle is 120°. For the target image, it is rotated 120° clockwise from the original -30° to reach the preset display angle of 90°, thereby obtaining the target image after the display angle is adjusted.

[0116] Alternatively, when the angle value of the target display angle is positive, the rotation is set to be clockwise, and the rotation angle is the difference between the preset display angle and the target display angle; when the angle value of the target display angle is negative, the rotation is set to be counterclockwise, and the rotation angle is the difference between 360° and (the difference between the preset display angle and the target display angle).

[0117] For example, if the angle value of the target display angle is 30° and the preset display angle is 90°, then the angle value of the target display angle is rotated 60° clockwise from 30° to the preset display angle of 90° in a clockwise manner; if the angle value of the target display angle is -30° and the preset display angle is 90°, then the angle value of the target display angle is rotated counterclockwise from -30° to 360°-(90°-(-30°))=240° to the preset display angle of 90° in a counterclockwise manner.

[0118] In this way, the target image is adjusted from the target display angle to at least two preset display angles, providing the target image at multiple different display angles for quality inspection. This can avoid the situation where the quality inspection result cannot be obtained after only one display angle adjustment, greatly improving the probability of obtaining effective results for quality inspection.

[0119] See also Figure 3 In some embodiments, step S103 may also include but is not limited to step S301:

[0120] Step S301 : when the recognition result indicates that no text content is recognized in the target image, the display angle of the target image is rotated by at least two preset rotation angles respectively to obtain at least two target images after the display angles are adjusted.

[0121] Among them, if the recognition result indicates that no text content is recognized in the target image, the display angle of the target image cannot be adjusted to a pre-set display angle that is conducive to quality inspection. The display angle of the target image can only be rotated according to a rotation angle that is easier to quality inspect as shown by a large number of experiments in advance, thereby obtaining at least two target images with adjusted display angles.

[0122] Specifically, the preset rotation angle is a rotation angle that is easier to inspect than that obtained by performing a large number of experiments on multiple rotation angles.

[0123] For example, when recognizing an image after a rotation angle of 30°, the probability of obtaining a quality inspection result is 60%; when recognizing an image after a rotation angle of 90°, the probability of obtaining a quality inspection result is 80%; when recognizing an image after a rotation angle of 180°, the probability of obtaining a quality inspection result is 85%; when recognizing an image after a rotation angle of 270°, the probability of obtaining a quality inspection result is 90%. The rotation angles with higher probabilities of obtaining quality inspection results are determined as preset rotation angles: 90°, 180°, and 270°.

[0124] In this way, when the recognition result shows that no text content is recognized in the target image, an effective solution is provided. In this case, it is impossible to determine a target display angle for targeted adjustment as in the case of text recognition, but by rotating the display angle of the target image by at least two preset rotation angles, the possibility of finding features that can be used for quality inspection can be increased.

[0125] See also Figure 4 In some embodiments, the image quality inspection method may also include but is not limited to steps S401 to S403:

[0126] Step S401, when no quality inspection result is obtained in the target image after the display angle is adjusted, the target image is flipped to obtain a flipped target image.

[0127] Among them, when the display angle of the target image is rotated and the secondary quality inspection of the target image after the display angle adjustment still fails to obtain a quality inspection result, it means that the image may be flipped, resulting in the extracted text content being flipped regardless of the rotation, making it impossible to perform quality inspection. Therefore, the target image is flipped so that the quality inspection can be performed on the flipped target image later.

[0128] Specifically, the flipping method may be left-right flipping, and / or up-down flipping to obtain at least one flipped target image.

[0129] Step S402: performing quality inspection on the flipped target image.

[0130] In step S401, the target image is flipped to obtain the flipped target image, and then the quality inspection is performed on the flipped target image.

[0131] Step S403: when a quality inspection result is obtained in the flipped target image, the quality inspection result is determined as the quality inspection result of the target image.

[0132] When the quality inspection result is obtained in step S402, it means that the original target image is mirrored and flipped during collection, resulting in failure to obtain the quality inspection result. Therefore, the quality inspection result obtained from the flipped target image is used as the quality inspection result of the target image.

[0133] Thus, when the display angle adjustment cannot solve the problem, flipping the target image is a targeted measure. The image may be flipped or other abnormal conditions due to various reasons. The quality inspection process of the embodiment of the present application can adapt to these practical needs and ensure effective quality inspection in various complex situations. This makes the quality inspection method more practical and adaptable, and can meet the quality inspection requirements of different fields and scenarios.

[0134] See also Figure 5 In some embodiments, the image quality inspection method may also include but is not limited to steps S501 to S505:

[0135] Step S501 : when no quality inspection result is obtained in the flipped target image, a target size of the target image is obtained.

[0136] If no quality inspection result is obtained in the flipped target image, it means that the display area of ​​the text content in the target image accounts for a small part of the overall area of ​​the target image, that is, the quality inspection point occupies a small area, which makes it difficult for OCR to accurately identify the key text. Therefore, it is necessary to segment the target image to separately inspect each segmented image. Since the sizes of different images are different, in order to determine the segmentation size when segmenting the target image, it is necessary to obtain the target size of the target image for subsequent segmentation.

[0137] Step S502: determining a segmentation size according to the target size and a preset reduction ratio.

[0138] The preset reduction ratio is a preset reduction ratio, under which the segmentation size can be obtained in combination with the target size of the target image.

[0139] Specifically, the preset reduction ratio is the reduction ratio with the highest probability of obtaining a quality inspection result under multiple reduction ratios in the experimental stage.

[0140] For example, in the experimental stage, the image is segmented according to the reduction ratio of 0.2, and the probability of obtaining the quality inspection result is 0.6; the image is segmented according to the reduction ratio of 0.3, and the probability of obtaining the quality inspection result is 0.8; the image is segmented according to the reduction ratio of 0.4, and the probability of obtaining the quality inspection result is 0.5, then the reduction ratio of 0.3 with the highest probability of obtaining the quality inspection result is determined as the preset reduction ratio for the subsequent actual quality inspection process.

[0141] Step S503, segmenting the target image according to the segmentation size to obtain a plurality of segmented images.

[0142] After the segmentation size is determined in step S502, the target image can be segmented according to the segmentation size to obtain a plurality of segmented images.

[0143] Step S504: perform quality inspection on each of the segmented images to obtain a plurality of segmentation quality inspection results.

[0144] After obtaining a plurality of segmented images in step S503, each segmented image may be quality inspected according to preset illegal contents, so as to determine whether there is preset illegal contents in each segmented image, thereby obtaining a segmentation quality inspection result corresponding to each segmented image.

[0145] For example, the preset illegal content may include "super high return promise" and "risk-free guarantee". The first segmented image is quality inspected, and the text content is identified by OCR and then compared with the preset illegal content. No illegal content is found, and the segmentation quality inspection result corresponding to the segmented image is qualified. The second segmented image is quality inspected, and the text contains the statement "returns far exceed the market average", which is consistent with the preset illegal content. The segmentation quality inspection result corresponding to the segmented image is unqualified. Similarly, the other segmented images are also quality inspected to obtain the corresponding segmentation quality inspection results.

[0146] Step S505: determining a quality inspection result of the target image according to the plurality of segmentation quality inspection results.

[0147] After obtaining the segmentation quality inspection result corresponding to each segmented image in step S504, multiple segmentation quality inspection results may be summarized to determine the overall quality inspection result of the target image.

[0148] In this way, when no quality inspection result is obtained in the flipped target image, it is judged that the quality inspection point occupies a small area. By obtaining the target size of the target image and determining the segmentation size in combination with the preset reduction ratio, images of different sizes can be segmented reasonably. This ensures that the segmented small area is neither too large to lose its pertinence nor too small to be difficult to conduct effective quality inspection.

[0149] See also Figure 6 In some embodiments, step S502 may include but is not limited to steps S601 to S603:

[0150] Step S601, calculating the product of the target length and the preset reduction ratio to obtain the segmentation length.

[0151] The image is generally rectangular and has a length and a width. Therefore, the target size of the target image is composed of the target length and the target width. The segmentation length is determined by calculating the product of the target length and the preset reduction ratio.

[0152] Specifically, the segmentation length can be determined according to the following formula:

[0153] h = box_ratio*H;

[0154] Among them, H is the target length of the target image, box_ratio is the preset reduction ratio, and h is the segmentation length.

[0155] For example, if the target length is 10 cm and the preset reduction ratio is 0.3, the segmentation length is 10 cm*0.3=3 cm.

[0156] Step S602, calculating the product of the target width and the preset reduction ratio to obtain the segmentation width.

[0157] The segmentation width is determined by calculating the product of the target width and the preset reduction ratio.

[0158] Specifically, the segmentation width can be determined according to the following formula:

[0159] w = box_ratio * W;

[0160] Among them, W is the target width of the target image, box_ratio is the preset reduction ratio, and w is the segmentation width.

[0161] For example, if the target width is 6 cm and the preset reduction ratio is 0.3, the segmentation width is 6 cm*0.3=1.8 cm.

[0162] Step S603: determining the segmentation length and the segmentation width as the segmentation size.

[0163] After the segmentation length is determined in step S601 and the segmentation width is determined in step S602, the segmentation size is determined by the segmentation length and the segmentation width, so as to segment the target image according to the segmentation size later.

[0164] In this way, by calculating the product of the target length and the preset reduction ratio to obtain the segmentation length, and the product of the target width and the preset reduction ratio to obtain the segmentation width, this calculation method can accurately determine the segmentation size according to the actual size of the target image and the preset reduction ratio determined by experiments. Accurately determined segmentation size can improve the efficiency of small area quality inspection. Since the image size after segmentation is more reasonable, quality inspection tools such as OCR can detect each small area more quickly, reducing unnecessary computing time and resource waste. At the same time, a reasonable segmentation size also helps to improve the accuracy of quality inspection. Each small area can be inspected more carefully, reducing the risk of missing illegal content due to the complexity of the overall image.

[0165] See also Figure 7 In some embodiments, step S505 may include but is not limited to steps S701 to S702:

[0166] Step S701: when there is a segmentation quality inspection result indicating unqualified among the plurality of segmentation quality inspection results, it is determined that the quality inspection result of the target image is unqualified.

[0167] If there is a segmentation quality inspection result indicating failure among the multiple segmentation quality inspection results, it means that there is illegal content in at least a part of the target image, and the overall quality inspection result of the target image is determined to be unqualified.

[0168] For example, an insurance promotion image is used as the target image. After the previous steps, it is segmented and each segmented image is quality inspected. A total of five segmented images are obtained. After quality inspection of these five segmented images, the segmentation quality inspection results are as follows: Segmented image one: qualified. After OCR recognition of the text content, it is compared with the preset violation content, and no violation content is found. Segmented image two: qualified. No violation content is found either. Segmented image three: unqualified. The expression "super high return promise" is identified in the text, which is consistent with the preset violation content. Segmented image four: qualified. Segmented image five: qualified. Since there is a segmentation quality inspection result (segmented image three) that represents an unqualified quality inspection result among the multiple segmentation quality inspection results, the quality inspection result of the target image is determined to be unqualified.

[0169] This means that even if some areas of the target image are qualified, as long as one segmented image contains illegal content, the overall quality inspection result of the target image will be determined as unqualified to ensure the compliance of the insurance promotion.

[0170] Step S702: When there is no unqualified segmentation quality inspection result among the plurality of segmentation quality inspection results, it is determined that the quality inspection result of the target image is qualified.

[0171] Among them, if there is no unqualified segmentation quality inspection result among the multiple segmentation quality inspection results, it means that there is no illegal content in any area of ​​the target image, and the overall quality inspection result of the target image is determined to be qualified.

[0172] For example, segmented image 1: qualified. After the text content is recognized by OCR, it is compared with the preset illegal content and no illegal content is found. Segmented image 2: qualified. Segmented image 3: qualified. Segmented image 4: qualified. Since there is no segmented quality inspection result indicating unqualified among the multiple segmented quality inspection results, the quality inspection result of the target image is determined to be qualified.

[0173] This indicates that the insurance promotion image does not contain any illegal content in any segmented area, so it is judged as a qualified image as a whole.

[0174] In this way, when all segmented images are qualified, the target image is determined to be qualified as a whole. This method can accurately judge the overall quality of the image. If the quality inspection is only performed on the whole, it may be possible to avoid misjudgment as qualified because some local problems are covered up.

[0175] See also Figure 8 The present application also provides an image quality inspection device, which can implement the above-mentioned image quality inspection method, and the device includes:

[0176] A first acquisition unit, used to acquire a target image, wherein the target image is an image for which a quality inspection result cannot be obtained after a preliminary quality inspection;

[0177] A recognition unit, used to recognize the text content in the target image and obtain a recognition result;

[0178] an adjusting unit, configured to adjust the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted;

[0179] A quality inspection unit, used for performing quality inspection on each target image after the display angle is adjusted;

[0180] A determination unit is used to determine the quality inspection result as the quality inspection result of the target image when it is detected that a quality inspection result is obtained in any target image after the display angle is adjusted.

[0181] In some embodiments, the adjustment unit includes:

[0182] a determination subunit, configured to determine a target display angle of the target image when the recognition result indicates that text content is recognized in the target image;

[0183] The first adjustment subunit is used to adjust the target image from the target display angle to at least two preset display angles respectively, so as to obtain at least two target images after the display angles are adjusted.

[0184] In some embodiments, the adjustment unit further includes:

[0185] The second adjustment subunit is used to rotate the display angle of the target image by at least two preset rotation angles to obtain at least two target images with adjusted display angles when the recognition result indicates that no text content is recognized in the target image.

[0186] In some embodiments, the image quality inspection device further includes:

[0187] A flipping unit, used for flipping the target image to obtain a flipped target image when no quality inspection result is obtained in the target image after the display angle is adjusted;

[0188] A second quality inspection unit, used for performing quality inspection on the flipped target image;

[0189] The second determining unit is configured to determine, when a quality inspection result is obtained in the flipped target image, the quality inspection result as the quality inspection result of the target image.

[0190] In some embodiments, the image quality inspection device further includes:

[0191] A third determining unit, configured to determine a segmentation size according to the target size and a preset reduction ratio;

[0192] A segmentation unit, used for segmenting the target image according to the segmentation size to obtain a plurality of segmented images;

[0193] A third quality inspection unit, used to perform quality inspection on each of the segmented images to obtain a plurality of segmentation quality inspection results;

[0194] A fourth determining unit is used to determine a quality inspection result of the target image according to the plurality of segmentation quality inspection results.

[0195] In some embodiments, the target size includes a target length and a target width, and the third determining unit is configured to:

[0196] Calculating the product of the target length and the preset reduction ratio to obtain a segmentation length;

[0197] Calculating the product of the target width and the preset reduction ratio to obtain a segmentation width;

[0198] The segmentation length and the segmentation width are determined as segmentation sizes.

[0199] In some embodiments, the fourth determining unit is configured to:

[0200] When there is a segmentation quality inspection result indicating unqualified among the plurality of segmentation quality inspection results, determining that the quality inspection result of the target image is unqualified;

[0201] When there is no unqualified segmentation quality inspection result among the plurality of segmentation quality inspection results, it is determined that the quality inspection result of the target image is qualified.

[0202] The image quality inspection device provided by the embodiment of the present application obtains a target image through a first acquisition unit, and the target image is an image that cannot obtain a quality inspection result after preliminary quality inspection; the recognition unit recognizes the text content in the target image to obtain a recognition result; the adjustment unit adjusts the display angle of the target image based on the recognition result to obtain at least two target images after the display angle is adjusted; the quality inspection unit performs quality inspection on each of the target images after the display angle is adjusted; when the determination unit detects that a quality inspection result is obtained in any of the target images after the display angle is adjusted, the quality inspection result is determined as the quality inspection result of the target image. In this way, the text content recognition is performed on the target image with abnormal preliminary quality inspection, so that the display angle of the target image is adjusted according to the recognition result, so as to perform a secondary quality inspection, and the target image is re-inspected by adjusting the display angle, which can avoid the problem of being unable to be inspected due to poor image display quality, and improve the quality inspection efficiency of image quality inspection. The target image is specifically adjusted from the target display angle to at least two preset display angles, and multiple target images at different display angles are provided for quality inspection. This can avoid the situation where the quality inspection result cannot be obtained after only one display angle adjustment, and greatly improves the probability of obtaining effective results in the quality inspection. When the recognition result shows that the text content is not recognized in the target image, an effective solution is provided. In this case, it is impossible to determine a target display angle for targeted adjustment as in the case of text recognition, but by rotating the display angle of the target image by at least two preset rotation angles, the possibility of finding features that can be used for quality inspection can be increased. When the display angle adjustment cannot solve the problem, flipping the target image is a targeted measure, and the image may be flipped due to various reasons. The quality inspection process of the embodiment of the present application can adapt to these actual needs and ensure that effective quality inspection can be carried out in various complex situations. This makes the quality inspection method more practical and adaptable, and can meet the quality inspection requirements of different fields and scenes. When the quality inspection result is not obtained in the flipped target image, it is judged that the quality inspection point accounts for a small area. By obtaining the target size of the target image and determining the segmentation size in combination with the preset reduction ratio, images of different sizes can be reasonably segmented. This ensures that the small area after segmentation will not be too large to lose its pertinence, nor too small to be difficult to conduct effective quality inspection. The segmentation length is obtained by multiplying the target length by the preset reduction ratio, and the segmentation width is obtained by multiplying the target width by the preset reduction ratio. This calculation method can accurately determine the segmentation size based on the actual size of the target image and the preset reduction ratio determined by experiments. Accurately determined segmentation size can improve the efficiency of small area quality inspection. Since the image size after segmentation is more reasonable, quality inspection tools such as OCR can detect each small area more quickly, reducing unnecessary computing time and resource waste. At the same time, a reasonable segmentation size also helps to improve the accuracy of quality inspection.Each small area can be inspected more carefully, reducing the risk of missing illegal content due to the complexity of the overall image. When all segmented images are qualified, the target image is determined to be qualified as a whole. This method can accurately judge the overall quality of the image. If the quality inspection is only performed from the overall perspective, it is possible to avoid misjudgment as qualified because some local problems are covered up.

[0203] The specific implementation of the image quality inspection device is basically the same as the specific implementation of the above-mentioned image quality inspection method, and will not be repeated here.

[0204] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned image quality inspection method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0205] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0206] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0207] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the image quality inspection method of the embodiment of this application;

[0208] Input / output interface 903, used to implement information input and output;

[0209] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0210] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0211] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0212] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned image quality inspection method is implemented.

[0213] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0214] The image quality inspection method, image quality inspection device, electronic device and storage medium provided by the embodiments of the present application are as follows: acquiring a target image, wherein the target image is an image for which a quality inspection result cannot be obtained after a preliminary quality inspection; recognizing the text content in the target image to obtain a recognition result; adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted; performing quality inspection on each of the target images after the display angles are adjusted; and when a quality inspection result is obtained in any of the target images after the display angles are adjusted, determining the quality inspection result as the quality inspection result of the target image. In this way, text content recognition is performed on the target image with an abnormal preliminary quality inspection, so that the display angle of the target image is adjusted according to the recognition result, thereby performing a secondary quality inspection, and re-performing quality inspection on the target image by adjusting the display angle, which can avoid the problem of being unable to perform quality inspection due to poor image display quality and improve the quality inspection efficiency of image quality inspection.

[0215] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0216] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0217] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0218] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0219] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0220] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0221] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0222] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0223] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0224] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0225] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An image quality inspection method, characterized in that: include: Acquire a target image, wherein the target image is an image for which no quality inspection result can be obtained after preliminary quality inspection; Recognize the text content in the target image to obtain a recognition result; Adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted; Performing quality inspection on each target image after the display angle is adjusted; When it is detected that a quality inspection result is obtained in any of the target images after the display angle is adjusted, the quality inspection result is determined as the quality inspection result of the target image.

2. The image quality inspection method according to claim 1, characterized in that: The step of adjusting the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted includes: When the recognition result indicates that text content is recognized in the target image, determining a target display angle of the target image; The target image is adjusted from the target display angle to at least two preset display angles respectively to obtain at least two target images after the display angles are adjusted.

3. The image quality inspection method according to claim 2, characterized in that: The method further comprises: When the recognition result indicates that no text content is recognized in the target image, the display angle of the target image is rotated by at least two preset rotation angles respectively to obtain at least two target images with adjusted display angles.

4. The image quality inspection method according to claim 1, characterized in that: The method further comprises: When no quality inspection result is obtained in the target image after the display angle is adjusted, flipping the target image to obtain a flipped target image; Performing quality inspection on the flipped target image; When a quality inspection result is obtained in the flipped target image, the quality inspection result is determined as the quality inspection result of the target image.

5. The image quality inspection method according to claim 4, characterized in that: The method further comprises: When no quality inspection result is obtained in the flipped target image, obtaining a target size of the target image; Determine the segmentation size according to the target size and the preset reduction ratio; Segmenting the target image according to the segmentation size to obtain a plurality of segmented images; Performing quality inspection on each of the segmented images to obtain multiple segmentation quality inspection results; A quality inspection result of the target image is determined according to the plurality of segmentation quality inspection results.

6. The image quality inspection method according to claim 5, characterized in that: The target size includes a target length and a target width, and determining the segmentation size according to the target size and a preset reduction ratio includes: Calculating the product of the target length and the preset reduction ratio to obtain a segmentation length; Calculating the product of the target width and the preset reduction ratio to obtain a segmentation width; The segmentation length and the segmentation width are determined as segmentation sizes.

7. The image quality inspection method according to claim 5, characterized in that: Determining the quality inspection result of the target image according to the plurality of segmentation quality inspection results includes: When there is a segmentation quality inspection result indicating unqualified among the plurality of segmentation quality inspection results, determining that the quality inspection result of the target image is unqualified; When there is no unqualified segmentation quality inspection result among the plurality of segmentation quality inspection results, it is determined that the quality inspection result of the target image is qualified.

8. An image quality inspection device, characterized in that: include: A first acquisition unit, used to acquire a target image, wherein the target image is an image for which a quality inspection result cannot be obtained after a preliminary quality inspection; A recognition unit, used to recognize the text content in the target image and obtain a recognition result; an adjusting unit, configured to adjust the display angle of the target image based on the recognition result to obtain at least two target images after the display angles are adjusted; A quality inspection unit, used for performing quality inspection on each target image after the display angle is adjusted; A determination unit is used to determine the quality inspection result as the quality inspection result of the target image when it is detected that a quality inspection result is obtained in any target image after the display angle is adjusted.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the image quality inspection method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image quality inspection method according to any one of claims 1 to 7 is implemented.