ϕn(t) ϕn(t-Δt) ϕn(t0+Δt) Xn(t-Δt) Xn(t0+Δt)
...
...
D(t) Xn(t0)Figure 3.3: Graphical model of the BHMIP. Scheme of our classifier, the Bayesian Human Motion Intentionality Predictor.
2009], approximate these destinations as short-term propagations of the current state.
As it can be seen in Fig. 3.2, the angleφnm(t) is defined by the first derivative of the current
trajectory and the xn(t) → Dm vector. By doing this,φnm(t) becomes a measure relative to a
destination, whileθ(t) is a global measure of the target’s orientation. This difference will allow us to obtain a good characterization of the human motion intentionality.
Applying the kernel density estimation method [Silverman,1986] to real HMI databases, we have verified that there exists a high similarity of the pdf of theφ angle and a Gaussian function, or a Von Mises distribution, if we would want to take into account the periodicity of the variable. The scheme depicted in Fig.3.3corresponds to the graphical model that describes the basis of our algorithm. The relation of the destination Dm at time t is given by the relations of
the nodes of this structure and determines the calculation of the probabilities used in the next section.
Although it is out of the scope of the present work, a real implementation requires some filtering of the detections in order to eliminate noise and outliers. We will simply consider that a previous filter exists, but for the understanding of the presentation of our approach it will not be discussed in this chapter.
3.4 The Bayesian Human Motion Intentionality Predic-
tor
The problem of estimating the best destination is reduced to a sequential data classification, where the decision of choosing a destination is taken at each instant of time while the human is walking. There are many well known techniques solving the sequential data classification, such as the Naive Bayesian classifier, Hidden Markov Models or Conditional Random Fields. Our proposed technique is inspired in a Bayesian framework, in order to classify the motion intentionality. We will begin our analysis using an infinite window, that takes into account from the first observed position of the trajectory xn(t0) to the current observation xn(t). We will
discuss later the importance of considering the complete sequence of observed positions of a trajectory, depending on its time elapsed since their observations. Intuitively, we are interested in the more recent observed positions of a trajectory since they are more significant to the destination classification than older ones. In the following subsections we will discuss this statement and formulate our classifier accordingly.
The method proposed in this chapter, denominated Bayesian Human Motion Intentionality Prediction (BHMIP), is a geometric-based method which uses a Bayesian classifier to compute the best prediction to a given destination position, for each position xn(t) of the trajectory
Xn(t) = { xn(t0), xn(t0+ ∆t), . . . , xn(t − ∆t), xn(t)}. We model the pdf function
P ( xn(t)| xn(t−∆t), Dm) = N (φ; 0, σ2φ) (3.3)
conditioned by the previous position xn(t − ∆t) and the desired destination Dm as a Gaussian
function. In Fig.3.4is depicted an example of this probability function to two destinations D1
and D2 centered at the position xn(t), where we calculate their corresponding probabilities
generated by the valuesφ1andφ2.
D2 ϕ1 xn(t) D1 ϕ2 P(xn(t)|D1,xn(t-Δt)) xn(t-Δt) P(xn(t)|D2,xn(t-Δt))
Figure 3.4: Probability distributions. Drawn of the different pdf functions depending on their corresponding destinations D1 in blue and D2 in orange. The probability of each of the
destinations being the intentionality is also depicted, being more likely that the observations match to the intentionality to reachD2.
3.4.1 Naive BHMIP
We have used the Naive Bayesian classifier for its simplicity and the requirement of minimal external parameters to tune. One of its requirements, as we will show later on, is the assumption of independence of their features. The method is simple, it only requires an initial learning of the positions deployed as destinations and it can be generalized to other geometric-based methods. At each position xn(t) of the trajectory Xn(t), we compute the probability to reach different
3.4 The Bayesian Human Motion Intentionality Predictor 23
future destinations Dm, calculating the a posteriori probability function P (Dm| xn(t), xn(t −
∆t)), taking into account the accumulated trajectory Xn(t).
The joint probabilityP ( Xn(t)|Dm) can be obtained easily using the chain rule as follows:
P ( Xn(t)|Dm) = P ( xn(t0), xn(t0+ ∆t), . . . , xn(t − ∆t), xn(t)|Dm) = P ( xn(t)|Dm, xn(t−∆t), . . . , xn(t0)) · P ( xn(t−∆t)|Dm, xn(t−2∆t), . . . , xn(t0)) · .. . P ( xn(t0)|Dm). (3.4)
For each trajectory Xn(t) we have considered Markovian properties, where there are de-
pendencies in positions only between consecutive positions xn(t) and xn(t − ∆t). As it can be
observed in Fig. 3.3, the φn(t) variable is function of two observed position at instants t and
t − ∆t and this information relating the current orientation θ(t)n and the destination Dm can
be treated independently at each instant of time with respect to classifying the destinationDm.
Consequently, we can rewrite (3.4) more compactly as:
P ( Xn(t)|Dm) = P ( xn(t0)|Dm) t
Y
τ =t0+∆t
P ( xn(τ )|Dm, xn(τ−∆t)). (3.5)
Using the Bayes theorem we can compute the posterior probability of the destination Dm,
given the current and previous positions of the trajectoryXn(t)
P (Dm| Xn(t)) =
P ( Xn(t)|Dm)P (Dm)
P ( Xn(t))
, (3.6)
where the prior probabilityP (Dm) to reach the destination Dm is calculated beforehand when
obtaining the map of destinations D, as we will show later.
Accordingly, we formulate the BHMIP in the following manner: if the posterior probability to a specific destinationDmis greater than the posterior probability to go to another destination
Dj, that is
D∗= Dm if P (Dm| Xn(t)) > P (Dj| Xn(t)) ∀m 6= j, (3.7)
then Dm will be the best destinationD∗ describing the current human motion intention. The
intention probability is thus defined by the maximum probability in (3.7)P Dn(t)=D∗| Xn(t),
whereDn(t) is the inner intention at time t for the nth person to reach the destination Dm ∈ D.
intention of (3.7): P Dn(t) = Dm| Xn(t) = P (Dm) P ( Xn(t)) P ( xn(t0)|Dm) t Y τ =t0+∆t P ( xn(τ )|dm, xn(τ−∆t)). (3.8)
This equation serves as the basic approach to formulate our classifier. In the following sub- sections, we propose variations of this formulation in order to overcome the problems generated by changes in intentionality, i.e the inner destinationD∗has changed.
3.4.2 Sliding Window BHMIP
As stated before we want to provide a solution to the questions: what if a person changes her/his path? what if the intentionality of a person changes in the middle of a walk? As we are evaluating partial trajectories Xm(t) and not the full observed trajectory Xm, we don’t know the
true final destination until we have reached it. So in addition to the uncertainty associated to the decision of the best destination, there is the possibility that past observed trajectories truly indicate a correct intentionality until this intentionality changes and its estimation becomes inconsistent with respect to the past observations.
Inspired by the Sliding Window method [Dietterich,2002] for sequential classification, we define the length or the time interval of past positions xn(t), discarding older person’s positions
and keeping the most recent observations. By doing this, we provide a robust solution to changes in intentionality without formulating a completely new approach that overcomes this issue. The resultant classifier is obtained by simply rewriting (3.5) into
P ( Xn(t)|Dm) = t
Y
τ =t−w
P ( xn(τ )|Dm, xn(τ−∆t)). (3.9)
We have defined a new parameterw, the length of observation. This parameter is calculated on a training stage of the algorithm to optimize the results obtained by the BHMIP-SW. The im- provement of this solution, although it is minor when applied on typical or normal trajectories, it has proved to work better specially in abnormal trajectories, where unexpected behaviors of people are observed. We will discuss in Sec.3.5.3more details on this.
3.4.3 Time Decay BHMIP
We have incorporated an additional feature into the BHMIP to weight in a different way the contributions of the past positions to our proposed method. Intuitively, we assume that new observed positions are more determinant than older ones.
If we take a step further the Sliding Window BHMIP, then we require a temporal dependency for the weights or contributions of past poses. Newer observations are more determinant to