There exists a bug in tile_annotations where the annotation's coordinates were simply not getting corrected based on which tile they belonged to. This would cause a box to be in pixels that didn't exist in the image.
To solve this, there is a new method for BoundingBox that sets the box's values called set_box. Under the hood this just returns a new object with the new values (and the same category). Keypoint was updated to have the same function, and although it doesn't strictly need to, it also returns a whole new Keypoint. Also added a correct_keypoint method that does much the same thing as set_box does for BoundingBox.
Note that you can change the bounding box of a keypoint with the same method set_box such that it is an invalid keypoint (keypoint is not in the box), but you cannot change its keypoint via set_keypoint in a way that makes it invalid.
There exists a bug in tile_annotations where the annotation's coordinates were simply not getting corrected based on which tile they belonged to. This would cause a box to be in pixels that didn't exist in the image.
To solve this, there is a new method for BoundingBox that sets the box's values called set_box. Under the hood this just returns a new object with the new values (and the same category). Keypoint was updated to have the same function, and although it doesn't strictly need to, it also returns a whole new Keypoint. Also added a correct_keypoint method that does much the same thing as set_box does for BoundingBox. Note that you can change the bounding box of a keypoint with the same method set_box such that it is an invalid keypoint (keypoint is not in the box), but you cannot change its keypoint via set_keypoint in a way that makes it invalid.