Description:
I am encountering an issue while applying transformations to YOLOv8 annotations (object detection format) using albumentations. Below is a minimal reproducible example
Error:
When applying different transformations (even an empty one), I consistently receive the following error
ValueError: Expected y_min for bbox [ 2.0775801e-01 -5.0012022e-07 2.5549600e-01 2.9806498e-02 0.0000000e+00] to be in the range [0.0, 1.0], got -5.00120222568512e-07.
Observations:
Input image shape (672, 504, 3)
The original bounding box coordinates are well within the valid range [0.0, 1.0].
Drawing the bounding boxes on the original image using a custom function shows correct placement and dimensions.
The error consistently produces the same invalid numbers:
Custom Function for Verification:
Below is the custom function I used to verify the correctness of the bounding boxes by visualizing them on the image:
The bounding boxes drawn using this function align correctly with the objects in the image.
The issue seems to be related to how albumentations processes the YOLO format during transformations.
Questions:
Where do the negative y_min values originate, given that the original annotations are valid?
Is this a bug in the library, or is there a mistake in the way I define or pass the annotations?
Any help in resolving this would be greatly appreciated!
Description: I am encountering an issue while applying transformations to YOLOv8 annotations (object detection format) using albumentations. Below is a minimal reproducible example
Error: When applying different transformations (even an empty one), I consistently receive the following error
Observations: Input image shape (672, 504, 3) The original bounding box coordinates are well within the valid range [0.0, 1.0]. Drawing the bounding boxes on the original image using a custom function shows correct placement and dimensions. The error consistently produces the same invalid numbers:
Custom Function for Verification: Below is the custom function I used to verify the correctness of the bounding boxes by visualizing them on the image:
Notes:
The bounding boxes drawn using this function align correctly with the objects in the image. The issue seems to be related to how albumentations processes the YOLO format during transformations. Questions: Where do the negative y_min values originate, given that the original annotations are valid? Is this a bug in the library, or is there a mistake in the way I define or pass the annotations? Any help in resolving this would be greatly appreciated!