supervisely 6.73.386__py3-none-any.whl → 6.73.387__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.
@@ -705,8 +705,16 @@ class ObjectDetectionVisualizer(BaseVisualizer):
705
705
  return False
706
706
 
707
707
  def _get_sample_data_for_gallery(self):
708
- # get sample images with annotations for visualization (Prediction project)
709
- pred_ds = random.choice(self.eval_result.pred_dataset_infos)
710
- self.eval_result.sample_images = self.api.image.get_list(pred_ds.id, limit=9)
711
- image_ids = [x.id for x in self.eval_result.sample_images]
712
- self.eval_result.sample_anns = self.api.annotation.download_batch(pred_ds.id, image_ids)
708
+ """Get sample images with annotations for visualization (preview gallery)"""
709
+ sample_images = []
710
+ limit = 9
711
+ for ds_info in self.eval_result.pred_dataset_infos:
712
+ images = self.api.image.get_list(
713
+ ds_info.id, limit=limit, force_metadata_for_links=False
714
+ )
715
+ sample_images.extend(images)
716
+ if len(sample_images) > limit:
717
+ sample_images = random.sample(sample_images, limit)
718
+ self.eval_result.sample_images = sample_images
719
+ ids = [img.id for img in sample_images]
720
+ self.eval_result.sample_anns = self.api.annotation.download_batch(ds_info.id, ids)
@@ -280,15 +280,19 @@ class SemanticSegmentationVisualizer(BaseVisualizer):
280
280
  raise RuntimeError(f"Match data was not created properly. {e}")
281
281
 
282
282
  def _get_sample_data_for_gallery(self):
283
- # get sample images with annotations for visualization
284
- pred_ds = random.choice(self.eval_result.pred_dataset_infos)
285
- imgs = self.api.image.get_list(pred_ds.id, limit=9, force_metadata_for_links=False)
286
- anns = self.api.annotation.download_batch(
287
- pred_ds.id, [x.id for x in imgs], force_metadata_for_links=False
288
- )
289
-
290
- self.eval_result.sample_images = imgs
291
- self.eval_result.sample_anns = anns
283
+ """Get sample images with annotations for visualization (preview gallery)"""
284
+ sample_images = []
285
+ limit = 9
286
+ for ds_info in self.eval_result.pred_dataset_infos:
287
+ images = self.api.image.get_list(
288
+ ds_info.id, limit=limit, force_metadata_for_links=False
289
+ )
290
+ sample_images.extend(images)
291
+ if len(sample_images) > limit:
292
+ sample_images = random.sample(sample_images, limit)
293
+ self.eval_result.sample_images = sample_images
294
+ ids = [img.id for img in sample_images]
295
+ self.eval_result.sample_anns = self.api.annotation.download_batch(ds_info.id, ids)
292
296
 
293
297
  def _create_clickable_label(self):
294
298
  return MarkdownWidget(name="clickable_label", title="", text=self.vis_texts.clickable_label)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.386
3
+ Version: 6.73.387
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -809,7 +809,7 @@ supervisely/nn/benchmark/object_detection/evaluation_params.yaml,sha256=fEYA-Exm
809
809
  supervisely/nn/benchmark/object_detection/evaluator.py,sha256=s-hPBm5BmoCgwoozVyDacum4kVLNtYK6I6NCt_L_LSA,7278
810
810
  supervisely/nn/benchmark/object_detection/metric_provider.py,sha256=_fxS24Q8KhE2n2HknMnt86xVPYEDFw5atxsvXRnCl4w,23855
811
811
  supervisely/nn/benchmark/object_detection/text_templates.py,sha256=4BgTIX1Co4WK9_VSUa1qWCmh5OJzo3_opVU6LOjKSjc,25842
812
- supervisely/nn/benchmark/object_detection/visualizer.py,sha256=0eJ-ATDVMyjMRInoEK604vL3vJPN5Ge1HjarS11CS0A,32365
812
+ supervisely/nn/benchmark/object_detection/visualizer.py,sha256=4BOkSYl8rlvOKO87ZlmZuZCsAM9QTqDqAgNMoiwE8eI,32622
813
813
  supervisely/nn/benchmark/object_detection/vis_metrics/__init__.py,sha256=AXCLHEySEdR-B-5sfDoWBmmOLBVlyW2U_xr8Ta42sQI,2096
814
814
  supervisely/nn/benchmark/object_detection/vis_metrics/confidence_distribution.py,sha256=J6l9Vc8TGsvkTyH5u7Ry4P2jgJC2GYmcgOeMALftZBw,4254
815
815
  supervisely/nn/benchmark/object_detection/vis_metrics/confidence_score.py,sha256=pmxnF_UJk0WhqEdL7O_yIjIBtxPipLQZVJwCr6XB3zc,4751
@@ -838,7 +838,7 @@ supervisely/nn/benchmark/semantic_segmentation/evaluation_params.yaml,sha256=47D
838
838
  supervisely/nn/benchmark/semantic_segmentation/evaluator.py,sha256=XafPMpGL6v0ZQ-m7DkEjoY7W6fGCJNKolql5BA3M8V0,7261
839
839
  supervisely/nn/benchmark/semantic_segmentation/metric_provider.py,sha256=478l7w2n-yueBMVABsakfIQEo3MksbCYmKNrwMFOl6w,6546
840
840
  supervisely/nn/benchmark/semantic_segmentation/text_templates.py,sha256=7yRRD2FAdJHGSRqBVIjNjzCduKzaepA1OWtggi7B0Dg,8580
841
- supervisely/nn/benchmark/semantic_segmentation/visualizer.py,sha256=T7WTjnyFLL3BAyH7yQIqI6R5VNj1M3guamwhDglOegE,13293
841
+ supervisely/nn/benchmark/semantic_segmentation/visualizer.py,sha256=ny7S9cYdYeRL5je5eGpJOneVSz7MxZdykImPdNQ8uPY,13500
842
842
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
843
843
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/acknowledgement.py,sha256=Lm82x8AIMKv1WqmqA0W9fugSlQ_JrP9dwYYYReZmhvI,440
844
844
  supervisely/nn/benchmark/semantic_segmentation/vis_metrics/classwise_error_analysis.py,sha256=0bmL43a4cqw3grFoG68NN8Y1fkRpHBIRJptcxMor-78,1884
@@ -1103,9 +1103,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1103
1103
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1104
1104
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1105
1105
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1106
- supervisely-6.73.386.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1107
- supervisely-6.73.386.dist-info/METADATA,sha256=pAcUu38hzyDhqOlzLArYsO0AzNHXluQ4MbM0UtAm1nk,35154
1108
- supervisely-6.73.386.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1109
- supervisely-6.73.386.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1110
- supervisely-6.73.386.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1111
- supervisely-6.73.386.dist-info/RECORD,,
1106
+ supervisely-6.73.387.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1107
+ supervisely-6.73.387.dist-info/METADATA,sha256=6bZcP704iqdDpgH802O7uWemj3baQXCsDcmb5-hsDIE,35154
1108
+ supervisely-6.73.387.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1109
+ supervisely-6.73.387.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1110
+ supervisely-6.73.387.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1111
+ supervisely-6.73.387.dist-info/RECORD,,