def load_gt_obj(self):
    ' load bbox ground truth from files either via the provided label directory or list of label files'
    files = os.listdir(self.label_dir)
    files = list(filter((lambda x: x.endswith(self.label_ext)), files))
    if (len(files) == 0):
        raise RuntimeError(('error: no label files found in %s' % self.label_dir))
    for label_file in files:
        objects_per_image = list()
        with open(os.path.join(self.label_dir, label_file), 'rt') as flabel:
            for row in csv.reader(flabel, delimiter=self.label_delimiter):
                if (len(row) == 0):
                    continue
                if (len(row) < 15):
                    raise ValueError(('Invalid label format in "%s"' % os.path.join(self.label_dir, label_file)))
                gt = GroundTruthObj()
                gt.stype = row[0].lower()
                gt.truncated = float(row[1])
                gt.occlusion = int(row[2])
                gt.angle = float(row[3])
                gt.bbox.xl = float(row[4])
                gt.bbox.yt = float(row[5])
                gt.bbox.xr = float(row[6])
                gt.bbox.yb = float(row[7])
                gt.height = float(row[8])
                gt.width = float(row[9])
                gt.length = float(row[10])
                gt.locx = float(row[11])
                gt.locy = float(row[12])
                gt.locz = float(row[13])
                gt.roty = float(row[14])
                gt.set_type()
                box_dimensions = [(gt.bbox.xr - gt.bbox.xl), (gt.bbox.yb - gt.bbox.yt)]
                if (self.min_box_size is not None):
                    if (not all(((x >= self.min_box_size) for x in box_dimensions))):
                        gt.stype = ''
                        gt.object = ObjectType.Dontcare
                objects_per_image.append(gt)
            key = os.path.splitext(label_file)[0]
            self.update_objects_all(key, objects_per_image)
load bbox ground truth from files either via the provided label directory or list of label files
def load_gt_obj(self):
    ' '
    files = os.listdir(self.label_dir)
    files = list(filter((lambda x: x.endswith(self.label_ext)), files))
    if (len(files) == 0):
        raise RuntimeError(('error: no label files found in %s' % self.label_dir))
    for label_file in files:
        objects_per_image = list()
        with open(os.path.join(self.label_dir, label_file), 'rt') as flabel:
            for row in csv.reader(flabel, delimiter=self.label_delimiter):
                if (len(row) == 0):
                    continue
                if (len(row) < 15):
                    raise ValueError(('Invalid label format in "%s"' % os.path.join(self.label_dir, label_file)))
                gt = GroundTruthObj()
                gt.stype = row[0].lower()
                gt.truncated = float(row[1])
                gt.occlusion = int(row[2])
                gt.angle = float(row[3])
                gt.bbox.xl = float(row[4])
                gt.bbox.yt = float(row[5])
                gt.bbox.xr = float(row[6])
                gt.bbox.yb = float(row[7])
                gt.height = float(row[8])
                gt.width = float(row[9])
                gt.length = float(row[10])
                gt.locx = float(row[11])
                gt.locy = float(row[12])
                gt.locz = float(row[13])
                gt.roty = float(row[14])
                gt.set_type()
                box_dimensions = [(gt.bbox.xr - gt.bbox.xl), (gt.bbox.yb - gt.bbox.yt)]
                if (self.min_box_size is not None):
                    if (not all(((x >= self.min_box_size) for x in box_dimensions))):
                        gt.stype = 
                        gt.object = ObjectType.Dontcare
                objects_per_image.append(gt)
            key = os.path.splitext(label_file)[0]
            self.update_objects_all(key, objects_per_image)