q) - \min_{n \in \mathcal{N}^p} d(p, n) + \alpha)$$ where $p$ is a reference positive proposal from any of the current pair of frames $\{t, t+\delta\}$, $\mathcal{P}^p$ is the set of positive proposals from the same video of $p$, of the same person (just not in $t$ or $t+\delta$) and $\mathcal{N}^p$ is the set of proposals containing any person except $p$. Finally, $\alpha$ is the distance margin, by which the distance between $p$ and its most similar negative has to be larger than that of $p$ and its least similar positive.

End-to-end training
-------------------

In our Siamese Track-RCNN, these three components share the same CNN backbone and are trained together in an end-to-end fashion. This design has several advantages: low computational cost, low memory footprint and potentially higher accuracy, as all these components can benefit from each other. All these are essential for online tracking in real-world applications. We train our model by simply summing the losses of these components: $\ell = \ell_{detect} +\ell_{track} + \ell_{reid}$.

Implementation details {#sec:impl_details}
======================

#### Network.

As our CNN backbone we use a ResNet-101 [@he2016deep] with feature pyramid network [@lin2017feature] and deformable convolutions [@dai2017deformable] (ResNet-101-DCN). The detection branch has the same structure of the 