CN114387445A - Object key point identification method and device, electronic equipment and storage medium - Google Patents

Object key point identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114387445A
CN114387445A CN202210037666.9A CN202210037666A CN114387445A CN 114387445 A CN114387445 A CN 114387445A CN 202210037666 A CN202210037666 A CN 202210037666A CN 114387445 A CN114387445 A CN 114387445A
Authority
CN
China
Prior art keywords
virtual
camera
image
determining
virtual object
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.)
Withdrawn
Application number
CN202210037666.9A
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.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime 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 Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN202210037666.9A priority Critical patent/CN114387445A/en
Publication of CN114387445A publication Critical patent/CN114387445A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure relates to an object key point identification method and apparatus, an electronic device, and a storage medium, in which an image to be identified, which is obtained by image-capturing a real object in a real scene, is input to a key point extraction model, and a plurality of key points corresponding to the real object are output. The key point extraction model is obtained by training based on a virtual training set, the virtual training set comprises at least one virtual image comprising virtual objects and at least one key point of each virtual object, and the key points are determined according to a plurality of grid body vertexes forming the virtual objects. In the embodiment of the disclosure, the key points on each virtual image can be quickly and accurately determined directly according to the vertexes of the plurality of mesh bodies forming the virtual object, and the training set determined in this way can be trained to obtain a key point extraction model with better effect. Furthermore, the key point extraction model realizes the accurate end-to-end identification of a plurality of key points of the real object in the image to be identified.

Description

Object key point identification method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for identifying key points of an object, an electronic device, and a storage medium.
Background
The key points refer to points which do not change with ambient light and viewing angles in the picture, and are often used as a premise in a visual task. Therefore, extracting object key points from pictures is widely used in the field of computer vision. In the related technology, the key points are extracted through an algorithm, and the accuracy of the extraction result is low.
Disclosure of Invention
The disclosure provides an object key point identification method and device, electronic equipment and a storage medium.
According to a first aspect of the present disclosure, there is provided an indoor object keypoint identification method, including:
determining an image to be identified, which is obtained by carrying out image acquisition on a real object in a real scene;
inputting the image to be recognized into a key point extraction model, and outputting a plurality of key points of a real object in the image to be recognized, wherein the key point extraction model is obtained by training based on a virtual training set, the virtual training set comprises at least one virtual image comprising a virtual object and at least one key point of the virtual object in each virtual image, and the key points are determined according to the vertexes of grid bodies forming the virtual object.
In one possible implementation, the determining of the virtual training set includes:
determining a virtual scene comprising virtual objects;
acquiring images in the virtual scene through a virtual camera to obtain at least one virtual image comprising the virtual object;
at least one keypoint of the virtual object in each of the virtual images is determined.
In one possible implementation, the determining a virtual scene including a virtual object includes:
determining a virtual object model and corresponding attribute information, wherein the virtual object model is a mesh body formed by a plurality of triangles, and the attribute information comprises appearance information;
generating a virtual scene;
and importing the virtual object model into the virtual scene according to the attribute information to obtain the virtual scene comprising the virtual object, and adjusting the virtual object model to determine the virtual object according to the attribute information.
In a possible implementation process, the acquiring, by a virtual camera, an image in the virtual scene to obtain at least one virtual image including the virtual object includes:
determining motion information of the virtual camera and/or the virtual object, wherein the motion information is used for representing a motion process of the virtual camera and/or the virtual object in the virtual scene;
in response to starting an image acquisition process, controlling the virtual camera and/or the virtual object to move according to the motion information;
and controlling the virtual camera to acquire images in the motion process of the virtual camera and/or the virtual object to obtain at least one virtual image comprising the virtual object.
In one possible implementation, the motion information includes a plurality of continuous motion frames defining positions and poses of the virtual camera and/or the virtual object;
the controlling the motion of the virtual camera and/or the virtual object according to the motion information comprises:
changing the position and pose of the virtual camera and/or the virtual object in the virtual scene from frame to frame according to a plurality of consecutive motion frames.
In one possible implementation, the determining at least one keypoint of the virtual object in each of the virtual images comprises:
determining three-dimensional coordinates of a vertex of each of the mesh bodies in the virtual object model in the virtual scene;
and projecting the three-dimensional coordinates of at least one vertex into each virtual image, and determining the corresponding two-dimensional point as a key point.
In a possible implementation, the projecting the three-dimensional coordinates of at least one of the vertices into each of the virtual images, and the determining the corresponding two-dimensional point as a key point includes:
determining pose information and parameter information of the virtual camera in response to the virtual image being acquired;
converting the three-dimensional coordinates of at least one vertex into a camera coordinate system of the virtual camera according to the attitude information of the virtual camera to obtain a camera coordinate point;
and converting the three-dimensional coordinates of at least one camera coordinate point into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
In a possible implementation process, the converting the three-dimensional coordinates of at least one vertex into the camera coordinate system of the virtual camera according to the pose information of the virtual camera to obtain the camera coordinate point includes:
determining at least one triangle of the virtual object that was rendered when the virtual image was acquired;
and converting the three-dimensional coordinates of the vertexes of each rendered triangle into a camera coordinate system of the virtual camera according to the posture information of the virtual camera to obtain camera coordinate points.
In a possible implementation process, the converting the three-dimensional coordinates of at least one of the camera coordinate points into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the two-dimensional pixel coordinate position as a key point includes:
screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within the field angle of the virtual camera;
and converting the three-dimensional coordinates of each coordinate point of the target camera into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
In a possible implementation process, the screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within a field angle of the virtual camera includes:
determining a virtual camera field angle according to the parameter information of the virtual camera;
determining an included angle between a connecting line of each camera coordinate point and an imaging origin and a camera normal;
and responding to the included angle being within the visual field angle of the virtual camera, and determining the camera coordinate point corresponding to the included angle as a target camera coordinate point.
According to a second aspect of the present disclosure, there is provided an indoor object keypoint identification apparatus, comprising:
the image determining module is used for determining an image to be identified, which is obtained by carrying out image acquisition on a real object in a real scene;
and the key point identification module is used for inputting the image to be identified into a key point extraction model and outputting a plurality of key points of a real object in the image to be identified, the key point extraction model is obtained by training based on a virtual training set, the virtual training set comprises at least one virtual image comprising a virtual object and at least one key point of the virtual object in each virtual image, and the key points are determined according to a plurality of grid body vertexes forming the virtual object.
In one possible implementation, the determining of the virtual training set includes:
determining a virtual scene comprising virtual objects;
acquiring images in the virtual scene through a virtual camera to obtain at least one virtual image comprising the virtual object;
at least one keypoint of the virtual object in each of the virtual images is determined.
In one possible implementation, the determining a virtual scene including a virtual object includes:
determining a virtual object model and corresponding attribute information, wherein the virtual object model is a mesh body formed by a plurality of triangles, and the attribute information comprises appearance information;
generating a virtual scene;
and importing the virtual object model into the virtual scene according to the attribute information to obtain the virtual scene comprising the virtual object, and adjusting the virtual object model to determine the virtual object according to the attribute information.
In a possible implementation process, the acquiring, by a virtual camera, an image in the virtual scene to obtain at least one virtual image including the virtual object includes:
determining motion information of the virtual camera and/or the virtual object, wherein the motion information is used for representing a motion process of the virtual camera and/or the virtual object in the virtual scene;
in response to starting an image acquisition process, controlling the virtual camera and/or the virtual object to move according to the motion information;
and controlling the virtual camera to acquire images in the motion process of the virtual camera and/or the virtual object to obtain at least one virtual image comprising the virtual object.
In one possible implementation, the motion information includes a plurality of continuous motion frames defining positions and poses of the virtual camera and/or the virtual object;
the controlling the motion of the virtual camera and/or the virtual object according to the motion information comprises:
changing the position and pose of the virtual camera and/or the virtual object in the virtual scene from frame to frame according to a plurality of consecutive motion frames.
In one possible implementation, the determining at least one keypoint of the virtual object in each of the virtual images comprises:
determining three-dimensional coordinates of a vertex of each of the mesh bodies in the virtual object model in the virtual scene;
and projecting the three-dimensional coordinates of at least one vertex into each virtual image, and determining the corresponding two-dimensional point as a key point.
In a possible implementation, the projecting the three-dimensional coordinates of at least one of the vertices into each of the virtual images, and the determining the corresponding two-dimensional point as a key point includes:
determining pose information and parameter information of the virtual camera in response to the virtual image being acquired;
converting the three-dimensional coordinates of at least one vertex into a camera coordinate system of the virtual camera according to the attitude information of the virtual camera to obtain a camera coordinate point;
and converting the three-dimensional coordinates of at least one camera coordinate point into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
In a possible implementation process, the converting the three-dimensional coordinates of at least one vertex into the camera coordinate system of the virtual camera according to the pose information of the virtual camera to obtain the camera coordinate point includes:
determining at least one triangle of the virtual object that was rendered when the virtual image was acquired;
and converting the three-dimensional coordinates of the vertexes of each rendered triangle into a camera coordinate system of the virtual camera according to the posture information of the virtual camera to obtain camera coordinate points.
In a possible implementation process, the converting the three-dimensional coordinates of at least one of the camera coordinate points into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the two-dimensional pixel coordinate position as a key point includes:
screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within the field angle of the virtual camera;
and converting the three-dimensional coordinates of each coordinate point of the target camera into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
In a possible implementation process, the screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within a field angle of the virtual camera includes:
determining a virtual camera field angle according to the parameter information of the virtual camera;
determining an included angle between a connecting line of each camera coordinate point and an imaging origin and a camera normal;
and responding to the included angle being within the visual field angle of the virtual camera, and determining the camera coordinate point corresponding to the included angle as a target camera coordinate point.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
In the embodiment of the disclosure, the virtual object in each virtual image is composed of the mesh body, the vertex of the mesh body can be directly used as the key point, and the key point in the virtual image can be accurately and quickly determined based on the characteristic that the vertex of the mesh body does not change with the environment and the view angle. Therefore, the key point extraction model with better effect can be trained by the training set determined in the mode. Furthermore, the key point extraction model can accurately identify a plurality of key points of the real object in the image to be identified end to end, and is favorable for improving the accuracy of identifying the key points of the object in the image.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of an indoor object keypoint identification method according to an embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a process of determining a virtual training set in accordance with an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a virtual object model in accordance with an embodiment of the present disclosure;
FIG. 4 illustrates a schematic diagram of a virtual indoor image in accordance with an embodiment of the present disclosure;
FIG. 5 illustrates a schematic diagram of virtual object key points in a virtual indoor scene according to an embodiment of the disclosure;
FIG. 6 is a schematic diagram of an indoor object keypoint identification apparatus according to an embodiment of the present disclosure;
FIG. 7 shows a schematic diagram of an electronic device in accordance with an embodiment of the disclosure;
fig. 8 shows a schematic diagram of another electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The object key point identification method of the embodiment of the disclosure can be executed by electronic equipment such as terminal equipment or a server. The terminal device may be any fixed or mobile terminal such as a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, and a wearable device. The server may be a single server or a server cluster of multiple servers. Any electronic device may implement the method for identifying key points of indoor objects according to the embodiments of the present disclosure by means of a processor calling computer-readable instructions stored in a memory.
In a possible implementation manner, the embodiment of the present disclosure may be applied to application scenarios such as key point identification of furniture, key point identification of animals, and key point identification of specific articles in an indoor scenario. The embodiment of the disclosure can also be applied to scenes of person and animal key point identification in outdoor scenes and key point identification of characteristic articles such as buildings and transportation facilities.
Fig. 1 shows a flowchart of an object keypoint identification method according to an embodiment of the present disclosure. As shown in fig. 1, the object keypoint identification method of the embodiment of the present disclosure may include the following steps S10 and S20.
And step S10, determining an image to be recognized obtained by image acquisition of a real object in a real scene.
In one possible implementation, the image to be recognized is obtained by performing image acquisition in a real scene. The image to be identified can be acquired by an image acquisition device built in or connected with the electronic equipment. Or, the image of the real object in the real scene may be acquired by an image acquisition device of another electronic device, and the acquired image is transmitted to the electronic device currently executing the object key point identification method. Alternatively, the real scene may be any real indoor scene in a residential building, a classroom, a sports stadium, a library, and any real outdoor scene in a road, a park, a cell, a field, and the like. Further, the real scene includes real objects, and the real objects may be objects such as people and animals that can move by themselves, or objects such as furniture, ornaments, food, buildings, and bus stations that are placed in any fixed manner. The image to be recognized obtained by the image acquisition device through image acquisition may include both the real object and at least part of the real scene, or only include at least part of the real scene.
And step S20, inputting the image to be recognized into a key point extraction model, and outputting a plurality of key points of the real object in the image to be recognized.
In a possible implementation manner, after the image to be recognized is determined, the image to be recognized is input into a key point extraction model obtained through pre-training, and after the key point extraction model identifies the key point of a real object in the image to be recognized, a corresponding key point identification result is output. And the key point identification result comprises a plurality of key point positions of the real object in the image to be identified. Each key point is located in a real object region in the image to be recognized. The embodiment of the disclosure can realize end-to-end extraction of the key points of the real object in the image to be identified through the key point extraction model. Meanwhile, the operating environment of the key point extraction model is an image processor (GPU), and compared with a way of performing key point identification through a Central Processing Unit (CPU) in the related art, the method greatly shortens the key point extraction time and improves the key point identification efficiency.
Optionally, the keypoint extraction model for performing keypoint extraction on the image to be recognized may be obtained by training based on a virtual training set, where the virtual training set includes at least one virtual image including a virtual object, and at least one keypoint of the virtual object in each virtual image. In the training process of the key point extraction model, the virtual image is used as a sample image, and at least one key point corresponding to the virtual object in the virtual image is used as a true value of the sample image. The virtual objects are formed by the grid bodies, and the key points of the virtual objects in each virtual image are determined according to the vertexes of the grid bodies forming the virtual objects. The mesh is used for representing the outline of the virtual object and can be composed of a plurality of closed polygons such as triangles, diamonds or rectangles. Namely, the mesh body comprises a plurality of vertexes and a plurality of connecting lines between the vertexes. Further, the electronic device performing the object keypoint recognition method of the embodiments of the present disclosure and the electronic device training the keypoint extraction model may be the same or different.
Fig. 2 shows a flow diagram of a process of determining a virtual training set according to an embodiment of the present disclosure. In one possible implementation, the virtual training set for training the keypoint extraction model according to the embodiment of the present disclosure may be determined through the following steps S30-S50. The electronic device performing this step S30-S50 may be the same as or different from the electronic device that trained the keypoint extraction model.
Step S30, determining a virtual scene including the virtual object.
In one possible implementation, a virtual indoor scene including a virtual object is first determined by an electronic device that determines a virtual training set. The virtual object may be a virtual object that can move by itself, such as a virtual character or a virtual animal generated by virtual data generation software. Alternatively, the virtual object may be any fixed object such as food, an article, or furniture. The virtual scene may be any scene generated by the virtual data generation software, such as an indoor scene in a classroom, a hospital, and a residential building, or an outdoor scene in a park, a road, and a cell. Alternatively, the virtual object and the virtual scene may be a two-dimensional object and a two-dimensional virtual scene in a two-dimensional space, or may also be a three-dimensional object and a three-dimensional virtual scene in a three-dimensional space. In the case where the virtual object is a three-dimensional object and the virtual scene is a three-dimensional virtual scene, the virtual data generation software may be a ghost engine, that is, the virtual scene and the virtual object may be generated by the ghost engine. Or, a virtual indoor scene and a virtual object can be generated through other software, and then the virtual indoor scene and the virtual object are introduced into the illusion engine to acquire images.
Optionally, in the process of generating the virtual object and the virtual scene by the virtual data generation software, a virtual object model and corresponding attribute information may be determined first, where the virtual object model is a mesh body formed by a plurality of triangles, and the attribute information includes appearance information. And regenerating a virtual scene, importing the virtual object model into the virtual scene according to the attribute information to obtain the virtual scene comprising the virtual object, and adjusting the virtual object model according to the attribute information to determine the virtual object. The appearance information and the virtual object model in the attribute information can be generated by different software or the same software. Appearance information in the attribute information is used to characterize the appearance of the virtual object. For example, material, color, texture, and the like may be included when the virtual object is an article, skin color, clothing, hair color, and the like may be included when the virtual object is a person, and hair color, texture, and the like may be included when the virtual object is an animal. The mesh body of the virtual object model is composed of a plurality of triangles and is used for representing the outline of the virtual object. When the virtual object is a two-dimensional object, each triangle is a plane image formed by three two-dimensional coordinate points in a two-dimensional coordinate system, and a plurality of triangles are connected to form a two-dimensional object outline. When the virtual object is a three-dimensional object, each triangle is a plane image formed by three-dimensional coordinate points in a three-dimensional coordinate system, and a plurality of triangles are connected to form a three-dimensional object outline. And after the virtual object model is imported into the virtual scene, the virtual object in the virtual scene adjusts the model style of the virtual object according to the attribute information to determine. For example, when the virtual object is a human object, the virtual object model is imported into a virtual scene, and attributes such as a hair region color, a clothing region color, and a skin region color on the virtual object model are adjusted according to the attribute information to obtain the virtual object and the virtual scene including the virtual object.
Further, the attribute information may include other attribute information such as an object type, position information, and posture information of the virtual object, in addition to the appearance attribute of the virtual object. The object type is used for representing the object type to which the virtual object belongs, the position information is used for representing the position of the virtual object in the virtual scene, and the posture information is used for representing the posture of the virtual object in the virtual scene. Or, the attribute information may further include object motion information of the virtual object, where the object motion information includes a plurality of position information and corresponding posture information having an order, and is used to control the virtual object to move in the virtual scene.
FIG. 3 shows a schematic diagram of a virtual object model according to an embodiment of the present disclosure. As shown in fig. 3, the virtual object model 30 is composed of a plurality of triangles, wherein, when the virtual object model 30 is a three-dimensional model, three sides of each triangle are common sides shared by other triangles, and together form a closed three-dimensional virtual object model 30.
Further, when the virtual scene is a virtual indoor scene, in order to improve the reality of the virtual indoor scene, the virtual indoor scene may include an illumination system and at least one indoor device. Wherein at least one of a directional light source, a rectangular light source and a reflective light source may be comprised in the illumination system. The directional light source can be used as a main light source in a virtual indoor scene, such as an indoor ceiling light source, an opened television screen and any indoor equipment capable of emitting light. The rectangular light source is a light source which diffuses and reflects from the outside through a window into the inside of the room. The reflective light source may be at least one indoor device capable of reflecting a directional or rectangular light source, such as a mirror, glass, stainless steel, and the like. Alternatively, each light source in the illumination system may have a corresponding intensity and color.
In one possible implementation, the virtual indoor scene may include at least one indoor device such as a door, a window, a wall, a floor, furniture, and a furniture. Each piece of indoor equipment may have a corresponding material, including at least one adjustable material parameter such as background color, metallic feel, and roughness. Therefore, the process of generating the virtual indoor scene may be to generate an initial virtual scene composed of at least one indoor device, then adjust material parameters of each indoor device, and add an illumination system to the initial virtual scene to obtain the virtual scene. The method comprises the steps of firstly generating an initial virtual scene comprising at least one indoor device in a mode of modeling through virtual data generation software or selecting a preset model, then adjusting the appearance of each indoor device by adjusting material parameters such as ground color, metal feeling and roughness of each indoor device, determining a directional light source, a rectangular light source and a reflective light source according to the function and the material of each indoor device, and adjusting the intensity and the color of each light source to increase an illumination system to obtain the virtual indoor scene. After a virtual indoor scene with an illumination system and including at least one indoor device is generated, a virtual object model is led into the virtual indoor scene to obtain the virtual indoor scene including a virtual object.
Further, each indoor device in the virtual indoor scene may be a virtual object, that is, each indoor device may also be composed of a plurality of triangles or other polygons.
Further, when the virtual scene is an outdoor scene, the virtual scene may include outdoor devices such as buildings, vehicles, transportation facilities, and plants. Each outdoor unit may also be represented by a grid of triangles or other polygons. Meanwhile, like the indoor devices, each outdoor device may also have corresponding attribute information, such as adjustable attributes of color, material, brightness, roughness, and the like. Optionally, to improve the reality of the virtual outdoor scene, the virtual outdoor scene may also include an illumination system having at least one light source, such as a main light source simulating sunlight and a directional light source simulating street lamps, vehicle lights, lights of a display screen on a building, lights exposed from a window of a building, and the like. Therefore, the process of generating the virtual outdoor scene may be to generate a virtual initial scene composed of at least one outdoor device, then adjust the attribute of each outdoor device, and add an illumination system to the initial virtual scene to obtain the virtual outdoor scene.
Optionally, the virtual object model, the attribute information, and the virtual scene in the embodiment of the present disclosure may be arbitrarily replaced during each image acquisition, so as to increase the types of samples in the acquired virtual training set by performing image acquisition on different scenes and objects, thereby obtaining a virtual training set with rich types. In addition, because a large number of training images of the indoor scene are difficult to acquire, the virtual scene is established in a virtual simulation mode to acquire the training images, so that a training set can be conveniently acquired, the training efficiency and accuracy are improved, and the image acquisition cost is reduced.
Step S40, acquiring an image in the virtual scene through a virtual camera to obtain at least one virtual image including the virtual object.
In one possible implementation, after determining the virtual scene including the virtual object, image acquisition may be performed by a virtual camera in the virtual scene to shoot the virtual object in the virtual scene to obtain at least one virtual image including the virtual object. The virtual camera can be controlled to move in the image acquisition process in order to ensure that multiple virtual objects with different angles and postures are acquired quickly in a short time and multiple virtual images with different backgrounds are acquired, and image acquisition is carried out in the movement process. Alternatively, virtual scene changes and/or virtual object motion may also be controlled during image acquisition.
Optionally, the process of virtual image acquisition may include determining motion information of the virtual camera and/or the virtual object, the motion information being used to characterize the course of motion of the virtual camera and/or the virtual object in the virtual scene. In response to starting the image acquisition process, the virtual camera and/or the virtual object is controlled to move according to the motion information. And controlling the virtual camera to acquire images in the motion process of the virtual camera and/or the virtual object to obtain at least one virtual image comprising the virtual object. Optionally, each image acquired during the movement of the virtual camera may be directly used as a virtual image, or at least one frame may be extracted from the images acquired during the movement of the virtual camera as a virtual image, that is, the acquisition of the virtual image includes continuously acquiring a plurality of images in a virtual scene by the virtual camera, and extracting at least one frame of image from the plurality of images acquired by the virtual camera as a virtual image according to a preset frequency.
Based on the mode, a plurality of training images can be rapidly acquired in the moving process of the virtual camera and/or the virtual object, and the image acquisition speed is improved.
In one possible implementation, the motion information includes a plurality of continuous motion frames defining a virtual camera position and pose. Wherein each motion frame is used to define a fixed camera position and camera pose, which may include the coordinates of the virtual camera in the virtual indoor space and the degree of rotation of the virtual camera in the virtual indoor space. A plurality of successive motion frames constitute a continuous animation for controlling the motion of the camera. Controlling the motion of the virtual camera in accordance with the motion information includes changing the position and pose of the virtual camera in the virtual indoor scene from frame to frame in accordance with a plurality of consecutive motion frames. That is, the virtual camera is moved frame by frame according to the motion information after the start of image capturing, and the attitude of the virtual camera is changed in the process of starting to move the virtual camera to the corresponding position according to each action frame. Optionally, when the virtual camera moves to the position indicated by the current motion frame, the gesture is exactly the gesture indicated by the current motion frame. Further, each motion frame also has corresponding duration information for characterizing the time it takes for the virtual camera to move from the previous motion frame to the current motion frame.
Optionally, the motion information includes a plurality of continuous motion frames for defining the position and orientation of the virtual object in addition to a plurality of continuous motion frames for defining the position and orientation of the virtual camera. The electronic device may also control the virtual object motion according to a plurality of continuous motion frames defining the virtual object position and pose while controlling the virtual camera motion according to the continuous motion frames defining the virtual camera position and pose. Alternatively, only a plurality of continuous motion frames for defining the position and posture of the virtual object may be included in the motion information. The electronic device can control the virtual object to move only according to the motion information and control the virtual camera to acquire images in the process of the movement of the virtual object.
In a possible implementation manner, the process of controlling the movement of the virtual camera and/or the virtual object according to the embodiment of the disclosure may also be a preset movement track, and the virtual camera and/or the virtual object is controlled to move according to the movement track. That is, the virtual camera and/or the virtual object may change the position and posture in the virtual space according to the movement trajectory.
Further, in the image acquisition process, in order to enrich the types of the acquired samples, in addition to the movement of the virtual camera and/or the virtual object, the virtual scene can be changed in the image acquisition process. For example, a plurality of virtual scenes may be set in advance, and the display time period of each virtual scene may be set. After the image acquisition process is started, sequentially displaying the virtual scenes according to the corresponding display duration, and replacing the next virtual scene after the display time of each virtual scene meets the display duration.
FIG. 4 shows a schematic diagram of a virtual image according to an embodiment of the present disclosure. As shown in fig. 4, in the case that the virtual scene is a virtual indoor scene, the virtual image 40 collected by the embodiment of the present disclosure includes a part of the virtual indoor scene, which has a corresponding lighting system, an indoor device, and a virtual object. Optionally, the virtual object may be predetermined before image acquisition according to requirements, for example, a tray on the desktop may be selected as the virtual object, so as to acquire an image including the tray in the virtual indoor scene by the virtual camera to obtain the virtual image 40. Or selecting virtual equipment such as sofas as virtual objects in advance, and acquiring images including the sofas in the virtual indoor scene through the virtual camera to obtain the virtual images 40.
Step S50, determining at least one key point of the virtual object in each of the virtual images.
In one possible implementation manner, at least one key point of the virtual object in each virtual image is determined, so as to further determine a virtual training set according to the virtual image and the corresponding key point for model training. The key points corresponding to the virtual objects in the virtual image can be determined by projecting the mesh body vertexes of the virtual objects in the virtual scene to the virtual image. For example, when the virtual object is a three-dimensional object, the manner of determining at least one key point of the virtual object in each virtual image may be that a three-dimensional coordinate of a vertex of each mesh in the virtual object model in the virtual scene is determined, then the three-dimensional coordinate of the at least one vertex is projected into each virtual image, and the corresponding two-dimensional point after projection is determined as the key point.
Fig. 5 shows a schematic diagram of a virtual object key point in a virtual scene according to an embodiment of the present disclosure. As shown in fig. 5, in the case that the virtual scene is a virtual indoor scene 50, a plurality of objects such as a plurality of indoor devices and at least one virtual object are included in the virtual indoor scene 50, and the virtual object and the indoor devices are represented by a mesh body composed of a plurality of triangles, that is, each virtual object and indoor device corresponds to a point cloud data composed of a plurality of triangle vertices 51. When determining that the virtual image corresponds to the key point of the virtual object, point cloud data corresponding to the virtual object is extracted from a plurality of vertexes 51 included in the virtual indoor scene 50 to obtain a plurality of vertexes 51 of the virtual object. Optionally, the extraction process of the point cloud data of the virtual object may be implemented according to the position of the virtual object, that is, a plurality of vertices 51 of the virtual object in the virtual indoor scene 50 are directly obtained, where the position of the virtual object is preset when the virtual object is introduced into the virtual indoor scene 50. Further, the positions of the plurality of vertices 51 corresponding to the virtual object may be represented by three-dimensional coordinates in the world coordinate system.
In a possible implementation manner, the process of projecting at least one vertex corresponding to the virtual object into the virtual image to obtain the key point may be determined according to the internal parameters and the external parameters of the virtual camera during the virtual image acquisition. The external parameters of the virtual camera can be determined according to the attitude information of the virtual camera, and comprise three displacement offsets and three angle offsets of the virtual camera in a world coordinate system. The internal parameters can be determined according to parameter information preset by the virtual camera, and comprise a focal length, an imaging origin and a distortion coefficient of the virtual camera.
That is, pose information and parameter information for the virtual camera may be determined in response to the virtual image being captured. And converting the three-dimensional coordinates of at least one vertex into a camera coordinate system of the virtual camera according to the attitude information of the virtual camera to obtain a camera coordinate point. And converting the three-dimensional coordinates of at least one camera coordinate point into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
Optionally, since the virtual image acquired by the virtual camera is a two-dimensional image, a partial region in the acquired virtual object may be blocked, and the region cannot be identified from the two-dimensional image. Therefore, in the process of projecting the vertex to the virtual image, vertex screening may be performed first, the vertex corresponding to the occluded part of the virtual object in the current virtual image is deleted, only the vertex corresponding to the unoccluded part of the virtual object acquired by the current virtual image is determined, and then the key point of the virtual object in the virtual image is determined according to the vertex corresponding to the unoccluded part. Optionally, in a case that the mesh volume of the virtual object is composed of a plurality of triangles, the vertex screening process may include determining at least one triangle that is rendered by the virtual object when the virtual image is acquired, and converting the three-dimensional coordinates of the vertex of each rendered triangle into the camera coordinate system of the virtual camera according to the pose information of the virtual camera, so as to obtain the camera coordinate point. Further, key points of the virtual object in the virtual image are determined according to the plurality of camera coordinate points. The screening process may delete vertices of triangles in areas where the virtual object is not rendered, i.e., delete vertices of occluded portions.
In a possible implementation manner, the embodiment of the present disclosure may perform coordinate transformation on a pair of vertices by the following formula to obtain a camera coordinate point in a camera coordinate system.
Figure BDA0003468648550000111
Wherein,
Figure BDA0003468648550000112
is the corresponding camera coordinate point of the triangle vertex in the camera coordinate system, R is the rotation vector of the virtual camera in the world coordinate system, and T is the translation direction of the virtual camera in the world coordinate systemThe amount of the compound (A) is,
Figure BDA0003468648550000113
is the coordinate of the triangle vertex in the world coordinate system.
Further, when the virtual camera captures a virtual image, there is a case where only a partial region of the virtual object can be acquired, that is, a part of the virtual object is captured by the virtual camera and another part is not captured by the virtual camera. Optionally, after at least one camera coordinate point is determined, the embodiment of the present disclosure may obtain, by screening, a camera coordinate point corresponding to a vertex in a virtual object region included in the virtual image according to the parameter information of the virtual camera and each camera coordinate point, and determine a key point of the virtual object in the virtual image according to the camera coordinate point. Optionally, the process of screening the camera coordinate points and determining the key points of the virtual object in the virtual image according to the camera coordinate points may include screening each camera coordinate point according to parameter information of the virtual camera to obtain a target camera coordinate point within a field angle of the virtual camera. And converting the three-dimensional coordinates of the coordinate points of each target camera into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point. Wherein the field angle is the field range of the virtual camera.
In a possible implementation manner, the process of screening each camera coordinate point according to the parameter information of the virtual camera to obtain the target coordinate point may include determining a virtual camera field angle according to the parameter information of the virtual camera, and then determining an included angle between a connecting line of each camera coordinate point and the imaging origin and a camera normal; and when the included angle corresponding to the camera coordinate point is within the field angle of the virtual camera, judging that the position of the camera coordinate point is in the virtual image acquired by the virtual camera. And when the included angle corresponding to the camera coordinate point is not in the field angle of the virtual camera, judging that the position of the camera coordinate point is not in the virtual image acquired by the virtual camera. Accordingly, in response to the angle being within the virtual camera field angle, the camera coordinate point corresponding to the angle may be determined to be the target camera coordinate point. The camera coordinate point is deleted in response to the included angle not being within the virtual camera field angle. The parameter information corresponding to the virtual camera may further include a preset field angle in addition to the angle, the imaging origin and the distortion coefficient, that is, the field angle of the virtual camera is directly obtained from the parameter information. The camera normal is a line through the imaging origin and perpendicular to the virtual camera imaging plane.
Further, after at least one target camera coordinate point is determined, the three-dimensional coordinates of each target camera coordinate point are converted into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and the position of the two-dimensional pixel coordinates is determined as a key point. Optionally, in the embodiment of the present disclosure, the coordinate of the target camera coordinate point may be transformed by the following formula, so as to obtain a key point at the two-dimensional pixel coordinate position.
Figure BDA0003468648550000121
Wherein, Xc、Yc、ZcRespectively, the three-dimensional coordinates of the coordinate point of the target camera in the camera coordinate system, fxAnd fyCharacterizing the focal length of the virtual camera (u)0,v0) And (u, v) is the two-dimensional pixel coordinate of the corresponding key point of the target camera coordinate in the virtual image.
By means of the method for obtaining the two-dimensional pixel coordinates through the virtual object vertex mapping, the positions of the key points of the virtual objects can be quickly and accurately determined when the virtual camera collects each virtual image. Further, each virtual image may be used as a sample image, at least one keypoint corresponding to each virtual image is used as a true value of the sample image to determine a virtual training set, and the keypoint extraction model is trained according to the virtual training set. In the training process, inputting a virtual image serving as a sample image into a key point extraction model, calculating the loss of the key point extraction model according to the predicted key point position output by the key point extraction model and the real key point position corresponding to the virtual image in the virtual training set, and adjusting the key point extraction model according to the loss until the convergence condition is met.
The embodiment of the disclosure can be applied to a scene in which the key points of indoor objects are collected and extracted through smart homes for object recognition, for example, a sweeping robot collects indoor images and extracts key points to judge garbage in the indoor images, removes the indoor objects in the case that the indoor objects are garbage, and bypasses the indoor objects when the indoor objects are animals or human objects. Or, the method can also be applied to automatic driving, for example, a front image is collected by an automatic driving vehicle and key points of an object are extracted, visual navigation is carried out according to the key points, or the object is identified and corresponding actions are executed according to the object category. When the object is identified according to the key points, the automatic driving vehicle can bypass when the object is identified to be the vehicle; the autonomous vehicle may stop waiting or the like when recognizing that the object is a pedestrian. Or, the method can also be applied to application scenarios such as recognizing feature points of the same object in a plurality of images and splicing the plurality of images according to the same feature points.
According to the embodiment of the disclosure, a large number of virtual images of different types and different angles can be rapidly acquired in the above manner, and the virtual training set is ensured to have abundant sample quantity and sample types. Meanwhile, the true value of each virtual image is accurately determined in a virtual object vertex mapping mode, and the accuracy of the true value of each virtual image in the virtual training set is guaranteed. And further, a key point extraction model with high accuracy can be obtained through training by the virtual training set, and the key points of the real object in the image to be recognized can be determined end to end by the key point extraction model. In addition, the efficiency of object identification and key point extraction is improved because the operating environment of the key point extraction model is in the image processor.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides an indoor object key point identification apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any indoor object key point identification method provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method section are referred to and are not described again.
Fig. 6 shows a schematic diagram of an indoor object keypoint identification apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the indoor object keypoint identification apparatus of the embodiment of the present disclosure may include an image determination module 60 and a keypoint identification module 61.
An image determining module 60, configured to determine an image to be identified, which is obtained by performing image acquisition on a real object in a real scene;
the keypoint identification module 61 is configured to input the image to be identified into a keypoint extraction model, and output a plurality of keypoints of the real object in the image to be identified, where the keypoint extraction model is obtained by training based on a virtual training set, the virtual training set includes at least one virtual image including a virtual object and at least one keypoint of the virtual object in each virtual image, and the keypoints are determined according to a plurality of mesh body vertices constituting the virtual object.
In one possible implementation, the determining of the virtual training set includes:
determining a virtual scene comprising virtual objects;
acquiring images in the virtual scene through a virtual camera to obtain at least one virtual image comprising the virtual object;
at least one keypoint of the virtual object in each of the virtual images is determined.
In one possible implementation, the determining a virtual scene including a virtual object includes:
determining a virtual object model and corresponding attribute information, wherein the virtual object model is a mesh body formed by a plurality of triangles, and the attribute information comprises appearance information;
generating a virtual scene;
and importing the virtual object model into the virtual scene according to the attribute information to obtain the virtual scene comprising the virtual object, and adjusting the virtual object model to determine the virtual object according to the attribute information.
In a possible implementation process, the acquiring, by a virtual camera, an image in the virtual scene to obtain at least one virtual image including the virtual object includes:
determining motion information of the virtual camera and/or the virtual object, wherein the motion information is used for representing a motion process of the virtual camera and/or the virtual object in the virtual scene;
in response to starting an image acquisition process, controlling the virtual camera and/or the virtual object to move according to the motion information;
and controlling the virtual camera to acquire images in the motion process of the virtual camera and/or the virtual object to obtain at least one virtual image comprising the virtual object.
In one possible implementation, the motion information includes a plurality of continuous motion frames defining positions and poses of the virtual camera and/or the virtual object;
the controlling the motion of the virtual camera and/or the virtual object according to the motion information comprises:
changing the position and pose of the virtual camera and/or the virtual object in the virtual scene from frame to frame according to a plurality of consecutive motion frames.
In one possible implementation, the determining at least one keypoint of the virtual object in each of the virtual images comprises:
determining three-dimensional coordinates of a vertex of each of the mesh bodies in the virtual object model in the virtual scene;
and projecting the three-dimensional coordinates of at least one vertex into each virtual image, and determining the corresponding two-dimensional point as a key point.
In a possible implementation, the projecting the three-dimensional coordinates of at least one of the vertices into each of the virtual images, and the determining the corresponding two-dimensional point as a key point includes:
determining pose information and parameter information of the virtual camera in response to the virtual image being acquired;
converting the three-dimensional coordinates of at least one vertex into a camera coordinate system of the virtual camera according to the attitude information of the virtual camera to obtain a camera coordinate point;
and converting the three-dimensional coordinates of at least one camera coordinate point into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
In a possible implementation process, the converting the three-dimensional coordinates of at least one vertex into the camera coordinate system of the virtual camera according to the pose information of the virtual camera to obtain the camera coordinate point includes:
determining at least one triangle of the virtual object that was rendered when the virtual image was acquired;
and converting the three-dimensional coordinates of the vertexes of each rendered triangle into a camera coordinate system of the virtual camera according to the posture information of the virtual camera to obtain camera coordinate points.
In a possible implementation process, the converting the three-dimensional coordinates of at least one of the camera coordinate points into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the two-dimensional pixel coordinate position as a key point includes:
screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within the field angle of the virtual camera;
and converting the three-dimensional coordinates of each coordinate point of the target camera into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
In a possible implementation process, the screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within a field angle of the virtual camera includes:
determining a virtual camera field angle according to the parameter information of the virtual camera;
determining an included angle between a connecting line of each camera coordinate point and an imaging origin and a camera normal;
and responding to the included angle being within the visual field angle of the virtual camera, and determining the camera coordinate point corresponding to the included angle as a target camera coordinate point.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a volatile or non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The disclosed embodiments also provide a computer program product comprising computer readable code or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 7 shows a schematic diagram of an electronic device 800 according to an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 7, electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 8 shows a schematic diagram of another electronic device 1900 according to an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 8, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as the Microsoft Server operating system (Windows Server), stored in the memory 1932TM) Apple Inc. of the present application based on the graphic user interface operating System (Mac OS X)TM) Multi-user, multi-process computer operating system (Unix)TM) Free and open native code Unix-like operating System (Linux)TM) Open native code Unix-like operating System (FreeBSD)TM) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to each other, and for brevity, will not be described again herein.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
If the technical scheme of the application relates to personal information, a product applying the technical scheme of the application clearly informs personal information processing rules before processing the personal information, and obtains personal independent consent. If the technical scheme of the application relates to sensitive personal information, a product applying the technical scheme of the application obtains individual consent before processing the sensitive personal information, and simultaneously meets the requirement of 'express consent'. For example, at a personal information collection device such as a camera, a clear and significant identifier is set to inform that the personal information collection range is entered, the personal information is collected, and if the person voluntarily enters the collection range, the person is regarded as agreeing to collect the personal information; or on the device for processing the personal information, under the condition of informing the personal information processing rule by using obvious identification/information, obtaining personal authorization by modes of popping window information or asking a person to upload personal information of the person by himself, and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing method, and a type of personal information to be processed.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (13)

1. An object key point identification method, characterized in that the method comprises:
determining an image to be identified, which is obtained by carrying out image acquisition on a real object in a real scene;
inputting the image to be recognized into a key point extraction model, and outputting a plurality of key points of a real object in the image to be recognized, wherein the key point extraction model is obtained by training based on a virtual training set, the virtual training set comprises at least one virtual image comprising a virtual object and at least one key point of the virtual object in each virtual image, and the key points are determined according to the vertexes of grid bodies forming the virtual object.
2. The method of claim 1, wherein the determination of the virtual training set comprises:
determining a virtual scene comprising virtual objects;
acquiring images in the virtual scene through a virtual camera to obtain at least one virtual image comprising the virtual object;
at least one keypoint of the virtual object in each of the virtual images is determined.
3. The method of claim 2, wherein determining the virtual scene comprising the virtual object comprises:
determining a virtual object model and corresponding attribute information, wherein the virtual object model is a mesh body formed by a plurality of triangles, and the attribute information comprises appearance information;
generating a virtual scene;
and importing the virtual object model into the virtual scene according to the attribute information to obtain the virtual scene comprising the virtual object, and adjusting the virtual object model to determine the virtual object according to the attribute information.
4. The method of claim 2, wherein said capturing an image in the virtual scene with a virtual camera, resulting in at least one virtual image comprising the virtual object comprises:
determining motion information of the virtual camera and/or the virtual object, wherein the motion information is used for representing a motion process of the virtual camera and/or the virtual object in the virtual scene;
in response to starting an image acquisition process, controlling the virtual camera and/or the virtual object to move according to the motion information;
and controlling the virtual camera to acquire images in the motion process of the virtual camera and/or the virtual object to obtain at least one virtual image comprising the virtual object.
5. The method according to claim 4, characterized in that a plurality of continuous motion frames for defining the position and the pose of the virtual camera and/or the virtual object are included in the motion information;
the controlling the motion of the virtual camera and/or the virtual object according to the motion information comprises:
changing the position and pose of the virtual camera and/or the virtual object in the virtual scene from frame to frame according to a plurality of consecutive motion frames.
6. The method according to any one of claims 3-5, wherein said determining at least one keypoint of said virtual object in each of said virtual images comprises:
determining three-dimensional coordinates of a vertex of each of the mesh bodies in the virtual object model in the virtual scene;
and projecting the three-dimensional coordinates of at least one vertex into each virtual image, and determining the corresponding two-dimensional point as a key point.
7. The method of claim 6, wherein projecting the three-dimensional coordinates of at least one of the vertices into each of the virtual images, determining the corresponding two-dimensional points as keypoints comprises:
determining pose information and parameter information of the virtual camera in response to the virtual image being acquired;
converting the three-dimensional coordinates of at least one vertex into a camera coordinate system of the virtual camera according to the attitude information of the virtual camera to obtain a camera coordinate point;
and converting the three-dimensional coordinates of at least one camera coordinate point into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
8. The method of claim 7, wherein transforming the three-dimensional coordinates of at least one vertex into the camera coordinate system of the virtual camera according to the pose information of the virtual camera, and obtaining the camera coordinate point comprises:
determining at least one triangle of the virtual object that was rendered when the virtual image was acquired;
and converting the three-dimensional coordinates of the vertexes of each rendered triangle into a camera coordinate system of the virtual camera according to the posture information of the virtual camera to obtain camera coordinate points.
9. The method according to claim 7 or 8, wherein the converting the three-dimensional coordinates of at least one of the camera coordinate points into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and the determining the two-dimensional pixel coordinate position as a key point comprises:
screening each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within the field angle of the virtual camera;
and converting the three-dimensional coordinates of each coordinate point of the target camera into two-dimensional pixel coordinates in the virtual image according to the parameter information of the virtual camera, and determining the position of the two-dimensional pixel coordinates as a key point.
10. The method of claim 9, wherein the filtering each camera coordinate point according to the parameter information of the virtual camera to obtain a target camera coordinate point within a virtual camera field angle comprises:
determining a virtual camera field angle according to the parameter information of the virtual camera;
determining an included angle between a connecting line of each camera coordinate point and an imaging origin and a camera normal;
and responding to the included angle being within the visual field angle of the virtual camera, and determining the camera coordinate point corresponding to the included angle as a target camera coordinate point.
11. An object keypoint identification device, characterized in that it comprises:
the image determining module is used for determining an image to be identified, which is obtained by carrying out image acquisition on a real object in a real scene;
and the key point identification module is used for inputting the image to be identified into a key point extraction model and outputting a plurality of key points of a real object in the image to be identified, the key point extraction model is obtained by training based on a virtual training set, the virtual training set comprises at least one virtual image comprising a virtual object and at least one key point of the virtual object in each virtual image, and the key points are determined according to a plurality of grid body vertexes forming the virtual object.
12. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1 to 10.
13. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 10.
CN202210037666.9A 2022-01-13 2022-01-13 Object key point identification method and device, electronic equipment and storage medium Withdrawn CN114387445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210037666.9A CN114387445A (en) 2022-01-13 2022-01-13 Object key point identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210037666.9A CN114387445A (en) 2022-01-13 2022-01-13 Object key point identification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114387445A true CN114387445A (en) 2022-04-22

Family

ID=81201737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210037666.9A Withdrawn CN114387445A (en) 2022-01-13 2022-01-13 Object key point identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114387445A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115331309A (en) * 2022-08-19 2022-11-11 北京字跳网络技术有限公司 Method, apparatus, device and medium for recognizing human body action
CN115578393A (en) * 2022-12-09 2023-01-06 腾讯科技(深圳)有限公司 Key point detection method, key point training method, key point detection device, key point training device, key point detection equipment, key point detection medium and key point detection medium
CN116071527A (en) * 2022-12-19 2023-05-05 支付宝(杭州)信息技术有限公司 Object processing method and device, storage medium and electronic equipment
CN116453222A (en) * 2023-04-19 2023-07-18 北京百度网讯科技有限公司 Target object posture determining method, training device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115331309A (en) * 2022-08-19 2022-11-11 北京字跳网络技术有限公司 Method, apparatus, device and medium for recognizing human body action
CN115578393A (en) * 2022-12-09 2023-01-06 腾讯科技(深圳)有限公司 Key point detection method, key point training method, key point detection device, key point training device, key point detection equipment, key point detection medium and key point detection medium
CN116071527A (en) * 2022-12-19 2023-05-05 支付宝(杭州)信息技术有限公司 Object processing method and device, storage medium and electronic equipment
CN116071527B (en) * 2022-12-19 2024-06-21 支付宝(杭州)信息技术有限公司 Object processing method and device, storage medium and electronic equipment
CN116453222A (en) * 2023-04-19 2023-07-18 北京百度网讯科技有限公司 Target object posture determining method, training device and storage medium
CN116453222B (en) * 2023-04-19 2024-06-11 北京百度网讯科技有限公司 Target object posture determining method, training device and storage medium

Similar Documents

Publication Publication Date Title
CN108986199B (en) Virtual model processing method and device, electronic equipment and storage medium
CN114387445A (en) Object key point identification method and device, electronic equipment and storage medium
WO2022227393A1 (en) Image photographing method and apparatus, electronic device, and computer readable storage medium
CN112199016B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN109582122B (en) Augmented reality information providing method and device and electronic equipment
US11657085B1 (en) Optical devices and apparatuses for capturing, structuring, and using interlinked multi-directional still pictures and/or multi-directional motion pictures
CN112991553B (en) Information display method and device, electronic equipment and storage medium
US11880999B2 (en) Personalized scene image processing method, apparatus and storage medium
CN110853095B (en) Camera positioning method and device, electronic equipment and storage medium
CN114445562A (en) Three-dimensional reconstruction method and device, electronic device and storage medium
WO2023051356A1 (en) Virtual object display method and apparatus, and electronic device and storage medium
CN112581571A (en) Control method and device of virtual image model, electronic equipment and storage medium
CN115439171A (en) Commodity information display method and device and electronic equipment
CN112783316A (en) Augmented reality-based control method and apparatus, electronic device, and storage medium
CN113822798B (en) Method and device for training generation countermeasure network, electronic equipment and storage medium
CN114581525A (en) Attitude determination method and apparatus, electronic device, and storage medium
CN112837372A (en) Data generation method and device, electronic equipment and storage medium
CN115907912A (en) Method and device for providing virtual trial information of commodities and electronic equipment
CN114266305A (en) Object identification method and device, electronic equipment and storage medium
EP3848894B1 (en) Method and device for segmenting image, and storage medium
WO2022151687A1 (en) Group photo image generation method and apparatus, device, storage medium, computer program, and product
CN114387622A (en) Animal weight recognition method and device, electronic equipment and storage medium
CN114638949A (en) Virtual object display method and device, electronic equipment and storage medium
CN113342162A (en) Control method and device of multimedia equipment, electronic equipment and storage medium
CN114399703A (en) Object identification method and device, electronic equipment and storage medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220422