Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Type area as float instead of int (#1320)
Bounding boxes are collections of floats, see https://github.com/albumentations-team/albumentations/blob/3904898e3bfe476137a75cad6ae3d1015e3d468e/albumentations/core/transforms_interface.py#L29: ```python BoxInternalType = Tuple[float, float, float, float] BoxType = Union[BoxInternalType, Tuple[float, float, float, float, Any]] ``` Denormalizing does not (and should not) convert anything to `int`. The resulting `x_min`, `y_min`, `x_max`, `y_max` are not `int` and almost never whole numbers. Therefore, the value returned from `calculate_bbox_area` will almost never be a whole number. In all cases, the returned value's type will be `float`.
- Loading branch information