video. For [KITTI Raw]{}we roughly extracted 1.25M of segments.

Generation of Tracklets using Optical Flow {#sec:tracklets}
------------------------------------------

After having automatically extracted the instance segments from a given video in the dataset, our goal is to leverage on optical flow to extract tracklets, consecutive sequences of frames where a given object instance appears.

#### Flow training data generation.

We automatically generate ground-truth data for training an optical flow network by running a Structure-from-Motion (SfM) pipeline, namely OpenSfM[^1], on the [KITTI Raw]{}video sequences and densify the result using PatchMatch [@shen2013accurate]. To further improve the quality of the 3d reconstruction, we exploit the semantic information that has been already extracted per frame to remove spurious correspondences generated by moving objects. Consistency checks are also performed in order to retain correspondences that are supported by at least $3$ images. Finally, we derive optical flow vectors between pairs of consecutive video frames in terms of the relative position of correspondences that are visible in both frames. This process produces a sparse optical flow, which will be densified in the next step.

#### Flow network.

We train a modified version of the HD$^3$ flow network [@Yin_2019_CVPR] on the dataset that we generated from [KITTI Raw]{}, without 