Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Affine #2249

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions albumentations/augmentations/geometric/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,6 @@ class InitSchema(BaseTransformInitSchema):
interpolation: InterpolationType
mask_interpolation: InterpolationType

cval: ColorType | None
cval_mask: ColorType | None
mode: BorderModeType | None

fill: ColorType
fill_mask: ColorType
border_mode: BorderModeType
Expand Down Expand Up @@ -717,19 +713,6 @@ def _handle_dict_arg(
return {"x": to_tuple(x, x), "y": to_tuple(y, y)} # type: ignore[arg-type]
return {"x": to_tuple(val, val), "y": to_tuple(val, val)}

@model_validator(mode="after")
def validate_fill_types(self) -> Self:
if self.cval is not None:
self.fill = self.cval
warn("cval is deprecated, use fill instead", DeprecationWarning, stacklevel=2)
if self.cval_mask is not None:
self.fill_mask = self.cval_mask
warn("cval_mask is deprecated, use fill_mask instead", DeprecationWarning, stacklevel=2)
if self.mode is not None:
self.border_mode = self.mode
warn("mode is deprecated, use border_mode instead", DeprecationWarning, stacklevel=2)
return self

def __init__(
self,
scale: ScaleFloatType | fgeometric.XYFloatScale = 1,
Expand All @@ -739,9 +722,6 @@ def __init__(
shear: ScaleFloatType | fgeometric.XYFloatScale = 0,
interpolation: int = cv2.INTER_LINEAR,
mask_interpolation: int = cv2.INTER_NEAREST,
cval: ColorType | None = None,
cval_mask: ColorType | None = None,
mode: int | None = None,
fit_output: bool = False,
keep_ratio: bool = False,
rotate_method: Literal["largest_box", "ellipse"] = "largest_box",
Expand Down
Loading