diff --git a/luxonis_ml/data/augmentations/utils.py b/luxonis_ml/data/augmentations/utils.py index e0758dc9..179d70e7 100644 --- a/luxonis_ml/data/augmentations/utils.py +++ b/luxonis_ml/data/augmentations/utils.py @@ -444,18 +444,6 @@ def post_transform_process( keypoints_classes = np.expand_dims(keypoints_classes, axis=-1) out_keypoints = np.concatenate((keypoints_classes, out_keypoints), axis=1) if filter_kpts_by_bbox: - transformed_visibility = transformed_data["bboxes_visibility"] - if ( - len(transformed_visibility) != len(out_keypoints) - and not self.batch_transform.transforms - ): - raise ValueError( - "Number of keypoints and bounding boxes are not equal. " - "This can happen when using a dataset with multiple keypoint and boundingbox " - "tasks. To avoid this, use the 'detection' type when generating the dataset " - "instead of 'keypoints' and 'boundingbox' separately, or use the following " - "naming convention for task names: 'task_name-keypoints' and 'task_name-boundingbox." - ) out_keypoints = out_keypoints[ transformed_data["bboxes_visibility"] ] # keep only keypoints of visible instances