Efficient Global MOT Under Minimum-Cost Circulation Framework

We developed a minimum-cost circulation framework for solving the global data association problem, which plays a key role in the tracking-by-detection paradigm of multi-object tracking (MOT). The global data association problem was extensively studied under the minimum-cost flow framework, which is theoretically attractive as being flexible and globally solvable. However, the high computational burden has been a long-standing obstacle to its wide adoption in practice. While enjoying the same theoretical advantages and maintaining the same optimal solution as the minimum-cost flow framework, our new framework has a better theoretical complexity bound and leads to orders of practical efficiency improvement. This new framework is motivated by the observation that minimum-cost flow only partially models the data association problem and it must be accompanied by an additional and time-consuming searching scheme to determine the optimal object number. By employing a minimum-cost circulation framework, we eliminate the searching step and naturally integrate the number of objects into the optimization problem. By exploring the special property of the associated graph, that is, an overwhelming majority of the vertices are with unit capacity, we designed an implementation of the framework and proved it has the best theoretical computational complexity so far for the global data association problem. We evaluated our method with 40 experiments on five MOT benchmark datasets. Our method was always the most efficient in every single experiment and averagely 53 to 1,192 times faster than the three state-of-the-art methods. When our method served as a sub-module for global data association methods utilizing higher-order constraints, similar running time improvement was attained. We further illustrated through several case studies how the improved computational efficiency enables more sophisticated tracking models and yields better tracking accuracy. We made the source code publicly available on GitHub with both Python and MATLAB interfaces.


INTRODUCTION
M ULTI-OBJECT tracking (MOT) is a fundamental task in machine intelligence with a variety of applications such as traffic surveillance, autonomous driving, particle tracking, and cell lineage analysis [1], [2].The continuing improvement of object detectors [3], [4], [5] inspires great interests in the tracking-by-detection paradigm, in which objects in individual frames are detected first and then in the data association step these detections are linked into trajectories to recover their identities.There are two major components of a good data association method: a strong affinity model for similarity measure between detections across frames, and a robust identity inference model based on the similarity scores [2], [6].For the affinity models, both hand-crafted design [7], [8] and deep learning-based design [9], [10] have made great progress and achieved promising discriminative power [11].For the identity inference, most of recent state-of-the-art trackers were based on maximum a posteriori (MAP) estimation [2], [7], [9], which provides a principled approach to optimally integrate information from detection reliability, missingness of detections, and affinity between detections.In the past ten years, one celebrated progress on the identity inference is the formulation of the MAP problems over multi frames as a minimum-cost flow problem [10], [12], [13], [14].This minimum-cost flow formulation enables naturally the incorporation of information from multiple frames, and more importantly it makes the MAP problems globally solvable with polynomial time complexity.For the identity inference model, one critical observation is that usually, the more frames are taken into account, the more pieces of evidence can be collected, and the more preferable inference results can be achieved [14].In online tracking scenarios, as many previous frames as possible should be utilized in extending existing trajectories to the current frame; in offline scenarios, the inference should be carried out on the whole movie.
However, in real applications, minimum-cost flow-based identity inference models [12], [13], [14] are limited to datasets with a small number of detections or frames due to computational cost.Despite extensive efforts of acceleration [14], [15], the computational efficiency is still far from satisfactory.Therefore, compared with the wide application of advanced affinity models, the majority of recent works on MOT still rely on simple and greedy data association strategies.For example, some researchers sequentially conduct the inference over a small batch of the video [14] or only two consecutive frames [8], [9] in the online scenarios with, e.g., the Hungarian algorithm.Some use greedy dynamic programming approximation, searching for sub-optimal linking results in the offline scenarios [15].The practical difficulty in utilizing a sufficiently long history of detections limits the performance of the identity inference.The whole trackingby-detection paradigm is thus compromised and cannot achieve its full potential [14], [15], which is corroborated in our experiments.
In this report, we propose to formulate the MAP problems under the minimum-cost circulation framework, instead of the widely used minimum-cost flow framework.This work * m, n, C: graph properties which are proportional to the number of detections, the number of potential links between detections and the maximum absolute value of similarity scores.
We name our method CINDA, which stands for CIrculation Network-based Data Association.CINDA can directly solve the MAP problem, while methods using the minimumcost flow alone cannot.This is because the minimumcost flow framework, as used in [10], [12], [13], [14], [15], assumes the optimal amount of flow in the network is predetermined.Yet, the optimal flow amount is equal to the number of objects we are tracking, which itself is unknown beforehand under most circumstances.Therefore, a great deal of additional effort needs to be spent on searching for the optimal flow amount.Some methods use a binary search scheme [10], [13], where, in each step, a minimumcost flow problem has to be solved from scratch, because the number of objects assumed in this round of searching can be very different from the previous one.Some other methods such as [12], [15], and [14] use incremental strategy to search for the optimal object number.Each iteration of the searching increases the amount of flow by one and requires traversing the whole network for finding a shortest path.Therefore, when the number of object is large, the cost for the incremental searching is high and these methods still suffer from the efficiency problem of the minimum-cost flow framework.Importantly, we observe that these efforts of searching for optimal object number can be saved by reformulating the MAP problem as a minimum-cost circulation problem instead, where the object number does not need to be explicitly searched binarily or one by one and is actually a natural byproduct of the integrated optimization procedure.
Taking advantage of the recent progress in network flow algorithms and exploring the special properties of the associated graph, we designed a minimum-cost circulation algorithm in CINDA, which achieves the best ever theoretical complexity for solving the global data association problem.Currently, the best theoretical complexity in solving the data association problem in MOT came from the blocking flow-based cost-scaling algorithm [16].Recently, researchers found that the minimum-cost flow problem in MOT can be solved by this algorithm in O(min{n 2/3 , m 1/2 }mlog(nC)).
Here m, n, and C are graph properties that are proportional to the number of detections, the number of potential links between detections, and the maximum absolute value of similarity score, respectively (see section 4 for details).Thus, the global data association can be solved in O(min{n 2/3 , m 1/2 }mlog(nC) log(n)) ('Block-CS' in Table 1).It is possible to use the same blocking flow-based cost scaling algorithm to solve the minimum-cost circulation problem.Unfortunately, it is widely known that that algorithm is less efficient in real applications [17], [18].To achieve a better theoretical complexity while keeping the real world efficiency in mind, we start our algorithm development from the famous push/relabel-based costscaling algorithm cs2 [18], which is practically efficient but is proven to have a worse theoretical complexity bound of O(nm log(nC)).We found that its complexity bound is worse because the flow pushing steps are not designed to correct the flow imbalance across nodes.As a consequence, some iterations may make no progress on reducing the flow imbalances in the network at all.Inspired by the blocking flow-based cost-scaling algorithm [16], in CINDA, the flow pushing operations are instead guided by a blocking flow, which dramatically improves the complexity to O(min{n 2/3 , m 1/2 }mlog(nC)).Notice that we already obtained log(n) folds improvement comparing with the best bound of minimum-cost flow-based frameworks because we get rid of the binary search scheme for the optimal object number.Moreover, we identified a special property of the graph that further influences the complexity of the algorithm: an overwhelming majority of vertices in the graphs formulated in our framework are with unit capacity.That is, almost all vertices in our graph have only one input arc or one output arc.Taking this special property into account, we proved that the worst case complexity bound of CINDA can be further improved to O(n 1/2 mlog(nC)).
Consistent with the best theoretical complexity bound, CINDA achieves the best empirical computational performance through extensive experiments on five MOT benchmarks with various object detectors and affinity models.Among all these 40 experiments, CINDA is always the fastest compared with minimum-cost flow-based methods.Averagely, our method is 29 times faster than the best competing method for each experiment.Compared with each individual method, CINDA is 1,192 and 592 times faster than the successive shortest path algorithm (SSP) and its improved version, dSSP [14], respectively.CINDA is 53 times faster than MCF [13], which is based on cs2 [18], the famous implementation of cost-scaling algorithm.In addition, we test the scenario that our circulation-based framework serves a sub-module for more sophisticated global data association methods with higher-order constraints [19], and similar running time improvement is attained.
Besides saving time directly, the efficiency preponderance brings two further benefits.First, it makes possible for the inference model to utilize many more history frames in real-time applications and readily use the whole movie for offline applications.Second, it naturally enables us to build iterative tracking frameworks to refine affinity scores and increase their discriminative power by designing more features using the tracking results from previous iterations.
We used two cases to demonstrate the accuracy improvement brought by the two benefits respectively.The first case is the car tracking scenario.The results show that even in the presence of state-of-the-art object detection results and affinity design, using longer history improves the overall MOT performance.This shows the three key factors in the tracking-by-detection paradigm (detector, affinity model, and global inference model) should work together to obtain the best result.The current practice of using two frames for identity inference gives sub-optimal results.Thankfully, our fast algorithm enables the consideration of more frames in computationally constrained and real-time applications.The other case is the cell tracking scenario.As cells have only limited appearance features, the affinity score that purely based on the pairs of detections shows low discriminative power.With an iterative framework, more features, such as velocity information, can be estimated from previous iterations, and experiments show the iterative processing helps to improve the tracking accuracy significantly.
Our major contributions can be summarized as the following three points.(1) We proposed a new minimum-cost circulation-based framework for solving the MAP problem in MOT.(2) We developed a minimum-cost circulation algorithm and proved that it achieves the best ever theoretical bound for solving the MAP inference problem in MOT.
(3) We implemented our proposed algorithm, which was shown to be empirically much more efficient than existing widely used methods in all of the 40 benchmark tests, often by several orders of improvement.It is worth noting that the coincidence of the superiority in both theory and practice does not happen frequently for algorithm development because theoretical complexity is often related to the worst case performance, while practical efficiency involves many other factors.Such a coincidence assures users good practical performance without worrying about the worst scenarios.The source code of our implementation is publicly available on GitHub (https://github.com/yu-lab-vt/CINDA).Both Python and MATLAB interfaces are provided.
The remainder of the paper is organized as follows.In section 2 we review related works of identity inference models in MOT.The general form of the MAP identity inference in MOT is given in section 3.In section 4 we present the core methodology of our minimum-cost circulation-based framework.We give the proof of its complexity bound in section 5. We evaluate the efficiency and demonstrate several applications of our method in section 6 and conclude the paper in section 7.

RELATED WORKS
Given the detections of objects in each frame of the video, the goal of the multi-object tracking problem is to select and cluster the detections corresponding to the same object over time [19].The selection and clustering task is commonly referred to as the data association problem, which involves two major components [2]: one is the design of the affinity models to measure the similarity between detections, and the other one is the inference of the identities of detections based on the affinity measurements.Based on the discriminative features learned or designed from the appearance cues of detections, there has been promising progress on building robust affinity models [8], [9], [20].As another key component, recent state-of-the-art trackers conduct their identity inference under the MAP principle, where the formulation of minimum-cost flow has enjoyed most of the popularity [1], [2], [21].However, the current efficiency of solving the minimum-cost flow problem in MOT is far from satisfactory.Therefore, in large datasets or time critical scenarios like online tracking, globally optimal solutions gave way to simple greedy ones [8], [22], which arguably limited the overall tracking performance [2], [8].In the following, we will first give a review to the development of recent identity inference models used in MOT and then analyze in details those minimum-cost flow-based ones.Finally, we will discuss the development of the theoretical complexity bound for solving the minimum-cost flow problem in MOT.

Identity inference models
MOT identity inference strategies can be divided into two categories: probabilistic approaches and deterministic approaches [2], [14].Early probabilistic works like Multi-Hypothesis Testing [23] and Joint Probabilistic Data-Association Filters [24], have high computational cost and scale badly with the number of detections.Afterwards, plenty of approximation methods are proposed to accelerate these methods (see [2] for a good survey).In recent years, the majority of the works model the identity inference as a deterministic MAP problem, which consists of three major ways of modeling: conditional random field (CRF) [25], [26], quadratic programming [21], [27], and minimum-cost flow [9], [12], [13], [28].Among them, minimum-cost flow-based methods (including special cases like k-shortest path and bipartite matching) are the most popular one thanks to its flexibility and the guarantee of optimality [2], [6].Many quadratic programming formulations [21], [27], [29] also use minimum-cost flow algorithms as a sub-routine to get approximate solutions.The CRF model, as a class of Markov random field models, has also been used extensively in MOT [6].However, CRF suffers from its intractable inference and thus has no guarantee to global optimality [30], [31].Deep learning plays an important role in learning the discriminative affinity scores between detections.Though recently its applications to the identity inference problem are also emerging [6], [11], [32], they are beyond the scope of this study.

Minimum-cost flow models
The minimum-cost flow-based formulation in identity inference problems first appeared in [13] and [12].This formulation is flexible for dealing with detection flaws such as false positives and false negatives by appropriately designing arcs in the networks.It can also easily integrate various affinity designs.For the original formulation in the seminal works, the affinity design was only based on distances between detections, while other discriminative features like those from object's appearance were ignored.These features are frequently used and play an important role in more recent works [14], [33].Besides, it is also possible to do end-to-end learning of cost functions for the arcs in the network without hand-crafted arc affinity design [10].Some researchers [19], [27], [28], [29] designed networks considering higher-order constrains like consistency of velocity or restrictions from interacting objects or object parts.These additional constraints usually make the problem NP-hard.Therefore, these methods use Frank-Wolfe algorithm, Lagrangian relaxation, or other iterative solvers to get an approximate solution.Minimum-cost flow is commonly used to serve as a sub-routine in those iterative approximation methods.Comprehensive surveys can be found in [1], [2], [6].Notice that the same approach is called k-shortest paths in some papers.
Though there are many existing solvers for generic minimum-cost flow problem, directly applying them to identity inference models in MOT yields sub-optimal efficiency.[12] and [15] proposed that successive shortest path (SSP) algorithm has a low complexity bound for solving the minimum-cost flow problem in MOT when the number of targets is small.[14] showed that using the dynamic shortest path tree, SSP can be further accelerated, though the acceleration is limited.In practice, even though these solvers are specifically selected or designed for MOT problem, none of them is satisfactory.Hence in many real applications people tended to conduct inference on smaller batch of frames, especially in some online tasks.For example, in [14], the authors proposed to apply minimum-cost flow on a small time window of the video each time.For many recent online trackers [7], [8], [9], [34], they only considered optimizing linkages between two adjacent frames.For these methods, the minimum-cost flow problem is equivalent to a bipartite matching problem, which can also be solved by the Hungarian algorithm.These local optimal solutions usually cannot correct errors occurred in earlier frames when detections in later frame become available.As a result, they have accuracy loss compared with global approaches [8], [14], [15].This kind of accuracy loss has been recorded and efforts were tried to recover it through iterative or post processing.For instance, to deal with this problem, [9] used an iterative framework to correct errors from current greedy linking results, while [7] added depth information and used 3D Kalman filter to reduce the identity ambiguity.

Theoretical complexity of solving minimum-cost flow in MOT
After the introduction of minimum-cost flow framework to the MOT problem, plenty of works discussed the theoretical complexity for solving it [12], [13], [15].The representative results are summarized in Table 1.The cost-scaling algorithm cs2 [18], which is widely viewed as the best solver for generic minimum-cost flow problem, was utilized in the seminal work MCF [13], whose worst-case complexity was shown to be O(n 2 mlog(nC)log(n)).Here O(n 2 mlog(nC)) is the complexity of solving a generic minimum-cost flow problem and log(n) represents the iterations needed for finding the best flow amount.Another type of algorithms, including the k-shortest path algorithm (KSP) [12] or the successive shortest path (SSP) [15] algorithm, solve the corresponding minimum-cost flow problem by incrementally approaching to the optimal flow number.Notice that the flow networks formulated in MOT problems are unitcapacity graphs, because it is assumed that each detection can participate at most one trajectory.Taking advantage of this fact, the step that increases the flow number, which is equivalent to instantiate a new trajectory, has lower computational cost.Therefore, SSP and KSP enjoy a complexity of O(n(nlog(n) + m)), which is lower than the complexity of cost-scaling algorithms.If we assume the number of targets is K, the complexity can be written as O(K(nlog(n) + m)).Besides, [14] accelerated existing SSP algorithm by leveraging the idea of dynamic shortest path tree (dSSP in Table 1).Recently, researchers in the graph theory community found that the complexity of some previously proposed cost-scaling algorithms are actually lower when they are applied on unit-capacity graphs [16], [35].Thus, applying the new theory, the complexity can be further decreased to O(min{n 2/3 , m 1/2 }mlog(nC)log(n)) using blocking flowbased cost-scaling algorithm to solve the minimum-cost flow problem in MOT .Note that to the best of our knowledge, this complexity has never been reported in MOT literature.
In this paper, we carefully analyzed the MAP problem and proposed to formulate it into a minimum-cost circulation framework rather than a minimum-cost flow framework.This new formulation significantly improves the theoretical worst case complexity bound of solving the MAP problem and brings orders of efficiency boosting in the experiments.In the following sections, the term 'object' represents a physical object existing over time (e.g. a person), and 'detection' indicates a detected snapshot of an object at a given time point.An object corresponds to a series of detections (trajectory) with the same identity.

PROBLEM STATEMENT
The problem of identity inference can be formulated as an MAP problem.Here we discuss the most widely used formulations that consider only unary and pairwise relationships [12], [13], [14].This form is also frequently employed as the sub-routine in quadratic formulations where higher order constraints are considered [21], [27], [28], [29].
Let X = {x i } be a set of detections, where x i is a vector containing the position, appearance, and time index of detection i.A trajectory T k = {x k1 , . . ., x kn }, x ki ∈ X is a set of temporally ordered detections and An association hypothesis is a set of non-overlap trajectories T = {T k }.The purpose of identity inference is to find the hypothesis T with the highest posterior probability [13]: = arg max = arg max Assume P (x i |T ) follows a Bernoulli distribution.The corresponding parameter β i indicates the probability that detection x i is false positive and thus should be excluded in a trajectory in T : In addition to a minimum-cost flow solver, an accompanying searching scheme is needed to find the optimal trajectory number, or equivalently, the optimal flow amount.
Since we only consider unary and pairwise relationships between detections, a trajectory T k = {x k1 , . . ., x kn } can be modeled as a Markov chain whose probability is P enter (x k1 ) is the probability that x k1 is the initial point of trajectory T k .Similarly, P exit (x kn ) is the probability that x kn is the terminate point of trajectory T k .By taking the negative logarithm of all the probabilities in Eq.( 4), the MAP problem can be converted to an integer linear programming (ILP) problem [13]: and with Constraints in Eq. (8)(9) indicate that each detection can participate in at most one trajectory and there is no splitting or merging of any trajectory.More specifically, as . f i = 1 indicates that detection x i is included in a trajectory of T and f i = 0 otherwise.Based on the other constraints in Eq.(8-9), we can see f i = 1 forces detection x i to be incident with at most one previous detection and at most one following detection in a trajectory, so x i will participate one and only one trajectory.Under such condition, f en i = 1 or f ex i = 1 indicates that x i is the initial or terminate point of a trajectory in T .f i,j = 1 means that detection x i is followed by detection x j in the same trajectory in T .f i = 0 automatically rules out the detection x i from participating in any trajectory, where f en i , f * ,i , f ex i , and f i, * will all be zeros.

MINIMUM-COST CIRCULATION FRAMEWORK
We propose to map the ILP problem in Eq.(7-9) into a minimum-cost circulation problem for efficient inference.In this section, we will detail how the mapping is performed and prove their equivalence.For simplicity, our network will be named circulation network (e.g., Fig. 1(b)) while any minimum-cost flow-based network (e.g., Fig. 1(c)) used in previous works will be called flow network.The whole pipeline of our framework can be found in Fig. 2 and more details are given in Alg. 1.
We denote a circulation network as G(V, E) (e.g., Fig. 1(b)), whose node set is V and arc set is E. The number of nodes is n and the number of arcs is m.Each arc (v, w) ∈ E is associated with unit capacity u(v, w) and a real-valued cost c(v, w).The graph has a dummy node s.For each detection x i ∈ X , two nodes, a pre-node o i and a post-node h i , and three arcs, (o i , h i ), (s, o i ) and (h i , s) are created.The corresponding costs are C i , C en i , and C ex i , respectively.A transition arc is then created for any allowed spatiotemporal transition of an object.For example, if it is allowed for detection x i to transit to detection x j (assume x i is detected before x j in time), an arc (h i , o j ) is created with the cost of C i,j .An example is given in Fig. 1(b), which is constructed based on the detections depicted in Fig. 1(a).The capacity of any arc is set to one.Now we prove the solution of minimum-cost circulation formulation is the same as the MAP problem in Eq.( 4).Since minimum-cost flow formulation was shown to have the same optimal solution as the MAP problem [13], if we can prove the equivalence between our formulation and minimum-cost flow formulation, we can thus claim that our formulation also solves the MAP problem.We first prove a lemma that will help us later to link the solution of minimum-cost circulation to minimum-cost flow.
Lemma 1.The dummy node s is included in every directed cycle in the circulation network.
Proof.Assume the circulation network is G.Let G = G\s be the sub-graph of G, which is obtained from G by pruning node s and all arcs that are incident with s.We will prove that G is a directed acyclic graph (DAG).Since a DAG does not contain any cycle, every cycle will have to include the node s that was removed.
It is clear that nodes in G come in pairs: each prenode is accompanied by a post-node.Each pre-node has only one out-going arc whose head is a post-node and each post-node has only one in-coming arc whose tail is a pre-node.Post-nodes can only link to pre-nodes, which we call the linkages transition arcs.Assume there is a cycle in G , and without loss of generality we denote it as Based on the construction of the graph, each transition arc (h i , o j ) corresponds to a pair of detections x i and x j , and x i is detected strictly earlier than x j .Since h n links to o 1 , x n should happen earlier than x 1 .By repeatedly applying the same reasoning for detections {x 1 , . . ., x n }, we know that x 1 should happen earlier than x n and this contradicts to our previous statement that x n should happen earlier than x 1 .Therefore, G is DAG and any cycle in G goes through s.
Under such construction, we can interpret each cycle in G as an object trajectory candidate, linking a sequence of detections, starting from s and ending at s as well.Since we define the cost function c(v, w) as c(o i , h , the MAP problem in Eq.(7-9) could be solved by selecting a set of object trajectories from all the candidates so that they lead to minimum total cost in the graph.Algorithmically, This is achieved by sending circular flows in G.When the algorithm terminates, the cycles with flow inside them are selected as the output trajectories.As in-out balance is required at any node v ∈ V (conservation constraints in Eq.( 9)), we have: Lemma 2. A circulation with total integer flow amount K can only be sent through K distinctive cycles.
Proof.Because the capacity of each arc is one, by sending a flow with amount one along a cycle, all arcs of the cycle are saturated.Thus a circulation with flow amount K saturates K cycles with no shared arcs.
Lemma 2 shows that the minimum-cost circulation formulation could detect non-overlapping object trajectories, as required in the MAP formulation.
The key difference between our circulation network and previously widely used flow network (Fig. 1(c)) is that circulation network does not have excess or deficit nodes (imbalanced nodes).In the flow network, the entrance and exit probabilities are encoded using an excess node s and an deficit node t as shown in Fig. 1(c).A value of imbalance needs to be specified for each of them before applying the solver.This imbalance is the expected trajectory number K, or flow amount equivalently, which is unknown and additional efforts are needed to optimize it.In the circulation network, this is avoided because all nodes are balanced.By pursuing the minimum cost in the circulation network, the optimal number of object trajectories will be simultaneously selected.
Now we prove the equivalence of our minimum-cost circulation problem and the MAP problem.
Theorem 1.The MAP problem in Eq.(7-9) is equivalent to a minimum-cost circulation problem.
Proof.Assume the circulation network is G c and the corresponding flow network is G f (see Fig. 1(b-c)).Based on Lemma 1, for each cycle in G c , by separating its dummy node, it can be translated to a unique s-t path in G f .By the same token, each s-t path in G f can be translated to a unique cycle in G c .Then with Lemma 2, any feasible circulation with amount K on G c corresponds to a feasible flow on G f with K distinctive s-t paths, and vice versa.As is shown in [13], the MAP problem in Eq.(7-9) is equivalent to finding a set of distinctive s-t paths with minimum total cost on G f , which is thus equivalent to finding the minimum-cost circulation on G c .
If the costs for all arcs in the circulation network are nonnegative, the optimal solution is trivial: no cycle is detected, the value of the flow is zero, and the minimum cost is also zero.Because we have negative-cost arcs (Eq.(10)(11)), some cycles in the network could have negative cost and the total cost can be negative.It is worthy to mention that all the minimum-cost flow problems we encountered in MOT applications can be replaced by our minimum-cost circulation formulation, which means that all the existing minimum-cost flow-based identity inference models in MOT can be accelerated with the proposed formulation.

ALGORITHM AND WORST CASE COMPLEXITY
The design of our minimum-cost circulation algorithm in CINDA is adapted from the famous push/relabel-based cost-scaling algorithm cs2 [18], which runs O(nm log(nC)) for solving the minimum-cost circulation problem in MOT.Recent works [16], [35] proved that the blocking flowbased cost-scaling algorithm achieves the best ever bound O(min{n 2/3 , m 1/2 }mlog(nC)) for solving minimum-cost circulation problem on general unit-capacity graphs.Enlightened by their works, we introduce the idea of blocking flow to our algorithm and achieve a theoretical bound of O(n 1/2 mlog(nC)).This bound is not only significantly better than cs2, but also better than the best bound mentioned above.The improvement compared with blocking flowbased cost-scaling algorithm is based on our observation that our graph is more than a unit-capacity graph: the overwhelming majority of the vertices in our graph has only one input arc or one output arc.More details will be given in section 5.3.
In the following, we will present the outline of CINDA implementation to show how the idea of blocking flow is aggregated and prove its complexity by leveraging these added ingredients and our own graph specialty.The outline of CINDA is given in Fig. 2 and Alg. 1.To begin with, we need several definitions, most of which are adapted from [16].

Some definitions
As in section 4, G(V, E) is the input circulation network and we assign a cost function c(v, w) and a unit capacity (u(v, w) = 1) to each arc (v, w) ∈ E. For the purpose of analysis, for each arc (v, w) ∈ E, we add a reverse arc (w, v) to E. The capacity of that arc is zero and the cost is −c(v, w).A flow f on G is an anti-symmetric function on arcs, i.e., f (v, w) = −f (w, v).We call a flow feasible flow if it satisfies all the capacity constrains for the arcs in E (Eq.( 8)) and conservation constrains for the nodes in V (Eq.( 9)).If only capacity constraints are satisfied, we call it a pseudo flow.A circulation is a special type of flow which can be fully decomposed into flows along cycles.On our circulation network, any feasible flow is a circulation.
Given a flow f , the residual capacity of an arc (v, w) is We call a node excess node if its excess is positive and deficit node if the excess is negative.The total excess of a network is the summation of the excesses of all its excess nodes.
A cut X of G is a non-empty proper subset of V .The excess of X is the summation of the excesses of vertices in X.An arc (v, w) crosses cut X if v ∈ X but w / ∈ X.We associate each node v in G with a real number p(v).We refer p(v) as the price of node v.The reduced cost of arc (v, w) is defined as c p (v, w) = c(v, w) + p(v) − p(w).A flow f is -optimal with respect to a price function p, if c p (v, w) ≥ − , for each residual arc (v, w).
Arc (v, w) is an admissible arc if it is a residual arc with negative reduced cost.The admissible network G A = (V A , E A ) of G is defined as the sub-network consisting solely of admissible arcs with capacity function r vw and cost function c p (v, w) and vertices incident with admissible arcs.
Given a flow f and its admissible network G A , we call a flow g on G A an improving flow, if pushing g on G A decreases the total excess of the network while does not create any new excess or deficit vertex.An improving flow is blocking if after pushing g on G A (with respect to flow f ), no path in G A (with respect to flow f + g) from an excess vertex to a deficit vertex exists.

Proposed minimum-cost circulation algorithm
The major steps in our framework are shown in Fig. 2 and Alg. 1.The initialization steps construct the graph from detections.After clipping some large-cost arcs [18], we find an initial feasible circulation.In our implementation, the initial feasible circulation is obtained by simply setting the flow at each arc to 0. The main loop (line 7-30 in Alg. 1) is built upon cost-scaling method for solving the minimumcost circulation problem.Each iteration makes current circulation closer to the optimality, by refining an -optimal circulation to an /2-optimal circulation.Once < 1/n, current circulation is the optimal solution [36].The main difference between our algorithm and cs2 occurs in step 2 push/relabel (line 21-23 of Alg. 1).In our algorithm, the flow pushing is guided by the blocking flow directions, which is not the case in cs2.The implication of the modifications on the complexity analysis will be discussed in the next paragraph, as well as at the end of Section 5.4.Below we give further details of the algorithm.
In each iteration of the main loop, the threshold is halved and thus current circulation is no longer -optimal.To refine it, all admissible arcs are first saturated so that we obtain an -optimal pseudo flow.However, what we want is a circulation where there is no excess or deficit node.Therefore the RESTORE loop (line 14-24 in Alg.1) tries to restore an -optimal pseudo flow to an -optimal feasible flow, which is the circulation we want.There are two steps in RESTORE.The set-relabel step updates the price function p to generate a blocking flow from excess to deficit nodes so as to guide the flow pushing in the second step to decrease the total excess of the network.In each iteration of set-relabel, we will add to the prices of deficit nodes and nodes that have accesses to a deficit node in G A and thus create more admissible arcs, growing G A a little bit.set-relabel stops when G A grows large enough to include all excess nodes.The push/relabel step pushes flow out of excess nodes along the direction indicated by the blocking flow.In set-relabel, the price of each deficit node is guaranteed to increase in every iteration.In push/relabel, because the flow pushing is guided by blocking flow, we are guaranteed to decrease the total excess of the network at least one with O(m) pushes.These two properties are the key for our proof of Lemma 3, which indicates that the bound to the number of iterations in one call of RESTORE is equivalent to the bound of the total excess.After RESTORE, we get an circulation that is -optimal.If there are no cycles in G A now, it is possible that current circulation is not only -optimal but also /2-optimal [18].Under such condition, price refinement (line 26-29 in Alg.1) is conducted, trying to manipulate only the price function p such that the circulation becomes /2-optimal.

Special structures of the graph in MOT identity inference problem
A graph is called a unit-capacity graph, if the capacity of every arc is one.The graphs of our formulated circulation networks in the MOT problem are unit-capacity graphs.A vertex is with unit capacity if it is associated with only one incoming arc (no limitation to outgoing arcs) or one outgoing arc (no limitation to incoming arcs).The other specialty of the graphs in our circulation networks is that except for the dummy node s, each node is with unit capacity.For a unitcapacity graph, if all of its vertices are with unit capacity, we call it a unit-vertex-capacity graph.If most of the vertices in the graph are with unit-vertex-capacity but with O(1) exceptions, we call such graph as overwhelming unit-vertexcapacity graph.Our graphs are overwhelming unit-vertexcapacity graphs with only one vertex exception.This property is critical for our proof of Lemma 6.In the following, we will prove that based on CINDA shown in Fig. 2 and Alg. 1, the minimum-cost circulation problem on our graphs along with the whole identity inference problem can be solved in O(n 1/2 mlog(nC)).

Proof of the complexity
It is clear that other than the main loop (line 7-32 in Alg.1), the steps of constructing the circulation network from the detections (line 1), clipping high-cost arcs (line 2) and extracting trajectories from the minimum-cost circulation (line 31) have the overall complexity of O(m).Thus, the bound of our framework is determined by the complexity of the main loop.Note that these clipped arcs will be checked occasionally in case they will still be utilized in the optimal solution.Because is halved at least one time in each iteration, the main loop terminates within log(nC) iterations [36].Since the task of refining an /2-optimal pseudo flow into an /2-optimal feasible flow is fulfilled by the inner loop RESTORE (line 14-24 in Alg.1), we first prove the bound O(n 1/2 m) for one call of RESTORE as summarized in Lemma 8.
From Alg. 1, we can see that the prices of nodes are nondecreasing in step 1 of RESTORE.This is also true in step 2 when we relabel excess nodes.All the changes are in the unit of .Thus, we assign each node a non-negative integer value d to indicate how many s have been added to its price.For Here p 0 (v) is the initial price of node v in the current call of RESTORE.Assume f 0 is the initial -optimal flow in the current call of RESTORE before we saturate admissible arcs and f is the current /2-optimal pseudo flow.Define the arc set E + = {(v, w) ∈ E|f (v, w) > f 0 (v, w)} based on flow f .We divide the iterations in a single call of RESTORE into two phases.The first phase ends when d(v) ≥ for any deficit node v and the second phase finishes the restoration.Parameter can be any positive real number, whose optimal value will be discussed in Lemma 8.The following lemma outlines the total number of iterations we need for the two phases.Lemma 3. The first phase ends with O( ) iterations of step 1 and step 2. Assume the total excess is τ when first phase ends.Then the second phase takes O(τ ) iterations of step 1 and step 2.
Proof.The first part of the lemma is clear that one iteration of step 1 will increase the price of every deficit node , while step 2 will not create new deficit nodes or decrease the price of any node.The proof of the second part needs some implementation details.In the implementation of step 2, we do not wait until that all the excess nodes become balanced.Otherwise, the RESTORE will be fulfilled with one iteration of step 2 with a high complexity of O(nm).We will break the for loop after O(m) pushes have been conducted.The pushes are guided by the blocking flow found in step 1.In more details, in step 2, the push/relabel operations will be conducted first on the excess nodes that the blocking flow goes through.For each excess node, its out-going arcs that the blocking flow occupies has higher priority to push flow on.Thus with at most m pushes, we will saturate one path from an excess node to a deficit node.Pushing flow along this saturated path decreases the total excess of the network one.Because the push/relabel operations in step 2 never increase the total excess and neither does step 1, so the second phase takes totally O(τ ) iterations of step 1 and step 2.
From Lemma 3, we know that the total number of iterations in one call of RESTORE is O( + τ ).Then the question is to find a bound of τ by finding the maximum number of total excess at the end of the first phase.We will show that this bound is related to ∆ and we can get the overall bound combining phase 1 and phase 2 by selecting an optimal ∆.To start with, we need the following two lemmas.
Proof.As (v, w) ∈ E + , f (v, w) > f 0 (v, w), so arc (v, w) is a residual arc corresponding to flow f 0 , and (w, v) is a residual arc correspond to flow f .Since we have halved the at the beginning of this RESTORE, f 0 now is 2 * -optimal and f is -optimal.Thus, c p0 (v, w) = c(v, w)+p 0 (v)−p 0 (w) ≥ −2 * and c p (w, v) = c(w, v)+p(w)−p(v) ≥ − .Summing these two inequalities together, we have d(w) − d(v) ≥ −3.Lemma 5. Assume X is a valid cut for flow f on a unitcapacity graph.If X contains all the deficit nodes while no excess nodes, the total excess of the graph is at most Proof.Let X = V − X.For any arc crosses X, its inverse arc crosses X.It is clear that X contains all the excess nodes in the graph while no deficit nodes.Thus, for X, its excess is equal to the total excess of the graph.As f and f 0 are anti-symmetric functions on arcs, Thus the total excess is bounded by the number of arcs in E + that cross X.Now we prove the bound for τ .Lemma 6.The total excess when first phase ends is O(n/ ).Proof.Our circulation network is an overwhelming unitvertex-capacity graph where only the vertex s is not with unit capacity.We can prove this lemma based on this specialty.Consider the cuts X i = {v|d(v) > i & v is not an excess node} for 0 ≤ i < .We assume none of the X i s is empty and > 6, otherwise the lemma is true based on Lemma 5. From the definition of the first phase, we know all deficit nodes are included in any X i while no excess node is included.For . Any vertex can be in at most six sets of Y i and thus there exists some Y i that contains at most 6n/( − 6) vertices.
Assume every node has either only one incoming arc or one outgoing arc, except node s.Therefore, s can fall into one of the four distinct sets: X i+3 , Z i , Z i , G\X i−3 .We prove the lemma for each case. If has more than one outgoing residual arc}.X i contains all the deficit nodes.For each arc that crosses X i , it either originates from a vertex in Z i that has only one outgoing arc, or ends at a vertex in Z i with more than one outgoing arc but only one incoming arc.Hence totally we have at most |Z i | arcs cross X i and the total excess is at most 6n/( − 6) by Lemma 5. If has more than one outgoing residual arc}.X i−3 contains all the deficit nodes.For each arc that crosses X i−3 , it either originates from a vertex in Z i that has only one outgoing arc or ends at a vertex in Z i with more than one outgoing arc but only one incoming arc.Hence totally we have at most |Z i | arcs cross X i−3 and the total excess is at most 6n/( − 6) by Lemma 5.
For s ∈ G\X i−3 or s ∈ Z i , the proofs are very similar as the above two conditions.In summary, the total excess is at most O(n/ ) when the first phase ends.
With the bound of τ , we still need to know the bounds of the step 1 and step 2.Here we show they are both linearly related to the graph size.Lemma 7. On unit-capacity graphs, the bounds of step 1 and step 2 are both O(m).
Proof.The proof of step 1 can be found in section 3 of [16].As mentioned in the proof of Lemma 3, the For loop of step 2 will be broken after O(m) pushes in our implementation.Thus, the bounds of step 1 and step 2 are both O(m).Now we give the complexity analysis of price refinement (line 26-29 in Alg. 1).Price refinement is trying to get the /2optimal circulation by only manipulating the price function.This is possible when there is no cycle in the admissible network G A .Finding a cycle in a directed graph can be fulfilled in O(m) using depth first search.If G A is a DAG, the bound of one iteration of price refinement is also O(m) [17].In our implementation, we will give up the price refinement if the number of iterations exceeds √ n.Thus, the bound for price refinement is O(n 1/2 m), which is the same as RESTORE and will not dominate the time consumption of the framework.Note that this early stopping strategy will not influence the correctness of our algorithm.Because the price refinement is only applied on price function p, no imbalanced node is created throughout the price refinement.Also because none of the operations in price refinement decreases the reduced costs of admissible arcs or decreases the reduced costs of other arcs more than , no matter when we break the price refinement, the flow is still guaranteed to be an -optimal circulation.
Below we give the overall complexity of our framework.Proof.As mentioned before, the cost scaling method guarantees to converge to optimal solution by calling log(nC) times of RESTORE.Thus, the bound for the main loop is O(n 1/2 mlog(nC)).Other than the main loop, the other panels of our framework take linear time, so the overall bound of our framework is O(n 1/2 mlog(nC)).
Note that our proofs are enlightened by [16], which proves the bound of a pure blocking flow-based cost-scaling algorithm on solving minimum-cost flow on unit-capacity graphs.However, in pure blocking flow-based algorithm, the set of imbalanced nodes keeps shrinking and no new imbalanced nodes are created throughout the RESTORE, while in our algorithm, the push/relabel operations create new excess nodes.Thus, we cannot prove the bound using this specialty of the imbalanced nodes as did in [16].Luckily, we found that push/relabel will only happen on excess nodes and stop once the nodes become balanced and thus the set of deficit nodes keeps shrinking.We leverage this specialty and prove that the best ever bound can be achieved using our algorithm.
Compared with cs2 [18], the idea of set-relabel and price refinement in our implementation are both adapted from it.However, cs2 did not explicitly use the blocking flow created by set-relabel to guide flow pushing.Thus, it is not guaranteed to decrease the total excess of the network within O(m) pushes.In our implementation, we force the flow to be firstly pushed along the blocking flow to make sure we can decrease the total excess of the graph at least one.Besides, we set an upper bound for the iteration number of price refinement, which otherwise would dominate the overall theoretical bound and make it √ n folds worse.

EXPERIMENTS
We use two sets of experiments to study the practical efficiency of our circulation framework.First, we compare the computational time of the proposed circulation-based formulation with previous minimum-cost flow-based formulations on identity inference problems in MOT.Second, we test the efficiency of our formulation as a sub-routine to iteratively approximate the solution of quadratic programming framework in MOT.After efficiency comparisons, we use two applications, car tracking and cell tracking, to illustrate how the efficiency improvement enables more sophisticated but computationally demanding models leading to better tracking performance.
For the efficiency comparisons of identity inference in MOT, we choose three widely used peer algorithms, SSP, dSSP [14], and MCF [13].SSP and dSSP are both based on successive shortest paths algorithm, which is known to have superior theoretical complexity over push/relabelbased algorithms on solving the minimum-cost flow problems in MOT when the object number is small [12], [14], [15].MCF used cs2 [18] for solving their identity inference problems.Written in the C programming language, cs2 is an efficient implementation of the cost-scaling algorithm, which is widely considered as the best solver for generic minimum-cost flow problems.SSP were implemented in C++.To make fair comparison, dSSP was re-implemented in C++ from the Python package provided in [14].Note that we do not include KSP [12] and the blocking flowbased method 'Block-CS', both of which are listed in Table 1.KSP is the same as SSP.For 'Block-CS', it is because the purely blocking flow-based implementation has been widely acknowledged not as practically efficient as cs2 implementation [18], [37].
After the efficiency comparison, we use two applications in two different scenarios to show the accuracy benefits from our efficient identity inference framework.The first one is car tracking on KITTI-Car dataset [38], where we incorporate our framework with three affinity models [8], [14], [15].For each affinity model, the identity inference problem is solved either globally by our framework or locally using Hungarian algorithm.The second application is cell tracking on the single-cell level imaging of mouse embryo data [39].Rather than solving the data-association at one step, our framework enables it to iteratively refine the tracking results, which previously is intangible with mincost flow-based frameworks on large scale data.

Solving first-order identity inference problem in MOT
In this section, we compare the efficiency of our minimumcost circulation formulation with widely used minimumcost flow formulations for solving the MAP problem in MOT, where only up to first-order (unary and pairwise) information of detections is considered.We select five public datasets that represent a wide range of real world applications.Three of them are natural image MOT datasets: ETHZ (sequences BAHNHOF and JELMOLI) [40], KITTI-Car [38], and MOT CVPR 2019 Challenge (CVPR19) [41].The remaining two are the particle tracking dataset, ISBI 2012 Particle Tracking Challenge (PTC) [42] and the 10TB cell tracking dataset, single-cell level mouse embryo data (Embryo) [39].For KITTI-Car dataset, we choose four long sequences (seq00, seq10, seq11, seq14) for efficiency comparison; if sequences are too short, usually there is no need to speed up them.For the CVPR19 dataset, we use its test set which includes four videos.Each video contains a crowd of pedestrians.The particle tracking dataset (PTC) provides two different types of simulated data: RECEP-TOR and VESICLE, each of which contains 15 videos with different signal to noise ratios and particle densities.We tested on the 'RECEPTOR snr 7' videos with particle density ranging from low to high.The cell tracking dataset (Embryo) contains only one sequence, which is a light-sheet imaging data of mouse embryos that is recorded for 48 hours.The video contains 531 3D frames with total size of around 10 terabytes.The number of cells contained in each frame varies from ∼3,000 to ∼42,000.Example frames can be found in Fig. 3.
All the experiments are based on the detection results either included in the datasets or provided by the authors of [15], [14], [8], and [39] in their published packages.The KITTI-Car dataset provides detection results from two detectors: DPM [3] and reglets [43].We tested on both of them.The detection results of the ETHZ dataset are also from DPM detector provided by [15].The detection results of CVPR19 dataset were provided by their website.As particle tracking benchmark did not provide detection results, we directly use the ground truth as detections when building the networks.The cell detections on the Embryo data is provided by [39] using the method of [44].The number of detections on the Embryo data is around seven millions.For other datasets, the number of the detections varies from ∼7,000 to ∼200,000.
For MOT problem with natural image, we use three different affinity models, [15], [14], and [8], to design the arc costs (probabilities in Eq. (10)(11)).As [8] was specifically designed for road scene, it is only applied to KITTI-Car dataset.For particle tracking and cell tracking datasets, we use a probability principled way to design the arc costs.For PTC dataset, the probabilities p enter and p exit are learned from the training data, which is defined as the number of trajectories divided by the number of detections.They are the same for all detections, because every particle can suddenly appear or disappear in the filed of view unlike objects in natural images.Since we are using the groundtruth as detection results, we set the linkage cost between the pre-node o i and post-node h i of the same object as c(o i , h i ) = −(c(s, o i ) + c(h i , s)) to make sure the final results will not miss any detection.The transition arc cost between two detections is decided by their distance as we do not have much appearance features to use.We use the training data ('RECEPTOR snr 4') to build an empirical distribution of the distance between two adjacent footprints of a particle.Thus, for the testing data, each distance can be transferred to a p-value p based on this empirical distribution.We set the transition arc cost as − log(p) directly.For Embryo data, we use the similar principles.The difference is that on this dataset we do not have training data, so we can only estimate the arc costs from testing data.For p enter and p exit , we estimate the number of new born cells (start of a trajectory) and dead cells (end of a trajectory) by calculating the cell number difference between adjacent frames.For example, if the number of detections decreases n in the next frame, we view it as that n trajectories end.If it increases n, we view it as n new trajectories start.This can be used to calculate p enter and p exit using the same way on PTC dataset.For transition arc cost, the key is to build the empirical distance distribution.We estimate it from the distance between each detection and its nearest neighbor.We observe that cells move slowly.For one cell, its footprints in two adjacent frames are highly likely to be nearest neighbors to each other.Thus the empirical distribution of the groundtruth distances can be estimated by calculating the distances between detections and their nearest neighbors in adjacent frames.The linkage arc costs between pre-nodes and post-nodes are set using the same way on PTC dataset.Gating is used in both PTC and Embryo datasets.Each detection is linked to its 3 nearest neighbors in next frame as did in [45] on PTC dataset.Because we allow 'jumps' in Embryo dataset, each detection has 3 linkages in each of the following two frames.
We allow the objects to 'jump', in order to tackle the problem of occlusion or missed detection (other than PTC dataset because we are using groundtruth as detection results).For CVPR19 dataset, density of pedestrian is very high and object occlusion or missing frequently happens.To handle these conditions, we allow objects in frame t to be linked to objects in frames ranging from t + 1 to t + 15.The total duration of 15 frames is around 0.5s.For other datasets, where objects are sparse and occlusion and missed detection happen infrequently (especially for the detection results from DPM or reglets detector which tends to contain many false positives), we link the objects in frame t to objects in two following frames, t + 1 and t + 2, in the resultant networks.
We performed experiments with 40 different settings of detection results, affinity models, and datasets.Summary of the detected objects, frames and the vertices and arcs of the resultant networks can be found in the appendix.Table 2, 3, and 4 show the computation time for all experiments.The results were obtained on a workstation with 2.40GHz Xeon(R) E5-2630 CPU and only a single core is used.The other specs of our comparison environment can be found in the appendix.Each item in the tables represents the time consumed by a specific method under a given experiment setting.More specifically, Table 2 shows the results on KITTI dataset.The rows in it are divided three major sections (section (a-c)).Each section represents the efficiency of identity inference incorporated with one affinity model.The columns are divided into two major sections (KITTI(DPM) and KITTI(reglets)), each of which contains the efficiency comparison based on a specific object detector (DPM or reglets).Each row corresponds the performance of a specific method and each column represents the time consuming on a specific video sequence.Table 3 shows the performance comparison on CVPR19 and ETHZ datasets, whose interpretation is the same as Table 2. Table 4 shows the results on the particle tracking dataset (PTC) and cell tracking dataset (Embryo).Each column here represents a method, while each row corresponds to a video sequence.The particle densities of the three video sequences on PTC dataset are marked out in the names of the video sequences.In Table 2, 3, and 4, the time is all reported in seconds, unless when a letter 'h' meaning hour or 'd' meaning day is appended.The numbers in the brackets indicate how many folds the method is slower than the most efficient one.Bold font indicates the most efficient method.
By formulating the MAP inference problem as a minimum-cost circulation problem, we get the best efficiency in all 40 experiments.For all the experiments, our method takes at most several minutes to finish (mostly seconds), while peer methods need up to several hours.Averaging on all 40 experiments, our circulation-based framework is 53 times faster than MCF.Our method is also much faster than methods based on successive shortest path: averagely we are 1,192 times faster than SSP and 592 times faster than dSSP ('>1d' in table 4 is viewed as one day).
As an improved version of SSP, dSSP usually performs better than SSP.Interestingly, when the object number is large (e.g., CVPR19 dataset), its performance drops quickly and is even worse than SSP.This is because dSSP keeps records of all the nodes of the sequentially instantiated paths and inserts them to the heap used in Dijkstra's algorithm before instantiating new paths.This operation will make the heap size huge when we have a large number of paths.It can be seen from the table that the running times of SSP and dSSP vary greatly with different graph settings.It may take seconds in one graph setting but take several hours for another.Based on the same minimum-cost flow framework, MCF performs relatively stable compared with the successive shortest path-based methods SSP and dSSP.It is likely that the local updating strategy of costscaling algorithm cs2 scales better with graph size.However, though using a solver that famous for its efficiency for solving generic minimum-cost flow problem, MCF does not always outperform SSP and dSSP.This is true especially when the number of expected targets is small, because the number of expected targets directly decides the number of iterations of SSP and dSSP.For example, using affinity model [14] on KITTI dataset, we usually will stop with tens of iterations in SSP or dSSP because we are forced to track a small number of targets.Under such condition, we can see the difference between MCF and SSP or dSSP is small.Sometimes MCF is even slower.If we use affinity model [8], which relies more on detections and believes each detection should participate in a trajectory, the number of targets to be identified becomes larger.Consequently, MCF becomes much more efficient.As a cost scaling-based method, we are as stable as MCF under different settings as shown in Table 2, 3, and 4. Because our framework does not need to search the optimal trajectory number, orders of efficiency improvement can always be achieved.

Solving high-order identity inference model in MOT
High-order relationships between detected objects have been incorporated to further improve the accuracy of tracking in MOT problems [19], [21], [29], [46].This kind of task is commonly formulated as a quadratic programming problem.However, identity inference based on such formulation is NP-hard.Existing methods approximate the solution with the help of Frank-Wolfe algorithm or Lagrangian relaxation, where minimum-cost flow identity inference solvers are frequently used as a sub-routine and called iteratively.However, since the number of targets is also unknown, the minimum-cost flow-based framework will encounter the same problem as we mentioned before.Under such circumstances, our circulation-based framework is a better alternative.

27.5(1)
We tested the efficiency of our framework in solving the identity inference problem formulated by quadratic programming [19] on the dataset PETS09 S1.L1 [47].The quadratic objective function is provided by the authors in their software package derived from the sequence 'Time -13-59/View 002'.After relaxing the integer solution constraints, the Frank-Wolfe algorithm iteratively solves this quadratic programming problem.In each iteration, the problem is reduced to an ILP problem with the same form of Eq. (7)(8)(9).Thus, this sub-routine problem can either be solved using minimum-cost flow-based frameworks or our circulation-based framework.The flow network has 5866 vertices and 36688 arcs.The circulation network has 5865 vertices and the same number of arcs.The step size of the Frank-wofle algorithm is k/(k + 2), where k is the index of the current iteration.The results are shown in Table 5.Our circulation-based framework is still much more efficient than minimum-cost flow-based ones: we are 22 times faster than MCF, 14 times than SSP and 20 times than dSSP.Note that for this quadratic problem, efficiency improvement from our framework is not as great as solving directly the first-order identity inference problem, especially compared with SSP and dSSP.This is a result of the small number of targets in the video as we mentioned in section 6.1, which benefits successive shortest path-based algorithms for converging with less iterations.In this test video, we have averagely less than 10 detections in each frame and totally only 44 targets appear throughout the 241 frames.

Case study: tracking using min-cost circulation framework
We present two case studies using our efficient inference model in two tracking scenarios to demonstrate the consequence of the improved efficiency.One is for car tracking on KITTI-Car dataset.The other is the cell tracking on an Embryo dataset.The first case shows that by accumulating information from the whole video, the tracking accuracy of current state-of-the-arts can be further improved.Our efficient inference model greatly relieves the computational concern of getting global optimal solution.Second, because our framework is efficient, it is computationally feasible to iteratively refine tracking results on large data like Embryo.This is valuable especially on particle or cell tracking problems, where discriminative features between detections are limited.In the second case, improved tracking accuracy is obtained by iteratively refining the tracking results using the features estimated from the tracking results of previous iterations.

Car tracking on KITTI-Car dataset
We compare the overall tracking accuracy based on local and global identity inference strategies.Three different network flow-based trackers were used [15], [14], and [8].The experiments were performed on the KITTI-Car training set [38].Trackers [15] and [14] both relies on the same MAP formulation described in section 3 for identity inference, but each tracker proposed its own affinity model.Their detection results both come from the DPM detector [3] provided by the KITTI benchmark.Tracker [8] originally used a greedy framework which linked adjacent frames each time.In [8], because they used deep learning-based detector RRC [5], which is more robust on car detection, each detection was believed to participate in an output trajectory.This means the probability β i for detection x i is approaching to zero.Under such condition, the entering and exiting arc costs become meaningless and can be directly set as zero.The transition arc cost C i,j is set as the negative value of the similarity between x i and x j .
For all these three methods, we tested both local and global optimal inference models.The local model uses greedy linking strategy, which considers two consecutive frames each time.This is widely used in many online tracking scenarios [8], [9].The linking between two frames is solved by Hungarian algorithm ('LOC' in Table 6).The global model formulates the whole video as a single network flow problem and the solution has global optimality.Note that if the MAP problem statement and the similarity score design are the same, the circulation network and flow network give identical and optimal results.Therefore, we only state the results from our circulation network ('GLB' in Table 6).As in section 6.1, to tackle the problem of occlusion or missed detection, in global formulation, we allow the objects to 'jump'.For DPM detector-based trackers [14], [15], we allow only one jump because the large amount of redundant detections.For RRC-based tracker [8], we link the objects in frame t to objects in frame t + 1 to t + 5 in the resultant networks, which is equivalent to 0.5s gap.
There are also plenty of other local optimal solutions for the MAP inference models (e.g. using dynamic programming [15], batch processing [14]), which has already been shown to degrade the performances compared with global optimal solution in the corresponding papers.Note that the measures we used were provided by [20], which was stricter than those defined originally in [48].
As shown in Table 6, global optimal solutions are always better than their local optimal counterparts in terms of 'MOTA', the most widely accepted metric [20], and 'IDF1'.More importantly, when the object detectors like RRC miss some detections [8], global optimal solution enjoys lower rate of ID switches (IDS) due to the flexible linkage choices.This is a natural advantage of global solvers and is also important for applications like object re-identification.Our global optimal circulation-based solver achieves a throughput of 1525, 1551, and 2930 fps based on these three affinity models respectively.For [15] and [14], DPM detector has high portion of false positives (∼80%) and low missing rate.Under such circumstances, ID switches happen infrequently with carefully designed affinity measures.It is worth mentioning that [8] is the top performing tracker on KITTI benchmark, and it still can be improved by simply shifting from the local framework to a global framework.

Cell tracking on Embryo dataset
Our efficient identity inference framework makes it tangible to iteratively refine the tracking results even for data as large as the single-cell level imaging of mouse embryo.The computational time of global identity inference on the mouse embryo data is decreased from at least several hours to several minutes.The first benefit of an iterative framework is that the affinity measures become not limited to pairwise features between detections, because we have sets of trajectory hypotheses from previous iterations.This is especially helpful for spot tracking or cell tracking problems, where discriminative pairwise features are not reliable and quite limited.The commonly used pairwise relationships like overlapping ratio or center distance can be biased because of the unknown velocities.The second advantage is that we can better estimate the parameters used in the whole tracking framework.This is important when training data is not available.Here we propose an iterative framework on the Embryo data to show that these two benefits improved the overall tracking accuracy dramatically.We iteratively refine the affinity designs on Embryo data described in section 6.1 in two directions.The first direction is to recruit more trajectory-related features for affinity measure.One feature is the velocity estimated from the set of trajectory hypotheses.At the very beginning, we use distances among detections because we did not known the velocity in priori.Now in the iterative framework, for each detection, we can estimate its expected location in the next frame based on its instant velocity.Then distance can be calculated using this predicted location and other detections in the following frames.Besides, for each cell, its instant velocity is calibrated using its four nearest neighbors' velocity (by calculating the median of these five cells).The other feature is the probability of a jump happening p jump in a trajectory hypotheses.In non-iterative framework, this is not accessible.Now we can estimate it as the number of jumps divided by the number of all linkages and thus add a punishment to jumping arcs, whose cost becomes − log(p * p jump ).The second direction is to refine the parameters used in the affinity measures.Since we have the set of trajectory hypotheses, we can refine the probability p enter and p exit as we did in PTC dataset, as well as the distribution of the empirical distances.
To quantitatively measure the performance, we manually labelled 100 cell trajectories in 40 time points of the mouse embryo data which contains totally 2040 cell footprints.The results of iterative framework are shown in table 7. The results of 'Iter #1' denote the results from the original non-iterative framework.We can see that the iterative framework outperforms non-iterative framework in term of almost all the metrics, especially for the number of ID switches, which decreases from 72 to 15.This is mainly due to that more features can be utilized, which makes the affinity measure more discriminative.Since there are other true positive trajectories that have not been labelled in the field of view, we did not consider the trajectory hypotheses that have no overlap with any groundtruth when calculating the accuracy.The more iterations, the better the performance can be in this case.After five iterations, the results almost converge with little accuracy increase.Note that our algorithm takes only half an hour to finish these five iterations while the other solvers need more than one day.

DISCUSSION AND CONCLUSION
In this paper, we have presented a minimumcost circulation-based framework for efficient dataassociation/identity inference in MOT.So far, the minimumcost flow framework has been most successful for this kind of problem, but it has a high computational burden, which not only hinders the trackers from using a sufficient number of frames to make accurate linking but also holds up the potential of iterative tracking refinements.Our framework leads to the best theoretical complexity bound of solving this identity inference problem and achieves orders of empirical efficiency improvement, which is demonstrated on a wide range of public datasets.
The implementation of our framework combines ideas from the blocking flow-based cost-scaling algorithm [16], which has the best known theoretical bound O(min{n 2/3 , m 1/2 }mlog(nC)) for solving minimum-cost circulation problem on unit-capacity graph, and from the most practically efficient implementation of cost-scaling algorithm, cs2 [18], which, however, has an inferior theoretically complexity of O(nm log(nC)) for the same problem.Our implementation takes advantage of the theoretical efficiency from the blocking flow algorithm and the practical efficiency from cs2.While [16] mentioned that the bound of O(n 1/2 mlog(nC)) may also be achievable by blocking flow-based implementation, no rigorous proof was provided.More importantly, the purely blocking flowbased implementation has been widely acknowledged not as practically efficient as cs2 [18], [37].Indeed, our own experiments show that it is averagely ∼3 times slower.On the other hand, compared with cs2, our implementation has similar practical efficiency but has much better theoretical bound with an improvement of √ n folds.Note that the bound O(nm log(nC)) was based on the property of the unit-capacity graph and the much looser bound given in [13], [15] was based on the generic graph.
Our efficient framework should benefit both offline and online multi-object tracking applications.For offline scenarios, it makes it possible to build and infer global models based on large scale data sets.For online applications, it allows linking with a longer history of frames and obtains better results while still achieving the real-time speed.In addition, our work will also encourage the development and application of more accurate tracking models that are otherwise limited to smaller data due to the higher computational cost.One example is a model that accumulates evidence from more frames and considers higher order interactions.Another example is a model that iteratively refines the affinity scores based on the tracking results obtained in previous iterations.
In the future, we expect the efficiency of solving the identity inference problem can be further improved by incorporating a good initialization for the minimum-cost circulation problem.This initialization can be obtained by either using greedy linking strategies that only optimize linkages among detections in two consecutive frames or by taking a more extreme approach that simply links each detection to its nearest neighbor in the next frame.If the initialization is good enough to cover most of the correct linking results, we can simply fine-tune the network until reaching the optimality.This procedure should be more efficient than solving the circulation problem from scratch.We believe that efficiency improvement will free up new opportunities.It would be interesting to see how this more efficient framework can push forward the whole MOT field and beyond.We have shown in this report that a better affinity model can be built when it is affordable to perform multiple iterations of tracking.As object detection is an indispensable component for MOT problem and an important task for its own sake, we expect that the use of iterative tracking results could further improve both detection and tracking results.

Figure 1 :
Figure1: (a) Objects detected in three consecutive frames.The first frame contains two detections; one missed detection is colored in gray.Lines between detections are the possible ways of linking them.Each line is associated with a cost.If the similarity between two detections is too low to be the same object, we do not link them.There are three trajectories in these three frames.For example, detections 1, 3 and 6 should be linked together as a single trajectory.(b) The proposed minimum-cost circulation formulation for MOT problem.Detection x i is represented by a pair of nodes: a pre-node o i and a post-node h i .The dummy node s is linked to all pre-nodes.Then all post-nodes are linked back to s.These edges are shown in dashed lines.Transition edges between detections are shown in blue.Similar to (a), there is no transition edge if the similarity between detections is too low.The input and output flows of every node in the circulation network is balanced.Therefore, the excess for the dummy node is always 0. (c) Typical minimum-cost flow formulation for MOT problem.Each detection is also represented by a pre-node and post-node.The difference is that in this flow network, there are two dummy nodes: the dummy source node s is linked to all pre-nodes {o i } and the dummy sink node t is linked to the post-nodes {h i }.The color coding is the same as that in (b).The input and output flows of these two dummy nodes are both imbalanced and the amount of imbalances decide how many targets we want to track (the amount of flow that can happen in the network).To apply existing minimum-cost flow solvers, we need to specify the excess and deficit of s and t first, which is commonly unknown.(d) The results from the proposed minimum-cost circulation framework.Three trajectories are created and they are shown with the same color as in (a).The solution can be obtained by any minimumcost circulation solver.(e) The results from the minimum-cost flow formulation.The same three trajectories are generated.In addition to a minimum-cost flow solver, an accompanying searching scheme is needed to find the optimal trajectory number, or equivalently, the optimal flow amount.

Figure 2 :
Figure 2: Flow chart of CINDA.The two modules shown with shaded colors take over the major time consumption of the whole framework.The pseudo code of these two modules can be found in the Alg. 1 (line 13-29).

Algorithm 1 : 2 /
CINDA: Circulation Network-based Data Association in MOT Input: Set of detections X = {x i } Output: Set of trajectories T = {T k } G(V, E) ← ContructCirculationNetwork(X ) G ← Arc-fixing(G) ← C; p(u) ← 0, ∀u ∈ V // C:max arc cost if ∃ a feasible circulation f 0 then f ← f 0 else return null //main loop while ≥ 1/n do ← // saturate admissible arcs for each admissible arc (v, w) do f (v, w) ← 1 end // RESTORE through push&set-relabel while f is not a feasible circulation do // step 1: set-relabel to create a blocking flow while ∃ an excess node v / ∈ V A do S ← {v ∈ V A | an deficit node is reachable from v in G A } ∀v ∈ S, p(v) ← p(v) + end // step 2: push/relabel along the blocking flow for each excess node v in V do push/relabel v until it becomes balanced end end // Decrease through price refinement while no cycle exists in G A do refine p such that f is /2-optimal if succeed then ← /2 end end T ← Flow2Trajectories(f ) return T

Lemma 8 .
Now, we can summarize the complexity of one call of RESTORE.The bound of one call of RESTORE is O(n 1/2 m).Proof.By setting = √ n, the number of iterations needed for one call of RESTORE is O( √ n).Based on Lemma 7, each iteration takes O(m) time, so the bound for RESTORE is O(n 1/2 m).

Theorem 2 .
Our minimum-cost circulation-based framework solves the identity inference problem in MOT in O(n 1/2 mlog(nC)).

Figure 3 :
Figure 3: Maximum intensity projections of the mouse embryo data at three different time points (∼20h, ∼30h, and ∼40h).The zoomed-in segments of the yellow rectangles are on the right side.Red dots in (a-c) indicate one of the tracked cells at these three time points which are also circled on the zoomed-in segments.

Figure 4 :
Figure 4: Qualitative results using local optimal (panel (b)) and global optimal (panel (c)) inference models.As shown in panel (a), starting from frame t+4, car #1 and #3 (with green bounding boxes) were occluded by other cars and thus missed in the following frames.Using local optimal model, ID switches can not be avoided when they re-appear after occlusion.As is shown in panel (b), car #1 and #3 are viewed as two new cars (with red bounding boxes).Global inference strategy can retrieve the identity of the missed cars as we use information from previous 5 frames as shown in (c).

Table 1 :
Comparison of Computational Complexity Bounds between Our Method and Existing Works

Table 2 :
Efficiency Comparison on KITTI-Car Datasets Each item represents the time consumed in seconds (or hours if 'h' is appended) by a specific method under a given experiment setting.Each column represents a video sequence and each row corresponds one method.Bold font indicates the most efficient method.Numbers in the parentheses indicate how many folds the method is slower than the most efficient one. *

Table 3 :
Efficiency Comparison on CVPR19 and ETHZ Datasets The interpretation of this table is the same as Table2.The performance of CINDA is consistent with that on KITTI-Car dataset and always the most efficient on CVPR19 and ETHZ datasets. *

Table 4 :
Efficiency Comparison on PTC and Embryo Data Each row corresponds to one video sequence.SSP and dSSP both fail to solve the identity inference on Embryo data in one day. *

Table 5 :
Efficiency Comparison of Solving Quadratic Pro-

Table 6 :
Accuracy Comparison on KITTI-Car Dataset

Table 7 :
Accuracy Comparison on Mouse Embryo Data

Table 8 :
Details of KITTI-Car dataset

Table 9 :
Details of CVPR19 and EHTZ datasets

Table 10 :
Details of PTC and Embryo datasets