Picture quality detection method, apparatus, device, medium and program product

By employing partitioned detection and personalized quality detection methods, the problem of inaccurate detection results in existing technologies has been solved, achieving efficient and accurate image quality screening.

CN116740038BActive Publication Date: 2026-03-10CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing intelligent image quality detection methods typically employ a uniform detection approach, resulting in detection results that do not meet user needs and are time-consuming and labor-intensive.

Method used

Personalized quality inspection is achieved by extracting image features, performing partitioned detection, calculating regional ratios, and selecting appropriate detection methods.

Benefits of technology

It improves the accuracy and efficiency of detection results, meets the actual needs of users, and quickly filters out the best quality images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740038B_ABST
    Figure CN116740038B_ABST
Patent Text Reader

Abstract

The present disclosure provides a picture quality detection method, device, equipment, medium and program product, which can be applied to the field of artificial intelligence. The method comprises: in response to a user instruction, obtaining a plurality of to-be-detected pictures; extracting picture features of each to-be-detected picture respectively to obtain a plurality of picture features; grouping to-be-detected pictures with similar picture features to obtain at least one to-be-detected picture group; selecting any one to-be-detected picture in the to-be-detected picture group, and determining a first region and a second region in the to-be-detected picture; wherein the first region is a portrait region, and the second region is a background region; calculating the proportional relationship of the first region and the second region; determining a detection method based on the proportional relationship of the to-be-detected picture; executing the detection method in the to-be-detected picture group to perform quality detection on each to-be-detected picture in the to-be-detected picture group to obtain a detection result; and screening a plurality of to-be-detected pictures in the to-be-detected picture group based on the detection result to determine a target picture in the to-be-detected picture group.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of artificial intelligence, and in particular, to a picture quality detection method, device, equipment, medium and program product. BACKGROUND

[0002] People often have the need for picture quality detection in life, that is, to select a plurality of representative and best quality photos from a pile of photos. For example, when selecting promotional photos for a news release or when organizing a photo album, it is often necessary to select the best quality photo from a plurality of similar photos. If manual screening is used, it is time-consuming and laborious, and the existing intelligent picture quality detection method usually directly uses a unified quality detection method for the whole picture, which may lead to the fact that the quality detection method of some pictures is contrary to the actual needs of users, resulting in inaccurate quality detection results. SUMMARY

[0003] In view of the above problems, the present disclosure provides a picture quality detection method, device, equipment, medium and program product.

[0004] According to a first aspect of the present disclosure, a picture quality detection method is provided, comprising the following steps: in response to a user instruction, obtaining a plurality of to-be-detected pictures; extracting the picture features of each to-be-detected picture respectively to obtain a plurality of picture features; grouping the to-be-detected pictures with similar picture features into a group to obtain at least one to-be-detected picture group; for each to-be-detected picture group, performing the following operations: selecting any one to-be-detected picture in the to-be-detected picture group, and determining a first region and a second region in the to-be-detected picture; wherein the first region is a portrait region and the second region is a background region; calculating the proportional relationship of the first region and the second region; determining a detection method based on the proportional relationship of the to-be-detected picture; executing the detection method in the to-be-detected picture group to perform quality detection on each to-be-detected picture in the to-be-detected picture group to obtain a detection result; and based on the detection result, screening a plurality of to-be-detected pictures in the to-be-detected picture group to determine a target picture in the to-be-detected picture group.

[0005] According to an embodiment of the present disclosure, the picture features of each to-be-detected picture are extracted, comprising: performing feature extraction on the to-be-detected picture through convolution operation to obtain a first feature map; performing downsampling operation on the first feature through pooling operation to reduce the size of the first feature map to obtain a second feature map; performing multiple convolutions on the second feature map through multiple residual units to improve feature accuracy to obtain a third feature map; and performing aggregation on the third feature map through a fully connected layer to obtain the picture features of the to-be-detected picture.

[0006] According to an embodiment of the present disclosure, the first feature map is down-sampled by a pooling operation to obtain the second feature map, including: dividing the first feature map into a plurality of first image regions, performing a maximum pooling operation on the first image regions to obtain a plurality of second image regions, and then obtaining the second feature map; wherein the second feature map is composed of the plurality of second image regions.

[0007] According to an embodiment of the present disclosure, the maximum pooling operation is performed on the first image region to obtain the second image region, including: selecting a sub-region with the maximum value in the first image region; and taking the sub-region with the maximum value as the second image region.

[0008] According to an embodiment of the present disclosure, the residual unit includes a residual edge and a residual convolution unit; and the second feature map is convolved multiple times by the plurality of residual units, including: extracting features in the second feature map based on the residual convolution unit; and when the number of residual convolution units reaches a pre-trained threshold, performing transmission of the extracted features based on the residual edge.

[0009] According to an embodiment of the present disclosure, any one of the test pictures in the test picture group is selected, and a first region and a second region in the test picture are determined, including: performing feature extraction on each pixel in the test picture to determine the semantic features of each pixel; and classifying the pixels in the test picture based on the semantic features to determine the first region and the second region in the test picture.

[0010] According to an embodiment of the present disclosure, the proportional relationship between the first region and the second region is calculated, including: calculating a first area and a second area; wherein the first area is the area ratio of the first region to the test picture, and the second area is the area ratio of the second region to the test picture; and determining the proportional relationship between the first region and the second region based on the first area and the second area.

[0011] According to an embodiment of the present disclosure, based on the proportional relationship, a corresponding quality detection method is selected, including: in a case where the proportional relationship is greater than a preset threshold, a first detection method is performed; and in a case where the proportional relationship is less than the preset threshold, a second detection method is performed; wherein the first detection method is to perform quality detection on part of the regions in the test image, and the second detection method is to perform quality detection on the entire region of the test image.

[0012] According to an embodiment of the present disclosure, the first detection method includes: extracting relevant features in the first region; wherein the relevant features at least include portrait features and face features of the portrait; and performing quality detection on the relevant features, and taking the quality detection result of the relevant features as the quality detection result of the test picture.

[0013] The second aspect of the present disclosure provides a picture quality detection apparatus, comprising: an acquisition module configured to acquire a plurality of to-be-detected pictures in response to a user instruction; a feature extraction module configured to extract picture features of each to-be-detected picture respectively, to obtain a plurality of picture features; a classification module configured to classify the to-be-detected pictures with similar picture features into a group, to obtain at least one to-be-detected picture group; a partition module configured to select any one to-be-detected picture in the to-be-detected picture group, and determine a first region and a second region in the to-be-detected picture; wherein the first region is a portrait region, and the second region is a background region; a calculation module configured to calculate a proportional relationship of the first region and the second region; a first determination module configured to determine a detection method based on the proportional relationship of the to-be-detected picture; a detection module configured to execute the detection method in the to-be-detected picture group, and perform quality detection on each to-be-detected picture in the to-be-detected picture group, to obtain a detection result; and a second determination module configured to filter a plurality of to-be-detected pictures in the to-be-detected picture group based on the detection result, and determine a target picture in the to-be-detected picture group.

[0014] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above method.

[0015] The fourth aspect of the present disclosure further provides a computer-readable storage medium having stored executable instructions, which, when executed by a processor, cause the processor to perform the above method.

[0016] The fifth aspect of the present disclosure further provides a computer program product comprising a computer program, which, when executed by a processor, implements the above method. BRIEF DESCRIPTION OF DRAWINGS

[0017] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:

[0018] Figure 1 An application scenario diagram of a picture quality detection method, apparatus, device, medium and program product according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 2 A flowchart of a picture quality detection method according to an embodiment of the present disclosure is schematically shown;

[0020] Figure 3 A flowchart of extracting picture features of each to-be-detected picture in a picture quality detection method according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 4A flowchart schematically showing a process of determining a first region and a second region in a picture to be detected in the picture quality detection method according to an embodiment of the present disclosure is shown in FIG. 1;

[0022] Figure 5 A flowchart schematically showing a process of calculating a proportional relationship between the first region and the second region in the picture quality detection method according to an embodiment of the present disclosure is shown in FIG. 2;

[0023] Figure 6 A flowchart schematically showing a process of selecting a corresponding detection method in the picture quality detection method according to an embodiment of the present disclosure is shown in FIG. 3;

[0024] Figure 7 A flowchart schematically showing a process of the first detection method in the picture quality detection method according to an embodiment of the present disclosure is shown in FIG. 4;

[0025] Figure 8 A block diagram schematically showing a structure of a picture quality detection apparatus according to an embodiment of the present disclosure is shown in FIG. 5;

[0026] Figure 9 A block diagram schematically showing an electronic device suitable for implementing the picture quality detection method according to an embodiment of the present disclosure is shown in FIG. 6. DETAILED DESCRIPTION

[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary and is intended to provide a thorough understanding of the present disclosure. The following description, given together with the accompanying drawings, is intended to provide a thorough understanding of the present disclosure. However, it is apparent that one or more embodiments can be implemented without the specific details given below. Furthermore, in the following description, descriptions of well-known structures and techniques have been omitted to avoid unnecessarily obscuring the concept of the present disclosure.

[0028] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprise" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0029] All terms used herein (including technical and scientific terms) have meanings commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present specification, and should not be interpreted in an idealized or overly formal manner.

[0030] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0031] Embodiments of this disclosure provide an image quality detection method, which, in response to a user instruction, acquires multiple first images to be tested; extracts image features from the first images to be tested; classifies the first images to be tested according to the image features, with each class containing multiple first images to be tested with similar image features; determines the position of a face in the images to be tested, and acquires a second image to be tested based on the face position; wherein the second image to be tested is a face image in the images to be tested; and performs a quality assessment on the second image to be tested to obtain a target image.

[0032] Figure 1 The illustration shows an application scenario of the image quality inspection method, apparatus, device, medium, and program product according to embodiments of the present disclosure.

[0033] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0034] Users can interact with server 105 via network 104 using at least one of the first terminal device 101, second terminal device 102, and third terminal device 103 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, second terminal device 102, and third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0035] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0036] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0037] It should be noted that the image quality detection method provided in this embodiment can generally be executed by server 105. Correspondingly, the image quality detection device provided in this embodiment can generally be located in server 105. The image quality detection method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the image quality detection device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0038] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0039] The following will be based on Figure 1 The described scene, through Figures 2-6 The image quality detection method of the disclosed embodiments will be described in detail.

[0040] Figure 2 A flowchart illustrating an image quality detection method according to an embodiment of the present disclosure is shown.

[0041] like Figure 2 As shown, the image quality detection method of this embodiment includes operations S210 to S280.

[0042] When operating S210, in response to user commands, multiple images to be tested are acquired.

[0043] In operation S220, image features of each image to be tested are extracted to obtain multiple image features.

[0044] In operation S230, test images with similar image features are grouped together to obtain at least one group of test images.

[0045] In this embodiment, similar images are grouped to obtain at least one group of images to be tested. Performing quality detection on the images to be tested in groups effectively improves the detection efficiency of similar images and enables rapid quality detection of similar images.

[0046] Perform operations S240 to S280 in each group of images to be tested.

[0047] In operation S240, select any one of the test images in the test image group, and determine the first region and the second region in the test image; wherein, the first region is the portrait region and the second region is the background region.

[0048] In operation S250, the proportional relationship between the first region and the second region is calculated.

[0049] When operating the S260, the detection method is determined based on the proportional relationship of the image to be tested.

[0050] In this embodiment, by selecting any one image from the group of images to be tested, determining the first and second regions within that image, and calculating the proportional relationship between the two regions, the detection method for that image can be determined. For example, when the first region occupies a large proportion of the entire image, it can be determined that the focus of the image is the human figure. In this case, a suitable detection method is selected to perform quality detection on the image, improving the compatibility between the detection method and the image, thereby increasing the accuracy of the detection results.

[0051] In operation S270, the detection method is executed in the group of images to be tested, and the quality of each image in the group is checked to obtain the detection result.

[0052] In this embodiment, since the images in the test image group all have similar image features, determining the detection method for one image in the group is sufficient to determine the detection methods for the other images in the same group. Determining the detection method on a group basis effectively improves the matching rate between each image and the detection method, enabling rapid matching of detection methods.

[0053] In operation S280, based on the detection results, multiple images in the image group to be tested are filtered to determine the target image in the image group to be tested.

[0054] In this embodiment of the disclosure, the highest quality image in the group of images to be tested is determined by comparing the detection results of each image to be tested. The highest quality image is then used as the target image to filter multiple similar images, ensuring that the target image ultimately retained by the user is the highest quality image in the group of similar images.

[0055] This disclosure enables rapid image filtering by classifying and quality-checking similar images, helping users identify the highest-quality target image from multiple similar images, thus achieving high-quality image filtering. Furthermore, during the image quality check process, this disclosure proposes dividing the image to be tested into multiple regions, each containing different semantic information. By calculating the area occupied by each region in the entire image, it is determined whether the image contains key areas. Based on the different shooting techniques used for images with and without key areas, and considering the user's actual needs, different quality check methods are applied to images with and without key areas. This allows for flexible quality check of different image types, improving the adaptability of the quality check method to the image being tested, thereby improving the accuracy of quality check and making the selected target images more in line with user needs, thus enhancing the user experience.

[0056] The following section continues with reference to the accompanying drawings. Figure 2 The image quality detection method shown is described in detail.

[0057] Figure 3 The flowchart illustrating the process of extracting image features for each image to be tested in the image quality detection method according to an embodiment of the present disclosure is shown.

[0058] like Figure 3 As shown, according to the image quality detection method of this disclosure, the extraction of image features of each image to be tested in operation S220 may include operations S310 to S340.

[0059] When operating S310, feature extraction is performed on the image to be tested through convolution operations to obtain the first feature map.

[0060] In operation S320, the first feature map is downsampled through pooling to reduce its size, resulting in the second feature map.

[0061] In this embodiment of the disclosure, the first feature map is downsampled by max pooling operation. Max pooling operation refers to dividing the first feature map into several first image regions, selecting the sub-region with the maximum value in the first image region, and using it as the second image region to obtain the second feature map. The second feature map is composed of multiple second image regions.

[0062] Max pooling is chosen for downsampling because it preserves texture information to the greatest extent possible. Texture information reflects the visual features of homogeneous phenomena in an image, which is beneficial for subsequent similar image classification. Pooling features effectively removes redundant information, retains key information, reduces image dimensionality, and significantly speeds up computation.

[0063] In operation S330, the second feature map is convolved multiple times through multiple residual units to improve feature accuracy and obtain the third feature map.

[0064] In this embodiment, each residual unit includes residual edges and residual convolutional units. Multiple convolutions are performed on the second feature map using these residual units, including: extracting features from the second feature map based on the residual convolutional units. When the number of residual convolutional units reaches a pre-training threshold, the extracted features are passed based on the residual edges.

[0065] Residual edges introduce skip connections in the residual network model, allowing information from the previous residual unit to flow into the next residual unit without obstruction. This effectively avoids the vanishing gradient problem and degradation caused by excessive network depth, keeping the network at the optimal stage for feature extraction and ensuring the quality of the extracted features, thereby guaranteeing the accuracy of grouping the images under test.

[0066] Using ResNet residual neural networks for image feature extraction can, to some extent, solve the problems of information loss and degradation that exist in traditional convolutional or fully connected layers during information transmission. When the network is too deep, the input information can be directly transmitted to the output through residual edges, which can protect the integrity of the information. The entire network only needs to learn the differences between the input and output, simplifying the learning objective and difficulty.

[0067] In the S340 operation, the third feature map is summarized through a fully connected layer to obtain the image features of the image to be tested.

[0068] In this embodiment of the disclosure, the image features output by the ResNet residual neural network are set as 1000-dimensional vectors, and then Principal Component Analysis (PCA) is used to reduce the dimensionality of the image features to 123. Using PCA for dimensionality reduction can compress the data while minimizing information loss. The image features after dimensionality reduction are easier to perform subsequent operations due to their smaller dimensionality.

[0069] In this embodiment of the disclosure, the operation S230 classifies the first test image according to image features. Each class of images contains multiple first test images with similar image features. This is achieved through the DBSCAN clustering method in unsupervised classification.

[0070] This invention employs the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering method in unsupervised classification to classify the first test image. The image features are the clustering features in DBSCAN, and the image classification containing multiple first test images with similar image features constitutes a DBSCAN cluster. DBSCAB is a density-based spatial clustering algorithm that is insensitive to outliers, is less susceptible to interference from outliers, and can handle clusters of arbitrary shapes and sizes to achieve relatively flexible and accurate classification results.

[0071] Figure 4 The flowchart illustrating the process of determining a first region and a second region in an image to be tested in an image quality detection method according to an embodiment of the present disclosure is shown.

[0072] like Figure 4 As shown, operation S240 selects any one of the test images in the test image group and determines the first region and the second region in the test image, which may include operations S410 to S420.

[0073] In operation S410, feature extraction is performed on each pixel in the image to be tested to determine the semantic features of each pixel.

[0074] In operation S420, the pixels of the image under test are classified based on semantic features to determine the first and second regions of the image under test.

[0075] In this embodiment, the semantic features of each pixel in the image under test are determined by feature extraction, including: obtaining the ground truth label of each pixel, determining the semantic features of each pixel, determining the semantic category of the pixel based on the semantic features, and classifying each pixel into a first region and a second region based on its semantic category. The first region is a human image region, and the second region is a background region. The method also includes normalizing the image under test based on the ground truth label to standardize the category feature regions in the image, mitigating feature mismatch problems caused by style variations, and effectively increasing the generalization ability of semantic segmentation to be applicable to different image types. Figure 5 The flowchart illustrating the calculation of the proportional relationship between the first region and the second region in the image quality detection method of this disclosure is shown in the embodiment.

[0076] Figure 5 The flowchart illustrating the calculation of the proportional relationship between the first region and the second region in the image quality detection method of this disclosure is shown in the embodiment.

[0077] like Figure 5As shown, the calculation of the ratio between the first region and the second region in operation S250 may include, for example, operations S510 to S520.

[0078] In operation S510, the first area and the second area are calculated; where the first area is the ratio of the area of ​​the first region to the area of ​​the image to be tested, and the second area is the ratio of the area of ​​the second region to the area of ​​the image to be tested.

[0079] In operation S520, the proportional relationship between the first region and the second region is determined based on the first area and the second area.

[0080] In this embodiment of the disclosure, the proportional relationship between the first region and the second region in the image to be tested is determined by calculating the proportion of the first region and the second region in the image to be tested, wherein the proportional relationship is the ratio of the first area to the second area.

[0081] Figure 6 The flowchart illustrating the selection of a corresponding detection method in the image quality detection method according to an embodiment of the present disclosure is shown in the illustration.

[0082] like Figure 6 As shown, operation S260, based on the proportional relationship, selects the corresponding detection method, which may include operations S610 to S620.

[0083] When operating S610, if the ratio is greater than a preset threshold, the first detection method is executed.

[0084] When operating S620, if the ratio is less than a preset threshold, the second detection method is executed.

[0085] In this embodiment, the detection method for the image under test is flexibly determined by the proportional relationship, so that the detection method for each image under test is the most suitable detection method, thereby improving the accuracy of the detection results. For example, if the proportional relationship of the image under test is greater than a preset threshold, it indicates that there is a key area in the image under test. In this case, the first detection method is selected to perform quality detection on the image under test, wherein the first detection method performs quality detection on a portion of the image under test. If the proportional relationship of the image under test is less than the preset threshold, it indicates that there is no key area in the image under test. In this case, the second detection method is selected to perform quality detection on the image under test, wherein the second detection method performs quality detection on the entire area of ​​the image under test.

[0086] This embodiment of the disclosure determines whether there are key areas in the image under test by analyzing the proportional relationship between different regions. If key areas exist, a first detection method is used to perform quality detection on local areas of the image. If no key areas exist, a second detection method is used to perform quality detection on the image as a whole. The second detection method includes quality detection of the exposure, sharpness, and contrast of the image under test. An image is considered to have high quality when its exposure is correct, its sharpness is high, and its contrast displays vivid and rich colors.

[0087] The image quality detection method disclosed herein can effectively achieve personalized detection for different types of images, making the detection results more in line with the actual needs of users and effectively improving the accuracy of the detection results.

[0088] Figure 7 The flowchart of the first detection method in the image quality detection method of this disclosure is illustrated schematically.

[0089] like Figure 7 As shown, the first detection method may include, for example, operations S710 to S720.

[0090] In operation S710, relevant features in the first region are extracted; wherein, the relevant features include at least portrait features and facial features of the portrait.

[0091] In this embodiment of the disclosure, extracting relevant features in the first region includes: performing facial recognition on the first region to obtain a portrait image; and performing face recognition on the portrait image to extract facial features of the portrait. The facial features of the portrait may include the state of the eyes.

[0092] In practical implementation, facial recognition and image recognition are performed using neural networks, specifically MobileNetV3. MobileNetV3, as a lightweight network, features fewer parameters, lower computational cost, and shorter inference time. It is less constrained by storage space and power limitations, making it suitable for edge computing devices such as mobile embedded devices. Furthermore, compared to other lightweight networks, MobileNetV3 incorporates neural architecture search and channel attention mechanisms, effectively reducing usage and implementation costs while achieving higher accuracy.

[0093] When operating the S720, quality inspection is performed on relevant features, and the quality inspection results of the relevant features are used as the quality inspection results of the image to be tested.

[0094] In this embodiment of the disclosure, the operation S720 for quality detection of relevant features includes:

[0095] When operating the S721, quality inspection is performed on the human portrait area from the first dimension to obtain the first inspection result.

[0096] In this embodiment, the first dimension involves quality detection based on the exposure, sharpness, and contrast of the portrait area. If the portrait area is correctly exposed, has high sharpness, and displays vivid and rich colors with sufficient contrast, the first detection result score is high. Conversely, if the portrait area has problems such as overexposure or underexposure, blurry image, or excessively high or low contrast, the first detection result score is low.

[0097] When operating S722, quality detection is performed on facial features from a second dimension to obtain a second detection result.

[0098] In this embodiment, the second dimension is quality detection of facial features. For example, when the facial feature is the eyes, the detection result of the eye state is used as the second detection result. Key points of the desired facial features can be obtained from a pre-built facial landmark detection model. Then, facial features are extracted from the image to be tested based on these key points to obtain a facial feature image. A pre-built classification model is then used to classify the facial features to obtain a facial feature state evaluation result, which is used to determine the second detection result. For example, if the facial feature is the eyes, the relationship between the second detection result and the eye state is: a detection result for open eyes is better than a detection result for half-open eyes, which is better than a quality detection result for closed eyes.

[0099] In operation S723, the quality detection result of the image to be tested is determined based on the first detection result and the second detection result.

[0100] In this embodiment of the disclosure, the quality detection result of the image to be tested can be the sum of the first detection result and the second detection result.

[0101] When the image to be tested is a portrait image, the quality inspection of the portrait area is performed first, and the quality inspection result of the portrait area is used as the quality inspection result of the entire image to be tested, so as to realize personalized quality inspection of portrait images.

[0102] The step of S721, which performs quality detection on the portrait area from the first dimension to obtain the first detection result, may also include:

[0103] If the image to be tested contains multiple portrait regions, then each portrait region is assigned a different weight based on its area ratio in the image.

[0104] The first dimension of quality detection is performed on each portrait region. The detection result of each portrait region is multiplied by the corresponding weight to obtain the final detection result of that portrait region. At this time, the first detection result is the sum of the final detection results of each portrait region.

[0105] In this embodiment of the disclosure, the weight of each portrait region is determined by the area ratio of the portrait region, and the importance of each portrait in a multi-portrait image is judged. For example, people who are closer to the camera are often more important. Therefore, this disclosure proposes to assign a corresponding weight to each portrait and determine the detection result of each portrait region based on the weight, so as to ensure the accuracy of the detection result.

[0106] It is understandable that when taking pictures, photographers often focus on the subject to highlight the main subject, resulting in blurring of the background area. Therefore, this disclosure proposes to perform quality inspection on key areas of the image under test, and use the quality inspection results of these key areas to replace the overall image quality inspection results. This method eliminates the interference of the background on image quality, effectively improving the accuracy of image quality inspection.

[0107] Based on the above image quality detection method, this disclosure also provides an image quality detection device. The following will be combined with... Figure 8 The device is described in detail.

[0108] Figure 8 A schematic block diagram of an image quality inspection apparatus according to an embodiment of the present disclosure is shown.

[0109] like Figure 8 As shown, the image quality detection device 800 of this embodiment includes an acquisition module 810, a feature extraction module 820, a classification module 830, a partitioning module 840, a calculation module 850, a first determination module 860, a detection module 870, and a second determination module 880.

[0110] The acquisition module 810 is used to acquire multiple images to be tested in response to user instructions. In one embodiment, the acquisition module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0111] The feature extraction module 820 is used to extract image features for each image to be tested, resulting in multiple image features. In one embodiment, the feature extraction module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0112] The classification module 830 is used to group test images with similar image features into at least one group of test images. In one embodiment, the classification module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0113] The partitioning module 840 is used to select any one image from the group of images to be tested and determine a first region and a second region in the image to be tested; wherein the first region is the portrait region and the second region is the background region. In one embodiment, the second acquisition module 840 can be used to perform the operation S240 described above, which will not be repeated here.

[0114] The calculation module 850 is used to calculate the proportional relationship between the first region and the second region. In one embodiment, the quality assessment module 850 can be used to perform the operation S250 described above, which will not be repeated here.

[0115] The first determining module 860 is used to determine the detection method based on the proportional relationship of the image to be tested. In one embodiment, the first determining module 860 can be used to perform the operation S260 described above, which will not be repeated here.

[0116] The detection module 870 is used to execute a detection method in the group of images to be tested, performing quality detection on each image in the group to be tested, and obtaining a detection result. In one embodiment, the detection module 870 can be used to perform the operation S270 described above, which will not be repeated here.

[0117] The second determining module 880 is used to filter multiple images in the image group to be tested based on the detection results, and to determine the target image in the image group to be tested. In one embodiment, the second determining module 880 can be used to perform the operation S280 described above, which will not be repeated here.

[0118] According to embodiments of this disclosure, any multiple modules among the acquisition module 810, feature extraction module 820, classification module 830, partitioning module 840, calculation module 850, first determination module 860, detection module 870, and second determination module 880 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the acquisition module 810, feature extraction module 820, classification module 830, partitioning module 840, calculation module 850, first determination module 860, detection module 870, and second determination module 880 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), programmable logic array (PLA), system-on-a-chip, system-on-a-substrate, system-on-package, application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these. Alternatively, at least one of the acquisition module 810, feature extraction module 820, classification module 830, partitioning module 840, calculation module 850, first determination module 860, detection module 870 and second determination module 880 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0119] Figure 9 A block diagram schematically illustrates an electronic device suitable for implementing an image quality detection method according to an embodiment of the present disclosure.

[0120] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0121] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0122] According to embodiments of this disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 908 including a network interface card such as a LAN card, modem, etc. The communication section 908 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0123] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0124] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903 described above.

[0125] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the item recommendation method provided in the embodiments of this disclosure.

[0126] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0127] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 908, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0128] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 908, and / or installed from removable medium 911. When the computer program is executed by processor 901, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0129] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0131] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0132] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A picture quality detection method, characterized by, The method comprises the following steps: in response to a user instruction, obtaining a plurality of test pictures; extracting the picture features of each test picture to obtain a plurality of picture features; grouping the test pictures with similar picture features to obtain at least one test picture group; for each test picture group, performing the following operations: selecting any test picture in the test picture group to determine a first region and a second region in the test picture; wherein the first region is a portrait region and the second region is a background region; calculating the proportional relationship between the first region and the second region; determining a detection method based on the proportional relationship of the test picture; performing the detection method in the test picture group to detect the quality of each test picture in the test picture group and obtain a detection result; based on the detection result, screening a plurality of test pictures in the test picture group to determine a target picture in the test picture group; wherein, based on the proportional relationship, selecting a corresponding quality detection method, including: in the case that the proportional relationship is greater than a preset threshold, performing a first detection method; in the case that the proportional relationship is less than a preset threshold, performing a second detection method; wherein the first detection method is to perform quality detection on part of the region in the test picture, and the second detection method is to perform quality detection on the whole region of the test picture; the first detection method comprises: extracting relevant features in the first region; wherein the relevant features at least include portrait features and face features of the portrait; performing quality detection on the relevant features, and taking the quality detection result of the relevant features as the quality detection result of the test picture.

2. The method of claim 1, wherein, the extraction of the picture features of each test picture comprises: performing feature extraction on the test picture through convolution operation to obtain a first feature map; performing downsampling operation on the first feature map through pooling operation to reduce the size of the first feature map and obtain a second feature map; performing multiple convolutions on the second feature map through multiple residual units to improve feature accuracy and obtain a third feature map; performing aggregation on the third feature map through a fully connected layer to obtain the picture features of the test picture.

3. The method of claim 2, wherein, the downsampling of the first feature through the pooling operation to obtain the second feature map comprises: dividing the first feature map into a plurality of first image regions; performing maximum pooling operation on the first image regions to obtain second image regions, and then obtaining the second feature map; wherein the second feature map is composed of a plurality of second image regions.

4. The method of claim 3, wherein, the maximum pooling operation on the first image regions to obtain the second image regions comprises: selecting a sub-region with the maximum value in the first image region; taking the sub-region with the maximum value as the second image region.

5. The method of claim 2, wherein, the residual unit comprises a residual edge and a residual convolution unit; the multiple convolutions on the second feature map through multiple residual units comprise: extracting features in the second feature map based on the residual convolution unit; when the number of residual convolution units reaches a pre-trained threshold, performing transmission of the extracted features based on the residual edge.

6. The method of claim 1, wherein, The selecting any one of the to-be-tested pictures in the to-be-tested picture group, determining a first region and a second region in the to-be-tested picture, comprises: performing feature extraction on each pixel in the to-be-tested picture to determine semantic features of each pixel; classifying the pixels in the to-be-tested picture based on the semantic features to determine the first region and the second region in the to-be-tested picture.

7. The method of claim 1, wherein, The calculating the proportional relationship of the first region and the second region comprises: calculating a first area and a second area; wherein the first area is the area proportion of the first region to the to-be-tested picture, and the second area is the area proportion of the second region to the to-be-tested picture; determining the proportional relationship of the first region and the second region based on the first area and the second area.

8. An apparatus for detecting picture quality, characterized by comprising: comprises: an acquisition module configured to acquire a plurality of to-be-tested pictures in response to a user instruction; a feature extraction module configured to extract picture features of each of the to-be-tested pictures respectively to obtain a plurality of picture features; a classification module configured to classify the to-be-tested pictures with similar picture features into a group to obtain at least one to-be-tested picture group; a partitioning module configured to select any one of the to-be-tested pictures in the to-be-tested picture group and determine a first region and a second region in the to-be-tested picture; wherein the first region is a portrait region, and the second region is a background region; a calculation module configured to calculate the proportional relationship of the first region and the second region; a first determination module configured to determine a detection method based on the proportional relationship of the to-be-tested picture; a detection module configured to execute the detection method in the to-be-tested picture group to perform quality detection on each of the to-be-tested pictures in the to-be-tested picture group to obtain a detection result; a second determination module configured to filter a plurality of to-be-tested pictures in the to-be-tested picture group based on the detection result to determine a target picture in the to-be-tested picture group; wherein the selecting a corresponding quality detection method based on the proportional relationship comprises: executing a first detection method in a case where the proportional relationship is greater than a preset threshold, and executing a second detection method in a case where the proportional relationship is less than the preset threshold; wherein the first detection method is to perform quality detection on part of the regions in the to-be-tested picture, and the second detection method is to perform quality detection on the entire region of the to-be-tested picture; the first detection method comprises: extracting relevant features in the first region; wherein the relevant features at least include portrait features and face features of the portrait; and performing quality detection on the relevant features to take the quality detection result of the relevant features as the quality detection result of the to-be-tested picture.

9. An electronic device, comprising: one or more processors; a storage device configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method according to any one of claims 1-7.

10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1-7.

11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image quality detection method and device, storage medium and electronic equipment

    CN110827261A

  • Face detection in digital images

    US20070122034A1