From 100c466c7d8303a48af1d40c1f32bfcd709ec153 Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Wed, 25 Oct 2023 10:42:57 -0400 Subject: [PATCH 1/2] is_crowd optional support --- responsibleai_vision/responsibleai_vision/utils/image_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/responsibleai_vision/responsibleai_vision/utils/image_utils.py b/responsibleai_vision/responsibleai_vision/utils/image_utils.py index 24dcb1fb62..64fc3c4eb2 100644 --- a/responsibleai_vision/responsibleai_vision/utils/image_utils.py +++ b/responsibleai_vision/responsibleai_vision/utils/image_utils.py @@ -129,6 +129,9 @@ def transform_object_detection_labels(test, target_column, classes): xmax = label[BOTTOM_X] * width ymax = label[BOTTOM_Y] * height + if IS_CROWD not in label: + label[IS_CROWD] = 0 + image_labels.append([class_id, int(xmin), int(ymin), int(xmax), int(ymax), int(label[IS_CROWD])]) From ba0b3cefed832632a79a8859273d051e9acc72f8 Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Wed, 25 Oct 2023 11:13:06 -0400 Subject: [PATCH 2/2] Update image_utils.py --- responsibleai_vision/responsibleai_vision/utils/image_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/responsibleai_vision/responsibleai_vision/utils/image_utils.py b/responsibleai_vision/responsibleai_vision/utils/image_utils.py index 64fc3c4eb2..f5904ceec2 100644 --- a/responsibleai_vision/responsibleai_vision/utils/image_utils.py +++ b/responsibleai_vision/responsibleai_vision/utils/image_utils.py @@ -130,7 +130,7 @@ def transform_object_detection_labels(test, target_column, classes): ymax = label[BOTTOM_Y] * height if IS_CROWD not in label: - label[IS_CROWD] = 0 + label[IS_CROWD] = 0 image_labels.append([class_id, int(xmin), int(ymin), int(xmax), int(ymax),