Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vorozhkog committed Nov 11, 2024
1 parent 83ccb06 commit 28d8152
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/convert_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def convert_annotation(ann_info, img_info, src_meta, dst_meta, rectangle_mark):
return sly.Annotation((img_info.height, img_info.width))
new_labels = []

for binding_key, labels in ann.get_bindings():
groups = ann.get_bindings()
for binding_key, labels in groups.items():
for label in labels:
try:
new_cls = dst_meta.obj_classes.get(label.obj_class.name)
Expand Down
3 changes: 1 addition & 2 deletions src/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def create_coco_dataset(coco_dataset_dir):
return img_dir, ann_dir


def get_bbox_labels(bbox_points: List[List[int, int]]) -> List[List[int, int]]:
def get_bbox_labels(bbox_points: List[List[int]]) -> List[List[int]]:
"""
A helper function to convert list of bbox points into a bbox which contains them all
"""
Expand Down Expand Up @@ -120,7 +120,6 @@ def create_coco_annotation(
coco_captions["images"].append(image_coco_ann)

groups = ann.get_bindings()

for binding_key, labels in groups.items():
labels: List[sly.Label]
if binding_key is not None: # -> converted bitmap labels
Expand Down

0 comments on commit 28d8152

Please sign in to comment.