P-CNN: Pose-based CNN Features for Action Recognition

Guilhem Chéron, Ivan Laptev, Cordelia Schmid

Introduction

Recognition of human actions is an important step toward fully automatic understanding of dynamic scenes. Despite significant progress in recent years, action recognition remains a difficult challenge. Common problems stem from the strong variations of people and scenes in motion and appearance. Other factors include subtle differences of fine-grained actions, for example when manipulating small objects or assessing the quality of sports actions.

The majority of recent methods recognize actions based on statistical representations of local motion descriptors . These approaches are very successful in recognizing coarse action (standing up, hand-shaking, dancing) in challenging scenes with camera motions, occlusions, multiple people, etc. Global approaches, however, are lacking structure and may not be optimal to recognize subtle variations, e.g. to distinguish correct and incorrect golf swings or to recognize fine-grained cooking actions illustrated in Figure 6.2.

Fine-grained recognition in static images highlights the importance of spatial structure and spatial alignment as a pre-processing step. Examples include alignment of faces for face recognition as well as alignment of body parts for recognizing species of birds . In analogy to this prior work, we believe action recognition will benefit from the spatial and temporal detection and alignment of human poses in videos. In fine-grained action recognition, this will, for example, allow to better differentiate wash hands from wash object actions.

In this work we design a new action descriptor based on human poses. Provided with tracks of body joints over time, our descriptor combines motion and appearance features for body parts. Given the recent success of Convolutional Neural Networks (CNN) , we explore CNN features obtained separately for each body part in each frame. We use appearance and motion-based CNN features computed for each track of body parts, and investigate different schemes of temporal aggregation. The extraction of proposed Pose-based Convolutional Neural Network (P-CNN) features is illustrated in Figure 1.

Pose estimation in natural images is still a difficult task . In this paper we investigate P-CNN features both for automatically estimated as well as manually annotated human poses. We report experimental results for two challenging datasets: JHMDB , a subset of HMDB for which manual annotation of human pose have been provided by , as well as MPII Cooking Activities , composed of a set of fine-grained cooking actions. Evaluation of our method on both datasets consistently outperforms the human pose-based descriptor HLPF . Combination of our method with Dense trajectory features improves the state of the art for both datasets.

The rest of the paper is organized as follows. Related work is discussed in Section 2. Section 3 introduces our P-CNN features. We summarize state-of-the-art methods used and compared to in our experiments in Section 4 and present datasets in Section 5. Section 6 evaluates our method and compares it to the state of the art. Section 7 concludes the paper. Our implementation of P-CNN features is available from .

Related work

Action recognition in the last decade has been dominated by local features . In particular, Dense Trajectory (DT) features combined with Fisher Vector (FV) aggregation have recently shown outstanding results for a number of challenging benchmarks. We use IDT-FV (improved version of DT with FV encoding) as a strong baseline and experimentally demonstrate its complementarity to our method.

Recent advances in Convolutional Neural Networks (CNN) have resulted in significant progress in image classification and other vision tasks . In particular, the transfer of pre-trained network parameters to problems with limited training data has shown success e.g. in . Application of CNNs to action recognition in video, however, has shown only limited improvements so far . We extend previous global CNN methods and address action recognition using CNN descriptors at the local level of human body parts.

Most of the recent methods for action recognition deploy global aggregation of local video descriptors. Such representations provide invariance to numerous variations in the video but may fail to capture important spatio-temporal structure. For fine-grained action recognition, previous methods have represented person-object interactions by joint tracking of hands and objects or, by linking object proposals , followed by feature pooling in selected regions. Alternative methods represent actions using positions and temporal evolution of body joints. While reliable human pose estimation is still a challenging task, the recent study reports significant gains provided by dynamic human pose features in cases when reliable pose estimation is available. We extend the work and design a new CNN-based representation for human actions combining positions, appearance and motion of human body parts.

Our work also builds on methods for human pose estimation in images and video sequences . In particular, we build on the method and extract temporally-consistent tracks of body joints from video sequences. While our pose estimator is imperfect, we use it to derive CNN-based pose features providing significant improvements for action recognition for two challenging datasets.

P-CNN: Pose-based CNN features

We believe that human pose is essential for action recognition. Here, we use positions of body joints to define informative image regions. We further borrow inspiration from and represent body regions with motion-based and appearance-based CNN descriptors. Such descriptors are extracted at each frame and then aggregated over time to form a video descriptor, see Figure 1 for an overview. The details are explained below.

Given a video frame and the corresponding positions of body joints, we crop RGB image patches and flow patches for right hand, left hand, upper body, full body and full image as illustrated in Figure 1. Each patch is resized to 224×224224\times 224 pixels to match the CNN input layer. To represent appearance and motion patches, we use two distinct CNNs with an architecture similar to . Both networks contain 5 convolutional and 3 fully-connected layers. The output of the second fully-connected layer with k=4096k=4096 values is used as a frame descriptor (ftp\mathbf{f}_{t}^{p}). For RGB patches we use the publicly available “VGG-f” network from that has been pre-trained on the ImageNet ILSVRC-2012 challenge dataset . For flow patches, we use the motion network provided by that has been pre-trained for action recognition task on the UCF101 dataset .

Given descriptors ftp\mathbf{f}_{t}^{p} for each part pp and each frame tt of the video, we then proceed with the aggregation of ftp\mathbf{f}_{t}^{p} over all frames to obtain a fixed-length video descriptor. We consider minmin and maxmax aggregation by computing minimum and maximum values for each descriptor dimension ii over TT video frames

The static video descriptor for part pp is defined by the concatenation of time-aggregated frame descriptors as

To capture temporal evolution of per-frame descriptors, we also consider temporal differences of the form Δftp=ft+Δtpftp\Delta\mathbf{f}_{t}^{p}=\mathbf{f}_{t+\Delta t}^{p}-\mathbf{f}_{t}^{p} for Δt=4\Delta t=4 frames. Similar to (1) we compute minimum Δmi\Delta m_{i} and maximum ΔMi\Delta M_{i} aggregations of Δftp\Delta\mathbf{f}_{t}^{p} and concatenate them into the dynamic video descriptor

Finally, video descriptors for motion and appearance for all parts and different aggregation schemes are normalized and concatenated into the P-CNN feature vector. The normalization is performed by dividing video descriptors by the average L2L_{2}-norm of the ftp\mathbf{f}_{t}^{p} from the training set.

In Section 6 we evaluate the effect of different aggregation schemes as well as the contributions of motion and appearance features for action recognition. In particular, we compare “Max” vs. “Max/Min” aggregation where “Max” corresponds to the use of MiM_{i} values only while ”Max/Min” stands for the concatenation of MiM_{i} and mim_{i} defined in (2) and (3). Mean and Max aggregation are widely used methods in CNN video representations. We choose Max-aggr, as it outperforms Mean-aggr (see Section 6). We also apply Min aggregation, which can be interpreted as a “non-detection feature”. Additionally, we want to follow the temporal evolution of CNN features in the video by looking at their dynamics (Dyn). Dynamic features are again aggregated using Min and Max to preserve their sign keeping the largest negative and positive differences. The concatenation of static and dynamic descriptors will be denoted by “Static+Dyn”.

The final dimension of our P-CNN is (5×4×4K)×2=160K(5\times 4\times 4K)\times 2=160K, i.e., 5 body parts, 4 different aggregation schemes, 4K-dimensional CNN descriptor for appearance and motion. Note that such a dimensionality is comparable to the size of Fisher vector used to encode dense trajectory features . P-CNN training is performed using a linear SVM.

State-of-the-art methods

In this section we present the state-of-the-art methods used and compared to in our experiments. We first present the approach for human pose estimation in videos used in our experiments. We then present state-of-the-art high-level pose features (HLPF) and improved dense trajectories .

To compute P-CNN features as well as HLPF features, we need to detect and track human poses in videos. We have implemented a video pose estimator based on . We first extract poses for individual frames using the state-of-the-art approach of Yang and Ramanan . Their approach is based on a deformable part model to locate positions of body joints (head, elbow, wrist…). We re-train their model on the FLIC dataset .

Following , we extract a large set of pose configurations in each frame and link them over time using Dynamic Programming (DP). The poses selected with DP are constrained to have a high score of the pose estimator . At the same time, the motion of joints in a pose sequence is constrained to be consistent with the optical flow extracted at joint positions. In contrast to we do not perform limb recombination. See Figure 2 for examples of automatically extracted human poses.

2 High-level pose features (HLPF)

High-level pose features (HLPF) encode spatial and temporal relations of body joint positions and were introduced in . Given a sequence of human poses PP, positions of body joints are first normalized with respect to the person size. Then, the relative offsets to the head are computed for each pose in PP. We have observed that the head is more reliable than the torso used in . Static features are, then, the distances between all pairs of joints, orientations of the vectors connecting pairs of joints and inner angles spanned by vectors connecting all triplets of joints.

Dynamic features are obtained from trajectories of body joints. HLPF combines temporal differences of some of the static features, i.e., differences in distances between pairs of joints, differences in orientations of lines connecting joint pairs and differences in inner angles. Furthermore, translations of joint positions (dxdx and dydy) and their orientations (arctan(dydx)arctan(\frac{dy}{dx})) are added.

All features are quantized using a separate codebook for each feature dimension (descriptor type), constructed using kk-means with k=20k=20. A video sequence is then represented by a histogram of quantized features and the training is performed using an SVM with a χ2\chi^{2}-kernel. More details can be found in . To compute HLPF features we use the publicly available code with minor modifications, i.e., we consider the head instead of the torso center for relative positions. We have also found that converting angles, originally in degrees, to radians and L2 normalizing the HLPF features improves the performance.

3 Dense trajectory features

Dense Trajectories (DT) are local video descriptors that have recently shown excellent performance in several action recognition benchmarks . The method first densely samples points which are tracked using optical flow . For each trajectory, 4 descriptors are computed in the aligned spatio-temporal volume: HOG , HOF and MBH . A recent approach removes trajectories consistent with the camera motion (estimated computing a homography using optical flow and SURF point matches and RANSAC ). Flow descriptors are then computed from optical flow warped according to the estimated homography. We use the publicly available implementation to compute improved version of DT (IDT).

Fisher Vectors (FV) encoding has been shown to outperform the bag-of-word approach resulting in state-of-the-art performance for action recognition in combination with DT features . FV relies on a Gaussian mixture model (GMM) with KK Gaussian components, computing first and second order statistics with respect to the GMM. FV encoding is performed separately for the 4 different IDT descriptors (their dimensionality is reduced by the factor of 22 using PCA). Following , the performance is improved by passing FV through signed square-rooting and L2L_{2} normalization. As in we use a spatial pyramid representation and a number of K=256K=256 Gaussian components. FV encoding is performed using the Yael library and classification is performed with a linear SVM.

Datasets

In our experiments we use two datasets JHMDB and MPII Cooking Activities , as well as two subsets of these datasets sub-JHMDB and sub-MPII Cooking. We present them in the following.

JHMDB is a subset of HMDB , see Figure 2 (left). It contains 21 human actions, such as brush hair, climb, golf, run or sit. Video clips are restricted to the duration of the action. There are between 36 and 55 clips per action for a total of 928 clips. Each clip contains between 15 and 40 frames of size 320×240320\times 240. Human pose is annotated in each of the 31838 frames. There are 3 train/test splits for the JHMDB dataset and evaluation averages the results over these three splits. The metric used is accuracy: each clip is assigned an action label corresponding to the maximum value among the scores returned by the action classifiers.

In our experiments we also use a subset of JHMDB, referred to as sub-JHMDB. This subset includes 316 clips distributed over 12 actions in which the human body is fully visible. Again there are 3 train/test splits and the evaluation metric is accuracy.

MPII Cooking Activities contains 64 fine-grained actions and an additional background class, see Figure 2 (right). Actions take place in a kitchen with static background. There are 5609 action clips of frame size 1624×12241624\times 1224. Some actions are very similar, such as cut dice, cut slices, and cut stripes or wash hands and wash objects. Thus, these activities are qualified as “fine-grained”. There are 7 train/test splits and the evaluation is reported in terms of mean Average Precision (mAP) using the code provided with the dataset.

We have also defined a subset of MPII cooking, referred to as sub-MPII cooking, with classes wash hands and wash objects. We have selected these two classes as they are visually very similar and differ mainly in manipulated objects. To analyze the classification performance for these two classes in detail, we have annotated human pose in all frames of sub-MPII cooking. There are 5555 and 139139 clips for wash hands and wash objects actions respectively, for a total of 29,99729,997 frames.

Experimental results

This section describes our experimental results and examines the effect of different design choices. First, we evaluate the complementarity of different human parts in Section 6.1. We then compare different variants for aggregating CNN features in Section 6.2. Next, we analyze the robustness of our features to errors in the estimated pose and their ability to classify fine-grained actions in Section 6.3. Finally, we compare our features to the state of the art and show that they are complementary to the popular dense trajectory features in Section 6.4.

Table 1 compares the performance of human part CNN features for both appearance and flow on JHMDB-GT (the JHMDB dataset with ground-truth pose) and MPII Cooking-Pose (the MPII Cooking dataset with pose estimated by ). Note, that for MPII Cooking we detect upper-body poses only since full bodies are not visible in most of the frames in this dataset.

Conclusions for both datasets are similar. We can observe that all human parts (hands, upper body, full body) as well as the full image have similar performance and that their combination improves the performance significantly. Removing one part at a time from this combination results in the drop of performance (results not shown here). We therefore use all pose parts together with the full image descriptor in the following evaluation. We can also observe that flow descriptors consistently outperform appearance descriptors by a significant margin for all parts as well as for the overall combination All. Furthermore, we can observe that the combination of appearance and flow further improves the performance for all parts including their combination All. This is the pose representation used in the rest of the evaluation.

In this section, we have applied the max-aggregation (see Section 3) for aggregating features extracted for individual frames into a video descriptor. Different aggregation schemes will be compared in the next section.

2 Aggregating P-CNN features

CNN features ft\mathbf{f}_{t} are first extracted for each frame and the following temporal aggregation pools feature values for each feature dimension over time (see Figure 1). Results of max-aggregation for JHMDB-GT are reported in Table 1 and compared with other aggregation schemes in Table 6.2. Table 6.2 shows the impact of adding min-aggregation (Max/Min-aggr) and the first-order difference between CNN features (All-Dyn). Combining per-frame CNN features and their first-order differences using max- and min-aggregation further improves results. Overall, we obtain the best results with All-(Static+Dyn)(Max/Min-aggr) for App + OF, i.e., 74.6%74.6\% accuracy on JHMDB-GT. This represents an improvement over Max-aggr by 1.2%1.2\%. On MPII Cooking-Pose this version of P-CNN achieves 62.3%62.3\% mAP (as reported in Table 6.2) leading to an 1.5%1.5\% improvement over max-aggregation reported in Table 1.

4 Comparison to the state of the art

In this section we compare to state-of-the-art dense trajectory features encoded by Fisher vectors (IDT-FV), briefly described in Section 4.3. We use the online available code, which we validated on Hollywood2 (65.3%65.3\% versus 64.3%64.3\% ). Furthermore, we show that our pose features P-CNN and IDT-FV are complementary and compare to other state-of-the-art approaches on JHMDB and MPII Cooking.

Table 5 shows that for ground-truth poses our P-CNN features outperform state-of-the-art IDT-FV descriptors significantly (8.7%8.7\%). If the pose is extracted automatically both methods are on par. Furthermore, in all cases the combination of P-CNN and IDT-FV obtained by late fusion of the individual classification scores significantly increases the performance over using individual features only. Figure 3 illustrates per-class results for P-CNN and IDT-FV on JHMDB-GT.

Table 6 compares our results to other methods on MPII Cooking. Our approach outperforms the state of the art on this dataset and is on par with the recently published work of . We have compared our method with HLPF on JHMDB in the previous section. P-CNN perform on par with HLPF for GT poses and significantly outperforms HLPF for automatically estimated poses. Combination of P-CNN with IDT-FV improves the performance to 79.5%79.5\% and 72.2%72.2\% for GT and automatically estimated poses respectively (see Table 5). This outperforms the state-of-the-art result reported in .

Qualitative results comparing P-CNN and IDT-FV are presented in Figure 6.2 for JHMDB-GT. See Figure 3 for the quantitative comparison. To highlight improvements achieved by the proposed P-CNN descriptor, we show results for classes with a large improvement of P-CNN over IDT-FV, such as shoot_gun, wave, throw and jump as well as for a class with a significant drop, namely kick_ball. Figure 6.2 shows two examples for each selected action class with the maximum difference in ranks obtained by P-CNN (green) and IDT-FV (red). For example, the most significant improvement (Figure 6.2, top left) increases the sample ranking from 211211 to 2323, when replacing IDT-FV by P-CNN. In particular, the shoot gun and wave classes involve small localized motion, making classification difficult for IDT-FV while P-CNN benefits from the local human body part information. Similarly, the two samples from the action class throw also seem to have restricted and localized motion while the action jump is very short in time. In the case of kick_ball the significant decrease can be explained by the important dynamics of this action, which is better captured by IDT-FV features. Note that P-CNN only captures motion information between two consecutive frames.

Figure 6.2 presents qualitative results for MPII Cooking-Pose showing samples with the maximum difference in ranks over all classes.

Conclusion

This paper introduces pose-based convolutional neural network features (P-CNN). Appearance and flow information is extracted at characteristic positions obtained from human pose and aggregated over frames of a video. Our P-CNN description is shown to be significantly more robust to errors in human pose estimation compared to existing pose-based features such as HLPF . In particular, P-CNN significantly outperforms HLPF on the task of fine-grained action recognition in the MPII Cooking Activities dataset. Furthermore, P-CNN features are complementary to the dense trajectory features and significantly improve the current state of the art for action recognition when combined with IDT-FV.

Our study confirms conclusions in , namely, that correct estimation of human poses leads to significant improvements in action recognition. This implies that pose is crucial to capture discriminative information of human actions. Pose-based action recognition methods have a promising future due to the recent progress in pose estimation, notably using CNNs . An interesting direction for future work is to adapt CNNs for each P-CNN part (hands, upper body, etc.) by fine-tuning networks for corresponding image areas. Another promising direction is to model temporal evolution of frames using RNNs .

This work was supported by the MSR-Inria joint lab, a Google research award, the ERC starting grant ACTIVIA and the ERC advanced grant ALLEGRO.