supervisely 6.73.366__py3-none-any.whl → 6.73.368__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.
- supervisely/annotation/annotation.py +21 -21
- supervisely/annotation/label.py +4 -4
- supervisely/annotation/obj_class.py +9 -5
- supervisely/annotation/obj_class_collection.py +2 -2
- supervisely/annotation/tag.py +2 -2
- supervisely/annotation/tag_collection.py +3 -3
- supervisely/annotation/tag_meta.py +2 -2
- supervisely/annotation/tag_meta_collection.py +2 -2
- supervisely/api/agent_api.py +1 -1
- supervisely/api/annotation_api.py +1 -1
- supervisely/api/dataset_api.py +4 -4
- supervisely/api/entities_collection_api.py +1 -1
- supervisely/api/file_api.py +10 -10
- supervisely/api/image_api.py +9 -9
- supervisely/api/labeling_job_api.py +1 -1
- supervisely/api/labeling_queue_api.py +1 -1
- supervisely/api/module_api.py +6 -6
- supervisely/api/object_class_api.py +1 -1
- supervisely/api/plugin_api.py +1 -1
- supervisely/api/pointcloud/pointcloud_annotation_api.py +1 -1
- supervisely/api/pointcloud/pointcloud_api.py +1 -1
- supervisely/api/pointcloud/pointcloud_episode_annotation_api.py +1 -1
- supervisely/api/pointcloud/pointcloud_episode_api.py +1 -1
- supervisely/api/project_api.py +4 -4
- supervisely/api/remote_storage_api.py +6 -6
- supervisely/api/role_api.py +1 -1
- supervisely/api/storage_api.py +3 -3
- supervisely/api/task_api.py +1 -1
- supervisely/api/team_api.py +1 -1
- supervisely/api/user_api.py +1 -1
- supervisely/api/video/video_annotation_api.py +1 -1
- supervisely/api/video/video_api.py +4 -4
- supervisely/api/volume/volume_annotation_api.py +1 -1
- supervisely/api/volume/volume_api.py +1 -1
- supervisely/api/workspace_api.py +1 -2
- supervisely/app/development/sly-net.sh +2 -2
- supervisely/app/fastapi/index.html +3 -3
- supervisely/app/fastapi/subapp.py +1 -1
- supervisely/aug/aug.py +10 -10
- supervisely/cli/__init__.py +15 -10
- supervisely/geometry/alpha_mask.py +2 -2
- supervisely/geometry/bitmap.py +8 -6
- supervisely/geometry/bitmap_base.py +63 -24
- supervisely/geometry/cuboid.py +97 -50
- supervisely/geometry/cuboid_2d.py +2 -2
- supervisely/geometry/graph.py +4 -4
- supervisely/geometry/mask_3d.py +1 -1
- supervisely/geometry/point.py +63 -24
- supervisely/geometry/point_location.py +2 -2
- supervisely/geometry/polygon.py +2 -2
- supervisely/geometry/polyline.py +32 -40
- supervisely/geometry/rectangle.py +2 -2
- supervisely/geometry/vector_geometry.py +27 -39
- supervisely/io/env.py +3 -2
- supervisely/labeling_jobs/utils.py +5 -5
- supervisely/nn/model/prediction_session.py +50 -19
- supervisely/pointcloud/pointcloud.py +2 -2
- supervisely/pointcloud_annotation/pointcloud_annotation.py +19 -17
- supervisely/pointcloud_annotation/pointcloud_episode_annotation.py +23 -20
- supervisely/pointcloud_annotation/pointcloud_episode_frame.py +18 -12
- supervisely/pointcloud_annotation/pointcloud_episode_frame_collection.py +9 -6
- supervisely/pointcloud_annotation/pointcloud_episode_object_collection.py +7 -3
- supervisely/pointcloud_annotation/pointcloud_episode_tag.py +1 -1
- supervisely/pointcloud_annotation/pointcloud_episode_tag_collection.py +2 -2
- supervisely/pointcloud_annotation/pointcloud_figure.py +1 -1
- supervisely/pointcloud_annotation/pointcloud_object_collection.py +11 -10
- supervisely/pointcloud_annotation/pointcloud_tag.py +5 -4
- supervisely/pointcloud_annotation/pointcloud_tag_collection.py +7 -6
- supervisely/pointcloud_episodes/pointcloud_episodes.py +2 -2
- supervisely/project/download.py +1 -1
- supervisely/project/pointcloud_episode_project.py +1 -2
- supervisely/project/pointcloud_project.py +1 -1
- supervisely/project/project.py +8 -7
- supervisely/project/project_meta.py +2 -2
- supervisely/project/readme_template.md +1 -1
- supervisely/project/upload.py +1 -1
- supervisely/project/video_project.py +1 -1
- supervisely/project/volume_project.py +1 -1
- supervisely/task/progress.py +1 -1
- supervisely/video_annotation/frame.py +2 -2
- supervisely/video_annotation/frame_collection.py +3 -3
- supervisely/video_annotation/video_annotation.py +7 -5
- supervisely/video_annotation/video_figure.py +2 -2
- supervisely/video_annotation/video_object.py +47 -28
- supervisely/video_annotation/video_object_collection.py +15 -8
- supervisely/video_annotation/video_tag.py +2 -2
- supervisely/video_annotation/video_tag_collection.py +5 -5
- supervisely/volume_annotation/volume_figure.py +2 -2
- supervisely/volume_annotation/volume_tag.py +6 -5
- {supervisely-6.73.366.dist-info → supervisely-6.73.368.dist-info}/METADATA +2 -2
- {supervisely-6.73.366.dist-info → supervisely-6.73.368.dist-info}/RECORD +95 -95
- {supervisely-6.73.366.dist-info → supervisely-6.73.368.dist-info}/LICENSE +0 -0
- {supervisely-6.73.366.dist-info → supervisely-6.73.368.dist-info}/WHEEL +0 -0
- {supervisely-6.73.366.dist-info → supervisely-6.73.368.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.366.dist-info → supervisely-6.73.368.dist-info}/top_level.txt +0 -0
|
@@ -294,7 +294,7 @@ class Annotation:
|
|
|
294
294
|
|
|
295
295
|
def to_json(self) -> Dict:
|
|
296
296
|
"""
|
|
297
|
-
Convert the Annotation to a json dict. Read more about `Supervisely format <https://docs.
|
|
297
|
+
Convert the Annotation to a json dict. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
298
298
|
|
|
299
299
|
:return: Json format as a dict
|
|
300
300
|
:rtype: :class:`dict`
|
|
@@ -362,7 +362,7 @@ class Annotation:
|
|
|
362
362
|
@classmethod
|
|
363
363
|
def from_json(cls, data: Dict, project_meta: ProjectMeta) -> Annotation:
|
|
364
364
|
"""
|
|
365
|
-
Convert a json dict to Annotation. Read more about `Supervisely format <https://docs.
|
|
365
|
+
Convert a json dict to Annotation. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
366
366
|
|
|
367
367
|
:param data: Annotation in json format as a dict.
|
|
368
368
|
:type data: dict
|
|
@@ -455,7 +455,7 @@ class Annotation:
|
|
|
455
455
|
|
|
456
456
|
import supervisely as sly
|
|
457
457
|
|
|
458
|
-
address = 'https://app.
|
|
458
|
+
address = 'https://app.supervisely.com/'
|
|
459
459
|
token = 'Your Supervisely API Token'
|
|
460
460
|
api = sly.Api(address, token)
|
|
461
461
|
|
|
@@ -921,7 +921,7 @@ class Annotation:
|
|
|
921
921
|
|
|
922
922
|
import supervisely as sly
|
|
923
923
|
|
|
924
|
-
address = 'https://app.
|
|
924
|
+
address = 'https://app.supervisely.com/'
|
|
925
925
|
token = 'Your Supervisely API Token'
|
|
926
926
|
api = sly.Api(address, token)
|
|
927
927
|
|
|
@@ -979,7 +979,7 @@ class Annotation:
|
|
|
979
979
|
|
|
980
980
|
import supervisely as sly
|
|
981
981
|
|
|
982
|
-
address = 'https://app.
|
|
982
|
+
address = 'https://app.supervisely.com/'
|
|
983
983
|
token = 'Your Supervisely API Token'
|
|
984
984
|
api = sly.Api(address, token)
|
|
985
985
|
|
|
@@ -1039,7 +1039,7 @@ class Annotation:
|
|
|
1039
1039
|
import supervisely as sly
|
|
1040
1040
|
from supervisely.geometry.image_rotator import ImageRotator
|
|
1041
1041
|
|
|
1042
|
-
address = 'https://app.
|
|
1042
|
+
address = 'https://app.supervisely.com/'
|
|
1043
1043
|
token = 'Your Supervisely API Token'
|
|
1044
1044
|
api = sly.Api(address, token)
|
|
1045
1045
|
|
|
@@ -1102,7 +1102,7 @@ class Annotation:
|
|
|
1102
1102
|
|
|
1103
1103
|
import supervisely as sly
|
|
1104
1104
|
|
|
1105
|
-
address = 'https://app.
|
|
1105
|
+
address = 'https://app.supervisely.com/'
|
|
1106
1106
|
token = 'Your Supervisely API Token'
|
|
1107
1107
|
api = sly.Api(address, token)
|
|
1108
1108
|
|
|
@@ -1167,7 +1167,7 @@ class Annotation:
|
|
|
1167
1167
|
|
|
1168
1168
|
import supervisely as sly
|
|
1169
1169
|
|
|
1170
|
-
address = 'https://app.
|
|
1170
|
+
address = 'https://app.supervisely.com/'
|
|
1171
1171
|
token = 'Your Supervisely API Token'
|
|
1172
1172
|
api = sly.Api(address, token)
|
|
1173
1173
|
|
|
@@ -1228,7 +1228,7 @@ class Annotation:
|
|
|
1228
1228
|
|
|
1229
1229
|
import supervisely as sly
|
|
1230
1230
|
|
|
1231
|
-
address = 'https://app.
|
|
1231
|
+
address = 'https://app.supervisely.com/'
|
|
1232
1232
|
token = 'Your Supervisely API Token'
|
|
1233
1233
|
api = sly.Api(address, token)
|
|
1234
1234
|
|
|
@@ -1285,7 +1285,7 @@ class Annotation:
|
|
|
1285
1285
|
|
|
1286
1286
|
import supervisely as sly
|
|
1287
1287
|
|
|
1288
|
-
address = 'https://app.
|
|
1288
|
+
address = 'https://app.supervisely.com/'
|
|
1289
1289
|
token = 'Your Supervisely API Token'
|
|
1290
1290
|
api = sly.Api(address, token)
|
|
1291
1291
|
|
|
@@ -1390,7 +1390,7 @@ class Annotation:
|
|
|
1390
1390
|
|
|
1391
1391
|
import supervisely as sly
|
|
1392
1392
|
|
|
1393
|
-
address = 'https://app.
|
|
1393
|
+
address = 'https://app.supervisely.com/'
|
|
1394
1394
|
token = 'Your Supervisely API Token'
|
|
1395
1395
|
api = sly.Api(address, token)
|
|
1396
1396
|
|
|
@@ -1467,7 +1467,7 @@ class Annotation:
|
|
|
1467
1467
|
|
|
1468
1468
|
import supervisely as sly
|
|
1469
1469
|
|
|
1470
|
-
address = 'https://app.
|
|
1470
|
+
address = 'https://app.supervisely.com/'
|
|
1471
1471
|
token = 'Your Supervisely API Token'
|
|
1472
1472
|
api = sly.Api(address, token)
|
|
1473
1473
|
|
|
@@ -1550,7 +1550,7 @@ class Annotation:
|
|
|
1550
1550
|
|
|
1551
1551
|
import supervisely as sly
|
|
1552
1552
|
|
|
1553
|
-
address = 'https://app.
|
|
1553
|
+
address = 'https://app.supervisely.com/'
|
|
1554
1554
|
token = 'Your Supervisely API Token'
|
|
1555
1555
|
api = sly.Api(address, token)
|
|
1556
1556
|
|
|
@@ -1684,7 +1684,7 @@ class Annotation:
|
|
|
1684
1684
|
|
|
1685
1685
|
import supervisely as sly
|
|
1686
1686
|
|
|
1687
|
-
address = 'https://app.
|
|
1687
|
+
address = 'https://app.supervisely.com/'
|
|
1688
1688
|
token = 'Your Supervisely API Token'
|
|
1689
1689
|
api = sly.Api(address, token)
|
|
1690
1690
|
|
|
@@ -1742,7 +1742,7 @@ class Annotation:
|
|
|
1742
1742
|
|
|
1743
1743
|
import supervisely as sly
|
|
1744
1744
|
|
|
1745
|
-
address = 'https://app.
|
|
1745
|
+
address = 'https://app.supervisely.com/'
|
|
1746
1746
|
token = 'Your Supervisely API Token'
|
|
1747
1747
|
api = sly.Api(address, token)
|
|
1748
1748
|
|
|
@@ -1802,7 +1802,7 @@ class Annotation:
|
|
|
1802
1802
|
|
|
1803
1803
|
import supervisely as sly
|
|
1804
1804
|
|
|
1805
|
-
address = 'https://app.
|
|
1805
|
+
address = 'https://app.supervisely.com/'
|
|
1806
1806
|
token = 'Your Supervisely API Token'
|
|
1807
1807
|
api = sly.Api(address, token)
|
|
1808
1808
|
|
|
@@ -1927,7 +1927,7 @@ class Annotation:
|
|
|
1927
1927
|
|
|
1928
1928
|
import supervisely as sly
|
|
1929
1929
|
|
|
1930
|
-
address = 'https://app.
|
|
1930
|
+
address = 'https://app.supervisely.com/'
|
|
1931
1931
|
token = 'Your Supervisely API Token'
|
|
1932
1932
|
api = sly.Api(address, token)
|
|
1933
1933
|
|
|
@@ -1984,7 +1984,7 @@ class Annotation:
|
|
|
1984
1984
|
|
|
1985
1985
|
import supervisely as sly
|
|
1986
1986
|
|
|
1987
|
-
address = 'https://app.
|
|
1987
|
+
address = 'https://app.supervisely.com/'
|
|
1988
1988
|
token = 'Your Supervisely API Token'
|
|
1989
1989
|
api = sly.Api(address, token)
|
|
1990
1990
|
|
|
@@ -2245,7 +2245,7 @@ class Annotation:
|
|
|
2245
2245
|
|
|
2246
2246
|
import supervisely as sly
|
|
2247
2247
|
|
|
2248
|
-
address = 'https://app.
|
|
2248
|
+
address = 'https://app.supervisely.com/'
|
|
2249
2249
|
token = 'Your Supervisely API Token'
|
|
2250
2250
|
api = sly.Api(address, token)
|
|
2251
2251
|
|
|
@@ -2390,7 +2390,7 @@ class Annotation:
|
|
|
2390
2390
|
|
|
2391
2391
|
import supervisely as sly
|
|
2392
2392
|
|
|
2393
|
-
address = 'https://app.
|
|
2393
|
+
address = 'https://app.supervisely.com/'
|
|
2394
2394
|
token = 'Your Supervisely API Token'
|
|
2395
2395
|
api = sly.Api(address, token)
|
|
2396
2396
|
|
|
@@ -2801,7 +2801,7 @@ class Annotation:
|
|
|
2801
2801
|
|
|
2802
2802
|
import supervisely as sly
|
|
2803
2803
|
|
|
2804
|
-
address = 'https://app.
|
|
2804
|
+
address = 'https://app.supervisely.com/'
|
|
2805
2805
|
token = 'Your Supervisely API Token'
|
|
2806
2806
|
api = sly.Api(address, token)
|
|
2807
2807
|
|
supervisely/annotation/label.py
CHANGED
|
@@ -237,7 +237,7 @@ class LabelBase:
|
|
|
237
237
|
|
|
238
238
|
def to_json(self) -> Dict:
|
|
239
239
|
"""
|
|
240
|
-
Convert the Label to a json dict. Read more about `Supervisely format <https://docs.
|
|
240
|
+
Convert the Label to a json dict. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
241
241
|
|
|
242
242
|
:return: Json format as a dict
|
|
243
243
|
:rtype: :class:`dict`
|
|
@@ -297,7 +297,7 @@ class LabelBase:
|
|
|
297
297
|
@classmethod
|
|
298
298
|
def from_json(cls, data: Dict, project_meta: ProjectMeta) -> LabelBase:
|
|
299
299
|
"""
|
|
300
|
-
Convert a json dict to Label. Read more about `Supervisely format <https://docs.
|
|
300
|
+
Convert a json dict to Label. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
301
301
|
|
|
302
302
|
:param data: Label in json format as a dict.
|
|
303
303
|
:type data: dict
|
|
@@ -311,7 +311,7 @@ class LabelBase:
|
|
|
311
311
|
|
|
312
312
|
import supervisely as sly
|
|
313
313
|
|
|
314
|
-
address = 'https://app.
|
|
314
|
+
address = 'https://app.supervisely.com/'
|
|
315
315
|
token = 'Your Supervisely API Token'
|
|
316
316
|
api = sly.Api(address, token)
|
|
317
317
|
|
|
@@ -586,7 +586,7 @@ class LabelBase:
|
|
|
586
586
|
|
|
587
587
|
import supervisely as sly
|
|
588
588
|
|
|
589
|
-
address = 'https://app.
|
|
589
|
+
address = 'https://app.supervisely.com/'
|
|
590
590
|
token = 'Your Supervisely API Token'
|
|
591
591
|
api = sly.Api(address, token)
|
|
592
592
|
|
|
@@ -11,9 +11,9 @@ from supervisely._utils import take_with_default
|
|
|
11
11
|
from supervisely.annotation.json_geometries_map import GET_GEOMETRY_FROM_STR
|
|
12
12
|
from supervisely.collection.key_indexed_collection import KeyObject
|
|
13
13
|
from supervisely.geometry.any_geometry import AnyGeometry
|
|
14
|
+
from supervisely.geometry.cuboid_2d import Cuboid2d, Cuboid2dTemplate
|
|
14
15
|
from supervisely.geometry.geometry import Geometry
|
|
15
16
|
from supervisely.geometry.graph import GraphNodes, KeypointsTemplate
|
|
16
|
-
from supervisely.geometry.cuboid_2d import Cuboid2d, Cuboid2dTemplate
|
|
17
17
|
from supervisely.imaging.color import _validate_color, hex2rgb, random_rgb, rgb2hex
|
|
18
18
|
from supervisely.io.json import JsonSerializable
|
|
19
19
|
from supervisely.sly_logger import logger
|
|
@@ -86,7 +86,9 @@ class ObjClass(KeyObject, JsonSerializable):
|
|
|
86
86
|
raise ValueError("sly.GraphNodes requires geometry_config to be passed to sly.ObjClass")
|
|
87
87
|
elif geometry_type == Cuboid2d:
|
|
88
88
|
# create cuboid2d template with predefined settings (8 vertices, 12 edges)
|
|
89
|
-
geometry_config = Cuboid2dTemplate(
|
|
89
|
+
geometry_config = Cuboid2dTemplate(
|
|
90
|
+
self._color
|
|
91
|
+
) # ? should we create or pass the template ?
|
|
90
92
|
|
|
91
93
|
if isinstance(geometry_config, (Cuboid2dTemplate, KeypointsTemplate)):
|
|
92
94
|
geometry_config = geometry_config.config
|
|
@@ -219,7 +221,7 @@ class ObjClass(KeyObject, JsonSerializable):
|
|
|
219
221
|
|
|
220
222
|
def to_json(self) -> Dict:
|
|
221
223
|
"""
|
|
222
|
-
Convert the ObjClass to a json dict. Read more about `Supervisely format <https://docs.
|
|
224
|
+
Convert the ObjClass to a json dict. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
223
225
|
|
|
224
226
|
:return: Json format as a dict
|
|
225
227
|
:rtype: :class:`dict`
|
|
@@ -251,7 +253,9 @@ class ObjClass(KeyObject, JsonSerializable):
|
|
|
251
253
|
),
|
|
252
254
|
}
|
|
253
255
|
if self.geometry_type == Cuboid2d:
|
|
254
|
-
res[ObjClassJsonFields.GEOMETRY_CONFIG] =
|
|
256
|
+
res[ObjClassJsonFields.GEOMETRY_CONFIG] = (
|
|
257
|
+
{}
|
|
258
|
+
) # we don't need to save cuboid2d template in json meta
|
|
255
259
|
if self.sly_id is not None:
|
|
256
260
|
res[ObjClassJsonFields.ID] = self.sly_id
|
|
257
261
|
if self._hotkey is not None:
|
|
@@ -261,7 +265,7 @@ class ObjClass(KeyObject, JsonSerializable):
|
|
|
261
265
|
@classmethod
|
|
262
266
|
def from_json(cls, data: Dict) -> ObjClass:
|
|
263
267
|
"""
|
|
264
|
-
Convert a json dict to ObjClass. Read more about `Supervisely format <https://docs.
|
|
268
|
+
Convert a json dict to ObjClass. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
265
269
|
|
|
266
270
|
:param data: ObjClass in json format as a dict.
|
|
267
271
|
:type data: dict
|
|
@@ -166,7 +166,7 @@ class ObjClassCollection(KeyIndexedCollection, JsonSerializable):
|
|
|
166
166
|
|
|
167
167
|
def to_json(self) -> List[Dict]:
|
|
168
168
|
"""
|
|
169
|
-
Convert the ObjClassCollection to a list of json dicts. Read more about `Supervisely format <https://docs.
|
|
169
|
+
Convert the ObjClassCollection to a list of json dicts. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
170
170
|
|
|
171
171
|
:return: List of dicts in json format
|
|
172
172
|
:rtype: :class:`List[dict]`
|
|
@@ -206,7 +206,7 @@ class ObjClassCollection(KeyIndexedCollection, JsonSerializable):
|
|
|
206
206
|
@classmethod
|
|
207
207
|
def from_json(cls, data: List[Dict]) -> ObjClassCollection:
|
|
208
208
|
"""
|
|
209
|
-
Convert a list with dicts in json format to ObjClassCollection. Read more about `Supervisely format <https://docs.
|
|
209
|
+
Convert a list with dicts in json format to ObjClassCollection. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
210
210
|
|
|
211
211
|
:param data: List with dicts in json format.
|
|
212
212
|
:type data: List[dict]
|
supervisely/annotation/tag.py
CHANGED
|
@@ -195,7 +195,7 @@ class Tag(KeyObject):
|
|
|
195
195
|
|
|
196
196
|
def to_json(self) -> Dict:
|
|
197
197
|
"""
|
|
198
|
-
Convert the Tag to a json dict. Read more about `Supervisely format <https://docs.
|
|
198
|
+
Convert the Tag to a json dict. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
199
199
|
|
|
200
200
|
:return: Json format as a dict
|
|
201
201
|
:rtype: :class:`dict`
|
|
@@ -235,7 +235,7 @@ class Tag(KeyObject):
|
|
|
235
235
|
@classmethod
|
|
236
236
|
def from_json(cls, data: Dict, tag_meta_collection: TagMetaCollection) -> Tag:
|
|
237
237
|
"""
|
|
238
|
-
Convert a json dict to Tag. Read more about `Supervisely format <https://docs.
|
|
238
|
+
Convert a json dict to Tag. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
239
239
|
|
|
240
240
|
:param data: Tag in json format as a dict.
|
|
241
241
|
:type data: dict
|
|
@@ -140,7 +140,7 @@ class TagCollection(MultiKeyIndexedCollection):
|
|
|
140
140
|
|
|
141
141
|
def to_json(self) -> List[Dict]:
|
|
142
142
|
"""
|
|
143
|
-
Convert the TagCollection to a list of json dicts. Read more about `Supervisely format <https://docs.
|
|
143
|
+
Convert the TagCollection to a list of json dicts. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
144
144
|
|
|
145
145
|
:return: List of dicts in json format
|
|
146
146
|
:rtype: :class:`List[dict]`
|
|
@@ -178,7 +178,7 @@ class TagCollection(MultiKeyIndexedCollection):
|
|
|
178
178
|
@classmethod
|
|
179
179
|
def from_json(cls, data: List[Dict], tag_meta_collection: TagMetaCollection) -> TagCollection:
|
|
180
180
|
"""
|
|
181
|
-
Convert a list with dicts in json format to TagCollection. Read more about `Supervisely format <https://docs.
|
|
181
|
+
Convert a list with dicts in json format to TagCollection. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
182
182
|
|
|
183
183
|
:param data: List with dicts in json format.
|
|
184
184
|
:type data: List[dict]
|
|
@@ -246,7 +246,7 @@ class TagCollection(MultiKeyIndexedCollection):
|
|
|
246
246
|
import supervisely as sly
|
|
247
247
|
|
|
248
248
|
# You can connect to API directly
|
|
249
|
-
address = 'https://app.
|
|
249
|
+
address = 'https://app.supervisely.com/'
|
|
250
250
|
token = 'Your Supervisely API Token'
|
|
251
251
|
api = sly.Api(address, token)
|
|
252
252
|
|
|
@@ -383,7 +383,7 @@ class TagMeta(KeyObject, JsonSerializable):
|
|
|
383
383
|
|
|
384
384
|
def to_json(self) -> Dict:
|
|
385
385
|
"""
|
|
386
|
-
Convert the TagMeta to a json dict. Read more about `Supervisely format <https://docs.
|
|
386
|
+
Convert the TagMeta to a json dict. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
387
387
|
|
|
388
388
|
:return: Json format as a dict
|
|
389
389
|
:rtype: :class:`dict`
|
|
@@ -455,7 +455,7 @@ class TagMeta(KeyObject, JsonSerializable):
|
|
|
455
455
|
@classmethod
|
|
456
456
|
def from_json(cls, data: Dict) -> TagMeta:
|
|
457
457
|
"""
|
|
458
|
-
Convert a json dict to TagMeta. Read more about `Supervisely format <https://docs.
|
|
458
|
+
Convert a json dict to TagMeta. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
459
459
|
|
|
460
460
|
:param data: TagMeta in json format as a dict.
|
|
461
461
|
:type data: dict
|
|
@@ -170,7 +170,7 @@ class TagMetaCollection(KeyIndexedCollection, JsonSerializable):
|
|
|
170
170
|
|
|
171
171
|
def to_json(self) -> List[Dict]:
|
|
172
172
|
"""
|
|
173
|
-
Convert the TagMetaCollection to a list of json dicts. Read more about `Supervisely format <https://docs.
|
|
173
|
+
Convert the TagMetaCollection to a list of json dicts. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
174
174
|
|
|
175
175
|
:return: List of dicts in json format
|
|
176
176
|
:rtype: :class:`List[dict]`
|
|
@@ -207,7 +207,7 @@ class TagMetaCollection(KeyIndexedCollection, JsonSerializable):
|
|
|
207
207
|
@classmethod
|
|
208
208
|
def from_json(cls, data: List[Dict]) -> TagMetaCollection:
|
|
209
209
|
"""
|
|
210
|
-
Convert a list with dicts in json format to TagMetaCollection. Read more about `Supervisely format <https://docs.
|
|
210
|
+
Convert a list with dicts in json format to TagMetaCollection. Read more about `Supervisely format <https://docs.supervisely.com/data-organization/00_ann_format_navi>`_.
|
|
211
211
|
|
|
212
212
|
:param data: List with dicts in json format.
|
|
213
213
|
:type data: List[dict]
|
supervisely/api/agent_api.py
CHANGED
|
@@ -64,7 +64,7 @@ class AgentApi(ModuleApi, ModuleWithStatus):
|
|
|
64
64
|
api = sly.Api.from_env()
|
|
65
65
|
|
|
66
66
|
# Pass values into the API constructor (optional, not recommended)
|
|
67
|
-
# api = sly.Api(server_address="https://app.
|
|
67
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
68
68
|
|
|
69
69
|
team_id = 8
|
|
70
70
|
agents = api.agent.get_list(team_id)
|
|
@@ -87,7 +87,7 @@ class AnnotationApi(ModuleApi):
|
|
|
87
87
|
api = sly.Api.from_env()
|
|
88
88
|
|
|
89
89
|
# Pass values into the API constructor (optional, not recommended)
|
|
90
|
-
# api = sly.Api(server_address="https://app.
|
|
90
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
91
91
|
|
|
92
92
|
dataset_id = 254737
|
|
93
93
|
ann_infos = api.annotation.get_list(dataset_id)
|
supervisely/api/dataset_api.py
CHANGED
|
@@ -122,7 +122,7 @@ class DatasetApi(UpdateableModule, RemoveableModuleApi):
|
|
|
122
122
|
api = sly.Api.from_env()
|
|
123
123
|
|
|
124
124
|
# Pass values into the API constructor (optional, not recommended)
|
|
125
|
-
# api = sly.Api(server_address="https://app.
|
|
125
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
126
126
|
|
|
127
127
|
project_id = 1951
|
|
128
128
|
ds = api.dataset.get_list(project_id)
|
|
@@ -146,7 +146,7 @@ class DatasetApi(UpdateableModule, RemoveableModuleApi):
|
|
|
146
146
|
items_count=11,
|
|
147
147
|
created_at='2021-03-03T15:54:08.802Z',
|
|
148
148
|
updated_at='2021-03-16T09:31:37.063Z',
|
|
149
|
-
reference_image_url='https://app.
|
|
149
|
+
reference_image_url='https://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/K/q/jf/...png'),
|
|
150
150
|
team_id=1,
|
|
151
151
|
workspace_id=2
|
|
152
152
|
"""
|
|
@@ -226,7 +226,7 @@ class DatasetApi(UpdateableModule, RemoveableModuleApi):
|
|
|
226
226
|
# items_count=6,
|
|
227
227
|
# created_at="2021-03-02T10:04:33.973Z",
|
|
228
228
|
# updated_at="2021-03-10T09:31:50.341Z",
|
|
229
|
-
# reference_image_url="http://app.
|
|
229
|
+
# reference_image_url="http://app.supervisely.com/z6ut6j8bnaz1vj8aebbgs4-public/images/original/...jpg"),
|
|
230
230
|
# DatasetInfo(id=2557,
|
|
231
231
|
# name="kiwi",
|
|
232
232
|
# description="",
|
|
@@ -236,7 +236,7 @@ class DatasetApi(UpdateableModule, RemoveableModuleApi):
|
|
|
236
236
|
# items_count=6,
|
|
237
237
|
# created_at="2021-03-10T09:31:33.701Z",
|
|
238
238
|
# updated_at="2021-03-10T09:31:44.196Z",
|
|
239
|
-
# reference_image_url="http://app.
|
|
239
|
+
# reference_image_url="http://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/...jpg")
|
|
240
240
|
# ]
|
|
241
241
|
"""
|
|
242
242
|
if filters is None:
|
|
@@ -47,7 +47,7 @@ class EntitiesCollectionApi(UpdateableModule, RemoveableModuleApi):
|
|
|
47
47
|
api = sly.Api.from_env()
|
|
48
48
|
|
|
49
49
|
# Pass values into the API constructor (optional, not recommended)
|
|
50
|
-
# api = sly.Api(server_address="https://app.
|
|
50
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
51
51
|
|
|
52
52
|
collection = api.entities_collection.get_list(9) # api usage example
|
|
53
53
|
"""
|
supervisely/api/file_api.py
CHANGED
|
@@ -86,7 +86,7 @@ class FileApi(ModuleApiBase):
|
|
|
86
86
|
api = sly.Api.from_env()
|
|
87
87
|
|
|
88
88
|
# Pass values into the API constructor (optional, not recommended)
|
|
89
|
-
# api = sly.Api(server_address="https://app.
|
|
89
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
90
90
|
|
|
91
91
|
team_id = 8
|
|
92
92
|
file_path = "/999_App_Test/"
|
|
@@ -114,7 +114,7 @@ class FileApi(ModuleApiBase):
|
|
|
114
114
|
sizeb=261,
|
|
115
115
|
created_at='2021-01-11T09:04:17.959Z',
|
|
116
116
|
updated_at='2021-01-11T09:04:17.959Z',
|
|
117
|
-
full_storage_url='http://
|
|
117
|
+
full_storage_url='http://supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/teams_storage/8/y/P/rn/...json')
|
|
118
118
|
"""
|
|
119
119
|
return [
|
|
120
120
|
ApiField.TEAM_ID,
|
|
@@ -214,7 +214,7 @@ class FileApi(ModuleApiBase):
|
|
|
214
214
|
api = sly.Api.from_env()
|
|
215
215
|
|
|
216
216
|
# Pass values into the API constructor (optional, not recommended)
|
|
217
|
-
# api = sly.Api(server_address="https://app.
|
|
217
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
218
218
|
|
|
219
219
|
team_id = 8
|
|
220
220
|
file_path = "/999_App_Test/"
|
|
@@ -240,7 +240,7 @@ class FileApi(ModuleApiBase):
|
|
|
240
240
|
# "createdAt":"2021-01-11T09:04:17.959Z",
|
|
241
241
|
# "updatedAt":"2021-01-11T09:04:17.959Z",
|
|
242
242
|
# "hash":"z7Wv1a7WIC5HIJrfX/69XXrqtDaLxucSprWHoCxyq0M=",
|
|
243
|
-
# "fullStorageUrl":"http://
|
|
243
|
+
# "fullStorageUrl":"http://supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/teams_storage/8/y/P/rn/...json",
|
|
244
244
|
# "teamId":8,
|
|
245
245
|
# "name":"00135.json"
|
|
246
246
|
# },
|
|
@@ -257,7 +257,7 @@ class FileApi(ModuleApiBase):
|
|
|
257
257
|
# "createdAt":"2021-01-11T09:04:18.099Z",
|
|
258
258
|
# "updatedAt":"2021-01-11T09:04:18.099Z",
|
|
259
259
|
# "hash":"La9+XtF2+cTlAqUE/I72e/xS12LqyH1+z<3T+SgD4CTU=",
|
|
260
|
-
# "fullStorageUrl":"http://
|
|
260
|
+
# "fullStorageUrl":"http://supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/teams_storage/8/9/k/Hs/...json",
|
|
261
261
|
# "teamId":8,
|
|
262
262
|
# "name":"01587.json"
|
|
263
263
|
# }
|
|
@@ -325,7 +325,7 @@ class FileApi(ModuleApiBase):
|
|
|
325
325
|
api = sly.Api.from_env()
|
|
326
326
|
|
|
327
327
|
# Pass values into the API constructor (optional, not recommended)
|
|
328
|
-
# api = sly.Api(server_address="https://app.
|
|
328
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
329
329
|
|
|
330
330
|
team_id = 9
|
|
331
331
|
file_path = "/My_App_Test/"
|
|
@@ -1241,7 +1241,7 @@ class FileApi(ModuleApiBase):
|
|
|
1241
1241
|
file_id = 7660
|
|
1242
1242
|
file_url = sly.api.file.get_url(file_id)
|
|
1243
1243
|
print(file_url)
|
|
1244
|
-
# Output: http://
|
|
1244
|
+
# Output: http://supervisely.com/files/7660
|
|
1245
1245
|
"""
|
|
1246
1246
|
return f"/files/{file_id}"
|
|
1247
1247
|
|
|
@@ -1280,7 +1280,7 @@ class FileApi(ModuleApiBase):
|
|
|
1280
1280
|
# sizeb=261,
|
|
1281
1281
|
# created_at='2021-01-11T09:04:17.959Z',
|
|
1282
1282
|
# updated_at='2021-01-11T09:04:17.959Z',
|
|
1283
|
-
# full_storage_url='http://
|
|
1283
|
+
# full_storage_url='http://supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/teams_storage/8/y/P/rn/...json')
|
|
1284
1284
|
"""
|
|
1285
1285
|
if self.is_on_agent(remote_path) is True:
|
|
1286
1286
|
path_infos = self.list_on_agent(team_id, os.path.dirname(remote_path), recursive=False)
|
|
@@ -1334,7 +1334,7 @@ class FileApi(ModuleApiBase):
|
|
|
1334
1334
|
# sizeb=261,
|
|
1335
1335
|
# created_at='2021-01-11T09:04:17.959Z',
|
|
1336
1336
|
# updated_at='2021-01-11T09:04:17.959Z',
|
|
1337
|
-
# full_storage_url='http://
|
|
1337
|
+
# full_storage_url='http://supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/teams_storage/8/y/P/rn/...json')
|
|
1338
1338
|
"""
|
|
1339
1339
|
resp = self._api.post("file-storage.info", {ApiField.ID: id})
|
|
1340
1340
|
return self._convert_json_info(resp.json())
|
|
@@ -2374,7 +2374,7 @@ class FileApi(ModuleApiBase):
|
|
|
2374
2374
|
:param progress_cb_type: Type of progress callback. Can be "number" or "size". Default is "size".
|
|
2375
2375
|
"size" is used to track the number of transferred bytes.
|
|
2376
2376
|
"number" is used to track the number of transferred files.
|
|
2377
|
-
:type progress_cb_type: Literal["number", "size"], optional
|
|
2377
|
+
:type progress_cb_type: Literal["number", "size"], optional
|
|
2378
2378
|
:param enable_fallback: If True, the method will fallback to synchronous upload if an error occurs.
|
|
2379
2379
|
:type enable_fallback: bool, optional
|
|
2380
2380
|
:return: None
|
supervisely/api/image_api.py
CHANGED
|
@@ -290,7 +290,7 @@ class ImageInfo(NamedTuple):
|
|
|
290
290
|
updated_at='2021-03-02T10:04:33.973Z',
|
|
291
291
|
meta={},
|
|
292
292
|
path_original='/h5un6l2bnaz1vj8a9qgms4-public/images/original/7/h/Vo/...jpg',
|
|
293
|
-
full_storage_url='http://app.
|
|
293
|
+
full_storage_url='http://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/7/h/Vo/...jpg'),
|
|
294
294
|
tags=[],
|
|
295
295
|
created_by='admin'
|
|
296
296
|
related_data_id=None,
|
|
@@ -355,7 +355,7 @@ class ImageInfo(NamedTuple):
|
|
|
355
355
|
path_original: str
|
|
356
356
|
|
|
357
357
|
#: :class:`str`: Full storage URL to image. e.g.
|
|
358
|
-
#: "http://app.
|
|
358
|
+
#: "http://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/7/h/Vo/...jpg".
|
|
359
359
|
full_storage_url: str
|
|
360
360
|
|
|
361
361
|
#: :class:`str`: Image :class:`Tags<supervisely.annotation.tag.Tag>` list.
|
|
@@ -415,7 +415,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
415
415
|
api = sly.Api.from_env()
|
|
416
416
|
|
|
417
417
|
# Pass values into the API constructor (optional, not recommended)
|
|
418
|
-
# api = sly.Api(server_address="https://app.
|
|
418
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
419
419
|
|
|
420
420
|
image_info = api.image.get_info_by_id(image_id) # api usage example
|
|
421
421
|
"""
|
|
@@ -660,7 +660,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
660
660
|
# updated_at='2021-03-02T10:04:33.973Z',
|
|
661
661
|
# meta={},
|
|
662
662
|
# path_original='/h5un6l2bnaz1vj8a9qgms4-public/images/original/7/h/Vo/...jpg',
|
|
663
|
-
# full_storage_url='http://app.
|
|
663
|
+
# full_storage_url='http://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/7/h/Vo/...jpg'),
|
|
664
664
|
# tags=[],
|
|
665
665
|
# ImageInfo(id=770916,
|
|
666
666
|
# name='IMG_1836.jpeg',
|
|
@@ -677,7 +677,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
677
677
|
# updated_at='2021-03-02T10:04:33.973Z',
|
|
678
678
|
# meta={},
|
|
679
679
|
# path_original='/h5un6l2bnaz1vj8a9qgms4-public/images/original/C/Y/Hq/...jpg',
|
|
680
|
-
# full_storage_url='http://app.
|
|
680
|
+
# full_storage_url='http://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/C/Y/Hq/...jpg'),
|
|
681
681
|
# tags=[]
|
|
682
682
|
# ]
|
|
683
683
|
"""
|
|
@@ -1222,7 +1222,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
1222
1222
|
:type progress_cb: tqdm or callable, optional
|
|
1223
1223
|
:return: List of existing hashes
|
|
1224
1224
|
:rtype: :class:`List[str]`
|
|
1225
|
-
:Usage example: Checkout detailed example `here <https://app.
|
|
1225
|
+
:Usage example: Checkout detailed example `here <https://app.supervisely.com/explore/notebooks/guide-10-check-existing-images-and-upload-only-the-new-ones-1545/overview>`_ (you must be logged into your Supervisely account)
|
|
1226
1226
|
|
|
1227
1227
|
.. code-block:: python
|
|
1228
1228
|
|
|
@@ -1888,7 +1888,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
1888
1888
|
# "1": "meta_example"
|
|
1889
1889
|
# },
|
|
1890
1890
|
# "/h5un6l2bnaz1vj8a9qgms4-public/images/original/P/a/kn/W2mzMQg435d6wG0.jpg",
|
|
1891
|
-
# "https://app.
|
|
1891
|
+
# "https://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/P/a/kn/W2mzMQg435hiHJAPgMU.jpg"
|
|
1892
1892
|
# ]
|
|
1893
1893
|
|
|
1894
1894
|
# Add custom sort parameter for image
|
|
@@ -2053,7 +2053,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
2053
2053
|
# "1": "meta_example"
|
|
2054
2054
|
# },
|
|
2055
2055
|
# "/h5un6l2bnaz1vj8a9qgms4-public/images/original/P/a/kn/W2mzMQg435d6wG0AJGJTOsL1FqMUNOPqu4VdzFAN36LqtGwBIE4AmLOQ1BAxuIyB0bHJAPgMU.jpg",
|
|
2056
|
-
# "https://app.
|
|
2056
|
+
# "https://app.supervisely.com/h5un6l2bnaz1vj8a9qgms4-public/images/original/P/a/kn/iEaDEkejnfnb1Tz56ka0hiHJAPgMU.jpg"
|
|
2057
2057
|
# ]
|
|
2058
2058
|
|
|
2059
2059
|
# Add custom sort parameter for image
|
|
@@ -3099,7 +3099,7 @@ class ImageApi(RemoveableBulkModuleApi):
|
|
|
3099
3099
|
|
|
3100
3100
|
img_url = api.image.url(team_id, workspace_id, project_id, dataset_id, image_id)
|
|
3101
3101
|
print(url)
|
|
3102
|
-
# Output: https://app.
|
|
3102
|
+
# Output: https://app.supervisely.com/app/images/16087/23821/53939/254737#image-121236920
|
|
3103
3103
|
"""
|
|
3104
3104
|
result = urllib.parse.urljoin(
|
|
3105
3105
|
self._api.server_address,
|
|
@@ -113,7 +113,7 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
|
|
|
113
113
|
api = sly.Api.from_env()
|
|
114
114
|
|
|
115
115
|
# Pass values into the API constructor (optional, not recommended)
|
|
116
|
-
# api = sly.Api(server_address="https://app.
|
|
116
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
117
117
|
|
|
118
118
|
jobs = api.labeling_job.get_list(9) # api usage example
|
|
119
119
|
"""
|
|
@@ -61,7 +61,7 @@ class LabelingQueueApi(RemoveableBulkModuleApi, ModuleWithStatus):
|
|
|
61
61
|
api = sly.Api.from_env()
|
|
62
62
|
|
|
63
63
|
# Pass values into the API constructor (optional, not recommended)
|
|
64
|
-
# api = sly.Api(server_address="https://app.
|
|
64
|
+
# api = sly.Api(server_address="https://app.supervisely.com", token="4r47N...xaTatb")
|
|
65
65
|
|
|
66
66
|
queue = api.labeling_queues.get_info_by_id(2) # api usage example
|
|
67
67
|
"""
|