diff --git a/albumentations/augmentations/transforms.py b/albumentations/augmentations/transforms.py index c88d52ed3..5a9a0efad 100644 --- a/albumentations/augmentations/transforms.py +++ b/albumentations/augmentations/transforms.py @@ -3161,7 +3161,7 @@ def apply(self, img, dropout_mask=None, image_fill_value=0, **params): if dropout_mask is None: return img - if image_fill_value == "inpaint": + if isinstance(image_fill_value, str) and image_fill_value == "inpaint": dropout_mask = dropout_mask.astype(np.uint8) _, _, w, h = cv2.boundingRect(dropout_mask) radius = min(3, max(w, h) // 2)