Virtual image generation method and device, computer equipment and storage medium
By providing correction modes and reference image images in the virtual image generation interface, the parts of the virtual image to be corrected can be intelligently corrected, solving the problem of incoherence of the virtual image in traditional methods and achieving more efficient and coordinated virtual image generation.
Patent Information
- Application Number
- CN202410345599.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2025-09-26
AI Technical Summary
In traditional avatar generation, users tend to adjust the data of various parts of the avatar to be too large or too small, resulting in the overall lack of coordination of the generated avatar.
By displaying the correction mode on the virtual image generation interface, obtaining a reference image, determining the reference part that matches the part to be corrected, and correcting the original virtual image based on the reference image, local correction and beautification are performed in combination with intelligent correction methods.
The overall coordination of the virtual image is improved, the distortion of various parts is reduced, and the generation efficiency and quality are improved.
Smart Images

Figure CN120704574A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for generating a virtual image. Background Art
[0002] With the development of computer technology, more and more social applications can provide the function of generating virtual images, allowing users to customize the virtual images according to their own needs.
[0003] Traditionally, users can configure data for various parts of an avatar template to achieve their desired state. For example, each part is assigned an adjustable lever, which the user can move to adjust the data, or the user can directly adjust the data of each part in the avatar template by manually pinching.
[0004] However, whether adjusting the data by moving the pull rod or manually kneading the data, the data adjustment of each part is likely to be too large or too small, resulting in the problem that the generated virtual image is not coordinated as a whole. Summary of the Invention
[0005] Based on this, it is necessary to provide a virtual image generation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the overall coordination of the virtual image in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for generating a virtual image. The method comprises:
[0007] Displaying the original virtual image obtained by the user operation on the virtual image generation interface;
[0008] In response to a triggering operation on a part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface;
[0009] In response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation;
[0010] Determining, in the reference image, a reference portion that matches the portion to be corrected;
[0011] Based on the reference part in the reference image, the part to be corrected in the original virtual image is corrected to obtain a target virtual image.
[0012] In a second aspect, the present application further provides a virtual image generation device. The device comprises:
[0013] An image display module, configured to display an original virtual image obtained by user operation on a virtual image generation interface;
[0014] a mode display module, configured to display at least one correction mode for the part to be corrected on the avatar generation interface in response to a triggering operation on the part to be corrected of the original avatar;
[0015] an acquisition module, configured to, in response to a mode selection operation performed on the at least one correction mode, acquire a reference image of the original virtual image according to the correction mode selected by the mode selection operation;
[0016] A determination module, configured to determine, in the reference image, a reference portion that matches the portion to be corrected;
[0017] The correction module is used to correct the part to be corrected in the original virtual image based on the reference part in the reference image image to obtain a target virtual image.
[0018] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are performed:
[0019] Displaying the original virtual image obtained by the user operation on the virtual image generation interface;
[0020] In response to a triggering operation on a part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface;
[0021] In response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation;
[0022] Determining, in the reference image, a reference portion that matches the portion to be corrected;
[0023] Based on the reference part in the reference image, the part to be corrected in the original virtual image is corrected to obtain a target virtual image.
[0024] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0025] Displaying the original virtual image obtained by the user operation on the virtual image generation interface;
[0026] In response to a triggering operation on a part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface;
[0027] In response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation;
[0028] Determining, in the reference image, a reference portion that matches the portion to be corrected;
[0029] Based on the reference part in the reference image, the part to be corrected in the original virtual image is corrected to obtain a target virtual image.
[0030] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0031] Displaying the original virtual image obtained by the user operation on the virtual image generation interface;
[0032] In response to a triggering operation on a part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface;
[0033] In response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation;
[0034] Determining, in the reference image, a reference portion that matches the portion to be corrected;
[0035] Based on the reference part in the reference image, the part to be corrected in the original virtual image is corrected to obtain a target virtual image.
[0036] The aforementioned avatar generation method, apparatus, computer device, storage medium, and computer program product display an original avatar obtained by user operation on a avatar generation interface to obtain an original avatar generated by user-defined operation. In response to a trigger operation on a portion of the original avatar to be corrected, at least one correction mode for the portion to be corrected is displayed on the avatar generation interface, providing the user with a method for correcting the custom-generated avatar. In response to a mode selection operation for at least one correction mode, a reference image of the original avatar is obtained according to the selected correction mode. Different correction modes use different reference image images, enabling adaptation to the correction of the custom-generated avatar for different users and different scenarios. Within the reference image image, a reference portion matching the portion to be corrected is determined. Based on the reference portion in the reference image image, the portion to be corrected in the original avatar is corrected. This allows for the intelligent correction method to locally correct and beautify the user-defined avatar, reducing distortion or deformation of various portions of the avatar, thereby achieving a more harmonious overall target avatar. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A diagram illustrating an application environment of a method for generating a virtual image in one embodiment;
[0038] Figure 2 Schematic diagram of a flow chart of a method for generating a virtual image in one embodiment;
[0039] Figure 3 is a schematic diagram of an interface of multiple correction modes in one embodiment;
[0040] Figure 4 A schematic diagram of a virtual image generation interface for a first operation mode in one embodiment;
[0041] Figure 5 A schematic diagram of a virtual image generation interface in a second operation mode in one embodiment;
[0042] Figure 6 is a schematic diagram of characteristic points in one embodiment;
[0043] Figure 7 A schematic diagram of an interface for triggering an interactive element for importing an image according to an embodiment;
[0044] Figure 8 A schematic diagram of an interface for triggering an interactive element for image capture according to an embodiment;
[0045] Figure 9 A schematic diagram of an interface for displaying a correction entry in a virtual image generation interface in different operation modes according to an embodiment;
[0046] Figure 10 Schematic diagram of an interface of a correction entry in a default state and a correction entry in a prompt state according to an embodiment;
[0047] Figure 11 A partial schematic diagram of a method for generating a virtual image in one embodiment;
[0048] Figure 12 A partial schematic diagram of a method for generating a virtual image in another embodiment;
[0049] Figure 13 Schematic diagram of the architecture of a method for generating a virtual image in one embodiment;
[0050] Figure 14 is a structural block diagram of a virtual image generating device in one embodiment;
[0051] Figure 15 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0053] The virtual image generation method provided in the embodiments of the present application can be applied to the generation of various types of virtual images and can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving.
[0054] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0055] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.
[0056] The solution provided in the embodiment of the present application relates to a method for generating a virtual image using artificial intelligence, which can be applied to Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated with server 104, or located in the cloud or on another server. Terminal 102 displays the original avatar obtained by user operation on the avatar generation interface. In response to a trigger operation for a part to be corrected on the original avatar, terminal 102 displays at least one correction mode for the part to be corrected on the avatar generation interface. In response to a mode selection operation for at least one correction mode, terminal 102 obtains a reference image of the original avatar according to the correction mode selected in the mode selection operation. Terminal 102 sends the reference image to server 104, which identifies a reference part in the reference image that matches the part to be corrected. Server 104 corrects the part to be corrected in the original avatar based on the reference part in the reference image, obtaining a target avatar. Server 104 outputs the target avatar to the avatar generation interface of terminal 102 for display.
[0057] Terminal 102 may include, but is not limited to, various desktop computers, laptops, smartphones, tablet computers, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers.
[0058] In one embodiment, Figure 2 As shown, a virtual image generation method is provided, which is applied to Figure 1 The following steps are used as an example to illustrate the terminal in the figure:
[0059] Step S202: Displaying the original virtual image obtained by the user operation on the virtual image generation interface.
[0060] The avatar generation interface is a user interface for generating an avatar, and can be a pop-up window, a floating layer, or a standalone interface. Users can operate on the avatar generation interface to generate a customized avatar.
[0061] A virtual avatar refers to, but is not limited to, a character object or character model in a virtual scene. A virtual avatar can be a virtual human or animal. A virtual avatar can be, but is not limited to, a two-dimensional or three-dimensional image.
[0062] The avatar may include at least a portion of a head, neck, torso, or limbs. The head, neck, torso, and limbs each include multiple parts. For example, the head includes multiple parts such as ears, eyes, nose, mouth, cheeks, and forehead.
[0063] Specifically, the terminal displays a virtual image generation interface, and the user can perform operations on the virtual image generation interface. The terminal generates an original virtual image in response to the user operation and displays the original virtual image obtained by the user operation on the virtual image generation interface.
[0064] In this embodiment, the terminal displays a default image template on the virtual image generation interface, and obtains an original virtual image in response to the user's image configuration operation on the default image template.
[0065] Furthermore, in response to a user's avatar configuration operation on a default avatar template, the terminal determines a candidate avatar generated by the avatar configuration operation and determines multi-view configuration data corresponding to the candidate avatar. A preset avatar template is obtained, along with multi-view template data corresponding to the preset avatar template. When the difference between the multi-view part configuration data and the multi-view template data satisfies a preset difference condition, the candidate avatar is used as the original avatar.
[0066] When the difference between the multi-view part configuration data and the multi-view template data does not meet the preset difference condition, the multi-view part configuration data of the candidate virtual image is corrected based on the multi-view template data to obtain the original virtual image.
[0067] The image configuration operation on the default image template includes a part configuration operation on at least one part of the default image template.
[0068] In this embodiment, when the difference between the multi-view part configuration data and the multi-view template data meets a preset difference condition, a default state correction entry is displayed. When the difference between the multi-view part configuration data and the multi-view template data does not meet the preset difference condition, a prompt state correction entry is displayed. The prompt state is used to prompt the candidate avatar to be corrected.
[0069] Step S204 : in response to a triggering operation on the part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface.
[0070] The trigger operation is a preset operation applied to the part of the original avatar to be corrected. Specifically, the trigger operation can be a touch operation, a cursor operation, a key operation, or a voice operation. A touch operation can be a touch click operation, a touch press operation, or a touch slide operation. A touch operation can be a single-touch operation or a multi-touch operation. A cursor operation can be an operation that controls the cursor to click or press. A key operation can be a virtual key operation or a physical key operation.
[0071] Specifically, the user can trigger the part to be corrected of the original virtual image. In response to the triggering operation of the part to be corrected, the terminal displays at least one correction mode for the part to be corrected on the virtual image generation interface. The at least one correction mode includes at least one of the following: image correction mode and template correction mode. The template correction mode includes at least one of the following: local correction mode and random correction mode, such as Figure 3 As shown, the image correction mode is displayed as an "Upload Photo" control 302, the local correction mode is displayed as a "Local Repair" control 304, and the random correction mode is displayed as a "Random Generate" control 306. The image correction mode refers to a mode in which the image is used as a reference image to correct the area to be corrected. The template correction mode refers to a mode in which the image is used as a reference image to correct the area to be corrected.
[0072] In this embodiment, the virtual image generation interface of different operation modes can be displayed. The operation mode switching control can also be displayed on the virtual image generation interface. In response to the triggering operation of the switching control, the virtual image generation interface of different operation modes can be switched. Figure 4 As shown, Figure 4 The avatar generation interface 400 of the first operation mode is shown. The user can perform gesture operations on the avatar in the avatar generation interface to adjust the data of various parts of the avatar. The avatar generation interface 400 can display a switch control 402. The user clicks the switch control 402 to switch from the avatar generation interface 400 of the first operation mode to the avatar generation interface 400 of the second operation mode. Figure 5 The avatar generation interface 500 of the second operation mode is shown. The avatar generation interface 400 may also display a switch control 404 for different viewing angles to switch between the front and side views of the avatar.
[0073] The avatar generation interface 500 may also display a switch control 502 , and the user can switch back to the avatar generation interface 400 by clicking the switch control 502 .
[0074] The virtual image generation interface 500 may also display a switch control 504 for different viewing angles to switch between the front and side views of the virtual image.
[0075] The avatar generation interface 500 may display an operation progress bar 506 for each part. The user may adjust the progress of the operation progress bar 506 corresponding to the part he wants to modify, thereby adjusting the data of the part.
[0076] In this embodiment, whether it is the avatar generation interface 400 of the first operation mode or the avatar generation interface 500 of the second operation mode, when the user triggers the part to be corrected in the avatar generation interface, at least one correction mode for the part to be corrected is displayed on the avatar generation interface, as described above. Figure 3 shown.
[0077] Step S206 , in response to a mode selection operation performed on at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation.
[0078] The reference image image is used as a reference for the original virtual image to correct the parts of the original virtual image. Different correction modes obtain different reference image images.
[0079] Specifically, the user can select from at least one displayed correction mode. The terminal determines the correction mode selected by the mode selection operation in response to the user's mode selection operation, and obtains a reference image of the original virtual image according to the selected correction mode.
[0080] In this embodiment, when the user selects the image correction mode, the terminal obtains a candidate image as a reference image, wherein the candidate image can be an image obtained from a local image set or an image obtained by calling a camera.
[0081] When the user selects the template correction mode, the terminal obtains a preset image template as a reference image.
[0082] Step S208: Determine a reference part that matches the part to be corrected in the reference image.
[0083] Specifically, the terminal may match the part to be corrected with each part in the reference image, so as to determine a reference part matching the part to be corrected in the reference image.
[0084] Step S210 , based on the reference part in the reference image, correct the part to be corrected in the original virtual image to obtain the target virtual image.
[0085] Specifically, the part to be corrected in the original virtual image is corrected based on the reference part to obtain a virtual image including the corrected part, and the virtual image including the corrected part is used as the target virtual image.
[0086] In this embodiment, the terminal extracts multiple reference feature points of the reference part and extracts multiple feature points to be corrected of the part to be corrected. Figure 6 Based on multiple reference feature points and multiple feature points to be corrected, a mapping relationship between the reference part and the part to be corrected is determined. Based on the mapping relationship and the multiple feature points to be corrected, the part to be corrected in the original virtual image is corrected to obtain a target virtual image.
[0087] In this embodiment, an original avatar generated by user operation is displayed on the avatar generation interface to obtain an original avatar generated by user-defined operation. In response to a trigger operation on a part of the original avatar to be corrected, at least one correction mode for the part to be corrected is displayed on the avatar generation interface, providing the user with a method for correcting the customized avatar. In response to a mode selection operation for at least one correction mode, a reference image of the original avatar is obtained according to the selected correction mode. Different correction modes use different reference image images, enabling customized avatar corrections to be adapted for different users and scenarios. Within the reference image image, a reference part matching the part to be corrected is determined. Based on the reference part in the reference image, the part to be corrected in the original avatar is corrected. This allows for the intelligent correction method to locally correct and enhance the user-defined avatar, reducing distortion and deformation of various parts of the avatar, thereby achieving a more harmonious overall target avatar. Furthermore, through the combination of manual customization of the avatar and intelligent correction and beautification of the avatar, the time spent on customized avatar generation can be reduced, improving the efficiency and quality of avatar generation.
[0088] In one embodiment, the at least one correction mode includes an image correction mode; in response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation includes:
[0089] In response to a mode selection operation for an image correction mode, multiple candidate image images in a local image set are displayed; in response to an image selection event for multiple candidate image images, the candidate image image selected by the image selection event is used as a reference image image for the original virtual image.
[0090] The candidate image images are portrait images in the local image collection, for example, photos of people, photos of animals, etc. in the local image collection.
[0091] Specifically, in response to the user's triggering operation on the part to be corrected of the original virtual image, the terminal displays at least one correction mode for the part to be corrected on the virtual image generation interface, and the displayed at least one correction mode includes an image correction mode.
[0092] When the user triggers the image correction mode, the terminal displays multiple candidate image images in the local image set. The user can select at least one candidate image image from the multiple candidate image images. The terminal uses the candidate image image selected by the image selection event as the reference image image of the original virtual image.
[0093] In this embodiment, in response to a mode selection operation for the image correction mode, the terminal displays an image import interactive element; in response to a triggering event of the image import interactive element, multiple candidate avatar images from the local image collection are displayed. The image import interactive element can provide a function of jumping from the avatar generation interface to the local image collection.
[0094] The terminal displays an image import interactive element on the virtual image generation interface. The user can trigger the image import interactive element. In response to the triggering event of the image import interactive element, the terminal jumps from the virtual image generation interface to the local image set and displays multiple candidate image images in the local image set.
[0095] In this embodiment, in response to the mode selection operation of the image correction mode, multiple candidate image images in the local image set are displayed, so that the user can independently select the portrait image of the desired part from the existing images as the reference image image, so as to adjust the part to be corrected in the original virtual image to the desired shape.
[0096] In one embodiment, based on the reference part in the reference image, correcting the part to be corrected in the original virtual image to obtain the target virtual image includes:
[0097] The part to be corrected in the original virtual image is corrected based on the reference part to obtain a virtual image including the corrected part; based on the corrected part, a preset image template including the target part is obtained from a database, and the similarity between the target part of the preset image template and the corrected part reaches a similarity threshold; a first part other than the target part in the preset image template is determined, and a second part other than the corrected part in the virtual image including the corrected part is determined; the second part is corrected based on the first part to obtain a target virtual image.
[0098] Specifically, the terminal determines the mapping relationship between the reference part and the part to be corrected based on multiple reference feature points and multiple feature points to be corrected, and corrects the part to be corrected in the original virtual image based on the mapping relationship and the multiple feature points to be corrected to obtain the corrected part, thereby obtaining a virtual image including the corrected part.
[0099] The database includes multiple preset image templates. The terminal can determine the parts of each preset image template that match the corrected parts and calculate the similarity between each matching part and the corrected part. The matching part that reaches a similarity threshold with the corrected part is used as the target part, thereby obtaining a preset image template that includes the target part.
[0100] The terminal may determine a first portion of the preset image template excluding the target portion, and determine a second portion of the virtual image including the corrected portion excluding the corrected portion. The terminal corrects the second portion of the virtual image including the corrected portion based on the first portion of the preset image template to obtain the target virtual image.
[0101] Furthermore, the second part is corrected based on the first part to obtain a target virtual image, including:
[0102] The terminal extracts a plurality of first feature points of the first part and a plurality of second feature points of the second part. Based on the plurality of first feature points and the plurality of second feature points, a mapping relationship between the first part and the second part is determined. Based on the mapping relationship and the plurality of second feature points, the second part is corrected to obtain a target virtual image.
[0103] In this embodiment, the part to be corrected in the original virtual avatar is corrected based on the reference part, resulting in a virtual avatar including the corrected part. This allows the part generated by the user's operation to be adjusted to the user's desired form using an intelligent correction method. However, after adjusting a part, other parts of the virtual avatar may not be in harmony with the corrected part overall. Further adjustments are required to achieve overall harmony. Specifically, based on the corrected part, a preset avatar template including the target part is retrieved from a database. The similarity between the target part of the preset avatar template and the corrected part reaches a similarity threshold, ensuring that the target part of the obtained preset avatar template has a high degree of similarity with the corrected part. If the parts in the preset avatar template are overall harmonious, a first part other than the target part is determined in the preset avatar template, and a second part other than the corrected part is determined in the virtual avatar including the corrected part. The second part is then corrected based on the first part, thereby correcting the second part to a state of harmony with the corrected part. This results in an overall harmonious target virtual avatar, effectively avoiding distortion and deformation of parts within the virtual avatar.
[0104] In one embodiment, the at least one correction mode includes an image correction mode; in response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation includes:
[0105] In response to a mode selection operation for an image correction mode, a picture presented by a camera is displayed; in response to a shooting event triggered by the picture presented by the camera, a portrait image obtained by shooting is used as a reference image image of the original virtual image.
[0106] Specifically, in response to the user's triggering operation on the part to be corrected of the original avatar, the terminal displays at least an image correction mode and may also display a template correction mode on the avatar generation interface.
[0107] The user triggers the image correction mode, calls the terminal's own camera, or calls the camera authorized for use by the terminal, and displays the image presented by the camera.
[0108] The user can use the camera to shoot a picture containing a portrait. In response to the shooting event triggered by the camera, the terminal uses the portrait image obtained by the shooting as a reference image of the original virtual image.
[0109] In this embodiment, in response to the mode selection operation of the image correction mode, the terminal displays the image import interaction element and the image shooting interaction element, and in response to the triggering event of the image shooting interaction element, displays the picture presented by the camera.
[0110] In this embodiment, a real-time shooting function is provided in the virtual image generation interface. In response to the mode selection operation of the image correction mode, the picture presented by the camera is displayed. In response to the shooting event triggered by the picture presented by the camera, the portrait image obtained by shooting is used as the reference image image of the original virtual image, so that the user can use the camera to shoot the required portrait image on the spot. It can provide users with multiple ways to obtain reference image images and can adapt to the needs of different users.
[0111] like Figure 7 As shown, an image import interaction element 702 and an image capture interaction element 704 are displayed on the avatar generation interface 700. The image import interaction element 702 is displayed as "Upload photo", and the image capture interaction element 704 is displayed as "Click to capture".
[0112] The user clicks on the image import interactive element 702 to jump to the local image set 706 , selects a portrait image 708 from the local image set 706 , and uses the portrait image 708 as a reference image for the original virtual image.
[0113] like Figure 8 As shown, the user clicks the image capture interactive element 704, calls the camera, and displays a picture 710 presented by the camera, which includes a person's image. The user captures the picture 710 through the camera and obtains a portrait image 712. The portrait image 712 is used as a reference image for the original virtual image.
[0114] In one embodiment, the at least one correction mode includes a template correction mode; in response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation includes:
[0115] In response to the mode selection operation of the template correction mode, the reference part in each preset image template that matches the part to be corrected is determined; the similarity between the part to be corrected and each reference part is determined respectively; the preset image template to which the reference part whose similarity with the part to be corrected reaches a similarity threshold belongs is used as the reference image image of the original virtual image.
[0116] Specifically, in response to the user's triggering operation on the part to be corrected of the original avatar, the terminal displays at least a template correction mode and may also display an image correction mode on the avatar generation interface.
[0117] When the user triggers template correction mode, the terminal retrieves preset avatar templates from the database and identifies the reference part within each preset avatar template that matches the part to be corrected. The terminal then determines the similarity between the part to be corrected and each reference part. It then identifies the reference part whose similarity with the part to be corrected meets a similarity threshold and uses the preset avatar template to which that reference part belongs as the reference image for the original virtual avatar.
[0118] In this embodiment, when there are multiple preset image templates whose similarities reach a similarity threshold, the multiple preset image templates are fused to obtain a fused image template, and the fused image template is used as a reference image of the original virtual image.
[0119] In this embodiment, when the user chooses to correct the part to be corrected through the template correction mode, the reference part that matches the part to be corrected in each preset image template is determined, and the similarity between the part to be corrected and each reference part is determined, so as to screen out the preset image template to which the reference part with high similarity to the part to be corrected belongs as the reference image, thereby automatically correcting the part to be modified based on the reference image, effectively improving the efficiency and quality of virtual image generation.
[0120] In one embodiment, based on the reference part in the reference image, correcting the part to be corrected in the original virtual image to obtain the target virtual image includes:
[0121] Extracting multiple reference feature points of the reference part and determining the reference coordinates of each reference point;
[0122] Extract multiple feature points to be corrected of the part to be corrected, and determine the coordinates to be corrected of each feature point to be corrected; determine the mapping relationship between the multiple reference feature points and the multiple feature points to be corrected based on the reference coordinates of the multiple reference feature points and the coordinates to be corrected of the multiple feature points to be corrected; based on the mapping relationship and the multiple coordinates to be corrected, correct the multiple feature points to be corrected to obtain the target virtual image.
[0123] Specifically, the terminal extracts feature points from the reference part to obtain multiple reference feature points and determines the reference coordinates of each reference point. The terminal extracts feature points from the part to be corrected to obtain multiple feature points to be corrected and determines the coordinates to be corrected of each feature point to be corrected.
[0124] The terminal determines a mapping relationship between the multiple reference feature points and the multiple feature points to be corrected based on the reference coordinates of the multiple reference feature points and the coordinates of the multiple feature points to be corrected. The mapping relationship between the multiple reference feature points and the multiple feature points to be corrected represents the mapping relationship between the reference part and the part to be corrected.
[0125] Based on the mapping relationship and the multiple coordinates to be corrected, the terminal corrects the multiple feature points to be corrected of the part to be corrected to obtain the target virtual image.
[0126] In this embodiment, multiple reference feature points are extracted from a reference part and the reference coordinates of each reference point are determined. Multiple feature points to be corrected are extracted from a part to be corrected and the coordinates to be corrected of each feature point to be corrected are determined. Thus, based on the reference coordinates of the multiple reference feature points and the coordinates to be corrected of the multiple feature points to be corrected, a mapping relationship between the multiple reference feature points and the multiple feature points to be corrected is accurately determined. Based on the mapping relationship and the multiple coordinates to be corrected, the multiple feature points to be corrected are corrected. Thus, based on the reference part, the part that the user wishes to correct is automatically corrected. This ensures that the corrected part meets the user's expectations while maintaining the overall coordination of the target virtual image. This improves the quality of the generated virtual image through a combination of manual operation and intelligent correction.
[0127] In one embodiment, in response to a triggering operation on a part of the original avatar to be corrected, at least one correction mode for the part to be corrected is displayed on the avatar generation interface, including:
[0128] In response to the triggering operation on the part to be corrected of the original virtual image, the correction entrance bound to the part to be corrected is displayed on the virtual image generation interface; in response to the triggering operation on the correction entrance, at least one correction mode for the part to be corrected is displayed on the virtual image generation interface.
[0129] Specifically, each part of the original virtual image has a bound correction entrance, and the correction entrance is used to display at least one correction mode for the triggered part.
[0130] In response to the user triggering the part to be corrected of the original avatar, the correction entry bound to the part to be corrected is displayed on the avatar generation interface. Further, the correction entry bound to the part to be corrected can be displayed in the corresponding area of the part to be corrected.
[0131] In this embodiment, the display position of the correction entrance in the virtual image generation interface of different operation modes is different. Figure 9 As shown in (a), the part to be corrected is the chin. In the avatar generation interface of the first operation mode, in response to the triggering operation on the chin of the original avatar, a correction entry 902 bound to the chin is displayed at the corresponding area of the chin.
[0132] like Figure 9 As shown in (b), in the avatar generation interface of the second operation mode, in response to the triggering operation on the chin of the original avatar, an operation progress bar 904 of the chin is displayed, and a correction entry 906 bound to the chin is displayed at the corresponding position of the operation progress bar.
[0133] In this embodiment, in response to the triggering operation on the correction entrance, the terminal displays a mode selection area on the virtual image generation interface, and displays at least one correction mode for the part to be corrected in the mode selection area.
[0134] In this embodiment, the correction modes for different parts of the body can be different and can also be selected by the user. For example, each part of the head can use the image correction mode, and each part of the limbs can use the template correction mode.
[0135] In this embodiment, in response to the triggering operation of the part to be corrected of the original virtual image, a correction entry bound to the part to be corrected is displayed on the virtual image generation interface to provide a correction entry for the part to be corrected, so that the user can trigger the display of at least one correction mode for the part to be corrected based on the correction entry, thereby quickly calling the intelligent correction mode based on the correction entry, effectively realizing the combination of user operation to generate the virtual image and intelligent correction of the virtual image.
[0136] In one embodiment, the method further comprises:
[0137] A default image template is displayed on the virtual image generation interface; in response to a part configuration operation on the default image template, a candidate virtual image obtained by the part configuration operation is determined, and multi-perspective configuration data corresponding to the candidate virtual image is determined; a preset image template matching the candidate virtual image is obtained, and multi-perspective template data corresponding to the preset image template is obtained; when the difference between the multi-perspective part configuration data and the multi-perspective template data meets a preset difference condition, the original virtual image is obtained.
[0138] The default image template refers to the image template displayed by default in the virtual image generation interface. Users can configure various parts of the default image template to generate a customized virtual image.
[0139] Multi-view configuration data refers to the configuration data corresponding to the candidate virtual image in multiple different viewpoints.
[0140] Multi-view template data refers to template data corresponding to a preset image template at multiple different view angles.
[0141] The multi-perspective configuration data may include first configuration data of the candidate avatar for a first perspective and second configuration data of the candidate avatar for a second perspective. The multi-perspective template data may include first template data of a preset avatar template for the first perspective and second template data of the preset avatar template for the second perspective.
[0142] Furthermore, the first configuration data of the candidate avatar for the first perspective may include the first configuration data for the part configured by the part configuration operation for the first perspective. The first template data of the preset avatar template for the first perspective may include the first template data for the part of the preset avatar template that matches the configured part for the first perspective.
[0143] Specifically, the terminal displays a default avatar template on the avatar generation interface, allowing the user to configure at least one part of the default avatar template. In response to the part configuration operation on the default avatar template, the terminal determines the part configured in the part configuration operation and determines a candidate avatar obtained after the part configuration operation. The terminal then obtains multi-view configuration data corresponding to the candidate avatar.
[0144] The terminal may match the candidate virtual image with each preset image template in the database to obtain the preset image template that matches the candidate virtual image, and obtain multi-view template data corresponding to the preset image template.
[0145] The terminal can determine the difference between the multi-view part configuration data and the multi-view template data, and obtain the original virtual image when the difference between the multi-view part configuration data and the multi-view template data meets a preset difference condition.
[0146] In this embodiment, when the difference between the multi-view part configuration data and the multi-view template data meets a preset difference condition, a default correction entry is displayed on the avatar generation interface. The correction entry is bound to the configured part.
[0147] In this embodiment, obtaining a preset image template that matches the candidate virtual image includes: the terminal can determine the part configured by the part configuration operation, and determine the part in each preset image template that matches the configured part; determine the similarity between the configured part and each matching part, and use the preset image template to which the matching part whose similarity meets the similarity threshold belongs as the preset image template that matches the candidate virtual image.
[0148] In this embodiment, a default avatar template is displayed on the avatar generation interface, allowing the user to customize various parts within the default avatar template. In response to a part configuration operation on the default avatar template, a candidate avatar obtained from the part configuration operation is determined, and the multi-view configuration data corresponding to the candidate avatar is determined. A preset avatar template matching the candidate avatar is obtained, and the multi-view template data corresponding to the preset avatar template is obtained to determine whether there is a significant difference between the multi-view configuration data of the user-configured candidate avatar and the multi-view configuration data of the preset avatar template. The preset avatar template is a avatar that is both partly and overall harmonious. Excessive differences indicate that the user-configured candidate avatar may be deformed at different viewing angles, resulting in an overall disharmony of the candidate avatar at a particular viewing angle. When the difference between the multi-view part configuration data and the multi-view template data meets a preset difference condition, the user-configured candidate avatar is not deformed at all viewing angles, resulting in an overall harmonious original avatar.
[0149] In one embodiment, the method further comprises:
[0150] In response to the part configuration operation on the default image template, the candidate virtual image obtained by the part configuration operation is displayed on the virtual image generation interface, and the correction entrance in the default state is displayed; when the difference between the multi-perspective part configuration data and the multi-perspective template data does not meet the preset difference condition, the correction entrance will be changed from the default state to the prompt state, and the prompt state is used to prompt the candidate virtual image to be corrected.
[0151] Specifically, the terminal responds to the user's part configuration operation on at least one part of the default image template, determines the part configured by the part configuration operation, and displays the virtual candidate image obtained by the part configuration operation on the virtual image generation interface, and displays the correction entry bound to the configured part and in the default state on the virtual image generation interface.
[0152] When the difference between the multi-view part configuration data and the multi-view template data does not meet the preset difference condition, the terminal will adjust the correction entry from the default state to the prompt state. The prompt state is used to prompt the candidate avatar to be corrected.
[0153] In this embodiment, the correction entry in the default state and the correction entry in the prompt state may have different display styles, which include, but are not limited to, display color, display shape, display size, etc. For example, the correction entry in the default state is static, and the correction entry in the prompt state is dynamic. Or, Figure 10 As shown, the correction entry 902 in the default state is black, and the correction entry 908 in the prompt state is red, and may also be other colors.
[0154] In this embodiment, when the difference between the multi-view part configuration data and the multi-view template data does not meet the preset difference condition, the multi-view part configuration data of the candidate virtual image is corrected based on the multi-view template data to obtain the original virtual image.
[0155] In this embodiment, based on the multi-perspective template data, the multi-perspective part configuration data of the candidate virtual image is corrected to obtain the original virtual image, including: based on the second template data, the second configuration data of the candidate virtual image is corrected to obtain the original virtual image.
[0156] In this embodiment, in response to a part configuration operation on a default avatar template, the candidate avatar resulting from the part configuration operation is displayed on the avatar generation interface, along with a default correction entry. This entry allows the user to modify the configuration data of the candidate avatar at each perspective, thereby achieving an overall coordinated avatar. If the difference between the multi-perspective part configuration data and the multi-perspective template data does not meet a preset difference condition, the correction entry changes from the default state to a prompt state, prompting the user to modify the candidate avatar, thereby enabling real-time modification of the avatar generated by the user's operation.
[0157] In one embodiment, the multi-perspective configuration data includes first configuration data of the part configured by the part configuration operation for a first perspective, and second configuration data of the candidate avatar for a second perspective; the multi-perspective template data includes first template data of the part in the preset avatar template that matches the configured part for the first perspective, and second template data of the preset avatar template for the second perspective; the preset difference condition includes a first difference condition and a second difference condition;
[0158] When the difference between the multi-view part configuration data and the multi-view template data does not meet the preset difference conditions, the entry will be corrected and changed from the default state to the prompt state, including:
[0159] When the difference between the first configuration data of the first perspective and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data of the second perspective and the second template data of the second perspective does not meet the second difference condition, the entrance will be corrected and changed from the default state to the prompt state.
[0160] The first perspective is different from the second perspective. For example, the first perspective is a frontal perspective of the candidate virtual image, and the second perspective is a side perspective of the candidate virtual image, but the present invention is not limited thereto.
[0161] Specifically, the terminal obtains first configuration data for the configured parts of the candidate avatar for a first perspective, and obtains second configuration data for the candidate avatar for a second perspective. The terminal then determines a part of the preset avatar template that matches the configured part, obtains the first template data for the matching part for the first perspective, and obtains the second template data for the preset avatar template for the second perspective.
[0162] The terminal may determine a difference between the first configuration data of the first perspective and the first template data of the first perspective, and the terminal may determine a difference between the second configuration data of the second perspective and the second template data of the second perspective.
[0163] When the difference between the first configuration data and the first template data satisfies a first difference condition, and the difference between the second configuration data and the second template data does not satisfy a second difference condition, the correction entry is changed from a default state to a prompt state.
[0164] In this embodiment, the terminal displays a default avatar template on the avatar generation interface. The user performs a part configuration operation on the default avatar template from a first perspective. The terminal obtains first configuration data for the part configured in the part configuration operation for the first perspective, and then obtains second configuration data for the candidate avatar from a second perspective. For example, if the user performs a part configuration operation on the chin area of the default avatar template from the front, the terminal obtains the frontal configuration data for the chin area and the side profile configuration data for the configured avatar.
[0165] In this embodiment, the method further includes:
[0166] When the difference between the first configuration data of the first perspective and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data of the second perspective and the second template data of the second perspective does not meet the second difference condition, the correction entry is changed from the default state to the prompt state, and the second configuration data of the candidate virtual image is corrected based on the second template data to obtain the original virtual image.
[0167] In one embodiment, the difference between the second configuration data of the second perspective and the second template data of the second perspective may be the difference between the configuration correlation and the template correlation of the second perspective. The terminal may determine the configuration correlation between the parts of the candidate virtual image of the second perspective based on the second configuration data of the second perspective. Based on the second template data of the second perspective, the template correlation between the parts of the preset image template of the second perspective is determined, and the difference between the configuration correlation and the template correlation is determined. When the difference between the first configuration data and the first template data meets the first difference condition, and the difference between the configuration correlation and the template correlation does not meet the second difference condition, the correction entry is changed from the default state to the prompt state.
[0168] The configuration correlation between the various parts of the candidate avatar from the second perspective may be the correlation between the configured parts and other parts of the candidate avatar from the second perspective. The configuration correlation is used to characterize the correlation between the configured parts and other parts of the candidate avatar from the second perspective and can indicate the coordination of the candidate avatar from the second perspective. For example, poor correlation between the chin data and cheekbone data from the side view may result in an unsmooth profile and distorted chin or cheekbone areas.
[0169] The template correlation between the parts of the preset image template for the second perspective can be the correlation between the matching parts of the preset image template for the second perspective and the parts other than the matching parts. The template correlation is used to represent the correlation between the matching parts and other parts of the preset image template for the second perspective, and can indicate the coordination of the preset image template for the second perspective.
[0170] In one embodiment, the method further comprises:
[0171] In response to a triggering operation on the correction entry in the prompt state, the second configuration data of the candidate virtual image is corrected based on the second template data to obtain the original virtual image.
[0172] In this embodiment, the second configuration data of the candidate avatar for the second perspective includes configuration data to be adjusted for parts of the candidate avatar other than the configured parts for the second perspective; the second template data of the preset avatar template for the second perspective includes reference template data for parts of the preset avatar template other than the matching parts for the second perspective; and modifying the second configuration data of the candidate avatar based on the second template data to obtain the original avatar includes:
[0173] Based on the reference template data, the configuration data to be adjusted is corrected to obtain the adjusted configuration data; the configuration data to be adjusted for the parts of the candidate virtual image other than the configured parts for the second perspective are replaced with the adjusted configuration data to obtain the original virtual image.
[0174] Furthermore, the second configuration data of the candidate avatar for the second perspective further includes target configuration data of the configured parts for the second perspective; the second template data of the preset avatar template for the second perspective further includes target template data of the matching parts for the second perspective; and the configuration data to be adjusted for the second perspective of the parts of the candidate avatar other than the configured parts is replaced with the adjusted configuration data to obtain the original avatar, including:
[0175] Determine the configuration correlation between the target configuration data and the adjusted configuration data, and determine the template correlation between the target template data and the reference template data; when the difference between the configuration correlation and the template correlation meets the second difference condition, replace the configuration data to be adjusted for the second perspective of the parts other than the configured parts in the candidate virtual image with the adjusted configuration data to obtain the original virtual image.
[0176] In this embodiment, the multi-perspective configuration data includes first configuration data of the part configured by the part configuration operation for the first perspective, and second configuration data of the candidate virtual image for the second perspective; the multi-perspective template data includes first template data of the part matching the configured part in the preset image template for the first perspective, and second template data of the preset image template for the second perspective, so that when the difference between the first configuration data of the first perspective and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data of the second perspective and the second template data of the second perspective does not meet the second difference condition, the correction entry will be changed from the default state to the prompt state to prompt the user that some parts of the currently generated candidate virtual image are deformed at a certain perspective, or the lines of the virtual image at a certain perspective are not smooth, the parts are not coordinated, etc., thereby effectively prompting the user to adjust these defects to ensure the quality of the generated virtual image.
[0177] In one embodiment, the second configuration data of the candidate avatar for the second perspective includes target configuration data of the configured parts for the second perspective, and configuration data to be adjusted for parts of the candidate avatar other than the configured parts for the second perspective; the second template data of the preset avatar template for the second perspective includes target template data of the matched parts for the second perspective, and reference template data of parts of the preset avatar template other than the matched parts for the second perspective;
[0178] The method further includes:
[0179] Based on the reference template data, the configuration data to be adjusted is corrected to obtain the adjusted configuration data; the configuration correlation between the target configuration data and the adjusted configuration data is determined, and the template correlation between the target template data and the reference template data is determined; when the difference between the configuration correlation and the template correlation meets the second difference condition, the entry is corrected and changed from the prompt state to the default state.
[0180] In this embodiment, the terminal obtains target configuration data for the configured part for the second perspective, and obtains configuration data for the parts of the candidate avatar other than the configured part for the second perspective, i.e., the configuration data to be adjusted. The terminal obtains target template data for the part of the preset avatar template that matches the configured part for the second perspective, and obtains reference template data for the parts of the preset avatar template other than the matching part for the second perspective.
[0181] The terminal may correct the candidate avatar's configuration data to be adjusted based on the reference template data to obtain adjusted configuration data, thereby obtaining the original avatar. The original avatar's configuration data for the second perspective includes the target configuration data for the configured parts for the second perspective, as well as the adjusted configuration data for parts of the original avatar other than the configured parts for the second perspective. Furthermore, after correcting the candidate avatar's configuration data to be adjusted based on the reference template data, the correction entry may be changed from a prompt state to a default state.
[0182] Furthermore, after obtaining the adjusted configuration data, the configuration correlation between the configured part and the parts other than the configured part can be determined based on the target configuration data and the adjusted configuration data. The configuration correlation is the correlation for the second perspective.
[0183] The terminal determines the template correlation between the parts other than the matching parts in the preset image template and the matching parts based on the target template data and the reference template data. The template correlation is the correlation for the second perspective.
[0184] When the difference between the configuration association degree of the second perspective and the template association degree of the second perspective meets the second difference condition, the original virtual image is obtained, and the correction entrance is changed from the prompt state to the default state.
[0185] In this embodiment, the configuration data to be adjusted is corrected based on the reference template data to obtain the adjusted configuration data, including: in response to a trigger operation on a correction entry in a prompt state, the configuration data to be adjusted is corrected based on the reference template data to obtain the adjusted configuration data.
[0186] Furthermore, in response to a triggering operation on a correction entry in a prompt state, a mode selection area is displayed, wherein the mode selection area displays at least one correction mode. The at least one correction mode includes a local correction mode. In response to the triggering operation on the local correction mode, the configuration data to be adjusted is corrected based on the reference template data to obtain adjusted configuration data.
[0187] In this embodiment, the configuration data to be adjusted is corrected based on the reference template data to obtain adjusted configuration data. The configuration correlation between the target configuration data and the adjusted configuration data is determined, thereby calculating the correlation between the user-configured portion and other portions of the avatar in the second perspective. The template correlation between the target template data and the reference template data is determined, thereby calculating the correlation between the portion matching the configured portion and other portions of the preset avatar template in the second perspective. If the difference between the correlation of the avatar in the second perspective and the correlation of the preset avatar template in the second perspective is within the error range, indicating that the avatar is overall harmonious in the second perspective and no further adjustment is required, the correction entry is changed from the prompt state to the default state.
[0188] In one embodiment, a method for generating a virtual image is provided, which is applied to a terminal and includes:
[0189] The default avatar template is displayed on the avatar generation interface.
[0190] In response to a part configuration operation on a default image template, a candidate virtual image obtained by the part configuration operation is determined, and first configuration data of the parts configured by the part configuration operation for a first perspective and second configuration data of the candidate virtual image for a second perspective are determined.
[0191] A preset image template matching the candidate virtual image is obtained, and first template data of a part matching the configured part in the preset image template for a first perspective and second template data of the preset image template for a second perspective are obtained.
[0192] When the difference between the first configuration data and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data and the second template data of the second perspective meets the second difference condition, the original virtual image is displayed on the virtual image generation interface, and the correction entrance in the default state is displayed.
[0193] When the difference between the first configuration data and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data and the second template data of the second perspective does not meet the second difference condition, the correction entry will be changed from the default state to the prompt state, and the prompt state is used to prompt the candidate virtual image to be corrected.
[0194] Among them, the second configuration data of the candidate virtual image for the second perspective includes the target configuration data of the configured parts for the second perspective, and the configuration data to be adjusted of the parts of the candidate virtual image other than the configured parts for the second perspective; the second template data of the preset image template for the second perspective includes the target template data of the matching parts for the second perspective, and the reference template data of the parts of the preset image template other than the matching parts for the second perspective.
[0195] In response to a triggering operation on the correction entry, the configuration data to be adjusted is corrected based on the reference template data to obtain adjusted configuration data.
[0196] Furthermore, a configuration correlation between the target configuration data and the adjusted configuration data is determined, and a template correlation between the target template data and the reference template data is determined.
[0197] When the difference between the configuration association degree and the template association degree satisfies the second difference condition, the original virtual image is obtained, and the correction entry is changed from the prompt state to the default state.
[0198] In response to a triggering operation on a part of the original avatar to be corrected, a correction entry bound to the part to be corrected is displayed on the avatar generation interface.
[0199] In response to a trigger operation on the correction portal, an image correction mode and a template correction mode are displayed on the avatar generation interface.
[0200] Optionally, in response to a mode selection operation for an image correction mode, an image import interactive element and an image shooting interactive element are displayed; in response to a triggering event for an image import interactive element, multiple candidate image images in a local image set are displayed; in response to an image selection event for multiple candidate image images, the candidate image image selected by the image selection event is used as a reference image image of the original virtual image.
[0201] In response to a triggering event of an image import interactive element, a picture presented by a camera is displayed; in response to a shooting event triggered by the picture presented by the camera, a portrait image obtained by shooting is used as a reference image image of the original virtual image.
[0202] Next, a reference part matching the part to be corrected is determined in the reference image. The part to be corrected in the original virtual image is corrected based on the reference part to obtain a virtual image including the corrected part.
[0203] Furthermore, based on the corrected part, a preset image template including the target part is obtained from the database, and the similarity between the target part of the preset image template and the corrected part reaches a similarity threshold; a first part other than the target part in the preset image template is determined, and a second part other than the corrected part in the virtual image including the corrected part is determined; the second part is corrected based on the first part to obtain the target virtual image.
[0204] Optionally, in response to a mode selection operation for a template correction mode, a reference part in each preset image template that matches the part to be corrected is determined; the similarity between the part to be corrected and each reference part is determined respectively; and the preset image template to which the reference part, whose similarity with the part to be corrected reaches a similarity threshold, belongs is used as a reference image image of the original virtual image.
[0205] Next, multiple reference feature points of the reference part are extracted, and the reference coordinates of each reference point are determined; multiple feature points to be corrected of the part to be corrected are extracted, and the coordinates to be corrected of each feature point to be corrected are determined; based on the reference coordinates of the multiple reference feature points and the coordinates to be corrected of the multiple feature points to be corrected, a mapping relationship between the multiple reference feature points and the multiple feature points to be corrected is determined; based on the mapping relationship and the multiple coordinates to be corrected, the multiple feature points to be corrected are corrected to obtain a target virtual image.
[0206] In one embodiment, an application scenario of a method for generating a virtual image is provided, and the specific process is as follows:
[0207] like Figure 11 As shown, in the first operating mode, the user performs a gesture operation on the avatar generation interface 1100 of the default frontal view to adjust the chin of the default avatar template from the frontal view. The terminal synchronizes the chin configuration data generated by this gesture operation to the local computer and compares it with the preset avatar templates in the database in real time. If the chin is inconsistent with the other parts of the avatar from the side view, that is, the chin is deformed and appears inconsistent from the side view, the correction entry associated with the chin is changed from the default state 1102 to the prompt state 1104.
[0208] like Figure 12 As shown, the user clicks on the correction entrance in the prompt state, and three correction modes are displayed, namely, image correction mode, local correction mode and random correction mode.
[0209] When the user clicks on the local correction mode, the terminal calculates the similarity between the chin part of the front view and the chin parts of the front view of each preset image template in the database, and selects the preset image template with the highest similarity.
[0210] The template data of the filtered preset image template in the side view is determined, and the template data of the side view includes the template data of the chin part in the side view and the template data of other parts in the side view.
[0211] Determine the configuration data of the avatar in the avatar generation interface in the side view, where the configuration data of the side view includes the configuration data of the chin in the side view and the configuration data of other parts in the side view.
[0212] The configuration data of other parts of the side view are adjusted through the template data of other parts of the side view, so that the virtual image in the virtual image generation interface is coordinated in various parts of the side view.
[0213] After the adjustment, the correction entry of the prompt state is switched to the default state. At this time, the avatar displayed in the avatar generation interface is called the original avatar.
[0214] When the user clicks on the nose of the original avatar, a correction entry associated with the nose is displayed in the area corresponding to the nose. The user clicks on the correction entry to display three correction modes.
[0215] When the user clicks "Upload Photo", it means selecting the image correction mode, adjusting from the virtual image generation interface to the local image set, and the user selects a portrait with a nose that he or she is satisfied with in the local image set. The terminal uses the portrait selected by the user as the reference image of the original virtual image.
[0216] The terminal maps the nose data in the user-selected portrait to the nose of the original avatar, ensuring that the original avatar has the same nose as the portrait. The terminal selects a preset image template from a database that has a high degree of similarity to the corrected nose and determines template data corresponding to the parts of the preset image template other than the nose. The terminal then determines configuration data corresponding to the parts of the original avatar other than the nose and, based on the template data for the other parts, adjusts the configuration data of the corresponding parts of the original avatar so that the mapped nose of the original avatar is consistent with the other parts of the original avatar.
[0217] like Figure 13 The following is a schematic diagram of the architecture of an avatar generation method in one embodiment. The avatar's display is implemented using three engines: Unreal, Unity, and Filament. Using the UnLua interface, a configuration table for the character's clothing and facial shape is retrieved. Based on the distance, the corresponding model and material, or a specialized simple avatar, is then retrieved. Unity and Filament are ported from Unreal.
[0218] User configuration of the avatar includes, but is not limited to, adjusting the face shape, facial feature placement, and shape, as well as the appearance and hairstyle. Artists create a batch of preset avatar templates that match the product's style and store them in a template database. The template database must cover various combinations of face shapes and facial feature proportions.
[0219] The input data for AI local correction includes, but is not limited to, the following: the configuration data of the original avatar, and the areas of the original avatar that the user is satisfied with and unsatisfied with. Satisfactory areas include, for example, areas where key points meet expectations and for which AI adjustment is not desired. Unsatisfactory areas are areas to be corrected, such as areas where key points do not meet user expectations and for which AI adjustment is desired.
[0220] Keypoint information can be complete vertex coordinates in a 3D head model, or partial information. For example, the x and y coordinates of certain keypoints are as expected, but the z coordinate needs to be adjusted. Keypoints primarily represent key locations of facial features.
[0221] AI recognition template matching: Based on the input data, a suitable preset image template is retrieved from a template database. One or more preset image templates can be retrieved. When multiple preset image templates are retrieved, they are fused according to weights. For example, a 3DMM algorithm is used to calculate blendshape weights for multiple preset image templates, generating a set of feature vectors. The corresponding faces in the template database are then blended according to the weights to obtain the target face.
[0222] AI Local Correction: After obtaining the target face, key points requiring correction are extracted, such as the coordinates of feature points. A non-rigid deformation algorithm is applied to the original face, with the control information for these key points fed into the algorithm. This ensures that areas not intended for AI correction remain unchanged, while areas intended for AI correction are adjusted to the desired degree. This also constrains the overall smoothness of the avatar, resulting in the target avatar.
[0223] In this embodiment, a simple click operation is used to help ordinary users generate virtual images at a lower cost and faster speed, and the generated virtual images meet user expectations and have better quality.
[0224] It should be understood that, although the various steps in the flowcharts involved in the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0225] Based on the same inventive concept, embodiments of the present application also provide a virtual image generation device for implementing the aforementioned virtual image generation method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more virtual image generation device embodiments provided below can be found in the aforementioned limitations of the virtual image generation method and will not be further elaborated here.
[0226] In one embodiment, Figure 14 As shown, a virtual image generation device 1400 is provided, including: an image display module 1402, a mode display module 1404, an acquisition module 1406, a determination module 1408 and a correction module 1410, wherein:
[0227] The image display module 1402 is used to display the original virtual image obtained by user operation on the virtual image generation interface.
[0228] The mode display module 1404 is configured to display at least one correction mode for the part to be corrected on the virtual image generation interface in response to a triggering operation on the part to be corrected of the original virtual image.
[0229] The acquisition module 1406 is configured to, in response to a mode selection operation performed on at least one correction mode, acquire a reference image of the original virtual image according to the correction mode selected by the mode selection operation.
[0230] The determination module 1408 is configured to determine a reference part that matches the part to be corrected in the reference image.
[0231] The correction module 1410 is configured to correct the part to be corrected in the original virtual image based on the reference part in the reference image image to obtain a target virtual image.
[0232] In this embodiment, an original avatar generated by user operation is displayed on the avatar generation interface to obtain an original avatar generated by user-defined operation. In response to a trigger operation on a part of the original avatar to be corrected, at least one correction mode for the part to be corrected is displayed on the avatar generation interface, providing the user with a method for correcting the customized avatar. In response to a mode selection operation for at least one correction mode, a reference image of the original avatar is obtained according to the selected correction mode. Different correction modes use different reference image images, enabling customized avatar corrections to be adapted for different users and scenarios. Within the reference image image, a reference part matching the part to be corrected is determined. Based on the reference part in the reference image, the part to be corrected in the original avatar is corrected. This allows for the intelligent correction method to locally correct and enhance the user-defined avatar, reducing distortion and deformation of various parts of the avatar, thereby achieving a more harmonious overall target avatar. Furthermore, through the combination of manual customization of the avatar and intelligent correction and beautification of the avatar, the time spent on customized avatar generation can be reduced, improving the efficiency and quality of avatar generation.
[0233] In one embodiment, at least one correction mode includes an image correction mode; the acquisition module 1406 is also used to display multiple candidate image images in the local image set in response to a mode selection operation of the image correction mode; in response to an image selection event of the multiple candidate image images, the candidate image image selected by the image selection event is used as a reference image image of the original virtual image.
[0234] In this embodiment, in response to the mode selection operation of the image correction mode, multiple candidate image images in the local image set are displayed, so that the user can independently select the portrait image of the desired part from the existing images as the reference image image, so as to adjust the part to be corrected in the original virtual image to the desired shape.
[0235] In one embodiment, the correction module 1410 is further used to correct the part to be corrected in the original virtual image based on the reference part to obtain a virtual image including the corrected part; based on the corrected part, obtain a preset image template including the target part from the database, and the similarity between the target part of the preset image template and the corrected part reaches a similarity threshold; determine a first part other than the target part in the preset image template, and determine a second part other than the corrected part in the virtual image including the corrected part; correct the second part based on the first part to obtain a target virtual image.
[0236] In this embodiment, the part to be corrected in the original virtual avatar is corrected based on the reference part, resulting in a virtual avatar including the corrected part. This allows the part generated by the user's operation to be adjusted to the user's desired form using an intelligent correction method. However, after adjusting a part, other parts of the virtual avatar may not be in harmony with the corrected part overall. Further adjustments are required to achieve overall harmony. Specifically, based on the corrected part, a preset avatar template including the target part is retrieved from a database. The similarity between the target part of the preset avatar template and the corrected part reaches a similarity threshold, ensuring that the target part of the obtained preset avatar template has a high degree of similarity with the corrected part. If the parts in the preset avatar template are overall harmonious, a first part other than the target part is determined in the preset avatar template, and a second part other than the corrected part is determined in the virtual avatar including the corrected part. The second part is then corrected based on the first part, thereby correcting the second part to a state of harmony with the corrected part. This results in an overall harmonious target virtual avatar, effectively avoiding distortion and deformation of parts within the virtual avatar.
[0237] In one embodiment, at least one correction mode includes an image correction mode; the acquisition module 1406 is also used to display the picture presented by the camera in response to a mode selection operation of the image correction mode; in response to a shooting event triggered by the picture presented by the camera, the portrait image obtained by shooting is used as a reference image of the original virtual image.
[0238] In this embodiment, a real-time shooting function is provided in the virtual image generation interface. In response to the mode selection operation of the image correction mode, the picture presented by the camera is displayed. In response to the shooting event triggered by the picture presented by the camera, the portrait image obtained by shooting is used as the reference image image of the original virtual image, so that the user can use the camera to shoot the required portrait image on the spot. It can provide users with multiple ways to obtain reference image images and can adapt to the needs of different users.
[0239] In one embodiment, at least one correction mode includes a template correction mode; the acquisition module 1406 is further used to determine the reference part in each preset image template that matches the part to be corrected in response to the mode selection operation of the template correction mode; determine the similarity between the part to be corrected and each reference part respectively; and use the preset image template to which the reference part, whose similarity with the part to be corrected reaches a similarity threshold, belongs as the reference image image of the original virtual image.
[0240] In this embodiment, when the user chooses to correct the part to be corrected through the template correction mode, the reference part that matches the part to be corrected in each preset image template is determined, and the similarity between the part to be corrected and each reference part is determined, so as to screen out the preset image template to which the reference part with high similarity to the part to be corrected belongs as the reference image, thereby automatically correcting the part to be modified based on the reference image, effectively improving the efficiency and quality of virtual image generation.
[0241] In one embodiment, the correction module 1410 is also used to extract multiple reference feature points of the reference part and determine the reference coordinates of each reference point; extract multiple feature points to be corrected of the part to be corrected and determine the coordinates to be corrected of each feature point to be corrected; determine the mapping relationship between the multiple reference feature points and the multiple feature points to be corrected based on the reference coordinates of the multiple reference feature points and the coordinates to be corrected of the multiple feature points to be corrected; correct the multiple feature points to be corrected based on the mapping relationship and the reference coordinates of the multiple coordinates to be corrected to obtain the target virtual image.
[0242] In this embodiment, multiple reference feature points are extracted from a reference part and the reference coordinates of each reference point are determined. Multiple feature points to be corrected are extracted from a part to be corrected and the coordinates to be corrected of each feature point to be corrected are determined. Thus, based on the reference coordinates of the multiple reference feature points and the coordinates to be corrected of the multiple feature points to be corrected, a mapping relationship between the multiple reference feature points and the multiple feature points to be corrected is accurately determined. Based on the mapping relationship and the multiple coordinates to be corrected, the multiple feature points to be corrected are corrected. Thus, based on the reference part, the part that the user wishes to correct is automatically corrected. This ensures that the corrected part meets the user's expectations while maintaining the overall coordination of the target virtual image. This improves the quality of the generated virtual image through a combination of manual operation and intelligent correction.
[0243] In one embodiment, the mode display module 1404 is also used to respond to the triggering operation of the part to be corrected of the original virtual image, and display the correction entry bound to the part to be corrected on the virtual image generation interface; in response to the triggering operation of the correction entry, display at least one correction mode for the part to be corrected on the virtual image generation interface.
[0244] In this embodiment, in response to the triggering operation of the part to be corrected of the original virtual image, a correction entry bound to the part to be corrected is displayed on the virtual image generation interface to provide a correction entry for the part to be corrected, so that the user can trigger the display of at least one correction mode for the part to be corrected based on the correction entry, thereby quickly calling the intelligent correction mode based on the correction entry, effectively realizing the combination of user operation to generate the virtual image and intelligent correction of the virtual image.
[0245] In one embodiment, the image display module 1402 is also used to display a default image template on the virtual image generation interface; in response to a part configuration operation on the default image template, determine a candidate virtual image obtained by the part configuration operation, and determine the multi-perspective configuration data corresponding to the candidate virtual image; obtain a preset image template that matches the candidate virtual image, and obtain the multi-perspective template data corresponding to the preset image template; when the difference between the multi-perspective part configuration data and the multi-perspective template data meets the preset difference condition, obtain the original virtual image.
[0246] In this embodiment, a default avatar template is displayed on the avatar generation interface, allowing the user to customize various parts within the default avatar template. In response to a part configuration operation on the default avatar template, a candidate avatar obtained from the part configuration operation is determined, and the multi-view configuration data corresponding to the candidate avatar is determined. A preset avatar template matching the candidate avatar is obtained, and the multi-view template data corresponding to the preset avatar template is obtained to determine whether there is a significant difference between the multi-view configuration data of the user-configured candidate avatar and the multi-view configuration data of the preset avatar template. The preset avatar template is a avatar that is both partly and overall harmonious. Excessive differences indicate that the user-configured candidate avatar may be deformed at different viewing angles, resulting in an overall disharmony of the candidate avatar at a particular viewing angle. When the difference between the multi-view part configuration data and the multi-view template data meets a preset difference condition, the user-configured candidate avatar is not deformed at all viewing angles, resulting in an overall harmonious original avatar.
[0247] In one embodiment, the device also includes an entry display module for displaying a candidate virtual image obtained by the part configuration operation on the default image template in the virtual image generation interface in response to the part configuration operation on the default image template, and displaying a correction entry in the default state; when the difference between the multi-perspective part configuration data and the multi-perspective template data does not meet the preset difference condition, the correction entry will be changed from the default state to the prompt state, and the prompt state is used to prompt the candidate virtual image to be corrected.
[0248] In this embodiment, in response to a part configuration operation on a default avatar template, the candidate avatar resulting from the part configuration operation is displayed on the avatar generation interface, along with a default correction entry. This entry allows the user to modify the configuration data of the candidate avatar at each perspective, thereby achieving an overall coordinated avatar. If the difference between the multi-perspective part configuration data and the multi-perspective template data does not meet a preset difference condition, the correction entry changes from the default state to a prompt state, prompting the user to modify the candidate avatar, thereby enabling real-time modification of the avatar generated by the user's operation.
[0249] In one embodiment, the multi-perspective configuration data includes first configuration data of the part configured by the part configuration operation for a first perspective, and second configuration data of the candidate avatar for a second perspective; the multi-perspective template data includes first template data of the part in the preset avatar template that matches the configured part for the first perspective, and second template data of the preset avatar template for the second perspective; the preset difference condition includes a first difference condition and a second difference condition;
[0250] The entrance display module is also used to correct the entrance and change it from the default state to the prompt state when the difference between the first configuration data of the first perspective and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data of the second perspective and the second template data of the second perspective does not meet the second difference condition.
[0251] In this embodiment, the multi-perspective configuration data includes first configuration data of the part configured by the part configuration operation for the first perspective, and second configuration data of the candidate virtual image for the second perspective; the multi-perspective template data includes first template data of the part matching the configured part in the preset image template for the first perspective, and second template data of the preset image template for the second perspective, so that when the difference between the first configuration data of the first perspective and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data of the second perspective and the second template data of the second perspective does not meet the second difference condition, the correction entry will be changed from the default state to the prompt state to prompt the user that some parts of the currently generated candidate virtual image are deformed at a certain perspective, or the lines of the virtual image at a certain perspective are not smooth, the parts are not coordinated, etc., thereby effectively prompting the user to adjust these defects to ensure the quality of the generated virtual image.
[0252] In one embodiment, the second configuration data of the candidate avatar for the second perspective includes target configuration data of the configured parts for the second perspective, and configuration data to be adjusted for parts of the candidate avatar other than the configured parts for the second perspective; the second template data of the preset avatar template for the second perspective includes target template data of the matched parts for the second perspective, and reference template data of parts of the preset avatar template other than the matched parts for the second perspective;
[0253] The entry display module is also used to correct the configuration data to be adjusted based on the reference template data to obtain the adjusted configuration data; determine the configuration correlation between the target configuration data and the adjusted configuration data, and determine the template correlation between the target template data and the reference template data; when the difference between the configuration correlation and the template correlation meets the second difference condition, the entry will be corrected and changed from the prompt state to the default state.
[0254] In this embodiment, the configuration data to be adjusted is corrected based on the reference template data to obtain adjusted configuration data. The configuration correlation between the target configuration data and the adjusted configuration data is determined, thereby calculating the correlation between the user-configured portion and other portions of the avatar in the second perspective. The template correlation between the target template data and the reference template data is determined, thereby calculating the correlation between the portion matching the configured portion and other portions of the preset avatar template in the second perspective. If the difference between the correlation of the avatar in the second perspective and the correlation of the preset avatar template in the second perspective is within the error range, indicating that the avatar is overall harmonious in the second perspective and no further adjustment is required, the correction entry is changed from the prompt state to the default state.
[0255] Each module in the aforementioned virtual image generation device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0256] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 15 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication, and the wireless communication can be achieved via Wi-Fi, a mobile cellular network, NFC (near field communication), or other technologies. When executed by the processor, the computer program implements a method for generating a virtual image. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0257] Those skilled in the art will understand that Figure 15The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0258] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0259] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0260] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0261] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0262] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0263] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0264] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for generating a virtual image, characterized in that: The method comprises: Displaying the original virtual image obtained by the user operation on the virtual image generation interface; In response to a triggering operation on a part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface; In response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation; Determining, in the reference image, a reference portion that matches the portion to be corrected; Based on the reference part in the reference image, the part to be corrected in the original virtual image is corrected to obtain a target virtual image.
2. The method according to claim 1, characterized in that The at least one correction mode includes an image correction mode; and in response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation includes: In response to a mode selection operation for the image correction mode, displaying a plurality of candidate image images in a local image set; In response to an image selection event for the plurality of candidate image images, the candidate image image selected by the image selection event is used as a reference image image of the original virtual image.
3. The method according to claim 2, characterized in that The step of correcting the part to be corrected in the original virtual image based on the reference part in the reference image image to obtain a target virtual image includes: Correcting the part to be corrected in the original virtual image based on the reference part to obtain a virtual image including the corrected part; Based on the corrected part, a preset image template including a target part is obtained from a template database, wherein the similarity between the target part and the corrected part of the preset image template reaches a similarity threshold; determining a first part other than the target part in the preset image template, and determining a second part other than the corrected part in the virtual image including the corrected part; The second part is corrected based on the first part to obtain a target virtual image.
4. The method according to claim 1, characterized in that The at least one correction mode includes an image correction mode; and in response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation includes: In response to a mode selection operation for the image correction mode, displaying a picture presented by a camera; In response to a shooting event triggered by the image presented by the camera, the portrait image obtained by shooting is used as a reference image of the original virtual image.
5. The method according to claim 1, characterized in that The at least one correction mode includes a template correction mode; and in response to a mode selection operation performed on the at least one correction mode, obtaining a reference image of the original virtual image according to the correction mode selected by the mode selection operation includes: In response to a mode selection operation for the template correction mode, determining a reference part in each preset image template that matches the part to be corrected; respectively determining the similarity between the part to be corrected and each of the reference parts; The preset image template to which the reference part, whose similarity with the part to be corrected reaches a similarity threshold, belongs is used as the reference image image of the original virtual image.
6. The method according to claim 5, characterized in that The step of correcting the part to be corrected in the original virtual image based on the reference part in the reference image image to obtain a target virtual shape includes: Extracting a plurality of reference feature points of the reference part, and determining the reference coordinates of each of the reference points; Extracting a plurality of feature points to be corrected of the part to be corrected, and determining the coordinates to be corrected of each feature point to be corrected; determining, based on the reference coordinates of the plurality of reference feature points and the coordinates to be corrected of the plurality of feature points to be corrected, a mapping relationship between the plurality of reference feature points and the plurality of feature points to be corrected; Based on the mapping relationship and the multiple coordinates to be corrected, the multiple feature points to be corrected are corrected to obtain a target virtual image.
7. The method according to claim 1, characterized in that In response to a triggering operation on the part to be corrected of the original avatar, displaying at least one correction mode for the part to be corrected on the avatar generation interface includes: In response to a triggering operation on a part to be corrected of the original avatar, displaying a correction entry bound to the part to be corrected on the avatar generation interface; In response to a triggering operation on the correction entrance, at least one correction mode for the part to be corrected is displayed on the virtual image generation interface.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Displaying a default avatar template on the avatar generation interface; In response to a part configuration operation on the default image template, determining a candidate virtual image obtained by the part configuration operation, and determining multi-view configuration data corresponding to the candidate virtual image; Acquire a preset image template that matches the candidate avatar, and acquire multi-view template data corresponding to the preset image template; When the difference between the multi-view part configuration data and the multi-view template data meets a preset difference condition, an original virtual image is obtained.
9. The method according to claim 8, characterized in that The method further comprises: In response to a part configuration operation on the default avatar template, displaying a candidate avatar obtained by the part configuration operation on the avatar generation interface, and displaying a correction entry in a default state; When the difference between the multi-view part configuration data and the multi-view template data does not meet the preset difference condition, the correction entry is changed from the default state to the prompt state, and the prompt state is used to prompt the candidate virtual image to be corrected.
10. The method according to claim 9, characterized in that The multi-perspective configuration data includes first configuration data for the part configured by the part configuration operation for a first perspective, and second configuration data for the candidate avatar for a second perspective; the multi-perspective template data includes first template data for the part of the preset avatar template that matches the configured part for the first perspective, and second template data for the preset avatar template for the second perspective; The preset difference condition includes the first difference condition and the second difference condition; When the difference between the multi-view part configuration data and the multi-view template data does not meet a preset difference condition, changing the correction entry from the default state to the prompt state includes: When the difference between the first configuration data of the first perspective and the first template data of the first perspective meets the first difference condition, and the difference between the second configuration data of the second perspective and the second template data of the second perspective does not meet the second difference condition, the correction entry is changed from the default state to the prompt state.
11. The method according to claim 10, characterized in that The second configuration data of the candidate avatar for the second perspective includes target configuration data of the configured parts for the second perspective, and configuration data to be adjusted for parts of the candidate avatar other than the configured parts for the second perspective; the second template data of the preset avatar template for the second perspective includes target template data of the matched parts for the second perspective, and reference template data of parts of the preset avatar template other than the matched parts for the second perspective; The method further comprises: Correcting the configuration data to be adjusted based on the reference template data to obtain adjusted configuration data; determining a configuration association between the target configuration data and the adjusted configuration data, and determining a template association between the target template data and the reference template data; When the difference between the configuration association degree and the template association degree satisfies the second difference condition, the correction entry is changed from the prompt state to the default state.
12. A virtual image generating device, characterized in that: The device comprises: An image display module, configured to display an original virtual image obtained by user operation on a virtual image generation interface; a mode display module, configured to display at least one correction mode for the part to be corrected on the avatar generation interface in response to a triggering operation on the part to be corrected of the original avatar; an acquisition module, configured to, in response to a mode selection operation performed on the at least one correction mode, acquire a reference image of the original virtual image according to the correction mode selected by the mode selection operation; A determination module, configured to determine, in the reference image, a reference portion that matches the portion to be corrected; The correction module is used to correct the part to be corrected in the original virtual image based on the reference part in the reference image image to obtain a target virtual image.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When a processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 11.