Skip to content

Commit 89b1af0

Browse files
authored
Merge pull request #310 from superannotateai/friday
Friday
2 parents d814d5d + 4a26aad commit 89b1af0

File tree

21 files changed

+2006
-545
lines changed

21 files changed

+2006
-545
lines changed

docs/source/superannotate.sdk.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,18 +323,13 @@ ________________________
323323
.. _ref_aggregate_annotations_as_df:
324324
.. autofunction:: superannotate.aggregate_annotations_as_df
325325
.. autofunction:: superannotate.df_to_annotations
326-
.. _ref_filter_annotation_instances:
327-
.. autofunction:: superannotate.filter_annotation_instances
328-
.. autofunction:: superannotate.filter_images_by_comments
329-
.. autofunction:: superannotate.filter_images_by_tags
330326

331327
----------
332328

333-
Aggregating class/attribute distribution from annotations
329+
Aggregating class distribution from annotations
334330
_____________________________________________________________
335331

336332
.. autofunction:: superannotate.class_distribution
337-
.. autofunction:: superannotate.attribute_distribution
338333

339334
----------
340335

docs/source/tutorial.sdk.rst

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -453,16 +453,6 @@ Example of created DataFrame:
453453
Each row represents annotation information. One full annotation with multiple
454454
attribute groups can be grouped under :code:`instanceId` field.
455455

456-
A helper function :ref:`filter_annotation_instances <ref_filter_annotation_instances>` is available to filter annotation instances by their class, attribute, type or error fields from the DataFrame. E.g., to get annotations that have annotation class :code:`Human` and attribute :code:`"height" : "tall"` that are **not** of type :code:`polygon`:
457-
458-
.. code-block:: python
459-
460-
filtered_df = sa.filter_annotation_instances(df, include=[{"className" : "Human",
461-
"attributes" : [{"groupName" : "height",
462-
"name" : "tall"}]
463-
}],
464-
exclude=[{"type" : "polygon"}])
465-
466456
To transform back pandas DataFrame annotations to SuperAnnotate format annotation:
467457

468458
.. code-block:: python
@@ -490,17 +480,6 @@ Aggregated distribution is returned as pandas dataframe with columns className a
490480
491481
.. image:: class_distribution.png
492482

493-
494-
Similarly aggregation of class attributes across multiple projects can be obtained with
495-
496-
.. code-block:: python
497-
498-
df = sa.attribute_distribution("<path_to_export_folder>", [project_names], visualize = True)
499-
500-
Here pandas DataFrame with columns identifying attribute and corresponding instance count is returned. Within visualized histogram attributes of the same class are grouped by color and sorted accordingly.
501-
502-
.. image:: attribute_distribution.png
503-
504483
----------
505484

506485

src/superannotate/__init__.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import requests
66
import superannotate.lib.core as constances
77
from packaging.version import parse
8-
from superannotate.lib.app.analytics.class_analytics import attribute_distribution
98
from superannotate.lib.app.analytics.class_analytics import class_distribution
109
from superannotate.lib.app.annotation_helpers import add_annotation_bbox_to_json
1110
from superannotate.lib.app.annotation_helpers import add_annotation_comment_to_json
@@ -23,13 +22,7 @@
2322
from superannotate.lib.app.input_converters.conversion import export_annotation
2423
from superannotate.lib.app.input_converters.conversion import import_annotation
2524
from superannotate.lib.app.input_converters.df_converter import df_to_annotations
26-
from superannotate.lib.app.input_converters.df_converter import (
27-
filter_annotation_instances,
28-
)
29-
from superannotate.lib.app.input_converters.df_converter import (
30-
filter_images_by_comments,
31-
)
32-
from superannotate.lib.app.input_converters.df_converter import filter_images_by_tags
25+
3326
from superannotate.lib.app.input_converters.dicom_converter import dicom_to_rgb_sequence
3427
from superannotate.lib.app.interface.sdk_interface import add_annotation_bbox_to_image
3528
from superannotate.lib.app.interface.sdk_interface import (
@@ -175,7 +168,6 @@
175168
"init",
176169
"set_auth_token",
177170
# analytics
178-
"attribute_distribution",
179171
"class_distribution",
180172
"aggregate_annotations_as_df",
181173
"get_exports",
@@ -189,9 +181,6 @@
189181
"import_annotation",
190182
"export_annotation",
191183
"convert_project_type",
192-
"filter_images_by_comments",
193-
"filter_images_by_tags",
194-
"filter_annotation_instances",
195184
# helpers
196185
"add_annotation_bbox_to_json",
197186
"add_annotation_comment_to_json",

0 commit comments

Comments
 (0)