Hybrid Gravitational Search Algorithm with Swarm Intelligence for Object Tracking Henry Wing Fung Yeung1 ✉ , Guang Liu1, Yuk Ying Chung1, Eric Liu1, and Wei-Chang Yeh2 (
1
)
School of Information Technologies, University of Sydney, Sydney, NSW 2006, Australia
[email protected] 2 Department of Industrial Engineering and Engineering Management, National Tsing Hua University, P.O. Box 24-60 Hsinchu 300, Taiwan, Republic of China
Abstract. This paper proposes a new approach to object tracking using the Hybrid Gravitational Search Algorithm (HGSA). HGSA introduces the Gravita‐ tional Search Algorithm (GSA) to the field of object tracking by incorporating Particle Swarm Optimization (PSO) using a novel weight function that elegantly combines GSA’s gravitational update component with the cognitive and social components of PSO. The hybridized algorithm acquires PSO’s exploitation of past information and fast convergence property while retaining GSA’s capability in fully utilizing all current information. The proposed framework is compared against standard natural phenomena based algorithms and Particle Filter. Experi‐ ment results show that HGSA largely reduces convergence to local optimum and significantly out-performed the standard PSO algorithm, the standard GSA and Particle Filter in terms of tracking accuracy and stability under occlusion and nonlinear movement in a large search space. Keywords: Object tracking · Gravitational Search Algorithm · Particle Swarm Optimization
1
Introduction
Object tracking, defined as the process of locating a target object across a sequence of video frames, has received much attention in recent decades. Algorithms such as Kalman Filter and Particle Filter have been widely applied to accommodate the need for a fast and accurate object tracker that matches the human vision system. Kalman Filter [1] is a state-space model which recursively compute the optimal state with lowest possible variance. This approach is highly efficient but is limited by its ability in recognizing deformed or occluded objects. Particle Filter [2] does not have such shortcomings. However, it has relatively high computation cost and suffers from low performance in the case of motion blur and disappearance of target object. Promising results have been achieved using algorithms developed based on natural phenomena. Two prominent examples are Genetic Algorithm and Particle Swarm Opti‐ mization (PSO) [3–6]. The Genetic Algorithm was developed based on the process of evolution. It proved useful in object tracking but suffered from parameter tuning © Springer International Publishing AG 2016 A. Hirose et al. (Eds.): ICONIP 2016, Part I, LNCS 9947, pp. 213–221, 2016. DOI: 10.1007/978-3-319-46687-3_23
214
H.W.F. Yeung et al.
problems and low convergence speed. PSO, on the contrary, has proven to be outstanding both in terms of speed and accuracy. However, it suffers from pre-mature convergence to a local optimum and imbalance particle diversity. The Gravitational Search Algorithm (GSA) was first introduced in Rashedi et al. (2009) as a new optimization algorithm based on the Newtonian gravity and the laws of motion [7]. Since then, variations of GSA have been widely applied in solving a diverse range of problems, including parameter tuning and function optimization [8–11]. However, it has not yet been applied to object tracking. GSA has an advantage over PSO since it utilizes all current information provided by the system of agents instead of only the local best of a particle and the global best in the swarm of PSO. This gives GSA better exploration capability and prevents pre-mature convergence to a local optimum. In contrast to PSO, GSA fails to retain the past results during the update process and has a slower convergence speed. A better algorithm can be achieved by incorporating the memory feature and fast convergence property of PSO into GSA while retaining the exploration power of GSA. This paper proposes a new approach to object tracking using a Hybrid Gravitational Search Algorithm (HGSA) by optimally combining GSA with PSO with a novel weight function. Section 2 gives a detailed outline on the application of the standard GSA in object tracking. Section 3 describes the standard PSO algorithm. Section 4 provides the theoretical foundation for the proposed HGSA. Section 5 presents the experiment results using HGSA, the standard GSA, the standard PSO and Particle Filter algorithm. Section 6 concludes the paper.
2
GSA in the Framework of Object Tracking
GSA was originally developed from the natural phenomenon of the gravitational forces for the purpose of optimizing multi-dimensional mathematical functions. Modification is made below to incorporate GSA into the framework of object tracking. Prior to the start of tracking, a HSV histogram representation of the target object is extracted as the feature model from the first frame and is stored as a reference for comparison. A system of I agents given in Eq. (1), each represents a potential candidate of the tracking solution, is then initialized in a given search space.
) ( X = x1 , … , xI
(1)
Each agent has two dimensions describing its x and y coordinates which is the center of a rectangle that has similar size to the target object. During the update process, a HSV histogram representation of the said rectangle is extracted and compared to the target object using the Bhattacharyya distance, represented in the Eq. (2): √ √ K √ ∑ √ ( ) 1 √1 − fiti Hi , HT = 1 − √ Hi (k)HT (k) √ 2 k=1 ̄ ̄ Hi HT K
(2)
Hybrid Gravitational Search Algorithm with Swarm Intelligence
215
where Hi and HT denote the histogram representations of the ith agent where i ∈ {1, … , I} and the target respectively. H̄ refers to the mean of the histogram and K denotes the total number of histogram bins. The Bhattacharyya Distance is chosen for its robustness in handling deformation and rotation of target objects. The fitness values of the agents are calculated by subtracting the Bhattacharyya distances from 1 and are then used as input to Eq. (3) in calculating the inertial mass of each agent. mi (t) =
fiti (t) − worst(t) best(t) − worst(t)
(3)
where best(t) and worst(t) correspond to the highest and the lowest fitness value of the set of agents at time t . A heavier inertial mass mi (t) means that an agent is a better candidate and therefore requires a larger force to move. Using mi (t), the mass ratio denoted in Mi (t) is calculated for each agent in Eq. (4). m (t) Mi (t) = ∑I i m (t) i=1 i
(4)
The mass ratio Mi (t) divides the mass of an agent by the total mass of the whole set of agents. This represents the relative mass of a particular agent and is used as the input for the calculation of the gravitational force F in Eq. (5)
Fij (t) = G(t)
Mi (t) × Mj (t) ( ) xj (t) − xi (t) Rij (t) + 𝜀
(5)
where j ∈ {1, … , I} and i ≠ j. Rij (t) is the Euclidian distance between the agents i and j and 𝜀 is a small constant that prevents the division of zero in the case that two agents appear in the same position within the search space. Fij (t) is a two dimensional vector representing the x and y component of the force acting on the agent. G(t) is the gravi‐ tational constant given by Eq. (6).
( )𝛼 1 G(t) = G t
(6)
where G is a pre-defined constant, t is the current iteration and 𝛼 < 1 is a parameter controlling the convergence speed of GSA. G(t) allows the agents to search more aggressively in the search space at early iterations and facilitates convergence at the end. The forces acting on a particular agent is summed in a stochastic manner and is divided by the agent’s mass ratio, giving the acceleration vector of the agent at time t :
∑I ai (t) =
j=1,i≠j j
Rj ⋅ Fij (t)
Mi (t)
ai (t) is then used in the update the position of the agents using Eqs. (8) and (9).
(7)
216
H.W.F. Yeung et al.
vi (t + 1) = Rvi (t) + ai (t)
(8)
xi (t + 1) = xi (t) + vi (t + 1)
(9)
where R is a random vector in [0, 1] and vi (t) is the velocity of the agent at time t . The above-mentioned process is iterated and the best fitting agent is output as the solution for a particular frame at the end of the iteration. For the following frame, agents are reinitialized around the solution of last frame for better tracking results.
3
The Standard PSO Algorithm
Particle Swarm Optimization is a search strategy developed from swarm behaviors such as bird flocking and fish schooling [5]. Similar to the system of agents in GSA, PSO requires the initialization of a swarm of particles and the evaluation of the fitness of each particle, followed by velocity updates according to Eq. (10). ( ) ( ) vi (t + 1) = w ⋅ vi (t) + R1 ⋅ C1 ⋅ PBest − xi (t) + R2 ⋅ C2 ⋅ GBest − xi (t)
(10)
where PBest t denotes the location of an individual particle that, among past and present iterations, gives the highest fitness value and GBest denotes the location that, among all particles in past and present iterations, gives the highest fitness value. C1 and C2 are constant that by convention is set to 2 whereas w is set to 1. The first random component updates particles based on the difference between their current location and the PBest while the second random component updates particles based on their current location and the GBest. Intuitively, the first component is the ‘cognition’ part, reflecting the individual thinking of the particles whereas the second component is the ‘social’ part, giving the particle’s behavior within the whole cohort of particles. These two components allow PSO to perform update on particles using past information and to ensure that the best solution found is not lost during the process of iteration. The new velocities of the particles from Eq. (10) are used to update the location of the particles with an equation identical to Eq. (9). This process is repeated and, at the end of all iterations, gives the GBest as the solution.
4
The Proposed HGSA
The standard GSA described above with Eqs. (1)–(9) can be further simplified and modified to gain potential improvements in tracking performance. Since GSA updates the agents based on all current fitness values, it is less likely than PSO to suffer from pre-mature convergence to local optimum and diversity loss. However, the lack of memory in the standard GSA not only reduces its efficiency in finding the best solution, but also induces the possibility of losing a better solution that was found previously. Therefore, the incorporation of PSO memory and fast convergence property into GSA can draw from the best of both worlds.
Hybrid Gravitational Search Algorithm with Swarm Intelligence
217
The derivation of HGSA starts with Eq. (5) which can be reformulated by factorising the term G ⋅ C(t) stated in Eq. (11) to give Eq. (12). C(t) keeps the gravitational force high in early iterations to facilitate exploration of the search space.
Fij (t) = G ⋅ C(t)
( )𝛼 1 = G ⋅ C(t) G(t) = G t
(11)
Mi (t) ⋅ Mj (t) ( ) xj (t) − xi (t) = G ⋅ C(t) ⋅ f ij (t) Rij (t) + 𝜀
(12)
By substituting Eq. (12) into Eq. (7) and perform the same factorization, it gives Eq. (13) for j ≠ i. ∑I ai (t) =
j=1
Rj ⋅ C(t) ⋅ f ij (t) Mi (t)
∑I = G ⋅ C(t)
j=1
Rj ⋅ f ij (t)
Mi (t)
= G ⋅ C(t) ⋅ ȧ i (t)
(13)
Pioneer work on hybridising PSO and GSA has been accomplished in research in other fields, for instance, function optimization and economic dispatch problems [8–11]. However, they merely involve the addition of the PSO update components to the GSA with little or no modification and are unfit for application in the context of object tracking. In the proposed approach, the velocity update of the agents is redesigned to synthesize the standard GSA component with two extra components from PSO, represented in Eq. (14). vi (t + 1) = R0 ⋅ vi (t) + C(t) ⋅ G ⋅ ȧ i (t) + (1 − C(t)) ( ( ) ( )) ⋅ R1 ⋅ C1 ⋅ PBest − xi (t) + R2 ⋅ C2 ⋅ GBest − xi (t)
(14)
Equation (14) is a modification of Eq. (10) using C(t) to incorporate the PSO compo‐ nents. C(t) is a function that starts off at 1 and gradually approaches 0 as iteration increases and therefore is used as a weight to synthesize the two algorithms. At early iterations, larger weight is given to the GSA component to search more thoroughly. As more iterations are completed, the weight is shifted from the GSA component to the cognitive and social components of PSO to allow for more rapid convergence. The parameter 𝛼 which takes value from 0 to 1 in Eq. (12) determines the dynamic rate of shifting towards PSO. A low value of 𝛼 indicates that the function C(t) decreases more slowly, resulting in a more gradual shift towards PSO. In addition, the parameter G serves as an adjustable weight that fine-tunes the static balance of the GSA and PSO components. In HGSA, PBest and GBest are documented throughout the whole iteration process, thus giving better results by safeguarding the memory of the historically best solutions. From Eq. (3), for a given set of agents, the one that has the lowest fitness values always results in a zero mass. It follows that the mass ratio of that particular agent will also be zero, leading to a division by zero in Eq. (7). Moreover, the purpose of Eq. (3) in the original GSA is to normalize the fitness values of the agents to between 0 and 1. Since the output of the Bhattacharyya distance is already normalized, it is therefore
218
H.W.F. Yeung et al.
desirable to equate the output of Eq. (2) directly to the inertial mass mn (t). The flowchart in Fig. 1 gives an abstract view of HGSA in object tracking.
Fig. 1. Flowchart of HGSA
5
Experiment Results
The performance of HGSA was primarily compared with the standard GSA and the standard PSO algorithm. Particle Filter is included as a benchmark for the robustness of our results. The number of agents/particles in HGSA, GSA and PSO are set to 20 and the number of iterations is set to 10, totaling 200 particles per frame. Number of particles in Particle Filter is set to 200. HGSA is found to have the best performance with the parameters G = 250, 𝛼 = 0.6, 𝜀 = 0.1, C1 = 2 and C2 = 2. Same values of G, 𝛼 and 𝜀 are adopted in GSA and C1 and C2 are adopted in PSO. All parameters are chosen at the values that maximizes algorithms’ performance from repeated trials. Many agent/swarm based frameworks impose restriction on particles/agents move‐ ment by imposing a sub-search space as a boundary [5, 6]. This sub-search space concentrates particles/agents around the target object and thus increases algorithm effi‐ ciency. In testing, the sub-search space is set to 200*200 instead of the standard 30*30 for better visualization of the difference in performance among algorithms. Test 1 was conducted using the ship video. The target object in this video is a white ship moving linearly in a large frame. Test 2 was conducted using a video of a moving coin. The coin is partially occluded by a human hand and is moved out of and back into frame. The frames of interest of the two tested videos are documented in Tables 1 and 2 while the Euclidean errors of all algorithms for each frame are documented in Figs. 2
Hybrid Gravitational Search Algorithm with Swarm Intelligence
219
and 3. Error during occlusion is set to 0 for better visualization. Link to results: https:// www.youtube.com/channel/UCrQAWuVqzbqzvAjkJxo9cZA. Table 1. Ship video (1920 × 1080)
Frame 43
Particle Filter
PSO
GSA
HGSA
133
166
Table 2. Coin video (720 × 480)
Frame 1
Particle Filter
PSO
GSA
HGSA
70
278
The video in test 1 contains a ship that moves linearly from left to right. This video provides a large search area with many sub-optimums, for instance the cliff and the horizon, which have similar histogram composition to the target ship. It can be observed from Fig. 2 that both HSGA and GSA had very low error and were on track of the target throughout the whole video whereas Particle Filter lost the target object from frame 210 onwards. PSO had a few peaks of errors and lost the target object from frame 144 to frame 230. Since the sub-search space was large relative to the size of the target object, the particles/agents were more likely to miss the target in early iterations. If a solution with similar histogram composition as the target, for instance, the PSO solution in frame 43, 133 and 166 in Table 1 was found instead, particles/agents had a tendency to
220
H.W.F. Yeung et al.
Fig. 2. Error comparison - ship
Fig. 3. Error comparison - coin
converge pre-maturely to that local optimum. This explains the poor performance of PSO. On the other hand, HGSA and GSA, with better exploration capability, were able to successfully locate the target object. In the coin video, a coin was first placed at the center of the frame. As shown in Table 2 frame 70, a finger was positioned on top of the coin to occlude nearly all of the coin’s surface. Then the coin was gradually moved towards the edge of the frame. It then disappeared from frame 95 onwards and reappeared in frame 273. Prior to the disappearance of the coin in test 2, HGSA successfully tracked the coin in all frames while the other algorithms had temporary deviations from the target. After the reap‐ pearance of the coin, only HGSA was capable in providing satisfactory tracking result. PSO and GSA jumped frequently to local optimums and Particle Filter lost the target permanently as shown in Table 2 frame 278. Testing results showed that HGSA outperforms other algorithms in both accuracy and stability in tracking of occluded and non-linear moving targets.
6
Conclusion
This paper proposes a new Hybrid Gravitational Search Algorithm for object tracking by incorporating PSO into GSA. HGSA retains GSA’s capability in fully utilizing all current information while introduces PSO’s exploitation of past information and fast convergence property. The choice of the novel weight function ensures the smooth inte‐ gration of PSO into GSA, allowing HGSA to optimally balance the merits of both algo‐ rithms. Experiment results show that, keeping other factors constant, HGSA has a significantly higher accuracy and stability when tracking in a large search space with sub-optimums. An outstanding result is also achieved in occlusion handling and tracking of non-linear moving targets. Future research will aim to implement a weight adjustment function for changing particle inertia in HGSA.
Hybrid Gravitational Search Algorithm with Swarm Intelligence
221
References 1. Li, X., Wang, K., Wang, W., et al.: A multiple object tracking method using Kalman filter. In: 2010 IEEE International Conference on Information and Automation (ICIA), pp. 1862– 1866. IEEE (2010) 2. Walia, G.S., Kapoor, R.: Intelligent video target tracking using an evolutionary particle filter based upon improved cuckoo search. Expert Syst. Appl. 41(14), 6315–6326 (2014) 3. Lee, G., Mallipeddi, R., Jang, G.J., et al.: A genetic algorithm-based moving object detection for real-time traffic surveillance. IEEE Signal Process. Lett. 22(10), 1619–1622 (2015) 4. Eberhart, R.C., Kennedy, J.: A new optimizer using particle swarm theory. In: Proceedings of the Sixth International Symposium on Micro Machine and Human Science, vol. 1, pp. 39– 43 (1995) 5. Sha, F., Bae, C., Liu, G., et al.: A categorized particle swarm optimization for object tracking. In: 2015 IEEE Congress on Evolutionary Computation (CEC), pp. 2737–2744. IEEE (2015) 6. Sha, F., Bae, C., Liu, G., et al.: A probability-dynamic Particle Swarm Optimization for object tracking. In: 2015 International Joint Conference on Neural Networks (IJCNN), pp. 1–7. IEEE (2015) 7. Rashedi, E., Nezamabadi-Pour, H., Saryazdi, S.: GSA: a gravitational search algorithm. Inf. Sci. 179(13), 2232–2248 (2009) 8. Mirjalili, S., Hashim, S.Z.M.: A new hybrid PSOGSA algorithm for function optimization. In: 2010 International Conference on Computer and Information Application (ICCIA), pp. 374–377. IEEE (2010) 9. Jiang, S., Ji, Z., Shen, Y.: A novel hybrid particle swarm optimization and gravitational search algorithm for solving economic emission load dispatch problems with various practical constraints. Int. J. Electr. Power Energy Syst. 55, 628–644 (2014) 10. David, R.C., Precup, R.E., Petriu, E.M., et al.: PSO and GSA algorithms for fuzzy controller tuning with reduced process small time constant sensitivity. In: 2012 16th International Conference on System Theory, Control and Computing (ICSTCC), pp. 1–6. IEEE (2012) 11. Gu, B., Pan, F.: Modified gravitational search algorithm with particle memory ability and its application. Int. J. Innovative Comput. Inf. Control 9(11), 4531–4544 (2013)