A method, device, medium and equipment for generating synthetic data

By creating 3D models in real scenes and performing scene simulations on the simulation platform, scene data with synthetic annotation information is generated, which solves the problems of high cost of obtaining real data and difficulty in simulating diversified scenes for machine learning models, and achieves high Accuracy and flexibility in data generation.

CN118365807BActive Publication Date: 2024-09-10SHENZHEN TIANHAI CHENGUANG TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410796659.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-10
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

Machine learning models, especially deep learning models, require a large amount of labeled real data for training, but obtaining real labeled data is expensive and subject to privacy and security restrictions, making it difficult to simulate diverse scenarios and environments.

Method used

By determining the simulation target in the real scene, creating a 3D model, and performing scene simulation on the simulation platform, obtaining scene simulation data, parsing the data to generate scene data with synthetic annotation information, and simulating various situations and environments.

Benefits of technology

It improves the accuracy and credibility of the data, improves the flexibility and scalability of the data, reduces the cost of data acquisition, and can generate diversified scene simulation data with synthetic annotation information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365807B
    Figure CN118365807B
Patent Text Reader

Abstract

The present invention discloses a synthetic data generation method, device, medium and equipment, the method comprising: creating a 3D model according to the modeling target parameters by a modeling tool; determining a simulation platform of a scene, obtaining scene environment data corresponding to the scene, importing the 3D model and obtaining the scene based on the scene environment data, performing scene simulation under the scene, and obtaining scene simulation data; parsing the scene simulation data, extracting 3D target files and reorganizing them into a complete 3D target, obtaining synthetic annotation information of the 3D target, and obtaining the scene simulation data with synthetic annotation information. The embodiment of the present invention determines the modeling target parameters according to the simulation target in the real scene, and then creates the corresponding 3D model, which has a high degree of authenticity, improves the accuracy and credibility of the data, and can generate diversified scene simulation data with synthetic annotation information, which improves flexibility and expansibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data synthesis, and in particular to a method, device, medium and equipment for generating synthetic data. Background Art

[0002] At present, with the rapid development of machine learning and artificial intelligence, machine learning technology has been widely used in various fields, solving most difficult problems that traditional algorithms cannot solve. For example, in the fields of image recognition, speech recognition, natural language processing, etc., machine learning technology has played a vital role.

[0003] However, for machine learning (especially deep learning), due to its unexplainability, the accuracy and recall of machine learning models (especially deep learning models) depend on the quantity and quality of training samples. Therefore, a large amount of sample data with labeled information is needed to train a highly accurate neural network recognition model based on these sample data.

[0004] However, obtaining authentic and complete labeled data is often costly and may be limited by privacy and security factors.

[0005] Therefore, there is an urgent need for a synthetic data generation method that can simulate various situations and environments and generate diversified scene simulation data with synthetic annotation information. Summary of the invention

[0006] In view of the above problems, the present invention is proposed to provide a synthetic data generation method, device, medium and equipment that overcome the above problems or at least partially solve the above problems.

[0007] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.

[0008] According to a first aspect of an embodiment of the present invention, a method for generating synthetic data is provided, the method comprising:

[0009] Determine modeling target parameters based on the simulation target in the real scene, and create a 3D model according to the modeling target parameters by a modeling tool;

[0010] Determine a simulation platform for a scene, obtain scene environment data corresponding to the scene, import the 3D model and obtain the scene based on the scene environment data, perform scene simulation under the scene, and obtain scene simulation data;

[0011] The scene simulation data is parsed, the 3D target file is extracted and reorganized into a complete 3D target, synthetic annotation information of the 3D target is obtained, and the scene simulation data with synthetic annotation information is obtained.

[0012] In some embodiments of the present invention, determining modeling target parameters based on the simulation target in the real scene, and creating a 3D model according to the modeling target parameters by a modeling tool includes:

[0013] Determine the modeling target parameters based on the simulation target in the real scene and create a basic model;

[0014] The created basic model is adjusted in detail according to the simulation target to obtain the 3D model.

[0015] In some embodiments of the present invention, the simulation platform of the scene includes a simulation platform or a 3D game platform.

[0016] In some embodiments of the present invention, obtaining scene environment data corresponding to the scene includes: determining the scene environment data of the scene or directly importing preset scene environment data; the scene environment data includes the number of camera settings, setting positions and sampling parameters in different areas of the scene, the light source information, geographical and environmental information, time information, weather information and special effects information of the scene, and the movement trajectory of the target in the scene.

[0017] In some embodiments of the present invention, when the simulation platform of the scene is a 3D game platform, the method further includes:

[0018] Determine the MOD adding format and requirements of the 3D game platform, and package the 3D model file into an independent game asset as a whole according to the standard requirements of the 3D game platform;

[0019] Integrate the packaged game assets as a whole into the game body of the 3D game platform through the MOD tool;

[0020] The 3D model is imported into the 3D game platform and the scene is obtained based on the scene environment data, and scene simulation is performed to obtain the scene simulation data.

[0021] In some embodiments of the present invention, parsing the scene simulation data, extracting the 3D target file and reorganizing it into a complete 3D target includes:

[0022] Parsing the scene simulation data to extract a 3D target file and parameter coordinate data, wherein the 3D target file includes appearance picture files of all 3D targets and second grid data;

[0023] Vertex matching is performed based on the first mesh data and the second mesh data of the 3D model to determine all second mesh data included in each 3D object, and all the determined second mesh data are assembled into complete 3D objects.

[0024] In some embodiments of the present invention, obtaining synthetic annotation information of the 3D object includes:

[0025] Matching the appearance image file with the fully assembled 3D object to generate attribute and ReID annotation information;

[0026] respectively extracting depth coefficients of all second mesh data of the same 3D object, determining the level of the 3D object and generating depth information;

[0027] Removing the blocked object according to the generated depth information;

[0028] Confirming the remaining unobstructed 3D objects after removing the occlusion, extracting the second grid data of the unobstructed 3D objects, and generating key point annotation information;

[0029] Recording edge information of the 3D object that is not blocked, and generating instance segmentation annotation information;

[0030] Generate bounding box annotation information based on the instance segmentation annotation information;

[0031] Generate semantic annotation information based on the instance segmentation annotation information and the attribute and ReID annotation information;

[0032] The synthesized annotation information is obtained based on the attributes and the ReID annotation information, the depth information, the key point annotation information, the instance segmentation annotation information, the bounding box annotation information and the semantic annotation information.

[0033] According to a second aspect of an embodiment of the present invention, there is provided a synthetic data generating device, the synthetic data generating device comprising:

[0034] A model creation module, used to determine modeling target parameters based on the simulation target in the real scene, and create a 3D model according to the modeling target parameters through a modeling tool;

[0035] A scene simulation module is used to determine a simulation platform of a scene, obtain scene environment data corresponding to the scene, import the 3D model and obtain the scene based on the scene environment data, perform scene simulation under the scene, and obtain scene simulation data;

[0036] The data parsing module is used to parse the scene simulation data, extract the 3D target file and reorganize it into a complete 3D target, obtain the synthetic annotation information of the 3D target, and obtain the scene simulation data with the synthetic annotation information.

[0037] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which computer program instructions are stored. The computer program instructions are loaded and executed by a processor to implement the operations performed by any of the methods described above.

[0038] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, it implements instructions of any of the methods described above.

[0039] The technical solution provided in the embodiments of the present invention has at least the following technical effects or advantages:

[0040] The embodiments of the present invention provide a method, device, medium and equipment for generating synthetic data, which determine the modeling target parameters according to the simulation target in the real scene, and then create the corresponding 3D model, have high realism, improve the accuracy and credibility of the data, and can simulate various different situations and environments through the simulation platform and the configuration of the scene environment data corresponding to the scene, and can generate diversified scene simulation data with synthetic annotation information, thereby improving flexibility and scalability.

[0041] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic diagram of a flow chart of a synthetic data generation method provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of the process of parsing scene simulation data;

[0045] Figure 3A schematic diagram of a process for obtaining synthetic annotation information of the 3D target;

[0046] Figure 4 A schematic diagram of the principle structure of a synthetic data generating device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings.

[0048] Various structural schematic diagrams according to embodiments of the present disclosure are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may further design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0049] In the context of the present disclosure, when a layer / element is referred to as being "on" another layer / element, the layer / element may be directly on the other layer / element, or there may be an intervening layer / element therebetween. Additionally, if a layer / element is "on" another layer / element in one orientation, the layer / element may be "below" the other layer / element when the orientation is reversed. In the context of the present disclosure, similar or identical components may be denoted by the same or similar reference numerals.

[0050] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in combination with specific implementation methods. It should be understood that the embodiments of the present disclosure and the specific features in the embodiments are detailed descriptions of the technical scheme of the present invention, rather than limitations on the technical scheme of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0051] Figure 1 is a flow chart of a synthetic data generation method provided by an embodiment of the present invention, such as Figure 1 As shown, the synthetic data generation method includes the following steps:

[0052] S1. determining modeling target parameters based on the simulation target in the real scene, and creating a 3D model according to the modeling target parameters by a modeling tool;

[0053] The embodiment of the present invention determines the simulation target in the real scene and sorts out the complexity of the model to determine the modeling target parameters, wherein the modeling target parameters include basic geometric shapes, first mesh data (the number of vertices and triangles of the model mesh), size information, color and painting information, etc.

[0054] In the embodiment of the present invention, the modeling tools include but are not limited to 3DMax, Maya, Modo, Cinema 4D, etc.

[0055] Use modeling tools to create basic models, including temporary models and benchmark models;

[0056] Adjust the details of the created basic model, including adjusting the model's curvature, edges, mapping characteristics, as well as projection and reflection details to make it closer to the real simulation target;

[0057] After the adjustment is completed, the vertices of the 3D model in the first mesh data are determined, the vertices are numbered respectively, the 3D model in the mesh is mapped to a three-dimensional coordinate system (assuming that the coordinate system includes x, y, and z axes), and the coordinate value of each vertex is determined. All vertices are sorted from small to large by the x-axis coordinate (or y-axis, z-axis), followed by sorting the y-axis coordinate (or x-axis, z-axis) from small to large, and finally sorting the z-axis coordinate (or x-axis, or y-axis) from small to large. The vertex with the minimum value of the three coordinates xyz (xzy, yxz, yzx, zxy, zyx) is numbered 1, and so on. The last vertex is the maximum value.

[0058] In the embodiment of the present invention, it also includes setting specific joints and bones for the 3D model to prepare for subsequent 3D target movement.

[0059] After the 3D model is created, the 3D model file is exported; it should be noted that before exporting the 3D model, the export settings can be adjusted according to actual needs, the export settings include coordinate system, dimension unit and appearance options, check the integrity of all parts of the 3D model, check the file size, and optimize the model size of the 3D model according to subsequent scene simulation requirements to ensure that it can work and display normally in the model environment; according to the subsequent use and needs of the 3D model, select a suitable export format, including but not limited to obj, fbx, stl and other formats.

[0060] S2, determining a simulation platform for a scene, obtaining scene environment data corresponding to the scene, importing the 3D model and obtaining the scene based on the scene environment data, performing scene simulation under the scene, and obtaining scene simulation data;

[0061] In the embodiment of the present invention, the simulation platform of the scene includes a simulation platform or a 3D game platform, which can be determined according to actual application requirements, and the present invention is not limited to this.

[0062] The simulation platforms include but are not limited to CryEngine, Godot Engine, Amazon Lumberyard, GameMaker Studio, etc.

[0063] The 3D gaming platform includes but is not limited to Microsoft Flight Simulator, GTAV, Watch Dogs, Forza Horizon, Need for Speed ​​games, etc.

[0064] Due to the different simulation platforms of the scenarios, the corresponding process of scenario simulation is also different. Specifically:

[0065] When the simulation platform of the scene is a simulation platform, the embodiment of the present invention directly imports the 3D model file into the simulation platform, obtains the scene based on the scene environment data, and performs scene simulation to obtain the scene simulation data.

[0066] When the simulation platform of the scene is a 3D game platform, the embodiment of the present invention further includes:

[0067] Determine the MOD adding format and requirements of the 3D game platform, and package the 3D model files (such as model mesh files, texture files PNG or JPG, animation files, resource configuration files) into an independent game asset as a whole according to the standard requirements of the 3D game platform;

[0068] Integrate the packaged game assets into the game body of the 3D game platform through the MOD tool; and test them to make them run normally in the 3D game platform; in the game that supports secondary development, the secondary development tools provided by the game itself can be used to modify the game, that is, the 3D model file is imported into the 3D game platform through MOD injection. The MOD tool injected by the MOD is a tool related to creating and managing MOD, including MOD manager, editor, script extension tool, etc.;

[0069] The 3D model is imported into the 3D game platform and the scene is obtained based on the scene environment data, and scene simulation is performed to obtain the scene simulation data.

[0070] The scene refers to a virtual environment composed of 3D models, textures, lights, special effects and other elements.

[0071] The scene environment data includes the number, location and angle of cameras in different areas of the scene, light source information, geographic and environmental information, time information, weather information and special effects information of the scene, and target movement trajectory in the scene.

[0072] Among them, regarding the setting of the camera, the camera is used to set the observer's perspective in the scene; by setting the number of cameras, multiple cameras are set in different areas of the scene to achieve multi-perspective data capture; or the camera position of each camera is adjusted (embodied as the xyz coordinates of the 3D rectangular coordinate system in the scene); and the sampling parameters of the camera in the scene include: the projection method of the camera, using perspective or orthogonality; the viewing axis is vertical or horizontal; the field of view, including the camera viewing angle width, and the longitudinal angle size; the clipping plane, the distance from the start of camera rendering to the stop of rendering; the near point and the far point, corresponding to the start of depicting the closest and farthest points relative to the camera; the viewport rectangle, using four values ​​to indicate that the camera's view will be drawn in a specific area of ​​the screen, using the screen coordinate system, X represents the starting point of the horizontal position of the camera view, Y represents the starting point of the vertical position of the camera view, W represents the width of the camera output to the screen, and H represents the height of the output to the screen.

[0073] The light source information is used to simulate the lighting effects in the real world, including sunlight, light type settings; and directional light, point light, and spotlight settings.

[0074] The geographical and environmental information may be natural landscapes, such as mountains and rivers, created by using a terrain editor provided by the simulation platform.

[0075] The time information is the conversion ratio of time; for example, based on a simulation platform, the time flow speed in the scene is x*24 hours, x is 0-1, simulating the duration of 1 day in the real world; for example, based on a 3D game platform, through the game secondary development tool, code is written in a programming language, and the API interface in the official secondary development tool is called to set the time change in the game, with x*24 as the flow of 1 day in the real world, and x is 0-1.

[0076] The weather information is the weather status in the scene, and the scene complexity is increased by switching the weather.

[0077] The special effect information includes but is not limited to a particle system, fog effect, cloud layer, and post-processing effect, and the special effect is used to enhance the visual effect and real effect of the scene.

[0078] The target movement trajectory is to bind a movement script to a specific target in the scene (such as the 3D model) so that the target can move freely during scene simulation, which can increase the complexity of the environment and improve the diversity of generated data.

[0079] For example, based on a simulation platform, use the animation control system of the simulation platform, create a new animation controller and assign it to the model, add animation states in the animation controller, assign animation clips to each state, select a specific animation state, record keyframes on the timeline, move in the timeline, adjust the target's posture, position and rotation on different timelines, and record new keyframes to form a continuous animation.

[0080] For example, based on a 3D game platform, through the game secondary development tool, write code in a programming language, call the API interface in the official secondary development tool, set multiple xyz coordinates, and set the target in the game to move between the front and back coordinates, so as to achieve the effect of real-time movement of the target and improve the diversity of scenes.

[0081] The embodiment of the present invention determines the scene environment data of the scene or directly imports the preset scene environment data; the scene environment data can be preset scene environment data directly obtained (obtained externally, or historical data used before), and the preset scene environment data can be directly imported into the corresponding simulation platform. If there is no preset scene environment data, the embodiment of the present invention needs to determine the scene environment data.

[0082] The embodiment of the present invention imports the 3D model and the scene environment data into the simulation platform, and can adjust the positions and angles of different targets again to complete the construction of the scene; at the same time, the mesh renderer, fixed-point shader, etc. of each 3D target can also be set.

[0083] After the scene is built, the scene is simulated based on the scene environment data, the specific target movement is performed according to the target movement trajectory, the weather change is simulated according to the weather information, the time conversion is simulated according to the time information, and the light conversion is simulated according to the light source information. The embodiment of the present invention pauses the scene at a fixed time interval, collects the information and status of all targets in the scene, and obtains the scene simulation data, which is rendered and acquired based on the collected information and status of all targets in the scene. Specifically, the rendering process includes: when the simulation platform is a simulation platform, the mesh information of the current target is recorded through the simulation platform tool or command or code form, including the coordinates and numbers of all vertices; the rendering process of the current video frame is recorded, including the model, texture, shader program; the position, viewing angle and projection mode parameters of the camera; the type, position and attributes of the light source; the geometric data processing process and the vertex shader processing process, including vertex transformation, lighting calculation and other attribute processing; the clipping process, removes the invisible part of the view cone, and the triangle state of the mesh, records the pixel range and coverage of each triangle, and the process of projecting the triangle into the screen space, and the position and color of each pixel. Record the pixel shader state and the depth buffer; finally save the image data after the current video is rendered, that is, the scene simulation data.

[0084] The scene simulation data can be saved as structured data in a specific format, including but not limited to capture files, image files, text files, etc., and stored in a local computer disk or any storage medium that can store such information.

[0085] S3, parsing the scene simulation data, extracting the 3D target file and reorganizing it into a complete 3D target, acquiring synthetic annotation information of the 3D target, and obtaining the scene simulation data with the synthetic annotation information.

[0086] The embodiment of the present invention parses the scene simulation data and finally obtains the scene simulation data with synthetic annotation information.

[0087] Specifically, see Figure 2 As shown, the parsing of the scene simulation data, extracting the 3D target file and reorganizing it into a complete 3D target includes the following sub-steps:

[0088] S30, parsing the scene simulation data to extract 3D target files and parameter coordinate data;

[0089] The reading method of the scene simulation data in the embodiment of the present invention is based on a computer programming language, and the computer programming language includes but is not limited to C language, C++, Java, Python, etc. The embodiment of the present invention parses structured data, traverses all processes when generating video frames, and extracts 3D target files and coordinate data respectively; the 3D target file includes the appearance picture file of all 3D targets and the second grid data; the parameter coordinate data includes the world 3D coordinate data corresponding to all single model grids and cameras in the scene; the process includes loading resource files, drawing grid resources, coordinate conversion, and appearance texture mapping, etc.; wherein each second grid data is represented as a grid part, and a complete 3D target is usually composed of multiple unconnected grid parts, such as a 3D pedestrian target, which is usually composed of a head, torso, limbs, palms, and soles.

[0090] S31, performing vertex matching based on the first mesh data and the second mesh data of the 3D model, determining all second mesh data included in each 3D object, and assembling all the determined second mesh data into a complete 3D object;

[0091] Since a complete 3D target is not an independent mesh file, in order to enable it to move, a complete 3D target is usually composed of multiple mesh parts. For this purpose, the relevant mesh parts need to be assembled. The embodiment of the present invention is based on the second mesh data of all extracted 3D targets for assembly and matching; the specific method is as follows: taking a pedestrian as an example, it is assumed that the pedestrian consists of a head A, a torso B, two upper limbs C and D, two lower limbs E and F, and two soles G and H; all the extracted second mesh data are mapped to a new rectangular coordinate system, and all the first mesh data obtained in step S1 are also mapped to the rectangular coordinate system, and the second mesh data are compared and matched with the first mesh data. If the second mesh data has the same number of vertices as any first mesh data and the corresponding sequence of vertices has the same coordinates in the new coordinate system, then this mesh is marked as A; all the second mesh data are marked in the same way. Assume that the mesh of mesh part human head A has 3 vertices (a1, a2, a3), and the mesh of mesh part torso B has 3 vertices (b1, b2, b3), calculate the distances of a1-b1, a1-b2, a1-b3, a2-b1, a2-b2, a2-b3, a3-b1, a3-b2, and a3-b3 respectively, and take the minimum value as the distance of AB; assuming that 3 mesh part human heads (A1, A2, A3) and 3 mesh part torsos (B1, B2, B3) are extracted in step S31, calculate A1-B1, A1-B2, and A1-B3, and match the two meshes with the smallest distance. Assuming that the distance of A1-B3 is the smallest, it is considered that A1 and B3 belong to parts of a complete 3D target. The torso and upper and lower limbs are matched in the same way, and the upper and lower limbs and palms and soles are matched, and finally all the second grid data contained in the same complete 3D target are determined, and all the determined second grid data are assembled into a complete 3D target.

[0092] Specifically, see Figure 3 As shown, the step of obtaining the synthetic annotation information of the 3D target includes the following sub-steps:

[0093] S32, matching the appearance image file with the fully assembled 3D object to generate attribute and ReID annotation information;

[0094] In step S31, the appearance image files of all 3D targets are extracted. In step S32, all the second grid data are assembled and matched to obtain a complete 3D target individual. The appearance image file and the 3D target individual need to be matched to generate attribute and ReID annotation information. Specifically, by comparing the appearance map information bound to the current 3D target with the original appearance image file in step S31, such as the pedestrian attribute label information, the color and style of the appearance map (top, bottom, hat, etc.) bound to the 3D target at this time are determined to generate attribute annotation information. For ReID annotation, in the same frame of data or in different frames of data, 3D target individuals with the same second grid data composition and the same appearance map file are marked as the identity information (such as ID) of the same 3D target to achieve ReID annotation.

[0095] S33, respectively extracting depth coefficients of all second mesh data of the same 3D object, determining the level of the 3D object and generating depth information;

[0096] The depth information of all models is stored in a depth buffer (Z-buffer), and the depth coefficients of each target in the buffer are sorted from small to large. In step S32, the 3D target is assembled, and the depth coefficients of all second grid data of the 3D target are extracted from the depth buffer, all the depth coefficients are added and their average value is calculated, and the average value is used as the relative depth of the 3D target. Then, the relative depths of each 3D target are reordered and depth information is generated.

[0097] According to the sorted 3D targets (such as ID, etc.), the corresponding coordinate data (such as the 3D world coordinates of the 3D targets and the 3D world coordinates of the camera) and imaging parameters are obtained in turn.

[0098] According to the obtained coordinate data, the 3D world coordinates of the 3D target are converted into camera space coordinates in the order of relative depth sorting. After the conversion is completed, a pixel + 1 operation is performed in the screen area corresponding to the 3D target, and the screen coordinates of all targets are calculated and accumulated to finally generate the depth information of the video frame image.

[0099] Specifically, for example, the world coordinates of the target object are subtracted from the world coordinates of the camera, and then multiplied by the inverse matrix of the camera; the next step is to project the camera space coordinates to the camera's clipping space, which is achieved by multiplying the camera space by the camera's projection matrix; the conversion of the clipping space coordinates to the normalized device coordinates is achieved by dividing the X and Y components of the clipping space coordinates by the W component; finally, the conversion of the normalized coordinates to the screen coordinates is achieved by multiplying the X and Y components of the normalized device coordinates by the width and height of the screen and adjusting them according to the starting position of the screen.

[0100] S34, removing the blocked object according to the generated depth information;

[0101] Specifically, after the screen coordinate conversion of the corresponding target object is completed in step S33, if the value of the current pixel point in the screen area is equal to 1, the area is determined to be the occluded area of ​​the current target, and the pixels of the area are not transformed or recorded, and only the blank area with a value of 0 is recorded; the occluded part of the target is removed, and the occlusion calculation is completed.

[0102] S35, confirming the remaining targets after removing the occlusion, extracting the second grid data of the remaining targets, and generating key point annotation information;

[0103] The embodiment of the present invention calculates the ID of the remaining target after removing the occlusion (i.e., the remaining unoccluded 3D target after removing the occlusion), extracts the second grid data of the remaining target, and generates key point annotation information; in step S32, the second grid data is assembled and matched to obtain a complete 3D target. Taking the generation of key point coordinates of a pedestrian as an example, assuming that the pedestrian is composed of 1 grid part head A, 1 grid part torso B, 2 grid parts upper limbs C and D, 2 grid parts lower limbs E and F, and 2 grid parts soles G and H, the minimum circumscribed cube of A is calculated according to all vertex coordinates of the head A. Specifically, the (x, y, z) coordinate values ​​of all vertices are obtained, and the minimum value of all coordinates (x-min, y-min, z-mix) is used as the lower left corner coordinate of the minimum circumscribed cube, and the maximum value (x-max, y-max, z-max) is used as the upper right corner coordinate. The center point of the cube is taken as the center key point of A, and the intersection points of the grid vertices and the six faces of the cube are taken as the key points of up, down, left, right, front and back, respectively. The screen coordinates of these key points are calculated in step S34, key point labels are generated, and bound to the current 3D target. The key point annotation information represents the corresponding relationship between the key point label and the 3D target.

[0104] S36, recording edge information of the 3D object that is not blocked, and generating instance segmentation annotation;

[0105] For the 3D target in the unobstructed area, confirm the identity information of the corresponding 3D target, such as the name (or ID) of the 3D target, record the edge information of the 3D target, the edge information includes the x, y coordinates of each edge pixel point as the outline of the current 3D target instance, and bind the edge information and the identity information of the 3D target to generate instance segmentation annotation information.

[0106] S37, generating bounding box annotation information based on the edge information;

[0107] In step S36, an instance segmentation annotation information mask is generated. The generated instance segmentation annotation information is sorted according to the x-axis coordinate and the y-axis coordinate. The upper left corner of the video frame image is used as the starting point of the coordinate system. The minimum value of x and y in the instance segmentation annotation information is taken as the upper left corner coordinate of the bounding box, and the maximum value of x and y is taken as the lower right corner coordinate of the bounding box. The upper left corner coordinate and the lower right corner coordinate are combined as the entire annotation information of the bounding box, and are bound to the identity information of the 3D target in the instance segmentation annotation information to generate the bounding box annotation information.

[0108] S38, generating semantic annotation information based on the instance segmentation annotation information and the attribute and ReID annotation information;

[0109] The instance segmentation and annotation masks of 3D targets with the same name are merged and connected into one mask, which is bound to the ID of the same 3D target. The independent mask individuals of 3D targets with the same name are not merged. The semantic annotation information is generated based on the final merged result.

[0110] S39, obtaining synthetic annotation information based on the attributes and ReID annotation information, depth information, key point annotation information, instance segmentation annotation information, bounding box annotation information and semantic annotation information.

[0111] Among them, the attribute and ReID annotation information, depth information, key point annotation information, instance segmentation annotation information, bounding box annotation information, semantic annotation information and synthetic annotation information, including but not limited to image files, text files, XML files, YAML files, or JSON files, can be stored in the local disk of the computer, or in any storage medium that can store such information.

[0112] Compared with the prior art, the synthetic data generation method described in the embodiment of the present invention has the following advantages:

[0113] 1. Determine the modeling target parameters according to the simulation target in the real scene, and then create the corresponding 3D model, which has a high degree of reality and improves the accuracy and credibility of the data;

[0114] 2. Through the simulation platform and the configuration of the scene environment data corresponding to the scene, various situations and environments can be simulated, and diversified scene simulation data with synthetic annotation information can be generated, which improves flexibility and reduces the cost of data acquisition;

[0115] 3. Through the configuration of scene environment data, objects, cameras and environments in the scene can be precisely controlled, parameters and scenes can be flexibly adjusted, and simulation data that meets the requirements can be generated. This controllability can better meet the requirements of specific experiments or sequencing;

[0116] 4. There are various choices for scenario simulation platforms. The appropriate simulation platform can be selected according to actual needs. It has good applicability and scalability, and can generate more personalized and diversified simulation data in a customized way.

[0117] Based on the above embodiment, as the above Figure 1 The present invention provides an embodiment of a synthetic data generating device, which is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices, see Figure 4 As shown, the synthetic data generating device includes:

[0118] A model creation module 100 is used to determine modeling target parameters based on a simulation target in a real scene, and to create a 3D model according to the modeling target parameters by a modeling tool;

[0119] The scene simulation module 200 is used to determine a simulation platform of a scene, obtain scene environment data corresponding to the scene, import the 3D model and obtain the scene based on the scene environment data, perform scene simulation under the scene, and obtain scene simulation data;

[0120] The data parsing module 300 is used to parse the scene simulation data, extract the 3D target file and reorganize it into a complete 3D target, obtain the synthetic annotation information of the 3D target, and obtain the scene simulation data with the synthetic annotation information.

[0121] The synthetic data generating device described in the embodiment of the present invention can execute the synthetic data generating method provided in the above embodiment. The synthetic data generating device has the corresponding functional steps and beneficial effects of the synthetic data generating method described in the above embodiment. Please refer to the embodiment of the above synthetic data generating method for details. The embodiment of the present invention will not be repeated here.

[0122] The embodiment of the present invention also provides an electronic device, which may include a processor and a memory, wherein the processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned types of chips. The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the synthetic data generation method in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the synthetic data generation method in the above method embodiment is realized.

[0123] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. The one or more modules are stored in the memory, and when executed by the processor, the synthetic data generation method in the above method embodiment is executed. The specific details of the above electronic device can be understood by corresponding to the corresponding descriptions and effects in the above method embodiment, and will not be repeated here. Those skilled in the art can understand that all or part of the processes in the above embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program, when executed, may include the processes of the embodiments of the above methods. Among them, the storage medium can be a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0124] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0125] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all of the features of the individual embodiments previously disclosed. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.

[0126] It should be noted that the above-mentioned embodiments illustrate rather than limit the invention and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims.

Claims

1. A method for generating synthetic data, characterized in that: The synthetic data generation method comprises: Determine modeling target parameters based on the simulation target in the real scene, and create a 3D model according to the modeling target parameters by a modeling tool; Determine a simulation platform for a scene, obtain scene environment data corresponding to the scene, import the 3D model and obtain the scene based on the scene environment data, perform scene simulation under the scene, and obtain scene simulation data; The simulation platform of the scene includes a simulation platform or a 3D game platform; Parsing the scene simulation data, extracting the 3D target file and reorganizing it into a complete 3D target, acquiring synthetic annotation information of the 3D target, and obtaining the scene simulation data with the synthetic annotation information, wherein the complete 3D target is composed of a plurality of unconnected mesh parts, and the 3D target is a 3D pedestrian; The parsing of the scene simulation data to extract the 3D target file and reorganize it into a complete 3D target includes: Parsing the scene simulation data to extract a 3D target file and parameter coordinate data, wherein the 3D target file includes appearance picture files of all 3D targets and second mesh data, each of which is represented as a mesh part; Perform vertex matching based on the first mesh data and the second mesh data of the 3D model to determine all second mesh data included in each 3D object, and assemble all the determined second mesh data into a complete 3D object; The obtaining of synthetic annotation information of the 3D object includes: Matching the appearance image file with the fully assembled 3D object to generate attribute and ReID annotation information; respectively extracting depth coefficients of all second mesh data of the same 3D object, determining the level of the 3D object and generating depth information; Removing the blocked object according to the generated depth information; Confirming the remaining unobstructed 3D objects after removing the occlusion, extracting the second grid data of the unobstructed 3D objects, and generating key point annotation information; Recording edge information of the 3D object that is not blocked, and generating instance segmentation annotation information; Generate bounding box annotation information based on the instance segmentation annotation information; Generate semantic annotation information based on the instance segmentation annotation information and the attribute and ReID annotation information; The synthesized annotation information is obtained based on the attributes and the ReID annotation information, the depth information, the key point annotation information, the instance segmentation annotation information, the bounding box annotation information and the semantic annotation information.

2. The synthetic data generation method according to claim 1, characterized in that: Determining modeling target parameters based on the simulation target in the real scene, and creating a 3D model according to the modeling target parameters by a modeling tool includes: Determine the modeling target parameters based on the simulation target in the real scene and create a basic model; The created basic model is adjusted in detail according to the simulation target to obtain the 3D model.

3. The synthetic data generation method according to claim 1, characterized in that: The obtaining of scene environment data corresponding to the scene includes: determining the scene environment data of the scene or directly importing preset scene environment data; the scene environment data includes the number of camera settings, setting positions and sampling parameters in different areas of the scene, the light source information, geographical and environmental information, time information, weather information and special effects information of the scene, and the movement trajectory of the target in the scene.

4. The synthetic data generation method according to claim 3, characterized in that: When the simulation platform of the scene is a 3D game platform, the method further includes: Determine the MOD adding format and requirements of the 3D game platform, and package the 3D model files into an independent game asset as a whole according to the standard requirements of the 3D game platform; Integrate the packaged game assets as a whole into the game body of the 3D game platform through the MOD tool; The 3D model is imported into the 3D game platform and the scene is obtained based on the scene environment data, and scene simulation is performed to obtain the scene simulation data.

5. A synthetic data generating device, characterized in that: The synthetic data generating device comprises: A model creation module, used to determine modeling target parameters based on the simulation target in the real scene, and create a 3D model according to the modeling target parameters through a modeling tool; A scene simulation module, used to determine a simulation platform for a scene, obtain scene environment data corresponding to the scene, import the 3D model and obtain the scene based on the scene environment data, perform scene simulation under the scene, and obtain scene simulation data; the simulation platform for the scene includes a simulation platform or a 3D game platform; A data parsing module is used to parse the scene simulation data, extract the 3D target file and reorganize it into a complete 3D target, obtain the synthetic annotation information of the 3D target, and obtain the scene simulation data with the synthetic annotation information; The data parsing module is also used to parse the scene simulation data, extract 3D target files and parameter coordinate data, the 3D target files include appearance picture files of all 3D targets and second mesh data, each second mesh data is represented as a mesh part; perform vertex matching based on the first mesh data and the second mesh data of the 3D model, determine all second mesh data included in each 3D target, and assemble all the determined second mesh data into complete 3D targets respectively; The data parsing module is also used to match the appearance image file with the fully assembled 3D target to generate attribute and ReID annotation information; respectively extract the depth coefficients of all second mesh data of the same 3D target, determine the level of the 3D target and generate depth information; remove the occluded object according to the generated depth information; confirm the remaining unobstructed 3D target after removing the occlusion, extract the second mesh data of the unobstructed 3D target, and generate key point annotation information; record the edge information of the unobstructed 3D target to generate instance segmentation annotation information; generate bounding box annotation information based on the instance segmentation annotation information; generate semantic annotation information based on the instance segmentation annotation information and the attribute and ReID annotation information; obtain synthetic annotation information based on the attribute and ReID annotation information, depth information, key point annotation information, instance segmentation annotation information, bounding box annotation information and semantic annotation information.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which are loaded and executed by a processor to implement the operations performed by the method according to any one of claims 1 to 4.

7. An electronic device, comprising a processor and a memory, characterized in that: The memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the processor implements instructions of any one of the methods described in claims 1-4.

Citation Information

Patent Citations

  • Image data generation method and device

    CN110428388A

  • Target object labeling method and device, storage medium and electronic equipment

    CN114863071A

  • Model generation method and device

    CN114882177A

  • Method, device and equipment for generating data set through virtual reality engine

    CN117333600A

  • Simulation environment-based scene structure annotation data generation method and device

    CN117911788A