Skip to content

Commit

Permalink
Add checking of type image_fill_value
Browse files Browse the repository at this point in the history
  • Loading branch information
akarsakov committed May 2, 2020
1 parent 834d50d commit efc5367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion albumentations/augmentations/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit efc5367

Please sign in to comment.