Skip to content

Commit

Permalink
Updated Affine (#2249)
Browse files Browse the repository at this point in the history
  • Loading branch information
ternaus authored Jan 7, 2025
1 parent 96626a1 commit d75c583
Showing 1 changed file with 0 additions and 20 deletions.
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

0 comments on commit d75c583

Please sign in to comment.