def format_detections(num_images, pre_format_dict):
    """Dict{List} to List[Dict]"""
    detections = []
    keys = pre_format_dict.keys()
    for v in pre_format_dict.values(): assert len(v) == num_images

    for i in range(num_images):
        item = dict()
        for k in keys:
            item.update({k: pre_format_dict[k][i]})
        detections.append(item)
    return detections