A Twofold Siamese Network for Real-Time Object Tracking

Anfeng He, Chong Luo, Xinmei Tian, Wenjun Zeng

Introduction

Visual object tracking is one of the most fundamental and challenging tasks in computer vision. Given the bounding box of an unknown target in the first frame, the objective is to localize the target in all the following frames in a video sequence. While visual object tracking finds numerous applications in surveillance, autonomous systems, and augmented reality, it is a very challenging task. For one reason, with only a bounding box in the first frame, it is difficult to differentiate the unknown target from the cluttered background when the target itself moves, deforms, or has an appearance change due to various reasons. For another, most applications demand real-time tracking. It is even harder to design a real-time high-performance tracker.

The key to design a high-performance tracker is to find expressive features and corresponding classifiers that are simultaneously discriminative and generalized. Being discriminative allows the tracker to differentiate the true target from the cluttered or even deceptive background. Being generalized means that a tracker would tolerate the appearance changes of the tracked object, even when the object is not known a priori. Conventionally, both the discrimination and the generalization power need to be strengthened through online training process, which collects target information while tracking. However, online updating is time consuming, especially when a large number of parameters are involved. It is therefore very crucial to balance the tracking performance and the run-time speed.

In recent years, deep convolutional neural networks (CNNs) demonstrated their superior capabilities in various vision tasks. They have also significantly advanced the state-of-the-art of object tracking. Some trackers integrate deep features into conventional tracking approaches and benefit from the expressive power of CNN features. Some others directly use CNNs as classifiers and take full advantage of end-to-end training. Most of these approaches adopt online training to boost the tracking performance. However, due to the high volume of CNN features and the complexity of deep neural networks, it is computationally expensive to perform online training. As a result, most online CNN-based trackers have a far less operational speed than real-time.

Meanwhile, there emerge two real-time CNN-based trackers which achieve high tracking speed by completely avoiding online training. While GOTURN treats object tracking as a box regression problem, SiamFC treats it as a similarity learning problem. It appears that SiamFC achieves a much better performance than GOTURN. This owes to the fully convolutional network architecture, which allows SiamFC to make full use of the offline training data and make itself highly discriminative. However, the generalization capability remains quite poor and it encounters difficulties when the target has significant appearance change, as shown in Fig.1. As a result, SiamFC still has a performance gap to the best online tracker.

In this paper, we aim to improve the generalization capability of SiamFC. It is widely understood that, in a deep CNN trained for image classification task, features from deeper layers contain stronger semantic information and is more invariant to object appearance changes. These semantic features are an ideal complement to the appearance features trained in a similarity learning problem. Inspired by this observation, we design SA-Siam, which is a twofold Siamese network comprised of a semantic branch and an appearance branch. Each branch is a Siamese network computing the similarity scores between the target image and a search image. In order to maintain the heterogeneity of the two branches, they are separately trained and not combined until the similarity score is obtained by each branch.

For the semantic branch, we further propose a channel attention mechanism to achieve a minimum degree of target adaptation. The motivation is that different objects activate different sets of feature channels. We shall give higher weights to channels that play more important roles in tracking specific targets. This is realized by computing channel-wise weights based on the channel responses at the target object and in the surrounding context. This simplest form of target adaptation improves the discrimination power of the tracker. Evaluations show that our tracker outperforms all other real-time trackers by a large margin on OTB-2013/50/100 benchmarks, and achieves state-of-the-art performance on VOT benchmarks.

The rest of the paper is organized as follows. We first introduce related work in Section 2. Our approach is described in Section 3. The experimental results are presented in Section 4. Finally, Section 5 concludes the paper.

Related Work

Visual object tracking can be modeled as a similarity learning problem. By comparing the target image patch with the candidate patches in a search region, we can track the object to the location where the highest similarity score is obtained. A notable advantage of this method is that it needs no or little online training. Thus, real-time tracking can be easily achieved.

Similarity learning with deep CNNs is typically addressed using Siamese architectures . The pioneering work for object tracking is the fully convolutional Siamese network (SiamFC) . The advantage of a fully-convolutional network is that, instead of a candidate patch of the same size of the target patch, one can provide as input to the network a much larger search image and it will compute the similarity at all translated sub-windows on a dense grid in a single evaluation . This advantage is also reflected at training time, where every sub-window effectively represents a useful sample with little extra cost.

There are a large number of follow-up work of SiamFC. EAST attempts to speed up the tracker by early stopping the feature extractor if low-level features are sufficient to track the target. CFNet introduces correlation filters for low level CNNs features to speed up tracking without accuracy drop. SINT incorporates the optical flow information and achieves better performance. However, since computing optical flow is computationally expensive, SINT only operates at 4 frames per second (fps). DSiam attempts to online update the embeddings of tracked target. Significantly better performance is achieved without much speed drop.

SA-Siam inherits network architecture from SiamFC. We intend to improve SiamFC with an innovative way to utilize heterogeneous features.

2 Ensemble Trackers

Our proposed SA-Siam is composed of two separately trained branches focusing on different types of CNN features. It shares some insights and design principles with ensemble trackers.

HDT is a typical ensemble tracker. It constructs trackers using correlation filters (CFs) with CNN features from each layer, and then uses an adaptive Hedge method to hedge these CNN trackers. TCNN maintains multiple CNNs in a tree structure to learn ensemble models and estimate target states. STCT is a sequential training method for CNNs to effectively transfer pre-trained deep features for online applications. An ensemble CNN-based classifier is trained to reduce correlation across models. BranchOut employs a CNN for target representation, which has a common convolutional layers but has multiple branches of fully connected layers. It allows each branch to have a different number of layers so as to maintain variable abstraction levels of target appearances. PTAV keeps two classifiers, one acting as the tracker and the other acting as the verifier. The combination of an efficient tracker which runs for sequential frames and a powerful verifier which only runs when necessary strikes a good balance between speed and accuracy.

A common insight of these ensemble trackers is that it is possible to make a strong tracker by utilizing different layers of CNN features. Besides, the correlation across models should be weak. In SA-Siam design, the appearance branch and the semantic branch use features at very different abstraction levels. Besides, they are not jointly trained to avoid becoming homogeneous.

3 Adaptive Feature Selection

Different features have different impacts on different tracked target. Using all features available for a single object tracking is neither efficient nor effective. In SCT and ACFN , the authors build an attention network to select the best module among several feature extractors for the tracked target. HART and RATM use RNN with attention model to separate where and what processing pathways to actively suppress irrelevant visual features. Recently, SENet demonstrates the effectiveness of channel-wise attention on image recognition tasks.

In our SA-Siam network, we perform channel-wise attention based on the channel activations. It can be looked on as a type of target adaptation, which potentially improves the tracking performance.

Our Approach

We propose a twofold fully-convolutional siamese network for real-time object tracking. The fundamental idea behind this design is that the appearance features trained in a similarity learning problem and the semantic features trained in an image classification problem complement each other, and therefore should be jointly considered for robust visual tracking.

The network architecture of the proposed SA-Siam network is depicted in Fig. 2. The input of the network is a pair of image patches cropped from the first (target) frame of the video sequence and the current frame for tracking. We use notations zz, zsz^{s} and XX to denote the images of target, target with surrounding context and search region, respectively. Both zsz^{s} and XX have a size of Ws×Hs×3W_{s}\times H_{s}\times 3. The exact target zz has a size of Wt×Ht×3W_{t}\times H_{t}\times 3 (Wt<WsW_{t}<W_{s} and Ht<HsH_{t}<H_{s}), locates in the center of zsz^{s}. XX can be looked on as a collection of candidate image patches xx in the search region which have the same dimension as zz.

SA-Siam is composed of the appearance branch (indicated by blue blocks in the figure) and the semantic branch (indicated by orange blocks). The output of each branch is a response map indicating the similarity between target zz and candidate patch xx within the search region XX. The two branches are separately trained and not combined until testing time.

The appearance branch: The appearance branch takes (z,X)(z,X) as input. It clones the SiamFC network . The convolutional network used to extract appearance features is called A-Net, and the features extracted are denoted by fa(⋅)f_{a}(\cdot). The response map from the appearance branch can be written as:

where corr(⋅)corr(\cdot) is the correlation operation. All the parameters in the A-Net are trained from scratch in a similarity learning problem. In particular, with abundant pairs (zi,Xi)(z_{i},X_{i}) from training videos and corresponding ground-truth response map YiY_{i} of the search region, A-Net is optimized by minimizing the logistic loss function L(⋅)L(\cdot) as follows:

where θa\theta_{a} denotes the parameters in A-Net, NN is the number of training samples.

The semantic branch: The semantic branch takes (zs,X)(z^{s},X) as input. We directly use a CNN pretrained in the image classification task as S-Net and fix all its parameters during training and testing. We let S-Net to output features from the last two convolutional layers (conv4conv4 and conv5conv5 in our implementation), since they provide different levels of abstraction. The low-level features are not extracted.

Features from different convolutional layers have different spatial resolution. For simplicity of notation, we denote the concatenated multilevel features by fs(⋅)f_{s}(\cdot). In order to make the semantic features suitable for the correlation operation, we insert a fusion module, implemented by 1×11\times 1 ConvNet, after feature extraction. The fusion is performed within features of the same layer. The feature vector for search region XX after fusion can be written as g(fs(X))g(f_{s}(X)).

The target processing is slightly different. S-Net takes zsz^{s} as the target input. zsz^{s} has zz in its center and contains the context information of the target. Since S-Net is fully convolutional, we can easily obtain fs(z)f_{s}(z) from fs(zs)f_{s}(z^{s}) by a simple crop operation. The attention module takes fs(zs)f_{s}(z^{s}) as input and outputs the channel weights ξ\xi. The details of the attention module is included in the next subsection. The features are multiplied by channel weights before they are fused by 1×11\times 1 ConvNet. As such, the response map from the semantic branch can be written as:

where ξ\xi has the same dimension as the number of channels in fs(z)f_{s}(z) and ⋅\cdot is element-wise multiplication.

In the semantic branch, we only train the fusion module and the channel attention module. With training pairs (zis,Xi)(z_{i}^{s},X_{i}) and ground-truth response map YiY_{i}, the semantic branch is optimized by minimizing the following logistic loss function L(⋅)L(\cdot):

where θs\theta_{s} denotes the trainable parameters, NN is the number of training samples.

During testing time, the overall heat map is computed as the weighted average of the heat maps from the two branches:

where λ\lambda is the weighting parameter to balance the importance of the two branches. In practice, λ\lambda can be estimated from a validation set. The position of the largest value in h(zs,X)h(z^{s},X) suggests the center location of the tracked target. Similar to SiamFC , we use multi-scale inputs to deal with scale changes. We find that using three scales strikes a good balance between performance and speed.

2 Channel Attention in Semantic Branch

High-level semantic features are robust to appearance changes of objects, and therefore make a tracker more generalized but less discriminative. In order to enhance the discriminative power of the semantic branch, we design a channel attention module.

Intuitively, different channels play different roles in tracking different targets. Some channels may be extremely important in tracking certain targets while being dispensable in tracking others. If we could adapt the channel importance to the tracking target, we achieve the minimum functionality of target adaptation. In order to do so, not only the target is relevant, the surrounding context of the target also matters. Therefore, in our proposed attention module, the input is the feature map of zsz^{s} instead of zz.

The attention module is realized by channel-wise operations. Fig. 3 shows the attention process for the ithi^{th} channel. Take a conv5conv5 feature map as an example, the spatial dimension is 22×2222\times 22 in our implementation. We divide the feature map into 3×33\times 3 grids, and the center grid with size 6×66\times 6 corresponds to the tracking target zz. Max pooling is performed within each grid, and then a two-layer multilayer perceptron (MLP) is used to produce a coefficient for this channel. Finally, a Sigmoid function with bias is used to generate the final output weight ξi\xi_{i}. The MLP module shares weights across channels extracted from the same convolutional layer.

Note that attention is only added to the target processing. All the activations in channel ii for the target patch are multiplied by ξi\xi_{i}. Therefore, this module is passed only once for the first frame of a tracking sequence. The computational overhead is negligible.

3 Discussions of Design Choices

We separately train the two branches. We made this choice based on the following observations. For some training samples, tracking with semantic clues may be much easier than with appearance clues, and for some others, it could just be the opposite. Let us take the former case as an example. If the two branches are jointly trained, the overall loss could be small when the semantic branch has a discriminative heat map and the appearance branch has a non-informative heat map. Then, these training samples do not play their part in optimizing the appearance branch. As a result, both branches are less powerful when they are jointly trained than separately trained.

We do not fine-tune S-Net. A common practice in transfer learning is to fine-tune the pre-trained network in the new problem. We choose not to do so because fine-tuning S-Net using the same procedure as we train A-Net will make the two branches homogeneous. Although fine-tuning S-Net may improve the tracking performance of the semantic branch alone, the overall performance could be unfavorably impacted. We have carried out experiments to verify this design choice, although we do not include them in this paper due to space limitation.

We keep A-Net as it is in SiamFC. Using multilevel features and adding channel attention significantly improve the semantic branch, but we do not apply them to the appearance branch. This is because appearance features from different convolutional layers do not have significant difference in terms of expressiveness. We cannot apply the same attention module to the appearance branch because high-level semantic features are very sparse while appearance features are quite dense. A simple max pooling operation could generate a descriptive summary for semantic features but not for appearance features. Therefore, a much more complicated attention module would be needed for A-Net, and the gain may not worth the cost.

Experiments

Network structure: Both A-Net and S-Net use AlexNet-like network as base network. The A-Net has exactly the same structure as the SiamFC network . The S-Net is loaded from a pretrained AlexNet on ImageNet. A small modification is made to the stride so that the last layer output from S-Net has the same dimension as A-Net.

In the attention module, the pooled features of each channel are stacked into a 9-dimensional vector. The following MLP has 11 hidden layer with nine neurons. The non-linear function of the hidden layer is ReLU. The MLP is followed by a Sigmoid function with bias 0.50.5. This is to ensure that no channel will be suppressed to zero.

Data Dimensions: In our implementation, the target image patch zz has a dimension of 127×127×3127\times 127\times 3, and both zsz^{s} and XX have a dimension of 255×255×3255\times 255\times 3. The output features of A-Net for zz and XX have a dimension of 6×6×2566\times 6\times 256 and 22×22×25622\times 22\times 256, respectively. The conv4conv4 and conv5conv5 features from S-Net have dimensions of 24×24×38424\times 24\times 384 and 22×22×25622\times 22\times 256 channels for zsz^{s} and XX. The 1×11\times 1 ConvNet for these two sets of features outputs 128 channels each (which adds up to 256), with the spatial resolution unchanged. The response maps have the same dimension of 17×1717\times 17.

Training: Our approach is trained offline on the ILSVRC-2015 video dataset and we only use color images. Among a total of more than 4,000 sequences, there are around 1.3 million frames and about 2 million tracked objects with ground truth bounding boxes. For each tracklet, we randomly pick a pair of images and crop zsz^{s} from one image with zz in the center and crop XX from the other image with the ground truth target in the center. Both branches are trained for 3030 epochs with learning rate 0.010.01 in the first 2525 epochs and learning rate 0.0010.001 in the last five epochs.

We implement our model in TensorFlow 1.2.1 framework. Our experiments are performed on a PC with a Xeon E5 2.4GHz CPU and a GeForce GTX Titan X GPU. The average testing speed of SA-Siam is 50 fps.

Hyperparameters: The two branches are combined by a weight λ\lambda. This hyperparameter is estimated on a small validation set TC128 excluding sequences in OTB benchmarks. We perform a grid search from 0.10.1 to 0.90.9 with step 0.20.2. Evaluations suggest that the best performance is achieved when λ=0.3\lambda=0.3. We use this value for all the test sequences. During evaluation and testing, three scales are searched to handle scale variations.

2 Datasets and Evaluation Metrics

OTB: The object tracking benchmarks (OTB) consist of three datasets, namely OTB-2013, OTB-50 and OTB-100. They have 51, 50 and 100 real-world target for tracking, respectively. There are eleven interference attributes to which all sequences belong.

The two standard evaluation metrics on OTB are success rate and precision. For each frame, we compute the IoU (intersection over union) between the tracked and groundtruth bounding boxes, as well as the distance of their center locations. A success plot can be obtained by evaluating the success rate at different IoU thresholds. Conventionally, the area-under-curve (AUC) of the success plot is reported. The precision plot can be acquired in a similar way, but usually the representative precision at the threshold of 20 pixels is reported. We use the standard OTB toolkit to obtain all the numbers.

VOT: The visual object tracking (VOT) benchmark has many versions, and we use the most recent ones: VOT2015, VOT2016 and VOT2017. VOT2015 and VOT2016 contain the same sequences, but the ground truth label in VOT2016 is more accurate than that in VOT2015. In VOT2017, ten sequences from VOT2016 are replaced by new ones.

The VOT benchmarks evaluate a tracker by applying a reset-based methodology. Whenever a tracker has no overlap with the ground truth, the tracker will be re-initialized after five frames. Major evaluation metrics of VOT benchmarks are accuracy (A), robustness (R) and expected average overlap (EAO). A good tracker has high A and EAO scores but low R scores.

3 Ablation Analysis

We use experiments to verify our claims and justify our design choices in SA-Siam. We use the OTB benchmark for the ablation analysis.

The semantic branch and the appearance branch complement each other. We evaluate the performances of the semantic model alone (model S1S_{1}) and the appearance model alone (model A1A_{1}). S1S_{1} is a basic version with only S-Net and fusion module. Both S1S_{1} and A1A_{1} are trained from scratch with random initialization. The results are reported in the first two rows in Table 1. The third row presents the results of an SA-Siam model which combines S1S_{1} and A1A_{1}. The improvement is huge and the combined model achieves state-of-the-art performance even without multilevel semantic features or channel attention.

In order to show the advantage of using heterogeneous features, we compare SA-Siam with two simple ensemble models. We train another semantic model S2S_{2} using different initialization, and take the appearance model A2A_{2} published by the SiamFC authors. Then we ensemble A1A2A_{1}A_{2} and S1S2S_{1}S_{2}. Table 2 shows the performance of the separate and the ensemble models. It is clear that the ensemble models A1A2A_{1}A_{2} and S1S2S_{1}S_{2} do not perform as well as the SA-Siam model. This confirms the importance of complementary features in designing a twofold Siamese network.

Using multilevel features and channel attention bring gain. The last three rows in Table 1 show how each component improves the tracking performance. Directly using multilevel features is slightly helpful, but there lacks a mechanism to balance the features of different abstraction levels. We find that the attention module plays an important role. It effectively balances the intra-layer and inter-layer channel importance and achieves significant gain.

Fig.4 visualizes the channel weights for the two convolutional layers of video sequence david and bolt. We have used a Sigmoid function with bias 0.50.5 so that the weights are in range [0.5,1.5][0.5,1.5]. First, we observe that the weight distributions are quite different for conv4conv4 and conv5conv5. This provides hints why the attention module has a larger impact on models using multilevel features. Second, the weight distributions for conv4conv4 are quite different for the two videos. The attention module tends to suppress more channels from conv4conv4 for video bolt.

Separate vs. joint training. We have claimed that the two branches in SA-Siam should be separately trained. In order to support this statement, we tried to jointly train the two branches (without multilevel features or attention). As we anticipated, the performance is not as good as the separate-training model. The AUC and precision of the joint training model on OTB-2013/50/100 benchmarks are (0.630, 0.831), (0.546,0.739), (0.620, 0.819), respectively.

4 Comparison with State-of-the-Arts

We compare SA-Siam with the state-of-the-art real-time trackers on both OTB and VOT benchmarks. Conventionally, a tracking speed beyond 25fps is considered real-time. Our tracker runs at 50fps.

OTB benchmarks: We compare SA-Siam with BACF, PTAV, DSiamM, EAST, Staple ,SiamFC, CFNet, LMCF and LCT on OTB 2013/50/100 benchmarks. The precision plots and success plots of one path evaluation (OPE) are shown in Fig.5. More results are summarized in Table 3. The comparison shows that SA-Siam achieves the best performance among these real-time trackers on all three OTB benchmarks.

Note that the plots in Fig.5 are obtained by running the OTB evaluation kit on the tracking result file released by authors. The numbers for BACF is different from the paper because the authors only evaluate 50 videos (no jogging-2) for OTB-2013. Also, they use per-video average instead of per-frame average to compute the numbers.

VOT2015 benchmark: VOT2015 is one of the most popular object tracking benchmarks. Therefore, we also report the performance of some of the best non-real-time trackers as a reference, including MDNet, DeepSRDCF, SRDCF and EBT. Also, SA-Siam is compared with BACF, EAST, Staple and SiamFC. Table 4 shows the raw scores generated from VOT toolkit and the speed (FPS) of each tracker. SA-Siam achieves the highest accuracy among all real-time trackers. While BACF has the same accuracy as SA-Siam, SA-Siam is more robust.

VOT2016 benchmark: We compare SA-Siam with the top real-time trackers in VOT2016 challenge and Staple , SiamFC and ECOhc. The results are shown in Table 5. On this benchmark, SA-Siam appears to be the most robust real-time tracker. The A and EAO scores are also among the top three.

VOT2017 benchmark: Table 6 shows the comparison of SA-Siam with ECOhc, CSRDCF++, UCT, SiamFC and Staple on the VOT2017 benchmark. Different trackers have different advantages, but SA-Siam is always among the top tier over all the evaluation metrics.

More qualitative results are given in Fig. 6. In the very challenging motorrolling and skiing sequence, SA-Siam is able to track correctly while most of others fail.

Conclusion

In this paper, we have presented the design of a twofold Siamese network for real-time object tracking. We make use of the complementary semantic features and appearance features, but do not fuse them at early stage. The resulting tracker greatly benefits from the heterogeneity of the two branches. In addition, we have designed a channel attention module to achieve target adaptation. As a result, the proposed SA-Siam outperforms other real-time trackers by a large margin on the OTB benchmarks. It also performs favorably on the series of VOT benchmarks. In the future, we plan to continue exploring the effective fusion of deep features in object tracking task.

Acknowledgement

This work was supported in part by National Key Research and Development Program of China 2017YFB1002203, NSFC No.61572451, No.61390514, and No.61632019, Youth Innovation Promotion Association CAS CX2100060016, and Fok Ying Tung Education Foundation WF2100060004.

The authors would like to thank Wenxuan Xie and Bi Li for helpful discussions.

References