Pose Embeddings: A Deep Architecture for Learning to Match Human Poses

Pose Embeddings: A Deep Architecture for Learning to Match Human Poses


We present a method for learning an embedding that places images of humans in similar poses nearby. This embedding can be used as a direct method of comparing images based on human pose, avoiding potential challenges of estimating body joint positions. Pose embedding learning is formulated under a triplet-based distance criterion. A deep architecture is used to allow learning of a representation capable of making distinctions between different poses. Experiments on human pose matching and retrieval from video data demonstrate the potential of the method.


1 Introduction

Are two people in similar poses? Consider the image examples in Fig. 1. Answering this question can be done in different ways. A standard approach is to perform human pose estimation, localizing the positions of a set of body joints. Given these body joint positions, a similarity measure over poses could be defined.

As an alternative, in this paper we develop a direct method for comparing human poses, obviating the need for explicit pose estimation. We learn an embedding that aims to place images of people in similar poses near each other.

This direct embedding method possesses several advantages. First, it avoids the challenging problem of localizing individual joints. In spite of great progress in human pose estimation methods, occluded parts and unusual poses remain confounding factors. Further, pose estimation methods require choosing a representation for human pose, such as a fixed set of body part locations. The sufficiency of this representation for representing pose similarity and its utility in situations of occlusion are problematic. Finally, directly learning pose similarity permits modeling regions of pose space and learning sensitivity to pose differences of varying magnitude over this space.

Figure 1: We learn a human pose embedding space that places images of people similar poses nearby. Top: pose embeddings can be used to compare two images based on pose. Bottom: retrieval of similar pose images from a database.

Providing an automated algorithm to answer the pose similarity question enables a variety of applications. Pose search can be used in a query-by-example video retrieval setting for example: given an image of a person in a pose, find similar posed people in frames of a video collection. Group activity analysis, labeling the sets of people who are interacting in a scene, can be done based upon similarity in pose: people engaged in conversation or having a meal together tend to share commonalities in pose.

The contribution of this paper is the formulation of human pose matching as a direct learning problem based on a deep architecture. We present an algorithm for learning pose matching from simple pose similarities, potentially avoiding the need for detailed labeling of human poses when learning pose retrieval. We demonstrate the generality of these learned pose representations by transfering the learned models to pose-based video retrieval and group activity clustering.

2 Previous Work

In this paper we develop a method for learning human pose similarity.

Human pose exemplar matching: Template matching approaches have deep roots in the computer vision literature. Early work on exemplar-based matching methods for human detection and pose estimation relied on edge or silhouette detection. Gavrila [10] performed Chamfer matching of edge maps and organized human poses in a hierarchy. Mori and Malik [21] matched using shape descriptors. Shakhnarovich et al. [29] generated large volumes of synthetic exemplar images. Lin et al. [19] developed hierarchies of exemplars, represented with both shape and motion features.

Model-based pose estimation: The pictorial structure model [6] has formed the backbone for a number of successful methods for pose estimation. Ferrari et al. [7] explored the use of pictorial structure pose estimation models for pose search. Yang and Ramanan [40] extended this model to large number of small, flexibly arranged parts. Johnson and Everingham focused on challenging poses via mixture models and cleaning up training data annotations  [17]. Ionescu et al. [15] use image segmentation and model valid regions of pose space around examples. Sapp and Taskar [27] develop efficient approaches for utilizing non-tree strutured models Pishchulin et al. [24] also expand modeling ability, conditioning models on poselets [4], clustered body part examples.

Recent state of the art methods have used deep learning for pose estimation. Toshev and Szegedy [33] formulated pose estimation as a regression problem and included a coarse-to-fine strategy to refine estimates from the deep network. Tompson et al. [32] estimated individual body joint locations which are then combined in a message passing-style network.

Pose spaces: Previous work on pose spaces includes learning manifolds for human pose: methods that regressed human pose from input images. Urtasun et al. [35] pioneered the use of latent variable spaces, for example using them to track human figures in video sequences. Pavlovic [23] also focused on motion sequences, learning densities over human motions with applications to motion clustering. Agarwal and Triggs [1] formed direct regression from silhouette features to human pose. Athitsos et al. [3] form embedding spaces that permit efficient retrieval, demonstrating the ability to retrieve hand poses and signs. Taylor et al. [31] develop a convolutional neighbourhood components analysis [11] regression model, applied to head and hand pose estimation.

Activity recognition from human pose analysis: Higher-level analysis tasks such as activity recognition can directly use human pose estimation as input (e.g. [25]). Models utilizing human pose as a latent variable, estimated in the service of action recognition, include Yao and Fei-Fei [41] and Yang et al. [39] Indirect methods, looking at pixels to classify actions of people, include Ikizler et al. [14], who learn pose-based action from images obtained from internet searches.

Learning similarities: Distance function learning is a well-studied problem. Early work by Xing et al. [38] used a set of similar pairs and a set of dissimilar pairs to formulate a learning objective. Schultz and Joachims [28] work with relative comparisons of distances. The neighbourhood conponents analysis [11] model learns to minimize nearest-neighbour classification error. This was extended to a mixture of sparse distance measures by Hong et al. [13]. Weinberger and Saul [37] similarily learn distances for nearest neighbour, but with a large margin criterion. Norouzi et al. [22] learn Hamming distance in a transformed space.

Frome et al. [8, 9] did pioneering work on using triplets for learning distance functions. This was extended with deep learning for learning to categorize images by Wang et al. [36]. More broadly, novel distance learning methods have been applied to vision tasks ranging from face analysis to generic image retrieval or matching [12, 34, 20, 16].

3 Learning Pose Embeddings

Our goal is to learn an embedding that places images of humans in similar poses nearby. We pose the problem as a triplet learning problem, similar to [36]. Given a pose similarity score , where and are two human poses, we want to learn an embedding function such that


is a distance measure in the embedding space. In our work, we use the squared Euclidean distance:


We call a triplet. The triplet is used to rank the ordering of the three poses, where is a query pose and is a more similar pose than .

Similar to [36], we use the deep neural network framework to learn the embedding. The loss is the hinge loss defined on the triplet :


where is the gap parameter.

The network architecture is similar to the “inception” architecture proposed by [30]. The output of the network is normalized to produce an embedding of dimension . Each image of the triplet is processed by the network in parallel. The three embeddings are evaluted using the hinge loss 3.

The details of the network structure are summarized in Tab. 1. Input images are resized to 128x128 pixels. The first network layer consists of 7x7 convolution with rectified linear unit (ReLU) activation, max pooling over 3x3 patches with 2x2 stride, and local response normalization. This is followed by 1x1 bottleneck ReLU units, 3x3 convolution, and local response normalization. Subsequent layers perform in parallel four operations: 1x1, 3x3, and 5x5 bottleneck-convolution sequences, and spatial pooling. Pooling is either L2 aggregation keeping a fixed resolution, or max pooling over a 3x3 patch with 2x2 stride to aggregrate responses to a coarser-level representation. Bottleneck-convolution sequences utilize 2x2 strides when paired with max pooling to maintain equal spatial resolution.

This embedding approach is very efficient at test time. Each image is represented as a 128-dimensional vector embedding. This representation permits efficient search via data structures such as KD trees or hashing approaches.

Type Structure Nodes
Input 128x128 pixels
Conv 7x7 filters, 1x1 stride, ReLU
Max pooling 3x3 patch, 2x2 stride
Local response normalization
Bottleneck 1x1 ReLU
Conv 3x3 filters, 1x1 stride, ReLU
Local response normalization
Max pooling 3x3 patch, 2x2 stride
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, max pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, L2 pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, max pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, L2 pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, L2 pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, L2 pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, L2 pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, max pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, L2 pooling
Mixed 1x1, 3x3, 5x5 bottleneck-convolution ReLU, max pooling
Average pooling 5x5 filter, 1x1 stride
Embedding and normalization full connections 128
Table 1: Network structure.

We also implemented a scheme to harvest hard negatives within each mini-batch in the loss layer. For and in each triplet, we search through the minibatch to find a negative which is hard. All other images in a minibatch are considered as potential hard negatives for a given triplet. A hard negative is sampled from these images based on the embedding of the current network.

4 Experiments

We demonstrate the efficacy of our pose embedding method for retrieval. In order to train a pose embedding model we require triplets of human pose images – anchor images paired with positive (similar) and negative (dissimilar) images. A number of methods could be used to acquire such triplets, including human raters and relevance feedback from image search, among others. However, in order to allow controlled experiments we use images of humans with labeled body joints from the MPII Human Pose Dataset [2].

The MPII Human Pose Dataset contains the most diverse set of human pose-labeled images currently available as a benchmark. We utilize only the images marked as training from the MPII Human Pose Dataset – the labels for the test images are not distributed with the dataset to prevent tuning for the benchmark’s main purpose of human pose estimation evaluation.

We extracted 19919 human pose images from the MPII Human Pose Dataset, the training images which contained full, valid annotation of all body joints. A subset of 10000 human pose images was used to train our models and the remainder used for evaluation.

4.1 Training a Pose Embedding

We extract human pose images using the annotations provided in the MPII Human Pose Dataset. Each cropped human pose image is resized to 128x128 pixels. In order to train our pose embedding model, we need to provide triplets. The 2D image locations of 16 body joints are provided in the dataset. We define a distance between a pair of human pose images by measuring the average Euclidean distance between body joints after aligning the pair of poses via a translation to match the 2D torso (root) locations1.

Given this distance measure between poses, triplets were extracted by considering each one of the 10000 training images in turn. For a given “anchor” training image sets of nearby “positive” and dissimilar “negative” images are chosen. The positive set is constructed by first thresholding Euclidean distance on joints; all images with a mean joint distance less than 7 pixels are chosen as positive images. We augment this set with the 2 closest training images in order to account for poses that have larger pose variation – simpler poses such as standing people otherwise tend to dominate the set of positive images. In sum, the positive set consists of the 2 closest images to each anchor, regardless of their joint distance, plus all images within 7 pixels mean joint distance.

For the negative images, a set of up to 5000 images is chosen. Again, Euclidean distance on poses is thresholded, this time at greater than 15 pixels. The closest 5000 images with Euclidean distance on pose greater than this threshold are used as the negative set. From this set of positives and negatives, all possible pairs were constructed and used to form triplets. This resulted in a set of triplets for training the model.

Examples of triplets are shown in Fig. 2. Generally these triplets capture qualitative pose similarity, though for heavily foreshortened limbs 2d body joint locations do not necessarily lead to good similarity measurements. We believe that replacing this process with a human rater or other means to derive similar-dissimilar labels would result in higher quality training data, and at a potentially lower cost than full body joint annotation.

We also used synthetic distortions of positive and anchor images to increase the robustness of the learned model. Images were rescaled to a size uniformly sampled from the range . Translations, again uniformly sampled of image size, were also randomly chosen and applied to training images.

Network training was performed with random initialization of parameters, batch size 600, AdaGrad with an initial of learning rate 0.05.

Figure 2: Examples of triplets of poses used for training the pose embedding. First column is “anchor” image, second column is “positive” image of person in similar pose, third is “negative” image of person in a different pose.

4.2 Pose Retrieval Results

We start by quantitatively evaluating the accuracy of our pose embedding by using it to perform pose retrieval on the MPII Human Pose Dataset. The 9919 images not used for training are used for evaluation: 8000 are used as a set of known “database” images, 1919 are used as query images. For each of the query images, we use our pose embedding to find the most similar matches in the database images. We compute distance between each query and each database image based on the embedding coordinates returned by our learned model. We emphasize that the ground-truth human body joint locations are not used by our algorithm for any of these images, neither the database images nor the query images.

In order to evaluate pose retrieval results we use three different performance measures.

  • Pose Difference: We measure the pose difference between a query and each of the ranked images returned by the method. Over a rank list of length , we again use Euclidean distance over body joints and find the best matching image in the rank list.

  • Hit at -absolute: We define a threshold of 15 pixels in mean Euclidean joint distance as a “correct” match between a query image and a returned database image. The Hit at -absolute measure counts the fraction of query images that have at least one correct match in a rank list of length .

  • Hit at -relative: We define the threshold to be relative to the best possible match in the database. A “correct” match between a query image and a returned database image is one that is within pixels in mean Euclidean joint distance, where is the closest database image to a given query image.

We present results using a variety of different models, in addition to our pose embedding approach.

  • Oracle / random: In order to gauge the difficulty of the retrieval problem, we also measure performance of an oracle and random selection. The oracle method retrieves the closest matching image according to the ground truth joint positions. The random method randomly chooses an image to match a query.

  • ImageNet feature model: This baseline uses generic image features obtained from a deep network trained for image classification using the ImageNet dataset [26]. We use an Inception [30] deep architecture, a model which obtains strong performance for image classification. We take the penultimate layer of this network as a (1024 dimensional) feature vector to describe an image, and compare them using Euclidean distance.

  • Pose estimation model: We train a model using the regression-based strategy for pose estimation in the Deep Pose [33] approach as another baseline. The network is a similar Inception architecture to that used in our pose embedding. The same training data as our approach, 10000 labeled MPII pose images, are used for training the pose estimation model. Euclidean distance between 2d joint positions predicted by this model is used for retrieving images. Note that this baseline requires detailed annotation of body joint locations for training, as opposed to our pose embedding method that only requires similar-dissimilar triplets.

  • Combined pose embeddings with pose estimation: We follow a straight-forward fusion strategy to combine our pose embeddings with the output of the Deep Pose pose estimation model. The per-query distances returned by each method are normalized by the maximum distance to a database image, and the arithmetic mean of the two distances is used to fuse the distances.

Quantitative results comparing our pose embedding method with these baselines are presented in Fig. 7. We examine the three performance measures across varying sizes of rank lists. In addition to the ImageNet-trained model and pose estimation results we plot chance and oracle performance to provide context for the difficulty of the task. Our pose embedding model outperforms the ImageNet models. Qualitatively, as expected the ImageNet model returns images with similar content (e.g. cyclists), rather than focusing on human pose.

The Deep Pose model outperforms the learned pose embeddings quantitatively. However, the proposed pose embedding method is competitive, produces qualitatively very good retrieval results, and can be used with less supervision. Rank lists from our pose embedding method are shown in Fig. 8. These queries are the most confidently matched in the test set: sorted by distance to the nearest match. Further, the information provided by the pose embeddings is complementary to that of the Deep Pose model; fusing these two leads to an improvement in quantitative performance.

Fig. 3 shows qualitative comparisons of the learned pose embeddings with similarity based on pose estimation using Deep Pose [33]. Generally, both methods produce qualitatively reasonable matches. Deep pose performs very well, but has occasional difficulty with unusual poses / occlusion. Further, it requires full labeled joint positions as training data, whereas our method can be used with only similar-dissimilar labels. A common error source for the learned pose embeddings is front-back flips (matching a person facing away from the camera to one facing the camera). Adding additional training data or directly incorporating face detection-based features could remedy these mistakes.


[b]0.48 {subfigure}[b]0.48

Figure 3: Qualitative comparison of pose emebddings with similarity based on Deep Pose. First column (red border) shows query image. Second column is most similar image using Deep Pose. Third column is most similar image using learned pose embeddings.

[b]0.3 {subfigure}[b]0.3 {subfigure}[b]0.3

Figure 4: Average distance to nearest match.
Figure 5: Hit at K-absolute.
Figure 6: Hit at K-relative.
Figure 7: Quantitative results on MPII Human Pose dataset.
Figure 8: Qualitative results of pose retrieval on MPII dataset. The top 12 most confidently matched query images are shown. First column shows query image. Subsequent columns show ranked list of closest matching images based on learned pose embedding.

5 Conclusion

In this paper we presented a method for learning to match images based on the pose of the person they contain. The learning framework utilizes triplets of images and learns a deep network that separates similar images from dissimilar. Since the learned matching is based upon an embedding, it permits fast querying for similar images. We demonstrated the effectiveness of this framework in pose matching. Future work includes applying this framework with more general triplet similarity, for instance based on image search relevance feedback or human ratings of triplet similarity.


  1. We examined other measurements such as the PCP used in pose estimation, and qualitatively found simple Euclidean distance to be a superior measure for pose similarity.


  1. A. Agarwal and B. Triggs. 3d human pose from silhouettes by relevance vector regression. In CVPR, 2004.
  2. M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014.
  3. V. Athitsos, J. Alon, S. Sclaroff, and G. Kollios. Boostmap: A method for efficient approximate similarity rankings. In CVPR, 2004.
  4. L. Bourdev and J. Malik. Poselets: Body part detectors trained using 3d human pose annotations. In CVPR, 2009.
  5. W. Choi, Y. Chao, C. Pantofaru, and S. Savarese. Discovering groups of people in images. In ECCV, 2014.
  6. P. F. Felzenszwalb and D. P. Huttenlocher. Pictorial structures for object recognition. International Journal of Computer Vision, 61(1):55–79, 2005.
  7. V. Ferrari, M. Marin-Jimenez, and A. Zisserman. Pose search: retrieving people using their pose. In CVPR, 2009.
  8. A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In NIPS, 2006.
  9. A. Frome, Y. Singer, F. Sha, and J. Malik. Learning globally-consistent local distance functions for shape-based image retrieval and classification. In ICCV, 2007.
  10. D. M. Gavrila. Pedestrian detection from a moving vehicle. In ECCV, 2000.
  11. J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In NIPS, 2004.
  12. M. Guillaumin, J. J. Verbeek, and C. Schmid. Multiple instance metric learning from automatically labeled bags of faces. In ECCV, 2010.
  13. Y. Hong, Q. Li, J. Jiang, and Z. Tu. Learning a mixture of sparse distance metrics for classification and dimensionality reduction. In ICCV, 2011.
  14. N. Ikizler-Cinbis, R. G. Cinbis, and S. Sclaroff. Learning actions from the web. In Computer Vision, 2009 IEEE 12th International Conference on, pages 995–1002. IEEE, 2009.
  15. C. Ionescu, F. Li, , and C. Sminchisescu. Latent structured models for human pose estimation. In ICCV, 2011.
  16. P. Jain, B. Kulis, and K. Grauman. Fast image search for learned metrics. In CVPR, 2008.
  17. S. Johnson and M. Everingham. Learning effective human pose estimation from inaccurate annotation. In CVPR, 2011.
  18. A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In CVPR, 2014.
  19. Z. Lin, Z. Jiang, and L. S. Davis. Recognizing actions by shape-motion prototype trees. In Computer Vision, 2009 IEEE 12th International Conference on, pages 444–451. IEEE, 2009.
  20. T. Mensink, J. J. Verbeek, F. Perronnin, and G. Csurka. Distance-based image classification: Generalizing to new classes at near-zero cost. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(11):2624–2637, 2013.
  21. G. Mori and J. Malik. Estimating human body configurations using shape context matching. In ECCV, 2002.
  22. M. Norouzi, D. J. Fleet, and R. Salakhutdinov. Hamming distance metric learning. In NIPS, 2012.
  23. V. Pavlovic. Model-based motion clustering using boosted mixture modeling. In CVPR, 2004.
  24. L. Pishchulin, M. Andriluka, P. Gehler, , and B. Schiele. Poselet conditioned pictorial structures. In CVPR, 2013.
  25. D. Ramanan and D. A. Forsyth. Automatic annotation of everyday movements. In NIPS, 2003.
  26. O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 2015.
  27. B. Sapp and B. Taskar. Modec: Multimodal decomposable models for human pose estimation. In CVPR, 2013.
  28. M. Schultz and T. Joachims. Learning a distance metric from relative comparisons. In NIPS, 2003.
  29. G. Shakhnarovich, P. Viola, and T. Darrell. Fast pose estimation with parameter sensitive hashing. In ICCV, 2003.
  30. C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In arXiv, 2014.
  31. G. W. Taylor, R. Fergus, G. Williams, I. Spiro, and C. Bregler. Pose-sensitive embedding by nonlinear nca regression. In NIPS, 2010.
  32. J. Tompson, A. Jain, Y. LeCun, and C. Bregler. Joint training of a convolutional network and a graphical model for human pose estimation. In NIPS, 2014.
  33. A. Toshev and C. Szegedy. Deeppose: Human pose estimation via deep neural networks. In CVPR, 2014.
  34. T. Tuytelaars, M. Fritz, K. Saenko, and T. Darrell. The nbnn kernel. In ICCV, 2011.
  35. R. Urtasun, D. J. Fleet, and P. Fua. 3d people tracking with gaussian process dynamical models. In CVPR, 2006.
  36. J. Wang, Y. Song, T. Leung, C. Rosenberg, J. Wang, J. Philbin, B. Chen, and Y. Wu. Learning fine-grained image similarity with deep ranking. In CVPR, 2014.
  37. K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009.
  38. E. P. Xing, A. Y. Ng, M. I. Jordan, and S. J. Russell. Distance metric learning with application to clustering with side-information. In NIPS, 2002.
  39. W. Yang, Y. Wang, and G. Mori. Recognizing human actions from still images with latent poses. In CVPR, 2010.
  40. Y. Yang and D. Ramanan. Articulated pose estimation using flexible mixtures of parts. In Computer Vision and Pattern Recognition (CVPR), 2011.
  41. B. Yao and L. Fei-Fei. Modeling mutual context of object and human pose in human-object interaction activities. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, 2010.
This is a comment super asjknd jkasnjk adsnkj
The feedback cannot be empty
Comments 0
The feedback cannot be empty
Add comment

You’re adding your first comment!
How to quickly get a good reply:
  • Offer a constructive comment on the author work.
  • Add helpful links to code implementation or project page.