Skip to content

Commit 678dc5a

Browse files
committed
Major version bump
1 parent 6a87e01 commit 678dc5a

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

labelbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"The Labelbox python package."
22

3-
__version__ = '0.0.9'
3+
__version__ = '1.0.0'

labelbox/exporters/voc_exporter.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,9 @@ def write_label( # pylint: disable-msg=too-many-arguments
9898
# convert label to Pascal VOC format
9999
for category_name, paths in labels.items():
100100
if label_format == 'WKT':
101-
xml_writer = _add_pascal_object_from_wkt(
102-
xml_writer, img_height=height, wkt_data=paths,
103-
label=category_name)
101+
xml_writer = _add_pascal_object_from_wkt(xml_writer, wkt_data=paths, label=category_name)
104102
elif label_format == 'XY':
105-
xml_writer = _add_pascal_object_from_xy(
106-
xml_writer, img_height=height, polygons=paths,
107-
label=category_name)
103+
xml_writer = _add_pascal_object_from_xy(xml_writer, polygons=paths, label=category_name)
108104
else:
109105
exc = UnknownFormatError(label_format=label_format)
110106
logging.exception(exc.message)
@@ -114,7 +110,7 @@ def write_label( # pylint: disable-msg=too-many-arguments
114110
xml_writer.save(os.path.join(annotations_output_dir, '{}.xml'.format(label_id)))
115111

116112

117-
def _add_pascal_object_from_wkt(xml_writer, img_height, wkt_data, label):
113+
def _add_pascal_object_from_wkt(xml_writer, wkt_data, label):
118114
polygons = []
119115
if isinstance(wkt_data, list): # V3+
120116
polygons = map(lambda x: wkt.loads(x['geometry']), wkt_data)
@@ -132,7 +128,7 @@ def _add_pascal_object_from_wkt(xml_writer, img_height, wkt_data, label):
132128
return xml_writer
133129

134130

135-
def _add_pascal_object_from_xy(xml_writer, img_height, polygons, label):
131+
def _add_pascal_object_from_xy(xml_writer, polygons, label):
136132
if not isinstance(polygons, list):
137133
LOGGER.warning('polygons is not [{geometry: [xy]}] nor [[xy]], skipping')
138134
return xml_writer

0 commit comments

Comments
 (0)