コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
 def __getitem__(self, key):
     with self._file.open(_label_path(self._cat_id, key)) as fp:
         data = parse_seg(fp)
     return np.array(data)
コード例 #4
0
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)