Image processing method, apparatus and system
By automatically correcting facial expressions using a facial muscle motion coding model, the problem of low accuracy in facial expression recognition is solved, achieving efficient expression annotation and recognition.
Patent Information
- Application Number
- CN202110183990.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-10
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2041-02-10
AI Technical Summary
The accuracy of facial expression recognition in existing technologies is low, mainly due to the high cost of labeling facial expression datasets and insufficient label accuracy, which leads to poor training results for expression recognition models.
By acquiring and encoding the target face image, a target code is generated using a facial muscle motion coding model. The target code is then compared with the recognized expression, and adjustments are made to automatically correct the expression to improve the accuracy of the annotation.
It reduces the cost of manual annotation and improves the accuracy of annotation results for facial expression datasets, thereby enhancing the accuracy of facial expression recognition.
Smart Images

Figure CN114913568B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more specifically, to an image processing method, apparatus, and system. Background Technology
[0002] Facial expressions are a primary means of human communication. Related technologies utilize facial expression datasets to train neural network models for facial expression recognition. The accuracy of facial expression recognition is influenced by the expression labels within the dataset; more accurate the labels, the higher the accuracy. However, facial expression labels in datasets are often manually annotated. Ensuring accuracy requires significant manual work, leading to high labor costs. Therefore, current technologies cannot manually annotate massive amounts of facial expression data, resulting in limited datasets and consequently lower accuracy in facial expression recognition.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides an image processing method, apparatus, and system to at least address the technical problem of low accuracy in recognizing facial expressions in related art image processing methods.
[0005] According to one aspect of the embodiments of this application, an image processing method is provided, including: acquiring a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image when the first expression is different from the expression corresponding to the target code.
[0006] According to another aspect of the embodiments of this application, an image processing method is also provided, including: acquiring a target face image; recognizing the target face image to obtain a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image when the first expression is different from the expression corresponding to the target code.
[0007] According to another aspect of the embodiments of this application, an image processing method is also provided, including: displaying a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and displaying a second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target code.
[0008] According to another aspect of the embodiments of this application, an image processing method is also provided, including: acquiring a target face image; recognizing the target face image to obtain a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; adjusting the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image; and determining the attendance result of the target face image based on the second expression.
[0009] According to another aspect of the embodiments of this application, an image processing apparatus is also provided, including: an acquisition module, configured to acquire a target face image and a first expression corresponding to the target face image; an encoding module, configured to encode the target face image to obtain a target code corresponding to the target face image; and an adjustment module, configured to adjust the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image.
[0010] According to another aspect of the embodiments of this application, an image processing apparatus is also provided, comprising: an acquisition module for acquiring a target face image; a recognition module for recognizing the target face image to obtain a first expression corresponding to the target face image; an encoding module for encoding the target face image to obtain a target encoding corresponding to the target face image; and an adjustment module for adjusting the first expression when the first expression is different from the expression corresponding to the target encoding to obtain a second expression of the target face image.
[0011] According to another aspect of the embodiments of this application, an image processing apparatus is also provided, comprising: a first display module for displaying a target face image and a first expression corresponding to the target face image; an encoding module for encoding the target face image to obtain a target encoding corresponding to the target face image; and a second display module for displaying a second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target encoding.
[0012] According to another aspect of the embodiments of this application, an image processing apparatus is also provided, comprising: an acquisition module for acquiring a target face image; a recognition module for recognizing the target face image to obtain a first expression corresponding to the target face image; an encoding module for encoding the target face image to obtain a target code corresponding to the target face image; an adjustment module for adjusting the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image; and a determination module for determining the attendance result of the target face image based on the second expression.
[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is running, it controls the device where the computer-readable storage medium is located to perform the above-described image processing method.
[0014] According to another aspect of the embodiments of this application, a processor is also provided, which is used to run a program, wherein the program executes the above-described image processing method when it runs.
[0015] According to another aspect of the embodiments of this application, an image processing system is also provided, including: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following processing steps: acquiring a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image when the first expression is different from the expression corresponding to the target code.
[0016] In this embodiment, after acquiring the target face image and the corresponding first expression, the target face image can be encoded to obtain the target code. If the first expression differs from the expression corresponding to the target code, the first expression can be adjusted to obtain the second expression of the target face image, thus achieving automatic facial expression correction. It is noteworthy that since the first expression corresponding to the target face image can be automatically corrected using the expression corresponding to the target code, a large number of facial expression datasets can be labeled with relatively low manual cost. The labeling results can be automatically corrected using the expression corresponding to the target code, thereby reducing manual labeling costs, improving the accuracy of the labeling results of the facial expression dataset, and ultimately enhancing the accuracy of facial expression recognition. This solves the technical problem of low accuracy in facial expression recognition using image processing methods in related technologies. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an image processing method according to an embodiment of this application;
[0019] Figure 2 This is a flowchart of a first image processing method according to an embodiment of this application;
[0020] Figure 3This is a schematic diagram of an optional interactive interface according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram illustrating an optional correspondence between AU encoding and facial expressions according to an embodiment of this application;
[0022] Figure 5 This is a flowchart of an optional image processing method according to an embodiment of this application;
[0023] Figure 6 This is a flowchart of a second image processing method according to an embodiment of this application;
[0024] Figure 7 This is a flowchart of a third image processing method according to an embodiment of this application;
[0025] Figure 8 This is a flowchart of the fourth image processing method according to an embodiment of this application;
[0026] Figure 9 This is a schematic diagram of a first image processing apparatus according to an embodiment of this application;
[0027] Figure 10 This is a schematic diagram of a second image processing apparatus according to an embodiment of this application;
[0028] Figure 11 This is a schematic diagram of a third image processing apparatus according to an embodiment of this application;
[0029] Figure 12 This is a schematic diagram of a third image processing apparatus according to an embodiment of this application;
[0030] Figure 13 This is a structural block diagram of a computer terminal according to an embodiment of this application. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0034] Action Unit (AU): Facial muscle movement unit, or simply AU, is a coding system for measuring facial muscle movement and an objective indicator of facial expression. Because it requires expert labeling, the AU dataset is relatively small.
[0035] LBP: Local Binary Patterns, can be an operator used to describe the local texture features of an image, with notable characteristics such as rotation invariance and grayscale invariance.
[0036] Currently, facial features extracted using traditional methods, such as LBP, are mostly texture information. This texture information primarily contains facial ID information rather than facial expression information reflecting muscle changes. To ensure the accuracy of traditional methods in facial expression recognition, the accuracy of expression labels in the facial expression dataset needs to be ensured. Due to the low accuracy of expression labels, the following solutions can be adopted to improve accuracy: the first solution involves manually filtering the facial expression dataset; the second solution involves using models trained on multiple datasets to score each other. However, the first solution is time-consuming and labor-intensive, still incurring high manual costs; the second solution cannot reasonably determine the specific situation of expression labels in the current dataset because expression labels in different datasets may also contain errors.
[0037] To address the aforementioned technical problems, this application provides the following technical solution:
[0038] Example 1
[0039] According to an embodiment of this application, an image processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0040] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing an image processing method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0041] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0042] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the image processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned image processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0044] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0045] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance and is intended to illustrate the types of components that may exist in the aforementioned computer device (or mobile device).
[0046] Under the aforementioned operating environment, this application provides the following: Figure 2 The image processing method shown. Figure 2 This is a flowchart of a first image processing method according to an embodiment of this application. For example... Figure 2 As shown, the method may include the following steps:
[0047] Step S202: Obtain the target face image and the first expression corresponding to the target face image;
[0048] The target face image in the above steps can be a face image provided by the user that needs to be used for expression recognition, or a face image from the face expression dataset needed to train the expression recognition model, but it is not limited to these.
[0049] The first expression in the above steps can be an expression obtained by recognizing the target face image using a trained expression recognition model, or an expression annotated by manual annotation of the target face image, but it is not limited to these. The first expression can include, but is not limited to: happiness, sadness, disgust, surprise, anger, and fear, and can be determined according to the actual needs of expression recognition.
[0050] In one optional embodiment, when a user needs to perform facial expression recognition, the user can upload the target face image to the server, and the server can use a pre-trained facial expression recognition model to identify and determine the first expression corresponding to the target face image. Alternatively, the user can directly select the target face image to be recognized, and the client can use a pre-trained facial expression recognition model to identify and determine the first expression corresponding to the target face image.
[0051] To facilitate users uploading target facial images, an interactive interface can be provided, such as... Figure 3 As shown, users can select a face image from stored images as the target face image by clicking the "Select Image" button, and then upload the selected face image to the cloud server for processing by clicking the "Upload" button. Additionally, to facilitate user confirmation that the selected face image is the one requiring recognition, the selected face image can be displayed in the "Image Display" area. After the user confirms that it is correct, they can click the "Upload" button to upload the data.
[0052] For example, in the application scenario of facial recognition attendance machines, the trained expression recognition network can be stored in a cloud server in advance. When a user needs to clock in, the facial recognition attendance machine can take a picture of the user's face as the target face image and upload it to the cloud server. The cloud server will then use the stored expression recognition model to recognize the target face image and obtain the user's expression (i.e., the first expression mentioned above).
[0053] For example, in the security field, for access control applications, a pre-trained facial expression recognition model can be stored in a cloud server. When a user needs to open the access control, the access control recognition device can capture the user's face image as the target face image and upload it to the cloud server. The cloud server then uses the stored facial expression recognition model to recognize the target face image and obtain the user's expression (i.e., the first expression mentioned above).
[0054] For example, in offline retail or financial applications of facial recognition payment, a pre-trained expression recognition model can be stored in a cloud server. When a user needs to make a facial payment, the payment device can capture the user's facial image as the target facial image and upload it to the cloud server. The cloud server then uses the stored expression recognition model to recognize the target facial image and obtain the user's expression (i.e., the first expression mentioned above).
[0055] For example, in educational applications, a pre-trained facial expression recognition model can be stored in a cloud server. During a lesson taught by a teacher or virtual teacher, the teacher's face can be captured as the target face image, or the virtual teacher's face can be captured as the target face image and uploaded to the cloud server. The cloud server then uses the stored facial expression recognition model to recognize the target face image and obtain the user's expression (i.e., the first expression mentioned above).
[0056] For example, in a meeting application scenario, a pre-trained facial expression recognition model can be stored in a cloud server. Before or during the meeting, the meeting equipment can capture images of the faces of users in the meeting room as target facial images and upload them to the cloud server. The cloud server then uses the stored facial expression recognition model to recognize the target facial images and obtain the user's facial expression (i.e., the first expression mentioned above).
[0057] In another optional embodiment, when a user needs to train an expression recognition model for expression recognition, the user can send a training request to the server. The server obtains a facial expression dataset based on the training request. All facial images in the dataset can be used as target facial images, and the expression label of each facial image can be used as the first expression.
[0058] Step S204: Encode the target face image to obtain the target code corresponding to the target face image;
[0059] In the embodiments of this application, a facial muscle motion coding model can be used to encode the target facial image. The facial muscle motion coding model can be a network pre-trained using the AU dataset. The specific structure of the network can be an existing structure or a specific structure constructed according to different recognition needs. This application does not make any specific limitations on this.
[0060] It should be noted that because the AU dataset requires expert annotation, the AU dataset is relatively small in size, and the differences between face images in the AU dataset are small. If the AU dataset is used to train an expression recognition model, the trained expression recognition model will also suffer from reduced recognition accuracy. Therefore, the AU dataset cannot be used directly to train an expression recognition model.
[0061] In one alternative embodiment, a facial muscle motion coding model can be trained in advance using the AU dataset and deployed on a server or client. After acquiring the target facial image, the AU encoding of the target facial image (i.e., the target encoding mentioned above) can be obtained using the facial muscle motion coding model.
[0062] Step S206: If the first expression is different from the expression corresponding to the target encoding, the first expression is adjusted to obtain the second expression of the target face image.
[0063] Optionally, the expression corresponding to the target code can be determined based on a preset mapping relationship, wherein the preset mapping relationship is used to represent the correspondence between the code and the expression.
[0064] In one optional embodiment, a correspondence between AU codes and facial expressions can be pre-constructed based on the AU codes and expression labels of each face image in the AU dataset, resulting in, for example: Figure 4 The preset mapping relationship shown allows for the determination of the AU code of the target face image, and thus the corresponding expression can be determined based on this preset mapping relationship; that is, a reference expression for the target face image can be determined. Furthermore, by comparing the first expression and the reference expression, it can be determined whether the first expression needs adjustment. If the two expressions are the same, no adjustment is needed; if they are different, adjustment is required, and the adjusted second expression becomes the actual expression of the target face image.
[0065] For example, suppose there is a face image A with the corresponding expression "sadness," meaning the target face image is face image A with the primary expression "sadness." After inputting face image A into the AU network, the corresponding AU code, AU12, is obtained. At this point, the target code is AU12, which is further combined with... Figure 4 The mapping relationship shown indicates that the target encoding corresponds to the expression "happy". Therefore, it can be determined that the first expression is different from the expression corresponding to the target encoding, and the first expression needs to be adjusted. The second expression obtained after adjustment is "sad".
[0066] For example, in the application scenario of facial recognition attendance machines, a pre-trained facial muscle motion coding model can be stored in a cloud server. After acquiring the target face image, the cloud server can use the stored facial muscle motion coding model to obtain the AU code of the target face image, and then compare the expression corresponding to the AU code with the recognized expression. If the two expressions are different, the recognized expression is adjusted to obtain the adjusted new expression (i.e., the second expression mentioned above). Finally, the attendance operation is completed using the adjusted new expression.
[0067] For example, in the security field, for access control applications, a pre-trained facial muscle motion coding model can be stored in a cloud server. After acquiring the target face image, the cloud server can use the stored facial muscle motion coding model to obtain the AU code of the target face image, and then compare the expression corresponding to the AU code with the recognized expression. If the two expressions are different, the recognized expression is adjusted to obtain a new expression (i.e., the second expression mentioned above). Finally, the access control operation is completed using the new expression.
[0068] For example, in offline retail or financial applications of facial recognition payment, a pre-trained facial muscle motion coding model can be stored in a cloud server. After acquiring the target face image, the cloud server can use the stored facial muscle motion coding model to obtain the AU code of the target face image, and then compare the expression corresponding to the AU code with the recognized expression. If the two expressions are different, the recognized expression is adjusted to obtain a new expression (i.e., the second expression mentioned above), and finally the payment operation is completed using the new expression.
[0069] For example, in educational applications, a pre-trained facial muscle motion coding model can be stored in a cloud server. After acquiring a target face image, the cloud server can use the stored facial muscle motion coding model to obtain the AU code of the target face image. Then, the expression corresponding to the AU code is compared with the recognized expression. If the two expressions are different, the recognized expression is adjusted to obtain a new expression (i.e., the second expression mentioned above). Finally, the new expression is used to control the representation of the teacher or virtual teacher, and the expression is adjusted in real time according to the actual needs of the scenario, thereby improving students' enthusiasm for class.
[0070] For example, in a meeting application scenario, a pre-trained facial muscle motion coding model can be stored in a cloud server. After acquiring the target face image, the cloud server can use the stored facial muscle motion coding model to obtain the AU code of the target face image, and then compare the expression corresponding to the AU code with the recognized expression. If the two expressions are different, the recognized expression is adjusted to obtain a new expression (i.e., the second expression mentioned above). Finally, the meeting check-in operation is completed using the new expression.
[0071] The solution provided by the above embodiments of this application, after obtaining a target face image and a first expression corresponding to the target face image, can encode the target face image to obtain a target code corresponding to the target face image. If the first expression differs from the expression corresponding to the target code, the first expression can be adjusted to obtain a second expression of the target face image, thus achieving the purpose of automatic facial expression correction. It is noteworthy that since the first expression corresponding to the target face image can be automatically corrected using the expression corresponding to the target code, a large number of facial expression datasets can be labeled with less manual effort. The labeling results can be automatically corrected using the expression corresponding to the target code, thereby reducing manual labeling costs, improving the accuracy of the labeling results of the facial expression dataset, and ultimately improving the accuracy of facial expression recognition. This solves the technical problem of low accuracy in facial expression recognition using image processing methods in related technologies.
[0072] In the above embodiments of this application, adjusting the first expression to obtain the second expression of the target face image includes: acquiring a first image set, wherein the first image set includes: multiple first face images, the codes of the multiple first face images and expressions; determining the code in the codes of the multiple first face images that is the same as the target code; acquiring at least one first face image corresponding to the code that is the same as the target code; and determining the second expression based on the expression corresponding to the at least one first face image.
[0073] The first image set in the above steps can be a facial expression dataset needed to train the expression recognition model, or it can be historical facial images that have been recognized using the expression recognition model, but it is not limited to these. If the first image set is a facial expression dataset and the target facial image is a facial image from the facial expression dataset, the target facial image can be any facial image from the first image set.
[0074] It should be noted that the encoding of the first face image can also be obtained by encoding the first face image using a facial muscle motion encoding model. The expression of the first face image can be an expression annotated by manual annotation of the first face image, or it can be an expression recognized by an expression recognition model.
[0075] In an optional embodiment, if the first expression is different from the expression corresponding to the target code, all first face images corresponding to the target code can be found in the face expression dataset. Then, the expressions of all first face images are voted on, and the expression with the most votes is taken as the actual expression of the target face image (i.e., the second expression mentioned above).
[0076] For example, suppose a face image A has a corresponding expression of sadness. If the first expression is determined to be sadness and the target encoding corresponds to happiness, then the first expression needs to be adjusted. We can obtain a face expression dataset and filter out all face images with AU encoding AU12 from this dataset, namely face images 1-10, with corresponding expressions of happiness, sadness, anger, sadness, happiness, sadness, sadness, sadness, surprise, and happiness. Therefore, we can determine that the second expression is sadness.
[0077] The above scheme simplifies the method of adjusting the first expression. By using the same AU code in the facial expression dataset for voting, the method of adjusting the first expression is reliable and has low risk.
[0078] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the number of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the maximum number as the second expression.
[0079] In an optional embodiment, in order to simplify the method of adjusting the first expression, the expressions of all first face images corresponding to the target encoding can be counted, the number of each type of expression can be determined, and the expression with the largest number can be determined as the second expression.
[0080] For example, suppose face image A has a corresponding expression of sadness. All face images selected with AU code AU12 are face images 1-10, with corresponding expressions of happiness, sadness, anger, sadness, happiness, sadness, sadness, sadness, surprise, and happiness. In this case, by counting, we can find that the number of happy expressions is 3, the number of sad expressions is 5, the number of angry expressions is 1, and the number of surprised expressions is 1. Therefore, we can determine that the expression with the largest number of expressions is sadness, and thus determine that the second expression is sadness.
[0081] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the score of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the highest score as the second expression.
[0082] In an optional embodiment, in order to simplify the adjustment method of the first expression, the expressions of all first face images corresponding to the target encoding can be counted, the number of each type of expression can be determined, and the weight values of different expressions can be combined to determine the score of each type of expression. Finally, the expression with the highest score can be determined as the second expression.
[0083] For example, suppose face image A has a corresponding sad expression. All face images selected with AU code AU12 are face images 1-10, with corresponding expressions of happy, sad, angry, sad, happy, sad, sad, sad, sad, surprised, and happy. Statistically, we can find that the number of happy expressions is 3, the number of sad expressions is 5, the number of angry expressions is 1, and the number of surprised expressions is 1. Further combining this with the weight values of each expression—happy expression with a weight of 0.3, sad expression with a weight of 0.4, angry expression with a weight of 0.1, and surprised expression with a weight of 0.1—we can determine the score for each expression: happy expression with a score of 0.9, sad expression with a score of 2, angry expression with a score of 0.1, and surprised expression with a score of 0.1. Therefore, we can determine that the expression with the highest score is sad, and thus, the second highest score expression is also sad.
[0084] In the above embodiments of this application, after determining the second expression, the method further includes: outputting the second expression; receiving a confirmation result corresponding to the second expression; and updating the second expression based on the confirmation result.
[0085] To ensure the accuracy of the second emoji, after the cloud server identifies the second emoji, it can send it to the user's computer terminal via the network and display it as shown in the image. Figure 3 The "Recognition Result Display" area of the interactive interface is shown. After viewing the second expression, the user can directly modify it within the interface to obtain the modified expression, which is the confirmation result mentioned above. After the user finishes modifying the expression, they can upload it to the cloud server via a computer terminal. The cloud server then adjusts the finalized expression based on the modified one, and further retrains the expression recognition model and facial muscle motion coding model based on the adjusted expression, thereby improving the performance of the cloud server.
[0086] In the above embodiments of this application, obtaining the first image set includes: obtaining multiple first face images; encoding the multiple first face images to obtain the codes corresponding to the multiple first face images; and recognizing the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0087] In one alternative embodiment, when it is necessary to adjust the first expression, multiple first face images can be acquired, and the AU encoding and expression of the first face images can be determined by using an AU network and an expression recognition model respectively.
[0088] It should be noted, but not limited to, that both facial expression datasets and historical facial images that have been identified using expression recognition models need to be encoded using an AU network to obtain AU codes. However, for facial expression datasets, since the expressions are manually labeled, there is no need to use an expression recognition model for identification.
[0089] In the above embodiments of this application, the method further includes: acquiring a second image set, wherein the second image set includes: multiple second face images and expressions corresponding to the multiple second face images; encoding the second image set to obtain the codes corresponding to the multiple second face images; and constructing a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0090] The second image set in the above steps can be the AU dataset, in which facial images can be annotated by experts to determine the corresponding expressions.
[0091] In one optional embodiment, for face images in the AU dataset, an AU network can be used for encoding to obtain corresponding AU codes. Further, statistics are performed on all face images in the AU dataset to determine the AU code corresponding to each expression. Based on the number of face images containing the same AU code, the importance of the AU code is determined, and a preset mapping relationship between AU codes and expressions is constructed, such as... Figure 4 As shown.
[0092] In the above embodiments of this application, obtaining the first expression corresponding to the target face image includes: using an expression recognition model to recognize the target face image to obtain the first expression.
[0093] The facial expression recognition model in the above steps can be a network pre-trained using a facial expression dataset. The specific structure of the network can be an existing structure or a specific structure constructed according to different recognition needs. This application does not make any specific limitations on this.
[0094] In one alternative embodiment, an expression recognition model can be trained in advance using a facial expression dataset and deployed on a server or client. After acquiring a target facial image, the expression recognition model can be used to obtain the expression of the target facial image (i.e., the first expression mentioned above).
[0095] In the above embodiments of this application, when multiple target face images are obtained, after adjusting the first expression to obtain the second expression of the target face image, the method further includes: constructing a training set based on the multiple target face images and the second expression of each target face image; and training an expression recognition model using the training set, wherein the expression recognition model is used to recognize face images to obtain the expression corresponding to the face image.
[0096] In one optional embodiment, when the target face image is a face image from a facial expression dataset, the expression labels of all face images in the dataset can be automatically corrected through iteration and learning to reduce the influence of noisy samples. After automatic correction is completed, the corrected facial expression dataset can be used as the final training set, and the expression recognition model can be trained using this training set to obtain an expression recognition model with high accuracy.
[0097] In the above embodiments of this application, after adjusting the first expression to obtain the second expression of the target face image, the expression of the target object corresponding to the target face image is adjusted based on the second expression.
[0098] The target object in the above steps can be the user who takes a picture of their face, or a virtual avatar in different fields, such as a virtual anchor in the field of e-commerce live streaming, or a virtual teacher in the field of education, but it is not limited to these.
[0099] In one alternative embodiment, after adjusting the first expression to obtain the second expression, the cloud server can perform expression control based on the second expression to adjust the current expression of the target object in real time.
[0100] For example, in the field of e-commerce live streaming, after determining the second expression, if the second expression of the anchor or virtual anchor is a negative expression such as sadness, such an expression may affect the viewing experience of the audience. Therefore, the anchor can be reminded to adjust the expression, or the virtual anchor's expression can be adjusted directly to ensure that the adjusted expression is a positive expression.
[0101] For example, in the field of education, after determining the second expression, if the teacher's or virtual teacher's second expression is a negative expression such as sadness, such an expression may affect the students' learning experience. Therefore, the teacher can be reminded to adjust the expression, or the virtual teacher's expression can be adjusted directly to ensure that the adjusted expression is a positive expression.
[0102] The following is combined with Figure 5 A preferred embodiment of this application will be described in detail below. For example... Figure 5 As shown, the execution flow of this method is as follows:
[0103] Step S51: For a face image that needs to be automatically corrected, features can be extracted by inputting it into the AU model and the face expression recognition model respectively. The AU model can output the AU code of the face image, and the face expression recognition model can output the expression of the face image, which is natural.
[0104] Optionally, the AU model processing can be divided into AU encoder and decoder, while the facial expression recognition model processing can be divided into vectorization and output.
[0105] Step S52 can be based on, for example Figure 4 The correspondence between AU codes and facial expressions shown indicates that the expression corresponding to the AU code output by the AU model is "happy".
[0106] Step S53: For face images whose AU-encoded expressions do not match the expression type output by the expression recognition model, the expression labels of face images with the same AU-encoded expressions can be found in the face expression dataset. For example, the label for image a is "happy", the label for image b is "natural", the label for image c is "happy", and the label for image d is "happy", etc.
[0107] In step S54, the expression labels of face images with the same AU can be used to vote, and the category with the most votes can be selected as the new label for face images whose AU-coded expressions do not match the expression type output by the expression recognition model.
[0108] It should be noted that for each face image in the facial expression dataset, through iteration and learning, it can correct samples with unreliable labels, thereby reducing the impact of noisy samples.
[0109] Through the above steps, the purpose of actively correcting facial expression labels during learning is achieved by using AU encoding. Voting among multiple samples with the same AU encoding improves the accuracy of label correction. Thus, deep learning is performed on the automatically corrected facial expression dataset, making the deep learning features more robust.
[0110] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0112] Example 2
[0113] According to an embodiment of this application, an image processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0114] Figure 6 This is a flowchart of a second image processing method according to an embodiment of this application. For example... Figure 6 As shown, the method may include the following steps:
[0115] Step S602: Obtain the target face image;
[0116] Step S604: Recognize the target face image to obtain the first expression corresponding to the target face image;
[0117] Step S606: Encode the target face image to obtain the target code corresponding to the target face image;
[0118] Step S608: If the first expression is different from the expression corresponding to the target encoding, the first expression is adjusted to obtain the second expression of the target face image.
[0119] In the above embodiments of this application, adjusting the first expression to obtain the second expression of the target face image includes: acquiring a first image set, wherein the first image set includes: multiple first face images, the codes of the multiple first face images and expressions; determining the code in the codes of the multiple first face images that is the same as the target code; acquiring at least one first face image corresponding to the code that is the same as the target code; and determining the second expression based on the expression corresponding to the at least one first face image.
[0120] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the number of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the maximum number as the second expression.
[0121] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the score of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the highest score as the second expression.
[0122] In the above embodiments of this application, after determining the second expression, the method further includes: outputting the second expression; receiving a confirmation result corresponding to the second expression; and updating the second expression based on the confirmation result.
[0123] In the above embodiments of this application, obtaining the first image set includes: obtaining multiple first face images; encoding the multiple first face images to obtain the codes corresponding to the multiple first face images; and recognizing the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0124] In the above embodiments of this application, the expression corresponding to the target code is determined based on a preset mapping relationship, wherein the preset mapping relationship is used to characterize the correspondence between the code and the expression.
[0125] In the above embodiments of this application, the method further includes: acquiring a second image set, wherein the second image set includes: multiple second face images and expressions corresponding to the multiple second face images; encoding the second image set to obtain the codes corresponding to the multiple second face images; and constructing a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0126] In the above embodiments of this application, an expression recognition model is used to identify the target face image to obtain a first expression.
[0127] In the above embodiments of this application, when multiple target face images are obtained, after adjusting the first expression to obtain the second expression of the target face image, the method further includes: constructing a training set based on the multiple target face images and the second expression of each target face image; and training an expression recognition model using the training set, wherein the expression recognition model is used to recognize face images to obtain the expression corresponding to the face image.
[0128] In the above embodiments of this application, after adjusting the first expression to obtain the second expression of the target face image, the expression of the target object corresponding to the target face image is adjusted based on the second expression.
[0129] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0130] Example 3
[0131] According to an embodiment of this application, an image processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0132] Figure 7 This is a flowchart of a third image processing method according to an embodiment of this application. Figure 7 As shown, the method may include the following steps:
[0133] Step S702: Display the target face image and the first expression corresponding to the target face image;
[0134] In one alternative embodiment, such as Figure 3 As shown, the target face image for which expression recognition is required can be displayed on the client's interactive interface, either the user-uploaded or selected image, or all face images from the acquired face expression dataset. Additionally, the target face image can be labeled using a first expression on the interactive interface.
[0135] Step S704: Encode the target face image to obtain the target code corresponding to the target face image;
[0136] Step S706: Display the second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target encoding.
[0137] In one alternative embodiment, such as Figure 3 As shown, the target face image can be re-labeled using a second emoticon on the client's interactive interface.
[0138] In the above embodiments of this application, adjusting the first expression includes: acquiring a first image set, wherein the first image set includes: multiple first face images, the encoding of the multiple first face images and expressions; determining the encoding of the multiple first face images that is the same as the target encoding; acquiring at least one first face image corresponding to the encoding that is the same as the target encoding; and determining a second expression based on the expression corresponding to the at least one first face image.
[0139] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the number of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the maximum number as the second expression.
[0140] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the score of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the highest score as the second expression.
[0141] In the above embodiments of this application, after displaying the second expression of the target face image, the method further includes: receiving a confirmation result corresponding to the second expression; and updating the second expression based on the confirmation result.
[0142] In the above embodiments of this application, obtaining the first image set includes: obtaining multiple first face images; encoding the multiple first face images to obtain the codes corresponding to the multiple first face images; and recognizing the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0143] In the above embodiments of this application, the expression corresponding to the target code is determined based on a preset mapping relationship, wherein the preset mapping relationship is used to characterize the correspondence between the code and the expression.
[0144] In the above embodiments of this application, the method further includes: acquiring a second image set, wherein the second image set includes: multiple second face images and expressions corresponding to the multiple second face images; encoding the second image set to obtain the codes corresponding to the multiple second face images; and constructing a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0145] In the above embodiments of this application, an expression recognition model is used to identify the target face image to obtain a first expression.
[0146] In the above embodiments of this application, when multiple target face images are obtained, the method further includes: constructing a training set based on the multiple target face images and the second expression of each target face image; and training an expression recognition model using the training set, wherein the expression recognition model is used to recognize face images to obtain the expression corresponding to the face image.
[0147] In the above embodiments of this application, after displaying the second expression of the target face image, the expression of the target object corresponding to the target face image is adjusted based on the second expression.
[0148] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0149] Example 4
[0150] According to an embodiment of this application, an image processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0151] Figure 8 This is a flowchart of a fourth image processing method according to an embodiment of this application. Figure 8 As shown, the method may include the following steps:
[0152] Step S802: Obtain the target face image.
[0153] The target face image in the above steps can be the face image of the user captured by the face attendance machine when the user is clocking in and out.
[0154] In one alternative embodiment, in order to reduce the computational load of the facial recognition attendance machine, after capturing a facial image, the machine can upload it to a cloud server via the network for recognition.
[0155] Step S804: Recognize the target face image to obtain the first expression corresponding to the target face image.
[0156] In one alternative embodiment, after receiving a face image, the cloud server can use a pre-trained expression recognition model to recognize the face image and identify the user's expression (i.e., the first expression mentioned above) in the face image.
[0157] Step S806: Encode the target face image to obtain the target code corresponding to the target face image.
[0158] In one alternative embodiment, after receiving a face image, the cloud server can process the face image using a pre-trained face muscle motion coding model to obtain the corresponding AU code (i.e., the target code mentioned above).
[0159] Step S808: If the first expression is different from the expression corresponding to the target encoding, the first expression is adjusted to obtain the second expression of the target face image.
[0160] In one optional embodiment, the cloud server can compare the identified user expression with the reference expression corresponding to the AU code. If the two expressions are different, it is determined that the first expression needs to be adjusted, and the adjusted second expression can be used as the user's actual expression.
[0161] Step S810: Based on the second expression, determine the attendance result of the target face image.
[0162] In one optional embodiment, after identifying a relatively accurate second expression, the second expression can be compared with a preset expression. This preset expression can be a pre-defined fixed expression or an expression randomly assigned before capturing the user's facial image. If the second expression matches the preset expression, the user's attendance is considered successful; otherwise, the user's attendance is considered unsuccessful.
[0163] In the above embodiments of this application, adjusting the first expression includes: acquiring a first image set, wherein the first image set includes: multiple first face images, the encoding of the multiple first face images and expressions; determining the encoding of the multiple first face images that is the same as the target encoding; acquiring at least one first face image corresponding to the encoding that is the same as the target encoding; and determining a second expression based on the expression corresponding to the at least one first face image.
[0164] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the number of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the maximum number as the second expression.
[0165] In the above embodiments of this application, determining the second expression based on the expression corresponding to at least one first face image includes: determining the score of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the highest score as the second expression.
[0166] In the above embodiments of this application, after determining the second expression, the method further includes: outputting the second expression; receiving a confirmation result corresponding to the second expression; and updating the second expression based on the confirmation result.
[0167] In the above embodiments of this application, obtaining the first image set includes: obtaining multiple first face images; encoding the multiple first face images to obtain the codes corresponding to the multiple first face images; and recognizing the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0168] In the above embodiments of this application, the expression corresponding to the target code is determined based on a preset mapping relationship, wherein the preset mapping relationship is used to characterize the correspondence between the code and the expression.
[0169] In the above embodiments of this application, the method further includes: acquiring a second image set, wherein the second image set includes: multiple second face images and expressions corresponding to the multiple second face images; encoding the second image set to obtain the codes corresponding to the multiple second face images; and constructing a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0170] In the above embodiments of this application, an expression recognition model is used to identify the target face image to obtain a first expression.
[0171] In the above embodiments of this application, when multiple target face images are obtained, the method further includes: constructing a training set based on the multiple target face images and the second expression of each target face image; and training an expression recognition model using the training set, wherein the expression recognition model is used to recognize face images to obtain the expression corresponding to the face image.
[0172] In the above embodiments of this application, before acquiring the target face image, a first prompt message is output, wherein the first prompt message is used to prompt a preset expression.
[0173] The preset expression in the above steps can be a fixed expression that has been set in advance, such as happiness, or it can be an expression that is randomly determined from different expressions, such as happiness, sadness, excitement, anger, etc.
[0174] In one alternative embodiment, to help users determine what expression to make, the facial recognition attendance machine can output a first prompt message through text display or voice broadcast. For example, the facial recognition attendance machine can display the first prompt message "Please make a happy expression", but it is not limited to this.
[0175] In the above embodiments of this application, when the second expression is different from the preset expression, a third prompt message is output, wherein the second prompt message is used to prompt the adjustment of the expression of the target face image.
[0176] In one optional embodiment, when the system detects that the user's current expression is inconsistent with the required expression (i.e., the preset expression mentioned above), in order to avoid attendance failure, the facial recognition attendance machine can output a second prompt message through text display or voice broadcast. For example, the facial recognition attendance machine can display the second prompt message "Please make a happy expression again," but it is not limited to this, so that the user can adjust their expression.
[0177] In the above embodiments of this application, after adjusting the first expression to obtain the second expression of the target face image, the method further includes: determining the score of the second expression based on the second expression; and outputting the score of the second expression.
[0178] In one alternative embodiment, after recognizing the face image, the cloud server can combine the weight value of the second expression to determine the score of the second expression, and then the face attendance machine can output the score of the second expression through text display or voice broadcast.
[0179] In the above embodiments of this application, after determining the score of the second expression based on the second expression, a third prompt message is output, wherein the third prompt message corresponds to the score of the second expression.
[0180] In one optional embodiment, after determining the score of the second expression, the cloud server can remind the user based on the score. For example, the aforementioned third prompt message could be "You're having a great day, keep it up!" or "A wonderful day has begun, remember to smile!", but it is not limited to these. Furthermore, the facial recognition attendance machine can output the third prompt message through text display or voice broadcast.
[0181] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0182] Example 5
[0183] According to embodiments of this application, an image processing apparatus for implementing the above-described image processing method is also provided, such as... Figure 9 As shown, the device 900 includes: an acquisition module 902, an encoding module 904, and an adjustment module 906.
[0184] The acquisition module 902 is used to acquire a target face image and a first expression corresponding to the target face image; the encoding module 904 is used to encode the target face image to obtain a target code corresponding to the target face image; and the adjustment module 906 is used to adjust the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image.
[0185] It should be noted that the acquisition module 902, encoding module 904, and adjustment module 906 mentioned above correspond to steps S202 to S206 in Embodiment 1. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0186] In the above embodiments of this application, the adjustment module includes: a first acquisition unit, a first determination unit, a second acquisition unit, and a second determination unit.
[0187] The first acquisition unit is used to acquire a first image set, wherein the first image set includes: multiple first face images, the codes of the multiple first face images and expressions; the first determination unit is used to determine the code in the codes of the multiple first face images that is the same as the target code; the second acquisition unit is used to acquire at least one first face image corresponding to the code that is the same as the target code; the second determination unit is used to determine a second expression based on the expression corresponding to the at least one first face image.
[0188] In the above embodiments of this application, the second determining unit is further configured to determine the number of each expression in the expressions corresponding to at least one first face image, and determine the expression corresponding to the maximum number as the second expression.
[0189] In the above embodiments of this application, the second determining unit is further configured to determine the score of each expression in at least one first face image, and determine the expression corresponding to the highest score as the second expression.
[0190] In the above embodiments of this application, the device further includes an output module, a receiving module, and an update module.
[0191] The output module is used to output the second emoticon; the receiving module is used to receive the confirmation result corresponding to the second emoticon; and the update module is used to update the second emoticon based on the confirmation result.
[0192] In the above embodiments of this application, the first acquisition unit includes: an acquisition subunit, an encoding subunit, and an identification subunit.
[0193] The acquisition subunit is used to acquire multiple first face images; the encoding subunit is used to encode the multiple first face images to obtain the codes corresponding to the multiple first face images; and the recognition subunit is used to recognize the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0194] In the above embodiments of this application, the device further includes a determining module.
[0195] The determination module is used to determine the expression corresponding to the target code based on a preset mapping relationship, wherein the preset mapping relationship is used to represent the correspondence between the code and the expression.
[0196] In the above embodiments of this application, the device further includes: a first construction module.
[0197] The acquisition module is further used to acquire a second image set, which includes multiple second face images and expressions corresponding to the multiple second face images; the encoding module is further used to encode the second image set to obtain the codes corresponding to the multiple second face images; and the first construction module is used to construct a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0198] In the above embodiments of this application, the acquisition module includes: an identification unit.
[0199] The recognition unit is used to identify the target face image using an expression recognition model to obtain the first expression.
[0200] In the above embodiments of this application, when multiple target face images are acquired, the device further includes: a second construction module and a training module.
[0201] The second construction module is used to construct a training set based on multiple target face images and the second expression of each target face image; the training module is used to train the expression recognition model using the training set, wherein the expression recognition model is used to recognize face images and obtain the expression corresponding to the face image.
[0202] In the above embodiments of this application, the adjustment module is further configured to adjust the expression of the target object corresponding to the target face image based on the second expression.
[0203] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0204] Example 6
[0205] According to embodiments of this application, an image processing apparatus for implementing the above-described image processing method is also provided, such as... Figure 10 As shown, the device 1000 includes: an acquisition module 1002, an identification module 1004, an encoding module 1006, and an adjustment module 1008.
[0206] The acquisition module 1002 is used to acquire a target face image; the recognition module 1004 is used to recognize the target face image to obtain a first expression corresponding to the target face image; the encoding module 1006 is used to encode the target face image to obtain a target code corresponding to the target face image; and the adjustment module 1008 is used to adjust the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image.
[0207] It should be noted that the acquisition module 1002, identification module 1004, encoding module 1006, and adjustment module 1008 mentioned above correspond to steps S602 to S608 in Embodiment 2. The four modules and their corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0208] In the above embodiments of this application, the adjustment module includes: a first acquisition unit, a first determination unit, a second acquisition unit, and a second determination unit.
[0209] The first acquisition unit is used to acquire a first image set, wherein the first image set includes: multiple first face images, the codes of the multiple first face images and expressions; the first determination unit is used to determine the code in the codes of the multiple first face images that is the same as the target code; the second acquisition unit is used to acquire at least one first face image corresponding to the code that is the same as the target code; the second determination unit is used to determine a second expression based on the expression corresponding to the at least one first face image.
[0210] In the above embodiments of this application, the second determining unit is further configured to determine the number of each expression in the expressions corresponding to at least one first face image, and determine the expression corresponding to the maximum number as the second expression.
[0211] In the above embodiments of this application, the second determining unit is further configured to determine the score of each expression in at least one first face image, and determine the expression corresponding to the highest score as the second expression.
[0212] In the above embodiments of this application, the device further includes an output module, a receiving module, and an update module.
[0213] The output module is used to output the second emoticon; the receiving module is used to receive the confirmation result corresponding to the second emoticon; and the update module is used to update the second emoticon based on the confirmation result.
[0214] In the above embodiments of this application, the first acquisition unit includes: an acquisition subunit, an encoding subunit, and an identification subunit.
[0215] The acquisition subunit is used to acquire multiple first face images; the encoding subunit is used to encode the multiple first face images to obtain the codes corresponding to the multiple first face images; and the recognition subunit is used to recognize the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0216] In the above embodiments of this application, the device further includes a determining module.
[0217] The determination module is used to determine the expression corresponding to the target code based on a preset mapping relationship, wherein the preset mapping relationship is used to represent the correspondence between the code and the expression.
[0218] In the above embodiments of this application, the device further includes: a first construction module.
[0219] The acquisition module is further used to acquire a second image set, which includes multiple second face images and expressions corresponding to the multiple second face images; the encoding module is further used to encode the second image set to obtain the codes corresponding to the multiple second face images; and the first construction module is used to construct a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0220] In the above embodiments of this application, the recognition module is further configured to use an expression recognition model to recognize the target face image and obtain a first expression.
[0221] In the above embodiments of this application, when multiple target face images are acquired, the device further includes: a second construction module and a training module.
[0222] The second construction module is used to construct a training set based on multiple target face images and the second expression of each target face image; the training module is used to train the expression recognition model using the training set, wherein the expression recognition model is used to recognize face images and obtain the expression corresponding to the face image.
[0223] In the above embodiments of this application, the adjustment module is further configured to adjust the expression of the target object corresponding to the target face image based on the second expression.
[0224] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0225] Example 7
[0226] According to embodiments of this application, an image processing apparatus for implementing the above-described image processing method is also provided, such as... Figure 11 As shown, the device 1100 includes: a first display module 1102, an encoding module 1104, and a second display module 1106.
[0227] The first display module 1102 is used to display a target face image and a first expression corresponding to the target face image; the encoding module 1104 is used to encode the target face image to obtain a target code corresponding to the target face image; the second display module 1106 is used to display a second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target code.
[0228] It should be noted that the first display module 1102, encoding module 1104, and second display module 1106 mentioned above correspond to steps S702 to S706 in Embodiment 3. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0229] In the above embodiments of this application, the device further includes: a first acquisition module, a first determination module, a second acquisition module, and a second determination module.
[0230] The first acquisition module is used to acquire a first image set, which includes: multiple first face images, the codes of the multiple first face images, and expressions; the first determination module is used to determine the code in the codes of the multiple first face images that is the same as the target code; the second acquisition module is used to acquire at least one first face image corresponding to the code that is the same as the target code; and the second determination module is used to determine a second expression based on the expression corresponding to the at least one first face image.
[0231] In the above embodiments of this application, the second determining module is further configured to determine the number of each expression in the expressions corresponding to at least one first face image, and determine the expression corresponding to the maximum number as the second expression.
[0232] In the above embodiments of this application, the second determining module is further configured to determine the score of each expression in at least one first face image, and determine the expression corresponding to the highest score as the second expression.
[0233] In the above embodiments of this application, the device further includes a receiving module and an updating module.
[0234] The receiving module is used to receive the confirmation result corresponding to the second emoticon; the updating module is used to update the second emoticon based on the confirmation result.
[0235] In the above embodiments of this application, the first acquisition module includes: an acquisition unit, an encoding unit, and an identification unit.
[0236] The acquisition unit is used to acquire multiple first face images; the encoding unit is used to encode the multiple first face images to obtain the codes corresponding to the multiple first face images; and the recognition unit is used to recognize the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0237] In the above embodiments of this application, the device further includes: a third determining module.
[0238] The third determining module is used to determine the expression corresponding to the target code based on a preset mapping relationship, wherein the preset mapping relationship is used to represent the correspondence between the code and the expression.
[0239] In the above embodiments of this application, the device further includes: a third acquisition module and a first construction module.
[0240] The third acquisition module is used to acquire a second image set, which includes multiple second face images and expressions corresponding to the multiple second face images; the encoding module is also used to encode the second image set to obtain the codes corresponding to the multiple second face images; the first construction module is used to construct a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0241] In the above embodiments of this application, the device further includes an identification module.
[0242] The recognition module is used to identify the target face image using an expression recognition model to obtain the first expression.
[0243] In the above embodiments of this application, when multiple target face images are acquired, the device further includes: a second construction module and a training module.
[0244] The second construction module is used to construct a training set based on multiple target face images and the second expression of each target face image; the training module is used to train the expression recognition model using the training set, wherein the expression recognition model is used to recognize face images and obtain the expression corresponding to the face image.
[0245] In the above embodiments of this application, the device further includes an adjustment module.
[0246] The adjustment module is used to adjust the expression of the target object corresponding to the target face image based on the second expression.
[0247] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0248] Example 8
[0249] According to embodiments of this application, an image processing apparatus for implementing the above-described image processing method is also provided, such as... Figure 12 As shown, the device 1200 includes: an acquisition module 1202, an identification module 1204, an encoding module 1206, an adjustment module 1208, and a determination module 1210.
[0250] The acquisition module 1202 is used to acquire a target face image; the recognition module 1204 is used to recognize the target face image to obtain a first expression corresponding to the target face image; the encoding module 1206 is used to encode the face image to obtain a target code corresponding to the target face image; the adjustment module 1208 is used to adjust the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image; and the determination module 1210 is used to determine the attendance result of the target face image based on the second expression.
[0251] It should be noted that the acquisition module 1202, identification module 1204, encoding module 1206, adjustment module 1208, and determination module 1210 mentioned above correspond to steps S802 to S810 in Embodiment 4. The five modules and their corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0252] In the above embodiments of this application, the adjustment module includes: a first acquisition unit, a first determination unit, a second acquisition unit, and a second determination unit.
[0253] The first acquisition unit is used to acquire a first image set, wherein the first image set includes: multiple first face images, the codes of the multiple first face images and expressions; the first determination unit is used to determine the code in the codes of the multiple first face images that is the same as the target code; the second acquisition unit is used to acquire at least one first face image corresponding to the code that is the same as the target code; the second determination unit is used to determine a second expression based on the expression corresponding to the at least one first face image.
[0254] In the above embodiments of this application, the second determining unit is further configured to determine the number of each expression in the expressions corresponding to at least one first face image, and determine the expression corresponding to the maximum number as the second expression.
[0255] In the above embodiments of this application, the second determining unit is further configured to determine the score of each expression in at least one first face image, and determine the expression corresponding to the highest score as the second expression.
[0256] In the above embodiments of this application, the device further includes an output module, a receiving module, and an update module.
[0257] The output module is used to output the second emoticon; the receiving module is used to receive the confirmation result corresponding to the second emoticon; and the update module is used to update the second emoticon based on the confirmation result.
[0258] In the above embodiments of this application, the first acquisition unit includes: an acquisition subunit, an encoding subunit, and an identification subunit.
[0259] The acquisition subunit is used to acquire multiple first face images; the encoding subunit is used to encode the multiple first face images to obtain the codes corresponding to the multiple first face images; and the recognition subunit is used to recognize the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0260] In the above embodiments of this application, the device further includes a determining module.
[0261] The determination module is used to determine the expression corresponding to the target code based on a preset mapping relationship, wherein the preset mapping relationship is used to represent the correspondence between the code and the expression.
[0262] In the above embodiments of this application, the device further includes: a first construction module.
[0263] The acquisition module is further used to acquire a second image set, which includes multiple second face images and expressions corresponding to the multiple second face images; the encoding module is further used to encode the second image set to obtain the codes corresponding to the multiple second face images; and the first construction module is used to construct a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0264] In the above embodiments of this application, the recognition module is further configured to use an expression recognition model to recognize the target face image and obtain a first expression.
[0265] In the above embodiments of this application, when multiple target face images are acquired, the device further includes: a second construction module and a training module.
[0266] The second construction module is used to construct a training set based on multiple target face images and the second expression of each target face image; the training module is used to train the expression recognition model using the training set, wherein the expression recognition model is used to recognize face images and obtain the expression corresponding to the face image.
[0267] In the above embodiments of this application, the determining module includes: a comparison unit, a third determining unit, and a fourth determining unit.
[0268] The comparison unit is used to compare the second expression with the preset expression; the third determination unit is used to determine the attendance result as successful if the second expression is the same as the preset expression; and the fourth determination unit is used to determine the attendance result as failed if the second expression is different from the preset expression.
[0269] In the above embodiments of this application, the device further includes an output module.
[0270] The output module is used to output the first prompt information, which is used to prompt the preset emoticon.
[0271] In the above embodiments of this application, the device further includes an output module.
[0272] The output module is used to output a third prompt message when the second expression is different from the preset expression. The second prompt message is used to prompt the adjustment of the expression of the target face image.
[0273] In the above embodiments of this application, the device further includes an output module.
[0274] The determination module is also used to determine the score of the second expression based on the second expression; the output module is used to output the score of the second expression.
[0275] In the above embodiments of this application, the output module is further configured to output third prompt information, wherein the third prompt information corresponds to the score of the second expression.
[0276] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0277] Example 9
[0278] According to an embodiment of this application, an image processing system is also provided, comprising:
[0279] Processor; and
[0280] The memory, connected to the processor, is used to provide the processor with instructions to perform the following processing steps: acquiring a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image if the first expression is different from the expression corresponding to the target code.
[0281] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0282] Example 10
[0283] Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced by a mobile terminal or other terminal device.
[0284] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0285] In this embodiment, the computer terminal described above can execute the program code for the following steps in the image processing method: acquiring a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image when the first expression is different from the expression corresponding to the target code.
[0286] Optionally, Figure 13 This is a structural block diagram of a computer terminal according to an embodiment of this application. Figure 13 As shown, the computer terminal A may include one or more (only one is shown in the figure) processors 1302 and memory 1304.
[0287] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the image processing method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned image processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0288] The processor can call the information and application program stored in the memory through the transmission device to perform the following steps: acquire a target face image and a first expression corresponding to the target face image; encode the target face image to obtain a target code corresponding to the target face image; if the first expression is different from the expression corresponding to the target code, adjust the first expression to obtain a second expression of the target face image.
[0289] Optionally, the processor may also execute program code for the following steps: acquiring a first image set, wherein the first image set includes: multiple first face images, the encoding of the multiple first face images and their expressions; determining the encoding of the multiple first face images that is the same as the target encoding; acquiring at least one first face image corresponding to the encoding that is the same as the target encoding; and determining a second expression based on the expression corresponding to the at least one first face image.
[0290] Optionally, the processor may also execute program code that performs the following steps: determining a second expression based on the expression corresponding to at least one first face image, including: determining the number of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the maximum number as the second expression.
[0291] Optionally, the processor may also execute program code that performs the following steps: determining a second expression based on the expression corresponding to at least one first face image, including: determining the score of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the highest score as the second expression.
[0292] Optionally, the processor may also execute program code that performs the following steps: outputs a second emoticon; receives a confirmation result corresponding to the second emoticon; and updates the second emoticon based on the confirmation result.
[0293] Optionally, the processor may also execute program code that performs the following steps: acquiring multiple first face images; encoding the multiple first face images to obtain the codes corresponding to the multiple first face images; and recognizing the multiple first face images to obtain the expressions corresponding to the multiple first face images.
[0294] Optionally, the processor may also execute program code that performs the following steps: determining the expression corresponding to the target code based on a preset mapping relationship, wherein the preset mapping relationship is used to characterize the correspondence between the code and the expression.
[0295] Optionally, the processor may also execute program code for the following steps: acquiring a second image set, wherein the second image set includes: multiple second face images and expressions corresponding to the multiple second face images; encoding the second image set to obtain the codes corresponding to the multiple second face images; and constructing a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0296] Optionally, the processor may also execute program code that performs the following steps: using an expression recognition model to recognize the target face image and obtain a first expression.
[0297] Optionally, the processor may also execute program code for the following steps: when multiple target face images are acquired, a training set is constructed based on the multiple target face images and the second expression of each target face image; the expression recognition model is trained using the training set, wherein the expression recognition model is used to recognize face images and obtain the expression corresponding to the face image.
[0298] Optionally, the processor may also execute program code that performs the following steps: after adjusting the first expression to obtain the second expression of the target face image, adjust the expression of the target object corresponding to the target face image based on the second expression.
[0299] The processor can access the information and application program stored in the memory via the transmission device to perform the following steps: acquiring a target face image; recognizing the target face image to obtain a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression if the first expression differs from the expression corresponding to the target code to obtain a second expression of the target face image.
[0300] The processor can call the information and application program stored in the memory through the transmission device to perform the following steps: displaying a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; displaying a second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target code.
[0301] The processor can access the information and application program stored in the memory via the transmission device to perform the following steps: acquire a target face image; recognize the target face image to obtain a first expression corresponding to the target face image; encode the target face image to obtain a target code corresponding to the target face image; if the first expression is different from the expression corresponding to the target code, adjust the first expression to obtain a second expression of the target face image; and determine the attendance result of the target face image based on the second expression.
[0302] Optionally, the processor may also execute program code that performs the following steps: comparing the second emoticon with a preset emoticon; if the second emoticon is the same as the preset emoticon, determining the attendance result as successful; if the second emoticon is different from the preset emoticon, determining the attendance result as failed.
[0303] Optionally, the processor may also execute program code that performs the following steps: before acquiring the target face image, outputting a first prompt message, wherein the first prompt message is used to prompt a preset expression.
[0304] Optionally, the processor may also execute program code that performs the following steps: if the second expression differs from the preset expression, outputting a third prompt message, wherein the second prompt message is used to prompt adjustment of the expression of the target face image.
[0305] Optionally, the processor may also execute program code that performs the following steps: after adjusting the first expression to obtain the second expression of the target face image, determining the score of the second expression based on the second expression; and outputting the score of the second expression.
[0306] Optionally, the processor may also execute program code that performs the following steps: after determining the score of the second expression based on the second expression, outputting a third prompt message, wherein the third prompt message corresponds to the score of the second expression.
[0307] This application provides a scheme for automatic facial expression correction. By encoding the expression corresponding to the target, it is possible to accurately determine whether there is an error in the first expression and automatically correct it, thereby improving the accuracy of the first expression judgment and thus enhancing the accuracy of facial expression recognition in facial images. This solves the technical problem of low accuracy in facial expression recognition by image processing methods in related technologies.
[0308] Those skilled in the art will understand that Figure 13 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Figure 13 This does not limit the structure of the aforementioned electronic device. For example, computer terminal A may also include components that are more... Figure 13 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 13 The different configurations shown.
[0309] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0310] Example 11
[0311] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the image processing method provided in the above embodiments.
[0312] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0313] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image if the first expression is different from the expression corresponding to the target code.
[0314] Optionally, the storage medium is further configured to store program code for performing the following steps: acquiring a first image set, wherein the first image set includes: multiple first face images, encodings of the multiple first face images, and expressions; determining an encoding in the multiple first face images that is identical to a target encoding; acquiring at least one first face image corresponding to an encoding identical to the target encoding; and determining a second expression based on the expression corresponding to the at least one first face image.
[0315] Optionally, the storage medium is further configured to store program code for performing the following steps: determining a second expression based on the expression corresponding to at least one first face image includes: determining the number of each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the maximum number as the second expression.
[0316] Optionally, the storage medium is further configured to store program code for performing the following steps: determining a second expression based on the expression corresponding to at least one first face image includes: determining a score for each expression among the expressions corresponding to at least one first face image; and determining the expression corresponding to the highest score as the second expression.
[0317] Optionally, the processor may also execute program code that performs the following steps: outputs a second emoticon; receives a confirmation result corresponding to the second emoticon; and updates the second emoticon based on the confirmation result.
[0318] Optionally, the aforementioned storage medium is further configured to store program code for performing the following steps: acquiring multiple first face images; encoding the multiple first face images to obtain codes corresponding to the multiple first face images; and recognizing the multiple first face images to obtain expressions corresponding to the multiple first face images.
[0319] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: determining the expression corresponding to the target code based on a preset mapping relationship, wherein the preset mapping relationship is used to characterize the correspondence between the code and the expression.
[0320] Optionally, the aforementioned storage medium is further configured to store program code for performing the following steps: obtaining a second image set, wherein the second image set includes: multiple second face images and expressions corresponding to the multiple second face images; encoding the second image set to obtain the codes corresponding to the multiple second face images; and constructing a preset mapping relationship based on the expressions and codes corresponding to the multiple second face images.
[0321] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: recognizing the target face image using an expression recognition model to obtain a first expression.
[0322] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: when multiple target face images are acquired, constructing a training set based on the multiple target face images and the second expression of each target face image; training an expression recognition model using the training set, wherein the expression recognition model is used to recognize face images and obtain the expression corresponding to the face image.
[0323] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: after adjusting the first expression to obtain the second expression of the target face image, adjusting the expression of the target object corresponding to the target face image based on the second expression.
[0324] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a target face image; recognizing the target face image to obtain a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image if the first expression is different from the expression corresponding to the target code.
[0325] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: displaying a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and displaying a second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target code.
[0326] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a target face image; recognizing the target face image to obtain a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; adjusting the first expression when the first expression is different from the expression corresponding to the target code to obtain a second expression of the target face image; and determining the attendance result of the target face image based on the second expression.
[0327] Optionally, the storage medium is also configured to store program code for performing the following steps: comparing a second emoticon with a preset emoticon; if the second emoticon is the same as the preset emoticon, determining the attendance result as successful; if the second emoticon is different from the preset emoticon, determining the attendance result as failed.
[0328] Optionally, the storage medium is also configured to store program code for performing the following steps: before acquiring the target face image, outputting a first prompt message, wherein the first prompt message is used to prompt a preset expression.
[0329] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: if the second expression differs from the preset expression, outputting a third prompt message, wherein the second prompt message is used to prompt adjustment of the expression of the target face image.
[0330] Optionally, the storage medium is also configured to store program code for performing the following steps: after adjusting the first expression to obtain a second expression of the target face image, determining a score for the second expression based on the second expression; and outputting the score of the second expression.
[0331] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: after determining the score of the second expression based on the second expression, outputting a third prompt message, wherein the third prompt message corresponds to the score of the second expression.
[0332] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0333] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0334] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0335] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0336] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0337] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0338] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. An image processing method, characterized in that, include: Acquire a target face image and the first expression corresponding to the target face image; The target face image is encoded to obtain the target code corresponding to the target face image; If the first expression is different from the expression corresponding to the target code, the first expression is adjusted to obtain the second expression of the target face image. The second expression is determined by the expression of at least one first face image with the same code as the target code. The second expression is used to represent the actual expression of the target face image. The method further includes: outputting the second emoticon; receiving a confirmation result corresponding to the second emoticon; and updating the second emoticon based on the confirmation result; The method further includes: after adjusting the first expression to obtain the second expression of the target face image, adjusting the expression of the target object corresponding to the target face image based on the second expression.
2. The method according to claim 1, characterized in that, Adjusting the first expression to obtain the second expression of the target face image includes: Obtain a first image set, wherein the first image set includes: multiple first face images, the encoding of the multiple first face images, and expressions; Determine the encoding of the plurality of first face images that is identical to the target encoding; Obtain at least one first face image corresponding to the same encoding as the target encoding; The second expression is determined based on the expression corresponding to the at least one first face image.
3. The method according to claim 2, characterized in that, Based on the expression corresponding to the at least one first facial image, the second expression is determined to include: Determine the score for each expression among the expressions corresponding to the at least one first face image; The emoji corresponding to the highest score is determined to be the second emoji.
4. The method according to claim 1 or 3, characterized in that, After determining the second expression, the method further includes: Output the second emoticon; Receive the confirmation result corresponding to the second emoticon; The second emoticon is updated based on the confirmation result.
5. The method according to claim 2, characterized in that, Obtaining the first image set includes: Obtain the multiple first face images; The plurality of first face images are encoded to obtain the codes corresponding to the plurality of first face images; The expressions corresponding to the multiple first face images are obtained by recognizing the multiple first face images.
6. The method according to claim 1, characterized in that, Based on a preset mapping relationship, the expression corresponding to the target code is determined, wherein the preset mapping relationship is used to characterize the correspondence between the code and the expression.
7. The method according to claim 6, characterized in that, The method further includes: Obtain a second image set, wherein the second image set includes: multiple second face images, and expressions corresponding to the multiple second face images; The second image set is encoded to obtain the codes corresponding to the multiple second face images; Based on the expressions and codes corresponding to the multiple second face images, the preset mapping relationship is constructed.
8. The method according to claim 1, characterized in that, When multiple target face images are acquired, after adjusting the first expression to obtain the second expression of the target face images, the method further includes: A training set is constructed based on the multiple target face images and the second expression of each target face image; The expression recognition model is trained using a training set, wherein the expression recognition model is used to recognize facial images and obtain the expression corresponding to the facial images.
9. An image processing method, characterized in that, include: Acquire the target face image; The target face image is identified to obtain the first expression corresponding to the target face image; The target face image is encoded to obtain the target code corresponding to the target face image; If the first expression is different from the expression corresponding to the target code, the first expression is adjusted to obtain the second expression of the target face image. The second expression is determined by the expression of at least one first face image with the same code as the target code. The second expression is used to represent the actual expression of the target face image. The method further includes: outputting the second emoticon; receiving a confirmation result corresponding to the second emoticon; and updating the second emoticon based on the confirmation result; The method further includes: after adjusting the first expression to obtain the second expression of the target face image, adjusting the expression of the target object corresponding to the target face image based on the second expression.
10. An image processing method, characterized in that, include: Display the target face image and the first expression corresponding to the target face image; The target face image is encoded to obtain the target code corresponding to the target face image; The second expression of the target face image is displayed, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target code, wherein the second expression is determined by the expression of at least one first face image with the same code as the target code, and the second expression is used to represent the actual expression of the target face image; The method further includes: receiving a confirmation result corresponding to the second emoticon; and updating the second emoticon based on the confirmation result; The method further includes: after adjusting the first expression to obtain the second expression of the target face image, adjusting the expression of the target object corresponding to the target face image based on the second expression.
11. An image processing method, characterized in that, include: Acquire the target face image; The target face image is identified to obtain the first expression corresponding to the target face image; The target face image is encoded to obtain the target code corresponding to the target face image; If the first expression is different from the expression corresponding to the target code, the first expression is adjusted to obtain the second expression of the target face image. The second expression is determined by the expression of at least one first face image with the same code as the target code. The second expression is used to represent the actual expression of the target face image. Based on the second expression, the attendance result of the target face image is determined; The method further includes: outputting the second emoticon; receiving a confirmation result corresponding to the second emoticon; and updating the second emoticon based on the confirmation result; The method further includes: after adjusting the first expression to obtain the second expression of the target face image, adjusting the expression of the target object corresponding to the target face image based on the second expression.
12. The method according to claim 11, characterized in that, Based on the second expression, the attendance result of the target face image is determined as follows: Compare the second emoticon with the preset emoticon; If the second emoticon is the same as the preset emoticon, the attendance result is determined to be successful. If the second emoticon is different from the preset emoticon, the attendance result is determined to be an attendance failure.
13. The method according to claim 12, characterized in that, Before acquiring the target face image, a first prompt message is output, wherein the first prompt message is used to prompt the preset expression.
14. The method according to claim 12, characterized in that, If the second expression differs from the preset expression, a second prompt message is output, wherein the second prompt message is used to prompt adjustment of the expression of the target face image.
15. The method according to claim 11, characterized in that, After adjusting the first expression to obtain the second expression of the target face image, the method further includes: Based on the second expression, determine the score for the second expression; Output the score for the second expression.
16. The method according to claim 15, characterized in that, After determining the score of the second expression based on the second expression, a third prompt message is output, wherein the third prompt message corresponds to the score of the second expression.
17. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire a target face image and a first expression corresponding to the target face image; An encoding module is used to encode the target face image to obtain a target code corresponding to the target face image; An adjustment module is used to adjust the first expression when the first expression is different from the expression corresponding to the target code, so as to obtain a second expression of the target face image. The second expression is determined by the expression of at least one first face image with the same code as the target code. The second expression is used to represent the actual expression of the target face image. The device further includes: an output module for outputting the second emoticon; a receiving module for receiving a confirmation result corresponding to the second emoticon; and an update module for updating the second emoticon based on the confirmation result. The adjustment module is further configured to: after adjusting the first expression to obtain the second expression of the target face image, adjust the expression of the target object corresponding to the target face image based on the second expression.
18. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire the target face image; The recognition module is used to recognize the target face image and obtain the first expression corresponding to the target face image; An encoding module is used to encode the target face image to obtain a target code corresponding to the target face image; An adjustment module is used to adjust the first expression when the first expression is different from the expression corresponding to the target code, so as to obtain a second expression of the target face image. The second expression is determined by the expression of at least one first face image with the same code as the target code. The second expression is used to represent the actual expression of the target face image. The device further includes: an output module for outputting the second emoticon; a receiving module for receiving a confirmation result corresponding to the second emoticon; and an update module for updating the second emoticon based on the confirmation result. The adjustment module is further configured to: after adjusting the first expression to obtain the second expression of the target face image, adjust the expression of the target object corresponding to the target face image based on the second expression.
19. An image processing apparatus, characterized in that, include: The first display module is used to display a target face image and a first expression corresponding to the target face image; An encoding module is used to encode the target face image to obtain a target code corresponding to the target face image; The second display module is used to display a second expression of the target face image, wherein the second expression is an expression obtained by adjusting the first expression when the first expression is different from the expression corresponding to the target code, wherein the second expression is determined by the expression of at least one first face image with the same code as the target code, and the second expression is used to characterize the actual expression of the target face image; The device further includes: an output module for outputting the second emoticon; a receiving module for receiving a confirmation result corresponding to the second emoticon; and an update module for updating the second emoticon based on the confirmation result. The adjustment module is further configured to: after adjusting the first expression to obtain the second expression of the target face image, adjust the expression of the target object corresponding to the target face image based on the second expression.
20. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire the target face image; The recognition module is used to recognize the target face image and obtain the first expression corresponding to the target face image; An encoding module is used to encode the target face image to obtain a target code corresponding to the target face image; An adjustment module is used to adjust the first expression when the first expression is different from the expression corresponding to the target encoding, so as to obtain a second expression of the target face image; A determining module is used to determine the attendance result of the target face image based on the second expression, wherein the second expression is determined by the expression of at least one first face image with the same encoding as the target encoding, and the second expression is used to characterize the actual expression of the target face image; The device further includes: an output module for outputting the second emoticon; a receiving module for receiving a confirmation result corresponding to the second emoticon; and an update module for updating the second emoticon based on the confirmation result. The adjustment module is further configured to: after adjusting the first expression to obtain the second expression of the target face image, adjust the expression of the target object corresponding to the target face image based on the second expression.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the image processing method according to any one of claims 1 to 16.
22. A processor, characterized in that, The processor is used to run a program, wherein the program executes the image processing method according to any one of claims 1 to 16.
23. An image processing system, characterized in that, include: processor; as well as A memory, connected to the processor, is configured to provide the processor with instructions to process the following steps: acquiring a target face image and a first expression corresponding to the target face image; encoding the target face image to obtain a target code corresponding to the target face image; and adjusting the first expression to obtain a second expression of the target face image when the first expression differs from the expression corresponding to the target code, wherein the second expression is determined by the expression of at least one first face image whose encoding is the same as the target code, and the second expression is used to characterize the actual expression of the target face image; The memory is also used to provide the processor with instructions to process the following steps: outputting the second emoticon; receiving a confirmation result corresponding to the second emoticon; and updating the second emoticon based on the confirmation result. The memory is also used to provide the processor with instructions to process the following steps: after adjusting the first expression to obtain a second expression of the target face image, adjusting the expression of the target object corresponding to the target face image based on the second expression.
Citation Information
Patent Citations
Attendance checking method based on cloud human face and expression recognition
CN104732602A
Method and device based on face recognition
CN110032945A