@@ -0,0 +1,1484 @@
+#!/usr/bin/env python%0A%0Afrom vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame%0Afrom vdetlib.utils.common import iou%0Aimport argparse%0Aimport numpy as np%0A%0Aif __name__ == '__main__':%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument('vid_file')%0A    parser.add_argument('annot_file')%0A    parser.add_argument('track_file')%0A    args = parser.parse_args()%0A%0A    vid_proto = proto_load(args.vid_file)%0A    annot_proto = proto_load(args.annot_file)%0A    track_proto = proto_load(args.track_file)%0A%0A    gt_count = 0%0A    recall_count = 0%0A    for frame in vid_proto%5B'frames'%5D:%0A        frame_id = frame%5B'frame'%5D%0A        # annot boxes%0A        annot_boxes = %5Btrack_box_at_frame(annot_track%5B'track'%5D, frame_id) %5C%0A            for annot_track in annot_proto%5B'annotations'%5D%5D%0A        annot_boxes = %5Bbox for box in annot_boxes if box is not None%5D%0A%0A        if len(annot_boxes) == 0: continue%0A        gt_count += len(annot_boxes)%0A%0A        # track boxes%0A        track_boxes = %5Btrack_box_at_frame(tracklet, frame_id) %5C%0A            for tracklet in track_proto%5B'tracks'%5D%5D%0A        track_boxes = %5Bbox for box in track_boxes if box is not None%5D%0A        if len(track_boxes) == 0: continue%0A%0A        overlaps = iou(np.asarray(annot_boxes), np.asarray(track_boxes))%0A        max_overlaps = overlaps.max(axis=1)%0A        recall_count += np.count_nonzero(max_overlaps %3E= 0.5)%0A%0A    print %22%7B%7D %7B%7D %7B%7D %7B%7D%22.format(vid_proto%5B'video'%5D,%0A        gt_count, recall_count, float(recall_count) / gt_count)%0A

Add a script to calculate track recalls.