{'fraction_non_alphanumeric': 0.03590101080515859, 'fraction_numerical': 0.0042988265365400255, 'mean_word_length': 4.386420525657071, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Motion Imitation Based on Sparsely Sampled Correspondence

Existing techniques for motion imitation often suffer a certain level of latency due to their computational overhead or a large set of correspondence samples to search. To achieve real-time imitation with small latency, we present a framework in this paper to reconstruct motion on humanoids based on sparsely sampled correspondence. The imitation problem is formulated as finding the projection of a point from the configuration space of a human's poses into the configuration space of a humanoid. An optimal projection is defined as the one that minimizes a back-projected deviation among a group of candidates, which can be determined in a very efficient way. Benefited from this formulation, effective projections can be obtained by using sparse correspondence. Methods for generating these sparse correspondence samples have also been introduced. Our method is evaluated by applying the human's motion captured by a RGB-D sensor to a humanoid in real-time. Continuous motion can be realized and used in the example application of tele-operation.


I. INTRODUCTION
Humanoid robots have been widely studied in the research of robotics. With the recent development of motion capture devices such as RGB-D camera (e.g., Kinect) and wearable sensor system (e.g., Xsens MVN), efforts have been made to generate human-like motions for humanoid robots with high degree-of-freedoms. However, directly applying captured poses of human to humanoids is difficult because of the difference in human's and humanoid's kinematics. Therefore, a variety of kinematics based approaches for humanoid imitation have been investigated, which can be classified into two categories. Many of them perform an offline optimization step to compute the corresponding configurations that conform to the mechanical structures and kinematics of humanoids from input human data [1]- [6]. It is obvious that the significant computational overhead in those techniques prevents us from applying them to real-time imitation. Methods in the other thread of research compute online imitation following captured human motion [7]- [12].
In this paper, we consider about the problem of realizing real-time human-to-humanoid motion imitation. Unfortunately, it is not an easy task due to: • full sampling of human-to-humanoid correspondence often leads to large data size;  • high non-linearity of underlying mechanical rules results in significant computational cost; • how to find the configuration of a humanoid according to the input poses of human in real-time is not intuitive.
Artificial neural networks have been adopted to ease the difficulties, with which a lot of efforts have been made in simulation and for robots with small degree-of-freedoms [13]- [21]. A recent work [17] by Stanton et al directly introduced neural networks with particle swarm optimization to find the mapping between human movements and joint angle positions of humanoid. However, there is no measurement presented in their work to evaluate the quality of humanoid poses generated by the trained neural system. On the other aspect, our method is also different from this work in terms of the training data set. We use the sparse correspondence instead of the densely recorded raw data, which can help eliminate the redundancy in data set and improve the training speed. Moreover, only requiring a sparse set of correspondence samples leads to a lower barrier of system implementation.
We propose a framework that allows efficient projection of a pose from human's space to the configuration space of humanoid based on sparsely sampled correspondence extracted from recorded raw data, which can be used to realize motion imitation in real time (see Fig. 2). Experimental results show that our framework can be successfully used in the motion imitation of humanoid (see Fig.1 for an example of teleoperation using a NAO humanoid).

A. Problem Definition
A human pose can be uniquely represented as a point (abbreviated as C-point) h ∈ R m in the configuration space (abbreviated as C-space -H) of human's motion and its corresponding pose of humanoid can be denoted as a point r ∈ R n in the C-space of humanoid -R. We assume one-toone correspondence between the poses of human body and humanoid, i.e. the mapping between human and humanoid's C-spaces is bijective. A pair of human's and humanoid's configurations is denoted as (h, r) ∈ R m+n . Given stored correspondence pairs {(h, r)} as the known knowledge and a new input pose h * ∈ R m , the configuration projection Ω(·) can be defined as finding a corresponding r * ∈ R n that satisfies two basic properties: • Identity -for any sample pair (h i , r i ) in the data-set, it should have Ω(h i ) = r i .
• Similarity -for an input C-point of human h * , if where δ and are two constant values, andr(h * ) is a C-point of humanoid that can be obtained by more accurate but computational intensive methods (e.g., inverse kinematics) as the ground truth. All sample pairs should be repeated with the projection Ω(·) according to the property of identity. The demand on similarity indicates that if a new input is close to the known samples, its projected result should not deviate too much from its corresponding ground truth.
The main difficulty of finding the projection r * lies in the lack of explicit functions to determine the mapping between two C-spaces with different dimensions (i.e., degree-offreedoms). Given sparsely aligned pairs of poses as samples, we try to solve this problem by proposing a strategy of kernel-based projection to find a good approximation for r * .

B. Data Pre-processing
The knowledge of correspondence {(h, r)} can be established through experiments. Although aligning a pose of human body with a corresponding pose of humanoid can be taken manually, it is a task almost impossible if thousands of such correspondence samples need to be specified. Therefore, in our experiments, we first capture continuous motions of human bodies by using a motion capture system. The data-set obtained in this way often results in large size and redundancy. To resolve this problem, we perform a pre-processing step to extract marker poses from the raw data-set recorded from human's motion. Specifically, mean shift clustering [22] is employed to generate the marker set denoted as H. For each sampleĥ ∈ H, its corresponding poser in the configuration space of humanoid can be either specified manually (when the number of samples in H is small) or generated automatically by a sophisticated method (e.g., the inverse kinematics methods). The pairs of correspondence, {(ĥ i ,r i )} i=1,··· ,N , extracted in this way is treated as landmarks to be used in our framework.

C. ELM Based Kernels
As the configuration pairs of marker data-set are discrete in space, we define a kernel κ(·) on each marker configuration h i andr i as a local spatial descriptor using the technique of Extreme Learning Machine (ELM) [23]. ELM method has been widely used in regression and classification problems as a single hidden layer feed-forward network (SLFN) with its advantageous properties of fast training speed, tuning-free neurons and easiness in implementation (ref. [24]). Basically, the training formula of ELM can be expressed as Hb = T, where H is the hidden layer output matrix of SLFN, b is the output weight vector to be computed, and T is the target feature vector.
Given a new input x, the prediction function of ELM is is the hidden layer feature mapping of x. It has been pointed out in [23] that the training errors will be eliminated if the number of hidden nodes is not less than the number of training samples, indicating the trained ELM can be used as a fitting function that interpolates all training samples In this case, the output weight vector is computed as [25] to improve its numerical stability, leading to the following training formula with λ (a very small value in practice) as the regularization factor With the help of ELM, a kernel κ h i (·) ∈ R n for a human's landmark pointĥ i can be built with its nearest neighbors. Specifically, we find k spatial nearest neighbors ofĥ i in the set of human's landmarks as {ĥ j } j∈N (ĥi) , where N (·) denotes the set of nearest neighbors. Then, the ELM kernel of κ h i (·) is trained using {(ĥ j ,r j )} j∈N (ĥi) , which is regarded as an approximate local descriptor of the nearby mapping of h i : H → R. When inputting a new human pose h * ∈ R m , a local estimation of mapping with reference to this kernel can be represented as This function is called a forward kernel. Similarly, for each C-point r m i of a humanoid, an ELM based kernel κ r i (·) ∈ R m can be constructed in the same way for the inverse mapping: R → H. κ r i (·) is called a backward kernel. These two types of kernel functions will be used in our framework for realizing the projection.

D. Projection
For an input pose h * ∈ R m , the point determined by the ELM kernel function, κ h i (h * ), is not guaranteed to satisfy the requirement of bijective mapping (i.e., κ r i (κ h i (h * )) = h * ). To improve the bijection of mapping, the projection of a human's C-point is formulated as determining an optimal point from all candidates generated from different forward kernels.
First of all, L nearest neighbors of h * are retrieved in H as {ĥ j } (j = 1, · · · , L). From the forward kernel associated with each of these L points in H, a candidate point in R can be determined by r c j = κ h j (h * ). For each r c j , we search for its M nearest neighbors in R as N (r c j ) = {r j,k } (k = 1, · · · , M ). In other words, there are M backward kernels associated with r c j , which are {κ r j,k }. In each cluster of backward kernels, we determine a set of weights w j,k that leads to a point formed as the convex combination of {r j,k } r c j = k w j,k r c j,k .
An optimal pointr c j minimizes the deviation of backprojection with regard to the cluster of kernels {κ r j,k (·)} k is defined as The final projected point r * is then defined as according to the cluster of N (r c l ) that gives the minimal back-projected deviation, which is a solution of The computation for solving above optimization problem can be slow in many cases. Therefore, we propose a sub-optimal objective function as a relaxation of Eq.(3) to be used in realtime applications (e.g., the tele-operation shown in Fig.1). The problem is relaxed to the solution of which can be acquired very efficiently by checking each candidate r c j with regard to all its M reference backward kernels. Figure 3 gives an illustration for the evaluation of back-projected deviation.

Motion Smoothing:
A dynamic motion is processed as a sequence of continuous poses in our system, where the projected poses in the configuration space of humanoid are generated separately. To avoid the generation of jerky motion, we use a method modified from the double exponential smoothing [26] to post-process the projected poses. Given a projected pose r t at time frame t, the update rules of a smoothed pose s t are defined as Remark: It must be clarified the Identity property introduced in Section II-A is relaxed to Ω(h i ) ≈ r i in practice due to the following reasons: • Regularized ELM method is employed to construct the kernels, which changes the corresponding energy function where a regularization term is added to improve its numerical stability. • Double exponential smoothing is applied for smoothing a motion, which introduces minor adjustments on the output values.

III. REAL-TIME PROJECTION ON NAO
Our framework is testified on real-time motion imitation of a NAO humanoid robot with a Kinect RGB-D camera as the device to capture the motion of human.

A. Human-to-humanoid Motion Imitation
The human skeleton provided by a Kinect sensor is a set of line segments based on predefined key joints as shown in Fig.4(a). We define an abstraction consisting of 19 unit vectors for a pose as illustrated in Fig.4(b), which is independent different body dimensions. It should be pointed out that it is unnecessary to always use the full set of unit vectors unless full body motion must be sensed. The NAO humanoid robot has 26 degree-of-freedoms, including the roll, pitch, and yaw of all its joints (see Fig.4(c)). Posing a NAO humanoid can be executed by specifying the values of all its degree-of-freedoms.
To collect the data-set of human's motion, a user is asked to do arbitrary motion in front of a Kinect camera. Meanwhile, we have implemented a straightforward inverse kinematics (IK) based scheme for upper-body motion. The roll, pitch, and yaw of every joint can be computed directly by the unit vectors of a human's skeleton model. After using mean shift to extract the landmarks of motion from the raw set, their corresponding landmark poses in the C-space of humanoid can be generated by this IK. Besides, we also define eight basic poses (see Fig.5) which play a critical role when evaluating the similarity between the projected poses of humanoid and the poses of human.
Using the landmark poses defined in this way, humanto-humanoid motion imitation has been implemented by a single-core C++ program. All the tests below are taken on a personal computer with Intel Core i7-3770 3.4 GHz and 8 GB RAM memory.

B. Experimental Results
We evaluate our method mainly from three perspectives, including the computational efficiency of projection, the quality of reconstructed motion, and the influence by the size of landmark set.
Efficiency of Projection: From Section II-D, we know that the complexity for computing projection depends on the size of neighbors (i.e., L and M ). The cost of computation increases with larger L and M as more candidates and more reference kernels will be involved. In all our experiments, we use L = M = 10 and the average time for making a configuration projection is 0.00273ms. When increasing to L = M = 50, the average time cost is still only 0.0201ms. In summary, the overhead of our method for motion imitation is very light -i.e., it fits well for different real-time applications.
Quality of Reconstruction: Two metrics are used in our experiments to estimate the quality of a projected configuration r * ∈ R n referring to its corresponding ground truth value r gt -the maximum absolute deviation in degree as and the average absolute deviation in degree as The evaluation is taken with a set holding 1, 644 configuration pairs as landmarks. All those eight poses shown in Fig.5 are tested, and the results are shown in Fig.6. The results of comparison (in terms of M max and M avg ) indicates that the poses generated by our method share good similarity with the ground truths. Besides of static poses, we also   Fig.7. It is easy to find that the errors are bounded to less than 10 • in all motions.
Size of Landmarks: As presented in Section II-B, the correspondence samples used to formulate projection in our framework is extracted from the captured motions. In our implementation, it is generated by a user moving in front of a Kinect sensor for 5 minutes.  comparisons shown in Fig.8, it is easy to conclude that our projection based formulation converges when the number of landmarks increases. In other words, more landmarks result in a more accurate projection. However, it should also be noted that the projection from the smaller set may still be useful in some applications with low requirement on quality but having more restrictions on speed and memory usage.

C. Application of tele-operation
We have tested the motion imitation realized by our method in an application of tele-operation using a NAO humanoid. As illustrated in Fig.1 and the supplementary video of this paper, a user can remotely control the motion of a NAO robot to grasp an object and put it into a box. The scene that can be seen from the camera of NAO is displayed on a screen placed in front of the user as the visual feedback. The imitation realized by our system has good accuracy. As a result, the tele-operation can be performed very smoothly.

IV. CONCLUSION & FUTURE WORK
In this paper, we have proposed a framework to realize motion imitation. Different from conventional methods, our method is based on a novel formulation of projection between two configuration spaces with different dimensions. Given a new input pose of human, its projection in the space of humanoid is defined as finding the optimal C-point that minimizes a back-projection deviation referring to the built kernels. We have validated our idea by reconstructing humanoid motion on a NAO robot. The experimental results are encouraging and motions of good quality can be reconstructed efficiently.
There are several potential improvements can be made to our method. First, an intuitive improvement is to extend the current setup to full-body motion reconstruction by incorporating the constraint of whole-body balance. Second, the ELM based kernels currently used in our framework do not have a explicit bound for prediction with a new input. Finding kernel functions that can provide a bound on prediction could be another future work. Lastly, we are interested in exploring more applications beyond teleoperation.