supervisely 6.73.346__py3-none-any.whl → 6.73.347__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.
@@ -144,8 +144,8 @@ class MetricProvider:
144
144
  }
145
145
 
146
146
  def get_classwise_error_data(self):
147
- self.eval_data.drop(["mean"], inplace=True)
148
147
  bar_data = self.eval_data.copy()
148
+ bar_data.drop(["mean"], inplace=True)
149
149
  bar_data = bar_data[["IoU", "E_extent_oU", "E_boundary_oU", "E_segment_oU"]]
150
150
  bar_data.sort_values(by="IoU", ascending=False, inplace=True)
151
151
  labels = list(bar_data.index)
@@ -39,7 +39,7 @@ class ConfusionMatrix(SemanticSegmVisMetric):
39
39
  # # Confusion Matrix figure
40
40
  confusion_matrix, class_names = self.eval_result.mp.confusion_matrix
41
41
 
42
- x = class_names
42
+ x = [el for el in class_names if el != "mean"]
43
43
  y = x[::-1].copy()
44
44
  if len(x) >= 20:
45
45
  text_anns = [[str(el) for el in row] for row in confusion_matrix]
@@ -240,6 +240,8 @@ class SemanticSegmentationVisualizer(BaseVisualizer):
240
240
  for src_images in self.api.image.get_list_generator(
241
241
  pred_dataset_info.id, force_metadata_for_links=False, batch_size=100
242
242
  ):
243
+ if len(src_images) == 0:
244
+ continue
243
245
  dst_images = self.api.image.copy_batch_optimized(
244
246
  pred_dataset_info.id,
245
247
  src_images,
@@ -274,8 +276,8 @@ class SemanticSegmentationVisualizer(BaseVisualizer):
274
276
  )
275
277
 
276
278
  p.update(len(src_images))
277
- except Exception:
278
- raise RuntimeError("Match data was not created properly")
279
+ except Exception as e:
280
+ raise RuntimeError(f"Match data was not created properly. {e}")
279
281
 
280
282
  def _get_sample_data_for_gallery(self):
281
283
  # get sample images with annotations for visualization
@@ -1705,8 +1705,38 @@ class Inference:
1705
1705
  if src_dataset_id in new_dataset_id:
1706
1706
  return new_dataset_id[src_dataset_id]
1707
1707
  dataset_info = api.dataset.get_info_by_id(src_dataset_id)
1708
+
1709
+ def _create_parent_recursively(output_project_id, src_parent_id):
1710
+ """Create parent datasets recursively and return the ID of the top-level parent"""
1711
+ if src_parent_id in new_dataset_id:
1712
+ return new_dataset_id[src_parent_id]
1713
+ src_parent_info = dataset_infos_dict.get(src_parent_id)
1714
+ if src_parent_info is None:
1715
+ src_parent_info = api.dataset.get_info_by_id(src_parent_id)
1716
+ if src_parent_info.parent_id is not None:
1717
+ parent_id = _create_parent_recursively(
1718
+ output_project_id, src_parent_info.parent_id
1719
+ )
1720
+ else:
1721
+ parent_id = None
1722
+ dst_parent = api.dataset.create(
1723
+ output_project_id,
1724
+ src_parent_info.name,
1725
+ change_name_if_conflict=True,
1726
+ parent_id=parent_id,
1727
+ )
1728
+ new_dataset_id[src_parent_info.id] = dst_parent.id
1729
+ return dst_parent.id
1730
+
1731
+ parent_id = None
1732
+ if dataset_info.parent_id is not None:
1733
+ parent_id = _create_parent_recursively(output_project_id, dataset_info.parent_id)
1734
+
1708
1735
  output_dataset_id = api.dataset.create(
1709
- output_project_id, dataset_info.name, change_name_if_conflict=True
1736
+ output_project_id,
1737
+ dataset_info.name,
1738
+ change_name_if_conflict=True,
1739
+ parent_id=parent_id,
1710
1740
  ).id
1711
1741
  new_dataset_id[src_dataset_id] = output_dataset_id
1712
1742
  return output_dataset_id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.346
3
+ Version: 6.73.347
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -826,13 +826,13 @@ supervisely/nn/benchmark/semantic_segmentation/base_vis_metric.py,sha256=mwGjRUT
826
826
  supervisely/nn/benchmark/semantic_segmentation/benchmark.py,sha256=8rnU6I94q0GUdXWwluZu0_Sac_eU2-Az133tHF1dA3U,1202
827
827
  supervisely/nn/benchmark/semantic_segmentation/evaluation_params.yaml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
828
828
  supervisely/nn/benchmark/semantic_segmentation/evaluator.py,sha256=XafPMpGL6v0ZQ-m7DkEjoY7W6fGCJNKolql5BA3M8V0,7261
829
- supervisely/nn/benchmark/semantic_segmentation/metric_provider.py,sha256=GwdRvyG0_nFpng6jN8ISFcMLfDbBd-fwdtoWR2XPKw4,6552
829
+ supervisely/nn/benchmark/semantic_segmentation/metric_provider.py,sha256=478l7w2n-yueBMVABsakfIQEo3MksbCYmKNrwMFOl6w,6546
830
830
  supervisely/nn/benchmark/semantic_segmentation/text_templates.py,sha256=7yRRD2FAdJHGSRqBVIjNjzCduKzaepA1OWtggi7B0Dg,8580
831
- supervisely/nn/benchmark/semantic_segmentation/visualizer.py,sha256=Nt2-OOWKQ8fbaXFk5QeEaMtMURKPQebgjzDytVgQk0g,13196
831
+ supervisely/nn/benchmark/semantic_segmentation/visualizer.py,sha256=T7WTjnyFLL3BAyH7yQIqI6R5VNj1M3guamwhDglOegE,13293
832
832
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
833
833
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/acknowledgement.py,sha256=Lm82x8AIMKv1WqmqA0W9fugSlQ_JrP9dwYYYReZmhvI,440
834
834
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/classwise_error_analysis.py,sha256=0bmL43a4cqw3grFoG68NN8Y1fkRpHBIRJptcxMor-78,1884
835
- supervisely/nn/benchmark/semantic_segmentation/vis_metrics/confusion_matrix.py,sha256=xpvicxgwDaih-64VSAsxdNvoFxeA_iaUGOK9gpvNyuQ,3233
835
+ supervisely/nn/benchmark/semantic_segmentation/vis_metrics/confusion_matrix.py,sha256=nhfUPQr1dmZpYSluVX2XmMLk8AxzahKl2hcvGEXx9oQ,3264
836
836
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/explore_predictions.py,sha256=QVtcGQv4S8W7jLANUsvuJaPP-OrUQ_LB2oEpjpLBecw,2936
837
837
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/frequently_confused.py,sha256=SyVgMD66EFLfgrClb5RCJjLhgRfTYqGsUORPYIuSe58,3697
838
838
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/iou_eou.py,sha256=IdUho3712dDLyVsgR01aNSQBcraPzYwpJmTc9AB0Txw,1401
@@ -883,7 +883,7 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
883
883
  supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
884
884
  supervisely/nn/inference/__init__.py,sha256=QFukX2ip-U7263aEPCF_UCFwj6EujbMnsgrXp5Bbt8I,1623
885
885
  supervisely/nn/inference/cache.py,sha256=LAirR5mFHCtK59EO1lefQ2qhpp0vBvRTH26EVrs13Y0,32073
886
- supervisely/nn/inference/inference.py,sha256=qBAItRxn1wZoNxSZNY6bCcaUKwwowFlRaF_z4l-c7TY,169955
886
+ supervisely/nn/inference/inference.py,sha256=6rwm4Xbar-acekOV26k0JRsKR7u9zexayOEWg6IM-yY,171299
887
887
  supervisely/nn/inference/session.py,sha256=jmkkxbe2kH-lEgUU6Afh62jP68dxfhF5v6OGDfLU62E,35757
888
888
  supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
889
889
  supervisely/nn/inference/gui/__init__.py,sha256=wCxd-lF5Zhcwsis-wScDA8n1Gk_1O00PKgDviUZ3F1U,221
@@ -1082,9 +1082,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1082
1082
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1083
1083
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1084
1084
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1085
- supervisely-6.73.346.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1086
- supervisely-6.73.346.dist-info/METADATA,sha256=yUMHQ-WdsvhuLAX9ZHWWh3fgUDTlkNR36oZaRpzRHf8,33596
1087
- supervisely-6.73.346.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1088
- supervisely-6.73.346.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1089
- supervisely-6.73.346.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1090
- supervisely-6.73.346.dist-info/RECORD,,
1085
+ supervisely-6.73.347.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1086
+ supervisely-6.73.347.dist-info/METADATA,sha256=7GkOnoQKswP3aWdQvd8kRV27PVdnozTXeuKEqlGv734,33596
1087
+ supervisely-6.73.347.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1088
+ supervisely-6.73.347.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1089
+ supervisely-6.73.347.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1090
+ supervisely-6.73.347.dist-info/RECORD,,