WO2020037932A1 - 一种图像质量评估方法、装置、电子设备及计算机可读存储介质 - Google Patents

一种图像质量评估方法、装置、电子设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2020037932A1
WO2020037932A1 PCT/CN2018/125506 CN2018125506W WO2020037932A1 WO 2020037932 A1 WO2020037932 A1 WO 2020037932A1 CN 2018125506 W CN2018125506 W CN 2018125506W WO 2020037932 A1 WO2020037932 A1 WO 2020037932A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
images
sample image
sample
similarity
Prior art date
Application number
PCT/CN2018/125506
Other languages
English (en)
French (fr)
Inventor
张兆丰
胡文泽
王孝宇
Original Assignee
深圳云天励飞技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳云天励飞技术有限公司 filed Critical 深圳云天励飞技术有限公司
Publication of WO2020037932A1 publication Critical patent/WO2020037932A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Definitions

  • the present application relates to the field of image processing, and in particular, to an image quality evaluation method, device, electronic device, and computer-readable storage medium.
  • the embodiments of the present application provide an image quality evaluation method, device, device, and computer-readable storage medium, which can reduce the complexity of image quality evaluation and improve the accuracy of image quality evaluation.
  • the first aspect of the present application provides an image quality assessment method, including:
  • a first image set and a second image set are obtained, the first image set includes multiple standard images, the second image set includes at least one sample image, and each sample image in the at least one sample image is related to At least one of the plurality of standard images includes the same element;
  • the method further includes:
  • an image with the best quality is selected from the multiple input images.
  • an image quality evaluation device including:
  • An obtaining module configured to obtain a first image set and a second image set, where the first image set includes multiple standard images, the second image set includes at least one sample image, and Each sample image and at least one standard image in the plurality of standard images contain the same element;
  • a determining module configured to determine a similarity between each of the at least one sample image and each of the multiple standard images
  • the determining module is further configured to determine a quality score of each sample image according to the similarity
  • a training module configured to input each sample image and the quality score into a model to be trained to obtain an image quality evaluation model
  • An evaluation module is configured to perform quality evaluation on an input image according to the image quality evaluation model.
  • the determining module is further configured to:
  • the determining module is further configured to:
  • An average value of the similarities between each sample image and a plurality of the target images is calculated as the quality score.
  • the determining module is further configured to:
  • the difference between the first average value and the second average value is calculated as the quality score.
  • the determining module is further configured to:
  • the determining module is further configured to:
  • a first number of images of the first type, a second number of images of the second type, a third number of images of the third type, and a fourth number of images of the fourth type are obtained, and the first type of images are related to each of the images.
  • the similarity of the sample image is greater than a preset threshold and a standard image containing the same elements as each of the sample images
  • the second type of image is the similarity to each of the sample images is greater than the preset A standard image with a threshold value and different elements from each sample image
  • the third type of image is that the similarity with each sample image is not greater than the preset threshold and is similar to each sample image A standard image containing different elements
  • the fourth type of image is a standard image that is not more than the preset threshold with each sample image and contains the same element as each sample image;
  • the quality score is determined based on the first ratio and the second ratio.
  • the evaluation module is further configured to:
  • an image with the best quality is selected from the multiple input images.
  • the evaluation module is further configured to:
  • a third aspect of the present application provides an electronic device, including: a processor, a memory, a communication interface, and a bus;
  • the processor, the memory, and the communication interface are connected through the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, and is used to execute an image quality evaluation method disclosed in the first aspect of the present application.
  • the present application provides a storage medium, wherein the storage medium is used to store an application program, and the application program is used to execute an image quality evaluation method disclosed in the first aspect of the embodiments of the present application at runtime.
  • this application provides an application program, wherein the application program is used to execute an image quality evaluation method disclosed in the first aspect of the embodiment of the application at runtime.
  • a first image set and a second image set are first obtained, the first image set includes multiple standard images, and the second image set includes at least one sample image; and then the at least one The similarity between each sample image in the sample image and each standard image in the multiple standard images; secondly, determining the quality score of each sample image based on the similarity; and then comparing each sample image with The quality score is input to the model to be trained to obtain an image quality evaluation model.
  • performing quality evaluation on the input image according to the image quality evaluation model can reduce the complexity of image quality evaluation and improve the accuracy of image quality evaluation.
  • FIG. 1 is a schematic flowchart of an image quality evaluation method according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an image element according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of image cropping provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another image quality assessment method according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another image quality assessment method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a ROC curve provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of still another image quality evaluation method according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an application of an image quality assessment method according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of target tracking provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an image quality evaluation device according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of an image quality evaluation method according to an embodiment of the present application. As shown in the figure, the method in the embodiment of the present application includes:
  • S101 Acquire a first image set and a second image set.
  • the first image set includes multiple standard images
  • the second image set includes at least one sample image.
  • the images in the first image set (denoted as T) and the second image set (denoted as U) together form a training image, where each image in the training image includes an element, and each image contains an element
  • the image contains a flower.
  • Factors affecting image quality include lighting, motion blur, noise, attitude, and obstruction of debris. Therefore, multiple images need to be collected for an element, where the multiple images include at least one well-lit, no motion blur, no Standard image with noisy, elemental posture, and no occlusion.
  • image 1 includes portrait 1, portrait 2, portrait 3, and portrait 4, where portrait 1 is the target content that needs attention, so the image needs to be Crop to get image 2.
  • the cropped standard images are put into the set T, and the cropped non-standard images are put into the set U.
  • the posture of the elements of the image can also be corrected, for example, the tilted portrait can be tilt-corrected according to the position of the eyebrow.
  • a combination manner of a standard image and a non-standard image includes, but is not limited to, the foregoing scheme.
  • standard images can be put into the set U.
  • the first feature information of each sample image and the second feature information of each standard image may be obtained first, wherein the features of each image may be extracted using a traditional image feature model based on target recognition Information, and the extracted feature information is represented by a feature vector.
  • the feature information may be the features of the elements contained in the image. For example, when the sample image is a face image, the feature information may be the distance between two eyes (such as 3.5 cm), the distance from the nose to the center of the eyebrow, and whether the face is facing directly in front. , And the feature vector (3.5, 5.0, 2.3, 1, 0, 0.5) can be obtained based on the feature information. Then, the similarity is determined according to the first feature information and the second feature information. Wherein, the Euclidean distance or the cosine distance of the first feature vector corresponding to the first feature information and the second feature vector corresponding to the second feature information may be calculated as the similarity between the sample image and the standard image.
  • a target image that contains the same elements as each of the sample images in the multiple standard images may be determined first, where each sample image and each standard image have a unique identification number (Identification, ID) , And the ID numbers of the images containing the same elements have the same characteristics.
  • ID unique identification number
  • the ID of the sample image and the ID of each standard image can be obtained first; then, according to the image ID, multiple target images containing the same element as the sample image are determined; and then each of the sample images and multiple target images are calculated
  • the average value of the similarity is used as the quality score, and if for a sample image, a plurality of standard images includes only one target image of the sample image, the similarity between the sample image and the target image As a quality score, the quality score can represent the quality of the imaging of the sample image.
  • the quality score of the sample image is the average of 0.786 and 0.874 0.83.
  • a correspondence relationship between a sample image and a quality score of the sample image may be established, and each sample image and a corresponding quality score are used as training samples.
  • the training samples are then input into a model to be trained (such as a training model based on deep learning) to obtain an image quality evaluation model.
  • the obtained image quality evaluation model can be used to obtain the quality score of any image.
  • S105 Perform quality evaluation on the input image according to the image quality evaluation model.
  • an input image may be input into an image quality evaluation model to obtain a quality score (for example, 0.85) of the input image.
  • a quality score for example, 0.85
  • a higher quality score indicates that the input image has better imaging quality.
  • an image with the best quality among the multiple input images may be obtained according to the quality scores of the multiple input images. Among them, the image with the highest quality score is the image with the best quality.
  • a first image set and a second image set are first obtained, the first image set includes multiple standard images, and the second image set includes at least one sample image; and then the at least one Similarity between each sample image in each of the sample images and each standard image in the plurality of standard images; secondly, the average value of the similarity between each sample image and multiple standard images containing the same element is used as each of the images A quality score of the sample image; then inputting each of the sample image and the quality score into a model to be trained to obtain an image quality evaluation model; and finally, performing a quality evaluation of the input image according to the image quality evaluation model.
  • the above method only uses the similarity between the sample image and the standard image to determine the quality score of the sample image in the process of constructing the training sample. Compared with existing evaluations that use image clarity, contrast, and light intensity, etc. Dimension to evaluate image quality.
  • the method implemented in this application can not only reduce the complexity of image quality evaluation, but also avoid the steps of determining the weight coefficient of each evaluation dimension through artificial assumptions and empirical judgments, which can effectively improve the image. Accuracy of quality assessment.
  • the average value of the similarity between the sample image and multiple standard images containing the same element is used to determine the quality score of the sample image, which can prevent the interference of accidental factors and ensure the validity and credibility of the training sample. .
  • FIG. 4 is a schematic flowchart of another image quality evaluation method according to an embodiment of the present application. As shown in the figure, the method in the embodiment of the present application includes:
  • S401 Acquire a first image set and a second image set.
  • the first image set includes multiple standard images
  • the second image set includes at least one sample image, and each sample in the at least one sample image.
  • the image contains the same element as at least one of the plurality of standard images. This step is the same as S101 in the previous embodiment. This step is not repeated here.
  • S402. Determine the similarity between each sample image in at least one sample image and each standard image in multiple standard images. This step is the same as S102 in the previous embodiment. This step is not repeated here.
  • S403 Determine a target image in the multiple standard images that contains the same elements as each sample image, and a non-target image that contains different elements in each of the sample images.
  • each standard image and each sample image can be assigned a unique ID, and the ID numbers of the images containing the same elements have the same characteristics.
  • One possible allocation method is to determine the ID of each image according to the elements of the image. For example, for image element A, A can be determined as the ID of the element, and the ID of the standard image corresponding to the element can be determined as A-0, and "0" in A-0 can be used as the serial number of the corresponding image.
  • the ID of the sample image 1 corresponding to this element is determined as A-1, and the ID of the sample image 2 is determined as A-2. Among them, "1" and "2" in A-1 and A-2 can also be used as the corresponding image.
  • Serial number Therefore, the target image and the non-target image can be determined according to the ID number, where the multiple standard images include at least one target image and at least one non-target image.
  • the ID number of the sample image is W-4
  • the ID number of the standard image 1 is S-2
  • the ID number of the standard image 2 is W-2
  • the ID number of the standard image 3 is P-2
  • the number is W-4, because the ID number of the sample image, standard image 2 and standard image 4 contains "W", that is, the sample image with ID number W-4 has the same target element as standard image 2 and standard image 4. Therefore, it is determined that the standard image 2 and the standard image 4 are target images of the sample image with the ID number W-4; and the sample image with the ID number W-4 does not have the same target element as the standard image 1 and the standard image 3, so The standard image 1 and the standard image 3 are non-target images of the sample image with the ID number W-4.
  • S404 Determine the quality score of each sample image according to the similarity between each sample image and multiple target images, and the similarity between each sample image and multiple non-target images.
  • a first average value of the similarity between each sample image and a plurality of the target images may be calculated, and each sample image and the multiple images may be calculated.
  • a second average value of the similarity of the non-target image; and then taking the difference between the first average value and the second average value as the quality score can be calculated by the formula (1).
  • Q represents the quality score
  • S represents the similarity
  • i, j are the IDs of the elements of the image
  • m and k are the sequence numbers of the images
  • u im represents the m-th sample image of element i in the set U
  • t jk represents the set T contains the k-th standard image of element j
  • N represents the total number of images contained in the set T
  • n i represents the total number of images containing the element i in the set T.
  • the set T includes 5 standard images, among which the standard image A-0 and the standard image A-1 are target images corresponding to the sample image A-2, the standard image B-1, the standard image C-0, and the standard image B -0 is a non-target image corresponding to the sample image A-2.
  • the similarity between the sample image A-2 and the standard image A-0 and the standard image A-1 is 0.743 and 0.802, respectively.
  • the similarity between each sample image and the target image may be first determined between each sample image and The ranking order in the similarity of a plurality of the non-target images, wherein the similarity may be arranged in order from large to small; and then the quality score is determined according to the ranking order (denoted as r).
  • the logarithm of r can be taken.
  • the specific formula for determining the quality score according to r is shown in formula (2), and the normalized quality score obtained by formula (2), and according to formula (2), it can be known that the higher the ranking of the sample image, the higher the quality score. Indicates that the image quality of the sample image is better.
  • Q represents the quality score
  • i is the ID of the element of the image
  • m is the sequence number of the image
  • r im represents the ranking order of the m-th sample image containing element i in the set U
  • is the base of the logarithm
  • can be taken as Arbitrary numbers such as 2, 10.
  • the similarity between a sample image and the corresponding target image is 0.864
  • the similarity between the sample image and the corresponding 3 non-target images is 0.231, 0.342, and 0.346
  • the similarity rankings are 0.864, 0.346, 0.342, and 0.231, so that the ranking rankings of 0.864, 0.346, 0.342, and 0.231 are determined to be 1, 2, 3, and 4, respectively, and then the quality score Q of the sample image is calculated according to (2). among them
  • S406 Perform quality evaluation on the input image according to the image quality evaluation model. This step is the same as S105 in the previous embodiment, and this step is not repeated here.
  • a first image set and a second image set are first obtained, the first image set includes multiple standard images, and the second image set includes at least one sample image; and then the at least one The similarity between each sample image in each of the sample images and each standard image in the plurality of standard images; secondly based on the similarity between each sample image and at least one standard image containing the same target element, and at least one The similarity of standard images containing different target elements is used to determine the quality score of each sample image; then each sample image and the quality score are input to a model to be trained to obtain an image quality evaluation model; and finally according to the Image quality evaluation model, which evaluates the quality of the input image.
  • the similarity between the sample image and the standard image containing the same element and the similarity with the standard image containing different elements are used to determine the quality score of the sample image, which can overcome the characteristics of the image element itself. Interference to further ensure the validity and credibility of the training samples.
  • FIG. 5 is a schematic flowchart of another image quality evaluation method according to an embodiment of the present application. As shown in the figure, the method in the embodiment of the present application includes:
  • S501 Acquire a first image set and a second image set.
  • the first image set includes multiple standard images, and the second image set includes at least one sample image.
  • This step is the same as S101 in the previous embodiment. This step is not repeated here.
  • S502. Determine the similarity between each sample image in at least one sample image and each standard image in multiple standard images. This step is the same as S102 in the previous embodiment. This step is not repeated here.
  • S503. Classify the standard images according to the similarity, and determine the number of standard images of each type.
  • whether the standard image and the sample image contain the same element can be determined according to the similarity, and if the similarity between the standard image and the sample image exceeds a preset threshold, it is determined that the standard image and the sample image include the same element. If the similarity between the standard image and the sample image does not exceed a preset threshold, it is determined that the elements included in the standard image are different from the sample image elements. Then, the accuracy of the determination result is determined according to the ID numbers of the sample image and the standard image. For example, the similarity between the sample image A-1 and the standard image B-2 is 0.567, because 0.567 exceeds the preset threshold of 0.5, so the determination standard Image B-2 and sample image A-1 contain the same elements.
  • the element contained in the standard image B-2 is B and the element contained in the sample image A-1 is A, so it is determined that the determination result is incorrect.
  • all standard images can be divided into a first type image, a second type image, a third type image, and a fourth type image according to the accuracy of the determination result.
  • the first type of image is a standard image with a similarity to each sample image that is greater than a preset threshold and contains the same elements as each sample image.
  • the first type of image may be referred to as a true positive image.
  • the second type of image is a standard image with the similarity to each sample image that is greater than the preset threshold and contains different elements from each sample image.
  • the second type of image may be referred to as a false positive image.
  • the third type of image is a standard image that is not more than the preset threshold and has different elements from each sample image.
  • the third type of image may be referred to as a true negative image.
  • the fourth type of image is a standard image with the similarity to each sample image that is not greater than the preset threshold and contains the same elements as each sample image.
  • the fourth type of image can be called a false negative image .
  • a first ratio may be determined first according to the first number and the fourth number, and a second ratio may be determined according to the second number and the third number, where the first ratio is a true positive rate (Denoted as TPR), the second ratio is the false positive rate (denoted as FPR), specifically:
  • the mass fraction is determined based on the first ratio and the second ratio.
  • FPR, TPR can be regarded as a point in a two-dimensional coordinate system in which the true positive rate is the vertical axis and the true positive rate is the horizontal axis.
  • M such as 10000
  • M different preset thresholds can be sequentially taken, so that the coordinates of M different points can be obtained, and the M The points are connected into a curve.
  • This curve is often called the Receiver Operating Characteristic (ROC) curve.
  • ROC Receiver Operating Characteristic
  • the area under the ROC curve (Area Under Curve, AUC) in this coordinate system is calculated as the mass fraction.
  • the area of the shaded part under the ROC curve is the AUC area, and the AUC area can be determined by a calculus method.
  • S505 Input each sample image and quality score into a model to be trained to obtain an image quality evaluation model. This step is the same as S104 in the previous embodiment, and this step is not repeated here.
  • S506. Perform quality evaluation on the input image according to the image quality evaluation model. This step is the same as S105 in the previous embodiment, and this step is not repeated here.
  • a first image set and a second image set are first obtained, the first image set includes multiple standard images, and the second image set includes at least one sample image; and then the at least one Similarity of each sample image in each of the sample images to each of the multiple standard images; secondly, classify the standard images according to the similarity, determine the number of each type of standard image, and according to each type of Draw a ROC curve for the number of images to determine the quality score; then enter each sample image and the quality score into the model to be trained to obtain an image quality evaluation model; and finally, perform quality evaluation on the input image according to the image quality evaluation model .
  • the ROC curve can accurately reflect the correctness of identifying whether different images contain the same elements according to the similarity, thereby reflecting the level of similarity between the standard image and the sample image.
  • the sample image set and the standard image set adopted in this embodiment. In the construction scheme, the higher the similarity between the sample image and the standard image, the better the quality of the sample image. Therefore, in the case of selecting 10,000 different preset thresholds to examine the similarity, the quality score finally obtained can be effectively improved. Accuracy.
  • FIG. 7 is a schematic flowchart of another image quality evaluation method according to an embodiment of the present application. As shown in the figure, the method in the embodiment of the present application includes:
  • step S701. Acquire a first image set and a second image set.
  • the first image set includes multiple standard images, and the second image set includes at least one sample image.
  • This step is the same as step S101 in the previous embodiment, and this step is not repeated here.
  • step S702. Determine a similarity between each of the at least one sample image and each of the multiple standard images. This step is the same as step S102 in the previous embodiment, and this step is not repeated here.
  • S703 Determine a quality score of each sample image according to the similarity.
  • step S704. Input each sample image and the quality score into a model to be trained to obtain an image quality evaluation model. This step is the same as step S104 in the previous embodiment, and this step is not repeated here.
  • S705 Determine a target area of the input image.
  • an element of interest of the user in the input image may be detected first according to the image object detector; then a region of interest (ROI) where the element is located is determined as a target region.
  • ROI region of interest
  • an image in a target area may be intercepted from an input image, and the intercepted image may be input into an image quality evaluation model to obtain a quality score.
  • multiple images containing elements of interest to the user may be obtained according to the target area, and the multiple images may be input into an image quality evaluation model to determine the quality score of each image in order to select the best quality image from them.
  • the above image quality evaluation method can be applied to a video capture scene.
  • the specific implementation steps include: (1) acquiring an image: acquiring a single frame image from a video; (2) detecting a target: detecting the single frame image to determine a target element of interest to the user (such as a video) (A person appears in), and determine the ROI area where the target element is located in the single frame image; (3) tracking target: tracking the ROI area during the video playback process, capturing multiple images containing the target element; ( 4) Quality optimization: The multiple images are input into an image quality evaluation model, a quality score of each image is obtained, and an image with the highest quality score is selected therefrom. (5) Input target: output the image with the highest quality score, and the image with the highest quality score is used to identify and analyze the target element.
  • an operation to determine a target area and then perform a quality evaluation on the target area is performed on the image to be evaluated.
  • This method is used in an application scenario for identifying an object in an image. It can effectively exclude the influence of the imaging quality of the non-target area in the image on the evaluation result of the imaging quality of the target area, so that the most suitable image for target recognition can be accurately selected from multiple images containing the target, instead of An image with the best overall image quality but poor imaging quality in the area where the target is located, thereby improving the accuracy of target recognition.
  • FIG. 10 is a schematic structural diagram of an image quality evaluation device according to an embodiment of the present application.
  • the device in the embodiment of the present application includes:
  • the obtaining module 1001 is configured to obtain a first image set and a second image set, where the first image set includes multiple standard images, and the second image set includes at least one sample image.
  • the images in the first image set (denoted as T) and the second image set (denoted as U) together form a training image, where each image in the training image includes an element, and each image contains an element
  • the target content to be displayed or highlighted in the image As shown in Figure 2, the image contains a flower.
  • Factors affecting image quality include lighting, motion blur, noise, attitude, and obstruction of debris. Therefore, multiple images need to be collected for an element, where the multiple images include at least one well-lit, no motion blur, no Standard image with noisy, elemental posture, and no occlusion.
  • Each of the other non-standard images in the multiple images is affected by one or more factors, and then an image detector is used to detect the position of the element in each of the multiple images, and according to the elements Where it is, crop each image. Then the cropped standard images are put into the set T, and the cropped other images are put into the set U. Among them, before cropping the image, the posture of the elements of the image can also be tilt-corrected.
  • a combination manner of a standard image and a non-standard image includes, but is not limited to, the foregoing scheme.
  • a standard image can be put into the set U
  • a motion-blurred image can be put into the set T.
  • a determining module 1002 is configured to determine a similarity between each of the at least one sample image and each of the multiple standard images.
  • the first feature information of each sample image and the second feature information of each standard image may be obtained first, wherein the features of each image may be extracted using a traditional image feature model based on target recognition Information, and the extracted feature information is represented by a feature vector.
  • the feature information can be the features of the elements contained in the image.
  • the feature information can be the distance between the eyes of the face (such as 3.5 cm), the distance from the tip of the nose to the center of the eyebrow, and whether the face is oriented And so on, and obtain the feature vector (3.5, 5.0, 2.3, 1, 0, 0.5) based on the feature information.
  • the similarity is determined according to the first feature information and the second feature information.
  • the Euclidean distance or the cosine distance of the first feature vector corresponding to the first feature information and the second feature vector corresponding to the second feature information may be calculated as the similarity between the sample image and the standard image.
  • the determining module 1002 is further configured to determine a quality score of each sample image according to the similarity.
  • a target image that contains the same element as each of the sample images in the multiple standard images may be determined first, and an ID of the sample image and an ID of each standard image may be obtained first. Then, according to the image ID, a plurality of target images containing the same element as the sample image are determined; and then an average value of the similarity between each sample image and the plurality of target images is calculated as the quality score, where: If for a sample image, multiple standard images include only one target image of the sample image, the similarity between the sample image and the target image is used as the quality score, and the quality score can represent the imaging quality of the sample image. Good or bad.
  • a target image that contains the same elements as each of the sample images and a non-target image that contains different elements from each of the sample images may be determined first.
  • a first average value of the similarity between each sample image and multiple target images may be calculated, and all A second average value of the similarity between each sample image and a plurality of the non-target images; and then taking a difference between the first average value and the second average value as the quality score.
  • the quality score of the sample image can be calculated by the formula (1).
  • a target image including the same element as each of the sample images and a non-target image including different elements from each of the sample images may be determined first, where the number of target images is Is one, and the number of non-target images is multiple; then it is determined that the similarity between each sample image and the target image is the similarity between each sample image and multiple non-target images
  • the standard image contains the same element as the sample image according to the similarity, and if the similarity between the standard image and the sample image exceeds a preset threshold, it is determined that the standard image and the sample image contain the same element. If the similarity between the standard image and the sample image does not exceed a preset threshold, it is determined that the elements included in the standard image are different from the sample image elements. Then, the accuracy of the determination result is determined according to the ID numbers of the sample image and the standard image. For example, the similarity between the sample image A-1 and the standard image B-2 is 0.567, because 0.567 exceeds the preset threshold of 0.5, so the determination standard Image B-2 and sample image A-1 contain the same elements.
  • the standard image is divided into a first type image, a second type image, a third type image, and a fourth type image.
  • the first type of image is a standard image with a similarity to each sample image that is greater than a preset threshold and contains the same elements as each sample image.
  • the first type of image may be referred to as a true positive image.
  • the second type of image is a standard image with the similarity to each sample image that is greater than the preset threshold and contains different elements from each sample image.
  • the second type of image may be referred to as a false positive image.
  • the third type of image is a standard image that is not more than the preset threshold and has different elements from each sample image.
  • the third type of image may be referred to as a true negative image.
  • the fourth type of image is a standard image with the similarity to each sample image that is not greater than the preset threshold and contains the same elements as each sample image.
  • the fourth type of image can be called a false negative image .
  • the first number of images of the first type (denoted as TP), the second number of images of the second type (denoted as FP), the third number of images of the third kind (denoted as TN), and the fourth A fourth number of class images (denoted as FN); then determining a first ratio based on the first number and the fourth number, and determining a second ratio based on the second number and the third number, wherein,
  • the first ratio is the true positive rate (denoted as TPR), and the second ratio is the false positive rate (denoted as FPR).
  • the mass fraction is determined based on the first ratio and the second ratio.
  • FPR, TPR can be regarded as a point in a two-dimensional coordinate system in which the true positive rate is the vertical axis and the true positive rate is the horizontal axis.
  • M such as 10000
  • M different preset thresholds can be sequentially taken, so that the coordinates of M different points can be obtained, and the M The points are connected into a curve.
  • This curve is often referred to as the ROC curve.
  • the AUC area of the ROC curve in this coordinate system is calculated as the mass fraction. For example, as shown in FIG. 4, the area of the shaded part under the ROC curve is the AUC area, and the AUC area can be determined by a calculus method.
  • a training module 1003 is configured to input each sample image and the quality score into a model to be trained to obtain an image quality evaluation model.
  • a correspondence relationship between a sample image and a quality score of the sample image may be established, and each sample image and a corresponding quality score are used as training samples.
  • the training samples are then input into a model to be trained (such as a training model based on deep learning) to obtain an image quality evaluation model.
  • the obtained image quality evaluation model can be used to obtain the quality score of any image.
  • An evaluation module 1104 is configured to perform quality evaluation on an input image according to the image quality evaluation model.
  • an input image may be input into an image quality evaluation model to obtain a quality score (for example, 0.85) of the input image.
  • a quality score for example, 0.85
  • a higher quality score indicates that the input image has better imaging quality.
  • the evaluation module 1004 is further configured to obtain an image with the best quality among the multiple input images according to the quality scores of the multiple input images. Among them, the image with the highest quality score is the image with the best quality.
  • the evaluation module 1004 is further configured to first detect an element of interest of the user in the input image according to the image object detector; then determine the ROI region in which the element is located as the target region; and then intercept the target from the input image The images in the region are input to the image quality evaluation model to obtain the quality score of the target region.
  • the evaluation module 1004 is further configured to obtain multiple images containing elements of interest to the user according to the target area, and input the multiple images into an image quality evaluation model to determine the quality score of each image in order to select the quality therefrom Optimal image.
  • a first image set and a second image set are first obtained, the first image set includes multiple standard images, and the second image set includes at least one sample image; and then the at least one Similarity between each sample image in each of the sample images and each standard image in the plurality of standard images; secondly, determining the quality score of each sample image based on the similarity; and then comparing each sample image Input the model to be trained with the quality score to obtain an image quality evaluation model; finally, perform quality evaluation on the input image according to the image quality evaluation model.
  • the complexity of image quality evaluation can be reduced and the accuracy of image quality evaluation can be improved.
  • FIG. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device may include: at least one processor 1101, such as a CPU, at least one communication interface 1102, at least one memory 1103, and at least one bus 1104.
  • the bus 1104 is used to implement connection and communication between these components.
  • the communication interface 1102 of the electronic device in the embodiment of the present application is a wired transmission port, and may also be a wireless device, for example, including an antenna device, and is used to perform signaling or data communication with other node devices.
  • the memory 1103 may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the memory 1103 may optionally be at least one storage device located far from the foregoing processor 1101.
  • a set of program code is stored in the memory 1103, and the processor 1101 is used to call the program code stored in the memory, and is used to perform the following operations:
  • first image set includes multiple standard images
  • second image set includes at least one sample image
  • the processor 1101 is further configured to perform the following operation steps:
  • the processor 1101 is further configured to perform the following operation steps:
  • An average value of the similarities between each sample image and a plurality of the target images is calculated as the quality score.
  • the processor 1101 is further configured to perform the following operation steps:
  • the difference between the first average value and the second average value is calculated as the quality score.
  • the processor 1101 is further configured to perform the following operation steps:
  • the processor 1101 is further configured to perform the following operation steps:
  • a first number of images of the first type, a second number of images of the second type, a third number of images of the third type, and a fourth number of images of the fourth type are obtained, and the first type of images are related to each of the images.
  • the similarity of the sample image is greater than a preset threshold and a standard image containing the same elements as each of the sample images
  • the second type of image is the similarity to each of the sample images is greater than the preset A standard image with a threshold value and different elements from each sample image
  • the third type of image is that the similarity with each sample image is not greater than the preset threshold and is similar to each sample image A standard image containing different elements
  • the fourth type of image is a standard image that is not more than the preset threshold with each sample image and contains the same element as each sample image;
  • the quality score is determined based on the first ratio and the second ratio.
  • the processor 1101 is further configured to perform the following operation steps:
  • an image with the best quality is selected from the multiple input images.
  • the processor 1101 is further configured to perform the following operation steps:
  • the embodiments of the present application also provide a storage medium for storing an application program.
  • the application program is used to execute the operations shown in FIG. 1, FIG. 4, FIG. 5, and FIG. 7 when running. An operation performed by an electronic device in an image quality evaluation method.
  • embodiments of the present application also provide an application program, which is used to execute the electronic device in the image quality evaluation method shown in FIG. 1, FIG. 4, FIG. 5, and FIG. 7 at runtime. What to do.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server, or data center Transmission by wire (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, and the like that includes one or more available medium integration.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (Solid State Disk (SSD)), and the like.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a DVD
  • a semiconductor medium for example, a solid state disk (Solid State Disk (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

本申请公开了一种图像质量评估方法、装置、电子设备及计算机可读存储介质,包括:首先获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;接着确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;其次根据所述相似度,确定所述每张样本图像的质量分数;然后将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;最后根据所述图像质量评估模型,对输入图像进行质量评估。采用本申请实施例,可以降低图像质量评估的复杂度、提高图像质量评估的精确度。

Description

一种图像质量评估方法、装置、电子设备及计算机可读存储介质
本申请要求于2018年8月20日提交中国专利局,申请号为201810945522.7、发明名称为“一种图像质量评估方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理领域,尤其涉及一种图像质量评估方法、装置、电子设备及计算机可读存储介质。
背景技术
在对视频中的目标进行识别时,针对同一目标可以捕获到多张图片。为了减少计算量,需要从多张图像中选择一张质量最好的图像进行识别,因此需对多张图像进行质量评估。目前,在常用的图像质量评估方法中首先对多个评估维度分别进行评估,然后将每个评估维度的评估结果进行加权求和作为图像的质量评估结果。其中,多个评估维度包括光照度、模糊度、噪声和对比度等等。然而对有些评估维度的衡量存在困难,比如模糊度,并且如何选择各维度的权重尚缺乏灵活可信的指导原则。因此,常规的图像质量评估方法的实现在一定程度上需依靠人为假设和经验判断,导致图像质量评估复杂度高、评估结果的精确度低。
发明内容
本申请实施例提供一种图像质量评估方法、装置、设备及计算机可读存储介质,可以降低图像质量评估的复杂度、提高图像质量评估的精确性。
本申请第一方面提供了一种图像质量评估方法,包括:
获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像,所述至少一张样本图像中的每张样本图像与所述多张标准图像中的至少一张标准图像包含相同元素;
确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;
根据所述相似度,确定所述每张样本图像的质量分数;
将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;
根据所述图像质量评估模型,对输入图像进行质量评估。
其中,所述根据所述图像质量评估模型,对输入图像进行质量评估之后,还包括:
根据多张所述输入图像的质量评估结果,从多张所述输入图像中选择质量最优的图像。
相应地,本申请第二方面提供了一种图像质量评估装置,包括:
获取模块,用于获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像,所述至少一张样本图像中的每张样本图像与所述多张标准图像中的至少一张标准图像包含相同元素;
确定模块,用于确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;
所述确定模块,还用于根据所述相似度,确定所述每张样本图像的质量分数;
训练模块,用于将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;
评估模块,用于根据所述图像质量评估模型,对输入图像进行质量评估。
其中,所述确定模块还用于:
获取所述每张样本图像的第一特征信息、以及所述每张标准图像的第二特征信息;
根据所述第一特征信息和所述第二特征信息,确定所述相似度。
其中,所述确定模块还用于:
确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像;
计算所述每张样本图像与多张所述目标图像的所述相似度的平均值作为所述质量分数。
其中,所述确定模块还用于:
确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像;
计算所述每张样本图像与多张所述目标图像的所述相似度的第一平均值、以及所述每张样本图像与多张所述非目标图像的所述相似度的第二平均值;
计算所述第一平均值与所述第二平均值的差作为所述质量分数。
其中,所述确定模块还用于:
确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像;
确定所述每张样本图像与所述目标图像的所述相似度在所述每张样本图像与多张所述非目标图像的所述相似度中的排序名次;
根据所述排序名次,确定所述质量分数。
其中,所述确定模块还用于:
获取第一类图像的第一数量、第二类图像的第二数量、第三类图像的第三数量、以及第四类图像的第四数量,所述第一类图像为与所述每张样本图像的所述相似度大于预设阈值且 与所述每张样本图像包含相同元素的标准图像、所述第二类图像为与所述每张样本图像的所述相似度大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像、所述第三类图像为与所述每张样本图像的所述相似度不大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像、以及所述第四类图像为与所述每张样本图像的所述相似度不大于所述预设阈值、且与所述每张样本图像包含相同元素的标准图像;
根据所述第一数量和所述第四数量确定第一比率、以及根据所述第二数量和所述第三数量确定第二比率;
根据所述第一比率和所述第二比率,确定所述质量分数。
其中,所述评估模块还用于:
根据多张所述输入图像的质量评估结果,从多张所述输入图像中选择质量最优的图像。
其中,所述评估模块还用于:
确定所述输入图像的目标区域;
根据所述图像质量评估模型,确定所述目标区域的所述质量分数。
本申请第三方面提供了一种电子设备,包括:处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行本申请第一方面公开的一种图像质量评估方法。
相应地,本申请提供了一种存储介质,其中,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请实施例第一方面公开的一种图像质量评估方法。
相应地,本申请提供了一种应用程序,其中,所述应用程序用于在运行时执行本申请实施例第一方面公开的一种图像质量评估方法。
实施本申请实施例,首先获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;接着确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;其次根据所述相似度,确定所述每张样本图像的质量分数;然后将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;最后根据所述图像质量评估模型,对输入图像进行质量评估,可以降低图像质量评估的复杂度、提高图像质量评估的精确度。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技 术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种图像质量评估方法的流程示意图;
图2是本申请实施例提供的一种图像元素的示意图;
图3是本申请实施例提供的一种图像裁剪的示意图;
图4是本申请实施例提供的另一种图像质量评估方法的流程示意图;
图5是本申请实施例提供的又一种图像质量评估方法的流程示意图;
图6是本申请实施例提供的一种ROC曲线的示意图;
图7是本申请实施例提供的再一种图像质量评估方法的流程示意图;
图8是本申请实施例提供的一种图像质量评估方法的应用的示意图;
图9是本申请实施例提供的一种目标跟踪的示意图;
图10是本申请实施例提供的一种图像质量评估装置的结构示意图;
图11是本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参考图1,图1是本申请实施例提供的一种图像质量评估方法的流程示意图。如图所示,本申请实施例中的方法包括:
S101,获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像。
具体实现中,第一图像集合(记为T)和第二图像集合(记为U)中的图像共同构成训练图像,其中,训练图像中的每张图像包括一个元素,每张图像包含的元素为该图像中用户所要关注的目标内容。如图2所示,该图像包含的元素为一朵花。影响图像质量的因素包括光照、运动模糊、噪声、姿态以及杂物遮挡等,因此,针对某一元素需要收集多张图像,其中,该多张图像包括至少一张光照良好、无运动模糊、无噪声、元素姿态端正、无遮挡的标准图像。该多张图像中的其他非标准图像中的每张图像受到一种或多种因素的影响,然后利用图像检测器检测出将该多张图像中每张图像中的元素的位置,并根据元素所在的位置对每张图像进行裁剪,例如,如图3所示,图像1中包括人像1、人像2、人像3和人像4,其中人像1为需要关注的目标内容,因此需对该图像进行裁剪得到图像2。然后将裁剪后的标准图像放入集合T中,以及将裁剪后的非标准图像放入集合U中。其中,在对图像进行裁剪之 前,还可以图像的元素的姿态进行矫正,例如,根据眉心的位置,将倾斜的人像进行倾斜矫正。
需要说明的是,在集合T和集合U中,标准图像和非标准图像的组合方式包括但不限于上述方案。例如,可以将标准图像放入集合U。
S102,确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度。
具体实现中,可以首先获取所述每张样本图像的第一特征信息、以及所述每张标准图像的第二特征信息,其中,可以利用基于目标识别的传统图像特征模型提取每张图像的特征信息,并将提取到的特征信息用特征向量表示。该特征信息可以是图像所包含的元素的特征,比如当样本图像为人脸图像时,特征信息可以两眼之间的距离(如3.5厘米)、鼻尖到眉心的距离、脸部是否面向正前方等,并可以根据特征信息得到特征向量(3.5,5.0,2.3,1,0,0.5)。然后根据所述第一特征信息和所述第二特征信息,确定所述相似度。其中,可以但不限于计算第一特征信息对应的第一特征向量和第二特征信息对应的第二特征向量的欧式距离或余弦距离作为样本图像和标准图像的相似度。
例如:样本图像的特征向量为a=(3.5,5.0,2.3,1,0,0.5),标准图像的特征向量为b=(3.0,4.5,4,0,1,1.1),则可以将a和b的余弦距离cos(a,b)作为该样本图像和该标准图像的相似度。其中
Figure PCTCN2018125506-appb-000001
S103,根据所述相似度,确定所述每张样本图像的质量分数。
具体实现中,可以首先确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像,其中,每张样本图像和每张标准图像均具有唯一身份标识号(Identification,ID),并且包含相同元素的图像的ID号具有相同的特征。因此可以首先获取样本图像的ID和每张标准图像的ID;接着根据图像ID,确定与该样本图像包含相同元素的多张目标图像;然后计算所述每张样本图像与多张所述目标图像的所述相似度的平均值作为所述质量分数,其中,若针对某张样本图像,多张标准图像中仅包括一张该样本图像的目标图像,则该样本图像与该目标图像的相似度作为质量分数,该质量分数可以表示该样本图像的成像质量的好坏。
例如,样本图像与标准图像1和标准图像2包含相同元素,并且样本图像与标准图像1和标准图像2的相似度分别为0.786和0.874,则该样本图像的质量分数为0.786和0.874的 平均值0.83。
S104,将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型。
具体实现中,可以建立样本图像和该样本图像的质量分数的对应关系,并将每张样本图像和对应的质量分数作为训练样本。然后将训练样本输入待训练模型(如基于深度学习的训练模型)得到图像质量评估模型。其中,可以利用所得到的训练好的图像质量评估模型获取任意图像的质量分数。
S105,根据所述图像质量评估模型,对输入图像进行质量评估。
具体实现中,可以将输入图像输入到图像质量评估模型中,得到该输入图像的质量分数(如0.85),质量分数越高表示该输入图像的成像质量越好。
可选的,可以根据多张输入图像的质量分数,得到多张输入图像中质量最优的图像。其中,质量分数最高的图像为质量最优的图像。
在本申请实施例中,首先获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;接着确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;其次将每张样本图像与多张包含相同元素的标准图像的相似度的平均值作为所述每张样本图像的质量分数;然后将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;最后根据所述图像质量评估模型,对输入图像进行质量评估。上述方法在构造训练样本的过程中仅利用了样本图像和标准图像之间的相似度来确定样本图像的质量分数,相比于已有的利用图像的清晰度、对比度和光照强度等多个评估维度来评估图像质量的技术,本申请实施中的方法不仅可以降低图像质量评估的复杂度,而且避免了的通过人为假设和经验判断来确定各个评估维度的权重系数的步骤,从而可以有效提高图像质量评估的精确度。此外,本申请实施中结合了样本图像与多张包含相同元素的标准图像的相似度的平均值来确定样本图像的质量分数,可以防止偶然因素的干扰,保障训练样本的有效性和可信度。
请参考图4,图4是本申请实施例提供的另一种图像质量评估方法的流程示意图。如图所示,本申请实施例中的方法包括:
S401,获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像,所述至少一张样本图像中的每张样本图像与所述多张标准图像中的至少一张标准图像包含相同元素。本步骤与上一实施例中的S101相同本步骤不再赘述。
S402,确定至少一张样本图像中每张样本图像与多张标准图像中每张标准图像的相似度。 本步骤与上一实施例中的S102相同本步骤不再赘述。
S403,确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像。
具体实现中,在获取集合T和集合U时,可以为每张标准图像和每张样本图像分配唯一的ID,并且包含相同元素的图像的ID号具有相同的特征。其中,一种可能的分配方式是根据图像的元素确定每张图像的ID。例如,针对图像元素A,可以将A确定为该元素的ID,进一步可以将该元素对应的标准图像的ID确定为A-0,A-0中的“0”可以作为对应图像的序号,将该元素对应的样本图像1的ID确定为A-1、样本图像2的ID确定为A-2,其中,A-1和A-2中的“1”和“2”也可以作为对应图像的序号。因此,可以根据ID号,确定目标图像和非目标图像,其中,多张标准图像中包括至少一张目标图像和至少一张非目标图像。
例如:样本图像的ID号为W-4,标准图像1的ID号为S-2、标准图像2的ID号为W-2、标准图像3的ID号为P-2以及标准图像4的ID号为W-4,因为样本图像、标准图像2和标准图像4的ID号中均包含“W”,即ID号为W-4的样本图像与标准图像2和标准图像4具有相同的目标元素,从而确定标准图像2和标准图像4是ID号为W-4的样本图像的目标图像;而ID号为W-4的样本图像与标准图像1和标准图像3不具有相同的目标元素,因此,标准图像1和标准图像3是ID号为W-4的样本图像的非目标图像。
S404,根据每张样本图像与多张目标图像的相似度、以及每张样本图像与多张非目标图像的相似度,确定每张样本图像的质量分数。
具体实现中,为了克服元素本身的特性导致的干扰,可以计算所述每张样本图像与多张所述目标图像的所述相似度的第一平均值、以及所述每张样本图像与多张所述非目标图像的所述相似度的第二平均值;然后将所述第一平均值与所述第二平均值的差作为所述质量分数。其中,可以通过(1)式计算样本图像的质量分数。
Figure PCTCN2018125506-appb-000002
其中,Q表示质量分数,S表示相似度,i、j为图像的元素的ID、m和k为图像的序号,u i-m表示集合U中包含元素i的第m张样本图像,t j-k表示集合T中包含元素j的第k张标准图像,N表示集合T中包含的图像的总数,n i表示集合T中包含元素i的图像总数。
例如:集合T中包括5张标准图像,其中,标准图像A-0和标准图像A-1为样本图像A-2对应的目标图像,标准图像B-1、标准图像C-0和标准图像B-0为该样本图像A-2对应的非目标图像。若样本图像A-2与标准图像A-0和标准图像A-1的相似度分别为0.743和0.802。样本图像A-2与标准图像B-1、标准图像C-0和标准图像B-0的相似度分别为0.246、0.414 和0.309,则可以得到该样本图像的质量分数(0.743+0.802)/2-(0.246+0.414+0.309)/3=0.4495
可选的,当只有一张目标图像,而非目标图像的数量为多张时,还可以首先确定所述每张样本图像与所述目标图像的所述相似度在所述每张样本图像与多张所述非目标图像的所述相似度中的排序名次,其中,可以将相似度按从大到小的顺序进行排列;然后根据所述排序名次(记为r),确定所述质量分数,其中,为了使r的区分度更合理,以便于后续的模型训练,可以对r取对数。其中,根据r确定质量分数的具体公式如(2)式所示,(2)式得到的为归一化的质量分数,并且根据(2)式可知,样本图像的排名越高质量分数越高,表示该样本图像的成像质量越好。
Figure PCTCN2018125506-appb-000003
其中,Q表示质量分数,i为图像的元素的ID、m为图像的序号、r i-m表示集合U中包含元素i的第m张样本图像的排序名次、α为对数的底数,α可以取2、10等任意数。
例如:某张样本图像与对应的目标图像的相似度为0.864,该样本图像与对应的3张非目标图像的相似度分别为0.231、0.342和0.346,然后按照从大到小的顺序将这4个相似度排序为0.864、0.346、0.342、0.231,从而确定0.864、0.346、0.342、0.231的排序名次分别为1、2、3、4,然后根据(2)式计算该样本图像的质量分数Q。其中
Figure PCTCN2018125506-appb-000004
S405,将每张样本图像和质量分数输入待训练模型得到图像质量评估模型。本步骤与上一实施例中的S104相同,本步骤不再赘述。
S406,根据图像质量评估模型,对输入图像进行质量评估。本步骤与上一实施例中的S105相同,本步骤不再赘述。
在本申请实施例中,首先获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;接着确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;其次根据每张样本图像与至少一张包含相同目标元素的标准图像的相似度、以及与至少一张包含不相同目标元素的标准图像的相似度,确定所述每张样本图像的质量分数;然后将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;最后根据所述图像质量评估模型,对输入图像进行质量评估。不仅可以降低图像质量评估的复杂度,而且可以有效提高图像质量评估的精确度。此外,本申请实施中结合了样本图像与包含相同元素的标准图像的相似度、以及与包含不相同元素的标准图像的相似度共同确定该样本图像的质量分数,可以克服图像元素本身的特性 导致的干扰,进一步保障训练样本的有效性和可信度。
请参考图5,图5是本申请实施例提供的又一种图像质量评估方法的流程示意图。如图所示,本申请实施例中的方法包括:
S501,获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像。本步骤与上一实施例中的S101相同本步骤不再赘述。
S502,确定至少一张样本图像中每张样本图像与多张标准图像中每张标准图像的相似度。本步骤与上一实施例中的S102相同本步骤不再赘述。
S503,根据相似度将标准图像进行分类,并确定每种类型的标准图像的数量。
具体实现中,可以根据相似度来判断标准图像是否与样本图像包含相同元素,其中,若标准图像与样本图像的相似度超过预设阈值,则判定标准图像与样本图像包含相同元素。若标准图像与样本图像的相似度不超过预设阈值,则判定标准图像包含的元素与样本图像元素不同。然后再根据样本图像和标准图像的ID号确定该判定结果的准确性,例如,样本图像A-1与标准图像B-2的相似度为0.567,因为0.567超过了预设阈值0.5,所以判定标准图像B-2与样本图像A-1包含相同元素。然而,根据ID号可知在实际中标准图像B-2包含的元素为B、样本图像A-1包含的元素为A,从而确定该判定结果有误。其中,可以根据判定结果的准确性将所有的标准图像分成第一类图像、第二类图像、第三类图像和第四类图像。其中,第一类图像为与所述每张样本图像的所述相似度大于预设阈值且与所述每张样本图像包含相同元素的标准图像,第一类图像可称为真阳性图像。第二类图像为与所述每张样本图像的所述相似度大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像,第二类图像可称为假阳性图像。第三类图像为与所述每张样本图像的所述相似度不大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像,第三类图像可称为真阴性图像。第四类图像为与所述每张样本图像的所述相似度不大于所述预设阈值、且与所述每张样本图像包含相同元素的标准图像,第四类图像可称为假阴性图像。
然后,统计每种类型的图像的数量,其中,可以将第一类图像的第一数量记为TP、第二类图像的第二数量记为FP、第三类图像的第三数量记为TN、以及第四类图像的第四数量记为FN。
S504,根据每种类型的标准图像的数量,确定每张样本图像的质量分数。
具体实现中,可以首先根据所述第一数量和所述第四数量确定第一比率、以及根据所述第二数量和所述第三数量确定第二比率,其中,第一比率为真阳性率(记为TPR),第二比率为假阳性率(记为FPR),具体地:
Figure PCTCN2018125506-appb-000005
Figure PCTCN2018125506-appb-000006
然后,根据所述第一比率和所述第二比率,确定所述质量分数。其中,可以将(FPR,TPR)看作以真阳性率为纵轴、以真阳性率为横轴的二维坐标系中的一个点。根据上述分类方法,当所选取的预设阈值不同时TPR和FPR也不同,因此可以依次取M(如10000)个不同的预设阈值,从而可以得到M个不同的点的坐标,将这M个点连接成一条曲线。该曲线通常被称为接收者操作特征(Receiver Operating Characteristic,ROC)曲线。最后计算在该坐标系中ROC曲线下(Area Under Curve,AUC)的面积作为质量分数。例如:如图6所示,ROC曲线下阴影部分的面积为AUC面积,其中,可以通过微积分的方法确定该AUC面积。
S505,将每张样本图像和质量分数输入待训练模型得到图像质量评估模型。本步骤与上一实施例中的S104相同,本步骤不再赘述。
S506,根据图像质量评估模型,对输入图像进行质量评估。本步骤与上一实施例中的S105相同,本步骤不再赘述。
在本申请实施例中,首先获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;接着确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;其次根据相似度将标准图像进行分类,确定每种类型的标准图像的数量,并根据每种类型的图像的数量绘制ROC曲线,从而确定质量分数;然后将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;最后根据所述图像质量评估模型,对输入图像进行质量评估。其中,ROC曲线可以准确地反映根据相似度识别不同图像是否包含相同元素的正确性,从而反映标准图像与样本图像的相似度的高低,其中,在本实施例采取的样本图像集合和标准图像集合的构造方案中,当样本图像与标准图像的相似度越高表示样本图像的质量越好,因此在选用10000个不同的预设阈值对相似度进行考察的情况下可以有效提高最终获得的质量分数的准确性。
请参考图7,图7是本申请实施例提供的再一种图像质量评估方法的流程示意图。如图所示,本申请实施例中的方法包括:
S701,获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像。本步骤与上一实施例中的步骤S101相同,本步骤不再赘述。
S702,确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像 的相似度。本步骤与上一实施例中的步骤S102相同,本步骤不再赘述。
S703,根据所述相似度,确定所述每张样本图像的质量分数。
S704,将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型。本步骤与上一实施例中的步骤S104相同,本步骤不再赘述。
S705,确定输入图像的目标区域。
具体实现中,可以首先根据图像对象检测器检测出该输入图像中的用户感兴趣的元素;然后将该元素所在的感兴趣区域(Region Of Interest,ROI)确定为目标区域。
S706,根据所述图像质量评估模型,确定所述目标区域的质量分数。
具体实现中,可以从输入图像中截取目标区域中的图像,并将截取的图像输入图像质量评估模型,以便得到质量分数。
可选的,可以根据目标区域获取多张包含用户感兴趣的元素的图像,并将多张图像输入图像质量评估模型中,确定每张图像的质量分数,以便从中选择质量最优的图像。
上述图像质量评估方法可以应用于视频抓拍场景。如图8和图9所示,具体实施步骤包括:(1)获取图像:从视频中获取单帧图像;(2)检测目标:检测该单帧图像,确定用户感兴趣的目标元素(如视频中出现的某个人),并确定在该单帧图像中目标元素所在的ROI区域;(3)跟踪目标:在该视频播放过程中跟踪该ROI区域,捕获包含该目标元素的多张图像;(4)质量优选:将该多张图像输入图像质量评估模型,获取每张图像的质量分数,并从中选择质量分数最高的图像。(5)输入目标:输出质量分数最高的图像,该质量分数最高的图像用于对目标元素进行识别和分析。
在本申请实施例中,在得到图像的质量评估模型之后,对待评估图像采取先确定目标区域再对目标区域进行质量评估的操作,这种方式在对图像中的目标进行识别的应用场景中,可以有效排除图像中的非目标所在区域的成像质量对目标所在区域的成像质量的评估结果的影响,从而可以准确地从多张包含目标的图像中选取出最适合进行目标识别的图像,而非整体图像质量最好但目标所在区域的成像质量差的图像,从而提高目标识别的准确性。
请参考图10,图10是本申请实施例提供的一种图像质量评估装置的结构示意图。如图所示,本申请实施例中的装置包括:
获取模块1001,用于获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像。
具体实现中,第一图像集合(记为T)和第二图像集合(记为U)中的图像共同构成训练图像,其中,训练图像中的每张图像包括一个元素,每张图像包含的元素为该图像中所要展示或突出的目标内容。如图2所示,该图像包含的元素为一朵花。影响图像质量的因素包 括光照、运动模糊、噪声、姿态以及杂物遮挡等,因此,针对某一元素需要收集多张图像,其中,该多张图像包括至少一张光照良好、无运动模糊、无噪声、元素姿态端正、无遮挡的标准图像。该多张图像中的其他非标准图像中的每张图像受到一种或多种因素的影响,然后利用图像检测器检测出将该多张图像中每张图像中该元素的位置,并根据元素所在的位置对每张图像进行裁剪。然后将裁剪后的标准图像放入集合T中,以及将裁剪后的其他图像放入集合U中。其中,在对图像进行裁剪之前,还可以图像的元素的姿态进行倾斜矫正。
需要说明的是,在集合T和集合U中,标准图像和非标准图像的组合方式包括但不限于上述方案。例如,可以将标准图像放入集合U,将运动模糊的图像放入集合T。
确定模块1002,用于确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度。
具体实现中,可以首先获取所述每张样本图像的第一特征信息、以及所述每张标准图像的第二特征信息,其中,可以利用基于目标识别的传统图像特征模型提取每张图像的特征信息,并将提取到的特征信息用特征向量表示。该特征信息可以是图像所包含的元素的特征,比如当样本图像为人脸图像时,特征信息可以人脸两眼之间的距离(如3.5厘米)、鼻尖到眉心的距离、脸部是否面向正前方等,并根据特征信息得到特征向量(3.5,5.0,2.3,1,0,0.5)。然后根据所述第一特征信息和所述第二特征信息,确定所述相似度。其中,可以但不限于计算第一特征信息对应的第一特征向量和第二特征信息对应的第二特征向量的欧式距离或余弦距离作为样本图像和标准图像的相似度。
确定模块1002,还用于根据所述相似度,确定所述每张样本图像的质量分数。
具体实现中,可以首先确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像,其中,可以首先获取样本图像的ID和每张标准图像的ID。接着根据图像ID,确定与该样本图像包含相同元素的多张目标图像;然后计算所述每张样本图像与多张所述目标图像的所述相似度的平均值作为所述质量分数,其中,若针对某张样本图像,多张标准图像中仅包括一张该样本图像的目标图像,则该样本图像与该目标图像的相似度作为质量分数,该质量分数可以表示该样本图像的成像质量的好坏。
可选的,可以首先确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像,其中多张标准图像中包括多张目标图像和多张非目标图像;为了克服元素本身的特性导致的干扰,可以计算所述每张样本图像与多张所述目标图像的所述相似度的第一平均值、以及所述每张样本图像与多张所述非目标图像的所述相似度的第二平均值;然后将所述第一平均值与所述第二平均值的差作为所述质量分数。其中,可以通过(1)式计算样本图像的质量分数。
可选的,可以首先确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像,其中,目标图像的数量为一张,非目标图像的数量为多张;接着确定所述每张样本图像与所述目标图像的所述相似度在所述每张样本图像与多张所述非目标图像的所述相似度中的排序名次,其中,可以将相似度按从大到小顺序进行排列;然后根据所述排序名次(记为r),确定所述质量分数,其中,为了使r的区分度更合理,以便于后续的模型训练,可以对r取对数。其中,根据r确定质量分数的具体公式如(2)式所示,(2)式得到的为归一化的质量分数,并且根据(2)式可知,样本图像的排名越高质量分数越高,表示该样本图像的成像质量越好。
可选的,可以根据相似度来判断标准图像中是否与样本图像包含相同元素,其中,若标准图像与样本图像的相似度超过预设阈值,则判定标准图像与样本图像包含相同元素。若标准图像与样本图像的相似度不超过预设阈值时,则判定标准图像包含的元素与样本图像元素不同。然后再根据样本图像和标准图像的ID号确定该判定结果的准确性,例如,样本图像A-1与标准图像B-2的相似度为0.567,因为0.567超过了预设阈值0.5,所以判定标准图像B-2与样本图像A-1包含相同元素。然而,根据ID号可知在实际中标准图像B-2包含的元素为B、样本图像A-1包含的元素为A,因此确定该判定结果有误,并且可以根据判定结果的准确性将所有的标准图像分成第一类图像、第二类图像、第三类图像和第四类图像。其中,第一类图像为与所述每张样本图像的所述相似度大于预设阈值且与所述每张样本图像包含相同元素的标准图像,第一类图像可称为真阳性图像。第二类图像为与所述每张样本图像的所述相似度大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像,第二类图像可称为假阳性图像。第三类图像为与所述每张样本图像的所述相似度不大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像,第三类图像可称为真阴性图像。第四类图像为与所述每张样本图像的所述相似度不大于所述预设阈值、且与所述每张样本图像包含相同元素的标准图像,第四类图像可称为假阴性图像。
其中,可以首先获取第一类图像的第一数量(记为TP)、第二类图像的第二数量(记为FP)、第三类图像的第三数量(记为TN)、以及第四类图像的第四数量(记为FN);接着根据所述第一数量和所述第四数量确定第一比率、以及根据所述第二数量和所述第三数量确定第二比率,其中,第一比率为真阳性率(记为TPR),第二比率为假阳性率(记为FPR),具体的
Figure PCTCN2018125506-appb-000007
Figure PCTCN2018125506-appb-000008
然后,根据所述第一比率和所述第二比率,确定所述质量分数。其中,可以将(FPR,TPR)看作以真阳性率为纵轴、以真阳性率为横轴的二维坐标系中的一个点。根据上述分类方法,当所选取的预设阈值不同时TPR和FPR也不同,因此可以依次取M(如10000)个不同的预设阈值,从而可以得到M个不同的点的坐标,将这M个点连接成一条曲线。该曲线通常被称为ROC曲线。最后计算在该坐标系中ROC曲线的AUC面积作为质量分数。例如:如图4所示,ROC曲线下阴影部分的面积为AUC面积,其中,可以通过微积分的方法确定该AUC面积。
训练模块1003,用于将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型。
具体实现中,可以建立样本图像和该样本图像的质量分数的对应关系,并将每张样本图像和对应的质量分数作为训练样本。然后将训练样本输入待训练模型(如基于深度学习的训练模型)得到图像质量评估模型。其中,可以利用所得到的训练好的图像质量评估模型获取任意图像的质量分数。
评估模块1104,用于根据所述图像质量评估模型,对输入图像进行质量评估。
具体实现中,可以将输入图像输入到图像质量评估模型中,得到该输入图像的质量分数(如0.85),质量分数越高表示该输入图像的成像质量越好。
可选的,评估模块1004还用于根据多张输入图像的质量分数,得到多张输入图像中质量最优的图像。其中,质量分数最高的图像为质量最优的图像。
可选的,评估模块1004还用于首先根据图像对象检测器检测出该输入图像中的用户感兴趣的元素;接着将该元素所在的ROI区域确定为目标区域;然后可以从输入图像中截取目标区域中的图像,并将截取的图像输入图像质量评估模型,以便得到目标区域的质量分数。
可选的,评估模块1004还用于可以根据目标区域获取多张包含用户感兴趣的元素的图像,并将多张图像输入图像质量评估模型中,确定每张图像的质量分数,以便从中选择质量最优的图像。
在本申请实施例中,首先获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;接着确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;其次根据所述相似度,确定所述每张样本图像的质量分数;然后将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;最后根据所述图像质量评估模型,对输入图像进行质量评估。采用本申请实施例,可以降低图像质量评估的复杂度、提高图像质量评估的精确度。
请参考图11,图11是本申请实施例提出的一种电子设备的结构示意图。如图所示,该电子设备可以包括:至少一个处理器1101,例如CPU,至少一个通信接口1102,至少一个存储器1103,至少一个总线1104。其中,总线1104用于实现这些组件之间的连接通信。其中,本申请实施例中电子设备的通信接口1102是有线发送端口,也可以为无线设备,例如包括天线装置,用于与其他节点设备进行信令或数据的通信。存储器1103可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1103可选的还可以是至少一个位于远离前述处理器1101的存储装置。存储器1103中存储一组程序代码,且处理器1101用于调用存储器中存储的程序代码,用于执行以下操作:
获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像;
确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;
根据所述相似度,确定所述每张样本图像的质量分数;
将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;
根据所述图像质量评估模型,对输入图像进行质量评估。
其中,处理器1101还用于执行如下操作步骤:
获取所述每张样本图像的第一特征信息、以及所述每张标准图像的第二特征信息;
根据所述第一特征信息和所述第二特征信息,确定所述相似度。
其中,处理器1101还用于执行如下操作步骤:
确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像;
计算所述每张样本图像与多张所述目标图像的所述相似度的平均值作为所述质量分数。
其中,处理器1101还用于执行如下操作步骤:
确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像;
计算所述每张样本图像与多张所述目标图像的所述相似度的第一平均值、以及所述每张样本图像与多张所述非目标图像的所述相似度的第二平均值;
计算所述第一平均值与所述第二平均值的差作为所述质量分数。
其中,处理器1101还用于执行如下操作步骤:
确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像;
确定所述每张样本图像与所述目标图像的所述相似度在所述每张样本图像与多张所述非 目标图像的所述相似度中的排序名次;
根据所述排序名次,确定所述质量分数。
其中,处理器1101还用于执行如下操作步骤:
获取第一类图像的第一数量、第二类图像的第二数量、第三类图像的第三数量、以及第四类图像的第四数量,所述第一类图像为与所述每张样本图像的所述相似度大于预设阈值且与所述每张样本图像包含相同元素的标准图像、所述第二类图像为与所述每张样本图像的所述相似度大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像、所述第三类图像为与所述每张样本图像的所述相似度不大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像、以及所述第四类图像为与所述每张样本图像的所述相似度不大于所述预设阈值、且与所述每张样本图像包含相同元素的标准图像;
根据所述第一数量和所述第四数量确定第一比率、以及根据所述第二数量和所述第三数量确定第二比率;
根据所述第一比率和所述第二比率,确定所述质量分数。
其中,处理器1101还用于执行如下操作步骤:
根据多张所述输入图像的质量评估结果,从多张所述输入图像中选择质量最优的图像。
其中,处理器1101还用于执行如下操作步骤:
确定所述输入图像的目标区域;
根据所述图像质量评估模型,确定所述目标区域的所述质量分数。
需要说明的是,本申请实施例同时也提供了一种存储介质,该存储介质用于存储应用程序,该应用程序用于在运行时执行图1、图4、图5和图7所示的一种图像质量评估方法中电子设备执行的操作。
需要说明的是,本申请实施例同时也提供了一种应用程序,该应用程序用于在运行时执行图1、图4、图5和图7所示的一种图像质量评估方法中电子设备执行的操作。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进 行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (10)

  1. 一种图像质量评估方法,其特征在于,所述方法包括:
    获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像,所述至少一张样本图像中的每张样本图像与所述多张标准图像中的至少一张标准图像包含相同元素;
    确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;
    根据所述相似度,确定所述每张样本图像的质量分数;
    将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;
    根据所述图像质量评估模型,对输入图像进行质量评估。
  2. 如权利要求1所述的方法,其特征在于,所述确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度包括:
    获取所述每张样本图像的第一特征信息、以及所述每张标准图像的第二特征信息;
    根据所述第一特征信息和所述第二特征信息,确定所述相似度。
  3. 如权利要求1或2所述的方法,其特征在于,所述根据所述相似度,确定所述每张样本图像的质量分数包括:
    确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像;
    计算所述每张样本图像与多张所述目标图像的所述相似度的平均值作为所述质量分数。
  4. 如权利要求1或2所述的方法,其特征在于,所述根据所述相似度,确定所述每张样本图像的质量分数包括:
    确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像;
    计算所述每张样本图像与多张所述目标图像的所述相似度的第一平均值、以及所述每张样本图像与多张所述非目标图像的所述相似度的第二平均值;
    计算所述第一平均值与所述第二平均值的差作为所述质量分数。
  5. 如权利要求1或2所述的方法,其特征在于,所述根据所述相似度,确定所述每张样本图像的质量分数包括:
    确定所述多张标准图像中与所述每张样本图像包含相同元素的目标图像、以及与所述每张样本图像包含不同元素的非目标图像;
    确定所述每张样本图像与所述目标图像的所述相似度在所述每张样本图像与多张所述非目标图像的所述相似度中的排序名次;
    根据所述排序名次,确定所述质量分数。
  6. 如权利要求1或2所述的方法,其特征在于,所述根据所述相似度,确定所述每张样本图像的质量分数包括:
    获取第一类图像的第一数量、第二类图像的第二数量、第三类图像的第三数量、以及第四类图像的第四数量,所述第一类图像为与所述每张样本图像的所述相似度大于预设阈值且 与所述每张样本图像包含相同元素的标准图像、所述第二类图像为与所述每张样本图像的所述相似度大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像、所述第三类图像为与所述每张样本图像的所述相似度不大于所述预设阈值且与所述每张样本图像包含不同元素的标准图像、以及所述第四类图像为与所述每张样本图像的所述相似度不大于所述预设阈值、且与所述每张样本图像包含相同元素的标准图像;
    根据所述第一数量和所述第四数量确定第一比率、以及根据所述第二数量和所述第三数量确定第二比率;
    根据所述第一比率和所述第二比率,确定所述质量分数。
  7. 如权利要求6所述的方法,其特征在于,所述根据所述图像质量评估模型,对输入图像进行质量评估包括:
    确定所述输入图像的目标区域;
    根据所述图像质量评估模型,确定所述目标区域的所述质量分数。
  8. 一种图像质量评估装置,其特征在于,所述装置包括:
    获取模块,用于获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像,所述至少一张样本图像中的每张样本图像与所述多张标准图像中的至少一张标准图像包含相同元素;
    确定模块,用于确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;
    所述确定模块,还用于根据所述相似度,确定所述每张样本图像的质量分数;
    训练模块,用于将所述每张样本图像和所述质量分数输入待训练模型得到图像质量评估模型;
    评估模块,用于根据所述图像质量评估模型,对输入图像进行质量评估。
  9. 一种电子设备,其特征在于,包括:处理器、存储器、通信接口和总线;
    所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
    所述存储器存储可执行程序代码;
    所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1-7任一项所述的图像质量评估方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1-7任一项所述的图像质量评估方法。
PCT/CN2018/125506 2018-08-20 2018-12-29 一种图像质量评估方法、装置、电子设备及计算机可读存储介质 WO2020037932A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810945522.7 2018-08-20
CN201810945522.7A CN110858394B (zh) 2018-08-20 2018-08-20 一种图像质量评估方法、装置、电子设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2020037932A1 true WO2020037932A1 (zh) 2020-02-27

Family

ID=69592182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125506 WO2020037932A1 (zh) 2018-08-20 2018-12-29 一种图像质量评估方法、装置、电子设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN110858394B (zh)
WO (1) WO2020037932A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111640099A (zh) * 2020-05-29 2020-09-08 北京金山云网络技术有限公司 一种确定图像质量的方法、装置、电子设备及存储介质
CN112183594A (zh) * 2020-09-17 2021-01-05 微民保险代理有限公司 票据图像的处理方法和装置、存储介质及电子设备
CN112668718A (zh) * 2021-01-19 2021-04-16 北京市商汤科技开发有限公司 神经网络训练方法、装置、电子设备以及存储介质
CN112836759A (zh) * 2021-02-09 2021-05-25 重庆紫光华山智安科技有限公司 一种机选图片评价方法、装置、存储介质及电子设备
CN112907541A (zh) * 2021-02-23 2021-06-04 厦门熵基科技有限公司 一种手掌图像质量评估模型构建方法及装置
CN113344843A (zh) * 2021-04-09 2021-09-03 中科创达软件股份有限公司 一种图像质量测评方法、装置和系统
CN113408339A (zh) * 2021-05-11 2021-09-17 浙江大华技术股份有限公司 标签构建方法及相关装置
CN113554597A (zh) * 2021-06-23 2021-10-26 清华大学 一种基于脑电特征的图像质量评价方法及装置
CN114648672A (zh) * 2022-02-25 2022-06-21 北京百度网讯科技有限公司 构建样本图像集的方法、装置、电子设备及可读存储介质
CN115171198A (zh) * 2022-09-02 2022-10-11 腾讯科技(深圳)有限公司 模型质量评估方法、装置、设备及存储介质
CN117787561A (zh) * 2024-01-02 2024-03-29 国网浙江省电力有限公司杭州供电公司 一种供电可靠性评估方法及系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112001200A (zh) * 2020-09-01 2020-11-27 杭州海康威视数字技术股份有限公司 识别码识别方法、装置、设备、存储介质和系统
CN112148908A (zh) * 2020-10-23 2020-12-29 北京百度网讯科技有限公司 图像数据库的更新方法、装置、电子设备和介质
CN112614109B (zh) * 2020-12-24 2024-06-07 四川云从天府人工智能科技有限公司 图像质量评估方法、装置以及计算机可读存储介质
CN113450323B (zh) * 2021-06-22 2022-12-06 深圳盈天下视觉科技有限公司 质量检测方法、装置、电子设备及计算机可读存储介质
CN113658093A (zh) * 2021-06-30 2021-11-16 浙江大华技术股份有限公司 图像质量评估方法、装置、设备及计算机存储介质
CN113592818A (zh) * 2021-07-30 2021-11-02 北京小米移动软件有限公司 图像处理方法、装置、电子设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780452A (zh) * 2016-12-07 2017-05-31 华侨大学 一种结合小波和角点特征的全参考屏幕图像质量评估方法
CN108288027A (zh) * 2017-12-28 2018-07-17 新智数字科技有限公司 一种图像质量的检测方法、装置及设备

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002305657A (ja) * 2001-04-05 2002-10-18 Sharp Corp 画質評価装置、画質評価方法および記録媒体
CN101378519B (zh) * 2008-09-28 2010-09-22 宁波大学 一种基于Contourlet变换的质降参考图像质量评价方法
JP2011134200A (ja) * 2009-12-25 2011-07-07 Konica Minolta Holdings Inc 画像評価方法、画像処理方法および画像処理装置
CN101853504B (zh) * 2010-05-07 2012-04-25 厦门大学 基于视觉特性与结构相似度的图像质量评测方法
CN102073985B (zh) * 2010-12-23 2012-05-09 清华大学 基于像素点匹配的缩放图像的客观质量评价方法和装置
CN102169576B (zh) * 2011-04-02 2013-01-16 北京理工大学 一种图像拼接算法定量评价方法
US8948465B2 (en) * 2012-04-09 2015-02-03 Accenture Global Services Limited Biometric matching technology
CN102930296B (zh) * 2012-11-01 2015-08-26 长沙纳特微视网络科技有限公司 一种图像识别方法及装置
CN105654465B (zh) * 2015-12-21 2018-06-26 宁波大学 一种采用视差补偿视点间滤波的立体图像质量评价方法
CN105574885B (zh) * 2016-01-13 2017-03-08 福州大学 基于机器学习并融合视觉特征的全参考图像质量评估方法
CN107578395B (zh) * 2017-08-31 2019-12-17 中国地质大学(武汉) 一种基于视觉感知的图像质量评价方法
CN108289222B (zh) * 2018-01-26 2020-01-14 嘉兴学院 一种基于结构相似度映射字典学习的无参考图像质量评价方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780452A (zh) * 2016-12-07 2017-05-31 华侨大学 一种结合小波和角点特征的全参考屏幕图像质量评估方法
CN108288027A (zh) * 2017-12-28 2018-07-17 新智数字科技有限公司 一种图像质量的检测方法、装置及设备

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111640099A (zh) * 2020-05-29 2020-09-08 北京金山云网络技术有限公司 一种确定图像质量的方法、装置、电子设备及存储介质
CN112183594A (zh) * 2020-09-17 2021-01-05 微民保险代理有限公司 票据图像的处理方法和装置、存储介质及电子设备
CN112183594B (zh) * 2020-09-17 2024-06-11 微民保险代理有限公司 票据图像的处理方法和装置、存储介质及电子设备
CN112668718A (zh) * 2021-01-19 2021-04-16 北京市商汤科技开发有限公司 神经网络训练方法、装置、电子设备以及存储介质
CN112668718B (zh) * 2021-01-19 2023-07-18 北京市商汤科技开发有限公司 神经网络训练方法、装置、电子设备以及存储介质
CN112836759B (zh) * 2021-02-09 2023-05-30 重庆紫光华山智安科技有限公司 一种机选图片评价方法、装置、存储介质及电子设备
CN112836759A (zh) * 2021-02-09 2021-05-25 重庆紫光华山智安科技有限公司 一种机选图片评价方法、装置、存储介质及电子设备
CN112907541A (zh) * 2021-02-23 2021-06-04 厦门熵基科技有限公司 一种手掌图像质量评估模型构建方法及装置
CN112907541B (zh) * 2021-02-23 2023-11-21 厦门熵基科技有限公司 一种手掌图像质量评估模型构建方法及装置
CN113344843B (zh) * 2021-04-09 2024-04-19 中科创达软件股份有限公司 一种图像质量测评方法、装置和系统
CN113344843A (zh) * 2021-04-09 2021-09-03 中科创达软件股份有限公司 一种图像质量测评方法、装置和系统
CN113408339A (zh) * 2021-05-11 2021-09-17 浙江大华技术股份有限公司 标签构建方法及相关装置
CN113554597A (zh) * 2021-06-23 2021-10-26 清华大学 一种基于脑电特征的图像质量评价方法及装置
CN113554597B (zh) * 2021-06-23 2024-02-02 清华大学 一种基于脑电特征的图像质量评价方法及装置
CN114648672A (zh) * 2022-02-25 2022-06-21 北京百度网讯科技有限公司 构建样本图像集的方法、装置、电子设备及可读存储介质
CN115171198A (zh) * 2022-09-02 2022-10-11 腾讯科技(深圳)有限公司 模型质量评估方法、装置、设备及存储介质
CN115171198B (zh) * 2022-09-02 2022-11-25 腾讯科技(深圳)有限公司 模型质量评估方法、装置、设备及存储介质
CN117787561A (zh) * 2024-01-02 2024-03-29 国网浙江省电力有限公司杭州供电公司 一种供电可靠性评估方法及系统

Also Published As

Publication number Publication date
CN110858394A (zh) 2020-03-03
CN110858394B (zh) 2021-03-05

Similar Documents

Publication Publication Date Title
WO2020037932A1 (zh) 一种图像质量评估方法、装置、电子设备及计算机可读存储介质
US11900647B2 (en) Image classification method, apparatus, and device, storage medium, and medical electronic device
WO2018219180A1 (zh) 确定人脸图像质量的方法和装置、电子设备和计算机存储介质
CN103297696B (zh) 拍摄方法、装置和终端
JP5554984B2 (ja) パターン認識方法およびパターン認識装置
WO2019033574A1 (zh) 电子装置、动态视频人脸识别的方法、系统及存储介质
US20130342636A1 (en) Image-Based Real-Time Gesture Recognition
CN110287907B (zh) 一种对象检测方法和装置
WO2021143865A1 (zh) 定位方法及装置、电子设备、计算机可读存储介质
CN112287868B (zh) 一种人体动作识别方法及装置
US9025889B2 (en) Method, apparatus and computer program product for providing pattern detection with unknown noise levels
CN112287867B (zh) 一种多摄像头的人体动作识别方法及装置
CN110691259A (zh) 视频播放方法、系统、装置、电子设备及存储介质
WO2019033575A1 (zh) 电子装置、人脸追踪的方法、系统及存储介质
WO2020171379A1 (en) Capturing a photo using a mobile device
CN111353336A (zh) 图像处理方法、装置及设备
CN116071790A (zh) 掌静脉图像质量评估方法、装置、设备及存储介质
JP2018081402A (ja) 画像処理装置、画像処理方法、及びプログラム
CN113763348A (zh) 图像质量确定方法、装置、电子设备及存储介质
US20130011024A1 (en) Facilitating face detection with user input
CN113658146A (zh) 一种结节分级方法、装置、电子设备及存储介质
CN109753886B (zh) 一种人脸图像的评价方法、装置及设备
WO2023103285A1 (zh) 定位方法、装置、机器人及计算机可读存储介质
CN113822927A (zh) 一种适用弱质量图像的人脸检测方法、装置、介质及设备
JP7312026B2 (ja) 画像処理装置、画像処理方法およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18931211

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18931211

Country of ref document: EP

Kind code of ref document: A1