Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augmentations hot-fix #167

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions luxonis_ml/data/augmentations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading