-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
🚀 The feature
When keypoints fall outside of the visible area of an image after a transformation such as cropping or rotation, they are currently clamped to one of the edges of the image, i.e., a keypoint at [-10, 25]
becomes [0, 25]
. It would be useful to have an option to remove such invisible keypoints instead.
Motivation, pitch
Often it makes more sense to omit keypoints that are not visible in the image instead of changing their location, which the current clamping mode does.
It would be useful to be able to specify an alternative clamping_mode
for KeyPoints
tensors that does not move them to the image edges but allows them to have coordinates outside of the image. This clamping mode could be combined with a new transformation SanitizeKeyPoints
, similar to the existing SanitizeBoundingBoxes
, which removes such invisible keypoints. Keypoints can sometimes have labels associated with them in a separate tensor, which this transformation should be able to remove as well.
Alternatives
No response
Additional context
No response