Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ternaus committed Nov 1, 2024
1 parent 9b1f987 commit 92e304f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions albumentations/augmentations/geometric/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import cv2
import numpy as np
from albucore import get_num_channels, hflip, maybe_process_in_chunks, multiply_by_constant, preserve_channel_dim, vflip
from albucore import get_num_channels, hflip, maybe_process_in_chunks, preserve_channel_dim, vflip

from albumentations.augmentations.utils import angle_2pi_range, handle_empty_array
from albumentations.core.bbox_utils import bboxes_from_masks, denormalize_bboxes, masks_from_bboxes, normalize_bboxes
Expand Down Expand Up @@ -1512,7 +1512,7 @@ def generate_noise_field() -> np.ndarray:
elif noise_distribution == "uniform":
field = random_generator.uniform(low=-1, high=1, size=image_shape[:2]).astype(np.float32)
cv2.GaussianBlur(field, kernel_size, sigma, dst=field)
return multiply_by_constant(field, alpha, inplace=True)
return field * alpha

# Generate first displacement field
dx = generate_noise_field()
Expand Down

0 comments on commit 92e304f

Please sign in to comment.