Skip to content

Commit 641dcd2

Browse files
committed
fixing shapely issues
1 parent 5b3890e commit 641dcd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,16 +477,16 @@ def consensus(df, item_name, annot_type):
477477
y1, y2 = inst_coords["y1"], inst_coords["y2"]
478478
inst = box(min(x1, x2), min(y1, y2), max(x1, x2), max(y1, y2))
479479
elif annot_type == "polygon":
480-
inst_coords = inst_data["points"]
480+
inst_coords = inst_data
481481
shapely_format = []
482482
for i in range(0, len(inst_coords) - 1, 2):
483483
shapely_format.append((inst_coords[i], inst_coords[i + 1]))
484484
inst = Polygon(shapely_format)
485485
elif annot_type == "point":
486486
inst = Point(inst_data["x"], inst_data["y"])
487-
if annot_type == "tag" and inst.is_valid():
487+
if annot_type != "tag" and inst.is_valid:
488488
projects_shaply_objs[row["folderName"]].append(
489-
(inst, row["classNme"], row["creatorEmail"], row["attributes"])
489+
(inst, row["className"], row["creatorEmail"], row["attributes"])
490490
)
491491
else:
492492
logger.info(

0 commit comments

Comments
 (0)