A method and system for reconstructing and displaying a three-dimensional hand model from a single image
Through the deep learning technology of a single RGB image, the hand joint skeleton and 3D mesh model are constructed, which solves the problems of complex equipment and time-consuming in the existing technology, and achieves fast and accurate 3D hand model reconstruction and immersive experience. .
Patent Information
- Application Number
- CN202111231024.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-10-22
AI Technical Summary
In the existing technology, point clouds or multiple pictures are commonly used for 3D model reconstruction. The equipment is complex and the cost is high. The processing of multiple pictures is time-consuming and has poor accuracy. Especially for pictures with few texture features, the matching effect is not good.
Use a single RGB image to build a hand joint skeleton detection model, a hand 3D mesh generation model and a face key point detection model through deep learning, extract hand features, generate a 3D mesh and render it for display, achieving fast and low cost 3D hand model reconstruction.
It overcomes the problems of complex collection and cumbersome processes, improves the accuracy and running speed of the model, provides an immersive digital experience, and realizes efficient, low-cost contactless gesture control.
Smart Images

Figure CN114067046B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method and system for reconstructing a three-dimensional hand model from a single picture and displaying the model on a screen. Background Art
[0002] 3D model reconstruction, as the name implies, is to reconstruct a realistic 3D model of an object from some data. In the reconstruction process, different processing algorithms will be used for 3D reconstruction of different data. Accurate 3D model reconstruction can effectively help realize augmented reality (AR) and virtual reality (VR) technology, and is also the basis of special effects, computer-generated images (CG) and other technologies.
[0003] At present, 3D model reconstruction often uses slam point cloud, pictures and other data for reconstruction. However, although point cloud reconstruction can restore 3D models more accurately, it faces the characteristics of complex equipment and high cost. The method of using pictures usually uses multiple pictures or multiple cameras to fuse to generate a hand model. When processing the key point matching of multiple pictures, it will increase the time consumption, and the matching accuracy is poor for pictures with fewer texture features. Summary of the invention
[0004] In response to the technical problems existing in the prior art, the present invention provides a method and system for reconstructing and displaying a three-dimensional hand model from a single image, and uses a single RGB image to extract the three-dimensional mesh of the hand, so that in the hand modeling task, the shortcomings of the previous methods such as complex acquisition and cumbersome procedures are overcome, and the running speed is fast and the computing resource requirements are relatively low. In addition, the multi-stage modeling and training method involved in the patent of the present invention helps the model to better learn the features in the data and enhance the accuracy of the model. In addition, the patent of the present invention combines face detection and a determined display method to achieve digital synchronization of human hands, which is more in line with human operation modes and can provide a more immersive digital experience. In the application scenarios of the technology, high-efficiency, low-cost, energy-saving and environmentally friendly contactless gesture control of digital content can be achieved.
[0005] The technical solution of the present invention to solve the above technical problems is as follows: a method for reconstructing and displaying a three-dimensional model of a hand from a single image,
[0006] It includes the following steps:
[0007] Step 1: Use deep learning to build a hand skeleton detection model, a hand 3D mesh generation model, and a face and key point detection model, which are used to detect the hand based on an RGB image and obtain the hand joint skeleton feature map, obtain the hand 3D mesh, and extract the face and facial organ positions in the image;
[0008] Step 2: Use the camera to collect video information and decode it into RGB images frame by frame;
[0009] Step 3: Use the hand key skeleton detection model to detect the hand position and joint skeleton in the RGB image and crop them; use the face and key point detection model to detect the face in the image and extract the key point position;
[0010] Step 4: According to the hand position and face position obtained in step 3, determine whether the object information to be detected is detected in step 3 respectively. If the object information to be detected is detected, calculate and determine the display angle and position of the hand in the display area; otherwise, return to step 2;
[0011] Step 5: Input the feature values of the hand image and joint skeleton into the hand 3D mesh generation model, convert the joint skeleton feature map into a thermal feature map through the Gaussian distribution algorithm, provide it to the face and key point detection model and output the hand 3D mesh;
[0012] Step 6: Adjust the angle of the three-dimensional mesh of the hand, render it into a three-dimensional model, and display it at the display area position calculated in step 4.
[0013] Based on the above technical solution, the present invention can also make the following improvements.
[0014] Optionally, the deep learning method used in step 1 constructs a joint skeleton detection model based on a convolutional neural network, and the hand joint skeleton in step 1 includes the elbow, the fingertips of each finger, and the finger joints.
[0015] Optionally, in step 1, the input of the hand three-dimensional mesh generation model is the hand joint skeleton feature map obtained in step 1, the hand joint skeleton feature map is converted into a heat map feature using a Gaussian distribution algorithm, and the deep features are extracted using a deep residual graph convolutional neural network to obtain the hand three-dimensional mesh structure.
[0016] Optionally, in step 3, when using the face and key point detection model to detect the face in the image and extract the key point positions, if the key point positions cannot be extracted, empty data is output and provided to subsequent steps.
[0017] Optionally, in step 3, the hand joint skeleton detection model constructed in step 1 is used to extract the hand position and joint skeleton feature points in the image. If the feature points of the hand joint skeleton are detected, the maximum rectangular hand bounding box containing all the feature points is calculated, and the original image is cropped according to the coordinates of the bounding box to obtain a cropped hand image; if the feature points of the hand joint skeleton are not detected, empty data is output and provided to subsequent steps.
[0018] Optionally, in step 4, the center point of the video image is used as the position of the camera, denoted as p1, the center position coordinate point of the hand joint feature points output by the hand joint skeleton detection model is denoted as p2, the center point position of the facial features output by the face and key point detection model is denoted as p3, the distance d1 from the face to the camera is estimated based on the camera resolution and the maximum square size of the face area, the distance d2 from the hand to the camera is estimated based on the camera resolution and the maximum square size of the hand area, the two-dimensional coordinates of the three points p1, p2, and p3 are taken as the origin with the camera position as the origin, d1 is used as the z-axis coordinate of p3, and d2 is used as the z-axis coordinate of p2, the three points p1, p2, and p3 are respectively converted into three-dimensional coordinates p10, p22, and p31, and connected into a triangle in the three-dimensional coordinate system, and the angle θ between the side p10p22 and the side p22p31 in the three-dimensional coordinate system is calculated by trigonometric functions.
[0019] Optionally, in step 6, the hand is rotated according to the angle θ and then mirror-flipped to obtain a three-dimensional mesh of the hand from a human perspective, and then a three-dimensional drawing algorithm is used to render and display the hand mesh.
[0020] Furthermore, the present invention also discloses a system for reconstructing and displaying a three-dimensional hand model from a single image, which adopts any of the above-mentioned methods for reconstructing and displaying a three-dimensional hand model from a single image. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The present invention is a schematic diagram of the processing flow of a method and system for reconstructing and displaying a three-dimensional hand model from a single image.
[0022] Figure 2 A schematic diagram of the hand joint skeleton of a method and system for reconstructing and displaying a three-dimensional hand model from a single image according to the present invention.
[0023] Figure 3 A schematic diagram of a three-dimensional hand mesh of a method and system for reconstructing and displaying a three-dimensional hand model from a single image of the present invention. DETAILED DESCRIPTION
[0024] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0025] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0026] Figure 1 A schematic diagram of the processing flow of a method and system for reconstructing and displaying a three-dimensional hand model from a single image provided by the present invention, such as Figure 1 As shown, the present embodiment discloses a method for reconstructing and displaying a three-dimensional hand model from a single image.
[0027] It includes the following steps:
[0028] Step 1: Use deep learning to build a hand skeleton detection model, a hand 3D mesh generation model, and a face and key point detection model, which are used to detect the hand based on an RGB image and obtain the hand joint skeleton feature map, obtain the hand 3D mesh, and extract the face and facial organ positions in the image;
[0029] Step 2: Use the camera to collect video information and decode it into RGB images frame by frame;
[0030] Step 3: Use the hand key skeleton detection model to detect the hand position and joint skeleton in the RGB image and crop them; use the face and key point detection model to detect the face in the image and extract the key point position;
[0031] Step 4: According to the hand position and face position obtained in step 3, determine whether the object information to be detected is detected in step 3 respectively. If the object information to be detected is detected, calculate and determine the display angle and position of the hand in the display area; otherwise, return to step 2;
[0032] Step 5: Input the feature values of the hand image and joint skeleton into the hand 3D mesh generation model, convert the joint skeleton feature map into a thermal feature map through the Gaussian distribution algorithm, provide it to the face and key point detection model and output the hand 3D mesh;
[0033] Step 6: Adjust the angle of the three-dimensional mesh of the hand, render it into a three-dimensional model, and display it at the display area position calculated in step 4.
[0034] It can be understood that in this embodiment, a single RGB image is used to extract the three-dimensional mesh of the hand, so that in the hand modeling task, the shortcomings of the previous methods such as complex acquisition and cumbersome processes are overcome, and the running speed is fast and the computing resource requirements are relatively low. In addition, the multi-stage modeling and training method involved in the patent of this invention helps the model to better learn the features in the data and enhance the accuracy of the model. In addition, the patent of this invention combines face detection and a determined display method to achieve digital synchronization of human hands, which is more in line with human operation modes and can provide a more immersive digital experience. In the application scenarios of the technology, high-efficiency, low-cost, energy-saving and environmentally friendly contactless gesture control of digital content can be achieved.
[0035] The deep learning method used in step 1 builds a joint skeleton detection model based on a convolutional neural network, and the hand joint skeleton in step 1 includes the elbow, the fingertips of each finger, and the finger joints.
[0036] like Figure 2 As shown, Figure 2 A schematic diagram of a hand joint skeleton of a method and system for reconstructing and displaying a three-dimensional hand model from a single image of the present invention. It can be understood that in the embodiment, step 1 uses a deep learning method based on a convolutional neural network to construct a joint skeleton detection model, and the objects detected include but are not limited to the elbow, the fingertips of each finger, and the finger joints.
[0037] In step 1, the input of the hand three-dimensional mesh generation model is the hand joint skeleton feature map obtained in step 1, the hand joint skeleton feature map is converted into a heat map feature using a Gaussian distribution algorithm, and the deep feature is extracted using a deep residual graph convolutional neural network to obtain the hand three-dimensional mesh structure.
[0038] like Figure 3 As shown, Figure 3 The figure is a schematic diagram of a hand 3D mesh of a method and system for reconstructing and displaying a hand 3D model from a single image of the present invention. It can be understood that in the embodiment, the hand 3D mesh structure described refers to a set of vertices of 3D coordinates and the connection relationship between these vertices. The connection relationship between the vertices is known, so the output of the hand 3D mesh generation model only refers to a set of vertices of 3D coordinates.
[0039] In more detail, in the 3D mesh generation model of the hand, we use a deep residual network to extract 80 vertex features from the heat map features, and then input them into the graph convolutional neural network together with the features based on the prior connection relationship between the vertices. After multiple iterations, the 80 vertices are sampled into 1280 vertices to obtain the coordinates of each vertex, thereby improving the resolution of the 3D mesh and obtaining a clearer 3D mesh of the hand.
[0040] Optionally, in a possible implementation, when using the face and key point detection model to detect faces in the image and extract key point positions in step 3, if the key point positions cannot be extracted, empty data is output and provided to subsequent steps.
[0041] Optionally, in a possible implementation, in the step 3, the hand joint skeleton detection model constructed in step 1 is used to extract the hand position and joint skeleton feature points in the image. If the feature points of the hand joint skeleton are detected, the maximum rectangular hand bounding box containing all the feature points is calculated, and the original image is cropped according to the coordinates of the bounding box to obtain a cropped hand image; if the feature points of the hand joint skeleton are not detected, empty data is output and provided to subsequent steps.
[0042] It can be understood that in this implementation, when the hand joint skeleton detection model is used to extract the hand position and joint skeleton feature points in the image, there may be two situations. One is that the hand position and hand joint skeleton can be detected. At this time, it is necessary to calculate the maximum rectangular hand bounding box containing all feature points, and crop the original image according to the coordinates of the maximum rectangular hand bounding box of all the above feature points to obtain a cropped hand image; the other situation is that the feature points of the hand joint skeleton cannot be detected. At this time, there may be no detection object. At this time, empty data is output to the next step as input.
[0043] Optionally, in a possible implementation, in step 4, the center point of the video image is used as the position of the camera, denoted as p1, the center position coordinate point of the hand joint feature points output by the hand joint skeleton detection model is denoted as p2, the center point position of the facial features output by the face and key point detection model is denoted as p3, the distance d1 from the face to the camera is estimated based on the camera resolution and the maximum square size of the face area, the distance d2 from the hand to the camera is estimated based on the camera resolution and the maximum square size of the hand area, the two-dimensional coordinates of the three points p1, p2, and p3 are taken as the origin with the camera position as the origin, d1 is used as the z-axis coordinate of p3, and d2 is used as the z-axis coordinate of p2, the three points p1, p2, and p3 are respectively converted into three-dimensional coordinates p10, p22, and p31, and connected into a triangle in the three-dimensional coordinate system, and the angle θ between the side p10p22 and the side p22p31 in the three-dimensional coordinate system is calculated by trigonometric functions.
[0044] It can be understood that, in a possible implementation manner, the coordinate position of each hand joint feature point is determined by the above method, and the corresponding angle is determined, and the key points and feature points described in this embodiment can be understood equivalently.
[0045] Optionally, in a possible implementation, in step 6, a rotation is performed according to the angle θ, and then a mirror flip is performed to obtain a three-dimensional mesh of the hand from a human perspective, and then a three-dimensional drawing algorithm is used to render and display the hand mesh.
[0046] It can be understood that in a possible implementation, the angle θ calculated in the above steps is rotated and mirror-flipped, and based on the direction of human viewing angle, the display direction of the three-dimensional hand grid is adjusted to be consistent with the direction under viewing habits, and then rendered using a three-dimensional drawing algorithm to form a simulated hand image for display.
[0047] Furthermore, the present invention also discloses a system for reconstructing and displaying a three-dimensional hand model from a single image, which adopts any of the above-mentioned methods for reconstructing and displaying a three-dimensional hand model from a single image.
[0048] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0049] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0050] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0051] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0052] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0053] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for reconstructing and displaying a three-dimensional model of a hand from a single image, characterized in that: It includes the following steps: Step 1: Use deep learning to build a hand joint skeleton detection model, a hand 3D mesh generation model, and a face and key point detection model, which are used to detect the hand based on an RGB image and obtain the hand joint skeleton feature map, obtain the hand 3D mesh, and extract the face and facial organ positions in the image; Step 2: Use the camera to collect video information and decode it into RGB images frame by frame; Step 3: Use the hand joint skeleton detection model to detect the hand position and joint skeleton in the RGB image and crop them; use the face and key point detection model to detect the face in the image and extract the key point position; Step 4: According to the hand position and face position obtained in step 3, determine whether the object information to be detected is detected in step 3. If the object information to be detected is detected, calculate and determine the display angle and position of the hand in the display area; otherwise, return to step 2; Step 5: Input the feature values of the hand image and joint skeleton into the hand 3D mesh generation model, convert the joint skeleton feature map into a thermal feature map through the Gaussian distribution algorithm, provide it to the face and key point detection model and output the hand 3D mesh; Step 6: Adjust the angle of the three-dimensional mesh of the hand, render it into a three-dimensional model, and display it at the display area position calculated in step 4.
2. The method for reconstructing and displaying a three-dimensional hand model from a single image according to claim 1, characterized in that: The deep learning method used in step 1 builds a joint skeleton detection model based on a convolutional neural network, and the hand joint skeleton in step 1 includes the elbow, the fingertips of each finger, and the finger joints.
3. The method for reconstructing and displaying a three-dimensional hand model from a single image according to claim 1, characterized in that: In step 1, the input of the hand three-dimensional mesh generation model is the hand joint skeleton feature map obtained in step 1, the hand joint skeleton feature map is converted into a heat map feature using a Gaussian distribution algorithm, and the deep feature is extracted using a deep residual graph convolutional neural network to obtain the hand three-dimensional mesh structure.
4. The method for reconstructing and displaying a three-dimensional hand model from a single image according to claim 1, characterized in that: In the step 3, when the face and key point detection model is used to detect the face in the image and extract the key point positions, if the key point positions cannot be extracted, empty data is output and provided to the subsequent steps.
5. The method for reconstructing and displaying a three-dimensional hand model from a single image according to claim 1, characterized in that: In the step 3, the hand joint skeleton detection model constructed in step 1 is used to extract the hand position and joint skeleton feature points in the image. If the feature points of the hand joint skeleton are detected, the maximum rectangular hand bounding box containing all the feature points is calculated, and the cropped hand image is obtained by cropping the original image according to the coordinates of the bounding box; if the feature points of the hand joint skeleton are not detected, empty data is output and provided to the subsequent steps.
6. The method for reconstructing and displaying a three-dimensional hand model from a single image according to claim 1, characterized in that: In the step 4, the center point of the video image is taken as the position of the camera, recorded as p1, the center position coordinate point of the hand joint feature point output by the hand joint skeleton detection model is recorded as p2, and the center point position of the facial feature output by the face and key point detection model is recorded as p3. The distance d1 from the face to the camera is estimated according to the camera resolution and the maximum square size of the face area. The distance d2 from the hand to the camera is estimated according to the camera resolution and the maximum square size of the hand area. The two-dimensional coordinates of the three points p1, p2, and p3 are taken as the origin with the camera position as the origin, d1 is used as the z-axis coordinate of p3, and d2 is used as the z-axis coordinate of p2. The three points p1, p2, and p3 are respectively converted into three-dimensional coordinates p10, p22, and p31, and connected into a triangle of the three-dimensional coordinate system, and the angle θ between the side p10p22 and the side p22p31 in the three-dimensional coordinate system is calculated by trigonometric functions.
7. The method for reconstructing and displaying a three-dimensional hand model from a single image according to claim 6, characterized in that: In step 6, the hand is rotated according to the angle θ, and then mirror-flipped to obtain a three-dimensional mesh of the hand from a human perspective, and then a three-dimensional drawing algorithm is used to render and display the hand mesh.
8. A system for reconstructing and displaying a three-dimensional model of a hand from a single image, characterized in that: The system adopts a method for reconstructing and displaying a three-dimensional hand model using a single image as described in any one of claims 1 to 7.
