Skip to content

Commit 9fcfd4a

Browse files
committed
new task types
1 parent ca67f11 commit 9fcfd4a

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

scaleapi/__init__.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@
2222
'cuboidannotation': {'attachment', 'attachment_type', 'instruction',
2323
'objects_to_annotate', 'min_width', 'min_height', 'with_labels', 'layers'},
2424
'datacollection': {'attachment', 'attachment_type', 'fields'},
25-
'audiotranscription': {'attachment', 'attachment_type', 'verbatim', 'phrases'}}
25+
'audiotranscription': {'attachment', 'attachment_type', 'verbatim', 'phrases'}
26+
'annotation': {'attachment', 'attachment_type', 'instruction', 'objects_to_annotate', 'with_labels', 'examples', 'min_width', 'min_height', 'layers', 'annotation_attributes'},
27+
'polygonannotation': {'attachment', 'attachment_type', 'instruction', 'objects_to_annotate', 'with_labels', 'examples', 'layers', 'annotation_attributes'},
28+
'lineannotation':
29+
{'attachment', 'attachment_type', 'instruction', 'objects_to_annotate', 'with_labels', 'examples', 'splines', 'layers', 'annotation_attributes'},
30+
'datacollection': {'attachment', 'attachment_type', 'fields'},
31+
'audiotranscription': {'attachment', 'attachment_type', 'verbatim'},
32+
'pointannotation': {'attachment_type','attachment', 'objects_to_annotate','with_labels', 'examples', 'layers','annotation_attributes'},
33+
'segmentannotation': {'attachment_type','attachment', 'labels', 'allow_unlabeled'}}
2634
SCALE_ENDPOINT = 'https://api.scaleapi.com/v1/'
2735
DEFAULT_LIMIT = 100
2836
DEFAULT_OFFSET = 0
@@ -172,3 +180,13 @@ def create_audiotranscription_task(self, **kwargs):
172180
validate_payload('audiotranscription', kwargs)
173181
taskdata = self._postrequest('task/audiotranscription', payload=kwargs)
174182
return Task(taskdata, self)
183+
184+
def create_pointannotation_task(self, **kwargs):
185+
validate_payload('pointannotation', kwargs)
186+
taskdata = self._postrequest('task/pointannotation', payload=kwargs)
187+
return Task(taskdata, self)
188+
189+
def create_segmentannotation_task(self, **kwargs):
190+
validate_payload('segmentannotation', kwargs)
191+
taskdata = self._postrequest('task/segmentannotation', payload=kwargs)
192+
return Task(taskdata, self)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
setup(
2626
name = 'scaleapi',
2727
packages = ['scaleapi'],
28-
version = '0.1.11',
28+
version = '0.2.11',
2929
description = 'The official Python client library for the Scale API, the API for human labor.',
3030
author = 'Calvin Huang',
3131
author_email = 'c@lvin.me',

0 commit comments

Comments
 (0)