Portrait video eye contact correction method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202510526063.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-10-27
Smart Images

Figure CN122989480A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more particularly to methods, apparatus, electronic devices and storage media for eye contact correction in human portrait videos. Background Technology
[0002] In traditional video communication, users often need to simultaneously view information on the screen and the camera, making it impossible for them to look directly at the camera. This makes it difficult for the other party in the call to maintain eye contact, which may lead to psychological communication barriers and reduce communication efficiency.
[0003] In related technologies, the gaze and camera are defined in a world coordinate system to adjust the gaze. Preliminary work, including camera calibration, is required before adjustment, which can be quite cumbersome for users.
[0004] Therefore, how to easily correct the user's eyes in portrait videos has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and storage medium for correcting eye contact in human portrait videos. The method automatically adjusts the user's gaze in the video to face the camera without affecting video smoothness, creating a virtual sense of eye contact and thus enhancing the interactivity and realism of communication.
[0006] In a first aspect, embodiments of this application provide a method for eye contact correction in portrait videos, including:
[0007] Acquire a video stream captured by a camera, the video stream including images;
[0008] If the image includes a face image, perform an alignment operation on the face image to obtain an aligned face image;
[0009] From the aligned face image, obtain the gaze direction of the eyes and the head posture;
[0010] From the aligned face image, obtain the images to be corrected corresponding to each eye;
[0011] The gaze direction of the two eyes, head posture, preset target line of sight of the two eyes, and the images to be corrected corresponding to each of the two eyes are input into a preset monocular retargeting model to output the corrected images corresponding to the two eyes.
[0012] The images to be corrected corresponding to each eye in the aligned face image are replaced with the corrected images corresponding to each eye to obtain the updated face image;
[0013] Using the updated face image, the image is corrected to obtain the target image.
[0014] In some embodiments, the method further includes:
[0015] A generative adversarial network is trained using a number of first learning samples to obtain a preset monocular retargeting model; wherein, the first learning samples include left eye learning samples and right eye learning samples, the left eye learning samples include a preset left eye gaze direction, a first preset head posture, a preset left eye target line of sight, a left eye image to be corrected and a corrected left eye image; the right eye learning samples include a right eye gaze direction, a second preset head posture, a preset right eye target line of sight, a right eye image to be corrected and a corrected right eye image.
[0016] In some embodiments, before the step of performing an alignment operation on the face image to obtain an aligned face image if the image includes a face image, the method further includes:
[0017] The image is input into a preset face recognition model to determine whether a face image exists in the image.
[0018] In some embodiments, the method further includes:
[0019] A convolutional neural network is trained using a number of second learning samples to obtain a preset face recognition model; wherein, the second learning samples include preset images and preset face images.
[0020] In some embodiments, the step of performing an alignment operation on the face image to obtain an aligned face image includes:
[0021] Detect key target areas in the face image;
[0022] The detected key parts of the target are configured into the preset part area of the preset contour template to obtain an aligned face image.
[0023] In some embodiments, the method further includes:
[0024] The updated image is then adjusted for lighting and color.
[0025] Secondly, embodiments of this application provide a facial video eye contact correction device, comprising:
[0026] The first acquisition unit is used to acquire a video stream captured by a camera, wherein the video stream includes images;
[0027] An alignment unit is used to perform an alignment operation on the face image if the image includes a face image to obtain an aligned face image;
[0028] The second acquisition unit is used to acquire the gaze direction of the eyes and the head posture from the aligned face image;
[0029] The third acquisition unit is used to acquire the images to be corrected corresponding to each eye from the aligned face image;
[0030] The correction unit is used to input the gaze direction of the two eyes, head posture, preset target line of sight of the two eyes, and the image to be corrected corresponding to each of the two eyes into a preset monocular redirection model, so as to output the corrected image corresponding to the two eyes.
[0031] The replacement unit is used to replace the images to be corrected corresponding to each eye in the aligned face image with the corrected images corresponding to each eye, so as to obtain the updated face image;
[0032] The correction unit is used to correct the image using the updated face image to obtain the target image.
[0033] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the human portrait video eye contact correction method.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the human portrait video eye contact correction method.
[0035] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the human portrait video eye contact correction method.
[0036] The above embodiments provide a method for correcting eye contact in human portrait videos. This method automatically adjusts the user's gaze in the video to face the camera without affecting video smoothness. It creates a virtual sense of eye contact, thereby enhancing the interactivity and realism of communication. The method includes: acquiring a video stream captured by a camera, the video stream including images; if the images include face images, performing an alignment operation on the face images to obtain aligned face images; acquiring the gaze direction and head posture of both eyes from the aligned face images; acquiring the images to be corrected corresponding to each eye from the aligned face images; inputting the gaze direction of both eyes, head posture, preset target lines of sight for both eyes, and the images to be corrected corresponding to each eye into a preset monocular redirection model to output corrected images corresponding to both eyes; replacing the images to be corrected corresponding to each eye in the aligned face images with the corrected images corresponding to both eyes to obtain an updated face image; and using the updated face images to correct the images to obtain a target image. Attached Figure Description
[0037] Figure 1 An exemplary flowchart is shown for a method for correcting eye contact in portrait video according to some embodiments;
[0038] Figure 2 An exemplary flowchart is shown for yet another method for eye contact correction in human portrait videos according to some embodiments;
[0039] Figure 3 An exemplary flowchart is shown for yet another method for eye contact correction in human portrait videos according to some embodiments;
[0040] Figure 4 An exemplary schematic diagram of a human face video eye contact correction device provided according to some embodiments is shown. Detailed Implementation
[0041] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0042] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0043] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0044] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0045] In traditional video communication, users often need to simultaneously view information on the screen and the camera, making it impossible to maintain direct eye contact with the camera. This can psychologically hinder communication and reduce efficiency. Related technologies define eye contact and camera position within a world coordinate system to adjust gaze. However, this requires preparatory work, including camera calibration, which is cumbersome for users. Therefore, finding a simple way to correct user gaze in portrait videos has become a pressing technical problem for those skilled in the art.
[0046] To address the aforementioned technical problems, this application provides a method, apparatus, electronic device, and storage medium for correcting eye contact in portrait videos. This method automatically adjusts the user's gaze in the video to face the camera without affecting video smoothness. This creates a virtual sense of eye contact, thereby enhancing the interactivity and realism of communication.
[0047] Figure 1 An exemplary flowchart of a method for correcting eye contact in human portrait video according to some embodiments is shown, including steps S100-S700.
[0048] S100. Acquire a video stream captured by a camera, wherein the video stream includes images.
[0049] This application embodiment eliminates the need for camera calibration, performing the calibration directly within the camera coordinate system, thus removing the camera calibration step and lowering the barrier to entry. The method in this application embodiment can be widely applied to various task-oriented video communication scenarios, such as interviews, live broadcasts, meetings, or personal recordings.
[0050] S200. If the image includes a face image, perform an alignment operation on the face image to obtain an aligned face image.
[0051] In this embodiment of the application, the video stream includes at least one frame of image. When there are multiple frames of image, each frame of image is judged in sequence to determine whether the image includes a human face image.
[0052] In some embodiments, before the step of performing an alignment operation on the face image to obtain an aligned face image if the image includes a face image, the method further includes:
[0053] The image is input into a preset face recognition model to determine whether a face image exists in the image. In this embodiment, a preset face recognition model is used to determine whether a face image exists in the image.
[0054] In some embodiments, the method further includes: training a convolutional neural network (CNN) using a plurality of second learning samples to obtain a preset face recognition model; wherein the second learning samples include a preset image and a preset face image.
[0055] In this embodiment of the application, a large number of second learning samples are used to train a convolutional neural network, so that the resulting preset face recognition model can accurately determine whether a face image exists in the image.
[0056] In some embodiments, Figure 2 The flowchart of another method for correcting eye contact in portrait videos is shown as an example, wherein the step of performing an alignment operation on the face image to obtain an aligned face image includes S201-S202.
[0057] S201. Detect key target parts in the face image.
[0058] In some embodiments, the target key areas include the two eyes, the tip of the nose, and the two corners of the mouth. Of course, other easily identifiable parts of the face can also be selected.
[0059] S202. The detected key parts of the target are configured into the preset part area of the preset contour template to obtain the aligned face image.
[0060] It is understandable that when a person is in front of a camera, their face is not directly facing the camera; the user may be tilting their head or turning their face to the side. This makes it difficult to correct the gaze later. To avoid this problem, in this embodiment, the facial image is aligned with a preset region of a preset contour template using target key features, resulting in an aligned facial image that ensures the aligned facial image faces the camera directly. In one example, the preset contour template can be 256*256 pixels.
[0061] S300. Obtain the gaze direction of the eyes and the head posture from the aligned face image.
[0062] In this embodiment, a Gaze / Head estimator is used to obtain the gaze direction (i.e., gaze vector) and head pose of the human eye. These estimates are calculated by analyzing the geometric relationship and dynamic changes of the face and eyes.
[0063] S400. From the aligned face image, obtain the images to be corrected corresponding to each eye.
[0064] In this embodiment, more refined key point detection is performed on the aligned face image to obtain more detailed feature point information around the eyes. Based on the feature point information, the images to be corrected for each eye are obtained from the aligned face image.
[0065] S500: Input the gaze direction of the two eyes, head posture, preset target line of sight of the two eyes, and the images to be corrected corresponding to the two eyes into a preset monocular retargeting model to output the corrected images corresponding to the two eyes.
[0066] In this embodiment, the preset monocular repositioning model can output the corrected image (eyepatch). The input data of the preset monocular repositioning model includes head pose (head_t), which is not changed in this embodiment. The preset target gaze distances (gaze_left / gaze_right) for both eyes are specifically set to look directly at the camera, that is, the yaw (rotation around the y-axis) and pitch (rotation around the x-axis) angles of gaze_left / gaze_right are both 0. In order to distinguish the gaze direction, the preset target gaze distances can be marked with a flag (side) to indicate whether the image to be corrected belongs to the left or right eye. For example, the flag is -1 when it belongs to the left eye and 1 when it belongs to the right eye.
[0067] In this embodiment, the preset monocular redirection model is used to redirect the images of both eyes according to the target gaze conditions. The gaze direction is in a state of looking directly at the camera, and the head posture remains unchanged.
[0068] In some embodiments, the method further includes: training a generative adversarial network using a plurality of first learning samples to obtain a preset monocular retargeting model; wherein the first learning samples include left-eye learning samples and right-eye learning samples, the left-eye learning samples include a preset left-eye gaze direction, a first preset head pose, a preset left-eye target line of sight, a left-eye image to be corrected, and a corrected left-eye image; the right-eye learning samples include a right-eye gaze direction, a second preset head pose, a preset right-eye target line of sight, a right-eye image to be corrected, and a corrected right-eye image.
[0069] In this embodiment of the application, the preset monocular retargeting model can correct the images to be corrected for each eye, so that the user's gaze in the corrected images for each eye is looking directly at the camera.
[0070] S600. Replace the images to be corrected corresponding to each eye in the aligned face image with the corrected images corresponding to each eye to obtain the updated face image.
[0071] In this embodiment, the images to be corrected corresponding to each eye in the aligned face image are replaced with the images corrected for eye-to-eye correspondence to obtain the updated face image.
[0072] S700. Using the updated face image, correct the image to obtain the target image.
[0073] In this embodiment, the updated face image is obtained based on the aligned face image. Since the face image in the aligned face image faces the camera directly, the updated face image also faces the camera directly. However, the image initially captured by the camera may have been taken when the user is tilting their head or in a side-view position. In this case, it is necessary to use the head posture in the image initially captured by the camera to transform the head posture of the updated face image so that the updated face image can be fused into the image initially captured by the camera to finally obtain the target image.
[0074] In some embodiments, the method further includes:
[0075] The target image is then subjected to lighting and color adjustments.
[0076] In this embodiment, the target image's lighting and color attributes are adjusted so that the binocular-corrected image can be accurately fused into the target image, resulting in a visually natural integration with the entire target image. Subsequent detailed rendering processing then re-encodes the target image into a video stream, achieving real-time video compositing. In some scenarios, real-time video compositing may not be necessary; instead, it can be performed after a preset duration.
[0077] Figure 3A flowchart of another method for correcting eye contact in portrait videos, according to some embodiments, is illustrated. After acquiring an image, it is determined whether a face image exists in the image. If the image includes a face image, an alignment operation is performed on the face image, at which point the face image is placed within a preset contour template, resulting in an aligned face image. Then, an estimator is used to obtain the gaze direction of each eye, head pose, preset target line of sight for each eye, and the images to be corrected corresponding to each eye. The gaze direction corresponding to the left eye, the preset target line of sight for the left eye, the image to be corrected corresponding to the left eye, and the head pose are then input into a monocular repositioning model G to output the corrected image corresponding to the left eye. Simultaneously, the gaze direction corresponding to the right eye, the preset target line of sight for the right eye, the image to be corrected corresponding to the right eye, and the head pose are input into the monocular repositioning model G to output the corrected image corresponding to the right eye. The corrected images corresponding to the left and right eyes are used to replace the images to be corrected corresponding to each eye in the aligned face image, resulting in an updated face image. Finally, the updated face image is fused into the original image, i.e., the image initially captured by the camera, completing the entire correction method.
[0078] The method described in this application is applicable to various online meetings, remote teaching, live streaming, or virtual reality interactions, solving the problem of unnatural communication caused by participants' inability to look directly at the camera. Even if the person in the video is looking elsewhere, the method described in this application allows them to maintain eye contact with the viewer, creating a more natural and intimate communication environment. Furthermore, this technology requires no additional hardware support and can be widely applied to existing video communication devices and platforms. The method described in this application is calculated directly in the camera coordinate system. This method specifically addresses how to adjust the subject's gaze direction in a real-world environment to make them look directly at the camera, thereby improving the intimacy and effectiveness of video communication. In addition, it achieves real-time correction of the gaze of people in the video through software algorithms without requiring complex pre-production work.
[0079] The method in this application embodiment has the following significant advantages:
[0080] (1) Easy to operate: Since there is no need for a complicated camera calibration process, this algorithm is very easy for ordinary users to deploy and use in various environments.
[0081] (2) Wide applicability: This technology is not limited by hardware and can be easily integrated into existing video communication software. It is applicable to a variety of devices such as personal computers, tablets, and smartphones.
[0082] (3) Improved communication quality: By improving eye contact during video calls, the sense of connection and communication effectiveness among participants were enhanced, which has an important social impact.
[0083] (4) Technological leadership: It adopts the most advanced deep learning model for eye repositioning and combines advanced image fusion technology to ensure the naturalness and realism of the output results.
[0084] In summary, the human face video eye contact correction method in this application embodiment breaks through the limitations of traditional technology, provides an innovative solution for online video communication, and greatly improves the quality of long-distance communication.
[0085] The above embodiments provide a method for correcting eye contact in human portrait videos. This method automatically adjusts the user's gaze in the video to face the camera without affecting video smoothness. It creates a virtual sense of eye contact, thereby enhancing the interactivity and realism of communication. The method includes: acquiring a video stream captured by a camera, the video stream including images; if the images include face images, performing an alignment operation on the face images to obtain aligned face images; acquiring the gaze direction and head posture of both eyes from the aligned face images; acquiring the images to be corrected corresponding to each eye from the aligned face images; inputting the gaze direction of both eyes, head posture, preset target lines of sight for both eyes, and the images to be corrected corresponding to each eye into a preset monocular redirection model to output corrected images corresponding to both eyes; replacing the images to be corrected corresponding to each eye in the aligned face images with the corrected images corresponding to both eyes to obtain an updated face image; and using the updated face images to correct the images to obtain a target image.
[0086] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this application provides a facial video eye contact correction device. Figure 4 An exemplary schematic diagram of a facial video eye contact correction device according to some embodiments is shown. Figure 4 As shown, the device includes: a first acquisition unit 401, an alignment unit 402, a second acquisition unit 403, a third acquisition unit 404, a correction unit 405, a replacement unit 406, and a correction unit 407.
[0087] The first acquisition unit is used to acquire a video stream captured by a camera, wherein the video stream includes images;
[0088] An alignment unit is used to perform an alignment operation on the face image if the image includes a face image to obtain an aligned face image;
[0089] The second acquisition unit is used to acquire the gaze direction of the eyes and the head posture from the aligned face image;
[0090] The third acquisition unit is used to acquire the images to be corrected corresponding to each eye from the aligned face image;
[0091] The correction unit is used to input the gaze direction of the two eyes, head posture, preset target line of sight of the two eyes, and the image to be corrected corresponding to each of the two eyes into a preset monocular redirection model, so as to output the corrected image corresponding to the two eyes.
[0092] The replacement unit is used to replace the images to be corrected corresponding to each eye in the aligned face image with the corrected images corresponding to each eye, so as to obtain the updated face image;
[0093] The correction unit is used to correct the image using the updated face image to obtain the target image.
[0094] In specific application scenarios, the device further includes:
[0095] The first training unit is used to train a generative adversarial network using a number of first learning samples to obtain a preset monocular retargeting model. The first learning samples include left-eye learning samples and right-eye learning samples. The left-eye learning samples include a preset left-eye gaze direction, a first preset head posture, a preset left-eye target line of sight, a left-eye image to be corrected, and a corrected left-eye image. The right-eye learning samples include a right-eye gaze direction, a second preset head posture, a preset right-eye target line of sight, a right-eye image to be corrected, and a corrected right-eye image.
[0096] In specific application scenarios, the device further includes:
[0097] The input unit is used to input the image into a preset face recognition model to determine whether a face image exists in the image.
[0098] In specific application scenarios, the device further includes:
[0099] The second training unit is used to train a convolutional neural network using a number of second learning samples to obtain a preset face recognition model; wherein, the second learning samples include preset images and preset face images.
[0100] In specific application scenarios, the alignment unit specifically performs the following:
[0101] Detect key target areas in the face image;
[0102] The detected key parts of the target are configured into the preset part area of the preset contour template to obtain an aligned face image.
[0103] In specific application scenarios, the device further includes: adjusting the lighting and color of the target image.
[0104] According to one embodiment of this application, a storage medium is provided, the storage medium storing at least one executable instruction that can perform human face video eye contact correction in any of the above method embodiments.
[0105] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0106] This application also provides an electronic device, which may be a computer, smartphone, tablet computer, smartwatch, server, or network device, etc. The electronic device includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the step of eye contact correction for human portrait videos.
[0107] Optionally, the electronic device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0108] Those skilled in the art will understand that the electronic device structure provided in this embodiment does not constitute a limitation on the electronic device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0109] The storage medium may also include an operating device and a network communication module. The operating device is a program that manages and stores the hardware and software resources of the electronic device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between various controls within the storage medium, as well as communication with other hardware and software within the physical device.
[0110] This application also provides a human portrait video eye contact correction system, a processor; and
[0111] A memory is configured to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the human face video eye contact correction method.
[0112] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of a human face video eye contact correction method.
[0113] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of a human face video eye contact correction method.
[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware.
[0115] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the units or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the units in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be located in one or more apparatuses different from this embodiment, with corresponding changes. The units of the above-described embodiment can be combined into one unit, or further divided into multiple sub-units.
[0116] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for eye contact correction in human portrait videos, characterized in that, include: Acquire a video stream captured by a camera, the video stream including images; If the image includes a face image, perform an alignment operation on the face image to obtain an aligned face image; From the aligned face image, obtain the gaze direction of the eyes and the head posture; From the aligned face image, obtain the images to be corrected corresponding to each eye; The gaze direction of the two eyes, head posture, preset target line of sight of the two eyes, and the images to be corrected corresponding to each of the two eyes are input into a preset monocular retargeting model to output the corrected images corresponding to the two eyes. The images to be corrected corresponding to each eye in the aligned face image are replaced with the corrected images corresponding to each eye to obtain the updated face image; Using the updated face image, the image is corrected to obtain the target image.
2. The method according to claim 1, characterized in that, Also includes: A generative adversarial network is trained using a number of first learning samples to obtain a preset monocular retargeting model; wherein, the first learning samples include left eye learning samples and right eye learning samples, the left eye learning samples include a preset left eye gaze direction, a first preset head posture, a preset left eye target line of sight, a left eye image to be corrected and a corrected left eye image; the right eye learning samples include a right eye gaze direction, a second preset head posture, a preset right eye target line of sight, a right eye image to be corrected and a corrected right eye image.
3. The method according to claim 1, characterized in that, Before the step of performing an alignment operation on the face image to obtain an aligned face image if the image includes a face image, the method further includes: The image is input into a preset face recognition model to determine whether a face image exists in the image.
4. The method according to claim 3, characterized in that, Also includes: A convolutional neural network is trained using a number of second learning samples to obtain a preset face recognition model; wherein, the second learning samples include preset images and preset face images.
5. The method according to claim 1, characterized in that, The step of performing an alignment operation on the face image to obtain an aligned face image includes: Detect key target areas in the face image; The detected key parts of the target are configured into the preset part area of the preset contour template to obtain an aligned face image.
6. The method according to claim 1, characterized in that, Also includes: The target image is then subjected to lighting and color adjustments.
7. A human face video eye contact correction device, characterized in that, include: The first acquisition unit is used to acquire a video stream captured by a camera, wherein the video stream includes images; An alignment unit is used to perform an alignment operation on the face image if the image includes a face image to obtain an aligned face image; The second acquisition unit is used to acquire the gaze direction of the eyes and the head posture from the aligned face image; The third acquisition unit is used to acquire the images to be corrected corresponding to each eye from the aligned face image; The correction unit is used to input the gaze direction of the two eyes, head posture, preset target line of sight of the two eyes, and the image to be corrected corresponding to each of the two eyes into a preset monocular redirection model, so as to output the corrected image corresponding to the two eyes. The replacement unit is used to replace the images to be corrected corresponding to each eye in the aligned face image with the corrected images corresponding to each eye, so as to obtain the updated face image; The correction unit is used to correct the image using the updated face image to obtain the target image.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-6.