Skip to content

Commit c8e4c1a

Browse files
authored
Merge pull request #221 from superannotateai/fuse_fix
Fuse iamge fix
2 parents a0b9100 + c7fdc0c commit c8e4c1a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/superannotate/lib/core/usecases/images.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -834,14 +834,16 @@ def execute(self):
834834

835835
outline_color = 4 * (255,)
836836
for instance in self.annotations["instances"]:
837+
if not instance.get("className"):
838+
continue
837839
color = class_color_map.get(instance["className"])
838840
if not color:
839841
class_color_map[instance["className"]] = self.generate_color()
840-
fill_color = (
841-
*class_color_map[instance["className"]],
842-
self.TRANSPARENCY,
843-
)
844842
for image in images:
843+
fill_color = (
844+
*class_color_map[instance["className"]],
845+
255 if image.type == "fuse" else self.TRANSPARENCY
846+
)
845847
if instance["type"] == "bbox":
846848
image.content.draw_bbox(
847849
**instance["points"],

0 commit comments

Comments
 (0)