CN117423109A - Image key point labeling method and related equipment thereof - Google Patents

Image key point labeling method and related equipment thereof Download PDF

Info

Publication number
CN117423109A
CN117423109A CN202311430037.3A CN202311430037A CN117423109A CN 117423109 A CN117423109 A CN 117423109A CN 202311430037 A CN202311430037 A CN 202311430037A CN 117423109 A CN117423109 A CN 117423109A
Authority
CN
China
Prior art keywords
target
skin model
key point
image
triangular mesh
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.)
Pending
Application number
CN202311430037.3A
Other languages
Chinese (zh)
Inventor
王晓见
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Codespace Technology Co ltd
Original Assignee
Beijing Codespace Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Codespace Technology Co ltd filed Critical Beijing Codespace Technology Co ltd
Priority to CN202311430037.3A priority Critical patent/CN117423109A/en
Publication of CN117423109A publication Critical patent/CN117423109A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/004Annotating, labelling

Abstract

The application relates to an image key point labeling method and related equipment thereof. The method comprises the following steps: acquiring a reference skin model and a target image of a target object; generating a target skin model corresponding to the target image by a 3D modeling method; mapping the target key points from the reference skin model to the target skin model based on the first position information to obtain second position information of the target key points relative to the target skin model; and determining third position information of the target key point on the plane of the target image by means of reduction photographing according to the photographing parameters and the second position information. The target key points are mapped from the reference skin model to the target skin model generated according to the target image, and then the target key points are mapped from the target skin model to the target image, so that automatic key point labeling of the target image is realized, and meanwhile, the accuracy of key point labeling is improved by utilizing the skin model and the information of the target image.

Description

Image key point labeling method and related equipment thereof
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method for labeling image key points and related devices thereof.
Background
This section is intended to provide a background or context to the embodiments of the application recited in the claims. It is not admitted to be prior art by inclusion of this description in this section.
The image key point mark is widely applied in the fields of artificial intelligence, mapping, motion monitoring and the like, and can be used for tasks such as target detection, image analysis and the like.
At present, most of image key point marks are realized by a manual marking mode, and a professional is required to mark the image. In addition, the key points can be marked by using pre-trained models, but the models are marked by an interpolation method, namely, the key point positions are set in advance in the training stage, so that the automatic extrapolation method marking of various different images is difficult to adapt. Therefore, the current image key point marking method is single in form and cannot realize accurate automatic marking.
Disclosure of Invention
The image key point marking method and the related equipment at least solve the problems that the image key point marking method in the related technology is single in form and cannot achieve accurate automatic marking.
The above object of the present application is achieved by the following technical solutions:
in a first aspect, an embodiment of the present application provides an image keypoint labeling method, including:
acquiring a reference skin model and a target image of a target object, wherein the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to photographing parameters;
generating a target skin model corresponding to the target image by a 3D modeling method, wherein the target skin model and the reference skin model have the same vertex number and a corresponding vertex topological structure;
mapping the target keypoints from the reference skin model to the target skin model based on the first position information to obtain second position information of the target keypoints relative to the target skin model;
and determining third position information of the target key point on the plane where the target image is located in a reduction photographing mode according to the photographing parameters and the second position information.
In a second aspect, an embodiment of the present application provides an image keypoint labeling device, including:
The acquisition module is used for acquiring a reference skin model and a target image of a target object, wherein the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to photographing parameters;
the generation module is used for generating a target skin model corresponding to the target image through a 3D modeling method, wherein the target skin model and the reference skin model have the same vertex number and a corresponding vertex topological structure;
the mapping module is used for mapping the target key points from the reference skin model to the target skin model based on the first position information so as to obtain second position information of the target key points relative to the target skin model;
and the determining module is used for determining third position information of the target key point on the plane where the target image is located in a reduction photographing mode according to the photographing parameters and the second position information.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method of the first aspect.
In a fourth aspect, embodiments of the present application provide a non-transitory machine-readable medium storing computer instructions for causing the computer to perform the method according to the first aspect.
The image key point labeling method provided by the embodiment of the application can realize automatic image key point labeling, and meanwhile, the accuracy of image key point labeling can be improved. In practical application, a reference skin model and a target image of a target object are obtained, wherein the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to photographing parameters. Then, a target skin model corresponding to the target image and having the same vertex number as the reference skin model and the corresponding vertex topology structure is generated through a 3D modeling method. In this way, the target keypoints may be mapped from the reference skin model to the target skin model based on the first position information to obtain second position information of the target keypoints relative to the target skin model. And finally, determining third position information of the target key point on the plane of the target image by a reduction photographing mode according to the photographing parameters and the second position information. Based on the method, the automatic key point labeling of the target image is realized by mapping the target key point from the reference skin model to the target skin model generated according to the target image and then mapping the target key point from the target skin model to the target image, and meanwhile, the accuracy of the key point labeling is improved by utilizing the information of the skin model and the target image.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will make a brief introduction to the drawings used in the description of the embodiments or the prior art. It is obvious that the drawings in the following description are only some embodiments of the present application, and that other embodiments may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a flowchart of an image keypoint labeling method according to an exemplary embodiment of the present application.
Fig. 2 is an application schematic diagram of an image keypoint labeling method according to an exemplary embodiment of the present application.
Fig. 3 is a flowchart of a method for obtaining a standard skin model according to an exemplary embodiment of the present application.
Fig. 4 is a flowchart of a second location information determining method according to an exemplary embodiment of the present application.
Fig. 5 is a schematic structural diagram of an image key point labeling device according to an exemplary embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Embodiments of the present embodiment will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present embodiments are illustrated in the accompanying drawings, it is to be understood that the present embodiments may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the present embodiments. It should be understood that the drawings and the embodiments of the present embodiments are presented for purposes of illustration only and are not intended to limit the scope of the embodiments.
Image keypoint labeling is an important task in the field of computer vision, which refers to marking points in an image that have specific semantics or have important information, which can be object edges, corner points, points of interest or other important image features in the image. Image keypoint labeling plays a key role in many applications, such as object detection, object tracking, face recognition, pose estimation, etc. By marking key points in the image, the computer can better understand the shape, structure, gesture and other information of the object in the image, thereby improving the understanding and analyzing capability of the computer on the image.
The purpose of image keypoint labeling is to construct a training dataset or test dataset for training and evaluation of machine learning or deep learning models. By labeling the key points, supervised training data can be provided to the algorithm, enabling the algorithm to learn and understand features and structures in the image.
The quality of the image key point labeling is critical to the subsequent algorithm effect and application performance. The accuracy, consistency and comprehensiveness of the labeling directly affect the training and application effects of the algorithm. Therefore, the labeling of the image key points needs to be carefully and strictly performed, and usually a plurality of labeling operators need to be labeled and verified in quality so as to ensure the accuracy and reliability of labeling results.
Currently, labeling of image keypoints is typically performed manually, i.e., by a human annotator by observing the image and manually annotating the positions of the keypoints. The annotator typically marks the location of the keypoints on the image using a specific annotation tool or software and saves it as an annotation file or database. Therefore, the current image key point marking method is single in form and cannot realize accurate automatic marking.
In order to solve the above-mentioned problems, an embodiment of the present application provides an image keypoint labeling method, first, a reference skin model and a target image of a target object are obtained, where the reference skin model corresponds to a target keypoint and first position information of the target keypoint relative to the reference skin model, and the target image corresponds to a photographing parameter. Then, a target skin model corresponding to the target image and having the same vertex number as the reference skin model and the corresponding vertex topology structure is generated through a 3D modeling method. In this way, the target keypoints may be mapped from the reference skin model to the target skin model based on the first position information to obtain second position information of the target keypoints relative to the target skin model. And finally, determining third position information of the target key point on the plane of the target image by a reduction photographing mode according to the photographing parameters and the second position information.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flowchart of an image keypoint labeling method according to an exemplary embodiment of the present application. Referring to fig. 1, the method includes the following steps.
S101, acquiring a reference skin model and a target image of a target object, wherein the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to photographing parameters.
S102, generating a target skin model corresponding to the target image through a 3D modeling method, wherein the target skin model and the reference skin model have the same vertex number and a corresponding vertex topological structure.
And S103, mapping the target key points from the reference skin model to the target skin model based on the first position information so as to obtain second position information of the target key points relative to the target skin model.
S104, determining third position information of the target key point on the plane where the target image is located in a restoring photographing mode according to the photographing parameters and the second position information.
The image key point labeling method provided by the embodiment of the application can be applied to image key point labeling of various application scenes. Taking an application scene for realizing target object tracking as an example, when the target object is tracked, first, a key point label is required to be carried out on the target object. At this time, an image of the target object and a reference skin model of the target object may be obtained, and the key points are mapped to the target skin model of the target object generated by the image by performing a key point labeling on the reference skin model, and then the key points in the target skin model are mapped to the image of the target object, so as to label the key points of the image, and further realize tracking of the target object.
In order to label the key points of the image, firstly, a reference skin model of the target object and the target image are obtained. In this embodiment, the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to a photographing parameter.
In this embodiment, the reference skin model may be a skin model generated by performing 3D modeling on the body of the target object, which is in one-to-one correspondence with each feature point of the target object. The target image is an image containing the target object, wherein the size and the shape of the target object in the target image can be arbitrary. In this embodiment, the target photographing parameters of the target image may include at least one of a camera internal parameter, a camera external parameter, and a distortion parameter, and optionally, the target photographing parameters may include a photographing focal length, a photographing distance, a photographing angle, and so on.
In order to map the target keypoints of the reference skin model to the target skin model of the target object, it is necessary to perform a target keypoint labeling operation on the reference skin model. Thus, in the above-described embodiment, the acquired reference skin model may include the reference skin model on which the target keypoint labeling operation has been performed. That is, the reference skin model corresponds to the target keypoints, and at the same time, the target keypoints each correspond to the first positional information with respect to the reference skin model.
In practical application, the first position information may include an index number of a triangular mesh of the target key point in the reference model, and the index number of the triangular mesh may include an array subscript, a database primary key ID, a name identifier, and the like; in addition, the first location information may further include specific location information of the target key point in the triangular mesh, and the specific location information may include information such as coordinates.
After the reference skin model and the target image corresponding to the target object are acquired, the target skin model corresponding to the target image can be generated through a 3D modeling method. In this embodiment, the mesh distribution manner of the target skin model and the reference skin model is the same, in other words, the target skin model and the reference skin model have the same vertex number and corresponding vertex topology structure.
In this embodiment, the target skin model corresponding to the target object may be generated by the following method:
and carrying out image preprocessing on the target image, specifically carrying out denoising, image enhancement and other processing operations on the input target image so as to improve the processing effect of the subsequent steps.
Extracting feature points from the processed target image, and matching the feature points by using feature descriptors. The matching and extraction of the feature points can be realized by the following method: scale-invariant feature transforms (Scale-Invariant Feature Transform, SIFT for short), acceleration robust features (Speeded Up Robust Features, SURF for short), fast direction and rotation binary robust features (Oriented FAST and Rotated BRIEF, ORB for short), and so forth.
And calculating the camera gesture according to the target photographing parameters of the target image. Specifically, the camera pose may be calculated by a multi-Point-to-Point (PnP) algorithm based on the above-mentioned target photographing parameters.
In an alternative embodiment, if there is no target photographing parameter corresponding to the target image, or if there are fewer target photographing parameters corresponding to the target image, the target photographing parameters of the target image may be calculated by using the matching relationship of the feature points.
And according to the camera gesture, converting the matched characteristic points into three-dimensional points by a triangulation method. In particular, the triangulation algorithm may comprise at least one of: direct linear transformation (Direct Linear Transform, DLT for short) algorithm, beam method adjustment (Bundle Adjustment) algorithm, and the like.
And generating a three-dimensional point cloud according to the three-dimensional points obtained in the steps, and generating a three-dimensional model of the target object through a three-dimensional modeling tool. The three-dimensional model can be further converted into a target skin model through a grid skin algorithm. In this embodiment, the three-dimensional modeling tool may include three-dimensional modeling software, which may include Blender, 3ds Max, and so on. The mesh skinning algorithm may include the Delaunay triangulation algorithm, poisson reconstruction algorithm, and the like.
In this embodiment, the mesh distribution mode of the target skin model is the same as that of the reference skin model. That is, the mesh of the target skin model is in one-to-one correspondence with the mesh of the reference skin model.
After generating the target skin model corresponding to the target image through the 3D modeling method, the target keypoints may be mapped from the reference skin model to the target skin model based on the first position information to obtain second position information of the target keypoints relative to the target skin model.
In this embodiment, according to the first position information of the target key point, matching mapping is performed in the target skin model to obtain the second position of the target key point in the target skin modelAnd (5) extinguishing. Specifically, the mesh of the target skin model is in one-to-one correspondence with the mesh of the reference skin model. For example, in the reference skin model, it is assumed that a certain target key point is in triangle mesh A 1 B 1 C 1 Wherein triangular mesh A 1 B 1 C 1 The index number of (2) is "1000". Correspondingly, in the target skin model, the triangular mesh where the target key point is located is the same as the triangular mesh A 1 B 1 C 1 Corresponding triangular mesh A 2 B 2 C 2 Wherein, triangular mesh A 2 B 2 C 2 The index number of (2) is also "1000". Then, the target key points can be positioned in the triangular grid A 1 B 1 C 1 Mapping the target key points to the triangular mesh A 2 B 2 C 2 Is a kind of medium.
After the target key points are mapped from the reference skin model to the target skin model based on the first position information, third position information of the target key points on the plane of the target image can be determined through a restoration shooting mode according to shooting parameters and the second position information.
In an alternative embodiment, the photographing parameters may be recovered by SFM techniques.
As described above, the image keypoint labeling method in the application scenario is exemplified below by taking the image keypoint labeling in the target object tracking scenario as an example, with reference to fig. 2.
As shown in fig. 2, a target image of a target object acquired by a target camera is labeled with a key point by using a cloud server as an example.
The cloud server acquires a target image shot by a target camera, and simultaneously, the cloud server also acquires target shooting parameters corresponding to the target image.
After the target image is acquired, the cloud server determines and acquires a reference skin model corresponding to the target object. At this time, the user may perform the operation of labeling the key points on the reference skin model based on the user terminal. Specifically, the user can mark key points on the reference skin model by clicking on the reference skin model. Meanwhile, after the cloud server acquires the target image, the cloud server also generates a target skin model with the same grid distribution mode as the reference skin model according to the target image.
And the cloud server responds to the key point labeling request uploaded by the user side, generates a target key point on the reference skin model, and determines first position information corresponding to the target key point.
The cloud server maps the target key points from the reference skin model to the target skin model based on the first position information so as to obtain second position information of the target key points relative to the target skin model. Specifically, first, a first triangular grid where a target key point is located is determined in a reference skin model, and then a second triangular grid corresponding to the first triangular grid is determined in the target skin model according to an index number of the first triangular grid. In this embodiment, it is assumed that the first triangular mesh is triangular mesh a with index number "1000 1 B 1 C 1 Then it can be determined that the second triangular mesh is triangular mesh A with index number of 1000 2 B 2 C 2 . Then, according to the target key points, the target key points are positioned in the triangular grid A 1 B 1 C 1 Determining the position of the target key point in the triangular grid A 2 B 2 C 2 And locate the target key point in triangle mesh A 2 B 2 C 2 Is determined as second location information.
According to the target photographing parameters of the target image, the cloud server determines third position information of the target key points on the plane of the target image in a restoring photographing mode due to the fact that the second position information of the target key points in the target skin model is known.
To complete the key point labeling of the target image.
In an alternative embodiment, the reference skin model may be obtained based on the following method. Fig. 3 is a flowchart of a reference skin model obtaining method according to an exemplary embodiment of the present application. Referring to fig. 3, the method includes the following steps.
S301, acquiring a labeling operation of a target key point corresponding to an initial reference skin model, wherein the labeling operation of the target key point comprises first position information corresponding to the target key point.
S302, responding to target key point labeling operation, and labeling target key points of the initial reference skin model based on the first position information to obtain the reference skin model.
First, a target keypoint labeling operation corresponding to an initial reference skin model may be acquired. In this embodiment, the target key point labeling operation may include first location information corresponding to the target key point.
In an embodiment of the present application, the target keypoint labeling operation includes at least one of the following: click input operation, text input operation, voice input operation. For example, assuming that the target key annotation operation is a click input operation, the initial reference skin model may be displayed at the user end first, and then the user may perform the target key point annotation operation by clicking on the initial reference skin model. Alternatively, taking a text input operation as an example, a user may input an index number in a text manner through a client to determine a target triangle mesh in an initial reference skin model, and may input coordinate information to determine a position of a target key point relative to the target triangle mesh.
And then, performing target key point labeling on the initial reference skin model based on the first position information in response to the target key point labeling operation so as to obtain the reference skin model. In this embodiment, after the target key point labeling operation of the user side is obtained, the target key point labeling operation may be performed on the initial reference skin model, and finally the reference skin model is obtained.
Fig. 4 is a flowchart of a second location information determining method according to an exemplary embodiment of the present application. Referring to fig. 4, the method includes the following steps.
S401, determining a first target triangular grid where the target key points are located in the reference skin model according to the first position information, wherein the first target triangular grid corresponds to a first target identification value.
S402, determining a second target triangular mesh corresponding to the first target identification value in the target skin model.
S403, determining the position of the target key point in the second target triangular mesh according to the position of the target key point in the first target triangular mesh, wherein the positions of the target key point in the first target triangular mesh and the second target triangular mesh are based on the corresponding position information of the same characterization mode.
S404, determining second position information of the target key points relative to the target skin model according to the positions of the target key points in the second target triangular meshes.
In this embodiment, the first location information may include an index number of a triangular mesh of the target key point in the reference skin model, where the index number of the triangular mesh may include an array subscript, a database primary key ID, a name identifier, and so on; in addition, the first location information may further include specific location information of the target key point in the triangular mesh, and the specific location information may include information such as coordinates.
The grid distribution of the target skin model is in one-to-one correspondence with the grid distribution of the reference skin model, and after the positions in the first target triangular grids are determined, the second target triangular grids corresponding to the first target triangular grids can be determined in a plurality of second triangular grids in the target skin model based on the corresponding relation.
Then, the position of the target key point in the second target triangular mesh can be determined according to the position of the target key point in the first target triangular mesh. In practical applications, the position of the target key point in the second target triangular mesh can be determined based on a triangle method, an affine transformation method, a parallelogram method, a parallel line segmentation method, an auxiliary line segmentation positioning method and the like.
Taking the triangle method as an example, the position of the target key point in the second target triangle mesh is determined. First, a first target triangle mesh may be divided into a plurality of first sub triangle meshes and a second target triangle mesh may be divided into a plurality of second sub triangle meshes based on a preset division method. And then, determining a first target sub-triangular grid in which the target key point is positioned in the plurality of first sub-target triangular grids, wherein the first target sub-triangular grid corresponds to the second target identification value. A second target sub-triangular mesh corresponding to the second target identification value is determined among the plurality of second sub-triangular meshes. When the second target sub-triangular mesh is small to a certain extent, the second target sub-triangular mesh can be approximated as a point, i.e., any point can be selected as second position information in the second target sub-triangular mesh.
In this embodiment, the preset dividing method may include: three line segments are generated along the center point based on three vertexes of the first target triangular mesh respectively to divide the first target triangular mesh into six first sub-triangular meshes, in order to improve the position determination precision of the target key points, the sub-triangular meshes obtained by the first division can be divided again or for multiple times to obtain multiple first sub-triangular meshes, the second target triangular mesh is divided based on the same mode, the first sub-triangular meshes and the second sub-triangular meshes are indexed, the index value of the first target sub-triangular mesh where the target key points are located is determined, the second target sub-triangular mesh where the key points are located is determined based on the same index value, and any point is selected from the second target sub-triangular meshes as the second position information.
Taking affine transformation method as an example, the position of the target key point in the second target triangular mesh is determined. Firstly, vertex coordinates of a first target triangular mesh and a second target triangular mesh are respectively obtained, and a three-dimensional affine transformation matrix is calculated based on the vertex coordinates of the first target triangular mesh and the second target triangular mesh. Then, the position of the target key point in the second target triangular mesh is determined according to the coordinate information of the target key point relative to the first target triangular mesh and the three-dimensional affine transformation matrix.
Taking a parallelogram method as an example, the position of the target key point in the second target triangular mesh is determined. Within the first target triangular mesh, a parallelogram is made based on the target key points and any vertices, the parallelogram forming a specific cut ratio on two sides of the first target triangular mesh, respectively. And determining two cutting points on the two corresponding sides of the second target triangular mesh according to the same cutting proportion, forming a parallelogram by taking the corresponding vertexes and the two cutting points as three vertexes, wherein the fourth vertex in the second target triangular mesh is the target key point, so that the position of the target key point can be determined in the second target triangular mesh.
The position of the target key point in the second target triangular mesh is determined by using a parallel line segmentation method as an example. Firstly, making a line segment of a parallel line on any side of a first target triangular mesh by a target key point, wherein the intersection point of the parallel line and the other two sides of the first target triangular mesh is D respectively 1 And E is 1 . Then according to D 1 And E is 1 The cutting ratio on both sides, determining the point D in the second target triangular mesh 2 And E is 2 Thus, the line segment D is obtained 2 E 2 . Finally, according to the target key point, on-line segment D 1 E 1 The proportion of the target key points is determined on the line segment D 2 E 2 Upper position.
Taking an auxiliary line segmentation positioning method as an example, the position of the target key point in the second target triangular mesh is determined. First, a cut point of a target edge of the first auxiliary line corresponding to the target vertex may be determined, wherein the target vertex includes any vertex of the first target triangle mesh, and the first auxiliary line is generated based on the target vertex and the target key point. Then, a second auxiliary line corresponding to the first auxiliary line is determined in the second target triangular mesh according to the cutting ratio of the cutting point relative to the target edge. And finally, determining the position of the target key point in the second target triangular mesh according to the second auxiliary line and the cutting proportion of the target key point relative to the first auxiliary line.
For example, assume that any one vertex of the first target triangle mesh has been crossed (assuming a 1 ) And the target key point is taken as a ray (namely an auxiliary line), and the ray is assumed to intersect with the point of the first target triangular mesh at a point A 2 . According to point A 2 Dividing the ratio of the bottom edges to determine a point A on the bottom edge of the second target triangular mesh 2 Corresponding point B 2 Assumed point B 2 Corresponding second targetThe vertex of the triangular mesh is B 1 . Finally, the line segment A can be based on the target key point 1 A 2 The proportion of the target key points is determined to be B 1 B 2 Upper position.
In an optional embodiment, when determining the position of the target key point in the second target triangular mesh according to the position of the target key point in the first target triangular mesh, coordinate information of the target key point relative to the first target triangular mesh may also be determined based on a first target coordinate system, where the first target coordinate system is a coordinate system with any vertex in the first target triangular mesh as an origin, two sides corresponding to the vertex as coordinate axes, and side lengths of the two sides as corresponding reference standards. A second target coordinate system corresponding to the first target coordinate system is then determined based on the second target triangular mesh. Finally, in the second target coordinate system, the target key points are mapped to the second target coordinate system based on the same relative coordinates of the target key points in the first target coordinate system, and the positions of the target key points in the second target triangular mesh are determined.
Fig. 5 is a schematic structural diagram of an image keypoint labeling device according to an exemplary embodiment of the present application, and as shown in fig. 5, the device includes: an acquisition module 501, a generation module 502, a mapping module 503 and a determination module 504.
The obtaining module 501 is configured to obtain a reference skin model of a target object and a target image, where the reference skin model corresponds to a target keypoint and first position information of the target keypoint relative to the reference skin model, and the target image corresponds to a photographing parameter.
The generating module 502 is configured to generate, by using a 3D modeling method, a target skin model corresponding to the target image, where the target skin model and the reference skin model have the same vertex number and a corresponding vertex topology structure.
A mapping module 503, configured to map the target keypoints from the reference skin model to the target skin model based on the first position information, so as to obtain second position information of the target keypoints relative to the target skin model.
And the determining module 504 is configured to determine, according to the photographing parameter and the second position information, third position information of the target key point on the plane where the target image is located by means of reduction photographing.
Optionally, the acquiring module 501 is specifically configured to acquire a labeling operation of a target keypoint corresponding to the initial reference skin model, where the labeling operation of the target keypoint includes first location information corresponding to the target keypoint. And responding to the target key point labeling operation, and labeling the target key points of the initial reference skin model based on the first position information to obtain the reference skin model.
Optionally, the target keypoint labeling operation includes at least one of: click input operation, text input operation, voice input operation.
Optionally, the mapping module 503 is specifically configured to determine, according to the first location information, a first target triangle mesh where the target key point is located in the reference skin model, where the first target triangle mesh corresponds to the first target identification value; determining a second target triangular mesh corresponding to the first target identification value in the target skin model; determining the position of the target key point in the second target triangular mesh according to the position of the target key point in the first target triangular mesh; determining second position information of the target key points relative to the target skin model according to the positions of the target key points in the second target triangular meshes; the positions of the target key points in the first target triangular mesh and the second target triangular mesh are based on corresponding position information of the same representation mode.
Optionally, the mapping module 503 is specifically further configured to divide the first target triangle mesh into a plurality of first sub triangle meshes and divide the second target triangle mesh into a plurality of second sub triangle meshes based on a preset dividing method; determining a first target sub-triangular grid in which the target key points are located in a plurality of first sub-target triangular grids, wherein the first target sub-triangular grid corresponds to a second target identification value; determining a second target sub-triangular mesh corresponding to the second target identification value in the plurality of second sub-triangular meshes; and determining the position of the target key point in the second target sub-triangular grid based on the position of the target key point in the first target sub-triangular grid, and selecting any point in the second target sub-triangular grid as the second position information.
Optionally, the mapping module 503 is specifically further configured to determine coordinate information of the target key point relative to the first target triangle mesh based on a first target coordinate system, where the first target coordinate system uses any vertex in the first target triangle mesh as an origin, uses two sides corresponding to the vertex as coordinate axes, and uses side lengths of the two sides as corresponding reference standards to determine a relative coordinate of the target key point in the first target coordinate system; determining a second target coordinate system corresponding to the first target coordinate system based on the second target triangular mesh; in the second target coordinate system, the target key points are mapped to the second target coordinate system based on the same relative coordinates of the target key points in the first target coordinate system, and the positions of the target key points in the second target triangular mesh are determined.
Optionally, the mapping module 503 is specifically further configured to determine a cutting point of the target edge corresponding to the first auxiliary line and the target vertex, where the target vertex includes any vertex of the first target triangle mesh, and the first auxiliary line is generated based on the target vertex and the target key point; determining a second auxiliary line corresponding to the first auxiliary line in a second target triangular mesh according to the cutting proportion of the cutting point relative to the target edge; and determining the position of the target key point in the second target triangular mesh according to the second auxiliary line and the cutting proportion of the target key point relative to the first auxiliary line.
Optionally, the mapping module 503 is specifically further configured to obtain vertex coordinates of the first target triangle mesh and the second target triangle mesh respectively; calculating a three-dimensional affine transformation matrix based on vertex coordinates of the first target triangular mesh and the second target triangular mesh; and determining the position of the target key point in the second target triangular mesh according to the coordinate information of the target key point relative to the first target triangular mesh and the three-dimensional affine transformation matrix.
Optionally, the photographing parameters include at least one of: camera intrinsic, camera extrinsic, distortion parameters.
Optionally, the photographing parameters are recovered by SFM technique.
The embodiment of the application also provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor, which when executed by the at least one processor is configured to cause an electronic device to perform a method of an embodiment of the present application.
The present application also provides a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is configured to cause the computer to perform the method of the present application.
The present application also provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor of a computer, is for causing the computer to perform the method of the present application embodiments.
With reference to fig. 6, a block diagram of an electronic device that may be a server or a client of an embodiment of the present application will now be described, which is an example of a hardware device that may be applied to aspects of the present application. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 6, the electronic device includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device can also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the electronic device are connected to the I/O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to an electronic device, and the input unit 606 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 607 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 608 may include, but is not limited to, magnetic disks, optical disks. The communication unit 609 allows the electronic device to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a CPU, a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, method embodiments of the present application may be implemented as a computer program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device via the ROM 602 and/or the communication unit 609. In some embodiments, the computing unit 601 may be configured to perform the methods described above by any other suitable means (e.g., by means of firmware).
A computer program for implementing the methods of embodiments of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of embodiments of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable signal medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the term "comprising" and its variants as used in the embodiments of the present application are open-ended, i.e. "including but not limited to". The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. The references to "one" or "a plurality" of the embodiments of the present application are intended to be illustrative, and not limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be interpreted as "one or more" unless the context clearly indicates otherwise.
User information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) according to the embodiments of the present application are information and data authorized by a user or sufficiently authorized by each party, and the collection, use and processing of relevant data is required to comply with relevant laws and regulations and standards of relevant countries and regions, and is provided with a corresponding operation portal for the user to select authorization or rejection.
The steps described in the method embodiments provided in the embodiments of the present application may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of protection of the present application is not limited in this respect.
The term "embodiment" in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive. The various embodiments in this specification are described in a related manner, with identical and similar parts being referred to each other. In particular, for apparatus, devices, system embodiments, the description is relatively simple as it is substantially similar to method embodiments, see for relevant part of the description of method embodiments.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the patent. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (13)

1. The image key point labeling method is characterized by comprising the following steps of:
acquiring a reference skin model and a target image of a target object, wherein the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to photographing parameters;
generating a target skin model corresponding to the target image by a 3D modeling method, wherein the target skin model and the reference skin model have the same vertex number and a corresponding vertex topological structure;
mapping the target keypoints from the reference skin model to the target skin model based on the first position information to obtain second position information of the target keypoints relative to the target skin model;
And determining third position information of the target key point on the plane where the target image is located in a reduction photographing mode according to the photographing parameters and the second position information.
2. The method for labeling image keypoints according to claim 1, wherein the acquiring the reference skin model and the target image of the target object comprises:
acquiring a labeling operation of a target key point corresponding to an initial reference skin model, wherein the labeling operation of the target key point comprises the first position information corresponding to the target key point;
and responding to the target key point labeling operation, and labeling the target key points of the initial reference skin model based on the first position information to obtain the reference skin model.
3. The image keypoint labeling method of claim 2, wherein the target keypoint labeling operation comprises at least one of: click input operation, text input operation, voice input operation.
4. The method of claim 1, wherein mapping the target keypoint from the reference skin model to the target skin model based on the first location information to obtain second location information of the target keypoint relative to the target skin model, comprises:
Determining a first target triangular grid where the target key point is located in the reference skin model according to the first position information, wherein the first target triangular grid corresponds to a first target identification value;
determining a second target triangular mesh corresponding to the first target identification value in the target skin model;
determining the position of the target key point in the second target triangular mesh according to the position of the target key point in the first target triangular mesh, wherein the positions of the target key point in the first target triangular mesh and the second target triangular mesh are based on corresponding position information of the same characterization mode;
and determining second position information of the target key points relative to the target skin model according to the positions of the target key points in the second target triangular meshes.
5. The method for labeling image keypoints according to claim 4, wherein determining the position of the target keypoint in the second target triangular mesh according to the position of the target keypoint in the first target triangular mesh comprises:
dividing the first target triangular mesh into a plurality of first sub-triangular meshes and dividing the second target triangular mesh into a plurality of second sub-triangular meshes based on a preset dividing method;
Determining a first target sub-triangular grid in which the target key point is located in the plurality of first sub-target triangular grids, wherein the first target sub-triangular grid corresponds to a second target identification value;
determining a second target sub-triangular mesh corresponding to the second target identification value in the plurality of second sub-triangular meshes;
and selecting any point in the second target sub-triangular mesh as the second position information.
6. The method for labeling image keypoints according to claim 4, wherein determining the position of the target keypoint in the second target triangular mesh according to the position of the target keypoint in the first target triangular mesh comprises:
determining coordinate information of the target key point relative to the first target triangular mesh based on a first target coordinate system, wherein the first target coordinate system takes any vertex in the first target triangular mesh as an origin, takes two sides corresponding to the vertex as coordinate axes, takes side lengths of the two sides as corresponding reference standards, and determines relative coordinates of the target key point in the first target coordinate system, and the reference standards are magnitudes of coordinate values represented by the side lengths on the corresponding coordinate axes;
Determining a second target coordinate system corresponding to the first target coordinate system based on the second target triangular mesh;
in a second target coordinate system, mapping the target key point to the second target coordinate system based on the same relative coordinates of the target key point in the first target coordinate system, and determining the position of the target key point in the second target triangular grid.
7. The method for labeling image keypoints according to claim 4, wherein determining the position of the target keypoint in the second target triangular mesh according to the position of the target keypoint in the first target triangular mesh comprises:
determining a cutting point of a target edge corresponding to a target vertex of a first auxiliary line, wherein the target vertex comprises any vertex of the first target triangular mesh, and the first auxiliary line is generated based on the target vertex and the target key point;
determining a second auxiliary line corresponding to the first auxiliary line in the second target triangular mesh according to the cutting proportion of the cutting point relative to the target edge;
and determining the position of the target key point in the second target triangular mesh according to the second auxiliary line and the cutting proportion of the target key point relative to the first auxiliary line.
8. The method for labeling image keypoints according to claim 4, wherein determining the position of the target keypoint in the second target triangular mesh according to the position of the target keypoint in the first target triangular mesh comprises:
respectively acquiring vertex coordinates of the first target triangular mesh and the second target triangular mesh;
calculating a three-dimensional affine transformation matrix based on vertex coordinates of the first target triangular mesh and the second target triangular mesh;
and determining the position of the target key point in the second target triangular mesh according to the coordinate information of the target key point relative to the first target triangular mesh and the three-dimensional affine transformation matrix.
9. The method for labeling image keypoints according to claim 1, wherein the target photographing parameters comprise at least one of the following: camera intrinsic, camera extrinsic, distortion parameters.
10. The method of claim 1, wherein the photographing parameters are recovered by SFM techniques.
11. An image keypoint labeling apparatus for implementing the image keypoint labeling method of any one of claims 1 to 10, characterized in that the apparatus comprises:
The acquisition module is used for acquiring a reference skin model and a target image of a target object, wherein the reference skin model corresponds to a target key point and first position information of the target key point relative to the reference skin model, and the target image corresponds to photographing parameters;
the generation module is used for generating a target skin model corresponding to the target image through a 3D modeling method, wherein the target skin model and the reference skin model have the same vertex number and a corresponding vertex topological structure;
the mapping module is used for mapping the target key points from the reference skin model to the target skin model based on the first position information so as to obtain second position information of the target key points relative to the target skin model;
and the determining module is used for determining third position information of the target key point on the plane where the target image is located in a reduction photographing mode according to the photographing parameters and the second position information.
12. An electronic device, comprising: a processor, and a memory storing a program, wherein the program comprises instructions that when executed by the processor cause the processor to perform the image keypoint labeling method of any one of claims 1-10.
13. A non-transitory machine readable medium storing computer instructions for causing the computer to perform the image keypoint labeling method of any one of claims 1-10.
CN202311430037.3A 2023-10-31 2023-10-31 Image key point labeling method and related equipment thereof Pending CN117423109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311430037.3A CN117423109A (en) 2023-10-31 2023-10-31 Image key point labeling method and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311430037.3A CN117423109A (en) 2023-10-31 2023-10-31 Image key point labeling method and related equipment thereof

Publications (1)

Publication Number Publication Date
CN117423109A true CN117423109A (en) 2024-01-19

Family

ID=89532259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311430037.3A Pending CN117423109A (en) 2023-10-31 2023-10-31 Image key point labeling method and related equipment thereof

Country Status (1)

Country Link
CN (1) CN117423109A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017194857A (en) * 2016-04-21 2017-10-26 大日本印刷株式会社 Free viewpoint video display apparatus
CN111695628A (en) * 2020-06-11 2020-09-22 北京百度网讯科技有限公司 Key point marking method and device, electronic equipment and storage medium
WO2022121283A1 (en) * 2020-12-10 2022-06-16 浙江商汤科技开发有限公司 Vehicle key point information detection and vehicle control
US20220222889A1 (en) * 2021-01-12 2022-07-14 Toyota Research Institute, Inc. Monocular 3d vehicle modeling and auto-labeling using semantic keypoints
CN115761855A (en) * 2022-11-23 2023-03-07 北京百度网讯科技有限公司 Face key point information generation, neural network training and three-dimensional face reconstruction method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017194857A (en) * 2016-04-21 2017-10-26 大日本印刷株式会社 Free viewpoint video display apparatus
CN111695628A (en) * 2020-06-11 2020-09-22 北京百度网讯科技有限公司 Key point marking method and device, electronic equipment and storage medium
WO2022121283A1 (en) * 2020-12-10 2022-06-16 浙江商汤科技开发有限公司 Vehicle key point information detection and vehicle control
US20220222889A1 (en) * 2021-01-12 2022-07-14 Toyota Research Institute, Inc. Monocular 3d vehicle modeling and auto-labeling using semantic keypoints
CN115761855A (en) * 2022-11-23 2023-03-07 北京百度网讯科技有限公司 Face key point information generation, neural network training and three-dimensional face reconstruction method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韩力群: "《机器智能与智能机器人》", 31 March 2022, 国防工业出版社, pages: 221 *

Similar Documents

Publication Publication Date Title
CN111815755B (en) Method and device for determining blocked area of virtual object and terminal equipment
CN109887003B (en) Method and equipment for carrying out three-dimensional tracking initialization
US8442307B1 (en) Appearance augmented 3-D point clouds for trajectory and camera localization
CN110675487B (en) Three-dimensional face modeling and recognition method and device based on multi-angle two-dimensional face
US11222471B2 (en) Implementing three-dimensional augmented reality in smart glasses based on two-dimensional data
CN104376594A (en) Three-dimensional face modeling method and device
US20200327653A1 (en) Automatic detection, counting, and measurement of logs using a handheld device
US20210272306A1 (en) Method for training image depth estimation model and method for processing image depth information
US11145080B2 (en) Method and apparatus for three-dimensional object pose estimation, device and storage medium
US20140218353A1 (en) Image group processing and visualization
JP7273129B2 (en) Lane detection method, device, electronic device, storage medium and vehicle
CN113870401A (en) Expression generation method, device, equipment, medium and computer program product
CN112766027A (en) Image processing method, device, equipment and storage medium
CN114565916A (en) Target detection model training method, target detection method and electronic equipment
CN109816791B (en) Method and apparatus for generating information
CN112508778A (en) 3D face prop mapping method, terminal and storage medium
CN115661493B (en) Method, device, equipment and storage medium for determining object pose
JP2019106008A (en) Estimation device, estimation method, and estimation program
CN115409951B (en) Image processing method, image processing device, electronic equipment and storage medium
CN113781653B (en) Object model generation method and device, electronic equipment and storage medium
CN108564661B (en) Recording method based on augmented reality scene
CN116012913A (en) Model training method, face key point detection method, medium and device
CN117423109A (en) Image key point labeling method and related equipment thereof
CN115994944A (en) Three-dimensional key point prediction method, training method and related equipment
CN113694525A (en) Method, device, equipment and storage medium for acquiring virtual image

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