superannotate 4.5.4.dev1__tar.gz → 4.5.5.dev3__tar.gz

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.
Files changed (144) hide show
  1. {superannotate-4.5.4.dev1/src/superannotate.egg-info → superannotate-4.5.5.dev3}/PKG-INFO +1 -1
  2. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/__init__.py +1 -1
  3. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/analytics/aggregators.py +0 -8
  4. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/analytics/common.py +0 -48
  5. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/conversion.py +0 -10
  6. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_strategies.py +2 -2
  7. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_helper.py +0 -11
  8. superannotate-4.5.5.dev3/src/superannotate/lib/app/interface/responses.py +95 -0
  9. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/sdk_interface.py +543 -326
  10. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/__init__.py +1 -6
  11. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/base.py +0 -5
  12. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/classes.py +0 -5
  13. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/filters.py +2 -1
  14. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/multimodal_form.py +0 -7
  15. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/project.py +0 -1
  16. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/work_managament.py +22 -8
  17. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/service_types.py +3 -23
  18. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/serviceproviders.py +18 -0
  19. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/annotations.py +0 -21
  20. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/items.py +38 -195
  21. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/projects.py +1 -1
  22. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/controller.py +123 -50
  23. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/serviceprovider.py +10 -1
  24. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/annotation.py +1 -2
  25. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/explore.py +6 -0
  26. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/item_service.py +0 -1
  27. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/work_management.py +60 -0
  28. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/stream_data_handler.py +0 -7
  29. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/utils.py +49 -0
  30. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/validators.py +0 -20
  31. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3/src/superannotate.egg-info}/PKG-INFO +1 -1
  32. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate.egg-info/SOURCES.txt +1 -3
  33. superannotate-4.5.4.dev1/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_to_sa_pixel.py +0 -19
  34. superannotate-4.5.4.dev1/src/superannotate/lib/app/input_converters/converters/coco_converters/sa_pixel_to_coco.py +0 -31
  35. superannotate-4.5.4.dev1/src/superannotate/lib/app/input_converters/sa_conversion.py +0 -8
  36. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/LICENSE +0 -0
  37. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/MANIFEST.in +0 -0
  38. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/README.rst +0 -0
  39. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/requirements.txt +0 -0
  40. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/setup.cfg +0 -0
  41. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/setup.py +0 -0
  42. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/__init__.py +0 -0
  43. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/__init__.py +0 -0
  44. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/analytics/__init__.py +0 -0
  45. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/bin/__init__.py +0 -0
  46. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/bin/superannotate.py +0 -0
  47. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/common.py +0 -0
  48. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/exceptions.py +0 -0
  49. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/helpers.py +0 -0
  50. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/__init__.py +0 -0
  51. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/__init__.py +0 -0
  52. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/baseStrategy.py +0 -0
  53. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/coco_converters/__init__.py +0 -0
  54. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_api.py +0 -0
  55. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_converter.py +0 -0
  56. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_strategies.py +0 -0
  57. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_to_sa_vector.py +0 -0
  58. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/coco_converters/sa_vector_to_coco.py +0 -0
  59. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/converters.py +0 -0
  60. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/__init__.py +0 -0
  61. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_helper.py +0 -0
  62. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_strategies.py +0 -0
  63. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_to_sa_vector.py +0 -0
  64. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/__init__.py +0 -0
  65. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_strategies.py +0 -0
  66. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_to_sa_vector.py +0 -0
  67. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/__init__.py +0 -0
  68. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_helper.py +0 -0
  69. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_to_sa_vector.py +0 -0
  70. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/sa_json_helper.py +0 -0
  71. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/__init__.py +0 -0
  72. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_strategies.py +0 -0
  73. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_to_sa_vector.py +0 -0
  74. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/__init__.py +0 -0
  75. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_helper.py +0 -0
  76. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_to_sa_vector.py +0 -0
  77. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vgg_converters/__init__.py +0 -0
  78. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_helper.py +0 -0
  79. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_strategies.py +0 -0
  80. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_to_sa_vector.py +0 -0
  81. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/voc_converters/__init__.py +0 -0
  82. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_strategies.py +0 -0
  83. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_to_sa_pixel.py +0 -0
  84. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_to_sa_vector.py +0 -0
  85. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vott_converters/__init__.py +0 -0
  86. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_strategies.py +0 -0
  87. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_to_sa_vector.py +0 -0
  88. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/yolo_converters/__init__.py +0 -0
  89. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_strategies.py +0 -0
  90. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_to_sa_vector.py +0 -0
  91. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/export_from_sa_conversions.py +0 -0
  92. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/input_converters/import_to_sa_conversions.py +0 -0
  93. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/__init__.py +0 -0
  94. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/base_interface.py +0 -0
  95. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/cli_interface.py +0 -0
  96. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/sdk/__init__.py +0 -0
  97. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/sdk/folders.py +0 -0
  98. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/sdk/project.py +0 -0
  99. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/interface/types.py +0 -0
  100. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/app/serializers.py +0 -0
  101. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/base_usecases.py +0 -0
  102. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/conditions.py +0 -0
  103. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/config.py +0 -0
  104. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/__init__.py +0 -0
  105. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/folder.py +0 -0
  106. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/integrations.py +0 -0
  107. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/items.py +0 -0
  108. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/entities/project_entities.py +0 -0
  109. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/enums.py +0 -0
  110. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/exceptions.py +0 -0
  111. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/jsx_conditions.py +0 -0
  112. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/plugin.py +0 -0
  113. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/reporter.py +0 -0
  114. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/repositories.py +0 -0
  115. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/response.py +0 -0
  116. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/types.py +0 -0
  117. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/__init__.py +0 -0
  118. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/base.py +0 -0
  119. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/classes.py +0 -0
  120. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/custom_fields.py +0 -0
  121. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/folders.py +0 -0
  122. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/images.py +0 -0
  123. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/integrations.py +0 -0
  124. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/usecases/models.py +0 -0
  125. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/utils.py +0 -0
  126. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/core/video_convertor.py +0 -0
  127. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/__init__.py +0 -0
  128. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/annotation_adapter.py +0 -0
  129. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/custom_entities.py +0 -0
  130. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/helpers.py +0 -0
  131. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/query_builder.py +0 -0
  132. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/repositories.py +0 -0
  133. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/__init__.py +0 -0
  134. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/annotation_class.py +0 -0
  135. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/folder.py +0 -0
  136. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/http_client.py +0 -0
  137. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/integration.py +0 -0
  138. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/item.py +0 -0
  139. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/project.py +0 -0
  140. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate/lib/infrastructure/services/telemetry_scoring.py +0 -0
  141. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate.egg-info/dependency_links.txt +0 -0
  142. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate.egg-info/entry_points.txt +0 -0
  143. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate.egg-info/requires.txt +0 -0
  144. {superannotate-4.5.4.dev1 → superannotate-4.5.5.dev3}/src/superannotate.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: superannotate
3
- Version: 4.5.4.dev1
3
+ Version: 4.5.5.dev3
4
4
  Summary: Python SDK to SuperAnnotate platform
5
5
  Home-page: https://github.com/superannotateai/superannotate-python-sdk
6
6
  Author: SuperAnnotate AI
@@ -2,7 +2,7 @@ import logging
2
2
  import os
3
3
  import sys
4
4
 
5
- __version__ = "4.5.4dev1"
5
+ __version__ = "4.5.5dev3"
6
6
 
7
7
 
8
8
  os.environ.update({"sa_version": __version__})
@@ -384,9 +384,7 @@ class DataAggregator:
384
384
  annotation_json = None
385
385
  with open(annotation_path) as fp:
386
386
  annotation_json = json.load(fp)
387
- parts = Path(annotation_path).name.split(self._annotation_suffix)
388
387
  row_data = self.__fill_image_metadata(row_data, annotation_json["metadata"])
389
- annotation_instance_id = 0
390
388
 
391
389
  # include comments
392
390
  for annotation in annotation_json["comments"]:
@@ -433,10 +431,8 @@ class DataAggregator:
433
431
  if Path(annotation_path).parent != Path(self.project_root):
434
432
  folder_name = Path(annotation_path).parent.name
435
433
  instance_row.folderName = folder_name
436
- num_added = 0
437
434
  if not attributes:
438
435
  rows.append(instance_row)
439
- num_added = 1
440
436
  else:
441
437
  for attribute in attributes:
442
438
  attribute_row = copy.copy(instance_row)
@@ -469,10 +465,6 @@ class DataAggregator:
469
465
  attribute_row.attributeName = attribute_name
470
466
 
471
467
  rows.append(attribute_row)
472
- num_added += 1
473
-
474
- if num_added > 0:
475
- annotation_instance_id += 1
476
468
 
477
469
  df = pd.DataFrame([row.__dict__ for row in rows], dtype=object)
478
470
  df = df.astype({"probability": float})
@@ -3,7 +3,6 @@ import logging
3
3
  from pathlib import Path
4
4
 
5
5
  import pandas as pd
6
- import plotly.express as px
7
6
  from lib.core.exceptions import AppException
8
7
 
9
8
  logger = logging.getLogger("sa")
@@ -558,50 +557,3 @@ def consensus(df, item_name, annot_type):
558
557
  instance_id += 1
559
558
 
560
559
  return image_data
561
-
562
-
563
- def consensus_plot(consensus_df, *_, **__):
564
- plot_data = consensus_df.copy()
565
-
566
- # annotator-wise boxplot
567
- annot_box_fig = px.box(
568
- plot_data,
569
- x="creatorEmail",
570
- y="score",
571
- points="all",
572
- color="creatorEmail",
573
- color_discrete_sequence=px.colors.qualitative.Dark24,
574
- )
575
- annot_box_fig.show()
576
-
577
- # project-wise boxplot
578
- project_box_fig = px.box(
579
- plot_data,
580
- x="folderName",
581
- y="score",
582
- points="all",
583
- color="folderName",
584
- color_discrete_sequence=px.colors.qualitative.Dark24,
585
- )
586
- project_box_fig.show()
587
-
588
- # scatter plot of score vs area
589
- fig = px.scatter(
590
- plot_data,
591
- x="area",
592
- y="score",
593
- color="className",
594
- symbol="creatorEmail",
595
- facet_col="folderName",
596
- color_discrete_sequence=px.colors.qualitative.Dark24,
597
- hover_data={
598
- "className": False,
599
- "itemName": True,
600
- "folderName": False,
601
- "area": False,
602
- "score": False,
603
- },
604
- )
605
- fig.for_each_annotation(lambda a: a.update(text=a.text.split("=")[-1]))
606
- fig.for_each_trace(lambda t: t.update(name=t.name.split("=")[-1]))
607
- fig.show()
@@ -94,16 +94,6 @@ def _passes_type_sanity(params_info):
94
94
  )
95
95
 
96
96
 
97
- def _passes_list_members_type_sanity(lists_info):
98
- for _list in lists_info:
99
- for _list_member in _list[0]:
100
- if not isinstance(_list_member, _list[2]):
101
- raise AppException(
102
- "'%s' should be list of '%s', but contains '%s'"
103
- % (_list[1], _list[2], type(_list_member))
104
- )
105
-
106
-
107
97
  def _passes_value_sanity(values_info):
108
98
  for value in values_info:
109
99
  if value[0] not in value[2]:
@@ -24,11 +24,11 @@ class SuperviselyStrategy(baseStrategy):
24
24
  == "supervisely_keypoint_detection_to_sa_vector"
25
25
  ):
26
26
  meta_json = json.load(open(self.export_root / "meta.json"))
27
- sa_jsons = self.conversion_algorithm(
27
+ self.conversion_algorithm(
28
28
  json_files, classes_id_map, meta_json, self.output_dir
29
29
  )
30
30
  else:
31
- sa_jsons = self.conversion_algorithm(
31
+ self.conversion_algorithm(
32
32
  json_files, classes_id_map, self.task, self.output_dir
33
33
  )
34
34
  (self.output_dir / "classes").mkdir(exist_ok=True)
@@ -38,17 +38,6 @@ def _iou(bbox1, bbox2):
38
38
  )
39
39
 
40
40
 
41
- def _get_image_shape_from_xml(file_path):
42
- with open(os.path.splitext(file_path)[0] + ".xml") as f:
43
- tree = ET.parse(f)
44
-
45
- size = tree.find("size")
46
- width = int(size.find("width").text)
47
- height = int(size.find("height").text)
48
-
49
- return height, width
50
-
51
-
52
41
  def _get_image_metadata(file_path):
53
42
  with open(os.path.splitext(file_path)[0] + ".xml") as f:
54
43
  tree = ET.parse(f)
@@ -0,0 +1,95 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Callable
4
+ from collections.abc import Iterator
5
+ from typing import Generic
6
+ from typing import overload
7
+ from typing import TypeVar
8
+
9
+ T = TypeVar("T")
10
+
11
+
12
+ class BaseResult(list, Generic[T]):
13
+ """A generic list-like wrapper for results with lazy loading support.
14
+
15
+ Inherits from ``list`` for full backward compatibility with code that
16
+ expects a real list (``isinstance(x, list)``, JSON serializers, etc.).
17
+ Data is fetched lazily on first access.
18
+ """
19
+
20
+ def __init__(self, data_fetcher: Callable[[], list[T]]) -> None:
21
+ super().__init__()
22
+ self._data_fetcher = data_fetcher
23
+ self._loaded = False
24
+
25
+ def _ensure_data(self) -> None:
26
+ """Lazily fetch data if not already loaded."""
27
+ if not self._loaded:
28
+ list.extend(self, self._data_fetcher())
29
+ self._loaded = True
30
+
31
+ def data(self) -> list[T]:
32
+ self._ensure_data()
33
+ return list(self)
34
+
35
+ def __iter__(self) -> Iterator[T]:
36
+ self._ensure_data()
37
+ return list.__iter__(self)
38
+
39
+ def __len__(self) -> int:
40
+ self._ensure_data()
41
+ return list.__len__(self)
42
+
43
+ @overload
44
+ def __getitem__(self, index: int) -> T: ...
45
+
46
+ @overload
47
+ def __getitem__(self, index: slice) -> list[T]: ...
48
+
49
+ def __getitem__(self, index: int | slice) -> T | list[T]:
50
+ self._ensure_data()
51
+ return list.__getitem__(self, index)
52
+
53
+ def __repr__(self) -> str:
54
+ self._ensure_data()
55
+ return list.__repr__(self)
56
+
57
+ def __bool__(self) -> bool:
58
+ self._ensure_data()
59
+ return list.__len__(self) > 0
60
+
61
+ def __contains__(self, item: object) -> bool:
62
+ self._ensure_data()
63
+ return list.__contains__(self, item)
64
+
65
+ def __eq__(self, other: object) -> bool:
66
+ self._ensure_data()
67
+ return list.__eq__(self, other)
68
+
69
+ __hash__ = None # type: ignore[assignment]
70
+
71
+
72
+ class QueryResult(BaseResult[dict]):
73
+ """A list-like wrapper for query results that supports .count() method.
74
+
75
+ This class wraps a list of query results while maintaining full backward
76
+ compatibility with list-like operations (iteration, indexing, len()).
77
+ Data is fetched lazily - only when accessed. Calling .count() does not
78
+ trigger data fetching.
79
+ """
80
+
81
+ def __init__(
82
+ self,
83
+ data_fetcher: Callable[[], list[dict]],
84
+ count_fetcher: Callable[[], int],
85
+ ) -> None:
86
+ super().__init__(data_fetcher)
87
+ self._count_fetcher = count_fetcher
88
+
89
+ def count(self) -> int:
90
+ """Return the count of items matching the query from the server.
91
+
92
+ This method does not trigger data fetching - it makes a separate
93
+ lightweight API call to get only the count.
94
+ """
95
+ return self._count_fetcher()