Skip to content

Commit

Permalink
Fixed TypeError in YOLO model by ensuring setText accepts only string…
Browse files Browse the repository at this point in the history
… arguments (#327)
  • Loading branch information
CVHub520 committed Mar 20, 2024
1 parent ea435b0 commit 6f4447a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions anylabeling/services/auto_labeling/__base__/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def predict_shapes(self, image, image_path=None):
shape.fill_color = "#000000"
shape.line_color = "#000000"
shape.line_width = 1
shape.label = self.classes[int(class_id)]
shape.label = str(self.classes[int(class_id)])
shape.selected = False
shapes.append(shape)
if self.task == "seg":
Expand Down Expand Up @@ -339,7 +339,7 @@ def predict_shapes(self, image, image_path=None):
shape.fill_color = "#000000"
shape.line_color = "#000000"
shape.line_width = 1
shape.label = self.classes[int(class_id)]
shape.label = str(self.classes[int(class_id)])
shape.selected = False
shapes.append(shape)
if self.task == "obb":
Expand All @@ -360,7 +360,7 @@ def predict_shapes(self, image, image_path=None):
shape.fill_color = "#000000"
shape.line_color = "#000000"
shape.line_width = 1
shape.label = self.classes[int(class_id)]
shape.label = str(self.classes[int(class_id)])
shape.selected = False
shapes.append(shape)

Expand Down
2 changes: 1 addition & 1 deletion anylabeling/services/auto_labeling/rtmdet_pose.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def predict_shapes(self, image, image_path=None):
if score < self.kpt_thr:
continue
point_shape = Shape(
label=self.kpt_classes[j],
label=str(self.kpt_classes[j]),
shape_type="point",
group_id=int(i),
)
Expand Down

0 comments on commit 6f4447a

Please sign in to comment.