From 17ed845e44c1f83afb8c83ce0b7198d4965347a0 Mon Sep 17 00:00:00 2001 From: ammkk Date: Tue, 9 Jul 2024 17:40:53 +0900 Subject: [PATCH] Fixed export_coco to support pose estimation --- fastlabel/converters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fastlabel/converters.py b/fastlabel/converters.py index 84d3614..2c7a98b 100644 --- a/fastlabel/converters.py +++ b/fastlabel/converters.py @@ -405,7 +405,10 @@ def __to_area(annotation_type: str, points: list) -> float: def __calc_area(annotation_type: str, points: list) -> float: if not points: return 0 - if annotation_type == AnnotationType.bbox.value: + if annotation_type in [ + AnnotationType.bbox.value, + AnnotationType.pose_estimation.value, + ]: width = points[0] - points[2] height = points[1] - points[3] return width * height