Skip to content

Commit d27e575

Browse files
Merge pull request #218 from fastlabel/feature/fix-support-pose-estimation-coco
Fixed export_coco to support pose estimation
2 parents 0b5c08c + 17ed845 commit d27e575

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)