supervisely 6.73.312__py3-none-any.whl → 6.73.313__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of supervisely might be problematic. Click here for more details.
- supervisely/api/labeling_job_api.py +71 -119
- {supervisely-6.73.312.dist-info → supervisely-6.73.313.dist-info}/METADATA +1 -1
- {supervisely-6.73.312.dist-info → supervisely-6.73.313.dist-info}/RECORD +7 -7
- {supervisely-6.73.312.dist-info → supervisely-6.73.313.dist-info}/LICENSE +0 -0
- {supervisely-6.73.312.dist-info → supervisely-6.73.313.dist-info}/WHEEL +0 -0
- {supervisely-6.73.312.dist-info → supervisely-6.73.313.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.312.dist-info → supervisely-6.73.313.dist-info}/top_level.txt +0 -0
|
@@ -45,6 +45,7 @@ from supervisely.geometry.polygon import Polygon
|
|
|
45
45
|
from supervisely.geometry.polyline import Polyline
|
|
46
46
|
from supervisely.geometry.rectangle import Rectangle
|
|
47
47
|
from supervisely.project.project_meta import ProjectMeta
|
|
48
|
+
from supervisely.project.project_type import ProjectType
|
|
48
49
|
from supervisely.sly_logger import logger
|
|
49
50
|
|
|
50
51
|
|
|
@@ -333,6 +334,7 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
|
|
|
333
334
|
dynamic_tags: Optional[bool] = False,
|
|
334
335
|
disable_confirm: Optional[bool] = None,
|
|
335
336
|
disable_submit: Optional[bool] = None,
|
|
337
|
+
toolbox_settings: Optional[Dict] = None,
|
|
336
338
|
) -> List[LabelingJobInfo]:
|
|
337
339
|
"""
|
|
338
340
|
Creates Labeling Job and assigns given Users to it.
|
|
@@ -373,6 +375,8 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
|
|
|
373
375
|
:type disable_confirm: bool, optional
|
|
374
376
|
:param disable_submit: If True, the Submit button will be disabled in the labeling tool. It will remain disabled until the next API call sets the parameter to False, re-enabling the button.
|
|
375
377
|
:type disable_submit: bool, optional
|
|
378
|
+
:param toolbox_settings: Settings for the labeling tool. Only video projects are supported.
|
|
379
|
+
:type toolbox_settings: Dict, optional
|
|
376
380
|
:return: List of information about new Labeling Job. See :class:`info_sequence<info_sequence>`
|
|
377
381
|
:rtype: :class:`List[LabelingJobInfo]`
|
|
378
382
|
:Usage example:
|
|
@@ -387,125 +391,40 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
|
|
|
387
391
|
|
|
388
392
|
user_name = 'alex'
|
|
389
393
|
dataset_id = 602
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
#
|
|
402
|
-
|
|
403
|
-
#
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
#
|
|
424
|
-
# [
|
|
425
|
-
# null,
|
|
426
|
-
# null
|
|
427
|
-
# ],
|
|
428
|
-
# 5,
|
|
429
|
-
# 3,
|
|
430
|
-
# [],
|
|
431
|
-
# [],
|
|
432
|
-
# [],
|
|
433
|
-
# [
|
|
434
|
-
# {
|
|
435
|
-
# "reviewStatus": "none",
|
|
436
|
-
# "id": 287244,
|
|
437
|
-
# "name": "IMG_0813"
|
|
438
|
-
# },
|
|
439
|
-
# {
|
|
440
|
-
# "reviewStatus": "none",
|
|
441
|
-
# "id": 287246,
|
|
442
|
-
# "name": "IMG_0432"
|
|
443
|
-
# },
|
|
444
|
-
# {
|
|
445
|
-
# "reviewStatus": "none",
|
|
446
|
-
# "id": 287245,
|
|
447
|
-
# "name": "IMG_0315"
|
|
448
|
-
# }
|
|
449
|
-
# ]
|
|
450
|
-
# ],
|
|
451
|
-
# [
|
|
452
|
-
# 93,
|
|
453
|
-
# "alex (#2) (#3)",
|
|
454
|
-
# "Readmy text",
|
|
455
|
-
# "Work for labelers",
|
|
456
|
-
# 13,
|
|
457
|
-
# 29,
|
|
458
|
-
# "Labelling Workspace",
|
|
459
|
-
# 494,
|
|
460
|
-
# "Test Dataset",
|
|
461
|
-
# 602,
|
|
462
|
-
# "ds1",
|
|
463
|
-
# 8,
|
|
464
|
-
# "alex",
|
|
465
|
-
# 222,
|
|
466
|
-
# "quantigo19",
|
|
467
|
-
# 8,
|
|
468
|
-
# "alex",
|
|
469
|
-
# "2021-03-25T11:04:34.031Z",
|
|
470
|
-
# null,
|
|
471
|
-
# null,
|
|
472
|
-
# "pending",
|
|
473
|
-
# false,
|
|
474
|
-
# 3,
|
|
475
|
-
# 0,
|
|
476
|
-
# 0,
|
|
477
|
-
# 0,
|
|
478
|
-
# 0,
|
|
479
|
-
# [],
|
|
480
|
-
# [],
|
|
481
|
-
# [
|
|
482
|
-
# null,
|
|
483
|
-
# null
|
|
484
|
-
# ],
|
|
485
|
-
# 5,
|
|
486
|
-
# 3,
|
|
487
|
-
# [],
|
|
488
|
-
# [],
|
|
489
|
-
# [],
|
|
490
|
-
# [
|
|
491
|
-
# {
|
|
492
|
-
# "reviewStatus": "none",
|
|
493
|
-
# "id": 287248,
|
|
494
|
-
# "name": "IMG_8454"
|
|
495
|
-
# },
|
|
496
|
-
# {
|
|
497
|
-
# "reviewStatus": "none",
|
|
498
|
-
# "id": 287249,
|
|
499
|
-
# "name": "IMG_6896"
|
|
500
|
-
# },
|
|
501
|
-
# {
|
|
502
|
-
# "reviewStatus": "none",
|
|
503
|
-
# "id": 287247,
|
|
504
|
-
# "name": "IMG_1942"
|
|
505
|
-
# }
|
|
506
|
-
# ]
|
|
507
|
-
# ]
|
|
508
|
-
# ]
|
|
394
|
+
new_labeling_jobs = api.labeling_job.create(
|
|
395
|
+
user_name,
|
|
396
|
+
dataset_id,
|
|
397
|
+
user_ids=[111, 222],
|
|
398
|
+
readme='Readmy text',
|
|
399
|
+
description='Work for labelers',
|
|
400
|
+
objects_limit_per_image=5,
|
|
401
|
+
tags_limit_per_image=3
|
|
402
|
+
)
|
|
403
|
+
print(new_labeling_jobs)
|
|
404
|
+
|
|
405
|
+
# >>> List[LabelingJobInfo(id=2,...)]
|
|
406
|
+
|
|
407
|
+
# Create video labeling job with toolbox settings
|
|
408
|
+
|
|
409
|
+
user_id = 4
|
|
410
|
+
dataset_id = 277
|
|
411
|
+
video_id = 24897
|
|
412
|
+
toolbox_settings = {"playbackRate": 32, "skipFramesSize": 15, "showVideoTime": True}
|
|
413
|
+
|
|
414
|
+
new_labeling_jobs = api.labeling_job.create(
|
|
415
|
+
name="Labeling Job name",
|
|
416
|
+
dataset_id=dataset_id,
|
|
417
|
+
user_ids=[user_id],
|
|
418
|
+
readme="Labeling Job readme",
|
|
419
|
+
description="Some description",
|
|
420
|
+
classes_to_label=["car", "animal"],
|
|
421
|
+
tags_to_label=["animal_age_group"],
|
|
422
|
+
images_ids=[video_id],
|
|
423
|
+
toolbox_settings=toolbox_settings,
|
|
424
|
+
)
|
|
425
|
+
print(new_labeling_jobs)
|
|
426
|
+
|
|
427
|
+
# >>> List[LabelingJobInfo(id=3,...)]
|
|
509
428
|
"""
|
|
510
429
|
if classes_to_label is None:
|
|
511
430
|
classes_to_label = []
|
|
@@ -538,6 +457,39 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
|
|
|
538
457
|
"dynamicTags": dynamic_tags,
|
|
539
458
|
}
|
|
540
459
|
|
|
460
|
+
if toolbox_settings is not None:
|
|
461
|
+
dataset_info = self._api.dataset.get_info_by_id(dataset_id)
|
|
462
|
+
project_id = dataset_info.project_id
|
|
463
|
+
project_info = self._api.project.get_info_by_id(project_id)
|
|
464
|
+
project_type = project_info.type
|
|
465
|
+
if project_type == ProjectType.VIDEOS.value:
|
|
466
|
+
playback_rate_possible_values = [
|
|
467
|
+
0.1,
|
|
468
|
+
0.3,
|
|
469
|
+
0.5,
|
|
470
|
+
0.6,
|
|
471
|
+
0.7,
|
|
472
|
+
0.8,
|
|
473
|
+
0.9,
|
|
474
|
+
1,
|
|
475
|
+
1.1,
|
|
476
|
+
1.2,
|
|
477
|
+
1.3,
|
|
478
|
+
1.5,
|
|
479
|
+
2,
|
|
480
|
+
4,
|
|
481
|
+
8,
|
|
482
|
+
16,
|
|
483
|
+
32,
|
|
484
|
+
]
|
|
485
|
+
playback_rate = toolbox_settings.get("playbackRate", None)
|
|
486
|
+
if playback_rate is not None:
|
|
487
|
+
if playback_rate not in playback_rate_possible_values:
|
|
488
|
+
raise ValueError(
|
|
489
|
+
f"'playbackRate' must be one of: '{','.join(playback_rate_possible_values)}'"
|
|
490
|
+
)
|
|
491
|
+
meta["toolboxSettings"] = toolbox_settings
|
|
492
|
+
|
|
541
493
|
if disable_confirm is not None:
|
|
542
494
|
meta.update({"disableConfirm": disable_confirm})
|
|
543
495
|
if disable_submit is not None:
|
|
@@ -31,7 +31,7 @@ supervisely/api/image_annotation_tool_api.py,sha256=YcUo78jRDBJYvIjrd-Y6FJAasLta
|
|
|
31
31
|
supervisely/api/image_api.py,sha256=WIML_6N1qgOWBm3acexmGSWz4hAaSxlYmUtbytROaP8,192375
|
|
32
32
|
supervisely/api/import_storage_api.py,sha256=BDCgmR0Hv6OoiRHLCVPKt3iDxSVlQp1WrnKhAK_Zl84,460
|
|
33
33
|
supervisely/api/issues_api.py,sha256=BqDJXmNoTzwc3xe6_-mA7FDFC5QQ-ahGbXk_HmpkSeQ,17925
|
|
34
|
-
supervisely/api/labeling_job_api.py,sha256=
|
|
34
|
+
supervisely/api/labeling_job_api.py,sha256=EWJh3TGauAOUWuAlK-Ey8s_S4FDMwa6I0snHX6dnhH8,55036
|
|
35
35
|
supervisely/api/module_api.py,sha256=NkDU9gZ0hAHFVnbF26fOOx56QGizyQO23E2kMjKrBWM,44513
|
|
36
36
|
supervisely/api/neural_network_api.py,sha256=ktPVRO4Jeulougio8F0mioJJHwRJcX250Djp1wBoQ9c,7620
|
|
37
37
|
supervisely/api/object_class_api.py,sha256=-rQcKwhBw3iL9KNH9c1ROgoimgWM1ls6Wi_tb1R-MzY,7683
|
|
@@ -1075,9 +1075,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1075
1075
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1076
1076
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1077
1077
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1078
|
-
supervisely-6.73.
|
|
1079
|
-
supervisely-6.73.
|
|
1080
|
-
supervisely-6.73.
|
|
1081
|
-
supervisely-6.73.
|
|
1082
|
-
supervisely-6.73.
|
|
1083
|
-
supervisely-6.73.
|
|
1078
|
+
supervisely-6.73.313.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1079
|
+
supervisely-6.73.313.dist-info/METADATA,sha256=BEmpmQBZBZN-rRc7R0_9ocXXB9x3BsLigayQAtwTURk,33596
|
|
1080
|
+
supervisely-6.73.313.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1081
|
+
supervisely-6.73.313.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1082
|
+
supervisely-6.73.313.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1083
|
+
supervisely-6.73.313.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|