MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / fill_tracklets

Function fill_tracklets

deeplabcut/core/trackingutils.py:711–721  ·  view source on GitHub ↗
(tracklets, trackers, animals, imname)

Source from the content-addressed store, hash-verified

709
710
711def fill_tracklets(tracklets, trackers, animals, imname):
712 for content in trackers:
713 tracklet_id, pred_id = content[-2:].astype(int)
714 if tracklet_id not in tracklets:
715 tracklets[tracklet_id] = {}
716 if pred_id != -1:
717 tracklets[tracklet_id][imname] = np.asarray(animals[pred_id])
718 else: # Resort to the tracker prediction
719 xy = np.asarray(content[:-2])
720 pred = np.insert(xy, range(2, len(xy) + 1, 2), 1)
721 tracklets[tracklet_id][imname] = np.asarray(pred)
722
723
724def calc_bboxes_from_keypoints(data, slack=0, offset=0):

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected