Virtual image generation method and device
The interface feature label is determined through the interface scene image and image recognition model, and the image feature label is determined in combination with the feature matching model, which solves the problem of a lot of manpower and time cost in virtual image design, and realizes the automatic and rapid generation of virtual character images that meet the scene interface, improving work efficiency.
Patent Information
- Application Number
- CN201910887776.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-19
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2040-02-08
AI Technical Summary
In the prior art, virtual image design requires a lot of manpower and time costs, and it is difficult to quickly generate virtual character images that meet the scene interface.
The interface feature label is determined through the interface scene image and image recognition model, and the image feature label is determined based on the feature matching model, and the virtual object is rendered based on these labels to generate virtual images.
It realizes the automatic and rapid output of virtual characters' image and appearance solutions, improves work efficiency and reduces the investment in labor and time costs.
Smart Images

Figure HDA0002207830790000011 
Figure HDA0002207830790000021 
Figure HDA0002207830790000031
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer information processing, and in particular, to a method and device for generating a virtual image. Background Art
[0002] With the development of science and technology, the media for interaction and information exchange between systems and users has expanded from the original simple dialogue window to more forms, such as using virtual images to simulate scenes and assist computer programs in human-computer interaction. This method has been widely welcomed by users due to its rich fun and affinity.
[0003] Currently, the design of virtual images requires purely manual setting and construction of virtual characters and images. The design and construction of virtual images requires a lot of manpower costs. The design of a character image requires the cooperation of producers, product managers, UI designers, original artists, and other people. At the same time, it also requires a lot of time costs. The time required for design and construction ranges from two weeks to several months, and the overall cycle is long. As the application scope of virtual images expands, how to quickly generate virtual images has become a problem that needs to be solved. Summary of the invention
[0004] In view of this, the present disclosure provides a method and device for generating a virtual image, which can automatically and quickly output the image and appearance of a virtual character, improve work efficiency, and reduce the investment in manpower and time costs.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0006] According to one aspect of the present disclosure, a method for generating a virtual image is proposed, the method comprising: determining at least one interface feature label based on at least one interface scene image; determining an image feature label based on at least one interface feature label and a feature matching model, the image feature label comprising at least one of the following: a skin color label, a hair color label, a texture label, and a color matching label; and rendering a virtual object based on the image feature label to generate a virtual image.
[0007] According to one aspect of the present disclosure, a virtual image generation device is proposed, which includes: an interface feature module, used to determine at least one interface feature label based on at least one interface scene image; an image feature module, used to determine an image feature label based on at least one interface feature label and a feature matching model, the image feature label including at least one of the following: skin color label, hair color label, texture label, color matching label; and an image generation module, used to generate a virtual image based on the image feature label.
[0008] In one embodiment, it also includes: a data acquisition module for acquiring a virtual scene image; an image processing module for performing image processing on the virtual scene image to specify feature labels; an image recognition module for training a first machine learning model through the virtual scene image with feature labels to generate the image recognition model; and / or a feature matching module for training a second machine learning model through the virtual scene image with feature labels to generate the feature matching model; wherein the virtual scene image includes a virtual image and an interface scene.
[0009] In one embodiment, the data acquisition module is also used to acquire the virtual scene image through the blockchain system.
[0010] In one embodiment, the image processing module includes: an area unit, which is used to perform image processing on the virtual scene image to determine the virtual image area and the interface scene area; an image unit, which is used to specify at least one image feature label for the virtual image area; an interface unit, which is used to specify at least one interface feature label for the interface scene area; and a label unit, which is used to generate a feature label through at least one image feature label and at least one interface feature label.
[0011] In one embodiment, the image recognition module includes: an analysis unit, which is used to perform image analysis processing on the virtual scene image to obtain image feature data; an input unit, which is used to input the virtual scene image with feature labels and its corresponding image feature data into a generative adversarial network model; and a training unit, which is used to train the generative adversarial network model based on the image feature data and the interface feature labels in the feature labels to generate an image recognition model.
[0012] In one embodiment, the feature matching module includes: a scene unit, which is used to input a virtual scene image with feature labels into a neural network model; and a matching unit, which is used to train the neural network model based on the interface feature labels and image feature labels in the feature labels to generate a feature matching model.
[0013] In one embodiment, the image feature module includes: a role unit, used to obtain a role tag of a virtual object; an initial unit, used to input at least one interface feature tag into a feature matching model to obtain multiple initial image feature tags; and a screening unit, used to screen at least one initial image feature tag according to at least one role tag to determine an image feature tag.
[0014] In one embodiment, the image generation module includes: a parameter unit for determining skin color parameters, hair color parameters, texture parameters, and color matching parameters based on image feature labels; a rendering unit for rendering virtual objects based on skin color parameters, hair color parameters, texture parameters, and color matching parameters; and an integration unit for integrating the rendered virtual objects with the interface scene image to generate a virtual image.
[0015] According to one aspect of the present disclosure, an electronic device is proposed, which includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0016] According to one aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.
[0017] According to the virtual image generation method and device disclosed in the present invention, the interface feature labels are determined according to the interface scene image and the image recognition model; the image feature labels are determined according to the interface feature labels and the feature matching model; and the virtual object is rendered based on the image feature labels to generate the virtual image. This can automatically and quickly output the image and appearance of the virtual character, improve work efficiency, and reduce the investment in manpower and time costs.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail its exemplary embodiments with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present disclosure, and it is clear to a person skilled in the art that other accompanying drawings can be obtained from these accompanying drawings without creative work.
[0020] Figure 1 It is a system scenario block diagram of a method and device for generating a virtual image according to an exemplary embodiment.
[0021] Figure 2 The present invention is a schematic diagram of an application scenario of a method and device for generating a virtual image according to an exemplary embodiment.
[0022] Figure 3 The present invention is a schematic diagram of an application scenario of a method and device for generating a virtual image according to an exemplary embodiment.
[0023] Figure 4 The figure is a flowchart of a method for generating a virtual image according to an exemplary embodiment.
[0024] Figure 5 is a flowchart of a method for generating a virtual image according to another exemplary embodiment.
[0025] Figure 6 is a flowchart of a method for generating a virtual image according to another exemplary embodiment.
[0026] Figure 7 It is a block diagram of a virtual image generating device according to an exemplary embodiment.
[0027] Figure 8 is a block diagram of a virtual image generating device according to another exemplary embodiment.
[0028] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0030] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0032] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0033] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the disclosed concepts. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.
[0034] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present disclosure, and therefore cannot be used to limit the protection scope of the present disclosure.
[0035] The inventor of the present disclosure has found that currently, in the field of virtual character images, virtual characters and images are still purely manually set and constructed. Currently, the design and construction of virtual character images requires a lot of manpower costs. The design and establishment of a character image requires the cooperation of multiple people such as producers, product managers, UI designers, and original artists. At the same time, a lot of time costs are required. The working hours required for design and construction range from two weeks to several months, and the overall cycle is long.
[0036] The design of virtual images requires comprehensive consideration of many factors, the most important of which is the scene interface where the virtual image will be located. The scene interface refers to the real or fictional scene represented by two-dimensional graphics or three-dimensional models in the software interface. How to make the virtual image appropriate and beautiful in the scene interface and adapt to the aesthetic needs of users is the main problem faced in the design of virtual images.
[0037] There are some technologies related to virtual image design. For example, image recognition technology can be used to quickly extract existing elements and design frameworks in pictures to generate static picture posters. However, this method generates static pictures of spliced elements through machine learning models, which cannot solve the problems existing in the current construction of virtual character image design.
[0038] For example, the field of face recognition also uses machine learning models for image recognition technology, that is, by obtaining the face image to be recognized, using a pre-established image recognition model to obtain the recognition result. However, the application and invention of image recognition technology in the field of face recognition is more about improving recognition accuracy, which is quite different from the specific technical issues of virtual image design in this disclosure.
[0039] In view of the technical bottlenecks and technical defects in the prior art, the inventor of the present disclosure proposes a method for generating a virtual image, which annotates various image elements in the existing interface, analyzes various features and combinations of elements based on multiple annotated interface images, generates training samples, and then uses a machine learning model for training, thereby automatically configuring the appearance of the virtual image. This method can improve the efficiency of generating virtual images and reduce the investment in manpower and time costs.
[0040] In order to understand the technical content of the present disclosure, the technical terms involved in the present disclosure are explained as follows:
[0041] A virtual image refers to a character image constructed through computer 2D rendering or 3D modeling technology and presented on a physical display screen or virtual space / screen.
[0042] Interface: refers to the medium for interaction and information exchange between the system and the user. It realizes the conversion between the internal form of information and the form acceptable to humans. The purpose is to enable users to complete tasks or obtain information. It includes human-computer interaction and graphical user interface.
[0043] Scene: refers to the real or fictional scene represented by two-dimensional graphic images or three-dimensional models in the software interface.
[0044] Avatar: A character image created through computer 2D rendering or 3D modeling technology and presented on a physical display screen or virtual space / screen.
[0045] Machine learning: simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structures to continuously improve their performance.
[0046] Image recognition: A branch of machine learning that uses computers to process, analyze, and understand images to identify targets and objects in various patterns.
[0047] Texture: The natural characteristics of the surface of different materials are called natural texture, such as air, water, rock, bamboo and wood, while the feeling that has been artificially processed is called artificial texture, such as brick, ceramics, glass, cloth, plastic, etc. Different textures give people a variety of feelings such as soft and hard, virtual and real, smooth and rough, tough and brittle, transparent and turbid, which are the aesthetic feelings caused by the true expression of texture in the plastic arts image.
[0048] Figure 1 It is a system scenario block diagram of a method and device for generating a virtual image according to an exemplary embodiment.
[0049] like Figure 1As shown, the system architecture 10 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0050] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0051] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0052] Terminal devices 101, 102, and 103 can, for example, determine at least one interface feature label based on at least one interface scene image; terminal devices 101, 102, and 103 can, for example, determine an image feature label based on at least one interface feature label and a feature matching model, and the image feature label can include a skin color label, a hair color label, a texture label, and a color matching label; terminal devices 101, 102, and 103 can, for example, generate a virtual image based on the image feature label.
[0053] Terminal devices 101, 102, and 103 can also train machine learning models through virtual scene images to generate image recognition models, for example; terminal devices 101, 102, and 103 can also train machine learning models through virtual scene images to generate feature matching models, for example; wherein the virtual scene images include virtual images and interface scenes.
[0054] The server 105 may be a server that provides various services, such as a background management server that provides support for information processing websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process received requests for virtual image processing, and feed back the processing results (virtual image) to the terminal device.
[0055] The server 105 may, for example, receive interface scene images sent by the terminal devices 101, 102, and 103, and the server 105 may, for example, determine at least one interface feature label based on at least one interface scene image; the server 105 may, for example, determine an image feature label based on at least one interface feature label and a feature matching model, and the image feature label includes a skin color label, a hair color label, a texture label, and a color matching label; the server 105 may, for example, render a virtual object based on the image feature label to generate a virtual image.
[0056] The server 105 can also train the machine learning model through virtual scene images to generate an image recognition model, for example; the server 105 can also train the machine learning model through virtual scene images to generate a feature matching model, for example; wherein the virtual scene images include virtual images and interface scenes.
[0057] The server 105 may also send the image recognition model and the feature matching model to the terminal devices 101 , 102 , 103 for use.
[0058] The server 105 may be a physical server, or may be composed of multiple servers. It should be noted that the virtual image generation method provided in the embodiment of the present disclosure may be executed by the server 105 or the terminal devices 101, 102, 103. Accordingly, the virtual image generation device may be arranged in the server 105 or the terminal devices 101, 102, 103.
[0059] Figure 2 The present invention is a schematic diagram of an application scenario of a method and device for generating a virtual image according to an exemplary embodiment.
[0060] In one embodiment, the method disclosed in the present invention can be implemented through a software program, and then as an application on a user terminal, the user can start the application and then input one or more interface scene images and a line drawing (without color) of a virtual character image according to the prompts on the interface. The application analyzes the overall style positioning, color matching, texture, etc. of the interface scene through image recognition, and then automatically configures and generates the appearance of the virtual image (which may include, for example, hair color, skin color, clothing color matching, texture expression, etc.). The appearance of the virtual image generated by the application matches the visual style of the interface scene.
[0061] In one embodiment, the method disclosed in the present invention can be implemented through a web page program, and then displayed as a website providing interactive information to the user. The user can enter the website by entering the URL and start the web page program. The user can enter one or more interface scene images and the line drawing (without color) of the virtual character image according to the prompts on the web page. The web page program analyzes the overall style positioning, color matching, texture, etc. of the interface scene through image recognition, and then automatically configures and generates the appearance of the virtual image (which may include, for example, hair color, skin color, clothing color matching, texture expression, etc.). The appearance of the virtual image generated by the web page program matches the visual style of the interface scene in which it is located.
[0062] In one embodiment, the method of the present disclosure may be implemented by other technical means, which are fundamentally a method of generating the appearance of a virtual image by analyzing the overall style of the interface scene input by the user through image recognition.
[0063] It is worth mentioning that the virtual image in the present disclosure may be a human image, an animal image, a two-dimensional animation image, a three-dimensional object image, etc., but the present disclosure is not limited thereto.
[0064] The virtual image generation method disclosed in the present invention uses machine learning to input a large number of interface scene pictures containing virtual character images into the system, and cooperates with designers to annotate and define classifications based on dimensional features such as style, color matching, elements, texture, etc., to establish an image recognition model
[0065] The virtual image generation method disclosed in the present invention extracts the background and character image, constructs a matching model from the above multiple dimensions, and constructs a style label and a corresponding color library and texture expression library.
[0066] In actual applications, users input multiple interface scene pictures of software products, and use the established image recognition model to analyze and judge feature data sets such as style categories, color values and color matching ratios, element characteristics and texture performance. Then, they can extract corresponding parameters from the color matching library and texture performance library, and finally configure the appearance of the virtual character image.
[0067] Figure 3 The present invention is a schematic diagram of an application scenario of a method and device for generating a virtual image according to an exemplary embodiment.
[0068] In a specific application scenario, the user can start using the virtual image generation method of the present disclosure by opening "Game Xiaoyue" or other similar applications. In the application, the user can be prompted to input the scene interface and the line drawing of the virtual image through a dialog box or other forms. The user can input the scene interface and the line drawing of the virtual image into the application by dragging or pasting.
[0069] It is worth mentioning that one or more images of the scene interface can be input, and the application can perform comprehensive calculations based on the input one or more scene interface images, and finally generate feature labels for the virtual image. Then, color rendering is performed on the line draft of the virtual image based on the feature label, and then a rendered virtual image is generated. The virtual image and the interface scene graph can also be displayed together on the user end.
[0070] There can be multiple feature tags. After the feature tags are generated, they can be arranged in order according to the degree of fit with the interface scene, and prompt tags can be generated on the user interface. Users can select target feature tags from the feature tags according to their own preferences, so as to render the virtual image and generate a rendered virtual image.
[0071] Figure 4 4 is a flowchart of a method for generating a virtual image according to an exemplary embodiment. The method 40 for generating a virtual image includes at least steps S402 to S406.
[0072] like Figure 4 As shown, in S402, at least one interface feature tag is determined according to at least one interface scene image. The interface scene image can be an interface scene image input by the user at will, and an interface design interface can also be provided, so that the user can set the scene interface by himself.
[0073] In one embodiment, the user can take screenshots of the designed interface scene image from multiple angles. Figure 1 The data is then input into the image recognition model so that the image recognition model can perform image processing.
[0074] In one embodiment, the method further includes training a machine learning model through a virtual scene image to generate an image recognition model; wherein the virtual scene image includes a virtual image and an interface scene.
[0075] In one embodiment, training a machine learning model through virtual scene images to generate an image recognition model includes: acquiring virtual scene images from historical data; assigning feature labels to each virtual scene image in the virtual scene images; and training the machine learning model through virtual scene images with feature labels to generate an image recognition model.
[0076] The details of "Training machine learning models with virtual scene images to generate image recognition models" will be Figure 5 The corresponding embodiments are described in detail.
[0077] In one embodiment, at least one interface scene image is input into an image recognition model, and the image recognition model performs image analysis processing on at least one interface scene image to obtain image feature data; then the image recognition model analyzes the image feature data and outputs at least one corresponding interface feature label.
[0078] In one embodiment, the image recognition model can output multiple initial interface feature tags based on the input interface scene image, each initial interface feature tag has a different score, and the multiple initial interface feature tags are arranged in order according to their scores. The score can show the degree of match between the interface feature tag and the interface scene. The user can determine the final at least one interface feature tag based on the output initial interface feature tags and their scores.
[0079] In S404, an image feature label is determined according to at least one interface feature label and a feature matching model, wherein the image feature label includes at least one of the following: a skin color label, a hair color label, a texture label, and a color matching label.
[0080] In one embodiment, the method further includes training a machine learning model through a virtual scene image to generate a feature matching model; wherein the virtual scene image includes a virtual image and an interface scene.
[0081] In one embodiment, training a machine learning model through virtual scene images to generate a feature matching model includes: acquiring virtual scene images from historical data; assigning feature labels to each virtual scene image in the virtual scene images; and training the machine learning model through virtual scene images with feature labels to generate a feature matching model.
[0082] The details of "determining an image feature label based on at least one interface feature label and a feature matching model" will be Figure 6 The corresponding embodiments are described in detail.
[0083] In one embodiment, at least one interface feature tag is input into the feature matching model, and the feature matching model performs data matching according to the at least one interface feature tag; then the feature matching model performs analysis according to the interface feature tag and outputs its corresponding image feature tag.
[0084] In one embodiment, the interface feature tag can output multiple initial image feature tags according to at least one input interface feature tag, each initial image feature tag has a different score, and multiple initial image feature tags are arranged in order according to their scores. The score can show the degree of match between the interface feature tag and the initial image feature tag. The user can determine the final image feature tag based on the output initial image feature tag and its score.
[0085] In one embodiment, determining an image feature label based on at least one interface feature label and a feature matching model includes: obtaining a role label of a virtual object; inputting the interface feature label into a feature matching model to obtain at least one initial image feature label; and screening at least one initial image feature label based on the role label to determine the image feature label.
[0086] For example, the image feature labels can be filtered near the character label of the virtual object. The character label can be assigned to the virtual object on the two-dimensional line drawing of the virtual object, and the character label can be "cute", "secondary", "cute girl", etc. The multiple initial image feature labels are filtered according to the character label to determine the image feature label.
[0087] More specifically, when the character label is "cute girl", the initial image labels such as "dark green hair color", "rough texture" and so on that do not match the "cute girl" character label will be deleted.
[0088] In S406, a virtual image is generated based on the image feature tag. For example, skin color parameters, hair color parameters, texture parameters, and color matching parameters are determined based on the image feature tag; virtual objects are rendered based on the skin color parameters, hair color parameters, texture parameters, and color matching parameters; and the rendered virtual objects are image-integrated with the interface scene image to generate the virtual image.
[0089] In one embodiment, different parameters correspond to different color values. For example, skin color parameter 1.0 corresponds to white skin, skin color parameter 2.0 corresponds to brown skin, etc. Hair color parameters and texture parameters are similar to skin color parameters, and different parameters represent different color values. In color matching parameters, different color matching parameters represent the matching ratios of several colors. For example, color matching parameter 1.0 represents a red and yellow color matching, with red accounting for 80% and yellow accounting for 20%.
[0090] According to the above parameters, different colors are extracted for rendering the virtual image. More specifically, the color parameters are rendered at the skin of the virtual image, and the hair color parameters are rendered at the hair position of the virtual image.
[0091] Rendering is a step in generating a virtual image. The rendering program calculates the color of the object surface according to the above parameters, and also considers the material characteristics of the virtual image. Different types of materials, different properties, and different textures will produce different effects. The virtual image can be rendered by a variety of renderers, including V-Ray, For 3DsMax, ForSketchUp, etc., but the present disclosure is not limited to this.
[0092] According to the virtual image generation method disclosed in the present invention, the interface feature labels are determined according to the interface scene image and the image recognition model; the image feature labels are determined according to the interface feature labels and the feature matching model; and the virtual object is rendered based on the image feature labels to generate the virtual image. This method can automatically and quickly output the image and appearance of the virtual character, improve work efficiency, and reduce the investment in manpower and time costs.
[0093] It should be clearly understood that the present disclosure describes how to form and use specific examples, but the principles of the present disclosure are not limited to any details of these examples. On the contrary, based on the teachings of the contents disclosed in the present disclosure, these principles can be applied to many other embodiments.
[0094] Figure 5 The present invention is a flowchart of a method and device for generating a virtual image according to another exemplary embodiment. Figure 5 The process shown is a detailed description of "training a machine learning model through virtual scene images to generate an image recognition model".
[0095] like Figure 5 As shown, in S502, a virtual scene image is obtained. The virtual scene image includes a virtual image and an interface scene. For example, the virtual scene image can be obtained from a blockchain system.
[0096] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer. The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose the characteristics of the business based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.
[0097] After the virtual scene image is stored in the blockchain system, the application service layer can provide virtual scene image data reading services to other systems or users based on the blockchain protocol based on the virtual scene image in the block. The virtual scene image reading service provided by the blockchain system can ensure that the virtual scene image is not changed during the process of data transmission and use, and ensure the data security of the virtual scene image.
[0098] In S504, the virtual scene image is processed to determine the virtual image area and the interface scene area. The virtual image area and the interface scene area can be distinguished by box selection or adding a segmentation curve.
[0099] In S506, at least one interface feature label is assigned to the interface scene area. The interface feature label may be "Japanese style", "fresh", "European and American", and the interface label may also include "blue tone", "pink tone" and so on.
[0100] In S508, the virtual scene image is subjected to image analysis processing to obtain image feature data.
[0101] In S510, a virtual scene image with at least one interface feature label and its corresponding image feature data are input into a generative adversarial network model.
[0102] In S512, a generative adversarial network is trained based on the image feature data and the interface feature labels to generate an image recognition model. Wherein, a generative adversarial network (GAN) is a deep learning model.
[0103] The generative adversarial network model disclosed in the present invention may include at least two sub-networks, G (Generator) and D (Di scriminator). The G network is used to generate images. The G network receives a random noise z and generates images through this noise, which is recorded as G(z). The D network is used to distinguish images. The D network determines whether a picture is "effective" or "beautiful" for the user. Its input parameter is x, x represents a picture, and the output D(x) represents the probability that x is a valid picture. If it is 1, it means that it is 100% effective or beautiful, and if the output is 0, it means that it is impossible to be an effective or beautiful picture.
[0104] In the specific model training process, the goal of the generative network G is to generate realistic images as much as possible to deceive the discriminative network D. The goal of D is to distinguish the images generated by G from the real images as much as possible. In this way, G and D constitute a dynamic "game process". The generative adversarial network model generates the output results of machine learning through the mutual game learning of multiple modules in the framework.
[0105] Figure 6 The present invention is a flowchart of a method and device for generating a virtual image according to another exemplary embodiment. Figure 6 The process shown is a detailed description of "training a machine learning model through virtual scene images to generate a feature matching model".
[0106] like Figure 6As shown, in S602, a virtual scene image is obtained. The virtual scene image includes a virtual image and an interface scene. For example, the virtual scene image can be obtained from a blockchain system.
[0107] In S604, the virtual scene image is processed to determine the virtual image area and the interface scene area.
[0108] In S606, at least one avatar feature tag is assigned to the avatar region.
[0109] In S608, at least one interface feature tag is specified for the interface scene area.
[0110] In S610, the virtual scene image with the feature label is input into the neural network model.
[0111] In S612, the neural network model is trained based on the interface feature labels and the image feature labels in the feature labels to generate a feature matching model.
[0112] The artificial neural network (ANN) model is composed of a large number of neurons connected by adjustable connection weights, and has the characteristics of large-scale parallel processing, distributed information storage, good self-organization and self-learning ability, etc. The neural network model in the present disclosure can be a supervised machine learning model. Supervised learning refers to using an algorithm to learn the mapping function from input to output through input variables and output variables.
[0113] In the present disclosure, the interface feature label is used as the input variable of the neural network, and the image feature label is used as the output feature variable of the neural network. Through the training of the neural network, a functional relationship between the interface feature label and the image feature label is established, so that when other interface feature labels, or different combinations of interface feature labels are input into the trained feature matching model, the feature matching model can accurately output its corresponding image characteristic label.
[0114] In the present disclosure, the neural network model may include: K-Nearest Neighbor model; Decision Tree model; Naive Bayes model and other supervised learning models, but the present disclosure is not limited thereto.
[0115] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided by the present disclosure are performed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0116] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0117] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0118] Figure 7 FIG. 1 is a block diagram of a virtual image generation device according to an exemplary embodiment. Figure 7 As shown, the virtual image generating device 70 includes: an interface feature module 702 , an image feature module 704 , and an image generating module 706 .
[0119] The interface feature module 702 is used to determine at least one interface feature tag according to at least one interface scene image;
[0120] The image feature module 704 is used to determine an image feature label according to the at least one interface feature label and the feature matching model, wherein the image feature label includes at least one of the following: a skin color label, a hair color label, a texture label, and a color matching label;
[0121] Among them, the image feature module 704 includes: a role unit, used to obtain a role tag of a virtual object; an initial unit, used to input at least one interface feature tag into a feature matching model to obtain multiple initial image feature tags; and a screening unit, used to screen at least one initial image feature tag according to at least one role tag to determine the image feature tag.
[0122] The image generation module 706 is used to generate a virtual image based on the image feature tag.
[0123] Among them, the image generation module 706 includes: a parameter unit, which is used to determine skin color parameters, hair color parameters, texture parameters, and color matching parameters based on image feature labels; a rendering unit, which is used to render virtual objects based on skin color parameters, hair color parameters, texture parameters, and color matching parameters; and an integration unit, which is used to integrate the rendered virtual objects with the interface scene image to generate a virtual image.
[0124] According to the virtual image generation device disclosed in the present invention, the interface feature labels are determined according to the interface scene image and the image recognition model; the image feature labels are determined according to the interface feature labels and the feature matching model; and the virtual object is rendered based on the image feature labels to generate the virtual image. This method can automatically and quickly output the image and appearance of the virtual character, improve work efficiency, and reduce the investment in manpower and time costs.
[0125] Figure 8 FIG. 1 is a block diagram of a virtual image generating device according to another exemplary embodiment. Figure 8 As shown, the virtual image generating device 80 further includes, based on the virtual image generating device 70 , a data acquisition module 802 , an image processing module 804 , an image recognition module 806 , and a feature matching module 808 .
[0126] The data acquisition module 802 is used to acquire a virtual scene image; the data acquisition module 802 is also used to acquire the virtual scene image by the blockchain system.
[0127] The image processing module 804 is used to perform image processing on the virtual scene image to specify feature labels; the image processing module 804 includes: an area unit, used to perform image processing on the virtual scene image to determine the virtual image area and the interface scene area; an image unit, used to specify at least one image feature label for the virtual image area; an interface unit, used to specify at least one interface feature label for the interface scene area; a label unit, used to generate a feature label through at least one image feature label and at least one interface feature label.
[0128] The image recognition module 806 is used to train the first machine learning model through the virtual scene image with the feature label to generate the image recognition model; the image recognition module 806 includes: an analysis unit, used to perform image analysis processing on the virtual scene image to obtain image feature data; an input unit, used to input the virtual scene image with the feature label and its corresponding image feature data into the generative adversarial network model; and a training unit, used to train the generative adversarial network model based on the image feature data and the interface feature label in the feature label to generate the image recognition model.
[0129] The feature matching module 808 is used to train the second machine learning model through the virtual scene image with feature labels to generate the feature matching model; wherein the virtual scene image includes a virtual image and an interface scene. The feature matching module 808 includes: a scene unit, which is used to input the virtual scene image with feature labels into the neural network model; and a matching unit, which is used to train the neural network model based on the interface feature labels and the image feature labels in the feature labels to generate the feature matching model.
[0130] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment.
[0131] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0132] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), a display unit 940, etc.
[0133] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present disclosure described in the electronic prescription circulation processing method section of this specification. For example, the processing unit 910 can execute the following steps: Figure 3 , Figure 4 , Figure 5 Follow the steps shown in .
[0134] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .
[0135] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0136] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0137] The electronic device 900 may also communicate with one or more external devices 900' (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 960. The network adapter 960 may communicate with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RA ID systems, tape drives, and data backup storage systems.
[0138] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation of the present disclosure.
[0139] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0140] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0141] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0142] The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the following functions: determining at least one interface feature label according to at least one interface scene image; determining an image feature label according to the at least one interface feature label and a feature matching model, wherein the image feature label includes at least one of the following: skin color label, hair color label, texture label, and color matching label; and rendering a virtual object based on the image feature label to generate a virtual image.
[0143] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0144] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0145] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
[0146] In addition, the structures, proportions, sizes, etc. shown in the drawings of the specification are only used to match the contents disclosed in the specification for the understanding and reading of those skilled in the art, and are not used to limit the limiting conditions for the implementation of the present disclosure, so they have no substantial technical significance. Any modification of the structure, change of the proportional relationship or adjustment of the size, without affecting the technical effects and purposes that can be achieved by the present disclosure, should still fall within the scope of the technical contents disclosed by the present disclosure. At the same time, the terms such as "on", "first", "second" and "one" quoted in this specification are only for the convenience of description, and are not used to limit the scope of the implementation of the present disclosure. The change or adjustment of their relative relationship should also be regarded as the scope of the implementation of the present disclosure without substantially changing the technical contents.
Claims
1. A method for generating a virtual image, characterized in that: include: Inputting at least one interface scene image into an image recognition model to obtain a plurality of initial interface feature labels, each of which has a different score, and the score of any initial interface feature label is used to represent the degree of matching between the initial interface feature label and the interface scene; Determining at least one interface feature tag according to the multiple initial interface feature tags and their scores; Determine an image feature label using a feature matching model according to the at least one interface feature label, wherein the image feature label includes at least one of the following: a skin color label, a hair color label, a texture label, and a color matching label; and A virtual image is generated based on the image feature tag.
2. The method according to claim 1, characterized in that Before determining at least one interface feature label using an image recognition model according to at least one interface scene image, the following step further includes: Acquire a virtual scene image; Performing image processing on the virtual scene image to determine a feature label; Training the first machine learning model with the virtual scene image with feature labels to generate an image recognition model; and / or Training the second machine learning model by using the virtual scene image with feature labels to generate the feature matching model; Wherein, the virtual scene image includes a virtual image and an interface scene image.
3. The method according to claim 2, characterized in that Acquiring a virtual scene image includes: The virtual scene image is obtained by the blockchain system.
4. The method according to claim 2, characterized in that Performing image processing on the virtual scene image to determine the feature label includes: Performing image processing on the virtual scene image to determine a virtual image area and an interface scene area; assigning at least one avatar feature tag to the avatar region; Specifying at least one interface feature tag for the interface scene area; The feature tag is generated by using the at least one image feature tag and the at least one interface feature tag.
5. The method according to claim 2, characterized in that Training the first machine learning model by using the virtual scene image with feature labels to generate the image recognition model includes: Performing image analysis on the virtual scene image to obtain image feature data; Inputting the virtual scene image with feature labels and its corresponding image feature data into the generative adversarial network model; and The generative adversarial network model is trained based on the image feature data and the interface feature labels in the feature labels to generate the image recognition model.
6. The method according to claim 2, characterized in that Training the second machine learning model by using the virtual scene image with feature labels to generate the feature matching model includes: Inputting the virtual scene image with feature labels into the neural network model; and The neural network model is trained based on the interface feature labels and the image feature labels in the feature labels to generate the feature matching model.
7. The method according to claim 1, characterized in that Determining the image feature label according to the at least one interface feature label and the feature matching model includes: Get the role label of the virtual object; Inputting the interface feature label into the feature matching model to obtain at least one initial image feature label; and The at least one initial image feature tag is screened according to the role tag to determine the image feature tag.
8. The method according to claim 1, characterized in that Generating a virtual image based on the image feature tag includes: Determining skin color parameters, and / or hair color parameters, and / or texture parameters, and / or color matching parameters based on the image feature tags; Rendering virtual objects respectively based on the skin color parameter, and / or the hair color parameter, and / or the texture parameter, and / or the color matching parameter; and The rendered virtual object is integrated with the interface scene image to generate the virtual image.
9. A virtual image generating device, characterized in that: include: An interface feature module, used to input at least one interface scene image into an image recognition model to obtain a plurality of initial interface feature labels, each of which has a different score, and the score of any initial interface feature label is used to characterize the degree of match between the initial interface feature label and the interface scene; and for determining at least one interface feature tag based on the multiple initial interface feature tags and their scores; An image feature module, configured to determine an image feature label using a feature matching model according to the at least one interface feature label, wherein the image feature label includes at least one of the following: a skin color label, a hair color label, a texture label, and a color matching label; and The image generation module is used to generate a virtual image based on the image feature mark.
10. A computer device, characterized in that: include: a memory, wherein a computer program is stored in the memory; A processor, used to load the computer program to implement the virtual image generation method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the virtual image generation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Augmented reality model adjustment method, device, storage medium and electronic equipment
CN108537889A
Character portraiture display method in games, character portraiture display device in games, electronic equipment and storage medium
CN110465097A