CN111047690B - Model construction method and device, storage medium and electronic device - Google Patents
Model construction method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN111047690B CN111047690B CN201911344760.3A CN201911344760A CN111047690B CN 111047690 B CN111047690 B CN 111047690B CN 201911344760 A CN201911344760 A CN 201911344760A CN 111047690 B CN111047690 B CN 111047690B
- Authority
- CN
- China
- Prior art keywords
- target
- discriminator
- sample
- discriminators
- angle information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000010276 construction Methods 0.000 title claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 41
- 238000012549 training Methods 0.000 claims description 126
- 238000004590 computer program Methods 0.000 claims description 18
- 230000037237 body shape Effects 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 5
- 239000011159 matrix material Substances 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000006073 displacement reaction Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 210000004197 pelvis Anatomy 0.000 description 3
- 238000012216 screening Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 210000001624 hip Anatomy 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 210000001015 abdomen Anatomy 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The application provides a model construction method and device, a storage medium and an electronic device, wherein the method comprises the following steps: obtaining target model parameters of a three-dimensional object model of a target object, wherein the target model parameters comprise first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model; inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with a target object or not; and under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object, constructing a three-dimensional object model according to the target model parameters. The application solves the problem of unreasonable 3D object model construction caused by the limitation of the object in the related technology.
Description
Technical Field
The present application relates to the field of computers, and in particular, to a method and apparatus for model construction, a storage medium, and an electronic apparatus.
Background
As a task in computer vision, 3D (3D) object reconstruction (e.g., human body reconstruction) is to reconstruct or restore a 3D model of an object pose from a single picture or video, and can be applied to a plurality of application fields, such as an avatar, an interactive game, and the like. If the accuracy of the reconstruction algorithm is continuously improved, the method can replace the traditional motion capture system.
The 3D object model may be constructed using model parameters, which may be set as desired. However, due to limitations of the object itself, certain model parameters do not fit reality, resulting in the problem of unreasonable 3D object models being constructed.
Disclosure of Invention
The embodiment of the application provides a model construction method and device, a storage medium and an electronic device, which at least solve the problem that a constructed 3D object model is unreasonable due to the limitation of an object in the related technology.
According to an aspect of an embodiment of the present application, there is provided a model building method including: obtaining target model parameters of a three-dimensional object model of a target object, wherein the target model parameters comprise first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model; inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with a target object or not; and under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object, constructing a three-dimensional object model according to the target model parameters.
According to another aspect of an embodiment of the present application, there is provided a model building apparatus including: a first acquisition unit configured to acquire target model parameters of a three-dimensional object model of a target object, wherein the target model parameters include first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling a body shape of the three-dimensional object model; a first input unit for inputting the first axis angle information and the first shape information to a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first axis angle information and the first shape information are matched with a target object; and the construction unit is used for constructing a three-dimensional object model according to the target model parameters under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object.
Optionally, the first input unit includes: the first input module is used for inputting the first shaft angle information into the first discriminator to obtain a first discrimination result output by the first discriminator, wherein the first discrimination result is used for indicating whether the first shaft angle information is matched with the target object or not; the second input module is used for inputting the first shape information into the second discriminator to obtain a second discrimination result output by the second discriminator, wherein the second discrimination result is used for indicating whether the first shape information is matched with the target object or not; a third input module, configured to input the first authentication result and the second authentication result to a third discriminator, and obtain a target authentication result output by the third discriminator, where the target discriminator includes: a first discriminator, a second discriminator and a third discriminator.
Optionally, the first input module includes: the input sub-module is used for respectively inputting a plurality of first shaft angle information of a plurality of joint points to a plurality of first sub-discriminators to obtain a plurality of first sub-discrimination results, wherein the plurality of joint points are in one-to-one correspondence with the plurality of first sub-discriminators, and each first sub-discrimination result is used for indicating whether the first shaft angle information of one joint point is matched with a target object or not; a second input sub-module, configured to input a plurality of first axis angle information of a plurality of nodes to a second sub-discriminator, to obtain a second sub-discrimination result output by the second sub-discriminator, where the second sub-discrimination result is used to indicate whether the plurality of first axis angle information of the plurality of nodes matches with the target object, and the first discriminator includes: a plurality of first sub-discriminators and second sub-discriminators, the first discrimination results including: a plurality of first sub-authentication results and second sub-authentication results.
Optionally, the apparatus further includes: the second acquisition unit is used for acquiring m target training sample groups before inputting the first shaft angle information and the first shape information into the target discriminator to obtain a target discrimination result output by the target discriminator, wherein each target training sample group comprises a target positive sample group and a target negative sample group, the target positive sample group comprises n target positive samples, the target negative sample group comprises n target negative samples, the target positive samples are model parameters comprising second shaft angle information and second shape information which are matched with a target object, the target negative samples are model parameters comprising third shaft angle information and third shape information which are not matched with the target object, m is a positive integer which is greater than or equal to 1, and n is a positive integer which is greater than 1; the training unit is used for training the m first initial discriminators by using m target training sample sets to obtain m candidate discriminators, wherein the m target training sample sets are in one-to-one correspondence with the m first initial discriminators; and a selecting unit for selecting the target discriminator from the m candidate discriminators.
Optionally, the second acquisition unit includes: the first acquisition module is used for acquiring m target positive sample groups; a second acquisition module, configured to repeatedly perform the following steps until m×n target negative samples are acquired: obtaining m initial training sample sets, wherein each initial training sample set comprises a target positive sample set and a random negative sample set, each random negative sample set comprises n random negative samples, and each random negative sample is a model parameter comprising fourth axis angle information and fourth shape information which are randomly generated; respectively training m second initial discriminators by using m initial training sample groups to obtain m reference discriminators, wherein the m initial training sample groups are in one-to-one correspondence with the m second initial discriminators; sequentially using other reference discriminators except the target reference discriminator to discriminate each random negative sample in the target random negative sample group to obtain a sample discrimination result of each random negative sample, wherein the target reference discriminator is a reference discriminator selected from m reference discriminators, the target random negative sample group is a random negative sample group in an initial training sample group corresponding to the target reference discriminator, and the sample discrimination result is used for indicating whether the random negative sample is a negative sample or not; indicating a sample discrimination result as a random negative sample of the negative samples, and determining the random negative sample as a target negative sample; and the third acquisition module is used for acquiring m target negative sample groups according to m multiplied by n target negative samples.
Optionally, the second acquisition module includes: the training sub-module is used for training the current initial discriminator in the m second initial discriminators by using the current initial training sample set in the m initial training sample sets to obtain candidate reference discriminators, wherein the discrimination accuracy of the candidate reference discriminators on samples in the current initial training sample set is greater than or equal to a first accuracy threshold; a first determining sub-module, configured to determine the candidate reference discriminator as the reference discriminator in a case where the discrimination accuracy of the candidate reference discriminator on other target positive samples is greater than or equal to the second accuracy threshold, where the other target positive samples are target positive samples included in other initial training sample groups than the current initial training sample group of the m initial training sample groups.
Optionally, the second acquisition module includes: the identification submodule is used for respectively identifying the target random negative samples in the target random negative sample group by using a plurality of other reference identifiers to obtain a plurality of sub-sample identification results, wherein each sub-sample identification result is used for indicating whether the target random negative sample identified by one other reference identifier is a negative sample or not; and the second determining submodule is used for determining the sample identification result of the target random negative sample according to the plurality of sub-sample identification results.
According to a further embodiment of the invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method, whether the model parameters are matched with the target object or not is obtained by adopting a mode of matching the model parameters with the target object according to the axis angle information and the shape information of the joint points in the model parameters, wherein the target model parameters comprise first axis angle information of the joint points of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model; inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with a target object or not; under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object, a three-dimensional object model is built according to the target model parameters, and as the shaft angle information (rotation information) and the shape information of the joint points in the model parameters are judged by using the identifier before the model is built, whether the model parameters of the three-dimensional object model are matched with the target object (such as a human body) or not (whether the model parameters are actions which can be made by the target object or not) can be judged, the technical effect of improving the rationality of the built three-dimensional object model is achieved, and the problem that the built 3D object model is unreasonable due to the limitation of the object in the related technology is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a block diagram of the hardware architecture of an alternative server according to an embodiment of the application;
FIG. 2 is a flow chart of an alternative model building method according to an embodiment of the application;
FIG. 3 is a schematic diagram of an alternative model building method according to an embodiment of the application;
FIG. 4 is a schematic diagram of another alternative model building method according to an embodiment of the application;
FIG. 5 is a schematic diagram of yet another alternative model building method according to an embodiment of the application;
FIG. 6 is a flow chart of another alternative model building method according to an embodiment of the application; the method comprises the steps of,
FIG. 7 is a block diagram of an alternative model building apparatus according to an embodiment of the present application.
Detailed Description
The application will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
According to an aspect of an embodiment of the present application, there is provided a model building method. Alternatively, the method may be performed in a server, a user terminal or similar computing device. Taking the example of running on a server, fig. 1 is a block diagram of the hardware architecture of an alternative server according to an embodiment of the present application. As shown in fig. 1, the server 10 may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing means such as an MCU (Microcontroller Unit, microprocessor) or FPGA (Field Programmable GateArray, field programmable logic array)) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative, and is not intended to limit the structure of the server described above. For example, the server 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a model building method in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to the server 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. The specific example of the network described above may include a wireless network provided by a communication provider of the server 10. In one example, the transmission device 106 includes a NIC (Network Interface Controller, network adapter) that can communicate with other network devices via a base station to communicate with the internet. In one example, the transmission device 106 may be an RF (Radio Frequency) module for communicating with the internet wirelessly.
In this embodiment, a method for constructing a model running on the server is provided, and fig. 2 is a flowchart of an alternative method for constructing a model according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S202, obtaining target model parameters of a three-dimensional object model of a target object, wherein the target model parameters comprise first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model;
step S204, inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with a target object or not;
in step S206, when the target discrimination result indicates that the first axis angle information and the first shape information match the target object, a three-dimensional object model is constructed according to the target model parameters.
Alternatively, the main execution body of the steps may be a server, a user terminal, or the like, but the method is not limited thereto, and other devices capable of performing model construction may be used to execute the method in the embodiment of the present application.
Alternatively, the model construction method in the embodiment of the present application may be applied to, but not limited to, an integration algorithm in a mobile AR (Augmented Reality ) solution, a basic algorithm of an avatar, or a motion capture scheme in animation, movie production, etc.
According to the embodiment, whether the model parameters are matched with the target object or not is judged according to the axis angle information and the shape information of the joint points in the model parameters, and the axis angle information and the shape information of the joint points in the model parameters are judged by using the discriminator before the model is constructed, so that whether the model parameters of the three-dimensional object model are matched with the target object or not can be judged, the problem that the constructed 3D object model is unreasonable due to the limitation of the object in the related technology is solved, and the rationality of the constructed three-dimensional object model is improved.
The model construction method in the embodiment of the present application will be described with reference to fig. 2.
In step S202, target model parameters of a three-dimensional object model of a target object are acquired, wherein the target model parameters include first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling a body shape of the three-dimensional object model.
The three-dimensional object model may correspond to a target object. The target object may be a human-shaped object, an animal object, or other object having a joint. The target object may comprise one or more joints and the nodes in the three-dimensional object model may correspond to one or more of the one or more joints.
For example, a human body may have L joints, the number of movable joints is M, and the number of joints of the 3D humanoid model may have N, where N.ltoreq.M < L.
Model parameters for constructing a three-dimensional object model may include, but are not limited to, at least one of: pose information (e.g., axis angle information of the articulation point), shape information (for controlling the body shape of the three-dimensional object model), and lens information (for controlling the size of the three-dimensional object model).
For example, the Pose information may be represented as a Pose matrix P (24×3), where 24 is 24 joint points, and each row (1×3) represents the axis angle information of one joint point. The Shape information may be represented as Shape matrix S (1×10), where each dimension in the Shape matrix is used to control one body type parameter, for example, thickness of arm, waist, leg, height, etc., and the lens information may be represented as cas (1×3), each dimension respectively representing: human body scaling factor s b The method comprises the steps of carrying out a first treatment on the surface of the Human body x-axis displacement o x Displacement in the x-axis relative to the origin; human y-axis displacement o y Displacement relative to the origin on the y-axis.
In order to construct a three-dimensional object model of a target object, target model parameters of the three-dimensional object model may be first acquired, which may include: first axis angle information, first shape information, of an articulation point of the three-dimensional object model may further include: lens information.
The mode of acquiring the target model parameters may be random acquisition (for example, randomly generating the axis angle information, the shape information and the lens information of the node of the three-dimensional object model), may be received from other devices, may be input by a user through an interactive interface, and may be set according to needs, which is not described herein.
In step S204, the first axis angle information and the first shape information are input to the target discriminator, and a target discrimination result output by the target discriminator is obtained, where the target discrimination result is used to indicate whether the first axis angle information and the first shape information match the target object.
After the target model parameters are acquired, the first axis angle information and the first shape information may be identified using a target identifier, resulting in a target identification result indicating whether the first axis angle information and the first shape information match the target object. The target authentication result may be an identification identifying whether the two match, for example, an identification value of a first value (e.g., 1) indicating that the two match, an identification value of a second value (e.g., 0) indicating that the two do not match, or a probability indicating a degree of match if the probability of match is greater than or equal to a match threshold indicating that the two match, and if the probability of match is less than the match threshold indicating that the two do not match.
The target discriminator may be a discriminator (classifier) whose inputs are first axis angle information and first shape information, and whose outputs are target discrimination results. The target discriminator may also be a combination of a plurality of discriminators, and a plurality of simple discriminators may be used to discriminate rotation information and shape information of the node point. And fusing by a plurality of simple discriminators, and finally giving a score to the current three-dimensional model parameter (target model parameter).
As an alternative embodiment, inputting the first axis angle information and the first shape information into the target discriminator, obtaining the target discrimination result output by the target discriminator includes: inputting the first shaft angle information into a first discriminator to obtain a first discrimination result output by the first discriminator, wherein the first discrimination result is used for indicating whether the first shaft angle information is matched with a target object or not; inputting the first shape information into a second discriminator to obtain a second discrimination result output by the second discriminator, wherein the second discrimination result is used for indicating whether the first shape information is matched with the target object or not; inputting the first authentication result and the second authentication result into a third discriminator to obtain a target authentication result output by the third discriminator, wherein the target discriminator comprises: a first discriminator, a second discriminator and a third discriminator.
In performing object model parameter discrimination using a plurality of discriminators (classifiers), the discriminators may be divided into two layers: the first layer includes a first discriminator and a second discriminator, the second layer includes a third discriminator, wherein,
(1) The first discriminator can discriminate the first shaft angle information to obtain a first discrimination result, and the first discrimination result is used for indicating whether the first shaft angle information is matched with the target object or not;
(2) The second discriminator can discriminate the first shape information to obtain a second discrimination result, and the second discrimination result is used for indicating whether the first shape information is matched with the target object or not;
(3) The third discriminator may discriminate the first discrimination result and the second discrimination result to obtain a target discrimination result for synthesizing the first discrimination result and the second discrimination result, indicating whether the first axis angle information and the first shape information match the target object.
According to the embodiment, the first shaft angle information and the first shape information are identified through the two layers of identifiers, so that the first shaft angle information and the first shape information can be comprehensively identified, and the accuracy of an identification result is improved.
The number of the joint points of the three-dimensional object model may be one or more, and in the case where the number of the joint points of the three-dimensional object model is plural, the first axis angle information may be discriminated using a plurality of discriminators.
As an alternative embodiment, inputting the first shaft angle information into the first discriminator, obtaining the first discrimination result output by the first discriminator includes: under the condition that the joint points comprise a plurality of joints, respectively inputting a plurality of first shaft angle information of the joints into a plurality of first sub-discriminators to obtain a plurality of first sub-discrimination results, wherein the joints are in one-to-one correspondence with the first sub-discriminators, and each first sub-discrimination result is used for indicating whether the first shaft angle information of one joint is matched with a target object or not; inputting the first axis angle information of the plurality of nodes into a second sub-discriminator to obtain a second sub-discrimination result output by the second sub-discriminator, wherein the second sub-discrimination result is used for indicating whether the first axis angle information of the plurality of nodes is matched with a target object, and the first discriminator comprises: a plurality of first sub-discriminators and second sub-discriminators, the first discrimination results including: a plurality of first sub-authentication results and second sub-authentication results.
In the case that the joint point comprises a plurality of joint points, the first shaft angle information of each joint point can be respectively identified by using a plurality of first sub-identifiers to obtain a plurality of first sub-identification results so as to determine whether the first shaft angle information of each joint point is matched with a target object; the first axis angle information of the plurality of nodes as a whole may be authenticated using a second sub-authenticator to obtain a second sub-authentication result to determine whether the first axis angle information of the plurality of nodes as a whole matches the target object.
The number of nodes included in the three-dimensional object model may be the same as or different from the number of nodes used for the discrimination. For example, the shaft angle information of a joint point (Pelvis) as an origin may not be discriminated.
For example, the inputs for a 3D mannequin are: a rotation matrix R (24×3) representing the rotation information of the node of interest, and a shape matrix S (10×1) representing the shape of the 3D human model.
For the rotation matrix of the joint point, 24 shallow classifiers can be used for identification, wherein the 24 shallow classifiers consist of two fully connected layers, 23 (without considering Pelvis nodes) input is the shaft angle information (1×3) of each joint point, 23 1-dimensional outputs are output, and one classifier input is 72-dimensional (flattening of the rotation matrix R) or 69-dimensional (flattening of the rotation matrix R after removing the shaft angle information of the Pelvis nodes) and output is one-dimensional.
For the shape matrix S, a classifier may be used to discriminate, and the input is a 10-dimensional shape matrix and the output is 1-dimensional.
And then using a total classifier, inputting a 25-dimensional vector formed by combining the results of the 25 classifiers, and outputting a probability that the model parameters are legal parameters in one dimension.
According to the embodiment, the shaft angle information of the plurality of joint points is identified by using a plurality of classifiers, so that the accuracy of an identification result can be improved.
Whether or not the axis angle information and/or the shape information matches the target object may be regarded as predicted, and whether or not the three-dimensional object model corresponding to the axis angle information and/or the shape information is an image that the target object can actually do.
The human body model is driven by a human body model driving algorithm in a node-closing driving mode, namely, the human body model is driven by the rotation information of the node. However, many joints have limited range of swing due to the structure of the human body. The Shape parameter of the three-dimensional object model is controlled to be high, low, fat and thin, and the parameter is related to the parameter, such as a large belly and a thin waist, which cannot occur. The constraint of the axis angle information and the constraint of the shape information of the above-mentioned joint point can be set manually according to experience, but these constraints set manually are difficult and are susceptible to personal experience, which results in the problem of inaccurate constraint setting.
The identification model provided by the embodiment of the application can identify whether the parameters of the three-dimensional object model accord with the object structure. Because the constraints of the axis angle information and the constraints of the shape information are difficult to define manually, the initial discriminator may be trained using a training sample set to obtain the target discriminator.
The initial discriminator may be trained using a training sample set comprising a positive sample set and a negative sample set to obtain a target discriminator. The plurality of initial discriminators may also be trained using a plurality of training sample sets including a positive sample set and a negative sample set to obtain a plurality of candidate discriminators, and one candidate discriminator having a better performance may be selected from the plurality of candidate discriminators as a target discriminator.
As an alternative embodiment, m target training sample sets may be acquired before the first axis angle information and the first shape information are input to the target discriminator to obtain the target discrimination result output by the target discriminator; training the m first initial discriminators by using m target training sample sets respectively to obtain m candidate discriminators; the target discriminator is selected from the m candidate discriminators.
M (e.g., 4) target training sample sets may be obtained, where m is a positive integer greater than or equal to 1, each target training sample set may include: one target positive sample set and one target negative sample set.
The target positive sample group comprises n target positive samples, and the target positive samples are model parameters comprising second axis angle information and second shape information matched with a target object; the target negative sample group comprises n target negative samples, wherein the target negative samples are model parameters comprising third axis angle information and third shape information which are not matched with the target object. Wherein n is a positive integer greater than 1.
After obtaining the m target training sample sets, the m first initial discriminators may be trained using the m target training sample sets, respectively, to obtain m candidate discriminators. The process of model training may refer to the related art, and will not be described herein. For trained candidate discriminators, accuracy exceeding a predetermined threshold (e.g. 90%) may be obtained on the target positive samples, or the target positive and negative samples, in other training sample sets.
After obtaining the m candidate discriminators, one candidate discriminator may be selected from the m candidate discriminators as a target discriminator. The selection method can be as follows: and randomly selecting or selecting according to the accuracy obtained by identifying the target positive sample or the target negative sample in the training sample group or other training sample groups.
According to the embodiment, the plurality of initial discriminators are trained through the plurality of groups of training samples, so that a plurality of candidate discriminators are obtained, and the target discriminator is selected from the plurality of candidate discriminators, so that the performance of the obtained target discriminator can be improved, and the discrimination accuracy of the obtained target discriminator is improved.
Since positive samples of model parameters conforming to the human body structure are easily obtained, negative samples of model parameters not conforming to the human body structure are not easily obtained. The problem of classification lacking negative samples can be solved by training multiple models in groups and voting and screening the samples.
As an alternative embodiment, to obtain m target training sample sets, m target positive sample sets may be first obtained. The target positive sample set may be obtained by using an acquisition device to acquire data of a target object, or may be obtained by other manners, which is not specifically limited in this embodiment.
For example, 4n positive samples may be taken, randomly averaged into four positive sample groups of n positive samples each.
Then, the following steps are repeatedly performed until m×n target negative samples are acquired:
step 1, obtaining m initial training sample sets, wherein each initial training sample set comprises a target positive sample set and a random negative sample set, each random negative sample set comprises n random negative samples, and each random negative sample is a model parameter comprising fourth axis angle information and fourth shape information which are randomly generated.
In addition to the m target positive sample groups, m random negative sample groups may be obtained, where each random negative sample group includes n random negative samples, and each random negative sample is a model parameter including randomly generated fourth axis angle information and fourth shape information.
The way to obtain the random negative set of samples may be: m x n samples are randomly generated as random negative samples and randomly divided into m random negative sample groups, each random negative sample group containing n random negative samples.
For example, 4n samples are randomly generated and considered to be negative samples, and the 4n samples are randomly divided into 4 random negative sample groups, each group also being n negative samples.
After m target positive sample sets and m random negative sample sets are obtained, one target positive sample set and one random negative sample set are combined, so that m initial training sample sets can be obtained.
And 2, training the m second initial discriminators by using m initial training sample sets to obtain m reference discriminators, wherein the m initial training sample sets are in one-to-one correspondence with the m second initial discriminators.
The m second initial discriminators may be trained using the acquired m initial training sample sets, respectively, to obtain each reference discriminator. In one round of training, an initial training sample set is used to train a second initial discriminator.
For example, as shown in fig. 3, after four positive and negative sample sets are obtained, four authentication models can be trained simultaneously, resulting in 4 reference authentication models (discriminators).
To ensure the performance of the trained reference discriminator, for the trained discriminating model, the performance of the current discriminating model may be evaluated using a target positive sample set from other initial training sample sets than the initial training sample set corresponding to the current discriminating model.
As an alternative embodiment, training the m second initial discriminators using the m initial training sample sets, respectively, to obtain m reference discriminators includes: training the current initial discriminator in the m second initial discriminators by using the current initial training sample set in the m initial training sample sets to obtain candidate reference discriminators, wherein the discrimination accuracy of the candidate reference discriminators on samples in the current initial training sample set is greater than or equal to a first accuracy threshold; and determining the candidate reference discriminator as the reference discriminator in the case that the discrimination accuracy of the candidate reference discriminator on other target positive samples is greater than or equal to the second accuracy threshold, wherein the other target positive samples are target positive samples contained in other initial training sample groups except the current initial training sample group in the m initial training sample groups.
For a current initial training sample set of the m initial training sample sets and a current initial discriminator of the m second initial discriminators, the current initial discriminator may be trained for multiple rounds using the current initial training sample set, and model parameters are adjusted until an accuracy of discrimination of the adjusted discrimination model for samples (including the target positive sample and the random negative sample) in the current initial training sample set is greater than or equal to the first accuracy threshold. The adjusted authentication model is a candidate reference authenticator.
After the candidate reference identifier is obtained, the accuracy of the candidate reference identifier in identifying other target positive samples in other initial training sample sets other than the current initial training sample set may be further determined.
The candidate reference identifier may be determined to be a reference identifier if the accuracy of the candidate reference identifier for positive sample identification of other targets is greater than or equal to a second accuracy threshold. If the accuracy of the candidate reference identifier for identifying other target positive samples is less than the second accuracy threshold, step 1 may be re-executed to re-acquire m initial training sample sets.
It should be noted that the first accuracy threshold value and the second accuracy threshold value may be the same value (for example, both are 90%), or may be different values (for example, the first accuracy threshold value is 90%, and the second accuracy threshold value is 80%), or the first accuracy threshold value and the second accuracy threshold value may be fixed, or may be modified according to a configuration instruction, which is not specifically limited in this embodiment.
For example, for 4 authentication models trained separately, each authentication model needs to achieve 90% accuracy over the other three positive sets of samples, otherwise the data is regenerated and retrained.
According to the embodiment, the candidate reference identifier is screened by using the target positive samples in other initial training sample groups, so that the performance of the obtained reference identifier can be ensured, and the identification accuracy of the target identifier can be improved.
And 3, sequentially using other reference discriminators except the target reference discriminator to discriminate each random negative sample in the target random negative sample group to obtain a sample discrimination result of each random negative sample, wherein the target reference discriminator is a reference discriminator selected from m reference discriminators, the target random negative sample group is a random negative sample group in an initial training sample group corresponding to the target reference discriminator, and the sample discrimination result is used for indicating whether the random negative sample is a negative sample.
After obtaining the m reference discriminators, the random negative samples in each random negative sample group can be classified, and negative samples with higher confidence can be screened out.
The random negative sample set in each of the m initial training sample sets may be sequentially processed, for example, one initial training sample set may be sequentially selected from the m initial training sample sets as a target initial training sample set, and a reference discriminator corresponding to the target initial training sample set may be a selected target reference discriminator.
For a target random negative sample group in the target initial training sample group, other reference discriminators besides the target reference discriminator can be used for discriminating each random negative sample in the target random negative sample group, so as to obtain a sample discrimination result of each random negative sample, wherein the sample discrimination result is used for indicating whether the random negative sample is a negative sample or not.
As an alternative embodiment, sequentially using a reference discriminator other than the target reference discriminator to discriminate each random negative sample in the target random negative sample set, obtaining a sample discrimination result of each random negative sample includes: respectively identifying the target random negative samples in the target random negative sample group by using a plurality of other reference discriminators to obtain a plurality of sub-sample discrimination results, wherein each sub-sample discrimination result is used for indicating whether the target random negative samples identified by one other reference discriminator are negative samples or not; and determining a sample identification result of the target random negative sample according to the plurality of sub-sample identification results.
In the case that there are a plurality of other reference discriminators, the plurality of other reference discriminators may be used to discriminate the target random negative samples in the target random negative sample group, respectively, to obtain a plurality of sub-sample discrimination results, each random negative sample having at most (m-1) sub-sample discrimination results, each sub-sample discrimination result being used to indicate whether the target random negative sample discriminated by one other reference discriminator is a negative sample.
After the plurality of sub-sample discrimination results are obtained, a sample discrimination result of the target random negative sample may be determined from the plurality of sub-sample discrimination results. There are various ways of determining the sample discrimination result of the target random negative sample based on the plurality of sub-sample discrimination results. For example, the target random negative sample is determined to be a negative sample only if the plurality of sub-sample discrimination results each indicate that the target random negative sample is a negative sample, otherwise, the random negative sample is determined to be a positive sample. For another example, when the plurality of sub-sample discrimination results exceeds a predetermined number (e.g., more than half) of sub-discrimination results indicate that the target random negative sample is a negative sample, the target random negative sample is determined to be a negative sample, otherwise the random negative sample is determined to be a positive sample.
For example, as shown in fig. 4, when all four models meet the model condition (90% accuracy is obtained on the other three positive samples), the current random negative sample set is classified using the other three trained models, each random negative sample obtains three results through the other three models, and the three results vote to obtain the final type (positive or negative). By labeling the randomly generated samples in this way, a batch of negative samples with a slightly higher confidence level relative to the randomly generated negative samples can be obtained. The previous steps are repeated, and a negative sample with a confidence level of 4n total can be obtained.
According to the embodiment, the confidence of the obtained target negative sample can be improved by integrating the identification results of the plurality of other reference identifiers to label the random negative sample.
And 4, indicating the sample identification result as a random negative sample of the negative sample, and determining the random negative sample as a target negative sample.
After determining the sample discrimination result for each random negative sample, the sample discrimination result may be indicated as the random negative sample of the negative sample, determined as the target negative sample, and the random negative sample of the sample discrimination result indicated as the positive sample may be filtered out.
The steps 1 to 4 are repeatedly executed until the number of the obtained target negative samples reaches m×n.
For the resulting m×n target negative samples, they may be randomly divided into m groups, each group containing n target negative samples, thereby resulting in m target negative sample groups.
For example, after obtaining 4n negative samples with a somewhat higher confidence, 4n negative samples may be equally divided, and the same flow may be continued, and such flow may be repeated a plurality of times, to obtain an authentication model, which may be one of models 1 to 4 selected to have the best effect.
According to the method, the device and the system, the problem that the negative sample is difficult to obtain can be solved by randomly generating the random negative sample and screening the random negative sample to obtain the target negative sample, so that the identification accuracy of the target identifier is improved.
In step S206, in the case where the target discrimination result indicates that the first axis angle information and the first shape information match the target object, a three-dimensional object model is constructed in accordance with the target model parameters.
After the target authentication result is obtained, if the target authentication result indicates that the first axis angle information and the first shape information are matched with the target object, a three-dimensional object model may be constructed according to the target model parameters, and the three-dimensional object model may be obtained as shown in fig. 5 or after rendering on the basis of fig. 5. If the target discrimination result indicates that the first axis angle information and the first shape information are not matched with the target object, the construction of the three-dimensional object model by using the target model parameters can be forbidden, and prompt information is displayed on the display device to prompt that the target model parameters are not suitable for constructing the three-dimensional object model, and the modification of the model parameters can be prompted.
The above-described model construction method is described below in connection with alternative examples. The model construction method in this example is a rational identification method of human body reconstruction parameters, and rotation information and shape information of the joint point are identified by designing a plurality of simple identifiers. And fusing by a plurality of simple discriminators, and finally giving a score to the current 3D model parameter set, thereby discriminating whether the human body reconstruction parameters are reasonable or not.
After the human body reconstruction parameters (target model parameters) are identified, a plurality of identification models can be trained by grouping, voting screening can be performed on the randomly generated negative samples, and classification models can be trained without the real negative samples.
When model training is carried out, firstly, 4n real positive samples are obtained, and randomly and evenly divided into four positive sample groups, wherein each group comprises n positive samples; then, 4n samples are randomly generated and considered as negative samples, which are randomly divided into four random negative sample groups, each of which also has n negative samples. In this way, four positive and negative sample sets can be obtained, which can train four authentication models (models 1 to 4) simultaneously. The trained identification model needs to obtain 90% accuracy on the other three positive samples, otherwise, the data needs to be regenerated and retrained.
When all four trained authentication models meet the above conditions, the current random negative sample group can be classified by using other three trained authentication models, each random negative sample obtains three results through other three models, and the three results vote to obtain the final type (positive example or negative example). By labeling randomly generated samples in this way, a somewhat more confidence negative set of samples can be obtained.
In the same way a somewhat higher confidence negative sample of a total of 4n can be obtained. For the negative sample with 4n with a higher confidence level, the same flow can be equally divided and repeated multiple times, so that the identification model (the one with the best effect in the models 1 to 4) can be obtained.
After the authentication model is obtained, the model parameters may be authenticated using the authentication model. As shown, the model building method in this example may include the steps of:
step S602, obtaining model parameters of the 3D mannequin.
Step S604, inputting the model parameters into the two-layer classifier to obtain the probability that the model parameters are legal parameters output by the two-layer classifier.
Step S606, when the probability that the model parameter is legal parameter is greater than or equal to the target probability, the model parameter is used to construct the 3D human body model.
By the method, efficiency of human body reconstruction parameter identification can be improved, and reasonability of the constructed 3D human body model is improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
According to another aspect of the embodiments of the present application, there is provided a model building apparatus for implementing the above model building method. Optionally, the device is used to implement the foregoing embodiments and preferred embodiments, which have been described and will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
FIG. 7 is a block diagram of an alternative model building apparatus according to an embodiment of the present application, as shown in FIG. 7, the apparatus comprising:
(1) A first obtaining unit 702 for obtaining target model parameters of a three-dimensional object model of a target object, wherein the target model parameters include first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling a body shape of the three-dimensional object model;
(2) A first input unit 704, connected to the first obtaining unit 702, configured to input the first axis angle information and the first shape information to the target discriminator, so as to obtain a target discrimination result output by the target discriminator, where the target discrimination result is used to indicate whether the first axis angle information and the first shape information match with the target object;
(3) A construction unit 706, coupled to the first input unit 704, for constructing a three-dimensional object model according to the target model parameters, in case the target discrimination result indicates that the first axis angle information and the first shape information match the target object.
Alternatively, the first obtaining unit 702 may be used in step S202 in the above embodiment, the first input unit 704 may be used in step S204 in the above embodiment, and the constructing unit 706 may be used to perform step S206 in the above embodiment.
According to the embodiment, whether the model parameters are matched with the target object or not is judged according to the axis angle information and the shape information of the joint points in the model parameters, and the axis angle information and the shape information of the joint points in the model parameters are judged by using the discriminator before the model is constructed, so that whether the model parameters of the three-dimensional object model are matched with the target object or not can be judged, the problem that the constructed 3D object model is unreasonable due to the limitation of the object in the related technology is solved, and the rationality of the constructed three-dimensional object model is improved.
As an alternative embodiment, the first input unit 704 includes:
(1) The first input module is used for inputting the first shaft angle information into the first discriminator to obtain a first discrimination result output by the first discriminator, wherein the first discrimination result is used for indicating whether the first shaft angle information is matched with the target object or not;
(2) The second input module is used for inputting the first shape information into the second discriminator to obtain a second discrimination result output by the second discriminator, wherein the second discrimination result is used for indicating whether the first shape information is matched with the target object or not;
(3) A third input module, configured to input the first authentication result and the second authentication result to a third discriminator, and obtain a target authentication result output by the third discriminator, where the target discriminator includes: a first discriminator, a second discriminator and a third discriminator.
As an alternative embodiment, the first input module includes:
(1) The first input sub-module is used for respectively inputting a plurality of first shaft angle information of a plurality of joint points to a plurality of first sub-discriminators to obtain a plurality of first sub-discrimination results, wherein the plurality of joint points are in one-to-one correspondence with the plurality of first sub-discriminators, and each first sub-discrimination result is used for indicating whether the first shaft angle information of one joint point is matched with a target object or not;
(2) A second input sub-module, configured to input a plurality of first axis angle information of a plurality of nodes to a second sub-discriminator, to obtain a second sub-discrimination result output by the second sub-discriminator, where the second sub-discrimination result is used to indicate whether the plurality of first axis angle information of the plurality of nodes matches with the target object, and the first discriminator includes: a plurality of first sub-discriminators and second sub-discriminators, the first discrimination results including: a plurality of first sub-authentication results and second sub-authentication results.
As an alternative embodiment, the above device further comprises:
(1) The second acquisition unit is used for acquiring m target training sample groups before inputting the first shaft angle information and the first shape information into the target discriminator to obtain a target discrimination result output by the target discriminator, wherein each target training sample group comprises a target positive sample group and a target negative sample group, the target positive sample group comprises n target positive samples, the target negative sample group comprises n target negative samples, the target positive samples are model parameters comprising second shaft angle information and second shape information which are matched with a target object, the target negative samples are model parameters comprising third shaft angle information and third shape information which are not matched with the target object, m is a positive integer which is greater than or equal to 1, and n is a positive integer which is greater than 1;
(2) The training unit is used for training the m first initial discriminators by using m target training sample sets to obtain m candidate discriminators, wherein the m target training sample sets are in one-to-one correspondence with the m first initial discriminators;
and a selecting unit for selecting the target discriminator from the m candidate discriminators.
As an alternative embodiment, the second acquisition unit comprises:
(1) The first acquisition module is used for acquiring m target positive sample groups;
(2) A second acquisition module, configured to repeatedly perform the following steps until m×n target negative samples are acquired: obtaining m initial training sample sets, wherein each initial training sample set comprises a target positive sample set and a random negative sample set, each random negative sample set comprises n random negative samples, and each random negative sample is a model parameter comprising fourth axis angle information and fourth shape information which are randomly generated; respectively training m second initial discriminators by using m initial training sample groups to obtain m reference discriminators, wherein the m initial training sample groups are in one-to-one correspondence with the m second initial discriminators; sequentially using other reference discriminators except the target reference discriminator to discriminate each random negative sample in the target random negative sample group to obtain a sample discrimination result of each random negative sample, wherein the target reference discriminator is a reference discriminator selected from m reference discriminators, the target random negative sample group is a random negative sample group in an initial training sample group corresponding to the target reference discriminator, and the sample discrimination result is used for indicating whether the random negative sample is a negative sample or not; indicating a sample discrimination result as a random negative sample of the negative samples, and determining the random negative sample as a target negative sample;
(3) And the third acquisition module is used for acquiring m target negative sample groups according to m multiplied by n target negative samples.
As an alternative embodiment, the second acquisition module includes:
(1) The training sub-module is used for training the current initial discriminator in the m second initial discriminators by using the current initial training sample set in the m initial training sample sets to obtain candidate reference discriminators, wherein the discrimination accuracy of the candidate reference discriminators on samples in the current initial training sample set is greater than or equal to a first accuracy threshold;
(2) A first determining sub-module, configured to determine the candidate reference discriminator as the reference discriminator in a case where the discrimination accuracy of the candidate reference discriminator on other target positive samples is greater than or equal to the second accuracy threshold, where the other target positive samples are target positive samples included in other initial training sample groups than the current initial training sample group of the m initial training sample groups.
As an alternative embodiment, the second acquisition module includes:
(1) The identification submodule is used for respectively identifying the target random negative samples in the target random negative sample group by using a plurality of other reference identifiers to obtain a plurality of sub-sample identification results, wherein each sub-sample identification result is used for indicating whether the target random negative sample identified by one other reference identifier is a negative sample or not;
(2) And the second determining submodule is used for determining the sample identification result of the target random negative sample according to the plurality of sub-sample identification results.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
According to yet another aspect of an embodiment of the present application, a computer-readable storage medium is provided. Optionally, the storage medium has stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the above methods provided in the embodiments of the present application when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, acquiring target model parameters of a three-dimensional object model of a target object, wherein the target model parameters comprise first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model;
s2, inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with a target object or not;
And S3, constructing a three-dimensional object model according to the target model parameters under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a variety of media capable of storing a computer program, such as a usb disk, a ROM (Read-Only Memory), a RAM (Random Access Memory ), a removable hard disk, a magnetic disk, or an optical disk.
According to still another aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor (which may be the processor 102 in fig. 1) and a memory (which may be the memory 104 in fig. 1) in which a computer program is stored, the processor being arranged to run the computer program to perform the steps of any of the above-described methods provided in the embodiments of the application.
Optionally, the electronic apparatus may further include a transmission device (the transmission device may be the transmission device 106 in fig. 1) and an input/output device (the input/output device may be the input/output device 108 in fig. 1), where the transmission device is connected to the processor and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring target model parameters of a three-dimensional object model of a target object, wherein the target model parameters comprise first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model;
s2, inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with a target object or not;
and S3, constructing a three-dimensional object model according to the target model parameters under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object.
Optionally, the optional examples in this embodiment may refer to the examples described in the foregoing embodiments and optional implementation manners, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (12)
1. A method of modeling, comprising:
obtaining target model parameters of a three-dimensional object model of a target object, wherein the target model parameters comprise first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling the body type of the three-dimensional object model;
inputting the first shaft angle information and the first shape information into a target discriminator to obtain a target discrimination result output by the target discriminator, wherein the target discrimination result is used for indicating whether the first shaft angle information and the first shape information are matched with the target object or not; inputting the first axis angle information and the first shape information into the target discriminator, and obtaining the target discrimination result output by the target discriminator includes: inputting the first shaft angle information to a first discriminator to obtain a first discrimination result output by the first discriminator, wherein the first discrimination result is used for indicating whether the first shaft angle information is matched with the target object or not; inputting the first shape information into a second discriminator to obtain a second discrimination result output by the second discriminator, wherein the second discrimination result is used for indicating whether the first shape information is matched with the target object or not; inputting the first authentication result and the second authentication result to a third discriminator to obtain the target authentication result output by the third discriminator, wherein the target discriminator comprises: the first discriminator, the second discriminator and the third discriminator;
And constructing the three-dimensional object model according to the target model parameters under the condition that the target identification result indicates that the first shaft angle information and the first shape information are matched with the target object.
2. The method of claim 1, wherein inputting the first shaft angle information to the first discriminator to obtain the first discrimination result output by the first discriminator comprises:
in the case that the joint point comprises a plurality of joints, respectively inputting a plurality of first shaft angle information of the joints to a plurality of first sub-discriminators to obtain a plurality of first sub-discrimination results, wherein the joints are in one-to-one correspondence with the first sub-discriminators, and each first sub-discrimination result is used for indicating whether the first shaft angle information of one joint is matched with the target object;
inputting the first axis angle information of the plurality of the articulation points to a second sub-discriminator to obtain a second sub-discrimination result output by the second sub-discriminator, wherein the second sub-discrimination result is used for indicating whether the first axis angle information of the plurality of the articulation points is matched with the target object or not, and the first discriminator comprises: a plurality of the first sub-discriminators and the second sub-discriminators, the first discrimination result including: a plurality of the first sub-authentication results and the second sub-authentication results.
3. The method according to any one of claims 1 to 2, wherein before inputting the first axis angle information and the first shape information to a target discriminator, obtaining a target discrimination result output by the target discriminator, the method further comprises:
obtaining m target training sample sets, wherein each target training sample set comprises a target positive sample set and a target negative sample set, the target positive sample set comprises n target positive samples, the target negative sample set comprises n target negative samples, the target positive samples are model parameters comprising second axis angle information and second shape information which are matched with the target object, the target negative samples are model parameters comprising third axis angle information and third shape information which are not matched with the target object, m is a positive integer which is greater than or equal to 1, and n is a positive integer which is greater than 1;
respectively training m first initial discriminators by using m target training sample groups to obtain m candidate discriminators, wherein the m target training sample groups are in one-to-one correspondence with the m first initial discriminators;
the target discriminator is selected from m candidate discriminators.
4. The method of claim 3, wherein obtaining m of the target training sample sets comprises:
obtaining m target positive sample groups;
the following steps are repeatedly executed until m×n target negative samples are acquired: obtaining m initial training sample sets, wherein each initial training sample set comprises one target positive sample set and one random negative sample set, each random negative sample set comprises n random negative samples, and each random negative sample is a model parameter comprising fourth axis angle information and fourth shape information which are randomly generated; respectively training m second initial discriminators by using m initial training sample groups to obtain m reference discriminators, wherein the m initial training sample groups are in one-to-one correspondence with the m second initial discriminators; sequentially using other reference discriminators except for a target reference discriminator to discriminate each random negative sample in a target random negative sample group, so as to obtain a sample discrimination result of each random negative sample, wherein the target reference discriminator is a reference discriminator selected from m reference discriminators, the target random negative sample group is a random negative sample group in an initial training sample group corresponding to the target reference discriminator, and the sample discrimination result is used for indicating whether the random negative sample is a negative sample or not; a random negative sample indicating the sample discrimination result as a negative sample is determined as the target negative sample;
And obtaining m target negative sample groups according to m multiplied by n target negative samples.
5. The method of claim 4, wherein training the m second initial discriminators using the m initial training sample sets, respectively, to obtain m reference discriminators comprises:
training the current initial discriminators in the m second initial discriminators by using the current initial training sample groups in the m initial training sample groups to obtain candidate reference discriminators, wherein the discrimination accuracy of the candidate reference discriminators on samples in the current initial training sample groups is greater than or equal to a first accuracy threshold;
and determining the candidate reference discriminator as the reference discriminator in the case that the discrimination accuracy of the candidate reference discriminator on other target positive samples is greater than or equal to a second accuracy threshold, wherein the other target positive samples are target positive samples contained in other initial training sample groups except the current initial training sample group in m initial training sample groups.
6. The method of claim 4, wherein sequentially using the other reference identifiers in addition to the target reference identifier to identify each of the random negative samples in the target set of random negative samples, the sample identification result for each of the random negative samples comprising:
Respectively identifying target random negative samples in the target random negative sample group by using a plurality of other reference discriminators to obtain a plurality of sub-sample discrimination results, wherein each sub-sample discrimination result is used for indicating whether the target random negative samples identified by one of the other reference discriminators are negative samples;
and determining the sample identification result of the target random negative sample according to a plurality of sub-sample identification results.
7. A model building apparatus, comprising:
a first acquisition unit configured to acquire target model parameters of a three-dimensional object model of a target object, wherein the target model parameters include first axis angle information of an articulation point of the three-dimensional object model and first shape information for controlling a body shape of the three-dimensional object model;
a first input unit, configured to input the first axis angle information and the first shape information to a target discriminator, to obtain a target discrimination result output by the target discriminator, where the target discrimination result is used to indicate whether the first axis angle information and the first shape information match with the target object;
a construction unit, configured to construct the three-dimensional object model according to the target model parameters when the target discrimination result indicates that the first axis angle information and the first shape information match the target object;
The first input unit includes:
the first input module is used for inputting the first shaft angle information into a first discriminator to obtain a first discrimination result output by the first discriminator, wherein the first discrimination result is used for indicating whether the first shaft angle information is matched with the target object or not;
a second input module, configured to input the first shape information to a second discriminator, and obtain a second discrimination result output by the second discriminator, where the second discrimination result is used to indicate whether the first shape information matches with the target object;
a third input module, configured to input the first authentication result and the second authentication result to a third discriminator, and obtain the target authentication result output by the third discriminator, where the target discriminator includes: the first discriminator, the second discriminator, and the third discriminator.
8. The apparatus of claim 7, wherein the first input module comprises:
the first input sub-module is used for respectively inputting a plurality of first shaft angle information of a plurality of articulation points to a plurality of first sub-discriminators to obtain a plurality of first sub-discrimination results, wherein the articulation points are in one-to-one correspondence with the first sub-discriminators, and each first sub-discrimination result is used for indicating whether the first shaft angle information of one articulation point is matched with the target object;
A second input sub-module, configured to input a plurality of first axis angle information of a plurality of joints to a second sub-discriminator, to obtain a second sub-discrimination result output by the second sub-discriminator, where the second sub-discrimination result is used to indicate whether a plurality of first axis angle information of a plurality of joints matches the target object, and the first discriminator includes: a plurality of the first sub-discriminators and the second sub-discriminators, the first discrimination result including: a plurality of the first sub-authentication results and the second sub-authentication results.
9. The apparatus according to any one of claims 7 to 8, further comprising:
a second obtaining unit, configured to obtain m target training sample groups before inputting the first axis angle information and the first shape information to a target discriminator to obtain a target discrimination result output by the target discriminator, where each target training sample group includes a target positive sample group and a target negative sample group, the target positive sample group includes n target positive samples, the target negative sample group includes n target negative samples, the target positive samples are model parameters including second axis angle information and second shape information that match the target object, the target negative samples are model parameters including third axis angle information and third shape information that do not match the target object, m is a positive integer greater than or equal to 1, and n is a positive integer greater than 1;
The training unit is used for training the m first initial discriminators by using the m target training sample groups to obtain m candidate discriminators, wherein the m target training sample groups are in one-to-one correspondence with the m first initial discriminators;
and a selecting unit configured to select the target discriminator from m candidate discriminators.
10. The apparatus of claim 9, wherein the second acquisition unit comprises:
the first acquisition module is used for acquiring m target positive sample groups;
a second obtaining module, configured to repeatedly perform the following steps until m×n target negative samples are obtained: obtaining m initial training sample sets, wherein each initial training sample set comprises one target positive sample set and one random negative sample set, each random negative sample set comprises n random negative samples, and each random negative sample is a model parameter comprising fourth axis angle information and fourth shape information which are randomly generated; respectively training m second initial discriminators by using m initial training sample groups to obtain m reference discriminators, wherein the m initial training sample groups are in one-to-one correspondence with the m second initial discriminators; sequentially using other reference discriminators except for a target reference discriminator to discriminate each random negative sample in a target random negative sample group, so as to obtain a sample discrimination result of each random negative sample, wherein the target reference discriminator is a reference discriminator selected from m reference discriminators, the target random negative sample group is a random negative sample group in an initial training sample group corresponding to the target reference discriminator, and the sample discrimination result is used for indicating whether the random negative sample is a negative sample or not; a random negative sample indicating the sample discrimination result as a negative sample is determined as the target negative sample;
And the third acquisition module is used for acquiring m target negative sample groups according to m multiplied by n target negative samples.
11. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when run.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 6 by means of the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911344760.3A CN111047690B (en) | 2019-12-23 | 2019-12-23 | Model construction method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911344760.3A CN111047690B (en) | 2019-12-23 | 2019-12-23 | Model construction method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111047690A CN111047690A (en) | 2020-04-21 |
CN111047690B true CN111047690B (en) | 2023-12-15 |
Family
ID=70238757
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911344760.3A Active CN111047690B (en) | 2019-12-23 | 2019-12-23 | Model construction method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111047690B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104732247A (en) * | 2015-03-09 | 2015-06-24 | 北京工业大学 | Human face feature positioning method |
CN109448090A (en) * | 2018-11-01 | 2019-03-08 | 北京旷视科技有限公司 | Image processing method, device, electronic equipment and storage medium |
CN109544666A (en) * | 2018-10-26 | 2019-03-29 | 中国科学院计算技术研究所 | A kind of full automatic model deformation transmission method and system |
CN110536095A (en) * | 2019-08-30 | 2019-12-03 | Oppo广东移动通信有限公司 | Call method, device, terminal and storage medium |
CN110599540A (en) * | 2019-08-05 | 2019-12-20 | 清华大学 | Real-time three-dimensional human body shape and posture reconstruction method and device under multi-viewpoint camera |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7356168B2 (en) * | 2004-04-23 | 2008-04-08 | Hitachi, Ltd. | Biometric verification system and method utilizing a data classifier and fusion model |
-
2019
- 2019-12-23 CN CN201911344760.3A patent/CN111047690B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104732247A (en) * | 2015-03-09 | 2015-06-24 | 北京工业大学 | Human face feature positioning method |
CN109544666A (en) * | 2018-10-26 | 2019-03-29 | 中国科学院计算技术研究所 | A kind of full automatic model deformation transmission method and system |
CN109448090A (en) * | 2018-11-01 | 2019-03-08 | 北京旷视科技有限公司 | Image processing method, device, electronic equipment and storage medium |
CN110599540A (en) * | 2019-08-05 | 2019-12-20 | 清华大学 | Real-time three-dimensional human body shape and posture reconstruction method and device under multi-viewpoint camera |
CN110536095A (en) * | 2019-08-30 | 2019-12-03 | Oppo广东移动通信有限公司 | Call method, device, terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111047690A (en) | 2020-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11232286B2 (en) | Method and apparatus for generating face rotation image | |
CN111223106B (en) | Full-automatic portrait mask matting method and system | |
CN110188239B (en) | Double-current video classification method and device based on cross-mode attention mechanism | |
CN111858869B (en) | Data matching method and device, electronic equipment and storage medium | |
CN108780519A (en) | Structure learning in convolutional neural networks | |
CN113221663B (en) | Real-time sign language intelligent identification method, device and system | |
CN111882643A (en) | Three-dimensional face construction method and device and electronic equipment | |
JP2022520390A (en) | Image recognition method, recognition model training method and its equipment, and computer program | |
CN112131908A (en) | Action identification method and device based on double-flow network, storage medium and equipment | |
CN113505682B (en) | Living body detection method and living body detection device | |
CN113096055B (en) | Training method and device for image generation model, electronic equipment and storage medium | |
CN110232326A (en) | A kind of D object recognition method, device and storage medium | |
CN108197594A (en) | The method and apparatus for determining pupil position | |
CN111401193B (en) | Method and device for acquiring expression recognition model, and expression recognition method and device | |
CN111382410B (en) | Face brushing verification method and system | |
CN110659023B (en) | Method for generating programming content and related device | |
CN114360018B (en) | Rendering method and device of three-dimensional facial expression, storage medium and electronic device | |
CN112990154B (en) | Data processing method, computer equipment and readable storage medium | |
CN110135428A (en) | Image segmentation processing method and device | |
CN111047690B (en) | Model construction method and device, storage medium and electronic device | |
CN110472537B (en) | Self-adaptive identification method, device, equipment and medium | |
CN116959113A (en) | Gait recognition method and device | |
CN110427870B (en) | Eye picture recognition method, target recognition model training method and device | |
CN114917590B (en) | Virtual reality game system | |
CN115880111A (en) | Virtual simulation training classroom teaching management method and system based on images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |