Skip to content

Commit 5dab057

Browse files
committed
aggregastions change
1 parent a32853a commit 5dab057

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
===============================
21
SuperAnnotate Python SDK
32
===============================
4-
53
|Python| |License| |Changelog|
64

5+
76
Welcome to the SuperAnnotate Python Software Development Kit (SDK), which enables Python programmers to create software that incorporates services of the platform and effortlessly integrates SuperAnnotate into their AI process.
87

98
.. |Python| image:: https://img.shields.io/static/v1?label=python&message=3.7/3.8/3.9/3.10/3.11&color=blue&style=flat-square

src/superannotate/lib/app/analytics/aggregators.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class DataAggregator:
9191
"polygon": lambda annotation: annotation["points"],
9292
"polyline": lambda annotation: annotation["points"],
9393
"cuboid": lambda annotation: annotation["points"],
94+
"comment": lambda annotation: annotation["points"],
9495
"point": lambda annotation: {"x": annotation["x"], "y": annotation["y"]},
9596
"annotation_type": lambda annotation: dict(
9697
cx=annotation["cx"],
@@ -123,7 +124,7 @@ def annotation_suffix(self):
123124
self._annotation_suffix = PIXEL_ANNOTATION_POSTFIX
124125
else:
125126
self._annotation_suffix = ATTACHED_VIDEO_ANNOTATION_POSTFIX
126-
return self._annotation_suffix
127+
return ATTACHED_VIDEO_ANNOTATION_POSTFIX
127128

128129
def get_annotation_paths(self):
129130
annotations_paths = []
@@ -378,7 +379,7 @@ def __append_annotation(annotation_dict):
378379

379380
for annotation_path in annotations_paths:
380381
annotation_json = json.load(open(annotation_path))
381-
parts = annotation_path.name.split(self.annotation_suffix)
382+
parts = Path(annotation_path).name.split(self.annotation_suffix)
382383
if len(parts) != 2:
383384
continue
384385
image_name = parts[0]
@@ -449,8 +450,8 @@ def __append_annotation(annotation_dict):
449450
attributes = annotation.get("attributes")
450451
user_metadata = self.__get_user_metadata(annotation)
451452
folder_name = None
452-
if annotation_path.parent != Path(self.project_root):
453-
folder_name = annotation_path.parent.name
453+
if Path(annotation_path).parent != Path(self.project_root):
454+
folder_name = Path(annotation_path).parent.name
454455
num_added = 0
455456
if not attributes:
456457
annotation_dict = {

0 commit comments

Comments
 (0)