Skip to content

Commit

Permalink
FIx
Browse files Browse the repository at this point in the history
  • Loading branch information
ternaus committed Jan 27, 2025
1 parent 3bcf5fe commit 3f2a3a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions albumentations/core/bbox_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def __init__(
self.check_each_transform = check_each_transform
self.clip = clip
self.filter_invalid_bboxes = filter_invalid_bboxes
if max_accept_ratio is not None and max_accept_ratio < 1.0:
raise ValueError(

Check warning on line 122 in albumentations/core/bbox_utils.py

View check run for this annotation

Codecov / codecov/patch

albumentations/core/bbox_utils.py#L122

Added line #L122 was not covered by tests
"max_accept_ratio must be >= 1.0 when provided, as aspect ratio is calculated as max(w/h, h/w)",
)
self.max_accept_ratio = max_accept_ratio # e.g., 5.0

def to_dict_private(self) -> dict[str, Any]:
Expand Down

0 comments on commit 3f2a3a6

Please sign in to comment.