Merge pull request #1825 from roboflow/feat/support-int-labels

feat(LabelAnnotator): add support for non-str labels
This commit is contained in:
Piotr Skalski 2025-04-23 08:58:57 +02:00 committed by GitHub
commit 1dd6ff6ce5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1130,7 +1130,7 @@ class LabelAnnotator(BaseAnnotator):
detections: Detections, custom_labels: Optional[List[str]]
) -> List[str]:
if custom_labels is not None:
return custom_labels
return [str(label) for label in custom_labels]
labels = []
for idx in range(len(detections)):