Method and apparatus for training quality assessment model, and electronic device
By acquiring features from multiple sets of face images, determining image quality scores using the similarity distribution of features between the same and different objects, and training a quality assessment model, the problem of high cost and low accuracy of manual annotation in existing technologies is solved, achieving high-accuracy quality assessment.
Patent Information
- Application Number
- CN202310980559.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2043-08-04
AI Technical Summary
Existing quality assessment model training methods rely on manual annotation, resulting in high annotation costs and low accuracy, making it difficult to accurately and effectively determine the quality of face images.
By acquiring multiple sets of face images, extracting image features, determining image quality scores using the similarity distribution of features between the same and different objects, training a quality assessment model, avoiding manual annotation, and combining image features for evaluation.
This improved the accuracy of the quality assessment model without requiring manual annotation, ensuring that the trained model can accurately assess the quality of face images.
Smart Images

Figure CN116994094B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of image processing, and particularly relates to a training method and device of a quality evaluation model and an electronic device. BACKGROUND
[0002] A current training method of a quality evaluation model mainly comprises: obtaining multiple sample face images; manually labeling image quality scores of the sample face images; performing regression processing on a deep learning model according to the sample face images and the labeled image quality scores, to obtain a trained deep learning model.
[0003] In the above method, the labeling cost is high, and the labeling accuracy is low, which leads to that the trained deep learning model is difficult to accurately and effectively determine the quality of a face image. SUMMARY
[0004] The present disclosure provides a training method and device of a quality evaluation model and an electronic device.
[0005] According to a first aspect of an embodiment of the present disclosure, a training method of a quality evaluation model is provided, which comprises: obtaining multiple face image sets and image features of face images in the face image sets; the multiple face images in a face image set belong to the same object; face images in different face image sets belong to different objects; for each candidate face image, determining a same-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of a first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs; determining a different-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of a second face image; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs; determining an image quality score of the candidate face image according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image; and performing training processing on an initial quality evaluation model according to multiple candidate face images and the image quality scores of the candidate face images, to obtain a trained quality evaluation model.
[0006] In an embodiment of the present disclosure, the determining of the same-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of the first face image comprises: determining a feature similarity between the candidate face image and the first face image according to the image feature of the candidate face image and the image feature of the first face image; determining a discrete distribution according to multiple feature similarities; and taking the discrete distribution as the same-object feature similarity distribution of the candidate face image.
[0007] In an embodiment of the present disclosure, the determining, according to the image feature of the candidate face image and the image feature of the second face image, the different object feature similarity distribution of the candidate face image comprises: determining a feature similarity between the candidate face image and the second face image according to the image feature of the candidate face image and the image feature of the second face image; determining a discrete distribution according to a plurality of the feature similarities; and taking the discrete distribution as the different object feature similarity distribution of the candidate face image.
[0008] In an embodiment of the present disclosure, the determining, according to the same object feature similarity distribution and the different object feature similarity distribution of the candidate face image, the image quality score of the candidate face image comprises: determining a Wasserstein distance between the same object feature similarity distribution and the different object feature similarity distribution according to the same object feature similarity distribution and the different object feature similarity distribution of the candidate face image; and taking the Wasserstein distance as the image quality score of the candidate face image.
[0009] In an embodiment of the present disclosure, after the determining, according to the same object feature similarity distribution and the different object feature similarity distribution of the candidate face image, the image quality score of the candidate face image, the method further comprises: performing normalization processing on the image quality scores of a plurality of the candidate face images to obtain processed image quality scores; obtaining an image quality score range; determining a first candidate face image in the plurality of the candidate face images; the image quality score of the first candidate face image is not located in the image quality score range; and performing filtering processing on the first candidate face image in the plurality of the candidate face images.
[0010] In an embodiment of the present disclosure, the method further comprises: obtaining a face image recognition model used for extraction of the image feature; the face image recognition model comprises a feature extraction network and a recognition network; and replacing the recognition network in the face image recognition model with an initial evaluation network to obtain the initial quality evaluation model.
[0011] According to a second aspect of the embodiments of the present disclosure, an image quality evaluation method is further provided, and the method comprises: obtaining a current face image; obtaining a quality evaluation model; the quality evaluation model is obtained by training in combination with the training method of the quality evaluation model in the first aspect; inputting the current face image into the quality evaluation model to obtain a quality evaluation result of the current face image.
[0012] According to a third aspect of the embodiments of the present disclosure, a training device of a quality evaluation model is further provided. The device comprises: a first acquisition module configured to acquire a plurality of sets of face images, and image features of the face images in the sets; the face images in different sets belong to different subjects; a first determination module configured to, for each candidate face image, determine a same-subject feature similarity distribution of the candidate face image according to the image features of the candidate face image and a first face image; the first face image belongs to the same set as the candidate face image; a second determination module configured to determine a different-subject feature similarity distribution of the candidate face image according to the image features of the candidate face image and a second face image; the second face image belongs to a different set from the candidate face image; a third determination module configured to determine an image quality score of the candidate face image according to the same-subject feature similarity distribution and the different-subject feature similarity distribution of the candidate face image; and a training module configured to train an initial quality evaluation model according to a plurality of candidate face images and the image quality scores of the candidate face images, to obtain a trained quality evaluation model.
[0013] According to a fourth aspect of the embodiments of the present disclosure, an image quality evaluation device is further provided. The device comprises: a first acquisition module configured to acquire a current face image; a second acquisition module configured to acquire a quality evaluation model; the quality evaluation model is trained by combining the training method of the quality evaluation model in the first aspect; and a third acquisition module configured to input the current face image into the quality evaluation model, to acquire a quality evaluation result of the current face image.
[0014] According to a fifth aspect of the embodiments of the present disclosure, an electronic device is further provided. The device comprises: a processor; a memory configured to store instructions executable by the processor; and wherein the processor is configured to implement the steps of the training method of the quality evaluation model as described above, or implement the steps of the image quality evaluation method as described above.
[0015] According to a sixth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is further provided. When the instructions in the storage medium are executed by a processor, the processor can execute the training method of the quality evaluation model as described above, or execute the image quality evaluation method as described above.
[0016] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0017] The image quality evaluation method comprises the following steps: acquiring a plurality of face image sets, and image features of face images in the face image sets; the plurality of face images in the face image sets belong to the same object; face images in different face image sets belong to different objects; for each candidate face image, determining a same-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of a first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs; determining a different-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of a second face image; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs; determining an image quality score of the candidate face image according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image; and training an initial quality evaluation model according to the plurality of candidate face images and the image quality scores of the candidate face images to obtain a trained quality evaluation model, thereby avoiding manual image quality score labeling of sample face images and ensuring the accuracy of the trained quality evaluation model.
[0018] It should be understood that the general description above and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.
[0020] Figure 1 Flowchart of a quality evaluation model training method according to an embodiment of the present disclosure;
[0021] Figure 2 Flowchart of an image quality evaluation method according to an embodiment of the present disclosure;
[0022] Figure 3 Structural schematic diagram of a quality evaluation model training device according to an embodiment of the present disclosure;
[0023] Figure 4 Structural schematic diagram of an image quality evaluation device according to an embodiment of the present disclosure;
[0024] Figure 5 Structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order for ordinary personnel in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0027] The training method of the current quality evaluation model mainly comprises: obtaining a plurality of sample face images; manually labeling the image quality score of the sample face image; and performing regression processing on the deep learning model according to the sample face image and the labeled image quality score to obtain a trained deep learning model.
[0028] In the above method, the labeling cost is high, the labeling accuracy is low, and the deep learning model obtained by training is difficult to accurately and effectively determine the quality of the face image.
[0029] Figure 1 A flowchart of the training method of the quality evaluation model of an embodiment of the present disclosure. It should be noted that the training method of the quality evaluation model of the present embodiment can be applied to a quality evaluation model training device, which can be configured in an electronic device to enable the electronic device to perform the training function of the quality evaluation model.
[0030] Among them, the electronic device can be any device with computing power, for example, it can be a personal computer (Personal Computer, PC), a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc. Hardware devices with various operating systems, touch screens and / or display screens. In the following embodiments, the execution subject is taken as an example to illustrate the electronic device.
[0031] As shown in the method, the method comprises the following steps: Figure 1
[0032] Step 101, obtaining a plurality of face image sets and image features of face images in the face image set; the plurality of face images in the face image set belong to the same object; the face objects in different face image sets belong to different objects.
[0033] In the embodiments of the present disclosure, the object can refer to a character object. The process of step 101 performed by the electronic device can be, for example, collecting, for each object, a face video of the object; the face video can include a plurality of continuous frames of close-up images of the object; performing a plurality of frame extraction processes on the face video to obtain a plurality of original face images; performing face region cropping processes on the plurality of original face images respectively to obtain a plurality of face images; combining to obtain a face image set; and performing image feature extraction processes on each face image in the face image set to obtain image features of the face images.
[0034] In the embodiments of the present disclosure, at least one of the following attributes of the plurality of frames of images in the face video of the object is different: pose, illumination, occlusion, expression, and blurriness.
[0035] In the embodiments of the present disclosure, the process of extracting the image features by the electronic device can be, for example, inputting the face image into a face image recognition model to obtain image features output by the face image recognition model, for the face image. The face image recognition model can include a feature extraction network and a recognition network. The image features can be the output results of the feature extraction network in the face image recognition model.
[0036] Step 102: For each candidate face image, determining a same-object feature similarity distribution of the candidate face image according to the image features of the candidate face image and the image features of the first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs.
[0037] In the embodiments of the present disclosure, the process of step 102 performed by the electronic device can be, for example, determining a feature similarity between the candidate face image and the first face image according to the image features of the candidate face image and the image features of the first face image; determining a discrete distribution according to a plurality of feature similarities; and taking the discrete distribution as the same-object feature similarity distribution of the candidate face image.
[0038] In the embodiments of the present disclosure, the electronic device can perform pairing processing on the candidate face image and the first face image to obtain a plurality of positive sample pairs; and then, for each positive sample pair, determine a feature similarity between two images in the positive sample pair. Each positive sample pair includes a candidate face image and a first face image. The first face images included in different positive sample pairs are different.
[0039] Step 103: Determining a different-object feature similarity distribution of the candidate face image according to the image features of the candidate face image and the image features of the second face image; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs.
[0040] In this embodiment of the disclosure, the electronic device may perform step 103 as follows: determine the feature similarity between the candidate face image and the second face image based on the image features of the candidate face image and the image features of the second face image; determine a discrete distribution based on multiple feature similarities; and use the discrete distribution as the distribution of different object feature similarities of the candidate face image.
[0041] The electronic device can pair the candidate face image and the second face image to obtain multiple negative sample pairs; then, for each negative sample pair, the feature similarity between the two images is determined. Each negative sample pair includes a candidate face image and a second face image. The second face image included in different negative sample pairs is different.
[0042] Step 104: Determine the image quality score of the candidate face image based on the similarity distribution of features of the same object and the similarity distribution of features of different objects in the candidate face image.
[0043] In this embodiment of the disclosure, the electronic device may perform step 104 as follows: determine the Wasserstein distance between the similarity distribution of the same object features and the similarity distribution of different object features based on the similarity distribution of the same object features and the similarity distribution of different object features in the candidate face image; and use the Wasserstein distance as the image quality score of the candidate face image.
[0044] In this embodiment of the disclosure, in order to further improve the accuracy of the candidate face images and their corresponding image quality scores used during training, after step 104, the electronic device may further perform the following process: normalize the image quality scores of multiple candidate face images to obtain processed image quality scores; obtain the image quality score range; determine the first candidate face image among the multiple candidate face images; the image quality score of the first candidate face image is not within the image quality score range; and perform filtering processing on the first candidate face image among the multiple candidate face images.
[0045] The electronic device can normalize multiple image quality scores to a specified score range. This specified score range can be, for example, (0, 1) or (0, 100), and can be set according to actual needs.
[0046] In the embodiments of the present disclosure, the image quality score range can be determined according to the specified score range in the normalization. The image quality score range can be a sub-range at the boundary of the specified score range. For example, when the specified score range is (0, 1), the image quality score range can be two, which are (0, 0.35) and (0.65, 1) respectively. For another example, when the specified score range is (0, 100), the image quality score range can be two, which are (0, 35) and (65, 100) respectively.
[0047] In step 105, the initial quality assessment model is trained according to the plurality of candidate face images and the image quality scores of the candidate face images, to obtain a trained quality assessment model.
[0048] In the embodiments of the present disclosure, before step 105, the electronic device can also obtain an initial quality assessment model. For example, the electronic device can obtain a face image recognition model for extracting image features, and the face image recognition model includes a feature extraction network and a recognition network. The recognition network in the face image recognition model is replaced by an initial evaluation network to obtain an initial quality assessment model.
[0049] The feature extraction network in the face image recognition model can effectively extract the image features of the face image, and in combination with the trained evaluation model, it can well distinguish the pose, blur degree, occlusion, expression and the like in the face image, and thus well determine the image quality of the face image.
[0050] In the training method of the quality assessment model in this embodiment, multiple sets of face images and image features of face images in the sets of face images are acquired. Multiple face images in the sets belong to the same object; face images in different sets belong to different objects. For each candidate face image, the similarity distribution of the same-object features of the candidate face image is determined based on the image features of the candidate face image and the image features of a first face image. The set of face images to which the first face image belongs is the same as the set of face images to which the candidate face image belongs. The similarity distribution of different-object features of the candidate face image is determined based on the image features of the candidate face image and the image features of a second face image. The set of face images to which the second face image belongs is different from the set of face images to which the candidate face image belongs. The image quality score of the candidate face image is determined based on the similarity distribution of the same-object features and the similarity distribution of different-object features. Based on multiple candidate face images and their image quality scores, the initial quality assessment model is trained to obtain a trained quality assessment model. This avoids manual annotation of image quality scores for sample face images and ensures the accuracy of the trained quality assessment model by combining image features and other factors to determine the image quality score.
[0051] Figure 2 This is a flowchart illustrating another embodiment of an image quality assessment method disclosed herein. It should be noted that the image quality assessment method of this embodiment can be applied to an image quality assessment device, which can be configured in an electronic device to enable the electronic device to perform image quality assessment functions.
[0052] The electronic device can be any device with computing capabilities, such as a personal computer (PC), mobile terminal, server, etc. A mobile terminal can be a hardware device with various operating systems, touchscreens, and / or displays, such as an in-vehicle device, mobile phone, tablet computer, personal digital assistant, wearable device, etc. The following embodiments use an electronic device as an example for illustration.
[0053] like Figure 2 As shown, the method includes the following steps:
[0054] Step 201: Obtain the current face image.
[0055] In this embodiment of the disclosure, the current face image can be any face image of any object. The method of acquiring the current face image is, for example, web scraping, camera capture, etc., and is not specifically limited here.
[0056] At step 202, a quality evaluation model is acquired; the quality evaluation model is trained in combination with image quality scores of a plurality of candidate face images; the image quality score of the candidate face image is determined according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image.
[0057] In the embodiments of the present disclosure, the training process of the quality evaluation model can refer to the steps in the embodiments shown in FIG. 2, which are not described in detail here. Figure 1
[0058] At step 203, the current face image is input into the quality evaluation model to acquire a quality evaluation result of the current face image.
[0059] In the embodiments of the present disclosure, the quality evaluation model can include a feature extraction network and an evaluation network. The feature extraction network is configured to extract image features of the current face image; and the evaluation network is configured to perform evaluation processing on the image features of the current face image to determine the quality evaluation result of the current face image.
[0060] In one example, the quality evaluation result of the current face image can be an image quality score of the current face image, and the current face image can be determined as a high-quality face image or a low-quality face image in combination with a quality score threshold. In another example, the quality evaluation result of the current face image can be a specific label, and the label can be used to indicate that the current face image is a high-quality face image or a low-quality face image. For example, when the label is 0, it indicates that the current face image is a low-quality face image; and when the label is 1, it indicates that the current face image is a high-quality face image.
[0061] In the training method of the quality evaluation model in the embodiments of the present disclosure, the current face image is acquired; the quality evaluation model is acquired; the quality evaluation model is trained in combination with image quality scores of a plurality of candidate face images; the image quality score of the candidate face image is determined according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image; the current face image is input into the quality evaluation model to acquire a quality evaluation result of the current face image; wherein the image quality score of the candidate face image is determined in combination with the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image; and the quality evaluation model is trained, which can ensure the accuracy of the trained quality evaluation model and the accuracy of the image quality evaluation.
[0062] Figure 3 FIG. 3 is a structural schematic diagram of a training device of the quality evaluation model according to an embodiment of the present disclosure.
[0063] As shown in FIG. 3, the training device of the quality evaluation model according to an embodiment of the present disclosure includes a feature extraction network and an evaluation network. Figure 3 As shown, the training apparatus of the quality evaluation model can include: a first acquisition module 301, a first determination module 302, a second determination module 303, a third determination module 304, and a training module 305.
[0064] The first acquisition module 301 is configured to acquire a plurality of face image sets and image features of face images in the face image sets; the plurality of face images in the face image sets belong to the same object; face images in different face image sets belong to different objects. The first determination module 302 is configured to, for each candidate face image, determine a same-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of a first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs. The second determination module 303 is configured to determine a different-object feature similarity distribution of the candidate face image according to the image feature of the candidate face image and the image feature of a second face image; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs. The third determination module 304 is configured to determine an image quality score of the candidate face image according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image. The training module 305 is configured to train an initial quality evaluation model according to a plurality of candidate face images and the image quality scores of the candidate face images, to obtain a trained quality evaluation model.
[0065] In an embodiment of the present disclosure, the first determination module 302 is specifically configured to determine a feature similarity between the candidate face image and the first face image according to the image feature of the candidate face image and the image feature of the first face image; determine a discrete distribution according to a plurality of feature similarities; and take the discrete distribution as the same-object feature similarity distribution of the candidate face image.
[0066] In an embodiment of the present disclosure, the second determination module 303 is specifically configured to determine a feature similarity between the candidate face image and the second face image according to the image feature of the candidate face image and the image feature of the second face image; determine a discrete distribution according to a plurality of feature similarities; and take the discrete distribution as the different-object feature similarity distribution of the candidate face image.
[0067] In an embodiment of the present disclosure, the third determining module 304 is specifically configured to: determine a Wasserstein distance between the same-subject feature similarity distribution and the different-subject feature similarity distribution according to the same-subject feature similarity distribution and the different-subject feature similarity distribution of the candidate face image; and take the Wasserstein distance as the image quality score of the candidate face image.
[0068] In an embodiment of the present disclosure, the device further comprises a normalization module, a second obtaining module, a fourth determining module, and a filtering processing module; the normalization module is configured to perform normalization processing on the image quality scores of the plurality of candidate face images to obtain processed image quality scores; the second obtaining module is configured to obtain an image quality score range; the fourth determining module is configured to determine a first candidate face image in the plurality of candidate face images; the image quality score of the first candidate face image is not located in the image quality score range; and the filtering processing module is configured to perform filtering processing on the first candidate face image in the plurality of candidate face images.
[0069] In an embodiment of the present disclosure, the device further comprises a third obtaining module and a replacing module; the third obtaining module is configured to obtain a face image recognition model used for extraction of the image feature; the face image recognition model comprises a feature extraction network and a recognition network; and the replacing module is configured to replace the recognition network in the face image recognition model with an initial evaluation network to obtain the initial quality evaluation model.
[0070] In the training apparatus of the quality evaluation model, a plurality of face image sets are obtained, and image features of face images in the face image sets are obtained; the plurality of face images in the face image sets belong to the same object; face objects in different face image sets belong to different objects; for each candidate face image, a same-object feature similarity distribution of the candidate face image is determined according to the image feature of the candidate face image and the image feature of a first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs; a different-object feature similarity distribution of the candidate face image is determined according to the image feature of the candidate face image and the image feature of a second face image; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs; an image quality score of the candidate face image is determined according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face image; and the initial quality evaluation model is trained according to the plurality of candidate face images and the image quality scores of the candidate face images to obtain the trained quality evaluation model, thereby avoiding manual image quality score labeling of sample face images and ensuring the accuracy of the trained quality evaluation model.
[0071] Figure 4 A structural schematic diagram of an image quality evaluation apparatus according to an embodiment of the present disclosure.
[0072] As shown in Figure 4 , the image quality evaluation apparatus can include a first obtaining module 401, a second obtaining module 402, and a third obtaining module 403.
[0073] The first obtaining module 401 is configured to obtain a current face image; the second obtaining module 402 is configured to obtain a quality evaluation model; the quality evaluation model is trained according to image quality scores of a plurality of candidate face images; the image quality score of the candidate face image is determined according to a same-object feature similarity distribution and a different-object feature similarity distribution of the candidate face image; and the third obtaining module 403 is configured to input the current face image into the quality evaluation model to obtain a quality evaluation result of the current face image.
[0074] In the training apparatus of the quality evaluation model, a current face image is obtained; a quality evaluation model is obtained; the quality evaluation model is trained in combination with image quality scores of a plurality of candidate face images; the image quality scores of the candidate face images are determined according to the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face images; the current face image is input into the quality evaluation model to obtain a quality evaluation result of the current face image; wherein the image quality scores of the candidate face images are determined in combination with the same-object feature similarity distribution and the different-object feature similarity distribution of the candidate face images; and the quality evaluation model is trained, which can ensure the accuracy of the trained quality evaluation model and the accuracy of the image quality evaluation.
[0075] According to a fifth aspect of the embodiments of the present disclosure, an electronic device is provided, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to implement the training method of the quality evaluation model as described above, or implement the image quality evaluation method as described above.
[0076] In order to implement the above-mentioned embodiments, the present disclosure further provides a storage medium.
[0077] When the instructions in the storage medium are executed by the processor, the processor can execute the training method of the quality evaluation model as described above, or execute the image quality evaluation method as described above.
[0078] In order to implement the above-mentioned embodiments, the present disclosure further provides a computer program product.
[0079] When the computer program product is executed by the processor of the electronic device, the electronic device can execute the method as described above.
[0080] Figure 5 A structural block diagram of an electronic device according to an exemplary embodiment is shown. Figure 5 The electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.
[0081] As Figure 5As shown, the electronic device 1000 includes a processor 111, which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 112 or a program loaded into a random access memory (RAM) 113 from a memory 116. In the RAM 113, various programs and data required for the operation of the electronic device 1000 are also stored. The processor 111, the ROM 112, and the RAM 113 are connected to each other through a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.
[0082] Connected to the I / O interface 115 are a memory 116 including a hard disk or the like, and a communication section 117 including a network interface card such as a local area network (LAN) card, a modem, or the like, which performs communication processing via a network such as the Internet; and a drive 118 is also connected to the I / O interface 115 as necessary.
[0083] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program carrying on a computer readable medium, which contains program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 117. When the computer program is executed by the processor 111, the above-described functions defined in the methods of the present disclosure are performed.
[0084] In an exemplary embodiment, a storage medium including instructions, such as a memory including instructions, is also provided, which can be executed by the processor 111 of the electronic device 1000 to complete the above-described methods. Optionally, the storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, and the like.
[0085] In this disclosure, a computer readable storage medium can be any tangible medium that can contain, or store computer readable program codes. In this disclosure, a computer readable signal medium can include a computer readable program code transmitted in baseband or transmitted as part of a carrier wave. Such programs codes transmitted can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport program codes for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0086] Also, the word "exemplary" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "exemplary" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word exemplary is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise, or clear from context, "X employs A or B" is intended to mean any of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied under any of the foregoing instances. In addition, the articles "a" and "an" as used in this application and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form. Thus, use of the articles in this application and the appended claims is not limiting.
[0087] Likewise, although the present disclosure has been described and illustrated with respect to one or more implementations, equivalent alterations and modifications will become apparent to those skilled in the art that do not depart from the true spirit and scope of the disclosure. The present disclosure includes all such modifications and alterations and is limited only by the scope of the following claims. In particular regard to the various functions performed by the above described components (e.g., elements, resources, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., a functional equivalent), even though not structurally equivalent to the disclosed structure. In addition, although a particular feature of the disclosure can have been disclosed with respect to only one of several implementations, such feature can be combined with one or more other features of the other implementations as can be desired and advantageous for any given or particular application. Furthermore, to the extent that the terms "includes", "including", "has", "have", "has", "having", or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprising."
[0088] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features of the disclosure disclosed herein. It is intended that the present disclosure be considered as including any variations, uses, or adaptations of the disclosure and generic equivalents of the components described herein as covered by the appended claims. The specification and examples are to be construed as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
[0089] It is to be understood that the present disclosure is not limited to the precise construction described and illustrated above and that various modifications and changes can be made therein without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. A training method for a quality assessment model, characterized in that, The method includes: Acquire multiple sets of face images, and the image features of the face images in the sets; multiple face images in the sets belong to the same object; face images in different sets belong to different objects; For each candidate face image, the similarity distribution of the same object features of the candidate face image is determined based on the image features of the candidate face image and the image features of the first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs; Based on the image features of the candidate face image and the image features of the second face image, the similarity distribution of different object features of the candidate face image is determined; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs; The image quality score of the candidate face image is determined based on the similarity distribution of features of the same object and the similarity distribution of features of different objects in the candidate face image. Based on multiple candidate face images and their image quality scores, the initial quality assessment model is trained to obtain a trained quality assessment model.
2. The method according to claim 1, characterized in that, The step of determining the similarity distribution of the same-object features of the candidate face image based on the image features of the candidate face image and the image features of the first face image includes: Based on the image features of the candidate face image and the image features of the first face image, the feature similarity between the candidate face image and the first face image is determined; The discrete distribution is determined based on the similarity of multiple features. The discrete distribution is used as the similarity distribution of the same object features of the candidate face images.
3. The method according to claim 1, characterized in that, The step of determining the similarity distribution of different object features in the candidate face image based on the image features of the candidate face image and the image features of the second face image includes: Based on the image features of the candidate face image and the image features of the second face image, the feature similarity between the candidate face image and the second face image is determined; The discrete distribution is determined based on the similarity of multiple features. The discrete distribution is used as the similarity distribution of different object features in the candidate face image.
4. The method according to claim 1, characterized in that, The step of determining the image quality score of the candidate face image based on the similarity distribution of features within the same object and the similarity distribution of features across different objects includes: Based on the similarity distribution of features of the same object and the similarity distribution of features of different objects in the candidate face images, the Wasserstein distance between the similarity distribution of features of the same object and the similarity distribution of features of different objects is determined. The Wasserstein distance is used as the image quality score for the candidate face image.
5. The method according to claim 1, characterized in that, After determining the image quality score of the candidate face image based on the similarity distribution of features of the same object and the similarity distribution of features of different objects in the candidate face image, the method further includes: The image quality scores of the multiple candidate face images are normalized to obtain the processed image quality scores; Obtain the range of image quality scores; A first candidate face image is determined from a plurality of candidate face images; the image quality score of the first candidate face image is not within the range of the image quality score. The first candidate face image among the multiple candidate face images is filtered.
6. The method according to claim 1, characterized in that, The method further includes: A face image recognition model is obtained for extracting the features of the image; the face image recognition model includes a feature extraction network and a recognition network; The initial quality assessment model is obtained by replacing the recognition network in the face image recognition model with the initial evaluation network.
7. An image quality assessment method, characterized in that, The method includes: Get the current face image; A quality assessment model is obtained; the quality assessment model is trained using the training method for the quality assessment model according to any one of claims 1 to 6. The current face image is input into the quality assessment model to obtain the quality assessment result of the current face image.
8. A training device for a quality assessment model, characterized in that, The device includes: The first acquisition module is used to acquire multiple sets of face images and the image features of the face images in the sets of face images; the multiple face images in the sets of face images belong to the same object; the face objects in different sets of face images belong to different objects; The first determining module is used to determine the similarity distribution of the same object features of each candidate face image based on the image features of the candidate face image and the image features of the first face image; the face image set to which the first face image belongs is the same as the face image set to which the candidate face image belongs. The second determining module is used to determine the similarity distribution of different object features of the candidate face image based on the image features of the candidate face image and the image features of the second face image; the face image set to which the second face image belongs is different from the face image set to which the candidate face image belongs; The third determining module is used to determine the image quality score of the candidate face image based on the similarity distribution of features of the same object and the similarity distribution of features of different objects in the candidate face image; The training module is used to train an initial quality assessment model based on multiple candidate face images and their image quality scores, thereby obtaining a trained quality assessment model.
9. An image quality assessment device, characterized in that, The device includes: The first acquisition module is used to acquire the current face image; The second acquisition module is used to acquire a quality assessment model; the quality assessment model is trained using the training method of the quality assessment model according to any one of claims 1 to 6. The third acquisition module is used to input the current face image into the quality assessment model and obtain the quality assessment result of the current face image.
10. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured as follows: The steps of implementing the training method for the quality assessment model as described in any one of claims 1 to 6; or, the steps of implementing the image quality assessment method as described in claim 7.
11. A non-transitory computer-readable storage medium, wherein, when instructions in the storage medium are executed by a processor, the processor is able to perform a training method for a quality assessment model as described in any one of claims 1 to 6; or, perform an image quality assessment method as described in claim 7.
Citation Information
Patent Citations
Training method and device of face recognition model
CN105426857A
Image quality evaluation method and device
CN108269254A