'preprocess all ground-truths
Returns:
labels packed in [num_images x max_num_objects x 5] tensor'

def _load_image_labels(self):

    temp = []
    for idx in self.image_set_index:
        label_file = self._label_path_from_index(idx)
        with open(label_file, 'r') as f:
            label = []
            for line in f.readlines():
                temp_label = line.strip().split()
                assert (len(temp_label) == 5), ('Invalid    label    file' + label_file)
                cls_id = int(temp_label[0])
                x = float(temp_label[1])
                y = float(temp_label[2])
                half_width = (float(temp_label[3]) / 2)
                half_height = (float(temp_label[4]) / 2)
                xmin = (x - half_width)
                ymin = (y - half_height)
                xmax = (x + half_width)
                ymax = (y + half_height)
                label.append([cls_id, xmin, ymin, xmax, ymax])
            temp.append(np.array(label))
    return temp
