WO2021082885A1 - 语义分割模型的训练样本的生成方法、装置、存储介质及电子设备 - Google Patents

语义分割模型的训练样本的生成方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2021082885A1
WO2021082885A1 PCT/CN2020/120140 CN2020120140W WO2021082885A1 WO 2021082885 A1 WO2021082885 A1 WO 2021082885A1 CN 2020120140 W CN2020120140 W CN 2020120140W WO 2021082885 A1 WO2021082885 A1 WO 2021082885A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
model
generating
sample
reference image
Prior art date
Application number
PCT/CN2020/120140
Other languages
English (en)
French (fr)
Inventor
孙子荀
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to EP20882890.5A priority Critical patent/EP3989120A4/en
Publication of WO2021082885A1 publication Critical patent/WO2021082885A1/zh
Priority to US17/516,883 priority patent/US11934485B2/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/26Techniques for post-processing, e.g. correcting the recognition result
    • G06V30/262Techniques for post-processing, e.g. correcting the recognition result using context analysis, e.g. lexical, syntactic or semantic context
    • G06V30/274Syntactic or semantic context, e.g. balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Definitions

  • This application relates to the computer field, and in particular to a method, device, storage medium, and electronic equipment for generating training samples of a semantic segmentation model.
  • a recommendation system based on game content usually generates a promotional poster about the game when recommending a game to users.
  • the promotional poster can include the character image of the game character and the introduction of skills so that the user can quickly understand Basic information about the game.
  • the character image can be automatically recognized from the game scene with the aid of a deep learning model trained in advance.
  • the embodiment of the present application provides a method for generating training samples of a semantic segmentation model.
  • the semantic segmentation model is used to segment objects in an image and is executed by an electronic device, including:
  • an object identifier of the object to be trained and a model file corresponding to the object identifier the model file including a three-dimensional model of the object to be trained and a skin texture atlas, the skin texture atlas including multiple solid-color skin textures and multiple Color skin map;
  • each of the orientation angles corresponds to one transformation model
  • each sample image group includes multiple sample images
  • the training samples of the object to be trained are generated according to the annotation image and the sample image group, so as to train the semantic segmentation model through the training samples of the object to be trained.
  • An embodiment of the present application also provides a device for generating training samples of a semantic segmentation model.
  • the semantic segmentation model is used to segment objects in an image, including:
  • the acquiring module is used to acquire the object identification of the object to be trained and the model file corresponding to the object identification, the model file includes the three-dimensional model of the object to be trained and a skin map set, and the skin map set includes a plurality of solid colors Skin maps and multiple color skin maps;
  • the determining module is used to determine the corresponding transformation models of the three-dimensional model under different orientation angles, and each of the orientation angles corresponds to one transformation model;
  • the first generating module is configured to generate multiple sample image groups corresponding to each transformation model according to the multiple color skin maps and each transformation model, and each sample image group includes multiple sample images;
  • the second generation module is configured to generate an annotation map of each sample image group according to the object identifier, the black skin map, the white skin map and each transformation model, and the annotation map is used to compare the sample image groups in the sample image group. Annotate the sample map of;
  • the third generation module is configured to generate training samples of the object to be trained according to the annotation map and the sample image group, so as to train the semantic segmentation model through the training samples of the object to be trained.
  • the first generation module is specifically used for:
  • each first rendering model into the game scene according to a plurality of preset projection orientations to obtain a plurality of first projection scenes, and each of the projection orientations corresponds to one of the first projection scenes;
  • sample images corresponding to the same preset projection orientation and transformation model are grouped into one group to obtain multiple sample image groups.
  • the multiple solid-color skin textures include black skin textures and white skin textures
  • the second generation module specifically includes:
  • a first determining unit configured to determine multiple first reference image groups according to the black skin map, multiple preset projection orientations, and each transformation model
  • a second determining unit configured to determine a plurality of second reference image groups according to the white skin map, the plurality of preset projection orientations, and each transformation model;
  • the generating unit is configured to generate an annotation image of each sample image group according to the object identifier, the plurality of first reference image groups, and the plurality of second reference image groups.
  • the first determining unit is specifically configured to:
  • each second rendering model into the game scene according to the multiple preset projection orientations to obtain multiple second projection scenes, each of the projection orientations corresponding to one of the second projection scenes;
  • the first reference pictures corresponding to the same transformation model are grouped into a group to obtain multiple first reference picture groups.
  • the generating unit is specifically used for:
  • an annotation image corresponding to the sample image group is generated.
  • the generating unit is specifically used for:
  • the numerical value of the object identifier is used as the color value, and the color of the area where the white pixel is located in the target reference image is replaced to obtain the annotation image of the sample image group corresponding to the same transformation model and the preset projection orientation.
  • the device for generating training samples further includes a training module and a segmentation module,
  • the training module is configured to: after the third generating module generates the training samples of the object to be trained according to the annotation map and the sample image group, input the training samples into a preset semantic segmentation model to perform Training to get the model after training;
  • the segmentation module is configured to obtain an object segmentation instruction, the object segmentation instruction carries a target game image, and the target game image includes at least one object to be segmented; and the target game image is input into the object segmentation instruction according to the object segmentation instruction.
  • the object contour and the object identifier of the object to be segmented are obtained.
  • segmentation module is also used for:
  • the text description content is generated on the projection image to obtain a cover image.
  • the acquisition module is also used for:
  • a model file is extracted from the storage file group corresponding to each game object, and the model file and the object identifier are copied and saved.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the training samples of the semantic segmentation model described in the embodiments of the present application.
  • the method of generation is a technique for generating and generating a plurality of instructions.
  • An embodiment of the present application also provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the embodiments of the present application The steps in the method for generating training samples of the semantic segmentation model.
  • FIG. 1 is a schematic diagram of a scene of a system for generating training samples provided by an embodiment of the application.
  • FIG. 2A is a schematic flowchart of a method for generating training samples provided by an embodiment of the application.
  • 2B is a flowchart of generating annotated images of each sample image group according to the object identifier, the multiple solid-color skin maps, and the transformation model in step S104 in the embodiment of the application.
  • 2C is a flowchart of S1041 determining multiple first reference image groups according to the black skin map, multiple preset projection orientations, and the transformation model in an embodiment of the application.
  • FIG. 2D is a flowchart of generating annotated images of each sample image group according to the object identifier, the plurality of first reference image groups, and the plurality of second reference image groups in S1043 in an embodiment of the application.
  • 2E is a flowchart of generating annotated images corresponding to the sample image group according to the object identifier, the transformed first reference image, and the transformed second reference image in step S434 in an embodiment of the application.
  • FIG. 2F is a flowchart of a method for generating training samples provided by an embodiment of the application.
  • FIG. 2G is a flowchart of a method for generating training samples provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram showing some stored files in an installation package provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of another flow of the method for generating training samples provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of the framework of the process of generating training samples provided by an embodiment of the application.
  • FIG. 6 is a schematic diagram of a comparison between an image before model processing and an image after model processing provided by an embodiment of the application.
  • Figure 7 is a schematic flow diagram of the cover image generation process provided by an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of an apparatus for generating training samples provided by an embodiment of the application.
  • FIG. 9 is a schematic diagram of another structure of an apparatus for generating training samples provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of another structure of the apparatus for generating training samples provided by an embodiment of the application.
  • FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the training samples of the deep learning model that automatically recognizes the image of a person are usually prepared manually. For example, take the game "Glory of the King" as an example. If the deep learning model can better identify a certain hero, about 1000 training samples need to be prepared. Each training sample is artificially targeted to the hero in different game skins and different maps. Take a screenshot from the game scene under location to obtain a sample image, and manually label the sample image. Assuming that there are 100 heroes in King of Glory, you need to manually take screenshots and prepare 100,000 training samples. According to one person hour, you can mark 150 samples, 8 hours a day, and it requires more than 83 days of work for one person. Obviously this kind of training The sample generation method is extremely inefficient and costly.
  • the embodiments of the present application provide a method, device, storage medium, and electronic equipment for generating training samples, which can automatically generate sample images and annotated images without manual screenshots and annotations.
  • Figure 1 is a schematic diagram of a scene of a training sample generation system.
  • the training sample generation system may include any of the training sample generation devices provided in the embodiments of the present application.
  • the training sample generation device may be integrated in the electronic device.
  • the electronic device may be a background server of a game application manufacturer.
  • the electronic device may include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • AI Artificial Intelligence
  • digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
  • artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a similar way to human intelligence.
  • Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • Artificial intelligence technology is a comprehensive discipline, covering a wide range of fields, including both hardware-level technology and software-level technology.
  • Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • Machine Learning is a multi-field interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other subjects. Specializing in the study of how computers simulate or realize human learning behaviors in order to acquire new knowledge or skills, and reorganize the existing knowledge structure to continuously improve its own performance.
  • Machine learning is the core of artificial intelligence, the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence.
  • Machine learning and deep learning usually include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and style teaching learning.
  • the electronic device can obtain the object identification of the object to be trained and the model file corresponding to the object identification, the model file includes a three-dimensional model and a skin texture atlas, the skin texture atlas including multiple solid color skin textures and multiple color skin textures; OK;
  • the three-dimensional model corresponds to the transformation model under different orientation angles, and each orientation angle corresponds to one transformation model; according to the multiple color skin maps and each transformation model, multiple sample image groups corresponding to each transformation model are generated;
  • the object identifier, the black skin map, the white skin map, and each transformation model generate an annotation image of each sample image group; according to the annotation image and the sample image group, a training sample of the object to be trained is generated.
  • the object identifier is a code manually generated by the user or automatically generated by the system for each game object (including the object to be trained), and is used to uniquely identify the game object in the game.
  • the three-dimensional model refers to a coordinate model composed of three-dimensional coordinate points, which is used to describe the shape and contour of the game object. Generally, different game objects have different three-dimensional models.
  • the orientation angle can be manually set in advance. For example, an angle can be selected from 0-360 degrees every 30 degrees as the orientation angle.
  • the transformation model is that the three-dimensional model rotates 0°, 30° or 60 from the default angle. °After the model.
  • the annotation map is used to annotate the sample images in the sample image group, such as annotating the outline appearance and object identification of the game object on the sample image, and the sample images in the same sample image group use the same annotation image.
  • the electronic device can obtain the model file and object identifier of the object to be trained from the installation package of the game application, and export the 3D model in the model file with the help of preset software such as unity3D software, and follow different orientation angles (for example, 0,30°...360°) change the orientation of the three-dimensional model, and use the three-dimensional models with different orientations as different transformation models. Then, generate multiple sample image groups based on the color skin map and transformation model, and then according to the object identification and solid color
  • the skin texture and transformation model generates annotated images for each sample image group, and uses each sample image and the corresponding annotated image as a training sample for subsequent model training.
  • FIG. 2A is a schematic flow chart of the method for generating training samples provided by an embodiment of the present application.
  • the method for generating training samples is applied to an electronic device.
  • the electronic device may be a back-end server of a game application manufacturer.
  • the specific flow may be as follows:
  • the object identifier is a code manually generated by the user or automatically generated by the system for each game object (including the object to be trained), and is used to uniquely identify the game object in the game.
  • the skin map in the skin map set is a texture map, where the color skin map can be a palette of 256 colors, and 4 colors are randomly selected to generate each time, the number of which can be 256.
  • the multiple solid color skin maps refer to texture maps with a single color, which may include black skin maps and white skin maps.
  • the black skin maps refer to all black solid color skin maps, and the white skin map refers to all white solid color skins.
  • the three-dimensional model refers to a coordinate model composed of three-dimensional coordinate points, which is used to describe the shape and contour of the game object. Generally, different game objects have different three-dimensional models.
  • the model file can be manually input by the user, such as manually extracting the model file from the game installation package, or it can be automatically obtained by the system.
  • the method for generating the training sample also includes:
  • a model file is extracted from the storage file group corresponding to each game object, and the model file and the object identifier are copied and saved.
  • the storage location of the installation package can be found based on the installation path, and all the storage files with the suffix name of the preset string at this storage location can be extracted, and these storage files can be compared according to the name of the game object
  • the storage files of the same game object are grouped into the same group.
  • part of the storage files at the storage location can be as shown in Figure 3, where the installation path can be ..//com.tencent.tmgp.sgame/ files/Resources/AssetBundle/, the preset string can be ".assetbundle".
  • the storage files displayed on the current page all have the same name "LianPo", that is, they are all game objects “LianPo”.
  • the associated file of "Po”, and the object ID of "Lianpo” is 105.
  • the orientation angle can be artificially set in advance.
  • an angle can be selected from 0-360 degrees at intervals of 30 degrees as the orientation angle, so that there are 12 orientation angles, such as 0°, 30° , 60°, etc.
  • the transformation model is the model after the 3D model is rotated from the default angle of 0°, 30° or 60°.
  • each sample image group includes multiple sample images.
  • step S103 may specifically include:
  • each of the projection orientations corresponds to one of the first projection scenes
  • sample images corresponding to the same preset projection orientation and transformation model are grouped into one group to obtain multiple sample image groups.
  • the first rendering model is obtained by rendering the transformed model with a color skin map as a texture.
  • the preset projection position can be set artificially. Because the deep learning network is translation invariant, we don’t need to generate a large number of position images. We only need to generate images in the left, center, and right directions, that is, we can project The azimuth is set to the left area, the middle area and the right area.
  • the game scene is a three-dimensional three-dimensional scene.
  • the coordinates of the first rendering model can be updated based on the coordinate system of the game scene to project the first rendering model into the game scene. After that, preset software such as unity3D software can be used.
  • the screen recording function outputs the first three-dimensional projection scene as a two-dimensional image to obtain a sample image, that is, an animation of the first projection scene is generated through preset software such as unity3D software, and the animation is captured through the screenshot function to capture the image This is the sample image.
  • the sample images of the same projection orientation, orientation angle, and game object into a group.
  • the object identification is 075
  • the orientation angle O is 30°
  • the projection orientation P is left LEFT
  • the naming format of the sample image group It can be 075_N1_ ⁇ 001,002, ..256 ⁇ _O_30°_P_LEFT.
  • the naming format of the sample map in this sample map group can be: 075_N1_xx_O_30°_P_LEFT, where N1 represents the color skin map. Assuming the number of color skin maps is 256, it can be followed by Marked as 001-256, then xx is any value in ⁇ 001,002, ..256 ⁇ , such as 002.
  • the annotation map is used to annotate the sample images in the sample image group, such as annotating the outline appearance and object identification of the game object on the sample image, and the sample images in the same sample image group use the same annotation image.
  • the way of labeling sample images is manual operation, which has low labeling efficiency.
  • the multiple solid-color skin textures include a black skin texture and a white skin texture.
  • FIG. 2B shows that each sample is generated according to the object identifier, the multiple solid-color skin textures, and the transformation model in step S104. As shown in FIG. 2B, step S104 may specifically include the following steps:
  • S1041. Determine multiple first reference image groups according to the black skin map, multiple preset projection orientations, and each transformation model; S1041.
  • S1042. Determine multiple second reference image groups according to the white skin map, multiple preset projection orientations, and each transformation model; S1042.
  • the game object can be filled into black and white respectively, and the first reference image group is generated based on different projection orientations (such as left, center, and right) of the same black game object at the same orientation angle (such as 330°) , Generating a second reference image group based on different projection orientations of the same white game object under the same orientation angle.
  • the reference pictures in the same first reference picture group or the second reference picture group can be named according to certain rules.
  • the object identifier is 075
  • the orientation angle O is 30°
  • P represents the preset projection orientation (for example, Left LEFT, middle MIDDLE, right RIGHT)
  • N0 represents black or white skin textures (such as black and white)
  • the naming format of the first reference image group can be 075_N0_black_O_30°_P_ ⁇ LEFT,MIDDLE,RIGHT ⁇ , where single
  • the naming format of the first reference picture can be 075_N0_black_O_30°_P_zz, zz is any one of ⁇ LEFT,MIDDLE,RIGHT ⁇
  • the naming format of the second reference picture group can be 075_N0_white_O_30°_P_yy, yy is ⁇ LEFT,MIDDLE,RIGHT ⁇ Any of them.
  • the method for generating the first reference picture group and the second reference picture group are similar. Here, only the generation process of the first reference picture group will be described in detail, and the generation process of the second reference picture group will not be repeated.
  • FIG. 2C shows a flowchart of determining multiple first reference image groups according to the black skin map, multiple preset projection orientations, and the transformation model in the above step S1041.
  • step S1041 specifically includes the following steps:
  • Step S411 rendering each transformation model according to the black skin map to obtain multiple corresponding second rendering models
  • Step S412 Project each second rendering model into the game scene according to the multiple preset projection orientations to obtain multiple second projection scenes, and each projection orientation corresponds to one second projection scene;
  • Step S413 generating an image of each of the second projection scenes, and using the generated image as a first reference image;
  • Step S414 Group the first reference pictures corresponding to the same transformation model into a group to obtain multiple first reference picture groups.
  • the second rendering model is obtained by rendering the transformed model with a black skin map as a texture.
  • the coordinates of the second rendering model can be updated based on the coordinate system of the game scene, so as to project the second rendering model into the game scene.
  • the screen recording function of the preset software such as unity3D software can be used to convert the three-dimensional first rendering model.
  • the second projection scene is output as a two-dimensional image, and the first reference image is obtained.
  • FIG. 2D shows a flowchart of generating annotated images of each sample image group according to the object identifier, the plurality of first reference image groups, and the plurality of second reference image groups in the foregoing step S1043.
  • the foregoing step S1043 may specifically include the following steps:
  • Step S431 Acquire a first reference image and a second reference image corresponding to the same preset projection orientation from the first reference image group and the second reference image group corresponding to the same transformation model;
  • Step S432 Convert the acquired color of the area where the black pixel in the first reference image is located to white, and convert the color of the remaining area in the first reference image to black;
  • Step S433 Convert the acquired color of the remaining area except the white pixels in the second reference image to black
  • Step S434 According to the object identifier, the first reference image after the transition, and the second reference image after the transition, an annotation image corresponding to the sample image group is generated.
  • FIG. 2E shows a flowchart of generating annotated images corresponding to the sample image group according to the object identifier, the transformed first reference image, and the transformed second reference image in the foregoing step S434, as shown in FIG. 2E,
  • the above step S434 includes the following steps:
  • Step S4341 Determine the overlapping area of the white pixel in the first reference image after the transition and the white pixel in the second reference image after the transition;
  • Step S4342 Convert the color of the remaining area except the overlapping area in the first reference image after the transition or the second reference image after the transition to black, so as to obtain the target reference image;
  • step S4343 the value of the object identifier is used as the color value, and the color of the area where the white pixel is located in the target reference image is replaced to obtain the annotation image of the sample image group corresponding to the same transformation model and the preset projection orientation.
  • both the first reference image and the second reference image will inevitably have interfering objects, which will affect the contour recognition of the game object.
  • the two reference images are mutually When fitting, the non-overlapping area is usually the area where the interfering object is located, and the overlapping area is the area where the game object is located, so that the contour of the game object can be better recognized, and then the color of the recognized object contour is filled into the object identification Value size, so that the outline and object identification can be better associated.
  • S105 Generate training samples of the object to be trained according to the annotation map and the sample image group, so as to train the semantic segmentation model through the training samples of the object to be trained.
  • each sample image and corresponding annotation image can be used as a training sample.
  • different sample images in the same sample image group correspond to the same annotation image, for example, for a certain sample image group 075_N1_ ⁇ 001,002,... 256 ⁇ _O_30°_P_LEFT, the corresponding annotation map can be 075_O_30°_P_LEFT, that is, the sample map group and the corresponding annotation map are related to the same game object, projection orientation, and preset projection angle.
  • Fig. 2F shows a flowchart of a method for generating training samples. As shown in FIG. 2F, after the above step S105, the method for generating training samples may further include the following steps:
  • Step S106 input the training sample into a preset semantic segmentation model for training, so as to obtain a trained model
  • Step S107 Obtain an object segmentation instruction, where the object segmentation instruction carries a target game image, and the target game image includes at least one object to be segmented;
  • Step S108 Input the target game image into the trained model according to the object segmentation instruction to obtain the object contour and object identifier of the object to be segmented.
  • the semantic segmentation model may include an FCN (Fully Convolutional Networks, Fully Convolutional Neural Network) model, a SegNet model, or a Unet model.
  • FCN Full Convolutional Networks, Fully Convolutional Neural Network
  • SegNet SegNet model
  • Unet model a model that is, the shape contour and object of each game object on it Identification
  • Fig. 2G shows a flowchart of a method for generating training samples. As shown in FIG. 2G, after obtaining the object contour and object identifier of the object to be segmented, the method for generating training samples may further include the following steps:
  • Step S109 Extract an image corresponding to the object to be segmented from the target game image according to the contour of the object;
  • Step S110 Obtain the target background image and the text description content of the target object
  • Step S111 project the extracted image onto the target background image to obtain a projection image
  • step S112 the text description content is generated on the projected image to obtain a cover image.
  • the target background image can be extracted from the game scene or specially designed.
  • the text description is mainly used to describe the typical characteristic information of the target object, such as skill function, object type, etc., based on
  • the cover image generated by the target object, target background image, and text description content can be used to make game promotion posters, game strategy, etc.
  • the method for generating training samples obtains the object identification of the object to be trained and the model file corresponding to the object identification.
  • the model file includes a three-dimensional model and a skin texture atlas, and the skin texture atlas includes multiple Solid color skin maps and multiple color skin maps, and then determine the corresponding transformation model of the three-dimensional model at different orientation angles, each of the orientation angles corresponds to one transformation model, and generate multiple color skin maps and the transformation model according to the multiple color skin maps and the transformation model.
  • Sample image groups and then generate an annotation image of each sample image group according to the object identifier, the multiple solid-color skin maps and the transformation model, and generate the training sample of the object to be trained according to the annotation image and the sample image group , Which can automatically generate sample maps and annotation maps without manual screenshots and annotations.
  • the method is convenient, the sample generation efficiency is high, and the generation effect is good.
  • the method for generating the training sample is applied to a server, and the server is a background server of the glory of kings game as an example for detailed description.
  • Figure 4 is a schematic flow diagram of a method for generating training samples provided by an embodiment of this application
  • Figure 5 is a schematic diagram of a framework for the generation process of training samples provided by an embodiment of this application, and the method for generating training samples It includes the following steps:
  • the model file includes a three-dimensional model and a skin texture atlas.
  • the skin texture atlas includes a black skin texture, a white skin texture, and multiple color skin textures.
  • the color skin map can be a 256-color palette, randomly selected 4 colors to generate each time, and the number can be 256.
  • the black skin map refers to an all black solid color skin map
  • the white skin map refers to an all white solid color skin map.
  • the three-dimensional model refers to a coordinate model composed of three-dimensional coordinate points, and is used to describe the shape and contour of the game object.
  • the model file may be automatically obtained by the system, that is, before step S201, the method for generating training samples further includes:
  • a model file is extracted from the storage file group corresponding to each game object, and the model file and the object identifier are copied and saved.
  • part of the storage files at the storage location can be as shown in Figure 3, where the installation path can be ..//com.tencent.tmgp.sgame/files/Resources/AssetBundle/, and the preset string can be ".Assetbundle", as can be seen from Figure 3, the storage files displayed on the current page all have the same name "LianPo", that is, they are all associated files of the game object "LianPo" and have the object identifier of "LianPo" Is 105.
  • one angle can be selected from 0-360 degrees, every 30 degrees interval as the orientation angle, so that there are 12 orientation angles, such as 0°, 30°, 60°, and so on.
  • the preset projection orientation may include three left LEFT, middle MIDDLE, and right RIGHT.
  • the animation of the first projection scene is generated by preset software such as unity3D software, and the animation is captured by the screenshot function, and the captured image is the sample image.
  • the naming format of the sample image group can be 075_N1_ ⁇ 001,002, ..256 ⁇ _O_30°_P_LEFT, and the sample image in the sample image group
  • the naming format can be: 075_N1_xx_O_30°_P_LEFT, where N1 represents color skin textures. Assuming that the number of color skin textures is 256, they can be marked as 001-256 in sequence, and xx is any value in ⁇ 001,002, ..256 ⁇ , For example, 002.
  • S205 Determine a plurality of first reference image groups according to the black skin map, a plurality of preset projection orientations, and the transformation model, and determine a plurality of second reference groups according to the white skin map, a plurality of preset projection orientations, and the transformation model Figure group.
  • the object ID is 075
  • the orientation angle O is 30°
  • P represents the preset projection orientation (such as left LEFT, middle MIDDLE, right RIGHT)
  • N0 represents black or white skin maps (such as black and white)
  • the naming format of a reference picture group can be 075_N0_black_O_30°_P_ ⁇ LEFT, MIDDLE,RIGHT ⁇
  • the naming format of the first single reference picture can be 075_N0_black_O_30°_P_zz, where zz is any one of ⁇ LEFT, MIDDLE, RIGHT ⁇
  • the naming format of the second reference picture group can be 075_N0_white_O_30°_P_yy, yy is any one of ⁇ LEFT, MIDDLE, RIGHT ⁇ .
  • the methods for generating the first reference graph group, the second reference graph group, and the sample graph group are similar. Here, only the generation process of the first reference graph group will be described in detail, and the generation process of the second reference graph group will not be repeated.
  • the above step of "determining multiple first reference image groups according to the black skin map, multiple preset projection orientations, and the transformation model" specifically includes:
  • the first reference pictures corresponding to the same transformation model are grouped into a group to obtain multiple first reference picture groups.
  • the color value of is changed to 075 (that is, the RGB value)
  • the annotation map 075_O_30°_P_LEFT is obtained, which is used as the annotation map of the sample image group 075_N1_ ⁇ 001,002, ..256 ⁇ _O_30°_P_LEFT.
  • Figure 6 shows the input image (that is, the target game image) A1 and the output image A2 of the trained model, where A2 clearly draws 6 objects to be segmented M1 to M6, and each The color value of the object to be segmented is its object identifier, for example, from left to right, it can be 002,010,011,006,138,145.
  • Figure 7 shows the cover image of the hero "Baili Shouyue” in the Glory of Kings game.
  • the post-training model needs to be used to segment the "Baili Shouyue” character image , And then superimpose the character image on the prepared background image, and you can generate a description box at any position of the background image, such as the lower right position, and generate the text description of the hero "Baili Shouyue" in the description box , Such as "God keeps the contract, advanced strategy".
  • the apparatus for generating training samples may be implemented as an independent entity or integrated in an electronic device.
  • Figure 8 specifically describes the device for generating training samples of a semantic segmentation model provided by an embodiment of the present application, which is applied to an electronic device.
  • the semantic segmentation model is used to segment objects from an image.
  • the device for generating training samples may include: an acquiring module 10, a determining module 20, a first generating module 30, a second generating module 40, and a third generating module 50, wherein:
  • the obtaining module 10 is used to obtain the object identification of the object to be trained and the model file corresponding to the object identification, the model file including the three-dimensional model of the object to be trained and a skin map set, the skin map set including a plurality of solid color skin maps And multiple colorful skin maps.
  • the object identifier is a code manually generated by the user or automatically generated by the system for each game object (including the object to be trained), and is used to uniquely identify the game object in the game.
  • the skin map in the skin map set is a texture map, where the color skin map can be a palette of 256 colors, and 4 colors are randomly selected to generate each time, the number of which can be 256.
  • the multiple solid color skin maps refer to texture maps with a single color, which may include black skin maps and white skin maps.
  • the black skin maps refer to all black solid color skin maps, and the white skin map refers to all white solid color skins.
  • the three-dimensional model refers to a coordinate model composed of three-dimensional coordinate points, which is used to describe the shape and contour of the game object. Generally, different game objects have different three-dimensional models.
  • model file can be manually input by the user, such as manually extracting the model file from the game installation package, or it can be automatically acquired by the system, that is, the acquisition module 10 can also be used for:
  • a model file is extracted from the storage file group corresponding to each game object, and the model file and the object identifier are copied and saved.
  • the storage location of the installation package can be found based on the installation path, and all the storage files with the suffix name of the preset string at this storage location can be extracted, and these storage files can be compared according to the name of the game object
  • the storage files of the same game object are grouped into the same group.
  • part of the storage files at the storage location can be as shown in Figure 3, where the installation path can be ..//com.tencent.tmgp.sgame/ files/Resources/AssetBundle/, the preset string can be ".assetbundle".
  • the storage files displayed on the current page all have the same name "LianPo", that is, they are all game objects “LianPo”.
  • the associated file of "Po”, and the object ID of "Lianpo” is 105.
  • the determining module 20 is used to determine the transformation model corresponding to the three-dimensional model under different orientation angles, and each orientation angle corresponds to one transformation model.
  • the orientation angle can be artificially set in advance.
  • an angle can be selected from 0-360 degrees at intervals of 30 degrees as the orientation angle, so that there are 12 orientation angles, such as 0°, 30° , 60°, etc.
  • the transformation model is the model after the 3D model is rotated from the default angle of 0°, 30° or 60°.
  • the first generating module 30 is configured to generate multiple sample image groups corresponding to each transformation model according to the multiple color skin maps and each transformation model, and each sample image group includes multiple sample images.
  • the first generating module 30 is specifically used for:
  • each first rendering model into the game scene according to a plurality of preset projection orientations to obtain a plurality of first projection scenes, and each of the projection orientations corresponds to one first projection scene;
  • sample images corresponding to the same preset projection orientation and transformation model are grouped into one group to obtain multiple sample image groups.
  • the first rendering model is obtained by rendering the transformed model with a color skin map as a texture.
  • the preset projection position can be set artificially. Because the deep learning network is translation invariant, we don’t need to generate a large number of position images. We only need to generate images in the left, center, and right directions, that is, we can project The azimuth is set to the left area, the middle area and the right area.
  • the game scene is a three-dimensional three-dimensional scene.
  • the coordinates of the first rendering model can be updated based on the coordinate system of the game scene to project the first rendering model into the game scene. After that, preset software such as unity3D software can be used.
  • the screen recording function outputs the first three-dimensional projection scene as a two-dimensional image to obtain a sample image, that is, an animation of the first projection scene is generated through preset software such as unity3D software, and the animation is captured through the screenshot function to capture the image This is the sample image.
  • the sample images of the same projection orientation, orientation angle, and game object into a group.
  • the object identification is 075
  • the orientation angle O is 30°
  • the projection orientation P is left LEFT
  • the naming format of the sample image group It can be 075_N1_ ⁇ 001,002, ..256 ⁇ _O_30°_P_LEFT.
  • the naming format of the sample map in this sample map group can be: 075_N1_xx_O_30°_P_LEFT, where N1 represents the color skin map. Assuming the number of color skin maps is 256, it can be followed by Marked as 001-256, then xx is any value in ⁇ 001,002, ..256 ⁇ , such as 002.
  • the second generating module 40 is configured to generate an annotation map of each sample image group according to the object identifier, the multiple solid-color skin maps and each transformation model, and the annotation image is used to annotate the sample images in the sample image group .
  • the annotation map is used to annotate the sample images in the sample image group, such as annotating the outline appearance and object identification of the game object on the sample image, and the sample images in the same sample image group use the same annotation image.
  • the existing method of labeling sample images is manual operation, which has low labeling efficiency.
  • the multiple solid-color skin maps include black skin maps and white skin maps
  • the second generation module 40 specifically includes:
  • the first determining unit 41 is configured to determine multiple first reference image groups according to the black skin map, multiple preset projection orientations, and each transformation model;
  • the second determining unit 42 is configured to determine multiple second reference image groups according to the white skin map, multiple preset projection orientations, and each transformation model;
  • the generating unit 43 is configured to generate an annotation image of each sample image group according to the object identifier, the plurality of first reference image groups, and the plurality of second reference image groups.
  • the game object can be filled into black and white respectively, and the first reference image group is generated based on different projection orientations (such as left, center, and right) of the same black game object at the same orientation angle (such as 330°) , Generating a second reference image group based on different projection orientations of the same white game object under the same orientation angle.
  • the reference pictures in the same first reference picture group or the second reference picture group can be named according to certain rules.
  • the object identifier is 075
  • the orientation angle O is 30°
  • P represents the preset projection orientation (for example, Left LEFT, middle MIDDLE, right RIGHT)
  • N0 represents black or white skin textures (such as black and white)
  • the naming format of the first reference image group can be 075_N0_black_O_30°_P_ ⁇ LEFT,MIDDLE,RIGHT ⁇ , where single
  • the naming format of the first reference picture can be 075_N0_black_O_30°_P_zz, zz is any one of ⁇ LEFT,MIDDLE,RIGHT ⁇
  • the naming format of the second reference picture group can be 075_N0_white_O_30°_P_yy, yy is ⁇ LEFT,MIDDLE,RIGHT ⁇ Any of them.
  • the method for generating the first reference picture group and the second reference picture group are similar. Here, only the generation process of the first reference picture group will be described in detail, and the generation process of the second reference picture group will not be repeated.
  • the first determining unit 41 is specifically configured to:
  • the first reference pictures corresponding to the same transformation model are grouped into a group to obtain multiple first reference picture groups.
  • the second rendering model is obtained by rendering the transformed model with a black skin map as a texture.
  • the coordinates of the second rendering model can be updated based on the coordinate system of the game scene, so as to project the second rendering model into the game scene.
  • the screen recording function of the preset software such as unity3D software can be used to convert the three-dimensional first rendering model.
  • the second projection scene is output as a two-dimensional image, and the first reference image is obtained.
  • the generating unit 43 is specifically used for:
  • an annotation image corresponding to the sample image group is generated.
  • the generating unit 43 is specifically configured to:
  • the numerical value of the object identifier is used as the color value, and the color of the area where the white pixel is located in the target reference image is replaced to obtain the annotation image of the sample image group corresponding to the same transformation model and the preset projection orientation.
  • both the first reference image and the second reference image will inevitably have interfering objects, which will affect the contour recognition of the game object.
  • the two reference images are mutually When fitting, the non-overlapping area is usually the area where the interfering object is located, and the overlapping area is the area where the game object is located, so that the contour of the game object can be better recognized, and then the color of the recognized object contour is filled into the object identification Value size, so that the outline and object identification can be better associated.
  • the third generating module 50 is configured to generate training samples of the object to be trained according to the annotation map and the sample image group, so as to train the semantic segmentation model through the training samples of the object to be trained.
  • each sample image and corresponding annotation image can be used as a training sample.
  • different sample images in the same sample image group correspond to the same annotation image, for example, for a certain sample image group 075_N1_ ⁇ 001,002,... 256 ⁇ _O_30°_P_LEFT, the corresponding annotation map can be 075_O_30°_P_LEFT, that is, the sample map group and the corresponding annotation map are related to the same game object, projection orientation, and preset projection angle.
  • the training sample can be used to train the deep learning model, so that the game object can be recognized by the training model later, that is, please refer to Figure 10, the training sample
  • the generating device also includes a training module 60 and a segmentation module 70,
  • the training module 60 is configured to: after the third generating module 50 generates a training sample of the object to be trained according to the labeled image and the sample image group, input the training sample into a preset semantic segmentation model for training, so as to obtain Model after training;
  • the segmentation module 70 is configured to: obtain an object segmentation instruction, the object segmentation instruction carries a target game image, and the target game image includes at least one object to be segmented; according to the object segmentation instruction, the target game image is input into the trained model, In order to obtain the object contour and the object identifier of the object to be divided.
  • the semantic segmentation model may include an FCN (Fully Convolutional Networks, Fully Convolutional Neural Network) model, a SegNet model, or a Unet model.
  • FCN Full Convolutional Networks, Fully Convolutional Neural Network
  • SegNet SegNet model
  • Unet model a model that is, the shape contour and object of each game object on it Identification
  • a promotional poster can be generated based on the game object, that is, the segmentation module 70 is also used for:
  • segmentation module 70 obtains the object contour and the object identifier of the object to be segmented, extract an image corresponding to the object to be segmented from the target game image according to the object contour;
  • the target background image can be extracted from the game scene or specially designed.
  • the text description is mainly used to describe the typical characteristic information of the target object, such as skill function, object type, etc., based on
  • the cover image generated by the target object, target background image, and text description content can be used to make game promotion posters, game strategy, etc.
  • each of the above units can be implemented as an independent entity, or can be combined arbitrarily, and implemented as the same or several entities.
  • each of the above units please refer to the previous method embodiments, which will not be repeated here.
  • the device for generating training samples obtains the object identifier of the object to be trained and the model file corresponding to the object identifier through the acquisition module 10, and the model file includes a three-dimensional model and a skin map set.
  • the set includes multiple solid color skin maps and multiple color skin maps.
  • the determination module 20 determines the corresponding transformation models of the three-dimensional model at different orientation angles. Each orientation angle corresponds to one transformation model.
  • the first generation module 30 determines the transformation model according to the Multiple color skin maps and the transformation model generate multiple sample image groups, and then the second generation module 40 generates an annotation image of each sample image group according to the object identifier, the multiple solid color skin maps and the transformation model, and the third
  • the generating module 50 generates the training samples of the object to be trained according to the annotation map and the sample image group, thereby automatically generating the sample image and the annotation map without manual screenshots and annotations, the method is convenient, the sample generation efficiency is high, and the generation effect is good.
  • an embodiment of the present application also provides a system for generating training samples, including any of the training sample generating apparatuses provided in the embodiments of the present application, and the training sample generating apparatus may be integrated in an electronic device.
  • the electronic device can obtain the object identification of the object to be trained and the model file corresponding to the object identification, the model file includes a three-dimensional model and a skin texture atlas, and the skin texture atlas includes multiple solid color skin textures and multiple color skin textures;
  • a solid color skin map and the transformation model generate an annotation map of each sample image group; according to the annotation image and the sample image group, a training sample of the object to be trained is generated.
  • the system for generating training samples may include any device for generating training samples provided in the embodiments of this application, it can achieve the beneficial effects that can be achieved by any device for generating training samples provided by the embodiments of this application. , Please refer to the previous embodiment for details, which will not be repeated here.
  • an embodiment of the present application also provides an electronic device, as shown in FIG. 11, which shows a schematic structural diagram of the electronic device involved in the embodiment of the present application, specifically:
  • the electronic device may include one or more processing core processors 401, one or more computer-readable storage medium memories 402, a radio frequency (RF) circuit 403, a power supply 404, an input unit 405, and a display unit 406 And other parts.
  • RF radio frequency
  • FIG. 11 does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements. among them:
  • the processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. It runs or executes the software programs and/or modules stored in the memory 402, and calls the data stored in the memory 402. Data, perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole.
  • the processor 401 may include one or more processing cores; the processor 401 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly Handle wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 401.
  • the memory 402 may be used to store software programs and modules.
  • the processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402.
  • the memory 402 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of electronic equipment, etc.
  • the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the memory 402 may further include a memory controller to provide the processor 401 with access to the memory 402.
  • the RF circuit 403 can be used to receive and send signals in the process of sending and receiving information. In particular, after receiving the downlink information of the base station, it is processed by one or more processors 401; in addition, the uplink data is sent to the base station.
  • the RF circuit 403 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, and a low noise amplifier (LNA, Low Noise Amplifier) , Duplexer, etc.
  • SIM subscriber identity module
  • LNA Low Noise Amplifier
  • the wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE), Email, Short Messaging Service (SMS, Short Messaging Service), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • Email Short Messaging Service
  • SMS Short Messaging Service
  • the electronic device also includes a power supply 404 (such as a battery) for supplying power to various components.
  • the power supply 404 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power management are realized through the power management system.
  • the power supply 404 may also include any components such as one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
  • the electronic device may further include an input unit 405, which may be used to receive inputted digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the input unit 405 may include a touch-sensitive surface and other input devices.
  • a touch-sensitive surface also known as a touch screen or a touchpad, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch-sensitive surface or on the touch-sensitive surface. Operation near the surface), and drive the corresponding connection device according to the preset program.
  • the touch-sensitive surface may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 401, and can receive and execute the commands sent by the processor 401.
  • multiple types such as resistive, capacitive, infrared, and surface acoustic waves can be used to realize touch-sensitive surfaces.
  • the input unit 405 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
  • the electronic device may also include a display unit 406, which can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces may consist of graphics, text, icons, Video and any combination of it.
  • the display unit 406 may include a display panel, and the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode), etc.
  • LCD liquid crystal display
  • OLED Organic Light-Emitting Diode
  • the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 401 to determine the type of the touch event, and then the processor 401 displays the display panel according to the type of the touch event. Corresponding visual output is provided on the panel.
  • the touch-sensitive surface and the display panel are used as two independent components to realize the input and input functions, in some embodiments, the touch-sensitive surface and the display panel may be integrated to realize the input and output functions.
  • the electronic device may also include a camera, a Bluetooth module, etc., which will not be repeated here.
  • the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the executable file stored in the memory 402.
  • the application programs in the memory 402, thereby realizing various functions, are as follows:
  • the model file including a three-dimensional model and a skin map set, the skin map set including multiple solid color skin maps and multiple color skin maps;
  • a training sample of the object to be trained is generated according to the annotation image and the sample image group.
  • the electronic device can achieve the effective effects that can be achieved by any of the training sample generating apparatuses provided in the embodiments of the present application. For details, refer to the previous embodiments, and will not be repeated here.
  • the program can be stored in a computer-readable storage medium, and the storage medium can include: Read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Molecular Biology (AREA)
  • Geometry (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种语义分割模型的训练样本的生成方法、装置、存储介质及电子设备,所述语义分割模型用于对图像中的对象进行分割,该语义分割模型的训练样本的生成方法由电子设备执行,包括:获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括所述待训练对象的三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图(S101);确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型(S102);根据该多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组(S103);根据该对象标识、所述多张纯色皮肤贴图和每个变换模型生成每个该样本图组的标注图(S104);根据该标注图和该样本图组生成该待训练对象的训练样本(S105),以通过所述待训练对象的训练样本对所述语义分割模型进行训练。

Description

语义分割模型的训练样本的生成方法、装置、存储介质及电子设备
本申请要求于2019年10月29日提交中国专利局、申请号为201911039504.3、名称为“训练样本的生成方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,尤其涉及一种语义分割模型的训练样本的生成方法、装置、存储介质及电子设备。
背景
目前,基于游戏内容的推荐***,在向用户推荐某个游戏时,通常会生成一个关于该游戏的宣传海报,该宣传海报上可以包括游戏人物的人物形象和技能介绍等内容,以便用户快速了解该游戏的基本信息。通常该人物形象可以借助提前训练好的深度学习模型从游戏场景中自动识别出。
技术内容
本申请实施例提供了一种语义分割模型的训练样本的生成方法,所述语义分割模型用于对图像中的对象进行分割,由电子设备执行,包括:
获取待训练对象的对象标识、以及所述对象标识对应的模型文件,所述模型文件包括所述待训练对象的三维模型和皮肤贴图集,所述皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;
确定所述三维模型在不同朝向角度下对应的变换模型,每一所述朝向角度对应一个所述变换模型;
根据所述多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,每个样本图组包括多个样本图;
根据所述对象标识、所述多张纯色皮肤贴图和每个变换模型生成每个样本图组的标注图,所述标注图用于对样本图组中的样本图进行标注;
根据所述标注图和所述样本图组生成所述待训练对象的训练样本,以通过所述待训练对象的训练样本对所述语义分割模型进行训练。
本申请实施例还提供了一种语义分割模型的训练样本的生成装置,所述语义分割模型用于对图像中的对象进行分割,包括:
获取模块,用于获取待训练对象的对象标识、以及所述对象标识对应的模型文件,所述模型文件包括所述待训练对象的三维模型和皮肤贴图集,所述皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;
确定模块,用于确定所述三维模型在不同朝向角度下对应的变换模型,每一所述朝向角度对应一个所述变换模型;
第一生成模块,用于根据所述多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,每个样本图组包括多个样本图;
第二生成模块,用于根据所述对象标识、所述黑色皮肤贴图、所述白色皮肤贴图和每个变换模型生成每个样本图组的标注图,所述标注图用于对样本图组中的样本图进行标注;
第三生成模块,用于根据所述标注图和所述样本图组生成所述待训练对象的训练样本,以通过所述待训练对象的训练样本对所述语义分割模型进行训练。
其中,所述第一生成模块具体用于:
根据每张所述彩色皮肤贴图对每个变换模型进行渲染,得到对应的第一渲染模型;
根据多个预设投射方位将每个第一渲染模型投射到游戏场景中,得到多个第一投射场景,每个所述投射方位对应一个所述第一投射场景;
生成每个所述第一投射场景的图像,并将生成的所述图像作为样本图;
将同一所述预设投射方位和变换模型对应的所述样本图归为一组,以得到多个样本图组。
其中,所述多张纯色皮肤贴图包括黑色皮肤贴图和白色皮肤贴图,所述第二生成模块具体包括:
第一确定单元,用于根据所述黑色皮肤贴图、多个预设投射方位和每个变换模型确定多个第一参考图组;
第二确定单元,用于根据所述白色皮肤贴图、所述多个预设投射方位和每个变换模型确定多个第二参考图组;
生成单元,用于根据所述对象标识、所述多个第一参考图组和所述多个第二参考图组生成每个所述样本图组的标注图。
其中,所述第一确定单元具体用于:
根据所述黑色皮肤贴图对每个变换模型进行渲染,得到对应的多个第二渲染模型;
根据所述多个预设投射方位将每个第二渲染模型投射到游戏场景中,得到多个第二投射场景,每个所述投射方位对应一个所述第二投射场景;
生成每个所述第二投射场景的图像,并将生成的所述图像作为第一参考图;
将同一变换模型对应的所述第一参考图归为一组,以得到多个第一参考图组。
其中,所述生成单元具体用于:
从同一变换模型对应的所述第一参考图组和所述第二参考图组中,获取同一所述预设投射方位对应的第一参考图和第二参考图;
将获取的所述第一参考图中黑色像素所在区域的颜色转变为白色,并将所述第一参考图中剩余区域的颜色转变为黑色;
将获取的所述第二参考图中除白色像素之外的剩余区域的颜色转变为黑色;
根据所述对象标识、转变后的所述第一参考图和转变后的所述第二参考图,生成对应样本图组的标注图。
其中,所述生成单元具体用于:
确定转变后的所述第一参考图中白色像素和转变后的所述第二参考图中白色像素的重叠区域;
将转变后的所述第一参考图或转变后的所述第二参考图中,除所述重叠区域之外的剩余区域的颜色转变为黑色,以得到目标参考图;
将所述对象标识的数值作为颜色值,对所述目标参考图中白色像素所在区域的颜色进行替换,得到同一所述变换模型和预设投射方位对应的样本图组的标注 图。
其中,所述训练样本的生成装置还包括训练模块和分割模块,
所述训练模块用于:在所述第三生成模块根据所述标注图和所述样本图组生成所述待训练对象的训练样本之后,将所述训练样本输入预设的语义分割模型中进行训练,以得到训练后模型;
所述分割模块用于:获取对象分割指令,所述对象分割指令携带目标游戏图像,所述目标游戏图像上包括至少一个待分割对象;根据所述对象分割指令将所述目标游戏图像输入所述训练后模型中,以得到所述待分割对象的对象轮廓和对象标识。
其中,所述分割模块还用于:
在得到所述待分割对象的对象轮廓和对象标识之后,根据所述对象轮廓从所述目标游戏图像中提取出对应待分割对象的图像;
获取目标背景图、以及所述目标对象的文字描述内容;
将提取出的所述图像投射到所述目标背景图上,得到投射图;
在所述投射图上生成所述文字描述内容,以得到封面图。
其中,所述获取模块还用于:
在获取待训练对象的对象标识、以及所述对象标识对应的模型文件之前,确定游戏应用的安装路径;
根据所述安装路径确定文件后缀为预设字符串的多个存储文件;
根据所述存储文件的文件名对所述多个存储文件进行分组,得到多个存储文件组,每一所述存储文件组的所述文件名中具有同一游戏对象的名称;
确定每个所述游戏对象的对象标识;
从每个所述游戏对象对应的所述存储文件组中提取出模型文件,并对所述模型文件和所述对象标识进行复制保存。
本申请实施例还提供了一种计算机可读存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行本申请实施例所述的语义分割模型的训练样本的生成方法。
本申请实施例还提供了一种电子设备,包括处理器和存储器,所述处理器与 所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于执行本申请实施例所述的语义分割模型的训练样本的生成方法中的步骤。
附图说明
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。
图1为本申请实施例提供的训练样本的生成***的场景示意图。
图2A为本申请实施例提供的训练样本的生成方法的流程示意图。
图2B为本申请实施例中步骤S104中根据该对象标识、该多张纯色皮肤贴图和该变换模型生成每个该样本图组的标注图的流程图。
图2C为本申请实施例中S1041根据该黑色皮肤贴图、多个预设投射方位和该变换模型确定多个第一参考图组的流程图。
图2D为本申请实施例中S1043中根据该对象标识、该多个第一参考图组和该多个第二参考图组生成每个该样本图组的标注图的流程图。
图2E为本申请实施例中步骤S434中根据该对象标识、转变后的该第一参考图和转变后的该第二参考图,生成对应样本图组的标注图的流程图。
图2F为本申请实施例提供的训练样本的生成方法的流程图。
图2G为本申请实施例提供的训练样本的生成方法的流程图。
图3为本申请实施例提供的安装包中部分存储文件的展示示意图。
图4为本申请实施例提供的训练样本的生成方法的另一流程示意图。
图5为本申请实施例提供的训练样本的生成流程的框架示意图。
图6为本申请实施例提供的模型处理前图像和模型处理后图像的对比示意图。
图7为本申请实施例提供的封面图生成过程的流程示意图
图8为本申请实施例提供的训练样本的生成装置的结构示意图。
图9为本申请实施例提供的训练样本的生成装置的另一结构示意图。
图10为本申请实施例提供的训练样本的生成装置的另一结构示意图。
图11为本申请实施例提供的电子设备的结构示意图。
实施方式
为了下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
通常,自动识别人物形象的深度学习模型的训练样本通常是人工准备的。例如以游戏“王者荣耀”为例,若使深度学习模型能较好地识别出某个英雄,需要准备大约1000个训练样本,每个训练样本都是人工针对该英雄在不同游戏皮肤及不同地图位置下从游戏场景中截图得到样本图,并需要人工对该样本图进行标注。假设王者荣耀有100个英雄,则需要人工截图标注准备10万个训练样本,按照一人小时可以标注150个样本,一天8小时来算,需要一个人83天以上的工作量,很明显这种训练样本的生成方式效率极低,且成本高。
因此,本申请实施例提供一种训练样本的生成方法、装置、存储介质及电子设备,能自动生成样本图和标注图,无需人工截图和标注。
请参阅图1,图1为训练样本的生成***的场景示意图,该训练样本的生成***可以包括本申请实施例提供的任一种训练样本的生成装置,该训练样本的生成装置可以集成在电子设备中,该电子设备可以是游戏应用厂家的后台服务器。
在一些实施例中,该电子设备可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用***。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互***、机电一体化等技术。人工 智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。
由于机器学习在视觉领域的成功应用,研究者也将其引入到图像处理领域中,例如识别出游戏图像中的游戏对象,并对识别出的游戏对象进行分割,以得到该分割出的游戏对象的对象轮廓和对象标识,进而可以生成包含该分割出的游戏对象的宣传海报。该电子设备可以获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型;根据该多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组;根据该对象标识、该黑色皮肤贴图、该白色皮肤贴图和每个变换模型生成每个该样本图组的标注图;根据该标注图和该样本图组生成该待训练对象的训练样本。
其中,该对象标识为用户手动或***自动为每个游戏对象(包括该待训练对象)生成的编码,用于在游戏中唯一标识该游戏对象。该三维模型是指由三维坐标点构成的坐标模型,用于描述该游戏对象的形状轮廓,通常,不同游戏对象有不同的三维模型。该朝向角度可以是人为提前设定的,比如可以从0-360度之间,每间隔30度选取一个角度作为朝向角度,该变换模型为该三维模型从默认角度转动0°,30°或60°后的模型。该标注图用于对样本图组中的样本图进行标注,比如标注出样本图上游戏对象的轮廓外貌以及对象标识,同一样本图组中的样本图采用相同的标注图。
譬如,请参见图1,电子设备可以从游戏应用的安装包中获取待训练对象的模型文件和对象标识,并借助预设软件例如unity3D软件导出模型文件中的三维模型,并按照不同朝向角度(比如0,30°…360°)改变该三维模型的朝向,将不 同朝向的三维模型作为不同的变换模型,之后,根据彩色皮肤贴图和变换模型生成多个样本图组,之后根据对象标识、纯色皮肤贴图和变换模型生成每个样本图组的标注图,并将每张样本图和对应标注图作为一个训练样本,以便后续进行模型训练。
如图2A所示,图2A是本申请实施例提供的训练样本的生成方法的流程示意图,该训练样本的生成方法应用于电子设备,该电子设备可以是游戏应用厂家的后台服务器,具体流程可以如下:
S101.获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括所述待训练对象的三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图。
本实施例中,该对象标识为用户手动或***自动为每个游戏对象(包括该待训练对象)生成的编码,用于在游戏中唯一标识该游戏对象。该皮肤贴图集中的皮肤贴图是纹理图,其中,该彩色皮肤贴图可以是采用256色的调色板,每次随机选取4种颜色生成,其数量可以为256。该多张纯色皮肤贴图是指颜色单一的纹理图,其可以包括黑色皮肤贴图和白色皮肤贴图,该黑色皮肤贴图是指全黑色的纯色皮肤图贴,该白色皮肤贴图是指全白色的纯色皮肤图贴。该三维模型是指由三维坐标点构成的坐标模型,用于描述该游戏对象的形状轮廓,通常,不同游戏对象有不同的三维模型。
需要说明的是,该模型文件可以是用户手动输入的,比如手动从游戏安装包中提取出模型文件,也可以是***自动获取的,此时,在上述步骤S101之前,该训练样本的生成方法还包括:
确定游戏应用的安装路径;
根据该安装路径确定文件后缀为预设字符串的多个存储文件;
根据该存储文件的文件名对该多个存储文件进行分组,得到多个存储文件组,每一该存储文件组的该文件名中具有同一游戏对象的名称;
确定每个该游戏对象的对象标识;
从每个该游戏对象对应的该存储文件组中提取出模型文件,并对该模型文件和该对象标识进行复制保存。
本实施例中,在游戏应用安装后,可以基于安装路径找到安装包的存储位置,并提取这个存储位置处后缀名为预设字符串的所有存储文件,并按照游戏对象的名称对这些存储文件进行分组,同一游戏对象的存储文件归为同一组,譬如,该存储位置处的部分存储文件可以如图3所示,其中,该安装路径可以为..//com.tencent.tmgp.sgame/files/Resources/AssetBundle/,该预设字符串可以为“.assetbundle”,从图3可以看出,当前页面中显示的存储文件均具有同一名称“LianPo”,也即其都是游戏对象“廉颇”的关联文件,且“廉颇”的对象标识为105。
S102.确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型。
本实施例中,该朝向角度可以是人为提前设定的,比如可以从0-360度之间,每间隔30度选取一个角度作为朝向角度,从而有12个朝向角度,比如0°,30°,60°等,相应的,该变换模型为该三维模型从默认角度转动0°,30°或60°后的模型。
S103.根据该多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,每个样本图组包括多个样本图。
例如,上述步骤S103具体可以包括:
根据每张该彩色皮肤贴图对该变换模型进行渲染,得到对应的第一渲染模型;
根据多个预设投射方位将所第一渲染模型投射到游戏场景中,得到多个第一投射场景,每个该投射方位对应一个该第一投射场景;
生成每个该第一投射场景的图像,并将生成的该图像作为样本图;
将同一该预设投射方位和变换模型对应的该样本图归为一组,以得到多个样本图组。
本实施例中,第一渲染模型是以彩色皮肤贴图为纹理对变换模型进行渲染得到。该预设投射方位可以人为设定,由于深度学***移不变性,所以我们不需要生成大量位置的图像,只需生成左、中、右三个方位的图像即可,也即可以将投射方位设定为左区域、中间区域和右区域三种。该游戏场景是三维立体场景,可以基于该游戏场景的坐标系对第一渲染模型的坐标进行更新,以将该第一渲染模型投射到该游戏场景中,之后,可以借助预设软件例如unity3D软件的屏幕录制功能把三维的第一投射场景输出为二维图像,得到样本图,也即通过预 设软件例如unity3D软件生成第一投射场景的动画,通过截图功能对该动画进行图像截取,截取图像即为该样本图。
我们可以把同一投射方位、朝向角度和游戏对象的样本图归为一组,比如,若对象标识为075,朝向角度O为30°,投射方位P为左LEFT,则该样本图组的命名格式可以为075_N1_{001,002,..256}_O_30°_P_LEFT,该样本图组中样本图的命名格式可以为:075_N1_xx_O_30°_P_LEFT,其中,N1代表彩色皮肤贴图,假设彩色皮肤贴图的数量为256,可以依次标记为001-256,则xx为{001,002,..256}中的任一数值,比如002。
S104.根据该对象标识、该多张纯色皮肤贴图和每个变换模型生成每个该样本图组的标注图,所述标注图用于对样本图组中的样本图进行标注。
本实施例中,该标注图用于对样本图组中的样本图进行标注,比如标注出样本图上游戏对象的轮廓外貌以及对象标识,同一样本图组中的样本图采用相同的标注图,相关技术中对样本图进行标注的方式是人工操作,标注效率低。
在一些实施例中,该多张纯色皮肤贴图包括黑色皮肤贴图和白色皮肤贴图,图2B示出了上述步骤S104中根据该对象标识、该多张纯色皮肤贴图和该变换模型生成每个该样本图组的标注图的流程图,如图2B所示,步骤S104具体可以包括以下步骤:
S1041.根据该黑色皮肤贴图、多个预设投射方位和每个变换模型确定多个第一参考图组;
S1042.根据该白色皮肤贴图、多个预设投射方位和每个变换模型确定多个第二参考图组;
S1043.根据该对象标识、该多个第一参考图组和该多个第二参考图组生成每个该样本图组的标注图。
本实施例中,可以分别将游戏对象填充成黑色和白色,并基于同一黑色游戏对象在同一朝向角度(比如330°)下的不同投射方位(比如左、中、右)生成第一参考图组,基于同一白色游戏对象在同一朝向角度下的不同投射方位生成第二参考图组。
需要指出的是,相同第一参考图组或者第二参考图组中的参考图可以按照一定规则命名,比如,若对象标识为075,朝向角度O为30°,P代表预设投射 方位(比如左LEFT、中MIDDLE、右RIGHT),N0代表黑色或白色皮肤贴图(比如black和white),则该第一参考图组的命名格式可以为075_N0_black_O_30°_P_{LEFT,MIDDLE,RIGHT},其中单张第一参考图的命名格式可以为075_N0_black_O_30°_P_zz,zz为{LEFT,MIDDLE,RIGHT}中的任一个,第二参考图组的命名格式可以为075_N0_white_O_30°_P_yy,yy为{LEFT,MIDDLE,RIGHT}中的任一个。
其中,第一参考图组和第二参考图组的生成方法类似,此处只详细介绍第一参考图组的生成过程,第二参考图组的生成过程不再赘述。
图2C示出了上述步骤S1041根据该黑色皮肤贴图、多个预设投射方位和该变换模型确定多个第一参考图组的流程图。如图2C所示,步骤S1041具体包括以下步骤:
步骤S411,根据该黑色皮肤贴图对每个变换模型进行渲染,得到对应的多个第二渲染模型;
步骤S412,根据该多个预设投射方位将每个第二渲染模型投射到游戏场景中,得到多个第二投射场景,每个该投射方位对应一个该第二投射场景;
步骤S413,生成每个该第二投射场景的图像,并将生成的该图像作为第一参考图;
步骤S414,将同一变换模型对应的该第一参考图归为一组,以得到多个第一参考图组。
本实施例中,第二渲染模型是以黑色皮肤贴图为纹理对变换模型进行渲染得到。可以基于该游戏场景的坐标系对第二渲染模型的坐标进行更新,以将该第二渲染模型投射到该游戏场景中,之后,可以借助预设软件例如unity3D软件的屏幕录制功能把三维的第二投射场景输出为二维图像,得到第一参考图。
图2D示出了上述步骤S1043中根据该对象标识、该多个第一参考图组和该多个第二参考图组生成每个该样本图组的标注图的流程图。如图2D所示,上述步骤S1043具体可以包括以下步骤:
步骤S431,从同一变换模型对应的该第一参考图组和该第二参考图组中,获取同一该预设投射方位对应的第一参考图和第二参考图;
步骤S432,将获取的该第一参考图中黑色像素所在区域的颜色转变为白色, 并将该第一参考图中剩余区域的颜色转变为黑色;
步骤S433,将获取的该第二参考图中除白色像素之外的剩余区域的颜色转变为黑色;
步骤S434,根据该对象标识、转变后的该第一参考图和转变后的该第二参考图,生成对应样本图组的标注图。
本实施例中,对第一参考图和第二参考图进行颜色变换后,可以确保游戏人物在这两张参考图上均显示白色,但是由于天空不可避免的会存在白色区域,且游戏地图上除游戏人物之外的某些物体(比如建筑物)可能会显示黑色,这些都会对游戏对象的识别进行干扰,影响对象分割的精准性,因此,需要过滤掉这些干扰因素。
图2E示出了上述步骤S434中根据该对象标识、转变后的该第一参考图和转变后的该第二参考图,生成对应样本图组的标注图的流程图,如图2E所示,上述步骤S434包括以下步骤:
步骤S4341,确定转变后的该第一参考图中白色像素和转变后的该第二参考图中白色像素的重叠区域;
步骤S4342,将转变后的该第一参考图或转变后的该第二参考图中,除该重叠区域之外的剩余区域的颜色转变为黑色,以得到目标参考图;
步骤S4343,将该对象标识的数值作为颜色值,对该目标参考图中白色像素所在区域的颜色进行替换,得到同一该变换模型和预设投射方位对应的样本图组的标注图。
本实施例中,第一参考图和第二参考图中都难免存在干扰物体,影响对游戏对象的轮廓识别,但由于两者的干扰物体大概率是不同物体,从而将这两张参考图彼此贴合时,非重叠区域通常是干扰物体所在的区域,重叠区域是游戏对象所在的区域,从而较好的识别出游戏对象的轮廓,之后通过将识别出的对象轮廓的颜色填充为对象标识的数值大小,从而可以较好地将轮廓和对象标识关联起来。
S105.根据该标注图和该样本图组生成该待训练对象的训练样本,以通过所述待训练对象的训练样本对所述语义分割模型进行训练。
本实施例中,每张样本图和对应标注图可以作为一个训练样本,通常,同一样本图组中的不同样本图均对应同一张标注图,比如对于某个样本图组 075_N1_{001,002,..256}_O_30°_P_LEFT,其对应的标注图可以为075_O_30°_P_LEFT,也即样本图组与对应标注图是针对同一游戏对象、投射方位和预设投射角度建立的关联关系。
另外,在生成某个游戏对象的训练样本后,可以利用该训练样本进行深度学习模型的训练,以便后续通过该训练模型对该游戏对象进行识别。图2F示出了训练样本的生成方法的流程图。如图2F所示,在上述步骤S105之后,该训练样本的生成方法还可以包括以下步骤:
步骤S106,将该训练样本输入预设的语义分割模型中进行训练,以得到训练后模型;
步骤S107,获取对象分割指令,该对象分割指令携带目标游戏图像,该目标游戏图像上包括至少一个待分割对象;
步骤S108,根据该对象分割指令将该目标游戏图像输入该训练后模型中,以得到该待分割对象的对象轮廓和对象标识。
本实施例中,该语义分割模型可以包括FCN(Fully Convolutional Networks,全卷积神经网络)模型、SegNet模型或者Unet模型等。当用户想识别某张游戏图像上有哪些游戏对象(也即待分割对象)时,可以将该游戏图像作为目标游戏图像输入训练后模型中,以确定其上每个游戏对象的形状轮廓和对象标识,实现对游戏对象的分割。
此外,在分割出游戏图像上的游戏对象后,可以基于该游戏对象生成宣传海报。图2G示出了训练样本的生成方法的流程图。如图2G所示,在得到该待分割对象的对象轮廓和对象标识之后,该训练样本的生成方法还可以包括以下步骤:
步骤S109,根据该对象轮廓从该目标游戏图像中提取出对应待分割对象的图像;
步骤S110,获取目标背景图、以及该目标对象的文字描述内容;
步骤S111,将提取出的该图像投射到该目标背景图上,得到投射图;
步骤S112,在该投射图上生成该文字描述内容,以得到封面图。
本实施例中,该目标背景图可以是从游戏场景中提取的,也可以是专门设计的,该文字描述内容主要用于描述该目标对象的典型特点信息,比如技能作用、对象类型等,基于该目标对象、目标背景图和文字描述内容生成的封面图,可以 用于制作游戏宣传海报、游戏攻略等。
由上述可知,本申请提供的训练样本的生成方法,通过获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图,之后确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型,并根据该多张彩色皮肤贴图和该变换模型生成多个样本图组,之后根据该对象标识、该多张纯色皮肤贴图和该变换模型生成每个该样本图组的标注图,并根据该标注图和该样本图组生成该待训练对象的训练样本,从而能自动生成样本图和标注图,无需人工截图和标注,方法便捷,样本生成效率高,生成效果好。
根据上述实施例所描述的方法,以下将以该训练样本的生成方法应用于服务器中,该服务器为王者荣耀游戏的后台服务器为例进行详细说明。
请参见图4和图5,图4为本申请实施例提供的训练样本的生成方法的流程示意图,图5为本申请实施例提供的训练样本的生成流程的框架示意图,该训练样本的生成方法包括以下步骤:
S201.获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括三维模型和皮肤贴图集,该皮肤贴图集包括黑色皮肤贴图、白色皮肤贴图和多张彩色皮肤贴图。
譬如,该彩色皮肤贴图可以是采用256色的调色板,每次随机选取4种颜色生成,其数量可以为256。该黑色皮肤贴图是指全黑色的纯色皮肤图贴,该白色皮肤贴图是指全白色的纯色皮肤图贴。该三维模型是指由三维坐标点构成的坐标模型,用于描述该游戏对象的形状轮廓。
其中,该模型文件可以是***自动获取的,也即在上述步骤S201之前,该训练样本的生成方法还包括:
确定游戏应用的安装路径;
根据该安装路径确定文件后缀为预设字符串的多个存储文件;
根据该存储文件的文件名对该多个存储文件进行分组,得到多个存储文件组,每一该存储文件组的该文件名中具有同一游戏对象的名称;
确定每个该游戏对象的对象标识;
从每个该游戏对象对应的该存储文件组中提取出模型文件,并对该模型文件和该对象标识进行复制保存。
譬如,该存储位置处的部分存储文件可以如图3所示,其中,该安装路径可以为..//com.tencent.tmgp.sgame/files/Resources/AssetBundle/,该预设字符串可以为“.assetbundle”,从图3可以看出,当前页面中显示的存储文件均具有同一名称“LianPo”,也即其都是游戏对象“廉颇”的关联文件,且“廉颇”的对象标识为105。
S202.确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型。
S203.根据每张该彩色皮肤贴图对该变换模型进行渲染,得到对应的第一渲染模型,并根据多个预设投射方位将所第一渲染模型投射到游戏场景中,得到多个第一投射场景,每个该投射方位对应一个该第一投射场景。
S204.生成每个该第一投射场景的图像,并将生成的该图像作为样本图,之后将同一该预设投射方位和变换模型对应的该样本图归为一组,以得到多个样本图组。
譬如,可以从0-360度之间,每间隔30度选取一个角度作为朝向角度,从而有12个朝向角度,比如0°,30°,60°等。该预设投射方位可以包括左LEFT、中MIDDLE、右RIGHT三个。通过预设软件例如unity3D软件生成第一投射场景的动画,通过截图功能对该动画进行图像截取,截取图像即为样本图。
若对象标识为075,朝向角度O为30°,投射方位P为左LEFT,则该样本图组的命名格式可以为075_N1_{001,002,..256}_O_30°_P_LEFT,该样本图组中样本图的命名格式可以为:075_N1_xx_O_30°_P_LEFT,其中,N1代表彩色皮肤贴图,假设彩色皮肤贴图的数量为256,可以依次标记为001-256,则xx为{001,002,..256}中的任一数值,比如002。
S205.根据该黑色皮肤贴图、多个预设投射方位和该变换模型确定多个第一参考图组,并根据该白色皮肤贴图、多个预设投射方位和该变换模型确定多个第二参考图组。
譬如,若对象标识为075,朝向角度O为30°,P代表预设投射方位(比如左LEFT、中MIDDLE、右RIGHT),N0代表黑色或白色皮肤贴图(比如black和white),则该第一参考图组的命名格式可以为075_N0_black_O_30°_P_{LEFT, MIDDLE,RIGHT},其中单张第一参考图的命名格式可以为075_N0_black_O_30°_P_zz,zz为{LEFT,MIDDLE,RIGHT}中的任一个,第二参考图组的命名格式可以为075_N0_white_O_30°_P_yy,yy为{LEFT,MIDDLE,RIGHT}中的任一个。
其中,第一参考图组、第二参考图组和样本图组的生成方法类似,此处只详细介绍第一参考图组的生成过程,第二参考图组的生成过程不再赘述。
例如,上述步骤“根据该黑色皮肤贴图、多个预设投射方位和该变换模型确定多个第一参考图组”具体包括:
根据该黑色皮肤贴图对该变换模型进行渲染,得到对应的第二渲染模型;
根据该多个预设投射方位将所第二渲染模型投射到该游戏场景中,得到多个第二投射场景,每个该投射方位对应一个该第二投射场景;
生成每个该第二投射场景的图像,并将生成的该图像作为第一参考图;
将同一该变换模型对应的该第一参考图归为一组,以得到多个第一参考图组。
S206.从同一该变换模型对应的该第一参考图组和该第二参考图组中,获取同一该预设投射方位对应的第一参考图和第二参考图。
S207.将获取的该第一参考图中黑色像素所在区域的颜色转变为白色,并将该第一参考图中剩余区域的颜色转变为黑色,之后将获取的该第二参考图中除白色像素之外的剩余区域的颜色转变为黑色。
S208.确定转变后的该第一参考图中白色像素和转变后的该第二参考图中白色像素的重叠区域,并将转变后的该第一参考图或转变后的该第二参考图中,除该重叠区域之外的剩余区域的颜色转变为黑色,以得到目标参考图。
S209.将该对象标识的数值作为颜色值,对该目标参考图中白色像素所在区域的颜色进行替换,得到同一该变换模型和预设投射方位对应的样本图组的标注图。
譬如,可以对第一参考图075_N0_black_O_30°_P_LEFT和第二参考图075_N0_white_O_30°_P_LEFT进行颜色转换,并将转换后的两张参考图进行重叠,之后将重叠区域之外的区域转变为黑色,将重叠区域的颜色值更改为075(也即RGB值),得到标注图075_O_30°_P_LEFT,将该标注图作为样本图组075_N1_{001,002,..256}_O_30°_P_LEFT的标注图。
S210.根据该标注图和该样本图组生成该待训练对象的训练样本,并将该训练样本输入预设的语义分割模型中进行训练,以得到训练后模型。
S211.获取对象分割指令,该对象分割指令携带目标游戏图像,该目标游戏图像上包括至少一个待分割对象。
S212.根据该对象分割指令将该目标游戏图像输入该训练后模型中,以得到该待分割对象的对象轮廓和对象标识。
譬如,请参见图6,图6示出了训练后模型的输入图像(也即目标游戏图像)A1和输出图像A2,其中,A2明确绘制出了6个待分割对象M1~M6,且每个待分割对象的颜色值即为其对象标识,比如从左往右依次可以为002,010,011,006,138,145。
S213.根据该对象轮廓从该目标游戏图像中提取出对应待分割对象的图像,并获取目标背景图、以及该目标对象的文字描述内容。
S214.将提取出的该图像投射到该目标背景图上,得到投射图,并在该投射图上生成该文字描述内容,以得到封面图。
譬如,请参见图7,图7示出了王者荣耀游戏中英雄“百里守约”的封面图,在封面图生成过程中,需要借助训练后模型分割出“百里守约”的人物图像,之后将该人物图像叠加在准备好的背景图上,并可以在背景图的任意位置,比如右下方位置生成一个描述框,在该描述框中生成英雄“百里守约”的文字描述内容,比如“狙神守约,进阶攻略”。
根据上述实施例所描述的方法,本实施例将从训练样本的生成装置的角度进一步进行描述,该训练样本的生成装置具体可以作为独立的实体来实现,也可以集成在电子设备中。
请参阅图8,图8具体描述了本申请实施例提供的语义分割模型的训练样本的生成装置,应用于电子设备,所述语义分割模型用于从图像中分割出对象,该语义分割模型的训练样本的生成装置可以包括:获取模块10、确定模块20、第一生成模块30、第二生成模块40和第三生成模块50,其中:
(1)获取模块10
获取模块10,用于获取待训练对象的对象标识、以及该对象标识对应的模 型文件,该模型文件包括所述待训练对象的三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图。
本实施例中,该对象标识为用户手动或***自动为每个游戏对象(包括该待训练对象)生成的编码,用于在游戏中唯一标识该游戏对象。该皮肤贴图集中的皮肤贴图是纹理图,其中,该彩色皮肤贴图可以是采用256色的调色板,每次随机选取4种颜色生成,其数量可以为256。该多张纯色皮肤贴图是指颜色单一的纹理图,其可以包括黑色皮肤贴图和白色皮肤贴图,该黑色皮肤贴图是指全黑色的纯色皮肤图贴,该白色皮肤贴图是指全白色的纯色皮肤图贴。该三维模型是指由三维坐标点构成的坐标模型,用于描述该游戏对象的形状轮廓,通常,不同游戏对象有不同的三维模型。
需要说明的是,该模型文件可以是用户手动输入的,比如手动从游戏安装包中提取出模型文件,也可以是***自动获取的,也即该获取模块10还可以用于:
在获取待训练对象的对象标识、以及该对象标识对应的模型文件之前,确定游戏应用的安装路径;
根据该安装路径确定文件后缀为预设字符串的多个存储文件;
根据该存储文件的文件名对该多个存储文件进行分组,得到多个存储文件组,每一该存储文件组的该文件名中具有同一游戏对象的名称;
确定每个该游戏对象的对象标识;
从每个该游戏对象对应的该存储文件组中提取出模型文件,并对该模型文件和该对象标识进行复制保存。
本实施例中,在游戏应用安装后,可以基于安装路径找到安装包的存储位置,并提取这个存储位置处后缀名为预设字符串的所有存储文件,并按照游戏对象的名称对这些存储文件进行分组,同一游戏对象的存储文件归为同一组,譬如,该存储位置处的部分存储文件可以如图3所示,其中,该安装路径可以为..//com.tencent.tmgp.sgame/files/Resources/AssetBundle/,该预设字符串可以为“.assetbundle”,从图3可以看出,当前页面中显示的存储文件均具有同一名称“LianPo”,也即其都是游戏对象“廉颇”的关联文件,且“廉颇”的对象标识为105。
(2)确定模块20
确定模块20,用于确定该三维模型在不同朝向角度下对应的变换模型,每 一该朝向角度对应一个该变换模型。
本实施例中,该朝向角度可以是人为提前设定的,比如可以从0-360度之间,每间隔30度选取一个角度作为朝向角度,从而有12个朝向角度,比如0°,30°,60°等,相应的,该变换模型为该三维模型从默认角度转动0°,30°或60°后的模型。
(3)第一生成模块30
第一生成模块30,用于根据该多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,每个样本图组包括多个样本图。
例如,该第一生成模块30具体用于:
根据每张该彩色皮肤贴图对每个变换模型进行渲染,得到对应的多个第一渲染模型;
根据多个预设投射方位将每个第一渲染模型投射到游戏场景中,得到多个第一投射场景,每个该投射方位对应一个该第一投射场景;
生成每个该第一投射场景的图像,并将生成的该图像作为样本图;
将同一该预设投射方位和变换模型对应的该样本图归为一组,以得到多个样本图组。
本实施例中,第一渲染模型是以彩色皮肤贴图为纹理对变换模型进行渲染得到。该预设投射方位可以人为设定,由于深度学***移不变性,所以我们不需要生成大量位置的图像,只需生成左、中、右三个方位的图像即可,也即可以将投射方位设定为左区域、中间区域和右区域三种。该游戏场景是三维立体场景,可以基于该游戏场景的坐标系对第一渲染模型的坐标进行更新,以将该第一渲染模型投射到该游戏场景中,之后,可以借助预设软件例如unity3D软件的屏幕录制功能把三维的第一投射场景输出为二维图像,得到样本图,也即通过预设软件例如unity3D软件生成第一投射场景的动画,通过截图功能对该动画进行图像截取,截取图像即为该样本图。
我们可以把同一投射方位、朝向角度和游戏对象的样本图归为一组,比如,若对象标识为075,朝向角度O为30°,投射方位P为左LEFT,则该样本图组的命名格式可以为075_N1_{001,002,..256}_O_30°_P_LEFT,该样本图组中样本图的命名格式可以为:075_N1_xx_O_30°_P_LEFT,其中,N1代表彩色皮肤 贴图,假设彩色皮肤贴图的数量为256,可以依次标记为001-256,则xx为{001,002,..256}中的任一数值,比如002。
(4)第二生成模块40
第二生成模块40,用于根据该对象标识、该多张纯色皮肤贴图和每个变换模型生成每个样本图组的标注图,所述标注图用于对样本图组中的样本图进行标注。
本实施例中,该标注图用于对样本图组中的样本图进行标注,比如标注出样本图上游戏对象的轮廓外貌以及对象标识,同一样本图组中的样本图采用相同的标注图,现有对样本图进行标注的方式是人工操作,标注效率低。
例如,请参见图9,该多张纯色皮肤贴图包括黑色皮肤贴图和白色皮肤贴图,该第二生成模块40具体包括:
第一确定单元41,用于根据该黑色皮肤贴图、多个预设投射方位和每个变换模型确定多个第一参考图组;
第二确定单元42,用于根据该白色皮肤贴图、多个预设投射方位和每个变换模型确定多个第二参考图组;
生成单元43,用于根据该对象标识、该多个第一参考图组和该多个第二参考图组生成每个该样本图组的标注图。
本实施例中,可以分别将游戏对象填充成黑色和白色,并基于同一黑色游戏对象在同一朝向角度(比如330°)下的不同投射方位(比如左、中、右)生成第一参考图组,基于同一白色游戏对象在同一朝向角度下的不同投射方位生成第二参考图组。
需要指出的是,相同第一参考图组或者第二参考图组中的参考图可以按照一定规则命名,比如,若对象标识为075,朝向角度O为30°,P代表预设投射方位(比如左LEFT、中MIDDLE、右RIGHT),N0代表黑色或白色皮肤贴图(比如black和white),则该第一参考图组的命名格式可以为075_N0_black_O_30°_P_{LEFT,MIDDLE,RIGHT},其中单张第一参考图的命名格式可以为075_N0_black_O_30°_P_zz,zz为{LEFT,MIDDLE,RIGHT}中的任一个,第二参考图组的命名格式可以为075_N0_white_O_30°_P_yy,yy为{LEFT,MIDDLE,RIGHT}中的任一个。
其中,第一参考图组和第二参考图组的生成方法类似,此处只详细介绍第一参考图组的生成过程,第二参考图组的生成过程不再赘述。
例如,该第一确定单元41具体用于:
根据该黑色皮肤贴图对每个变换模型进行渲染,得到对应的多个第二渲染模型;
根据该多个预设投射方位将每个第二渲染模型投射到游戏场景中,得到多个第二投射场景,每个该投射方位对应一个该第二投射场景;
生成每个该第二投射场景的图像,并将生成的该图像作为第一参考图;
将同一变换模型对应的该第一参考图归为一组,以得到多个第一参考图组。
本实施例中,第二渲染模型是以黑色皮肤贴图为纹理对变换模型进行渲染得到。可以基于该游戏场景的坐标系对第二渲染模型的坐标进行更新,以将该第二渲染模型投射到该游戏场景中,之后,可以借助预设软件例如unity3D软件的屏幕录制功能把三维的第二投射场景输出为二维图像,得到第一参考图。
例如,该生成单元43具体用于:
从同一变换模型对应的该第一参考图组和该第二参考图组中,获取同一该预设投射方位对应的第一参考图和第二参考图;
将获取的该第一参考图中黑色像素所在区域的颜色转变为白色,并将该第一参考图中剩余区域的颜色转变为黑色;
将获取的该第二参考图中除白色像素之外的剩余区域的颜色转变为黑色;
根据该对象标识、转变后的该第一参考图和转变后的该第二参考图,生成对应样本图组的标注图。
本实施例中,对第一参考图和第二参考图进行颜色变换后,可以确保游戏人物在这两张参考图上均显示白色,但是由于天空不可避免的会存在白色区域,且游戏地图上除游戏人物之外的某些物体(比如建筑物)可能会显示黑色,这些都会对游戏对象的识别进行干扰,影响对象分割的精准性,因此,需要过滤掉这些干扰因素。
具体的,该生成单元43具体用于:
确定转变后的该第一参考图中白色像素和转变后的该第二参考图中白色像素的重叠区域;
将转变后的该第一参考图或转变后的该第二参考图中,除该重叠区域之外的剩余区域的颜色转变为黑色,以得到目标参考图;
将该对象标识的数值作为颜色值,对该目标参考图中白色像素所在区域的颜色进行替换,得到同一该变换模型和预设投射方位对应的样本图组的标注图。
本实施例中,第一参考图和第二参考图中都难免存在干扰物体,影响对游戏对象的轮廓识别,但由于两者的干扰物体大概率是不同物体,从而将这两张参考图彼此贴合时,非重叠区域通常是干扰物体所在的区域,重叠区域是游戏对象所在的区域,从而较好的识别出游戏对象的轮廓,之后通过将识别出的对象轮廓的颜色填充为对象标识的数值大小,从而可以较好地将轮廓和对象标识关联起来。
(5)第三生成模块50
第三生成模块50,用于根据该标注图和该样本图组生成该待训练对象的训练样本,以通过所述待训练对象的训练样本对所述语义分割模型进行训练。
本实施例中,每张样本图和对应标注图可以作为一个训练样本,通常,同一样本图组中的不同样本图均对应同一张标注图,比如对于某个样本图组075_N1_{001,002,..256}_O_30°_P_LEFT,其对应的标注图可以为075_O_30°_P_LEFT,也即样本图组与对应标注图是针对同一游戏对象、投射方位和预设投射角度建立的关联关系。
另外,在生成某个游戏对象的训练样本后,可以利用该训练样本进行深度学习模型的训练,以便后续通过该训练模型对该游戏对象进行识别,也即,请参见图10,该训练样本的生成装置还包括训练模块60和分割模块70,
该训练模块60用于:在该第三生成模块50根据该标注图和该样本图组生成该待训练对象的训练样本之后,将该训练样本输入预设的语义分割模型中进行训练,以得到训练后模型;
该分割模块70用于:获取对象分割指令,该对象分割指令携带目标游戏图像,该目标游戏图像上包括至少一个待分割对象;根据该对象分割指令将该目标游戏图像输入该训练后模型中,以得到该待分割对象的对象轮廓和对象标识。
本实施例中,该语义分割模型可以包括FCN(Fully Convolutional Networks,全卷积神经网络)模型、SegNet模型或者Unet模型等。当用户想识别某张游戏图像上有哪些游戏对象(也即待分割对象)时,可以将该游戏图像作为目标游戏图 像输入训练后模型中,以确定其上每个游戏对象的形状轮廓和对象标识,实现对游戏对象的分割。
此外,在分割出游戏图像上的游戏对象后,可以基于该游戏对象生成宣传海报,也即,该分割模块70还用于:
在该分割模块70得到该待分割对象的对象轮廓和对象标识之后,根据该对象轮廓从该目标游戏图像中提取出对应待分割对象的图像;
获取目标背景图、以及该目标对象的文字描述内容;
将提取出的该图像投射到该目标背景图上,得到投射图;
在该投射图上生成该文字描述内容,以得到封面图。
本实施例中,该目标背景图可以是从游戏场景中提取的,也可以是专门设计的,该文字描述内容主要用于描述该目标对象的典型特点信息,比如技能作用、对象类型等,基于该目标对象、目标背景图和文字描述内容生成的封面图,可以用于制作游戏宣传海报、游戏攻略等。
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。
由上述可知,本实施例提供的训练样本的生成装置,通过获取模块10获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图,之后确定模块20确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型,第一生成模块30根据该多张彩色皮肤贴图和该变换模型生成多个样本图组,之后第二生成模块40根据该对象标识、该多张纯色皮肤贴图和该变换模型生成每个该样本图组的标注图,第三生成模块50根据该标注图和该样本图组生成该待训练对象的训练样本,从而能自动生成样本图和标注图,无需人工截图和标注,方法便捷,样本生成效率高,生成效果好。
相应的,本申请实施例还提供一种训练样本的生成***,包括本申请实施例所提供的任一种训练样本的生成装置,该训练样本的生成装置可以集成在电子设备中。
其中,电子设备可以获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型;根据该多张彩色皮肤贴图和该变换模型生成多个样本图组;根据该对象标识、该多张纯色皮肤贴图和该变换模型生成每个该样本图组的标注图;根据该标注图和该样本图组生成该待训练对象的训练样本。
以上各个设备的具体实施可参见前面的实施例,在此不再赘述。
由于该训练样本的生成***可以包括本申请实施例所提供的任一种训练样本的生成装置,因此,可以实现本申请实施例所提供的任一种训练样本的生成装置所能实现的有益效果,详见前面的实施例,在此不再赘述。
相应的,本申请实施例还提供一种电子设备,如图11所示,其示出了本申请实施例所涉及的电子设备的结构示意图,具体来讲:
该电子设备可以包括一个或者一个以上处理核心的处理器401、一个或一个以上计算机可读存储介质的存储器402、射频(Radio Frequency,RF)电路403、电源404、输入单元405、以及显示单元406等部件。本领域技术人员可以理解,图11中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
处理器401是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器401可包括一个或多个处理核心;处理器401可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器401中。
存储器402可用于存储软件程序以及模块,处理器401通过运行存储在存储器402的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器402可以包括高速 随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器401对存储器402的访问。
RF电路403可用于收发信息过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器401处理;另外,将涉及上行的数据发送给基站。通常,RF电路403包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,RF电路403还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯***(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,General Packet Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long Term Evolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。
电子设备还包括给各个部件供电的电源404(比如电池),电源404可以通过电源管理***与处理器401逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。电源404还可以包括一个或一个以上的直流或交流电源、再充电***、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
该电子设备还可包括输入单元405,该输入单元405可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元405可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器401,并能接收处理器401发来的命令并加以执行。此外,可以采用 电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元405还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
该电子设备还可包括显示单元406,该显示单元406可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元406可包括显示面板,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器401以确定触摸事件的类型,随后处理器401根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图11中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。
尽管未示出,电子设备还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,电子设备中的处理器401会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能,如下:
获取待训练对象的对象标识、以及该对象标识对应的模型文件,该模型文件包括三维模型和皮肤贴图集,该皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;
确定该三维模型在不同朝向角度下对应的变换模型,每一该朝向角度对应一个该变换模型;
根据该多张彩色皮肤贴图和该变换模型生成多个样本图组;
根据该对象标识、该多张纯色皮肤贴图和该变换模型生成每个该样本图组的标注图;
根据该标注图和该样本图组生成该待训练对象的训练样本。
该电子设备可以实现本申请实施例所提供的任一种训练样本的生成装置所能实现的有效效果,详见前面的实施例,在此不再赘述。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
以上对本申请实施例所提供的一种训练样本的生成方法、装置、存储介质和电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (15)

  1. 一种语义分割模型的训练样本的生成方法,所述语义分割模型用于从图像中分割出对象,由电子设备执行,包括:
    获取待训练对象的对象标识、以及所述对象标识对应的模型文件,所述模型文件包括所述待训练对象的三维模型和皮肤贴图集,所述皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;
    确定所述三维模型在不同朝向角度下对应的变换模型,每一所述朝向角度对应一个所述变换模型;
    根据所述多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,每个样本图组包括多个样本图;
    根据所述对象标识、所述多张纯色皮肤贴图和每个变换模型生成每个样本图组的标注图,所述标注图用于对样本图组中的样本图进行标注;
    根据所述标注图和所述样本图组生成所述待训练对象的训练样本,以通过所述待训练对象的训练样本对所述语义分割模型进行训练。
  2. 根据权利要求1所述的训练样本的生成方法,其中,所述根据所述多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,包括:
    根据每张所述彩色皮肤贴图对每个变换模型进行渲染,得到对应的多个第一渲染模型;
    根据多个预设投射方位将每个第一渲染模型投射到游戏场景中,得到多个第一投射场景,每个所述投射方位对应一个所述第一投射场景;
    生成每个所述第一投射场景的图像,并将生成的所述图像作为样本图;
    将同一所述预设投射方位和变换模型对应的所述样本图归为一组,以得到多个样本图组。
  3. 根据权利要求1所述的训练样本的生成方法,其中,所述多张纯色皮肤贴图包括黑色皮肤贴图和白色皮肤贴图,所述根据所述对象标识、所述多张纯色皮肤贴图和每个变换模型生成每个样本图组的标注图,包括:
    根据所述黑色皮肤贴图、多个预设投射方位和每个变换模型确定多个第一参考图组;
    根据所述白色皮肤贴图、所述多个预设投射方位和每个变换模型确定多个第 二参考图组;
    根据所述对象标识、所述多个第一参考图组和所述多个第二参考图组生成每个所述样本图组的标注图。
  4. 根据权利要求3所述的训练样本的生成方法,其中,所述根据所述黑色皮肤贴图、多个预设投射方位和每个变换模型确定多个第一参考图组,包括:
    根据所述黑色皮肤贴图对每个变换模型进行渲染,得到对应的多个第二渲染模型;
    根据所述多个预设投射方位将每个第二渲染模型投射到游戏场景中,得到多个第二投射场景,每个所述投射方位对应一个所述第二投射场景;
    生成每个所述第二投射场景的图像,并将生成的所述图像作为第一参考图;
    将同一变换模型对应的所述第一参考图归为一组,以得到多个第一参考图组。
  5. 根据权利要求3所述的训练样本的生成方法,其中,所述根据所述对象标识、所述多个第一参考图组和所述多个第二参考图组生成每个所述样本图组的标注图,包括:
    从同一变换模型对应的所述第一参考图组和所述第二参考图组中,获取同一所述预设投射方位对应的第一参考图和第二参考图;
    将获取的所述第一参考图中黑色像素所在区域的颜色转变为白色,并将所述第一参考图中剩余区域的颜色转变为黑色;
    将获取的所述第二参考图中除白色像素之外的剩余区域的颜色转变为黑色;
    根据所述对象标识、转变后的所述第一参考图和转变后的所述第二参考图,生成对应样本图组的标注图。
  6. 根据权利要求5所述的训练样本的生成方法,其中,所述根据所述对象标识、转变后的所述第一参考图和转变后的所述第二参考图,生成对应样本图组的标注图,包括:
    确定转变后的所述第一参考图中白色像素和转变后的所述第二参考图中白色像素的重叠区域;
    将转变后的所述第一参考图或转变后的所述第二参考图中,除所述重叠区域之外的剩余区域的颜色转变为黑色,以得到目标参考图;
    将所述对象标识的数值作为颜色值,对所述目标参考图中白色像素所在区域 的颜色进行替换,得到同一所述变换模型和预设投射方位对应的样本图组的标注图。
  7. 根据权利要求1-6中任意一项所述的训练样本的生成方法,其中,在根据所述标注图和所述样本图组生成所述待训练对象的训练样本之后,还包括:
    将所述训练样本输入预设的语义分割模型中进行训练,以得到训练后模型;
    获取对象分割指令,所述对象分割指令携带目标游戏图像,所述目标游戏图像上包括至少一个待分割对象;
    根据所述对象分割指令将所述目标游戏图像输入所述训练后模型中,以得到所述待分割对象的对象轮廓和对象标识。
  8. 根据权利要求7所述的训练样本的生成方法,其中,在得到所述待分割对象的对象轮廓和对象标识之后,还包括:
    根据所述对象轮廓从所述目标游戏图像中提取出对应待分割对象的图像;
    获取目标背景图、以及所述目标对象的文字描述内容;
    将提取出的所述图像投射到所述目标背景图上,得到投射图;
    在所述投射图上生成所述文字描述内容,以得到封面图。
  9. 根据权利要求1-6中任意一项所述的训练样本的生成方法,其中,在获取待训练对象的对象标识、以及所述对象标识对应的模型文件之前,还包括:
    确定游戏应用的安装路径;
    根据所述安装路径确定文件后缀为预设字符串的多个存储文件;
    根据所述存储文件的文件名对所述多个存储文件进行分组,得到多个存储文件组,每一所述存储文件组的所述文件名中具有同一游戏对象的名称;
    确定每个所述游戏对象的对象标识;
    从每个所述游戏对象对应的所述存储文件组中提取出模型文件,并对所述模型文件和所述对象标识进行复制保存。
  10. 一种语义分割模型的训练样本的生成装置,所述语义分割模型用于对图像中的对象进行分割,包括:
    获取模块,用于获取待训练对象的对象标识、以及所述对象标识对应的模型文件,所述模型文件包括所述待训练对象的三维模型和皮肤贴图集,所述皮肤贴图集包括多张纯色皮肤贴图和多张彩色皮肤贴图;
    确定模块,用于确定所述三维模型在不同朝向角度下对应的变换模型,每一所述朝向角度对应一个所述变换模型;
    第一生成模块,用于根据所述多张彩色皮肤贴图和每个变换模型生成每个变换模型对应的多个样本图组,每个样本图组包括多个样本图;
    第二生成模块,用于根据所述对象标识、所述多张纯色皮肤贴图和每个变换模型生成每个样本图组的标注图,所述标注图用于对样本图组中的样本图进行标注;
    第三生成模块,用于根据所述标注图和所述样本图组生成所述待训练对象的训练样本,以通过所述待训练对象的训练样本对所述语义分割模型进行训练。
  11. 根据权利要求10所述的训练样本的生成装置,其中,所述第一生成模块具体用于:
    根据每张所述彩色皮肤贴图对每个变换模型进行渲染,得到对应的多个第一渲染模型;
    根据多个预设投射方位将每个第一渲染模型投射到游戏场景中,得到多个第一投射场景,每个所述投射方位对应一个所述第一投射场景;
    生成每个所述第一投射场景的图像,并将生成的所述图像作为样本图;
    将同一所述预设投射方位和变换模型对应的所述样本图归为一组,以得到多个样本图组。
  12. 根据权利要求10所述的训练样本的生成装置,其中,所述多张纯色皮肤贴图包括黑色皮肤贴图和白色皮肤贴图,所述第二生成模块具体包括:
    第一确定单元,用于根据所述黑色皮肤贴图、多个预设投射方位和每个变换模型确定多个第一参考图组;
    第二确定单元,用于根据所述白色皮肤贴图、所述多个预设投射方位和每个变换模型确定多个第二参考图组;
    生成单元,用于根据所述对象标识、所述多个第一参考图组和所述多个第二参考图组生成每个所述样本图组的标注图。
  13. 根据权利要求12所述的训练样本的生成装置,其中,所述第一确定单元具体用于:
    根据所述黑色皮肤贴图对每个变换模型进行渲染,得到对应的多个第二渲染 模型;
    根据所述多个预设投射方位将每个第二渲染模型投射到游戏场景中,得到多个第二投射场景,每个所述投射方位对应一个所述第二投射场景;
    生成每个所述第二投射场景的图像,并将生成的所述图像作为第一参考图;
    将同一变换模型对应的所述第一参考图归为一组,以得到多个第一参考图组。
  14. 一种计算机可读存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行权利要求1至9任一项所述的训练样本的生成方法。
  15. 一种电子设备,包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于执行权利要求1至9任一项所述的训练样本的生成方法中的步骤。
PCT/CN2020/120140 2019-10-29 2020-10-10 语义分割模型的训练样本的生成方法、装置、存储介质及电子设备 WO2021082885A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20882890.5A EP3989120A4 (en) 2019-10-29 2020-10-10 METHOD AND DEVICE FOR PRODUCING A TRAINING SAMPLE FOR A SEMANTIC SEGMENTATION MODEL, STORAGE MEDIA AND ELECTRONIC DEVICE
US17/516,883 US11934485B2 (en) 2019-10-29 2021-11-02 Method and apparatus for generating training sample of semantic segmentation model, storage medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911039504.3A CN110852332B (zh) 2019-10-29 2019-10-29 训练样本的生成方法、装置、存储介质及电子设备
CN201911039504.3 2019-10-29

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/516,883 Continuation US11934485B2 (en) 2019-10-29 2021-11-02 Method and apparatus for generating training sample of semantic segmentation model, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2021082885A1 true WO2021082885A1 (zh) 2021-05-06

Family

ID=69598619

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/120140 WO2021082885A1 (zh) 2019-10-29 2020-10-10 语义分割模型的训练样本的生成方法、装置、存储介质及电子设备

Country Status (4)

Country Link
US (1) US11934485B2 (zh)
EP (1) EP3989120A4 (zh)
CN (1) CN110852332B (zh)
WO (1) WO2021082885A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110852332B (zh) * 2019-10-29 2020-12-01 腾讯科技(深圳)有限公司 训练样本的生成方法、装置、存储介质及电子设备
CN111680758B (zh) * 2020-06-15 2024-03-05 杭州海康威视数字技术股份有限公司 图像训练样本生成方法和装置
CN112232385A (zh) * 2020-09-27 2021-01-15 北京五八信息技术有限公司 一种图像处理方法及装置
CN112200227A (zh) * 2020-09-28 2021-01-08 深圳市华付信息技术有限公司 一种基于飞机3d模型的飞机检测方法
CN114463593A (zh) 2020-11-09 2022-05-10 财团法人工业技术研究院 辨识***及其图资扩增与训练方法
JP2022091270A (ja) * 2020-12-09 2022-06-21 ブラザー工業株式会社 方法、システム、および、コンピュータプログラム
CN114926705B (zh) * 2022-05-12 2024-05-28 网易(杭州)网络有限公司 封面设计模型训练方法、介质、装置和计算设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102982578A (zh) * 2012-10-31 2013-03-20 北京航空航天大学 单幅人物图像中着装人体三维模型估计方法
CN108509855A (zh) * 2018-03-06 2018-09-07 成都睿码科技有限责任公司 一种通过增强现实生成机器学习样本图片的***及方法
US20180276821A1 (en) * 2015-12-03 2018-09-27 Sun Yat-Sen University Method for Automatically Recognizing Liver Tumor Types in Ultrasound Images
CN109635853A (zh) * 2018-11-26 2019-04-16 深圳市玛尔仕文化科技有限公司 基于计算机图形技术自动生成人工智能训练样本的方法
CN110363175A (zh) * 2019-07-23 2019-10-22 厦门美图之家科技有限公司 图像处理方法、装置及电子设备
CN110852332A (zh) * 2019-10-29 2020-02-28 腾讯科技(深圳)有限公司 训练样本的生成方法、装置、存储介质及电子设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302440C (zh) * 2004-04-13 2007-02-28 复旦大学 基于样图覆盖、分割的三维纹理贴图方法
EP2608153A1 (en) * 2011-12-21 2013-06-26 Harman Becker Automotive Systems GmbH Method and system for playing an augmented reality game in a motor vehicle
WO2015192117A1 (en) * 2014-06-14 2015-12-17 Magic Leap, Inc. Methods and systems for creating virtual and augmented reality
CN105069846B (zh) * 2015-08-05 2018-08-07 网易(杭州)网络有限公司 3d模型变换方法、装置及终端
US11599783B1 (en) * 2017-05-31 2023-03-07 Databricks, Inc. Function creation for database execution of deep learning model
US11011275B2 (en) * 2018-02-12 2021-05-18 Ai.Skopy, Inc. System and method for diagnosing gastrointestinal neoplasm
CN110314379B (zh) * 2018-03-29 2022-07-26 腾讯科技(深圳)有限公司 动作输出深度训练模型的学习方法及相关设备
CN109224444A (zh) 2018-08-17 2019-01-18 深圳市商汤科技有限公司 游戏人物识别方法、装置、存储介质和电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102982578A (zh) * 2012-10-31 2013-03-20 北京航空航天大学 单幅人物图像中着装人体三维模型估计方法
US20180276821A1 (en) * 2015-12-03 2018-09-27 Sun Yat-Sen University Method for Automatically Recognizing Liver Tumor Types in Ultrasound Images
CN108509855A (zh) * 2018-03-06 2018-09-07 成都睿码科技有限责任公司 一种通过增强现实生成机器学习样本图片的***及方法
CN109635853A (zh) * 2018-11-26 2019-04-16 深圳市玛尔仕文化科技有限公司 基于计算机图形技术自动生成人工智能训练样本的方法
CN110363175A (zh) * 2019-07-23 2019-10-22 厦门美图之家科技有限公司 图像处理方法、装置及电子设备
CN110852332A (zh) * 2019-10-29 2020-02-28 腾讯科技(深圳)有限公司 训练样本的生成方法、装置、存储介质及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3989120A4 *

Also Published As

Publication number Publication date
US20220058436A1 (en) 2022-02-24
US11934485B2 (en) 2024-03-19
EP3989120A1 (en) 2022-04-27
CN110852332B (zh) 2020-12-01
CN110852332A (zh) 2020-02-28
EP3989120A4 (en) 2022-08-24

Similar Documents

Publication Publication Date Title
WO2021082885A1 (zh) 语义分割模型的训练样本的生成方法、装置、存储介质及电子设备
CN111652121B (zh) 一种表情迁移模型的训练方法、表情迁移的方法及装置
WO2021213067A1 (zh) 物品显示方法、装置、设备及存储介质
CN108416003A (zh) 一种图片分类方法和装置、终端、存储介质
CN111399729A (zh) 图像的绘制方法、装置、可读介质和电子设备
US20210152751A1 (en) Model training method, media information synthesis method, and related apparatuses
US11847812B2 (en) Image generation method and apparatus, device, and storage medium
CN112381104A (zh) 一种图像识别方法、装置、计算机设备及存储介质
CN103793146A (zh) 一种图像处理方法及装置
WO2023185391A1 (zh) 交互式分割模型训练方法、标注数据生成方法及设备
CN113596555B (zh) 视频播放方法、装置及电子设备
CN115375835A (zh) 基于二维关键点的三维模型建立方法、计算机及存储介质
CN111881900B (zh) 语料生成、翻译模型训练、翻译方法、装置、设备及介质
CN112270238A (zh) 一种视频内容识别方法和相关装置
CN116229188B (zh) 图像处理显示方法、分类模型的生成方法及其设备
CN113723164A (zh) 获取边缘差异信息的方法、装置、设备及存储介质
CN110516689B (zh) 图像处理方法、装置以及电子设备、存储介质
CN112199534A (zh) 贴纸推荐方法、装置、电子设备及存储介质
CN113655933B (zh) 文本标注方法及装置、存储介质及电子设备
CN113672193B (zh) 音频数据播放方法与装置
EP4170588A2 (en) Video photographing method and apparatus, and device and storage medium
CN115130456A (zh) 语句解析、匹配模型的训练方法、装置、设备及存储介质
CN112258416A (zh) 图像处理方法、装置、电子设备
US20230119741A1 (en) Picture annotation method, apparatus, electronic device, and storage medium
CN117523136B (zh) 人脸点位对应关系处理方法、人脸重建方法、装置及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20882890

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020882890

Country of ref document: EP

Effective date: 20220121

NENP Non-entry into the national phase

Ref country code: DE