# Transfer Learning and Identification Method of Cross-View Target Trajectory Utilizing HMM

Authors: Long Liu; Le Yang; Jie Ding
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

The behavior identification of the target trajectory is one of the important issues in space behavior analysis. Since the target trajectory model obtained from a fixed view cannot be adapted to the change of the observation perspective, it needs to be retrained when being faced with a new view, which leads to a great amount of increment in application cost. This study proposes a hidden Markov model (HMM) based on the cross-view transfer learning and the recognition method that firstly constructs a linear mapping relationship between the observation matrices of the source and target view utilizing the domain trajectory of the HMMs and obtains the observation matrix parameters of the target domain through the mapping system. Secondly, the transfer probability of the source domain is further optimized to obtain the target domain of the HMM and to identify the behavior of the target domain trajectory utilizing a small number of samples from the view of the target domain. The experimental results denote that the proposed method could effectively realize the identification of the trajectory behavior utilizing a small sample size in the target domain and would greatly reduce the application cost of the identification of the cross-view target trajectory.


---

## Body

## 1. Introduction

Target trajectories reveal important information on target behavior, and the identification of the trajectory is an important part pertinent to understanding an event and behavior analysis. In real applications, a video surveillance system often composes of multiple cameras located at different angles. The motion trajectory of the same target is displayed differently from diverse perspectives. The training of the trajectory model relies on samples from a fixed perspective. When the perspective alters, new samples need to be collected and retrained, leading to the excessively high training cost for the trajectory model, which would greatly raise the application cost of the identification of the trajectory behavior. This is not conducive to its promotion. Pointing out that it has a high application value and practical importance to research on the behavior identification method of the low-cost cross-view target trajectory.Hidden Markov model (HMM) [1–8] could effectively model time-series signals and is a powerful tool to model the target tracking. Qiming and Cheng propose that trajectory modeling is executed according to the trajectory coordinate sequence [1]. In this method, the trajectory sequence is firstly clustered, and then, the corresponding HMM trajectory model is attained utilizing the training of the diverse categories. Dapeng et al. suggest that the HMM is utilized to model the trajectory of the enemy submarine and to predict the trajectory of the target to provide operational information support for warship operations [2]. Hervieu et al. propose that the curvature and velocity of the coordinate points are utilized for the HMM trajectory modeling, and the trajectory characteristics are invariant to translation, rotation, and scaling [3]. Qian and Lau suggest that a layered HMM is proposed to model the continuous target trajectory in a multilayer scene that leads to both a low-level HMM to model the single-layer trajectory and a high-level HMM connecting the multilayer trajectory to form the target trajectory model [4].On the other hand, transfer learning has gradually become an important research area in machine learning in recent years since it mainly has resolved the problem related to the learning of the cross-domain knowledge and could realize the model migration when the data of the target domain is unlabeled and the data of the source domain is called a multisource. Moreover, it has a high theoretical value in many practical problems. Transfer learning, which relaxes two basic assumptions in traditional machine learning, is a new method in the field of machine learning. Its main characteristics could be summarized as follows: (1) there must be enough samples to learn for a good classification model. (2) Both the training samples were utilized for learning, and the new test samples meet the conditions of independence and identical distribution properties. Some scholars have proposed various HMM transfer methods for some cross-domain applications. For instance, Van Kasteren et al. propose that a parameter transfer learning method utilizes the HMM that constructs the sensor mapping relationship according to the location information of the spatial structure and then finds out the parameters of the HMM utilizing the EM algorithm [9]. Zheng et al. propose that, it takes the received real-time signal intensity of mobile devices as the observed value to construct the HMM positioning model and realizes the transfer of it at different times in the same position [10]. Bingtao et al. suggest that giving weight to the sample data of the source domain by calculating the similarity between the source domain and the target domain sample data, then finds out the HMM parameters in the weighted data set, and improves the learning algorithm to realize the instance-based HMM transfer learning [11]. Similar research studies conducted by Kim et al. propose that an HMM transfer method utilizing the maximum a posterior (MAP) and maximum likelihood linear regression (MLLR) is applied to speech and text recognition [12–15]. Some empirical research studies related to HMM are Fei et al. in [16, 17].As a contribution to this research area, to solve the low-cost application problem of the HMM trying to determine the trajectory behavior in different perspectives, this manuscript proposes an HMM-based transfer learning and recognition method for the behavior of the target trajectory where the cases consist of the perspective samples of the sufficient source domain, and the perspective samples of few marked target domain exist. This method achieves the purpose of transfer learning and recognition by transferring the trajectory behavior model in the source perspective domain and optimizing a small number of samples in the target domain, which provides an effective way to resolve the mentioned problem.


## 2. The Proposed Model: Trajectory Modeling and Simulation

### 2.1. Target Trajectory Model Based on the HMM

Hidden Markov model (HMM) is a probabilistic model describing the process of time series, which can be described by five components denoted by a quintupleλ=N,M,A,B,andπ. Moreover, its simplified form is represented by λ=A,B,andπ:(1)
N indicates the number of hidden states in the model. All states in the model are interconnected, and any state can be reached from other states.(2)
M represents the observation symbol of each hidden state in the model, i.e., the number of observation states.(3)
A is called the probability distribution of state transition. A=aij, where, aij=pQt+1=j|Qt=i, 0≤aij≤1, and ∑i=1Naij=1,1≤i,j≤M. Qt is called the hidden state at time t.(4)
B is called the probability distribution of the observable state in the hidden state at moment j, B=bik, where, bik=pQt=k|Qt=iand1≤i≤N,0≤k≤M. Qt is called the observable state at time t.(5)
π is called the distribution of the initial state π=πi, where πi=pQ0=i,1≤i≤N.According to the basic definition of the HMM, this manuscript firstly conducts the HMM modeling for the target trajectory. The direction angle of the trajectory of the target in a unit of time is utilized as the observation characteristic. The sequence of the angle representing the trajectory information is called the observable state vector. The hidden state is called the transfer characteristic of the angle change of the target trajectory. The angular direction of the target trajectory is computed by(1)φt=tan−1yt−yt−1xt−xt−1,where xt,yt and xt−1,yt−1 are called the target positions at time t and t − 1, respectively. According to φt, the observed value Qt is attained by discretizing the 24-direction freeman code depicted in Figure 1. The parameters of the trajectory of the HMM are obtained by training.Figure 1
24-direction freeman code.The trajectory presented in Figure2 is utilized for modeling. The coordinate sequence of the target trajectory is presented in Table 1. The angle characteristic is computed by (1), and its discretization is presented in Table 2. While the number of the hidden states called N is set to 4, that of observation called M is set to 24. The probability vector of the initial state denoted by π is defined as uniform distribution. The transfer probability and the probability distributions of the observation are initialized randomly. The trajectory samples above are trained by the Baum–Welch algorithm to attain the parameters of the initial distribution π, transfer probability matrix A, and observation probability matrix B, respectively, that are presented in Table 3.Figure 2
Target behavior trajectory. (a) The tracked target trajectory is overprinted on the background image. (b)A sequence of the tracked target trajectories.Table 1
Centroid coordinate sequence of the target trajectory.
P1P2P3P4P5P6P7P8P9P10X280278275272270269266262258252Y155157160169169170173177182189Table 2
Direction freeman code of the target trajectory.
i2345678910φi 0°135°135.6°161.6°90.0°135.0°135.0°135.0°141.3°139.4°Code10101171010101010Table 3
The parameters of the HMM trajectory.
π1:4,10.00000.00001.00000.0000A1, 1 : 40.00240.99760.00000.0000A2, 1 : 40.00000.00000.05360.9464A3, 1 : 41.00000.00000.00000.0000A4, 1 : 40.90440.00000.09560.0000B1, 7 : 120.00000.00000.00000.92610.00000.0739B2, 7 : 120.00000.00000.00000.71530.28310.0000B3, 7 : 120.00000.00000.00000.71690.28310.0000B4, 7 : 120.08350.16700.41740.00150.33060.0000


### 2.2. Simulation of the Target Trajectory

There are two important assumptions in the HMM, which are expressed as follows: (1) homogeneous Markov Chain hypothesis, that is, the hidden state at any time only depends on its previous hidden state. (2) Observation independence hypothesis, that is, the observed state at any time only depends on the hidden state at the current time.As presented in Figure3, the hidden Markov Chain based on the above hypothesis is determined by the initial state probability vector and the state transfer probability matrix A. Hence, the result of which is to generate an unobservable hidden state sequence. The observation probability matrix B and the hidden state sequence are combined to determine the way of generating an observable sequence.Figure 3
The simulation process of the HMM.Given the HMM model in the form ofλ=N,M,A,B,andπ, the observation sequence O=O1,O2,…,OT could be generated by the algorithm steps presented in Table 4. According to the initial coordinates of the trajectory and the sequence of the observed values, the coordinates of the trajectory sequence could be uniquely determined.Table 4
Algorithm of the simulation of the HMM to generate data.
Algorithm steps of the simulation of the HMM to generate data.(1) According to the initial state probability distributionπ = πi, select an initial state Q1=i(2) Fort = 1, 2, 3, K, and TAccording to the output probability distributionbjk of state i, output Qt=k;END ForThe trajectory of the HMM is trained and simulated under four different circumstances, and the results are presented in Figure4.Figure 4
Simulation data generated by the training model of the target trajectory from different views (from top to bottom are different views, from left to right are the target trajectory samples, and the results of the simulation generated by the training model).
(a)(b)(c)(d)


### 2.3. Statistical Analysis of the Trajectory Characteristics from Different Perspectives

To further analyze the relationship between the characteristics of the target trajectory from diverse perspectives, this manuscript utilizes both a straight line and curve trajectories as illustrative examples to examine their statistical characteristics of the observation characteristics from diverse perspectives. When the target linear trajectory is a concern, Figure5 denotes the observation of the linear motion of the same target from two different perspectives. The statistical features of the characteristics of the target trajectory observation from two different perspectives are presented in Figure 6 suggesting that the statistical envelope of the trajectory characteristics between the two perspectives is very similar, while the center of gravity is different.Figure 5
The position change of the linear trajectory of the same target in different perspectives (from top to bottom are the perspectives 1 and 2 and from left to right are the frames 22, 33, 44, 55, and 66).
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)Figure 6
The statistical frequency curves of the characteristics of the linear trajectory from different perspectives.The trajectory of the curve motion is presented in Figure7. Statistical analysis is conducted on the observation characteristics from different perspectives, and the characteristic of the statistical curve is presented in Figure 8 suggesting that the statistical characteristic of the curved trajectory from different perspectives have a certain similarity.Figure 7
Position change of the curved trajectory of the same target under different perspectives (from top to bottom are called the perspectives 1 and 2, from left to right are called the positioning of the target under different perspectives, and the trajectory of the target under different perspectives).
(a)(b)Figure 8
Statistical frequency curves of the characteristics of the curve trajectory from different perspectives.To sum up, although there exist differences in the perspective, a certain correlation exists in the performance of the feature sequence of the target trajectory. If there were more tracks along a certain direction, they would accumulate near the characteristic coding of that direction. Hence, it can be considered that the characteristic frequency curves of the target trajectory from different perspectives denote a certain linear translation.


## 2.1. Target Trajectory Model Based on the HMM

Hidden Markov model (HMM) is a probabilistic model describing the process of time series, which can be described by five components denoted by a quintupleλ=N,M,A,B,andπ. Moreover, its simplified form is represented by λ=A,B,andπ:(1)
N indicates the number of hidden states in the model. All states in the model are interconnected, and any state can be reached from other states.(2)
M represents the observation symbol of each hidden state in the model, i.e., the number of observation states.(3)
A is called the probability distribution of state transition. A=aij, where, aij=pQt+1=j|Qt=i, 0≤aij≤1, and ∑i=1Naij=1,1≤i,j≤M. Qt is called the hidden state at time t.(4)
B is called the probability distribution of the observable state in the hidden state at moment j, B=bik, where, bik=pQt=k|Qt=iand1≤i≤N,0≤k≤M. Qt is called the observable state at time t.(5)
π is called the distribution of the initial state π=πi, where πi=pQ0=i,1≤i≤N.According to the basic definition of the HMM, this manuscript firstly conducts the HMM modeling for the target trajectory. The direction angle of the trajectory of the target in a unit of time is utilized as the observation characteristic. The sequence of the angle representing the trajectory information is called the observable state vector. The hidden state is called the transfer characteristic of the angle change of the target trajectory. The angular direction of the target trajectory is computed by(1)φt=tan−1yt−yt−1xt−xt−1,where xt,yt and xt−1,yt−1 are called the target positions at time t and t − 1, respectively. According to φt, the observed value Qt is attained by discretizing the 24-direction freeman code depicted in Figure 1. The parameters of the trajectory of the HMM are obtained by training.Figure 1
24-direction freeman code.The trajectory presented in Figure2 is utilized for modeling. The coordinate sequence of the target trajectory is presented in Table 1. The angle characteristic is computed by (1), and its discretization is presented in Table 2. While the number of the hidden states called N is set to 4, that of observation called M is set to 24. The probability vector of the initial state denoted by π is defined as uniform distribution. The transfer probability and the probability distributions of the observation are initialized randomly. The trajectory samples above are trained by the Baum–Welch algorithm to attain the parameters of the initial distribution π, transfer probability matrix A, and observation probability matrix B, respectively, that are presented in Table 3.Figure 2
Target behavior trajectory. (a) The tracked target trajectory is overprinted on the background image. (b)A sequence of the tracked target trajectories.Table 1
Centroid coordinate sequence of the target trajectory.
P1P2P3P4P5P6P7P8P9P10X280278275272270269266262258252Y155157160169169170173177182189Table 2
Direction freeman code of the target trajectory.
i2345678910φi 0°135°135.6°161.6°90.0°135.0°135.0°135.0°141.3°139.4°Code10101171010101010Table 3
The parameters of the HMM trajectory.
π1:4,10.00000.00001.00000.0000A1, 1 : 40.00240.99760.00000.0000A2, 1 : 40.00000.00000.05360.9464A3, 1 : 41.00000.00000.00000.0000A4, 1 : 40.90440.00000.09560.0000B1, 7 : 120.00000.00000.00000.92610.00000.0739B2, 7 : 120.00000.00000.00000.71530.28310.0000B3, 7 : 120.00000.00000.00000.71690.28310.0000B4, 7 : 120.08350.16700.41740.00150.33060.0000


## 2.2. Simulation of the Target Trajectory

There are two important assumptions in the HMM, which are expressed as follows: (1) homogeneous Markov Chain hypothesis, that is, the hidden state at any time only depends on its previous hidden state. (2) Observation independence hypothesis, that is, the observed state at any time only depends on the hidden state at the current time.As presented in Figure3, the hidden Markov Chain based on the above hypothesis is determined by the initial state probability vector and the state transfer probability matrix A. Hence, the result of which is to generate an unobservable hidden state sequence. The observation probability matrix B and the hidden state sequence are combined to determine the way of generating an observable sequence.Figure 3
The simulation process of the HMM.Given the HMM model in the form ofλ=N,M,A,B,andπ, the observation sequence O=O1,O2,…,OT could be generated by the algorithm steps presented in Table 4. According to the initial coordinates of the trajectory and the sequence of the observed values, the coordinates of the trajectory sequence could be uniquely determined.Table 4
Algorithm of the simulation of the HMM to generate data.
Algorithm steps of the simulation of the HMM to generate data.(1) According to the initial state probability distributionπ = πi, select an initial state Q1=i(2) Fort = 1, 2, 3, K, and TAccording to the output probability distributionbjk of state i, output Qt=k;END ForThe trajectory of the HMM is trained and simulated under four different circumstances, and the results are presented in Figure4.Figure 4
Simulation data generated by the training model of the target trajectory from different views (from top to bottom are different views, from left to right are the target trajectory samples, and the results of the simulation generated by the training model).
(a)(b)(c)(d)


## 2.3. Statistical Analysis of the Trajectory Characteristics from Different Perspectives

To further analyze the relationship between the characteristics of the target trajectory from diverse perspectives, this manuscript utilizes both a straight line and curve trajectories as illustrative examples to examine their statistical characteristics of the observation characteristics from diverse perspectives. When the target linear trajectory is a concern, Figure5 denotes the observation of the linear motion of the same target from two different perspectives. The statistical features of the characteristics of the target trajectory observation from two different perspectives are presented in Figure 6 suggesting that the statistical envelope of the trajectory characteristics between the two perspectives is very similar, while the center of gravity is different.Figure 5
The position change of the linear trajectory of the same target in different perspectives (from top to bottom are the perspectives 1 and 2 and from left to right are the frames 22, 33, 44, 55, and 66).
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)Figure 6
The statistical frequency curves of the characteristics of the linear trajectory from different perspectives.The trajectory of the curve motion is presented in Figure7. Statistical analysis is conducted on the observation characteristics from different perspectives, and the characteristic of the statistical curve is presented in Figure 8 suggesting that the statistical characteristic of the curved trajectory from different perspectives have a certain similarity.Figure 7
Position change of the curved trajectory of the same target under different perspectives (from top to bottom are called the perspectives 1 and 2, from left to right are called the positioning of the target under different perspectives, and the trajectory of the target under different perspectives).
(a)(b)Figure 8
Statistical frequency curves of the characteristics of the curve trajectory from different perspectives.To sum up, although there exist differences in the perspective, a certain correlation exists in the performance of the feature sequence of the target trajectory. If there were more tracks along a certain direction, they would accumulate near the characteristic coding of that direction. Hence, it can be considered that the characteristic frequency curves of the target trajectory from different perspectives denote a certain linear translation.


## 3. Transfer Learning Based on the Trajectory of the HMM

For the recognition of the cross-view target trajectory, small sample data are employed in this research utilizing the transfer learning strategy to obtain the trajectory of the HMM model for the target view and to realize the low-cost modeling of the behavior model of the cross-view trajectory. The basic idea of the HMM model based on the transfer learning in this manuscript is presented as follows: firstly, according to the statistical translation of the trajectory characteristics in the different perspectives in Section2.3, the linear regression model is constructed to attain the mapping between the source domain and the target domain concerning the HMM observation probability matrices of the characteristics, which leads to obtaining the observation probability. Secondly, the transfer probability matrix is randomly initialized, and the simulation data are generated. The objective optimization function is constructed according to the similarity between the simulation and the domain data of the target. Finally, the parameters of the transfer probability matrix for the trajectory HMM utilizing the target domain are obtained through the iterative optimization, and the transfer learning process of the cross-view HMM is realized.


### 3.1. Transfer of the Observation Probability Matrix B

The key to the transfer of the observation probability matrix is to determine the mapping relationship between the feature spaces of the target domain and the source domain. By utilizing this mapping relationship to transfer the HMM parameters of the source domain, a parameter model is formed that can reflect the target trajectory characteristics of the target domain.In this manuscript, the least square method is adopted to construct the mapping model, and the trajectory characteristic of the mapping model under two different perspectives is assumed to be represented by(2)Ot¯=wOs+b,where w and b are called the coefficients of a curve equation fitting by feature mapping, Os is called a coding sample of the source domain, and Ot¯ is called the coding data of the target domain after the mapping. The objective function is defined by(3)∑Ot−Ot¯2=∑Ot−wOt+b2,where Ot is called the encoding data of the real target domain.According to the statistical analysis of the trajectory characteristics in Section2.3, the transfer of the parameter of the observation probability mainly includes three steps. First, both perspective trajectory samples of the source domain and target domain are collected. Each group of samples contains the source domain that is labeled as the samples of the same behavior and as a small number of target domains that are labeled as the samples. The source domain of the HMM trajectory model denoted by λS=AS,BS,πS is obtained according to the method of the training model in Section 2.1. Then, the linear regression mapping model about source domain and target domain features is constructed. Finally, the observation probability denoted by BT of the target domain is attained utilizing the relation transfer matrix BS of the linear regression.


### 3.2. Transfer Learning Algorithm of the Transfer Probability Matrix A

Ignoring the effect of the initial distribution, the initial distributionπS of the source domain is directly migrated to the target domain to form πT, and the transition probability of the source domain acts as the transition probability of the initial value A^T of the target domain. Then, the transferred initial HMM is denoted by λ^T=A^T,BT,πT. In this study, the optimization algorithm is utilized to adaptively optimize the transfer of the model parameters to attain better performance of the target domain model. The parameters of the optimized target source model are more suitable for the target domain data, that is, the more similar the simulation data of the optimized model to the target domain data would be, the better it would converge. The objective function is defined by(4)minΔAsimOT¯,OT=simgA^T+ΔA,BT,πT,OT,where g⋅ is the mean value of the data generated by the simulation λA^T+ΔA,BT,πT and ΔA is called a variable in the optimization problem. The trajectory data is simulated according to the algorithm steps in Section 2.2. The inherent characteristics of the HMM require that the transition matrix is non-negative and the sum of row elements is equal to 1, so the constraint conditions of this optimization problem are that the elements of the transition probability matrix A^T and A^T+ΔA are non-negative and the sum of row elements is equal to 1. The measurement of similarity is determined by the Euclidean distance, which is defined by(5)dOT¯,OT=∑OT¯−OT2,where O¯T and OTare the mean values of the feature sequence set of the simulated trajectory model represented by λ^T=A^T,B^T,πT and target domain, respectively. Hence, both of which belong to the same trajectory category. The similarity computation is defined by(6)simO¯T,OT=11+dO¯T,OT.Utilizing the constraints and objective function presented above, the interior point method is undoubtedly one of the most suitable methods to resolve the optimal valueΔA. Table 5 presents the steps of this solution procedure leading to the optimality of ΔA employing the interior point method. The similarity between the simulated data of the target domain model and OT is calculated. If the similarity is greater than or equal to the similarity threshold denoted by δ, the obtained ΔA from the previous optimization step is re-entered into the iteration of the interior point method as the initial value until the computed similarity is less than the threshold δ, and then, the HMM λT=A^T+ΔA,BT,πT=AT,BT,πT of the target domain is attained.Table 5
Steps of the algorithm of the transition probability optimization.
Steps of the algorithm of the transition probability optimization.(1) Simulate the trajectory samples by modelλA^T,BT, andπT(2) Calculate the similarity between simulation set and target domain label sample set: sim(3) While sim>δSolveΔA according to the interior point method, update A^Tto A^T+ΔASimulate trajectory samples via the modelλA^T,BT,andπTCalculate the similarity between simulation set and target domain label sample set: simEND While


### 3.3. HMM Transfer Learning and Recognition Framework

To resolve the problem of the recognition of the cross-view target trajectory, this manuscript proposes a cross-view HMM transfer method. The algorithm framework is presented in Figure9. Utilizing the objective function analysis, the statistics of the characteristics of the target trajectory under the two perspectives suggest a linear relationship. Therefore, the mapping function between the characteristic spaces of the source domain and the target domain is first obtained by resolving an optimization problem based on the linear regression model. Utilizing the mapping function, the parameters of the observation probability of the source domain are transferred. Then, the similarity between the generated data of the simulated HMM and the labeled data obtained from the target domain perspective is computed to further optimize the transition probability of the source domain. Hence, the target domain HMM is obtained. Finally, the forward algorithm is utilized to assess the match, classification, and identification of the cross-view target trajectory.Figure 9
The HMM transfer method framework.λS=AS,BS,andπS represents the source domain of the HMM; λT=AT,BT,πT represents the target domain of the HMM; PO|λT is called the probability of the occurrence of the observation value sequence O in the model λT.


## 3.1. Transfer of the Observation Probability Matrix B

The key to the transfer of the observation probability matrix is to determine the mapping relationship between the feature spaces of the target domain and the source domain. By utilizing this mapping relationship to transfer the HMM parameters of the source domain, a parameter model is formed that can reflect the target trajectory characteristics of the target domain.In this manuscript, the least square method is adopted to construct the mapping model, and the trajectory characteristic of the mapping model under two different perspectives is assumed to be represented by(2)Ot¯=wOs+b,where w and b are called the coefficients of a curve equation fitting by feature mapping, Os is called a coding sample of the source domain, and Ot¯ is called the coding data of the target domain after the mapping. The objective function is defined by(3)∑Ot−Ot¯2=∑Ot−wOt+b2,where Ot is called the encoding data of the real target domain.According to the statistical analysis of the trajectory characteristics in Section2.3, the transfer of the parameter of the observation probability mainly includes three steps. First, both perspective trajectory samples of the source domain and target domain are collected. Each group of samples contains the source domain that is labeled as the samples of the same behavior and as a small number of target domains that are labeled as the samples. The source domain of the HMM trajectory model denoted by λS=AS,BS,πS is obtained according to the method of the training model in Section 2.1. Then, the linear regression mapping model about source domain and target domain features is constructed. Finally, the observation probability denoted by BT of the target domain is attained utilizing the relation transfer matrix BS of the linear regression.


## 3.2. Transfer Learning Algorithm of the Transfer Probability Matrix A

Ignoring the effect of the initial distribution, the initial distributionπS of the source domain is directly migrated to the target domain to form πT, and the transition probability of the source domain acts as the transition probability of the initial value A^T of the target domain. Then, the transferred initial HMM is denoted by λ^T=A^T,BT,πT. In this study, the optimization algorithm is utilized to adaptively optimize the transfer of the model parameters to attain better performance of the target domain model. The parameters of the optimized target source model are more suitable for the target domain data, that is, the more similar the simulation data of the optimized model to the target domain data would be, the better it would converge. The objective function is defined by(4)minΔAsimOT¯,OT=simgA^T+ΔA,BT,πT,OT,where g⋅ is the mean value of the data generated by the simulation λA^T+ΔA,BT,πT and ΔA is called a variable in the optimization problem. The trajectory data is simulated according to the algorithm steps in Section 2.2. The inherent characteristics of the HMM require that the transition matrix is non-negative and the sum of row elements is equal to 1, so the constraint conditions of this optimization problem are that the elements of the transition probability matrix A^T and A^T+ΔA are non-negative and the sum of row elements is equal to 1. The measurement of similarity is determined by the Euclidean distance, which is defined by(5)dOT¯,OT=∑OT¯−OT2,where O¯T and OTare the mean values of the feature sequence set of the simulated trajectory model represented by λ^T=A^T,B^T,πT and target domain, respectively. Hence, both of which belong to the same trajectory category. The similarity computation is defined by(6)simO¯T,OT=11+dO¯T,OT.Utilizing the constraints and objective function presented above, the interior point method is undoubtedly one of the most suitable methods to resolve the optimal valueΔA. Table 5 presents the steps of this solution procedure leading to the optimality of ΔA employing the interior point method. The similarity between the simulated data of the target domain model and OT is calculated. If the similarity is greater than or equal to the similarity threshold denoted by δ, the obtained ΔA from the previous optimization step is re-entered into the iteration of the interior point method as the initial value until the computed similarity is less than the threshold δ, and then, the HMM λT=A^T+ΔA,BT,πT=AT,BT,πT of the target domain is attained.Table 5
Steps of the algorithm of the transition probability optimization.
Steps of the algorithm of the transition probability optimization.(1) Simulate the trajectory samples by modelλA^T,BT, andπT(2) Calculate the similarity between simulation set and target domain label sample set: sim(3) While sim>δSolveΔA according to the interior point method, update A^Tto A^T+ΔASimulate trajectory samples via the modelλA^T,BT,andπTCalculate the similarity between simulation set and target domain label sample set: simEND While


## 3.3. HMM Transfer Learning and Recognition Framework

To resolve the problem of the recognition of the cross-view target trajectory, this manuscript proposes a cross-view HMM transfer method. The algorithm framework is presented in Figure9. Utilizing the objective function analysis, the statistics of the characteristics of the target trajectory under the two perspectives suggest a linear relationship. Therefore, the mapping function between the characteristic spaces of the source domain and the target domain is first obtained by resolving an optimization problem based on the linear regression model. Utilizing the mapping function, the parameters of the observation probability of the source domain are transferred. Then, the similarity between the generated data of the simulated HMM and the labeled data obtained from the target domain perspective is computed to further optimize the transition probability of the source domain. Hence, the target domain HMM is obtained. Finally, the forward algorithm is utilized to assess the match, classification, and identification of the cross-view target trajectory.Figure 9
The HMM transfer method framework.λS=AS,BS,andπS represents the source domain of the HMM; λT=AT,BT,πT represents the target domain of the HMM; PO|λT is called the probability of the occurrence of the observation value sequence O in the model λT.


## 4. Experimental Results and Analysis

### 4.1. Experimental Evaluation

The data sets employed in this experiment are all self-collected data, which come from the simultaneous shooting of two cameras installed in the 10 × 12 m2 room. The 100 samples of three kinds of trajectories (300 in total) from view A of the first camera can better reflect the real movement behavior of the moving target. The 300 samples are taken as the source domain data set, while the corresponding 300 samples of the view B of the second camera are taken as the target domain sample. All collected samples are manually marked. In this manuscript, the performance of the model is assessed by the accuracy measurement defined by(7)Accu=naccuNum,where naccu is called the number of the correct trajectory classification and Num is called the total number of the test data.


### 4.2. Analysis of Experimental Results

The first experiment aims to qualitatively compare the performance of the HMM transfer method described in this manuscript with the one that existed in the literature [9]. In this experiment, k is set to some sample values such as (k = 10, 15, 20, 25, 30, 40, and 50) representing each type of the trajectory in the sample set of the target domain that is randomly selected and combined with the sample set of the source domain as the training data. In addition to k number of the selected samples, all other data in the sample set of the target domain are employed as the test data. Figures 10–12 are the comparisons of the accuracies of the test data between the source and the target domains when the number k of each type of trajectory sample changes with the angle of the view θ = 30°, θ = 45°, and θ = 60°, respectively. The experimental results suggest that the accuracy of the method in the experiment is improved with the increment of the number of the target domain samples, k. As the number of the target domain samples increases, the learning algorithm could extract more knowledge from the target domain. When only θ = 60°, the accuracy of trajectory 2 does not improve, or even decreases, indicating that overfitting occurs in this case. It is worth noting that the accuracy of this algorithm increases faster than other algorithms with the increment of samples. When the included angle varies from 30° to 45° and 60°, and k is kept constant, the corresponding accuracy of most trajectories decreases, indicating that the increment of the angle of the view leads to more obvious deformation of the trajectory at different included angles (Figure 12). The experimental results also suggest that when compared with the method researched in [9], this method could achieve a higher recognition rate of the behavior trajectory of the cross-view target utilizing only a small amount of the marked data from the target domain perspective, which would greatly reduce the annotation work of the target domain perspective.Figure 10
The comparison between the proposed method and the method in [9] on the change of the accuracy in testing data utilizing the number of the target domain markers (θ = 30°). (a) Trajectory 1. (b) Trajectory 2. (c) Trajectory 3. (d) Trajectory 4.
(a)(b)(c)(d)Figure 11
The comparison between the proposed method and the method in [9] on the change of the accuracy in testing data utilizing the number of the target domain markers (θ = 45°). (a) Trajectory 1. (b) Trajectory 2. (c) Trajectory 3. (d) Trajectory 4.
(a)(b)(c)(d)Figure 12
The comparison between the proposed method and the method in [9] on the change of the accuracy in testing data utilizing the number of the target domain markers (θ = 60°). (a) Trajectory 1. (b) Trajectory 2. (c) Trajectory 3. (d) Trajectory 4.
(a)(b)(c)(d)In the second experiment, according to the results of the previous experiment, the number of training data of the target domain perspective is fixed to 50. To verify the effectiveness of this method, the proposed method is compared with both Method 1 and Method 2, and the results are recorded. In Method 1, the marked training data from view B are utilized to find out the parameters of the model. The marked data in the number of view B are small, so the leave-one-out cross-validation technique is implemented. In this technique, a group of 20 samples is taken from the target domain data set as the test set, the rest are left as the training data until all samples have been tested. A total ofM times (the size of the data set) are conducted and calculated, and finally, the accuracy is averaged. In Method 2, only the marked training data in view A are utilized to conduct the Baum–Welch algorithm to attain the HMM, and the determined parameters of the model are utilized to attain the accuracy of the test data set of view B.Tables6–8 present the accuracy rates of the different methods at the different θ values. The purpose of the comparison with Method 1 is to decide whether a trained model of the source domain could be utilized directly across visual angles. The results imply that the effect is poor, especially from different views since the knowledge extracted from the source domain cannot be directly applied to the target domain, especially when the two domains differ much. Compared with Method 1, the method in this manuscript greatly improves the outcomes of the recognition. This indicates that although the HMM trajectory modeling is very successful when implemented from a single perspective, its performance would significantly decrease when both cross views and crossing view have a great impact on trajectory recognition. Compared with Method 2, the recognition effect is similar, indicating that when a small data set of the target domain are provided, the performance of the HMM transfer model is almost the same as that of the training model with a large data set of the target domain. In conclusion, the transfer learning method in this manuscript makes use of the prior knowledge that has been already extracted in the source domain model and hence, could effectively identify the cross-view target trajectory. Besides, it does not require a high number of target domain samples. Since there are enough samples in the source domain, which contains a large amount of characteristic information, the transfer learning could utilize only a small target data set to combine with these prior pieces of knowledge to attain better outcomes.Table 6
The accuracies of Method 1, Method 2, and the proposed method (θ = 30°).
MethodsMethod 1Method 2The proposed methodTrajectory 10.950.630.92Trajectory 20.850.610.90Trajectory 30.900.370.88Trajectory 41.000.410.91Average0.930.480.90Table 7
The accuracies of Method 1, Method 2, and the proposed method (θ = 45°).
MethodsMethod 1Method 2The proposed methodTrajectory 10.950.590.90Trajectory 20.900.540.87Trajectory 30.950.390.87Trajectory 40.850.340.90Average0.910.470.89Table 8
The accuracies of Method 1, Method 2, and the proposed method (θ = 60°).
MethodsMethod 1Method 2The proposed methodTrajectory 11.000.390.90Trajectory 20.900.500.87Trajectory 30.850.590.87Trajectory 40.900.370.88Average0.910.460.88In the third experiment, according to the outcomes of the first experiment, the training data of the target domain perspective are fixed to 50, and the performance of the proposed method is compared with the HMM transfer method described in the literature [10, 11].Seen from Tables9–11 that the HMM transfer method in this manuscript is more effective than other HMM transfer methods under the same experimental settings. In the transfer recognition of the cross-view HMM trajectory model, the accuracy rate of the proposed method reaches over 85% in most cases, and the half could be over 90%.Table 9
The accuracies of the methods in the [10, 11] and the proposed method (θ = 30°).
MethodsThe method in [10]The method in [11]The proposed methodTrajectory 10.810.750.92Trajectory 20.790.860.90Trajectory 30.840.880.88Trajectory 40.910.780.91Average0.840.820.90Table 10
The accuracies of the methods in [10, 11] and the proposed method (θ = 45°).
Method sThe method in [10]The method in [11]The proposed methodTrajectory 10.900.680.90Trajectory 20.740.800.87Trajectory 30.820.880.87Trajectory 40.870.790.90Average0.830.790.89Table 11
The accuracies of the methods in [10, 11] and the proposed method (θ = 60°).
MethodsThe method in [10]The method in [11]The proposed methodTrajectory 10.930.770.90Trajectory 20.810.850.87Trajectory 30.710.840.87Trajectory 40.920.810.88Average0.840.820.88The experiments present that the linear regression model based on the least square method can be successfully applied to the transfer learning method of target behavior recognition. The characteristic representation of both the source domain and target domain differs due to the variation of a visual point. To overcome this issue, we need to find statistical patterns between the characteristics of the source domain and the target domain. Then, the curve needs to be fitted. By doing so, transferring the probability distribution of the emission of the source domain adaptively is transferred to the target domain. Hence, it leads to transferring the correlation knowledge between different perspectives and behaviors from one domain to another. The existence of a small number of the labeled samples in the target domain provides a reference for the optimization of the state transition probability of the source domain. The improved and optimized HMM performs well on the data set with higher accuracy and better robustness.


## 4.1. Experimental Evaluation

The data sets employed in this experiment are all self-collected data, which come from the simultaneous shooting of two cameras installed in the 10 × 12 m2 room. The 100 samples of three kinds of trajectories (300 in total) from view A of the first camera can better reflect the real movement behavior of the moving target. The 300 samples are taken as the source domain data set, while the corresponding 300 samples of the view B of the second camera are taken as the target domain sample. All collected samples are manually marked. In this manuscript, the performance of the model is assessed by the accuracy measurement defined by(7)Accu=naccuNum,where naccu is called the number of the correct trajectory classification and Num is called the total number of the test data.


## 4.2. Analysis of Experimental Results

The first experiment aims to qualitatively compare the performance of the HMM transfer method described in this manuscript with the one that existed in the literature [9]. In this experiment, k is set to some sample values such as (k = 10, 15, 20, 25, 30, 40, and 50) representing each type of the trajectory in the sample set of the target domain that is randomly selected and combined with the sample set of the source domain as the training data. In addition to k number of the selected samples, all other data in the sample set of the target domain are employed as the test data. Figures 10–12 are the comparisons of the accuracies of the test data between the source and the target domains when the number k of each type of trajectory sample changes with the angle of the view θ = 30°, θ = 45°, and θ = 60°, respectively. The experimental results suggest that the accuracy of the method in the experiment is improved with the increment of the number of the target domain samples, k. As the number of the target domain samples increases, the learning algorithm could extract more knowledge from the target domain. When only θ = 60°, the accuracy of trajectory 2 does not improve, or even decreases, indicating that overfitting occurs in this case. It is worth noting that the accuracy of this algorithm increases faster than other algorithms with the increment of samples. When the included angle varies from 30° to 45° and 60°, and k is kept constant, the corresponding accuracy of most trajectories decreases, indicating that the increment of the angle of the view leads to more obvious deformation of the trajectory at different included angles (Figure 12). The experimental results also suggest that when compared with the method researched in [9], this method could achieve a higher recognition rate of the behavior trajectory of the cross-view target utilizing only a small amount of the marked data from the target domain perspective, which would greatly reduce the annotation work of the target domain perspective.Figure 10
The comparison between the proposed method and the method in [9] on the change of the accuracy in testing data utilizing the number of the target domain markers (θ = 30°). (a) Trajectory 1. (b) Trajectory 2. (c) Trajectory 3. (d) Trajectory 4.
(a)(b)(c)(d)Figure 11
The comparison between the proposed method and the method in [9] on the change of the accuracy in testing data utilizing the number of the target domain markers (θ = 45°). (a) Trajectory 1. (b) Trajectory 2. (c) Trajectory 3. (d) Trajectory 4.
(a)(b)(c)(d)Figure 12
The comparison between the proposed method and the method in [9] on the change of the accuracy in testing data utilizing the number of the target domain markers (θ = 60°). (a) Trajectory 1. (b) Trajectory 2. (c) Trajectory 3. (d) Trajectory 4.
(a)(b)(c)(d)In the second experiment, according to the results of the previous experiment, the number of training data of the target domain perspective is fixed to 50. To verify the effectiveness of this method, the proposed method is compared with both Method 1 and Method 2, and the results are recorded. In Method 1, the marked training data from view B are utilized to find out the parameters of the model. The marked data in the number of view B are small, so the leave-one-out cross-validation technique is implemented. In this technique, a group of 20 samples is taken from the target domain data set as the test set, the rest are left as the training data until all samples have been tested. A total ofM times (the size of the data set) are conducted and calculated, and finally, the accuracy is averaged. In Method 2, only the marked training data in view A are utilized to conduct the Baum–Welch algorithm to attain the HMM, and the determined parameters of the model are utilized to attain the accuracy of the test data set of view B.Tables6–8 present the accuracy rates of the different methods at the different θ values. The purpose of the comparison with Method 1 is to decide whether a trained model of the source domain could be utilized directly across visual angles. The results imply that the effect is poor, especially from different views since the knowledge extracted from the source domain cannot be directly applied to the target domain, especially when the two domains differ much. Compared with Method 1, the method in this manuscript greatly improves the outcomes of the recognition. This indicates that although the HMM trajectory modeling is very successful when implemented from a single perspective, its performance would significantly decrease when both cross views and crossing view have a great impact on trajectory recognition. Compared with Method 2, the recognition effect is similar, indicating that when a small data set of the target domain are provided, the performance of the HMM transfer model is almost the same as that of the training model with a large data set of the target domain. In conclusion, the transfer learning method in this manuscript makes use of the prior knowledge that has been already extracted in the source domain model and hence, could effectively identify the cross-view target trajectory. Besides, it does not require a high number of target domain samples. Since there are enough samples in the source domain, which contains a large amount of characteristic information, the transfer learning could utilize only a small target data set to combine with these prior pieces of knowledge to attain better outcomes.Table 6
The accuracies of Method 1, Method 2, and the proposed method (θ = 30°).
MethodsMethod 1Method 2The proposed methodTrajectory 10.950.630.92Trajectory 20.850.610.90Trajectory 30.900.370.88Trajectory 41.000.410.91Average0.930.480.90Table 7
The accuracies of Method 1, Method 2, and the proposed method (θ = 45°).
MethodsMethod 1Method 2The proposed methodTrajectory 10.950.590.90Trajectory 20.900.540.87Trajectory 30.950.390.87Trajectory 40.850.340.90Average0.910.470.89Table 8
The accuracies of Method 1, Method 2, and the proposed method (θ = 60°).
MethodsMethod 1Method 2The proposed methodTrajectory 11.000.390.90Trajectory 20.900.500.87Trajectory 30.850.590.87Trajectory 40.900.370.88Average0.910.460.88In the third experiment, according to the outcomes of the first experiment, the training data of the target domain perspective are fixed to 50, and the performance of the proposed method is compared with the HMM transfer method described in the literature [10, 11].Seen from Tables9–11 that the HMM transfer method in this manuscript is more effective than other HMM transfer methods under the same experimental settings. In the transfer recognition of the cross-view HMM trajectory model, the accuracy rate of the proposed method reaches over 85% in most cases, and the half could be over 90%.Table 9
The accuracies of the methods in the [10, 11] and the proposed method (θ = 30°).
MethodsThe method in [10]The method in [11]The proposed methodTrajectory 10.810.750.92Trajectory 20.790.860.90Trajectory 30.840.880.88Trajectory 40.910.780.91Average0.840.820.90Table 10
The accuracies of the methods in [10, 11] and the proposed method (θ = 45°).
Method sThe method in [10]The method in [11]The proposed methodTrajectory 10.900.680.90Trajectory 20.740.800.87Trajectory 30.820.880.87Trajectory 40.870.790.90Average0.830.790.89Table 11
The accuracies of the methods in [10, 11] and the proposed method (θ = 60°).
MethodsThe method in [10]The method in [11]The proposed methodTrajectory 10.930.770.90Trajectory 20.810.850.87Trajectory 30.710.840.87Trajectory 40.920.810.88Average0.840.820.88The experiments present that the linear regression model based on the least square method can be successfully applied to the transfer learning method of target behavior recognition. The characteristic representation of both the source domain and target domain differs due to the variation of a visual point. To overcome this issue, we need to find statistical patterns between the characteristics of the source domain and the target domain. Then, the curve needs to be fitted. By doing so, transferring the probability distribution of the emission of the source domain adaptively is transferred to the target domain. Hence, it leads to transferring the correlation knowledge between different perspectives and behaviors from one domain to another. The existence of a small number of the labeled samples in the target domain provides a reference for the optimization of the state transition probability of the source domain. The improved and optimized HMM performs well on the data set with higher accuracy and better robustness.


## 5. Conclusion

This manuscript mainly deals with identifying the behavior categories of the trajectory data of the target behavior when the cross perspective is a concern. In the case of having insufficient labeling data of the target domain, having difficulty in labeling data and dealing with a higher cost, the problem is transformed into the identification problem of the feature sequence of the trajectory utilizing the HMM transfer learning. Through knowledge transfer of relevant data from different perspectives, the classification model is constructed, and then, the behavior trajectory category of the data to be classified in the target domain is identified. In this manuscript, first, according to the data that is labeled from the perspective of the source domain, an HMM is constructed to train the parameters of the triples; second, the frequency of the coding sequence features utilizing the same type of data that is labeled from the perspectives of the source domain and target domain is computed. Then, the mapping curves of the two perspectives are fitted by the least square. Hence, the observed probability matrix is adaptively transferred by mapping relationships. Afterward, the transition probability based on a small labeled data of the target domain is transferred to the target domain through an optimization algorithm. Therefore, the target domain classification model is constructed. The experimental results on the data set denote that the transfer learning method based on the HMM could construct the classification model, and it has a better performance in the recognition of the cross-view target trajectory when there exist a small number of labeled data in the target domain perspective.



---

*Source: 6656222-2020-12-24.xml*