Skip to content

Commit 17ed845

Browse files
author
ammkk
committed
Fixed export_coco to support pose estimation
1 parent 0b5c08c commit 17ed845

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fastlabel/converters.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ def __to_area(annotation_type: str, points: list) -> float:
405405
def __calc_area(annotation_type: str, points: list) -> float:
406406
if not points:
407407
return 0
408-
if annotation_type == AnnotationType.bbox.value:
408+
if annotation_type in [
409+
AnnotationType.bbox.value,
410+
AnnotationType.pose_estimation.value,
411+
]:
409412
width = points[0] - points[2]
410413
height = points[1] - points[3]
411414
return width * height

0 commit comments

Comments
 (0)