def get_expert_point_labels(zipfile, cat_id, example_id): with zipfile.open(_label_path(cat_id, example_id)) as fp: point_labels = parse_seg(fp) data = np.array(point_labels, dtype=np.uint8) return data
def get_binary_point_labels(zipfile, cat_id, example_id, seg_name): path = _get_subpath(cat_id, example_id, os.path.join('points_label', seg_name), 'seg') with zipfile.open(path) as fp: labels = parse_seg(fp) return labels
def __getitem__(self, key): with self._file.open(_label_path(self._cat_id, key)) as fp: data = parse_seg(fp) return np.array(data)
def get_point_labels(zip_file, cat_id, example_id): with zip_file.open(_subpath('points_label', cat_id, example_id, 'seg')) as fp: seg = parse_seg(fp) return np.array(seg, dtype=np.uint8)