Kaustubh Kulkarni
email: kaustubh.kulkarni@inria.fr

Georgios Evangelidis
email: georgios.evangelidis@inria.fr

Jan Cech
email: cechj@cmp.felk.cvut.cz

Radu Horaud
email: radu.horaud@inria.fr

Continuous Action Recognition Based on Sequence Alignment

Keywords: action recognition, video segmentation, example-based recognition, template matching, dynamic programming, dynamic time warping, bag

Continuous action recognition is more challenging than isolated recognition because classification and segmentation must be simultaneously carried out. We build on the well known dynamic time warping (DTW) framework and devise a novel visual alignment technique, namely dynamic frame warping (DFW), which performs isolated recognition based on per-frame representation of videos, and on aligning a test sequence with a model sequence. Moreover, we propose two extensions which enable to perform recognition concomitant with segmentation, namely one-pass DFW and two-pass DFW. These two methods have their roots in the domain of continuous recognition of speech and, to the best of our knowledge, their extension to continuous visual action recognition has been overlooked. We test and illustrate the proposed techniques with a recently

Introduction

The problem of action recognition from temporal visual information is a very active research topic with many challenging applications. A large majority of existing action recognition techniques assumes that the boundaries (first and last frames) of individual actions are known in advance. This gives rise to the per-video approach, i.e., isolated action recognition, where an action label is assigned to a whole video to be recognized, consequently the latter is described by a single vector, e.g., the bag-of-word histogram representation framework. This whole-video paradigm allows one to solve isolated recognition problems using discriminative classifiers. In this paper we address the more realistic continuous action recognition problem, i.e., a video may contain a sequence of unknown actions in an unknown order and with unknown boundary locations between consecutive actions. This continuous recognition problem is more difficult than the isolated recognition problem because one has to address both classification and segmentation. The discriminative isolated-recognition framework that we just mentioned cannot be easily generalized to deal with segmentation.

In this work, continuous recognition is addressed in the framework of dynamic time warping (DTW) which has the potential to handle action-level classification and sequence-level segmentation in a concomitant and consistent manner. The proposed methodology has the following original components: a per-frame time-series representation of videos, a template-based representation of action categories, and a template-to-data alignment process that assigns a label to each video frame. The method will be referred to as dynamic frame warping (DFW) and two DFW implementations are proposed, namely one-pass (OP-DFW) and two-pass (TP-DFW) dynamic frame warping. Both these dynamic programming (DP) algorithms have their roots in the speech domain but, to the best of our knowledge, the extension of continuous speech recognizers to visual action recognition has been overlooked.

In speech, the DP-based sequence-to-sequence alignment framework gave rise to two extensions in order to deal with the problem of word recognition from a continuous speech signal, namely one-pass [START_REF] Vintsyuk | Element-wise recognition of continuous speech composed of words from a specified dictionary[END_REF] and two-pass Sakoe (1979) algorithms. The one-pass DP approach is used in conjunction with either dynamic time warping (DTW) Ney (1984), Ney and Ortmanns (1999) or with the Viterbi algorithm Lee and Rabiner (1989), and it is used today by large-vocabulary continuous speech recognition systems [START_REF] Gales | The application of hidden Markov models in speech recognition[END_REF]. The one-pass hidden Markov model (HMM), adapted from speech, has been used by continuous signlanguage recognizers [START_REF] Starner | Real-time american sign language recognition using desk and wearable computer based video[END_REF], [START_REF] Vogler | ASL recognition based on a coupling between HMMs and 3D motion analysis[END_REF].

The potential attractiveness of the two-pass DP algorithm is that its first pass (action-level) can be carried out with virtually any (generative or discriminative) isolated-action recognition method. It is worth noticing that a few recent continuous action recognition methods use a two-pass strategy in combination with HMMs and AdaBoost Lv and Nevatia (2006), with SVM and semi-Markov models (SMM) [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF], and with multi-class SVM Hoai et al (2011).

Sequence alignment algorithms can use either template-based methods, e.g., DTW, or probabilistic methods, e.g., hidden Markov models (HMMs). Within the context of action recognition, an HMM must be associated with each action category. This means that one needs to define a set of states for each category and to estimate the HMM parameters for each category, namely the state-transition probabilities and the state-emission probabilities. These action-level HMMs require a large amount of training examples. Moreover, continuous recognition requires that between-action (or jump) probabilities are estimated from an annotated set of videos containing a large number of action-jump examples. Altogether, HMM-based action-level continuous recognition needs a huge amount of training data which may not be available in practice.

One way to reduce the complexity of HMMs is to define action sub-units such that a large number of action types can be described by a small catalog of sub-units. For example, speech recognizers have successfully used word sub-units such as phonemes, syllables, etc. In the speech domain these sub-units have a clear acoustic and linguistic interpretation. Indeed, there are well defined and well understood language-dependent rules allowing the concatenation of phonemes into words from which within-word state-transition probabilities can be estimated. Moreover, there are grammar rules from which between-word transitions can be inferred. Unfortunately, the definition and use of a small catalog of action subunits turns out to be problematic even in restricted hand-gesture domains, e.g., sign-language recognition [START_REF] Starner | Real-time american sign language recognition using desk and wearable computer based video[END_REF]; [START_REF] Vogler | ASL recognition based on a coupling between HMMs and 3D motion analysis[END_REF]; Liang and Ouhyoung (1998); Hienz et al (1999); [START_REF] Vogler | A framework for recognizing the simultaneous aspects of american sign language[END_REF]. More generally, the use of HMMs for the problem of continuous action recognition would require huge amounts of annotated videos in order to train action sub-unit HMMs (one HMM per sub-unit) as well as action-level and sequence-level HMMs.

Another drawback of both DP and HMM continuous recognition approaches is that their performance crucially depends upon correctly labeling the first frame of an action to be recognized. This happens because current models cannot account for temporal dependencies beyond the first-or second-order Markov assumptions. The immediate consequence of mislabeling the first frame is that the DP procedure propagates this error to the next frames. One solution is to use a hidden conditional random fields (HCRF) which can deal with long temporal-range data dependencies: Rather than depending on the current state, as in HMM, the data are conditionally dependent of all the HCRF's states. Nevertheless, HCRF suffer from the same difficulty of properly inferring between-action transition probabilities from the training data.

In order to circumvent the above mentioned problems encountered with current approaches, we propose a novel way of representing actions based on action templates and we show how this representation can be cast in one-pass and two-pass DP algorithms. We address the problem of devising a template representation that captures the inherent actor-dependent variabilities occurring within action categories. We also address the problem of how to encode jumps between templates, such that the first and last frames of every action, present in a long sequence of unknown actions, are robustly detected and labeled. To summarize, the paper has the following contributions:

-Each action category is described by an action-template which is a sequence that corresponds to a mean action, optimally estimated from pairwise alignments between all the training examples of that action, and which contains within-category variability information as well as the minimum and maximum durations over all the examples. More precisely, an action-template is a sequence of metaframes where a metaframe is a collection of aligned frames, thus accounting for between-frame variabilities. As it will be described in detail below, continuous recognition also requires a structured representation of all the action categories, which is modeled as a supertemplate, or a string formed by all the action templates taken in an arbitrary order. Action templates, metaframes, and super-templates are formally defined in section 3. -This formulation immediately calls for a test-frameto-template-metaframe dissimilarity function that must be plugged into the DP grid of alignment scores. The inherent frame variability, i.e., within a metaframe, suggests that a naive implementation, such as the minimum over the test-frame-to-template-frame Euclidean distances, is unreliable and non discriminant. We propose to compute a frame-to-metaframe dissimilarity score based on a sparse representation through solving a basis pursuit denoising problem [START_REF] Chen | Atomic decomposition by basis pursuit[END_REF] that can be cast into a computationally efficient convex quadratic programming procedure.

-Each video frame is modeled with a high-dimensional vector that must contain enough information to characterize an action sub-unit. One must however consider a time-window centered at each frame and which is then shifted over the frames, in order to gather spatiotemporal features. There must be a minimum number of such features to properly characterize an action, regardless of the action type and of the speed at which various actors perform actions. Therefore, the proposed per-frame feature vector uses a temporal window of an adjustable size, such that a predefined minimum number of features is included in the frame descriptor. Moreover, we stress the fact that it is important to take into account between-action information that is encoded in the data. This is done by annotating long videos that contain action sequences and not isolated actions. Hence, the feature vector associated with the first and last frames of an action necessarily contain in-formation allowing the recognition algorithm to detect action boundaries and hence to jump from one category to another category. -The proposed OP-DFW may well be viewed as a generalization of sequence alignment methods for the isolated-action case, which perform recognition by estimating a model-sequence-to-test-sequence alignment through evaluating a dynamic programming score. In isolated recognition the alignment is based solely on the detection of within-action transitions.

To cope with continuous recognition, OP-DFW allows between-action transitions as well, such that it is possible to jump from the last frame of an action to the first frame of any other action, e.g., Figure 1. We show that this continuous recognition framework is particularly well suited for modeling periodic actions because it allows jumps between repetitive motion patterns, i.e., section 7.2. The ability of the algorithm to handle both these two types of transitions is one of the major contributions of this paper.

-The basic idea of TP-DFW, inspired from Sakoe (1979), is to carry out action-level recognition and sequence-level segmentation in two consecutive passes. Firstly, all possible sub-sequences of the unknown video are considered. Each such sub-sequence is parameterized by its first and last frames in the video. An isolated recognition algorithm is repeatedly applied to each sub-sequence, thus associating an action category and a recognition score to each subsequence of the initial video, namely to each possible first-frame/last-frame point on a two-dimensional grid. Secondly, a variant of DP is used to estimate an optimal path of recognition scores through this grid, under the constraint that the actions contained in the unknown video must form a temporal string.

Not surprisingly, one-pass DFW performs better than both the proposed two-pass DFW and the two-pass DP methods recently proposed by [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF]Hoai et al (2011). This can be easily explained by the fact that the training data used by our method uses annotated video examples composed of action sequences and not of isolated actions. In this way, the feature descriptors outlined above encode both within-action and between-action transitions. The proposed one-pass algorithm explicitly takes into account these two transition types, while two-pass algorithms cannot enforce between-action transitions. Indeed, the second pass, i.e., segmentation based on dynamic programming, is strongly biased by the isolated recognition scores found by the first pass. It is worthwhile to notice that two state-ofthe-art continuous action recognition methods Shi et al The inclusion of a detailed description of our proposed two-pass method allows computer vision practitioners to easily implement this type of DP algorithms and to understand why the proposed one-pass method performs slightly better than two-pass methods.

The remainder of this paper is organized as follows. Section 2 describes in detail the work related to our method. Section 3 formally states the problem of continuous action recognition. Section 4 outlines the dynamic time warping baseline method for aligning two time-series. Section 5 describes the proposed templatebased representation of actions based on metaframes, as well as the concept of action strings. Section 6 describes the proposed dynamic frame warping algorithm based on a novel frame-to-metaframe distance. Section 7 describes in detail the one-pass and the two-pass dynamic frame warping methods, explains how periodic actions are handled, analyses the complexity of the proposed algorithms, and suggests a null-class model. Section 8 describes in detail the proposed bag-of-words representation, shows the results obtained with several datasets, and compares our algorithms with both isolated and continuous recognition methods. Section 9 draws a few conclusions.

Matlab code and additional multimedia material are made publicly available. 1

Related Work

In computer vision, the first attempts to solve for continuous action recognition addressed the problem of sign language recognition. The similarity between spoken and sign languages enabled the use of HMMs. [START_REF] Starner | Real-time american sign language recognition using desk and wearable computer based video[END_REF] considered a forty word lexicon from the American sign language (ASL) and used the hidden Markov model toolkit (HTK) [START_REF] Young | HTK: Hidden Markov model toolkit v1[END_REF] both for inference and recognition. The difficulty of defining sub-units of signs, e.g., by similarity to phonemes in 1 https://team.inria.fr/perception/research/car/ speech, lead Hienz et al (1999) to model each sign with one HMM. In order to optimally find sign boundaries the authors proposed to use tree-search for pruning too long or too short paths found by a Viterbi algorithm and to extract the between-sign boundaries. Inclusion of a stochastic language model slightly improved recognition using a lexicon of 52 signs representing 7 different word types (nouns, verbs, etc.) from the German sign language.

Unlike spoken languages where the acoustic data are sequential, sign languages use the two hands simultaneously, and both the hands' shape and orientation occur in parallel. In order to model these features, [START_REF] Vogler | A framework for recognizing the simultaneous aspects of american sign language[END_REF] proposed to use 200 parallel and independent HMMs and adapted the token passing algorithm [START_REF] Young | Token passing: a simple conceptual model for connected speech recognition systems[END_REF] to recognize simultaneous aspects of ASL. The authors note, however, that the decomposition of language signs into phonemes is controversial from a linguistic point of view. In summary, the critical components of HMM-based continuous sign language recognition are proper definitions of sign subunits and of language models. The idea of parallelized HMMs was also explored by Lv and Nevatia (2006) in the framework of segmentation and recognition of human actions from 3-D data. The authors hypothesized that a complex action may be viewed as the combination of single-, two-, and three-joint actions. Hence they proposed to decompose complex human actions using seven such primitive actions and one HMM is associated with each such action. A multi-class AdaBoost classifier is fed by these weak HMM classifiers. Action recognition and segmentation are implemented using the two-pass strategy already described. The same authors subsequently proposed a different HMM continuous recognition framework that associates a one-state HMM to each action category Lv and Nevatia (2007). Hence, segmentation and recognition reduce to the problem of deciding whether to stay in the current state or to jump to another state. A uniform distribution is chosen for the transition probabilities, hence they are neglected. This model may well be viewed as a very simple variant of one-pass HMM methods used in speech. Both Lv andNevatia (2006, 2007) use 3-D motion capture data (using a multiplecamera setup) for model inference. While Lv and Nevatia (2006) uses the same kind of 3-D data for recognition and segmentation, Lv and Nevatia (2007) only needs a silhouette extracted from a single view, and hence the latter is more flexible than the latter. Nevertheless, proper estimation of the between-action transition probabilities severely limits the performance.

The HMM-based generative models that we just discussed make strict assumptions that observations are conditionally independent, given class labels, and cannot describe long-range dependencies of the observations. This limitation makes the implementation of onepass dynamic programming methods unreliable because it is difficult to decide which type of transition (withinaction or between-action) should be preferred along the DP forward pass. Conditional random fields (CRFs) are discriminative models that explicitly allow transition probabilities to depend on past, present, and future observations. CRF models applied to isolated activity recognition outperform HMMs, e.g., [START_REF] Sminchisescu | Conditional models for contextual human motion recognition[END_REF]; [START_REF] Vail | Conditional random fields for activity recognition[END_REF]. Several authors extended the CRF framework to incorporate additional latent (or hidden) state variables in order to better deal with the complex structure of human actions and gestures. For example Morency et al (2007) proposed a latent-dynamic CRF model, or LDCRF, to better capture both the sub-gesture and between-gesture dynamics. The method was applied to segment and classify head movements and eye gazing in a human-avatar interactive task.

The methods described so far use motion (or pose) parameters which are extracted using motion capture systems. The characterization of actions using such parameters is attractive both because they are highly discriminant and because they live in a low-dimensional space, hence they can be easily plugged in the HMM and CRF frameworks. However, it is not always possible to reliably extract discriminant motion or pose descriptors from visual data, and sophisticated multiplecamera setups are required both for training and recognition. Alternatively, image-based descriptors are easy to extract but the corresponding feature vectors are less discriminant and have dimensions as high as hundreds, which make them unsuitable for training graphical models. Recently Ning et al (2008) proposed to plug a latent pose estimator into the LDCRF model of Morency et al (2007) by jointly training an imageto-pose regressor and a hidden-state conditional random field model. Although appealing, this model also requires a large training set gathered with synchronized multiple-camera and motion capture systems [START_REF] Sigal | Humaneva: Synchronized video and motion capture dataset and baseline algorithm for evaluation of articulated human motion[END_REF].

The proposed one-pass continuous recognition algorithm also differs from recently proposed dynamic time warping methods. [START_REF] Alon | A unified framework for gesture recognition and spatiotemporal gesture segmentation[END_REF] address the problem of continuous hand gesture recognition and a pruning strategy is proposed such that DTW paths that do not correspond to valid (trained) gestures are abandoned. At runtime, this is less efficient than one-pass DP algo-rithms which extract a single path rather than multiple paths. Kulkarni et al (2008) address the problem of continuous action recognition but propose an averagetemplate representation for an action category and a dissimilarity measure which would not be able to handle large intra-class variance. Dynamic time warping has also been applied to action recognition in combination with unsupervised manifold learning techniques, e.g., [START_REF] Blackburn | Human motion recognition using isomap and dynamic time warping[END_REF]; [START_REF] Zhou | Canonical time warping for alignment of human behavior[END_REF]; [START_REF] Gong | Dynamic manifold warping for view invariant action recognition[END_REF], but the problem of continuous recognition was not addressed in these papers. To the best of our knowledge, the full potential of dynamic time warping for the problem of simultaneous segmentation and recognition of human actions has not been systematically exploited in the computer vision domain.

Problem Formulation and Notations

Let image sequences (videos) be represented as timeseries, or sequences of vectors, denoted by X, Y , or Z, e.g., X 1:T

X = (x 1 , . . . x t , . . . x T X ), where x ∈ | K is an ℓ 2 -normalized vector, • 2 = 1,
that describes the t-th image (or frame) of a video, and T X denotes the number of frames in X. The notation X ti:tj refers to a sub-sequence of X starting at frame t i and ending at t j , with 1 ≤ t i < t j ≤ T X . We denote by d(x, x ′ ) the distance between the a frame of X and a frame of X ′ .

We assume that there are L possible action categories, i.e., the action-label set is L = {l} L l=1 . Let X l denote a training example of action l ∈ L and let {X l n } N l n=1 denote the set of N l single-action training examples of category l. A test sequence Z may contain an unknown number of actions J, with an unknown label sequence M = (m 1 , . . . m j , . . . m J ), m j ∈ L, with unknown boundaries between two consecutive actions, and in an unknown order. The problem of continuous action recognition consists in simultaneously finding a partition of Z into single actions and to label each one of these actions.

We now define a representation of an action category. For each category l we define an action-template denoted by Y l and a class-template denoted by Ỹ l . The action template is the center of the single-action examples of a class, {X l n } N l n=1 , and hence it is a sequence itself. A class template is a sequence of metaframes. A metaframe is a collection of frames from the training examples resulting from pairwise alignments X l n ↔ X l k within the same class l. Section 5 below will describe in detail how action templates are computed, based on dynamic time warping, and how class templates are built.

We also introduce a super-template, or a string of classtemplates corresponding to the L categories taken in an arbitrary, yet fixed, order:

Ỹ 1:L = ( Ỹ 1 , . . . Ỹ l , . . . Ỹ L ) (1)
The task of continuous action recognition is to partition an unknown sequence Z 1:T Z into a string of J subsequences:

Z = (Z t0:t1 , . . . Z tj-1:tj , . . . Z t J-1 :t J ) 1 = t 0 < t 1 ≤ . . . t j-1 < t j ≤ . . . t J-1 < t J = T Z (2)
such that the sub-sequence-string Z is optimally aligned with a synthesized string of J class templates

Ỹ m1:m J = ( Ỹ m1 , . . . Ỹ mj , . . . Ỹ m J ), m 1 , . . . m J ∈ L
This can be written as the following optimization problem:

A * (Z, Ỹ m1:m J ) = argmin { Ỹ 1:L } [f (Z, Ỹ 1:L )] (3)
where A * is the optimal alignment path over

{A(Z, Ỹ m1:m J )} m1,m J ∈L ,
i.e., the set of all possible alignments between the test sequence Z and synthesized strings Ỹ m1:m J , and f is a dissimilarity function between the test sequence and a string of templates. Notice that this optimization problem is not trivial because one has to consider the set { Ỹ 1:L } of all possible concatenations of class templates, align each one of these concatenations with the unknown sequence, and select the alignment that satisfies both an action-level optimality criterion as well as a sequence-level cirterion. Indeed, the cost function must be repeatedly evaluated by permuting the templates and changing the number of templates in the synthesized string. As it will be described in detail below, this simultaneous action recognition and segmentation problem can be robustly and efficiently handled within the framework of dynamic programming. The complexity of the proposed algorithms is described in detail as well.

Dynamic Time Warping

In this section we briefly describe the baseline DTW algorithm, e.g., Rabiner and Juang (1993); Mueller (2007), for optimally aligning two sequences Z 1:T Z and Y 1:T Y of different lengths and for estimating a dissimilarity statistics between them. The alignment is described by a path or, more precisely, by a set of frame-to-frame assignments:

A(Z, Y ) = {(t 1 , t ′ 1 ), (t i , t ′ i ), . . . , (t |A| , t ′ |A| )} (4)
with 1 ≤ t i ≤ T Z and 1 ≤ t ′ i ≤ T Y being the frame indexes of the sequences Z and Y . For example let Z 1:5 = (z t ) and Y 1:4 = (y t ′ ). One possible path is given by 1,1),(2,1),(3,2),(3,3),(4,4),(5,4)}. From the general alignment formulation (3) one can derive a simpler constrained minimization problem to find an optimal path A * , namely:

A = {(
     A * (Z, Y ) = argmin A |A| i=1 d(z ti , y t ′ i ) s.t. (t 1 , t ′ 1 ) = (1, 1) (t |A| , t ′ |A| ) = (T Z , T Y ).
(

) 5
This estimates the best choice of the sum over frame-toframe distances d(z ti , y t ′ i ). The result of ( 5) is an optimal path

A * (Z, Y ) = {(t * i , t ′ i * )} |A * |
i=1 as well as a dissimilarity score DTW(Z, Y ) between the two time series, namely the normalized minimum yielded by (5). It corresponds to the normalized cost accumulated along the path, starting at (1, 1) and up to (T Z , T Y ) by traversing along the optimal path A * and is given by:

DTW(Z, Y ) = 1 |A * | |A * | i=1 d(z t * i , y t ′ * i ). ( 6
)
Although this is not a true distance because the inequality property does not hold in general, it can be viewed as a dissimilarity statistic between Z and Y . Dynamic time warping proceeds in two passes: a forward pass and a backward pass.

During the forward pass, an accumulated cost D(t, t ′ ) and a back-pointer Φ(t, t ′ ) are estimated at each grid point

(t, t ′ ), with t ∈ {2 . . . T Z }, t ′ ∈ {2 . . . T X }. The accumulated cost is initialized with D(1, 1) = d(z 1 , y 1 ) and with D(1, •) = D(•, 1) = ∞,
and is then recursively estimated with:

D(t, t ′ ) = min (τ,τ ′ )∈N τ,τ ′ [D(t -τ, t ′ -τ ′ ) + r(τ, τ ′ )d(z t , y t ′ )] , (7)
where N τ,τ ′ is the set of allowed grid transitions and r(τ, τ ′ ) is a transition penalty. D is updated on the basis of minimizing over the possible between-action transitions from the past grid points (tτ, t ′τ ′ ) to the current grid point. The best transition allowing to reach the current grid point is:

(τ t , τ ′ t ′ ) = argmin (τ,τ ′ )∈N τ,τ ′ [D(t -τ, t ′ -τ ′ ) + r(τ, τ ′ )d(z t , y t ′ )] . (8)
The back-pointer Φ simply stores, for the current grid point, the coordinates of the previous grid point that provided the best transition:

Φ(t, t ′ ) = (t -τ t , t ′ -τ ′ t ′ ). ( 9
)
This is a general formulation that allows the implementation of a large variety of grid transitions N τ,τ ′ , e.g., Rabiner and Juang (1993);Ney (1984). It is important to note that if one uses an HMM framework, this corresponds to state-to-state transitions which are dictated by the topology of the associated Markov chain. In particular, if a Markov model is adopted, vertical transitions are not allowed, i.e., one cannot simultaneously align z t with y t ′ -1 and with y t ′ . The DTW framework is more flexible than HMMs in the sense that one can implement vertical transitions, thus allowing an alignment between a long model sequence Y and a short test sequence Z.

In this paper we allow three types of transitions: horizontal, vertical, and diagonal, and we choose a weighting scheme that gives equal preference either to a diagonal transition or to a combination of horizontal and vertical transitions Mueller ( 2007), thus taking into account potential time discrepancies between the two sequences. The minimization is carried out over the transition pair (τ, τ ′ ). In this paper we consider N τ,τ ′ = {(0, 1), (1, 0), (1, 1)} which yields the following transition penalty to be used in ( 7) and (8):

r(τ, τ ′ ) = τ + τ ′ if (τ, τ ′ ) ∈ N τ,τ ′ ∞ else. ( 10
)
During the backward pass of DTW, the optimal path A ⋆ is found last-to-first: (t 1 , t ′ 1 ) = (T Z , T Y ) and then, for i ≥ 2 and until (t i , t ′ i ) = (1, 1), the i-th assignment is simply provided by the back-pointer:

(t i , t ′ i ) = Φ(t i-1 , t ′ i-1 ). ( 11
)
Notice that it is possible to implement this algorithm such that all the computations are done during the forward pass: The back-pointer Φ(t, t ′ ) stores the accumulated best path of grid points, rather than just the previous best grid point.

Action Templates and Metaframes

In this section we describe a representation of actions that is well suited for the task of continuous recognition. The representational framework is based on the concept of templates briefly introduced in section 3.

For each action category l we define an action template denoted by Y l and a class template denoted by Ỹ l . The action template is the mean (or the center) of the single-action examples of a class, namely the mean of {X l n } N l n=1 , and hence it is a sequence itself. A class template is a sequence of metaframes. Each metaframe is a set of matched frames resulting from the alignments of the action examples.

In order to estimate the mean action of a class l, we seek the sequence X l i * ∈ {X l n } N l n=1 which is the closest to the class center. This can be done in a straightforward way via the following minimization:

i * = argmin i j =i DTW(X l i , X l j ). ( 12
)
In more detail, for each example i the sum over all the alignment scores DTW(X l i , X l j ) (with j = i) is computed and the example i * that minimizes this sum is selected as the class center, i.e., X l i * , as well as the action template, i.e., Y l ≡ X l i * . It is important to emphasize that this process eventually aligns each example X l j with Y l . The class template becomes:

Ỹ l = (ỹ l 1 , . . . ỹl t ′ , . . . , ỹl T Y l ), (13)
with the same length as Y l and composed of a sequence of metaframes, where each metaframe ỹl t ′ being a collection of matched frames resulting from the minimization (12):

ỹl t ′ = x l jt ′ j=N l t ′ j=1 , (14)
where x l jt ′ ∈ X l j is associated with the t ′ -th metaframe, ỹl t ′ , and N l t ′ is the number of frames associated with this metaframe. An example of a class template with its class center and the associated matched frames is shown on Fig. 2 Based on the frameto-frame alignment thus obtained, each metaframe, e.g., ỹ1 , . . . , ỹ30 , is described by a varying number of example frames. For example, there are five frames (actors 2, 3, 4, 5, and 6) associated with metaframe ỹ10 . The varying number of frames associated with a metaframe is due to "speed of action" variabilities between different actors.

We now make this template-based representation well suited for continuous action recognition and we specify the notion of a super template, or a concatenated string of class templates, taken in an arbitrary but fixed order, namely (1). The length of Ỹ 1:L is T Ỹ = L l=1 T Ỹ l . Since there are length variabilities in the training set, we define a minimum and maximum temporal length associated with each class template, namely:

T l min = min 1≤i≤N l t ′ [T X l i ], T l max = max 1≤i≤N l t ′ [T X l i ]. ( 15
)
6 Dynamic Frame Warping

We consider the problem of aligning an unknown sequence Z with a class template Ỹ l . Since the latter is a sequence of metaframes, the frame-to-frame distance d(x t , y t ′ ) used by the dynamic time warping algorithm described in section 4 must be replaced with a frame-tometaframe distance d(z t , ỹl t ′ ). If the frames associated with a metaframe in ( 14) obey a probability distribution function, e.g., an isotropic Gaussian distribution, one could easily estimate the parameters of this distribution and implement the frame-to-metaframe distance d in closed form, i.e., a Mahalanobis distance. In practice there is a large variability within the frame set ( 14) and a too simple statistical model may yield a non-discriminant metaframe description. The frame variability within a metaframe seems to be inherent to the bag-of-words representation which cannot guarantee that the same action performed by different people have normally distributed descriptor vectors. Moreover, there may be temporal miss alignments introduced by the training described in section 5 which may lead to the presence of mismatched frames, i.e., outliers, within a metaframe. Finally, there may not be enough training examples associated with each action such as to approximate a metaframe with a more sophisticated model such as a Gaussian mixture.

For these reasons, in order to compute a frame-tometaframe distance, we propose to adopt a reconstruction model. Let z t ∈ | K be the visual vector of a test frame and let ỹl

t ′ be a metaframe composed of train- ing examples {x l jt ′ } j=N l t ′ j=1 ∈ | K .
We seek to represent a test frame as a linear combination of the training frames associated with a metaframe:

z t ≈ X l t ′ w t ′ , (16)
where

X l t ′ = [x l 1t ′ . . . x l jt ′ . . . x l N l t ′ t ′ ] is a K × N l t ′ matrix and w t ′ = (w 1t ′ . . . w N l t ′ t ′ ) ⊤
is the vector of reconstruction coefficients. In order to avoid over-smoothing and because only a few training frames are likely to be similar to the test frame, we seek a sparse solution for w

t ′ Ỹ clap X clap 1 X clap 2 X clap 3 X clap 4 X clap
w t ′ = argmin w z t -X l t ′ w 2 + γ w 1 . (17)
The ℓ 1 -norm regularizer ensures the sparseness of the solution while the value of γ can be tuned such that a satisfactory tradeoff is achieved between the sparsity level and the value of the Euclidean norm. The above problem casts into a convex quadratic programming method which can be efficiently solved, e.g., [START_REF] Boyd | Convex Optimization[END_REF]. Notice that the minimization (17) yields a solution even if the linear system ( 16) is under determined, namely if N l t ′ < K. The solution yielded by ( 17) is a sparse coefficient vector with the set of non-zero indices being defined by S = {j|j ∈ {1, . . . N l t ′ }, w jt ′ = 0}. As is customary in basis pursuit [START_REF] Boyd | Convex Optimization[END_REF], the sparsity is subsequently reused to compute a normalized cost, since the minimum cost of ( 17) can be biased favoring too sparse solutions. Therefore, we also build a reduced K × |S| matrix whose columns are the remaining visual vectors

X l t ′ = [x l
jt ′ ], j ∈ S and we solve the following minimization problem that yields a frameto-metaframe distance in closed-form [START_REF] Evangelidis | Parametric image alignment using enhanced correlation coefficient maximization[END_REF]:

d(z t , ỹl t ′ ) = min w z t - X l t ′ w X l t ′ w 2 2 2 s.t. |S| i=1 w i = 1. (18)
The alignment between a test sequence Z and a class template Ỹ l , namely A * (Z, Ỹ l ), is estimated by replacing d with d in (5); the corresponding dissimilarity associated with an optimal path becomes:

DFW(Z, Ỹ l ) = 1 |A * | |A * | i=1 d(z t , ỹl t ′ ). ( 19
)
Sequence alignment based on frame-to-metaframe distances will be referred to as dynamic frame warping (DFW).

The above formulation allows a straightforward implementation of isolated action recognition in the spirit of nearest-neighbor search Ikizler and Duygulu (2009); [START_REF] Brendel | Activities as time series of human postures[END_REF] but in a slightly more efficient way. Indeed, if a test sequence Z contains a single unknown action, the class label can be recovered by:

l * = argmin l∈L DFW(Z, Ỹ l ).
(20)

Continuous Recognition

The dynamic programming framework and templatebased representation just described can be used to simultaneously segment an unknown sequence into isolated actions and to recognize them. More precisely, the test sequence Z is composed of an unknown number of, possibly repeating, actions in an unknown order. Moreover, not only that the between-action boundaries are not known in advance, but the transitions from one action to the next one are often smooth; this further complicates the task of segmentation. In this section we describe two extensions of the baseline dynamic frame warping (DFW) method outlined in section 6, namely the one-pass DFW and two-pass DFW algorithms.

Both proposed methods constitute elegant extensions of dynamic time warping for isolated recognition. Isolated recognition only requires within-action transitions between frames, e.g., (7) and associated rules (10). In continuous recognition between-action transitions are required as well. The first algorithm, OP-DFW, implements a mechanism allowing either to stay in the same template or to jump from the end-frame of a template to the begin-frame of another template. This is somehow equivalent to an HMM and to the Viterbi algorithm that allows jumps between HMM states. The main advantage of the proposed DTW-like algorithm is that there is no need to compute partition functions as with probabilistic graphical models.

The second algorithm, TP-DFW, implements continuous recognition quite differently: an action recognition stage (or the first pass) is followed by a sequence segmentation stage (or the second pass). Firstly, isolated recognition (20) is applied to a sub-sequence Z t b :te of Z parameterized by a begin-frame t b and an endframe t e . Isolated recognition is repeatedly applied to each possible sub-sequence such that best labels and alignment scores are estimated for all possible sub-sequences. Secondly, a dynamic programming procedure is applied to the (t b , t e ) grid that was generated during the first pass, in order to find an alignment path that coincides with an optimal string of labels based on the previously computed scores.

Prominent features of both methods are that they can deal with test sequences having an arbitrary number of actions and that they allow a large variability in terms of action durations. The first pass of the TP-DFW method can be carried out by virtually any isolated recognition method and hence it is suitable for combining continuous recognition with a discriminative method.

One-Pass Dynamic Frame Warping

We consider the task of finding an optimal path between un unknown sequence Z and a super-template Ỹ 1:L , defined in (1), and as explained in section 5. The optimal path will contain the information needed to split the sequence Z into sub-sequences and to assign an action label to each sub-sequence frame, as defined by (2). We must modify the alignment definition (4) to allow for frame-to-metaframe assignments:

Ã(Z, Ỹ ) = {(t i , t ′ i (l))} i=| Ã| i=1 (21)
where t i is the frame index of Z,

1 ≤ t i ≤ T Z , l is the template index, 1 ≤ l ≤ L, t ′ i (l) is the frame index of template Y l , 1 ≤ t ′ i (l) ≤ T Y l
, and i is the path index. The optimal path is the solution of the following optimization problem:

       à * (Z, Ỹ ) = argmin à | Ã| i=1 d(z ti , Ỹ li t ′ i ) s.t. (t 1 , t ′ 1 ) = (1, 1) (t | Ã| , t ′ | Ã| ) = (T Z , T Ỹ ) (22)
where the frame-to-metaframe distance d was defined in (18). There is a similar expression for the DFW dissimilarity statistics associated with the optimal path:

DFW(Z, Ỹ ) = 1 | Ã * | | Ã * | i=1 d(z t * i , Ỹ l * i t ′ i * ) (23)
The within-action transition rule (7) defined in the case of isolated recognition must be augmented with a between-action transition (or jump) rule. Let D(t, t ′ (l)) be the accumulated cost associated with the grid point (t, t ′ (l)). As before, we also define a back-pointer Φ(t, t ′ (l)) at each grid point. In addition we define an accumulated temporal length T (t, t ′ (l)) that is associated with each grid point and with each template. During the forward step, once initialized, the accumulated costs D, back-pointers Φ and lengths T are estimated at each grid point (t, t ′ (l)) while enforcing two types of transitions. The algorithm can be outlined as follows:

-Initialization. The unknown sequence starts with the first frame of any of the class templates, hence, the cost is initialized with:

D(1, t ′ (l)) = d(z 1 , Ỹ l 1 ) if t ′ (l) = 1 ∞ if 2 ≤ t ′ (l) ≤ T Ỹ l (24)
while the temporal length is equal to 1 at the start of each class template, T (1, 1(l)) = 1. -Within-action transitions occur between two grid points belonging to the same template l, i.e., at 2 ≤ t ≤ T Z , 2 ≤ t ′ (l) ≤ T Y l , 1 ≤ l ≤ L, and they are strictly identical to the isolated case:

D(t, t ′ (l)) = min τ,τ ′ [ D(t -τ, t ′ (l) -τ ′ ) + r(τ, τ ′ ) d(z t , Ỹ l t ′ )] (25)
where the transition penalty r was defined in (10). The optimal transition is given by:

(τ t , τ ′ t ′ ) = argmin τ,τ ′ [ D(t-τ, t ′ (l)-τ ′ )+r(τ, τ ′ ) d(z t , Ỹ l t ′ )]. (26)
The back-pointer indicates that the path must stay within the same action l:

Φ(t, t ′ (l)) = (t -τ t , t ′ (l) -τ ′ t ′ ). ( 27
)
The accumulated temporal length is recursively updated using the following rule:

T (t, t ′ (l)) = T (t -τ, t ′ (l) -τ ′ ) + τ t . (28)
Therefore, the accumulated temporal length of a template does not take into account vertical transitions, i.e., τ t = 0, and is incremented only if either a horizontal or a diagonal within-action transition is selected τ t = 1. -Between-action transitions can only happen between the end-frame of any template k, 1 ≤ k ≤ L and the begin-frame of the current template l, i.e., from a grid point (t -1, T Ỹ k ) to the current grid point (t, t ′ ) = (t, 1(l)), ∀k, 1 ≤ k ≤ L (thus allowing transitions from the end-frame of a template l the begin-frame of the same template l, i.e., the same action is repeated). First, the best template label k * is estimated:

k * = argmin 1≤k≤L [ D(t -1, T Ỹ k ) + r k d(z t , Ỹ l 1 )] ( 29
)
and the associated between-action transition is then selected:

D(t, 1(k * )) = D(t -1, T Ỹ k * ) + r k * d(z t , Ỹ l 1 ) (30)
where the transition penalty r k is defined such that a sub-sequence of Z having an accumulated temporal length that is too short or too long is disregarded:

r k = 1 if T k min ≤ T (t, T Ỹ k ) ≤ T k max ∞ otherwise (31)
Second, the accumulated between-action cost is estimated with:

D(t, 1(l)) = min D(t-1, 1(l))+ d(z t , Ỹ l 1 ), D(t, 1(k * )) (32)
The associated argmin function returns a template label δ that is equal either to k * if a between-action transition from the end-frame of k * to the startframe of l is preferred by (32) or to l otherwise. Finally, in this case the back-pointer must indicate whether a between-action transition occurs or not:

Φ(t, 1(l)) = (t -1, t ′ (δ)) (33) with t ′ (δ) = T Ỹ k * if δ = k * (
there is a betweenaction transition) or t ′ (δ) = 1(l) if δ = l (there is no between-action transition).

During the backward step of the OP-DWF, the optimal path à * is found from-last-to-first. The path is initialized with:

(t 1 , t ′ 1 (l)) = argmin 1≤l≤L D(T Z , T Ỹ l ) (34)
and then for i ≥ 2 and until (t i , t ′ i (l)) = (1, 1(l)), ∀l:

(t i , t ′ i (l)) = Φ(t i-1 , t ′ i-1 (l)) (35)
Once the optimal path is thus determined, it is straightforward to obtain a partitioning of the unknown sequence Z into J sub-sequences, i.e., (2) such that each sub-sequence is optimally aligned with a class template.

The OP-DFW algorithm is sketched on Figure 3.

Periodic Actions

Many human actions contain some kind of periodicity, e.g., running, walking, waving, etc., and the continuous (classification and segmentation) recognition of this type of actions must be carefully addressed. Periodic actions are generally composed of motion patterns that are repeated an arbitrary number of times in the same action. Both training and recognition of these actions must be carefully addressed. The proposed OP-DFW algorithm handles periodic actions in the following way. Firstly, we need to learn a class template for each motion-pattern, i.e., section 5. This is done by carefully annotating periodic-action examples in order to obtain a training set for each motion pattern and learn a motion-pattern template. Secondly, OP-DFW is applied to an unknown test sequence. Whenever, a periodic action is present in the test sequence, the algorithm jumps from one motion-pattern to the next motion-pattern (which corresponds to a between-action transition) or stays within the same motion-pattern (which correspond to a within-action transition). Fig. 1 illustrates the behavior of the OP-DFW method with two different annotations. The top-right plot shows the alignment path where each class-template is associated with a periodic action, or per action annotation. In this case, periodic actions are modeled like any other action and the test sequence is segmented into three actions, namely "clap-wave-punch". The top-left plot shows the alignment path where each class-template is replaced with a motion-pattern template, or per motion-pattern annotation. In this case the test sequence is segmented into nine motion patterns, namely "clap-clap-clap", "wavewave-wave", and "punch-punch-punch". Note that if the test sequence is composed of a single periodic action (this corresponds to isolated action recognition), the OP-DFW treats it as a sequence of patterns and therefore achieves classification and segmentation. Therefore, OP-DFW can deal with periodic actions composed of an arbitrary number of repeated patterns of different types.

Two-Pass Dynamic Frame Warping

We consider now a sub-sequence Z t b :te of the test sequence Z 1:T Z parameterized by its first and last frames.

The ordered sets of begin-frame indexes {t b } 1≤t b <T Z and of end-frame indexes {t e } 1<te≤T Z are such that 1 ≤ t b < t e ≤ T Z . We impose the additional constraint that t et b ≥ T min , i.e., T min + 1 is the minimum number of frames in an action. TP-DFW proceeds in two passes, as follows.

-The action-level pass performs repeated estimations of (20) such as to obtain an alignment cost for each class l and for each sub-sequence Z t b :te :

C(l, t b , t e ) = DFW(Z t b :te , Ỹ l ) ( 36
)
from which we can obtain the best class label l for each sub-sequence with the associated cost:

l(t b , t e ) = argmin l∈L [C(l, t b , t e )] (37) d(t b , t e ) = min l∈L [C(l, t b , t e )] (38)
Equation ( 36) implies that an optimal path is sought for each sub-sequence/template pair (Z t b :te , Ỹ l ) and hence the dynamic frame warping algorithm outlined in section 6 must be applied to each (l, t b , t e ) triplet. Let (t, t ′ (l)) be the current grid point associated with each sub-sequence/template alignment, hence t b ≤ t ≤ t e and 1 ≤ t ′ (l) ≤ T Ỹ l . The corresponding accumulated cost D is initialized as already explained in section 4, namely D(t b , 1(l)) = d(z t b , ỹl 1 ) for each action class l ∈ L, while the remaining grid points of the first row and first column are initialized to ∞. The forward step remains strictly identical to the one explained in detail in section 4. The backward step of this dynamic programming process builds a path from-last-to-first starting at (t e , T Ỹ l ) and necessarily ending at (t b , 1(l)). This allows to estimate a table of labels l and a table of alignment costs d indexed by (t b , t e ), i.e., ( 37) and ( 38).

-The sequence-level pass takes as input these two tables, both indexed by (t b , t e ), and attempts to align the unknown sequence with a string of action templates such as to minimize an overall accumulated distance and such that an optimal partitioning of the form of ( 2) is eventually obtained. For this purpose, dynamic programming is invoked as follows. Let t b and t e be the horizontal and vertical indexes of a DP grid, e.g., Fig. 4. Hence, there is a sub-sequence Z t b :te , a cost d and a label l associated with each grid point (t b , t e ), with 1 ≤ t b < t e ≤ T Z .

The task of the sequence-level DP pass is to find an optimal path, namely:

 * = argmin  | Â| j=1 d(t b,j , t e,j ) (39)
The accumulated cost of this DP process is estimated with:  * = {t b,j , t e,j } J j=1 with J = |  * |. Since there is an action label associated with each grid point, the path  * corresponds to an optimal segmentation of the unknown sequence Z as well as to a synthesized string of J class templates:

D(t b , t e ) = d(t b , t e ) + min k∈[1,t min b ] D(k, t b -1), if t e ≥ t max
   Z 1:T Z = (Z t b,1 :te,1 , . . . Z t b,j :te,j , . . . Z t b,J :t e,J ) Ỹ l1:l J = ( Ỹ l1 , . . . Ỹ lj , . . . Ỹ l J ) (40)
The sequence-level pass of TP-DFW is illustrated on Fig. 4.

Method Complexity

We now analyze in detail the algorithmic complexity of the proposed methods. We start by analyzing the complexity of isolated recognition using the dynamic frame warping (DFW) algorithm and then we discuss continuous recognition based on OP-DFW or on TP-DFW algorithms. Without loss of generality, we only consider the runtime procedures. Let a super-template Ỹ 1:L be composed of L class-templates Ỹ l , 1 ≤ l ≤ L and let T Y be the average length of a class-template. Moreover, let N be the average number of frame examples associated with a metaframe. Hence, each classtemplate contains, on an average, T Y N frames, while a super template contains LT Y N frames. Moreover, let Z be a test sequence with T Z frames. As before, we denote with K the dimension of the features vectors associated with the per-frame descriptors.

For each action, the forward step of DFW computes a frame-to-metaframe distance and an accumulated cost on a T Y × T Z grid. The frame-to-metaframe distance is computed using ( 17) and ( 18). The former equation needs an iterative solver while the latter can be solved in closed form. Efficient solutions for (17) were suggested, such as the exact solver et al ( 2011) or the greedy solver [START_REF] Tropp | Signal recovery from random measurements via orthogonal matching pursuit[END_REF] (orthogonal matching pursuit, or OMP). Notice that OMP suits well in our case and its complexity is O(|S|KN ). Once the sparse solution is available, the computation of a frame-to-metaframe distance in ( 18) implies the solution of a |S|×|S| linear system [START_REF] Evangelidis | Parametric image alignment using enhanced correlation coefficient maximization[END_REF] whose complexity is O(|S| 3 ). Since ( 18) yields a sparse solution, |S| ≪ K, N and therefore we have |S|KN ≪ |S| 3 . To conclude, in the presence of L action categories, the complexity of isolated recognition based on DFW approximately is

O(|S|KN LT Y T Z + LT Y T Z ). ( 41
)
The only difference between DFW and OP-DFW is that it incorporates the computation of between-action transitions. Between-action transitions are computed at grid points corresponding to the last frame of a class template. Since there are L class-templates, the betweenaction transitions are estimated LT Z times. Hence the complexity of the forward step of OP-DFW approximately is:

O(|S|KN LT Y T Z + LT Y T Z + LT Z ). ( 42
)
The TP-DFW algorithm is more complex for two reasons. First it necessitates two dynamic programming passes: an action-level pass and a sequence-level one. Nevertheless, it can be easily seen from the description of the method that the first pass necessitates more computations than the second one. Let M be the number of sub-sequences of the test sequence Z and let T S be the average length of a sub-sequence. Since t b < t e , there are T 2 Z /2 sub-sequences in Z. However, because we only consider sub-sequences of a minimum length, T min , the number of sub-sequences is (T Z -T min )(T Z -T min + 1)/2. The method starts by computing a grid of frame-to-metaframe distances for all the class-templates, followed by an accumulated-cost grid for each sub-sequence and for each class-template. Hence the complexity of the action-level pass of TP-DFW approximately is O(L|S|KN T Y T Z + M LT Y T S ). Moreover, the sequence-level pass computes a cost at each grid point (t b , t e ), with 1 ≤ t b < t e ≤ T Z . Therefore the complexity of TP-DFW approximately is:

O(|S|KN LT Y T Z + M LT Y T S + T 2 Z /2). ( 43
)
By inspection of ( 41) and ( 42) one can immediately observe that the proposed OP-DFW method is barely more complex that performing isolated recognition within the same framework. The complexity of TP-DFW is higher because the algorithm considers a large number of sub-sequences of the test sequence. Notice however that the second (action-level) pass does not introduce a substantial computation burden.

Null-Class Representation

Robust recognition should be able to deal with videos that include actions that are not labeled in the training dataset, or with truncated actions. This can be done by introducing a null class. We adopt a null-class model inspired from speech and that can be easily incorporated in our methodology. Likewise continuous action recognition, continuous speech entails the recognition of sequences of spoken words corrupted by the presence of noise, background sounds, prosody (non-speech sounds emitted by the speaker), out-of-vocabulary words, badly pronounced words, words from another language, truncated words, etc. It is common practice to model environmental and non-speech sounds with a single-state HMM and out-of-vocabulary words with multi-state HMMs thus modeling their constituent sub-units, e.g., phonemes [START_REF] Gales | The application of hidden Markov models in speech recognition[END_REF]. Sub-unit modeling could also be beneficial for recognizing truncated actions. We already discussed in Section 1 that it is neither practical nor easy to model actions using sub-units, with the notable exception of periodic actions, i.e., section 7.2.

Therefore we propose to model the null class as a template of unit length, i.e., composed of a single metaframe. All the frames in the training data which do not belong to any of the in-vocabulary actions are assigned to the null-class metaframe. The representation of a test frame in terms of a sparse set of model frames, i.e., section 6, allows to robustly estimate a testframe-to-null-class distance and hence to account for the large variability of the null-class examples. Therefore, there is no need to consider within-action transitions inside the null-class. Between-action transitions allow to jump back and forth between the null-class and any action class; they also enable the null-class to successively jump onto itself, thus allowing sequences of arbitrary length to be assigned to the null-class.

Experimental Results

In this section we present in detail results obtained with our method which we compare with two recently published continuous recognition methods Hoai et al (2011); [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF]. The reported results were obtained using the Matlab implementations provided by the authors of these two methods.

We also compare our method with a state-of-the-art HMM implementation [START_REF] Young | The HTK book[END_REF] plugged into both the one-pass and two-pass methods. As outlined before, the proposed algorithms perform sequence-level segmentation and action-level classification, therefore they provide a label for each frame in the test sequence. Accordingly, the performance of the algorithms is quantified through the percentage of true positives (correctly labeled frames).

Datasets

We report experiments with three publicly available datasets, Hollywood-1 Laptev et al ( 2008 The CONTACT dataset consists of three periodic actions, i.e. clap, punch and wave, that are continuously performed by seven actors in a predetermined order, clap-punch-wave, e.g., Fig. 1. Since these are periodic actions formed of repetitive motion patterns, there are two possible ways of annotating the boundaries: between-action annotation and between-motion annotation. Both these boundaries are similarly handled by our one-pass method (see section 7.2). Fig. 1 shows that the results obtained with these two annotations are similar.

The RAVEL dataset has been collected for training human-robot interaction (HRI) tasks Alameda-Pineda et al (2013). The actors were prompted to repeat seven actions: Check-watch, Cross-arms, Scratch-head, Phone-talk, Turn-around, and Drink in a random order. Each set of actions was repeated three times by twelve actors. The actors were not given any particular instructions on how to perform the actions other than coming to a rest position after each action. Consequently, this leads to large intra-action variabilities and to smooth inter-action transitions. This is in strong contrast with the abrupt inter-action transitions associated with the artificially concatenated actions obtained from the isolated-action datasets, e.g., Hollywood-1.

The Hollywood-1 dataset consists in video samples extracted from 32 movies, split in 219 and 211 videos for training and testing respectively. Eight actions are performed in total: Sit-down, Sit-up, Ans-phone, Hugperson, Kiss, Get-out-car, Hand-shake and Stand-up. Since each sample (video) contains a single action, we artificially concatenated isolated-action videos, thus generating 30 test sequences, each being composed of 8 randomly selected actions in an arbitrary order. We trained our method with a subset of actions, namely Answerphone, Hug-person, Kiss, and Sit-down. The rest of the actions were treated as belonging to a null (see section 7. 5 and Hoai et al (2011)). For training, we only used the clean training set while for testing we used both the clean and script training sets. Generally speaking, Hollywood-2 is a very challenging dataset because the action boundaries are not very accurately annotated in both the clean and training sets. This will affect both the continuous and isolated recognition results, because our sequence alignment method remains affected by the presence of truncated actions in the test data. Fig. 5 summarizes the mean temporal lengths of the action categories and their standard deviation for all these datasets. As it can be seen, there are large length variations associated with the three dataest.

Implementation

State-of-the-art methods for frame coding suggest the use of bag-of-words BoW introduced in computer vision by [START_REF] Csurka | Visual categorization with bags of keypoints[END_REF], where each frame is represented by a histogram of features and the histogram bins are identified with the visual words of a visual dictionary. Stop lists and/or weighting schemes increase their accuracy [START_REF] Sivic | Efficient visual search of videos cast as text retrieval[END_REF], since the former keeps very common patterns from contaminating the results by dropping the most common visual words, while the latter weights the contribution of each histogram element and transforms histograms into simple vectors. We adopt such a framework here and we build a K-length visual dictionary based on space-time interest points (STIP) Laptev et al (2008). The volume around such interest points is described by a 162dimensional descriptor (HOG/HOF) by collecting image gradients and local optical flow. Moreover, we enable the inverse-document-frequency (IDF) weighting scheme which down-weights words that occur frequently and works as a stop list as well Manning et al (2008). While the Hollywood-1 and Hollywood-2 datasets provide training and testing examples, a leave-one-out approach was followed for both the CONTACT and RAVEL datasets.

Since STIP features are used, which are sparse spatiotemporal features, we may evidently end up with allzero feature vectors for frames with no motion. A symmetric temporal window around each frame can deal with this. A window of fixed size W around each frame in the video never guarantees the overlap with frames of the non-static components of actions. Furthermore, it tends to over smooth self-discriminative frames for fast actors. Therefore, we use an adaptive-size window, namely we start from a single frame and we symmetrically grow the window size until a predefined number Q of features is gathered. This also offers a solution for variabilities in speed of different actors. Fig. 7 plots the adaptive window size as a function of time for the wave, talk-on-the-phone, and kiss action in the CONTACT, RAVEL, and Hollywood-1 datasets, respectively. The wave action in the CONTACT dataset consists of an actor starting from a standing position, raising hands to wave by just moving his fingers and coming back to a standing position. We can observe that a larger window size is required to aggregate Q features in regions with almost no motions, while a smaller window size is needed around regions containing large motions. A similar behavior is observed for the talkon-the-phone action in the RAVEL dataset. Extremely large window sizes are required to aggregate a sufficient number of features, especially in the middle of the talk-on-the-phone action, since features from both the starting part, where the actor removes the phone from his pocket, and the ending part of the action, where the actor inserts the phone back in his pocket, have to be included. The same goes for the kiss action of the Hollywood-1 dataset. The fixed value of Q reflects narrow windows when the persons move forward to kiss and wide windows when the persons are back to a stand position. In all plots, the action boundaries are marked with the vertical black lines. It is important to note that when we aggregate features across the action boundaries, the motion at the end of the previous action and the beginning of the next action is jointly encoded in the representation of this area. Experimentally, this shows that frames carrying between-category information act as an implicit weighting on the between-action transitions in our proposed algorithm.

The accuracy of continuous recognition can be affected by frames within a metaframe which are not perfectly aligned. This is true especially in the case of the Hollywood-1 dataset, as observed in Fig. 6. This misalignment can, of course, lead to test-frame-to-metaframe misalignments. A test-frame-to-metaframe alignment error can then be propagated in the within-action and between-action transitions, thus affecting the overall recognition accuracy. To compensate for these misalignments, each frame of the test sequence is matched with several metaframes described by a symmetric window. We denote this window by W meta . Note that W meta summarizes successive metaframes of the same category only.

Results

We discuss the performance of OP-DFW and the parameter value influence on the recognition accuracy.

The proposed algorithm finds a string of actions that optimally aligns with a test sequence (3). As already discussed the predefined number of features Q within an adaptive window is an important parameter, somehow correlated with the size K of the feature vectors.

We study how the choice of these parameters affect the recognition accuracy. The results are shown in Fig. 9. In the case of Hollywood-1 and Hollywood-2 datasets, we apply a cross-validation protocol to estimate the parameters K and Q. Then these parameter values are used with all the test videos of these datasets. The CON-TACT and RAVEL datasets do not contain enough training examples to perform cross-validation. Therefore we applied a leave-one-actor-out protocol and obtained values for the two parameters.

For the CONTACT dataset, the recognition accuracy remains constantly high with a varying Q, since the actions are performed in a predefined order. For the RAVEL and the Hollywood-1 datasets, the recognition accuracy first increases and then decreases with the value of Q, as the actions are performed in a random order. Therefore, very large values of Q make the frame representation no longer discriminative. There is a recognition performance peak when Q's is in the range of [50,150], [200, 350], and [200, 350] for the CON-TACT, RAVEL and Hollywood-1 datasets, respectively, while K ∈ [150, 250] yields the maximizers with respect to the dictionary length for all datasets. As a consequence, the recognition performance in RAVEL and Hollywood-1 are optimized for a similar range of both parameters Q and K.

We also study the impact of a varying W meta on the recognition accuracy. We observe that an increase in W meta leads to an increase in the recognition accuracy. This is because W meta accommodates for the variance observed in the frames within consecutive metaframes. This variance is illustrated in Fig. 6. The recognition results are summarized in Table 1. A larger W meta is required for the Hollywood-1 dataset as compared to the RAVEL dataset because of the imperfect alignment in the former and its higher variance of action duration (see 5). As for the CONTACT dataset, changing the W meta does not influence the recognition accuracy because the alignment of frames within the metaframe is already close to perfect, as shown in Fig. 2.

The OP-DFW algorithm is illustrated on Fig. 10. From this figure one can see that the alignment path found by our method (thick white line) follows well the ground truth (thin black line). Fig. 11 shows the confusion matrices corresponding to the optimal parameters, Q and K, for each dataset. The method correctly distinguishes between relatively similar actions such as cross-arms and check-watch from RAVEL, but it has difficulties to discriminate between extremely similar actions such as kiss and hug-person from Hollywood-1. It is important to note that the talk-on-the-phone consistently yields low performance for all values of Q and K. This is because it is an almost motionless action and hence a large window size is needed to gather a sufficient number of features (see also Fig. 7). However, a too large window size leads to a non-discriminative frame descriptor, as discussed above.

It is worth noting that the performance obtained with a fixed Q (the number of spatiotemporal keypoints) is constantly better than the one obtained with a fixed W (the temporal length of a symmetric window around each frame). We recall that a fixed W implies an variable Q, and vice versa. There is however one exception, namely the talk-on-the-phone action just mentioned. The performance in this case yields better recognition performance with a fixed-length window. This is because fixing the length of W prevents the window from being arbitrarily large, e.g., Fig. 7. A confusion matrix for W = 15 and K = 250 is shown on Fig. 8. Moreover, we experimentally verified that the idf weighting scheme has no negative effects on the recognition accuracy and its impact is always beneficial. For example, the maximum recognition accuracy obtained with the idf weighting is 45.72% for the Hollywood-1 dataset, while the score is 43.9% when we disable the weighting.

Comparative Results

In this section we compare our OP-and TP-DFW methods with Hoai et al ( 2011) and [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF], two state-of-the-art methods in continuous action recognition. While Hoai et al ( 2011) and [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF] sug- In Hollywood-1 some misalignments occur due to the complexity of the scenes.

Hollywood- The isolated recognition results are detailed in table 4 (Hollywood-1) and table 5 (Hollywood-2), and summarized in table 6. One may notice that the proposed DFW method performs well on the Hollywood-1 dataset in comparison with Laptev et al (2008), while the performance on the Hollywood-2 dataset is less good. The reason is twofold:

-Firstly, the action boundaries are not very accurately annotated in the sequences of Hollywood-2. This means that the first and last frames of many sequences do not exactly correspond to the first and last frames of an action. Clearly, global-video representations perform better in such cases. -Secondly, Hollywood-2 contains two periodic actions, Run and Fight-Person and DFW cannot deal with actions composed of concatenated patterns. As it can be seen in table 5, this limitation is the main cause of degraded performance on this dataset.

We applied the OP-DFW method to the Fight-Person and Run examples of Hollywood-2 dataset (last column of table 5). We modeled these two periodic actions as sequences of motion patterns (see section 7.2); the alignment path generated by OP-DFW jumps an arbitrary number of times from the last frame of a pattern to the first frame of the next pattern. The difference between the alignment paths obtained with DFW and OP-DFW in the case of periodic actions are illustrated with two examples on figure 13. A bad sequence alignment resulting from DFW is shown on Fig. 14. 4) with several datasets reveal that Hollywood-2 remains, to date, the most challenging dataset for isolated recognition. Finally, it should be noted that global-video representations perform much better that per-frame representations in the presence of truncated actions.

Discussion and Conclusions

The problem addressed in this paper, continuous action recognition, is more challenging than isolated recognition because action classification and action-boundary detection must be simultaneously carried out. For this reason, per-video (or global-video) representations, widely used by isolated recognition methods, are not appropriate because these representations do not embed between-action information, which is needed to detect transitions from one action to another.

We propose a novel methodology based on sequence alignment using a per-frame representation. We build on the well known dynamic time warping framework and devise a novel representation of actions based on templates. An action-template is a time-series of metaframes that are produced by mutual alignments between all the training examples associated with a category. This per-metaframe representation allows to account for the large variabilities associated with actions in different contexts and performed by various people.

When different actions are continuously performed, action-transition information is implicitly encoded in the data. Therefore, it is not only necessary to describe within-action information but between-action information as well. In order to incorporate this kind of knowledge we use a sliding temporal window, centered at each frame, and whose length is adjusted onto the data, such that a minimum number of spatiotemporal features are included in a frame descriptor, regardless of the "speed of action". Using training examples that consist in long sequences composed of several annotated actions, it is therefore possible to encode between-action information in the first and last frames of each action in the training data.

The proposed one-pass dynamic frame warping method simultaneously labels the frames of a test sequence and detects jumps between consecutive actions. We claim that the dual use of within-action and between-action transitions can also handle periodic motions formed of repetitive motion patterns. In this case, a periodic motion is viewed as a sequence of motion patterns and the OP-DFW algorithm is able to jump from pattern to pattern. We also discuss how a null-class can be incorporated into this one-pass framework.

For completeness, we also propose an alternative continuous recognition algorithm that proceeds sequentially: recognition followed by segmentation, namely twopass dynamic frame warping. We analyze in detail the algorithmic complexity of both algorithms and conclude that OP-DFW has the same order of complexity as the standard DTW algorithm. Hence, the proposed extension is barely more complex than isolated recognition based on sequence alignment. TP-DFW is more complex because it has to consider a large number of subsequences of the test sequence. Nevertheless, one advantage of TP-DFW over OP-DFW is that it can allow consecutive actions to slightly overlap. Another advantage of TP-DFW is that the first pass can use any isolated action recognition method and representation, including discriminative classification using global-video descriptors. Therefore, TP-DFW has the potential to deal with truncated actions, for which global descriptors are more robust. We did not explore these numerous possibilities of TP-DFW and leave it for future work.

We conducted a thorough experimental comparison which provides evidence that OP-DFW outperforms two state of the art methods that were recently proposed Hoai et al (2011), [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF]. TP-DFW and the two methods just cited share similar recognition and segmentation performances, which is not surprising at all since the three methods rely on the same two-pass strategy.

Fig. 1

 1 Fig. 1 The proposed one-pass dynamic frame warping algorithm performs simultaneous action recognition and segmentation. Like any other DTW-based method, our algorithm proceeds in two steps. The forward step computes an accumulated cost at each grid point (warm colors indicate high cost values) based on a test-frame-to-model-frame distance. The cost at every grid point contains within-action and between-action transition information. The backward step extracts a minimum-cost path (shown in white) that assigns an action label to each frame of the test video. The example shows three periodic actions: punch, clap and wave. Each one of these actions is composed of an arbitrary number of motion patterns. The proposed formulation offers two possibilities for dealing with periodic actions: either each periodic-action model is aligned with a test sub-sequence (top left of the figure) or each motion-pattern model is repeatedly aligned with a test sub-sequence (top right). While the former jumps from one action to the next, e.g., "clap-wave-punch" (from the left to the right), the latter jumps from one motion pattern to the next, e.g., "clap-clap-clap", "wave-wave-wave", and "punch-punch-punch" (see section 7.2 for more details). The bottom row of the figure shows a between-action boundary detected by the algorithm.

  : there are six training examples X clap 1 to X clap 6 corresponding to six different actors. Once these sequences are aligned, an action template Y clap and a class template Ỹ clap are obtained.

Fig. 2

 2 Fig. 2 This figure illustrates the concepts of class-templates and of metaframes using the clap action. The training examples X clap 1

  Fig. 3 This figure illustrates the forward (a) and the backward steps (b) of the OP-DFW algorithm. Each square denotes a grid point (t, t ′ (l)). (a) The forward step is initialized at the first frame (1, t ′ (l)) of each action template, shown by green squares. The accumulated cost D, the bakpointers φ and the length constraint T are updated at each grid point by enforcing the between-action and the within-action transitions as indicated by the red squares. (b) The alignment path, where alignments within actions are shown in red and the action jumps are shown in yellow. The path is initialized at one of the blue squares, i.e, one of the last frames of the action templates, and is backtracked. The dotted vertical grid lines materialize the estimated action boundaries.

  Fig. 4 This figure illustrates the sequence-level pass of the TP-DFW algorithm with a test sequence Z 1:9 and T min = 2. The action-level pass (which is not shown) assigns an action label (37) and an alignment cost (38) at each grid point, i.e., at each possible sub-sequence of Z 1:9 . (a) An example of three possible transitions from the sub-sequences ending in t e = 5 to a sub-sequence starting in t b = 6, namely from Z 1:5 , Z 2:5 , or Z 3:5 to Z 6:8 . (b) A different way of representing the possible transitions between actions ending at t e = 5 and actions starting at t b = 6.

=

  t b -T min and t max b = t b + T min . The forward step applies the above transition rule to each grid point. The backward step finds an optimal path

  ), Hollywood-2 Marszalek et al (2009), RAVEL 2 Alameda-Pineda et al (2013), as well as with a dataset specifically gathered and annotated for evaluating continuous action recognition methods: the continuous action (CONTACT) dataset.

2Fig. 5

 5 Fig.5The mean (blue) and the standard deviation (red) of the temporal lengths for each dataset and for each action category.

  The Hollywood-2 dataset Marszalek et al (2009) consists in a collection of videos corresponding to twelve isolated actions. These videos were manually extracted from 69 different movies. There are 823 manually annotated training examples (clean training set), 810 manually annotated test examples (clean test set), as well as 810 automatically annotated training examples (script training set).

Fig. 6 Fig. 7

 67 Fig. 6 Four metaframes sampled from the Answer-Phone category, shown horizontally. Four training examples of sequences associated with this category are shown vertically. As it can be seen, there is a large variability in the training dataset. The proposed test-frame-to-metaframe distance copes with these large within-category variations.

Fig. 8

 8 Fig. 8 Confusion matrix for fixed window size W = 15 frames and K = 250.

Fig. 9 AFig. 10

 910 Fig.9A 3D plot of the recognition accuracy as a function of the dictionary length K and of Q. An important observation is that the recognition accuracy remains constant with respect to Q for the CONTACT dataset because the actions are always performed in the same order in the test data. In RAVEL and Hollywood-1 datasets the recognition accuracy first increases and then decreases with respect to Q because for large values of Q the per-frame feature representation is no longer discriminative.

Fig. 11

 11 Fig. 11 Confusion matrices corresponding to the highest recognition accuracy obtained for each dataset. The diagonals indicate the percentage of frames correctly labelled in the test video sequences.

  Fig. 12 Continuous recognition alignments between test data (top row) and training data (bottom row) obtained with OP-DFW. In CONTACT and RAVEL the test frames are consistently aligned with training frames associated with the same actor.In Hollywood-1 some misalignments occur due to the complexity of the scenes.

  Fig. 13 This figure shows the test-frame-to-metaframe distance grids (warm colors correspond to large discrepancies) and alignment paths (white lines) for the Run and Fight-Person sequences of Hollywood-2. The top plots, a) and b), show the result of applying DFW. In this case, the algorithm failed to properly align the test sequences with the corresponding class templates. One may notice that there is no obvious "low-cost" path visible on these grids, therefore DFW fails to find a good alignment and a satisfactory score. The bottom plots, c) and d), show the result of applying OP-DFW to exactly the same test sequences, where Run and Fight-Person actions are modeled by their constituting motion patterns. Hence, OP-DFW jumps from one motion pattern to the next one. Examples of alignments with DFW and OP-DFW are shown on Fig. 14.

Fig. 14

 14 Fig. 14 Isolated recognition alignments using DFW and OP-DFW for periodic actions. The figure shows the alignments between a test video, (a) and (d), and metaframes from the training data for the Run and Fight-Person examples shown in Fig. 13.

Table 1

 1 Results obtained with OP-DFW for different lengths of W meta .

	W meta	1	3	5	7	9
	Hollywood-1 21.5 35.6	42.3	45.72 45.6
	Ravel	60.3 62.1 64.33 61.33 59.3

Table 5

 5 Detailed isolated recognition results obtained with the Hollywood-2 dataset.

	Answer-Phone	15.7	18.0
	Drive-Car	87.6	86.1
	Eat	54.8	56.3
	Fight-Person	73.9	51.2	56.4
	Get-Out-Car	33.4	33.4
	Hand-Shake	20.0	23.5
	Hug-Person	37.8	41.7
	Kiss	52.1	55.4
	Run	71.1	61.2	65.6
	Sit-Down	59.0	58.6
	Sit-Up	23.9	31.0
	Stand-Up	53.3	54.4
	Average	48.6	47.6
	use a per-frame representation based on STIP features
	and on HOG/HOF local descriptors, i.e., section 8.2,
	hence a video is represented by a time series of fea-
	ture vectors, one vector describing a window centered
	on each one of the frames in the video. The results
	obtained with DFW are compared with Laptev et al
	(2008) (Hollywood-1 dataset) with Sanchez-Riera et al
	(2012) (RAVEL dataset), and with Ullah et al (2010)

2 Ullah et al (2010) DFW OP-DFW (Hollywood-2 dataset), while the results of OP-DFW are compared with Ullah et al (2010) (Hollywood-2 dataset). We chose these methods for our comparisons for two reasons: because they also use STIP features and because they provide recognition scores for each action category. Nevertheless, both Laptev et al (2008) and Ullah et al (2010) make use of per-video (global) representations, namely there is one feature vector associated with a video. It is interesting to notice that the best performing isolated action recognition methods also use global video representations, e.g., Jiang et al (2012), Solmaz et al (2013), Jain et al (2013), and Wang and Schmid (2013). The latter is based on dense trajectory features and yields the best results on various datasets.

Table 6

 6 clearly shows that[START_REF] Wang | Action recognition with improved trajectories[END_REF] outperforms both our method and[START_REF] Ullah | Improving bagof-features action recognition with non-local cues[END_REF]. Moreover, the results reported in[START_REF] Wang | Action recognition with improved trajectories[END_REF] (table

The authors acknowledge support from the European project HUMAVIPS #247525 (2010HUMAVIPS #247525 ( -2013) ) and from the ERC Advanced Grant VHIA #340113 (2014VHIA #340113 ( -2019)). J. Cech acknowledges support from the Czech Science Foundation Project GACR P103/12/G084.

K. Kulkarni gest two different action-level recognition methodsbased on multi-class support vector machines for the former and on semi-Markov models for the latter -they share the same segmentation-level algorithm, which is essentially based on dynamic programming, namely the sequence-level procedure described in detail in section 7.3. Therefore, one can state that Hoai et al (2011) and [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF] belong to the two-pass class of methods for simultaneous recognition and segmentation.

Matlab code of the methods described in Hoai et al (2011) and [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF] are publicly available. We use these authors' implementations in all our comparisons. We were able to reproduce the results reported by the authors for the Hollywood-1 dataset. We also applied these two methods to the RAVEL dataset.

To make this comparison complete, we also implemented an HMM-based continuous recognition method. A discriminative HMM, with a maximum mutual information (MMI) criteria, is trained with a predefined number of states. We use the frame representation described in Sec. 8.2. The training consists of two steps: firstly, an HMM is trained for each action category using the Baum-Welch algorithm; secondly, the mutual information between the training data and the action models is maximized [START_REF] Gales | The application of hidden Markov models in speech recognition[END_REF]. The number of states was set to 4 and 6 for the RAVEL and Hollywood-1 datasets, respectively. The HMM states are modeled with a Gaussian mixture. We experimentally found that 4 components per state were sufficient to model the state's distribution. HMM-based sequence alignment can be used with both the one-pass and the two-pass schemes, where DTW is simply replaced by Viterbi. We refer to these two algorithms as OP-HMM and TP-HMM. We used a very recent toolkit to train the HMMs [START_REF] Young | The HTK book[END_REF].

The results obtained with our two methods, with Hoai et al (2011); [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF], [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF], OP-HMM, and TP-HMM are summarized in Table 2. The average precision for each action of the Hollywod-1 dataset, obtained with the proposed OP-DFW and with Hoai et al (2011); [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF], are summarized in Table 3.

We notice that OP-DFW outperforms the other methods and that TP-DFW and Hoai et al ( 2011) yield comparative performance. The OP-DFW algorithm is able to exploit between-action information available in the feature vectors. Fig. 12 shows that OP-DFW tends to align test-frames with example frames corresponding to the same actor in CONTACT and RAVEL. The twopass methods cannot exploit between-action transition information embedded in the data. The performance obtained with the HMM-based algorithms is poor because, as already discussed, it is not possible to encode sub-units of actions. We conclude that the proposed OP-DFW method is better suited for continuous recognition than all the other two-pass methods, namely, TP-DFW, TP-HMM, Hoai et al (2011); [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF] and [START_REF] Shi | Discriminative human action segmentation and recognition using SMMs[END_REF].

While the primary objective of this paper is to address continuous action recognition, we also evaluate our algorithms in the case of isolated action recognition, i.e., the action boundaries are known and the task is reduced to action classification. Our approach offers two possibilities in this case, namely DFW and OP-DFW. The first possibility (DFW) corresponds to the combination of dynamic time warping (section 4) with the frame-to-metaframe distance (sections 5 and 6). The second possibility (OP-DFW) consists in applying the algorithm of section 7.1 to a test sequence that contains a single (isolated) action. In both cases we Although isolated recognition is not the primarily objective of our work, we also conducted experiments with two isolated-action datasets, Hollywood-1 and Hollywood-2, and we provided detailed comparisons with Laptev et al ( 2008) and [START_REF] Ullah | Improving bagof-features action recognition with non-local cues[END_REF]. The periodic actions of Hollywood-1, e.g., Hand-Shake, do not seem to affect our method which outperforms Laptev et al (2008). Hollywood-2 contains twelve actions. There are two periodic actions, Fight-Person and Run, for which [START_REF] Ullah | Improving bagof-features action recognition with non-local cues[END_REF] performs better than our method. With both these datasets we used the same isolated recognition algorithm, based on dynamic frame warping, and which only makes use of within-action transitions.

Nevertheless, if a periodic action is treated as a sequence composed of repetitive motion patterns, the proposed OP-DFW method is well suited, because it allows transitions between motion patterns. This has been validated experimentally with the CONTACT dataset and with the Run and Fight-Person of Hollywood-2. Finally, it should be noted that the best performing isolated recognition methods use global-video representations, which perform much better than per-frame representations, such as ours, in the presence of truncated actions.

In the future we plan to extend our method to audiovisual data. Indeed, human activities are often synchronized with speech or prosodic sounds. It is therefore tempting to define audio-visual descriptors that combine visual and acoustic features. A recent gesture recognition challenge provides a multimodal dataset (color, depth and audio) [START_REF] Escalera | Multimodal gesture recognition challenge 2013: Dataset and results[END_REF]. It is interesting to note that out of 17 teams that submitted their results, only one team used dynamic programming for segmentation. The winning team proposed an HMM method for audio recognition and segmentation, and dynamic time warping for skeletal classification.