dtlpy 1.109.19__py3-none-any.whl → 1.109.20__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.
dtlpy/__version__.py CHANGED
@@ -1 +1 @@
1
- version = '1.109.19'
1
+ version = '1.109.20'
@@ -125,6 +125,13 @@ class Segmentation(BaseAnnotationDefinition):
125
125
  return image
126
126
 
127
127
  def to_coordinates(self, color=None):
128
+ """
129
+ Convert segmentation to coordinates
130
+ `self._color` is ignored if `color` is provided
131
+
132
+ :param color: color
133
+ :return: coordinates
134
+ """
128
135
  need_encode = False
129
136
  if color is not None and self._color is not None:
130
137
  # if input color is not the same as the annotation's color - need to re-encode
@@ -132,10 +139,11 @@ class Segmentation(BaseAnnotationDefinition):
132
139
  need_encode = True
133
140
 
134
141
  if need_encode or self._coordinates is None:
135
- if self._color is not None:
136
- color = self._color
137
- else:
138
- color = (255, 255, 255)
142
+ if color is None:
143
+ if self._color is not None:
144
+ color = self._color
145
+ else:
146
+ color = (255, 255, 255)
139
147
  max_val = np.max(self.geo)
140
148
  if max_val > 1:
141
149
  self.geo = self.geo / max_val
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dtlpy
3
- Version: 1.109.19
3
+ Version: 1.109.20
4
4
  Summary: SDK and CLI for Dataloop platform
5
5
  Home-page: https://github.com/dataloop-ai/dtlpy
6
6
  Author: Dataloop Team
@@ -1,5 +1,5 @@
1
1
  dtlpy/__init__.py,sha256=n86boFpXWXPLjSXZMmWCageGjBumPjWxRv3srysrplk,20338
2
- dtlpy/__version__.py,sha256=eIgLM-gZdxM-jhKIfBZi2m6DL_vSoUQ556FqCWu8aCs,21
2
+ dtlpy/__version__.py,sha256=fp3KHLm-IzBS08vIJp3uI5hng_NFpnnsBQfeFKxxwVw,21
3
3
  dtlpy/exceptions.py,sha256=EQCKs3pwhwZhgMByQN3D3LpWpdxwcKPEEt-bIaDwURM,2871
4
4
  dtlpy/new_instance.py,sha256=tUCzBGaSpm9GTjRuwOkFgo3A8vopUQ-baltdJss3XlI,9964
5
5
  dtlpy/assets/__init__.py,sha256=D_hAa6NM8Zoy32sF_9b7m0b7I-BQEyBFg8-9Tg2WOeo,976
@@ -113,7 +113,7 @@ dtlpy/entities/annotation_definitions/polygon.py,sha256=gI28yzvYgDj_js6bU9djAzsw
113
113
  dtlpy/entities/annotation_definitions/polyline.py,sha256=8Rid2MxwImHM3-fM-0QjzZZE41-dIpdF45ut8KwNxtA,3237
114
114
  dtlpy/entities/annotation_definitions/pose.py,sha256=Ah4vtcYTEieDHgaZXQGy4KPEZbvTID0CuWHmRiLz3hw,2527
115
115
  dtlpy/entities/annotation_definitions/ref_image.py,sha256=uDXjZPRSU9rjnzkjklUp7P7Bx9ODeBz87vzjz_LHGqA,2826
116
- dtlpy/entities/annotation_definitions/segmentation.py,sha256=CEHP9iz3Xc8Wu-A8Wy7C0Zcmwo_9OQYC9u4T-XDW5ww,7354
116
+ dtlpy/entities/annotation_definitions/segmentation.py,sha256=Fw0nVJsamcyag9ABzXo-gJgSpozB-sdylYMDfQOA770,7590
117
117
  dtlpy/entities/annotation_definitions/subtitle.py,sha256=cfNi-19KVYInmxsy5usvjDZdyGgH1Mgss_SiJhT9Bn0,1005
118
118
  dtlpy/entities/annotation_definitions/text.py,sha256=r-7laetbKvXL7hSG7AsRl9B5ZVYopUm5vB7rxgkmrCo,2559
119
119
  dtlpy/entities/annotation_definitions/undefined_annotation.py,sha256=XUocNEnmWst4D0erlf8GBAjedgFLy0K6K4fr2p_dNas,1882
@@ -226,9 +226,9 @@ dtlpy/utilities/reports/report.py,sha256=3nEsNnIWmdPEsd21nN8vMMgaZVcPKn9iawKTTeO
226
226
  dtlpy/utilities/videos/__init__.py,sha256=SV3w51vfPuGBxaMeNemx6qEMHw_C4lLpWNGXMvdsKSY,734
227
227
  dtlpy/utilities/videos/video_player.py,sha256=LCxg0EZ_DeuwcT7U_r7MRC6Q19s0xdFb7x5Gk39PRms,24072
228
228
  dtlpy/utilities/videos/videos.py,sha256=Dj916B4TQRIhI7HZVevl3foFrCsPp0eeWwvGbgX3-_A,21875
229
- dtlpy-1.109.19.data/scripts/dlp,sha256=-F0vSCWuSOOtgERAtsPMPyMmzitjhB7Yeftg_PDlDjw,10
230
- dtlpy-1.109.19.data/scripts/dlp.bat,sha256=QOvx8Dlx5dUbCTMpwbhOcAIXL1IWmgVRSboQqDhIn3A,37
231
- dtlpy-1.109.19.data/scripts/dlp.py,sha256=tEokRaDINISXnq8yNx_CBw1qM5uwjYiZoJOYGqWB3RU,4267
229
+ dtlpy-1.109.20.data/scripts/dlp,sha256=-F0vSCWuSOOtgERAtsPMPyMmzitjhB7Yeftg_PDlDjw,10
230
+ dtlpy-1.109.20.data/scripts/dlp.bat,sha256=QOvx8Dlx5dUbCTMpwbhOcAIXL1IWmgVRSboQqDhIn3A,37
231
+ dtlpy-1.109.20.data/scripts/dlp.py,sha256=tEokRaDINISXnq8yNx_CBw1qM5uwjYiZoJOYGqWB3RU,4267
232
232
  tests/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
233
  tests/assets/models_flow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
234
234
  tests/assets/models_flow/failedmain.py,sha256=n8F4eu_u7JPrJ1zedbJPvv9e3lHb3ihoErqrBIcseEc,1847
@@ -236,9 +236,9 @@ tests/assets/models_flow/main.py,sha256=vnDKyVZaae2RFpvwS22Hzi6Dt2LJerH4yQrmKtaT
236
236
  tests/assets/models_flow/main_model.py,sha256=Hl_tv7Q6KaRL3yLkpUoLMRqu5-ab1QsUYPL6RPEoamw,2042
237
237
  tests/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
238
238
  tests/features/environment.py,sha256=JcM956BxLBRvDqy6Kr1Nxd1FY_gxbE6XztZBVBMCGYM,18897
239
- dtlpy-1.109.19.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
240
- dtlpy-1.109.19.dist-info/METADATA,sha256=S1lFH5dyjapOJM45lU0Xs_kPQJLzlbL5QPjxwQDLqss,5470
241
- dtlpy-1.109.19.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
242
- dtlpy-1.109.19.dist-info/entry_points.txt,sha256=C4PyKthCs_no88HU39eioO68oei64STYXC2ooGZTc4Y,43
243
- dtlpy-1.109.19.dist-info/top_level.txt,sha256=ZWuLmQGUOtWAdgTf4Fbx884w1o0vBYq9dEc1zLv9Mig,12
244
- dtlpy-1.109.19.dist-info/RECORD,,
239
+ dtlpy-1.109.20.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
240
+ dtlpy-1.109.20.dist-info/METADATA,sha256=uFziss3AossrsPM6iQoTFlEtrYZkn41iZ0REb-H440Y,5470
241
+ dtlpy-1.109.20.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
242
+ dtlpy-1.109.20.dist-info/entry_points.txt,sha256=C4PyKthCs_no88HU39eioO68oei64STYXC2ooGZTc4Y,43
243
+ dtlpy-1.109.20.dist-info/top_level.txt,sha256=ZWuLmQGUOtWAdgTf4Fbx884w1o0vBYq9dEc1zLv9Mig,12
244
+ dtlpy-1.109.20.dist-info/RECORD,,
File without changes